You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
copernicusmarine has Start-of-interval time samples (e.g. start of hour, day, month, year) — native datasets use a mix of start-of-interval and center-of-interval. We had midday timestamps when using opendap, now we have midnight values, but the actual data is the same. Consider to correct for this? The data is always daily mean, at least in dfmt.copernicusmarine_get_dataset_id(), so we could add an offset of 12 hours.
beware on time administration, especially since date timestrings like "2020-06-29" are parsed to datetimes of the midnight version of that, while with normal xr.Dataset.sel() this would include the entire day. Also check if we can download end of reanalysis and start of reanalysis-interim smoothly.
check writing of initial fields again, still two values around the model start time?
Some usecases:
downloading data and interpolate to boundaries to serve as boundary conditions for models, in this case it could make sense to move the daily average to noon, since this is then representative for the entire day and in the middle.
when using the data as validation data for a model, it would be best to compare to daily averages of the model also. With xarray this would most probably end up at midnight also, so no timeshift is desired. When comparing to instantaneous model values, it is slightly more convenient to have the cmems data on midday, but it does not matter much and comparing a daily mean to an instantaneous value on midnight or noon is not accurate anyway.
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 servicedesk.cmems@mercator-ocean.eu on 10-7-2024, the request is registered under ticket [MDSOP-179]
For BES project?
The text was updated successfully, but these errors were encountered:
copernicusmarine has Start-of-interval time samples (e.g. start of hour, day, month, year) — native datasets use a mix of start-of-interval and center-of-interval. We had midday timestamps when using opendap, now we have midnight values, but the actual data is the same. Consider to correct for this? The data is always daily mean, at least in
dfmt.copernicusmarine_get_dataset_id()
, so we could add an offset of 12 hours.dfm_tools/dfm_tools/download.py
Lines 252 to 287 in 03cabed
For instance by replacing three occurences of
copernicusmarine.open_dataset()
with the following code:Minimal code for debugging:
Todo:
copernicusmarine_open_dataset_12h_offset
code abovedfmt.download_CMEMS()
subset time after opening dataset with 12h-offset function, but also check the impact on performance of this changexr.Dataset.sel()
this would include the entire day. Also check if we can download end of reanalysis and start of reanalysis-interim smoothly.Some usecases:
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 servicedesk.cmems@mercator-ocean.eu on 10-7-2024, the request is registered under ticket[MDSOP-179]
For BES project?
The text was updated successfully, but these errors were encountered: