Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change datum default to MSL for coops_product_within_region #124

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions searvey/coops.py
Original file line number Diff line number Diff line change
Expand Up @@ -870,15 +870,15 @@ def coops_product_within_region(
:param region: polygon or multipolygon denoting region of interest
:param start_date: start date of CO-OPS query
:param end_date: start date of CO-OPS query
:param datum: tidal datum
:param datum: tidal datum, one of ``STND``, ``MSL``, ``MHHW``, ``MHW``, ``MTL``, ``MLW``, ``MLLW``, ``NAVD``
:param interval: data time interval
:param station_status: either ``active`` or ``discontinued``
:return: array of data within the specified region

>>> from datetime import datetime, timedelta
>>> import shapely
>>> east_coast = shapely.geometry.box(-85, 25, -65, 45)
>>> coops_product_within_region('water_level', region=east_coast, start_date=datetime(2022, 4, 2, 12), end_date=datetime(2022, 4, 2, 12, 30))
>>> coops_product_within_region('water_level', region=east_coast, datum='MSL', start_date=datetime(2022, 4, 2, 12), end_date=datetime(2022, 4, 2, 12, 30))
<xarray.Dataset>
Dimensions: (t: 6, nos_id: 111)
Coordinates:
Expand All @@ -893,6 +893,8 @@ def coops_product_within_region(
f (nos_id, t) object '0,0,0,0' '0,0,0,0' ... '1,0,0,0' '1,0,0,0'
q (nos_id, t) object 'p' 'p' 'p' 'p' 'p' 'p' ... 'p' 'p' 'p' 'p' 'p'
"""
if datum is None:
datum = "MSL" # change the default from STND to MSL

stations = coops_stations_within_region(region=region, station_status=station_status)
station_data = [
Expand Down
Loading