Fieldset date does not sync with the netcdf downloaded #2219
Replies: 4 comments 3 replies
-
|
Hi @sohinidudhat-dotcom , given your error throws What happens if you remove the |
Beta Was this translation helpful? Give feedback.
-
|
Hi Michael,
I removed the time_origin=pd.Timestamp("2024-01-01"), but it still shows
the same error.
…On Tue, Sep 16, 2025 at 1:22 PM Michael Denes ***@***.***> wrote:
Hi @sohinidudhat-dotcom <https://github.com/sohinidudhat-dotcom> , given
your error throws 2078-12-10T12:00:00.000000000, which is approx. 54
years after 2024, and 2024 is 54 years after 1970, my speculation is that,
because you fix your datasets to have units of "seconds since 1970-01-01
00:00:00", and then you set the time origin in parcels with
time_origin=pd.Timestamp("2024-01-01"), it is reading the date units as
"seconds since 1970-01-01 00:00:00".
What happens if you remove the time_origin=pd.Timestamp("2024-01-01")
argument when creating your fieldset?
—
Reply to this email directly, view it on GitHub
<#2219 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BXOKKJPBKAPGYVZO4I3VS3L3S76H3AVCNFSM6AAAAACGULHRQOVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTINBRGQ3TQOI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
--
Sohini Dudhat
PhD student CRMG, Scottish Oceans Institute
University of St Andrews, Scotland
***@***.***
https://crmg.st-andrews.ac.uk/
|
Beta Was this translation helpful? Give feedback.
-
|
Hi Michael,
Well, the issue is really how the fieldset is reading the netCDF. I do
not think the way I tried before fixed it.
I went through the TimeStamps and calendars — Parcels Documentation
<https://docs.oceanparcels.org/en/stable/examples/tutorial_timestamps.html>,
and added timestamps. While the particles are advected by doing this, more
than one particle trajectory is not stored in the .zarr file and I am
unable to plot it.
Best
Sohini
…On Tue, Sep 16, 2025 at 1:47 PM Michael Denes ***@***.***> wrote:
Hi @sohinidudhat-dotcom <https://github.com/sohinidudhat-dotcom>, what
was the purpose of the fix_time_encoding function? What does the data you
downloaded look like, is it not in regular units of seconds since
1970-01-01? And does your function actually fix the time dimension (i.e.
cur24_fixed.nc has the corrected time values)?
I think the issue is with your data, and that you should explore that
avenue first. With that said, it's hard to determine the root cause of the
issue without seeing the data.
—
Reply to this email directly, view it on GitHub
<#2219 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BXOKKJLKKNY5DZAGV7WO6AT3TABGPAVCNFSM6AAAAACGULHRQOVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTINBRGUZDEOI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
--
Sohini Dudhat
PhD student CRMG, Scottish Oceans Institute
University of St Andrews, Scotland
***@***.***
https://crmg.st-andrews.ac.uk/
|
Beta Was this translation helpful? Give feedback.
-
|
As you say Output: FieldSet time coverage:
Min: 1970-07-08 00:00:00+00:00
Max: 1970-07-09 00:00:00+00:00 # This is the issue! this coverage is not in 2024then the issue is with your data. I tried your In an ideal world, I would have the data provider correct the data to fit the native model output. If you can't do that, then indeed, correctly editing the time stamps should work. While debugging this, I recommend that you iteratively build up to the simulation you want to run so that it's easier to find where the bug occurs. For example, a simple forward advection at the initial model time (i.e. not providing the |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Question
Question
Hi, I have downloaded netcdfs for currents, winds and stokes drifts for the year 2024. I imported them into parcels and proceeded to build a fieldset. However, the fieldset date-times are showing up as ' FieldSet time coverage:
Min: 1970-01-01 00:00:00+00:00
Max: 1970-01-02 00:00:00+00:00' and hence I am not able to advect my particle set which is released at varying dates in the year 2024 'Particle release times:
DatetimeIndex(['2024-01-10 12:00:00+00:00', '2024-05-10 12:00:00+00:00',
'2024-07-10 12:00:00+00:00', '2024-09-10 12:00:00+00:00',
'2024-12-10 12:00:00+00:00'],
dtype='datetime64[ns, UTC]', freq=None)'. I get an error when I use pset.execute ' TimeExtrapolationError: U sampled outside time domain at time 2078-12-10T12:00:00.000000000.'
Supporting code/error messages
Beta Was this translation helpful? Give feedback.
All reactions