-
Notifications
You must be signed in to change notification settings - Fork 16
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
Consider 12-hour offset for CMEMS data #878
Comments
This was referenced Sep 3, 2024
Closed
Closed
This was referenced Sep 26, 2024
Closed
Closed
This was referenced Jan 14, 2025
Closed
This was referenced Jan 23, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The functions
copernicusmarine.subset()
andcopernicusmarine.open_dataset()
always return start-of-interval time samples (e.g. start of hour, day, month, year) because of the underlying ARCO format. Native datasets (retrieved withcopernicusmarine.get()
or with opendap before December 2023) use a mix of start-of-interval and center-of-interval. We had mid-day timestamps when using opendap, now we have midnight values, but the actual data is the same. This is documented in https://help.marine.copernicus.eu/en/articles/8656000-differences-between-netcdf-and-arco-formats. In dfm_tools the copernicus opendap server was used to retrieve data until approximately December 2023 (so noon timestamps, center-of-interval). After that (v0.18.0 onwards), the copernicusmarine toolbox was used (so midnight timestamps, start-of interval).Most of the datasets we use are daily means, so consider to correct for this by adding an offset of 12 hours. Frequently used datasets are documented in
dfmt.copernicusmarine_get_dataset_id()
.dfm_tools/dfm_tools/download.py
Lines 252 to 287 in 03cabed
The PUM states the daily averaged products are centered at noon, not at midnight, this issue restores this behaviour:
![Image](https://private-user-images.githubusercontent.com/60435591/407675562-58287278-4c82-4886-9b0b-95eddc570722.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg3NjA3MDgsIm5iZiI6MTczODc2MDQwOCwicGF0aCI6Ii82MDQzNTU5MS80MDc2NzU1NjItNTgyODcyNzgtNGM4Mi00ODg2LTliMGItOTVlZGRjNTcwNzIyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA1VDEzMDAwOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTg3ODFkZjJhMTVhZmMwNzMyMWIzMDgzNzY5ZGZmN2IwNTc0OTZkYjUzMGYxYzYwNzA1ZmRjNDYwYzZiOTkzOGYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.zcdYwF7gaz969RUYN3Rmy77irzXvwRyu5IUlYxO01uk)
Some usecases:
Check performance and behaviour (like file names and extents) with:
Todo:
copernicusmarine.open_dataset()
mercator-ocean/copernicus-marine-toolbox#271dfmt.cmems_nc_to_ini()
: Support for noon and monthly averaged data indfmt.cmems_nc_to_ini()
#1086dfmt.cmems_nc_to_bc()
(should not be needed anymore after Fix timeslice inclusive outside #1062, but test with different start/stop times)dfmt.cmems_nc_to_bc()
_ds_sel_time_outside()
that includes a testxr.Dataset.sel()
this would include the entire day. Also check if we can download end of reanalysis and start of reanalysis-interim smoothly. >> old notes, not so relevant anymore_ds_sel_time_outside()
newly implemented in Fix timeslice inclusive outside #1062), but could be slower than the defaultoutside
coordinate selection ofcopernicusmarine
. Choose either of both, but check performance.The new implementation:
*rean-d
is also corrected with 12 hours. This is temporary hardcoding that will be removed in copernicusmarine remove hardcoded offset for "rean-d" datasets #1090.Alternative approach
Alternatively, request a argument for
copernicusmarine.open_dataset()
to get averaged values in mid-time or start-time of the average. That would completely solve all complexity around this issue. Also request attributes, at the moment it is not clear in the dataset that the time is not instantaneous but averaged. Check if insitu timeseries are instantaneous and not averaged. Requested new argument and/or metadata via [email protected] on 10-7-2024, the request is registered under ticket[MDSOP-179]
and mercator-ocean/copernicus-marine-toolbox#271.Potential projects: BES>>Malta, EDITO
The text was updated successfully, but these errors were encountered: