oceanmodeling / searvey

Sea state observational data retrieval
https://searvey.readthedocs.io/en/stable/
GNU General Public License v3.0
23 stars 11 forks source link

CO-OPS wind product #154

Open AtiehAlipour-NOAA opened 2 months ago

AtiehAlipour-NOAA commented 2 months ago

Hi, I am using searvey to retrieve CO-OPS wind observation data. I am requesting the CO-OPS wind product, and as you mentioned, I am expecting this list of variables: {"t": "time", "s": "speed", "d": "degree", "dr": "direction", "g": "gust", "f": "flags"} , However, the code is returning different variables and values:

image

I would greatly appreciate your help. Thanks!

AtiehAlipour-NOAA commented 2 months ago

An example co-ops wind observation data for the region I am interested: https://tidesandcurrents.noaa.gov/met.html?bdate=20240707&edate=20240709&units=standard&timezone=GMT&id=8771972&interval=6

Here is my code:

bbox = shapely.box(Region[0], Region[2], Region[1], Region[3])
station_ds= searvey.coops.coops_product_within_region('wind', region=bbox, start_date=datetime.fromtimestamp(nowcast_2d_all.time.values[0].astype(int) * 1e-9)
, end_date=datetime.fromtimestamp(nowcast_2d_all.time.values[-1].astype(int) * 1e-9))

for this date range of start_date=datetime.datetime(2024, 7, 7, 0, 0) and end_date=datetime.datetime(2024, 7, 10, 0, 0)

AtiehAlipour-NOAA commented 2 months ago

Similar result when I use coops.COOPS_Station:

station= searvey.coops.COOPS_Station(8771972) 
station_df = station.product(start_date=datetime.fromtimestamp(nowcast_2d_all.time.values[0].astype(int) * 1e-9, tz=timezone.utc)
, end_date=datetime.fromtimestamp(nowcast_2d_all.time.values[-1].astype(int) * 1e-9, tz=timezone.utc), product='wind')
station_df

Thanks for your help!

AtiehAlipour-NOAA commented 2 months ago

Thanks to @SorooshMani-NOAA's help, I was able to extract wind observation data.

image