I am using py_eddy_tracker for a model data (GFDL CM2-O) which uses Julian calendar and has years ranging from 181 to 190 (5-day means). Summary: when I use datetime function, the resulting time in the eddy files are wrong. But cannot do the detection and tracking when I use cft.DatetimeJulian to define my date. Question: Just giving the sorted list of files to the tracking functions (Correspondances) ensures the correct tracking?
Previously, for the detection, I was doing something like:
month_days = pd.date_range(start='1/3/2001', end='12/29/2001', freq='5D') #array with my annual 73 day/month values
def detection(year, n, run=1, version_res=6):
data = get_path(run, version_res, year, n) #getting data path
g = UnRegularGridDataset(data, "geolon_t", "geolat_t", centered=True, indexs = dict(time=0))
date = datetime(year, month_days.month[n-1], month_days.day[n-1]) # detect each timestep individually because of memory issues
g.high_filter('SSH', 700)
a, c = g.eddy_identification("SSH", "u", "v", date,
0.004,
pixel_limit=None,
shape_error=70,
)
for i in np.arange(1,74):
detection(181,i, run=1)
However, when I load the eddy data, all the eddies, in different files of different years, have the time variable wrong (and same values):
Before noticing that, I had conducted the tracking without problems. But I was wondering if the wrong time in the resulting eddy netcdf files would lead to wrong tracks (I gave the sorted list of files to the tracking functions). I plotted some tracking plots and it seemed reasonable, but I'd like to double-check.
I had tried to change the time variable in the resulting eddy files, with something like this:
Hi,
I am using py_eddy_tracker for a model data (GFDL CM2-O) which uses Julian calendar and has years ranging from 181 to 190 (5-day means). Summary: when I use datetime function, the resulting time in the eddy files are wrong. But cannot do the detection and tracking when I use cft.DatetimeJulian to define my date. Question: Just giving the sorted list of files to the tracking functions (Correspondances) ensures the correct tracking?
Previously, for the detection, I was doing something like:
However, when I load the eddy data, all the eddies, in different files of different years, have the time variable wrong (and same values):
Before noticing that, I had conducted the tracking without problems. But I was wondering if the wrong time in the resulting eddy netcdf files would lead to wrong tracks (I gave the sorted list of files to the tracking functions). I plotted some tracking plots and it seemed reasonable, but I'd like to double-check.
I had tried to change the time variable in the resulting eddy files, with something like this:
But got this error when I tried the tracking:
I had also tried to run the detection again, changing the 'date' line in the first example with:
But got:
Thanks for your time!