iobis / pyobis

OBIS Python client
https://iobis.github.io/pyobis
MIT License
14 stars 10 forks source link

Document units and direction for use of depth search parameters #68

Closed MathewBiddle closed 2 years ago

MathewBiddle commented 2 years ago

If I wanted to do an occurrence search including a filter by depth. The docs don't currently tell me:

  1. What units should I use?
  2. What direction are we using?

For example, if I wanted to search between 10 and 50 meters depth, should I use: start_depth = -10 end_depth = -50

Please update the docs to describe this.

To share some information, the Climate and Forecast conventions is what made me think of this nuance. The guidance is to specifically include units and direction with vertical coordinates. I don't think we need to handle conversions in the code, but we should be documenting what the expectation is.

MathewBiddle commented 2 years ago

I think the obis api assumes depth is a negative value. So you supply a positive number. In my example above, the options would be: start_depth=10 end_depth=50

MathewBiddle commented 2 years ago

@ayushanand18 please check into this depth issue. I think there is a bug

ayushanand18 commented 2 years ago

Thank you so much @MathewBiddle! that's an interesting insight. I agree that all physical quantities we will be using as parameters must be documented. Indeed, OBIS already treats depth as negative quantities, so we need to supply magnitudes of depth in meters. I will update the docstrings everywhere.

Something like this

 :param startdepth: [Fixnum] Start depth in meters. Depth below sea level are treated as positive numbers.