Closed dafyddstephenson closed 3 months ago
The bry_time
variable has an attribute cycle_length
that is filled with the value 365.25. If cycle_length
is present, ROMS will just cycle through these dates (iteratively adding cycle_length
) until the dates hit the actual range of the run.
In case of a climatology (as here), bry_time
will just hold the year 2000 values, or whatever is closest to the reference time. If this is confusing, I can change it to year 2012 values or whatever is the first covered year of the simulation (based on start_time
).
By the way, instead of doing
bds=roms_bry.ds["bgc"].to_dataset()
[dt.datetime(2000,1,1,0,0,0)+dt.timedelta(seconds=float(bds['bry_time'].values[i]*1e-9)) for i in range(len(bds.bry_time))]
you could have just looked at roms_bry.ds["bgc"]["abs_time"]
, which should hold the same values. ;)
abs_time
and bry_time
output the same thing for me!
xarray.DataArray
'abs_time'
bry_time: 12
array([ 1296000000000000, 3888000000000000, 6393600000000000,
9072000000000000, 11664000000000000, 14342400000000000,
16934400000000000, 19612800000000000, 22291200000000000,
24883200000000000, 27561600000000000, 30153600000000000],
dtype='timedelta64[ns]')
Coordinates:
abs_time
(bry_time)
timedelta64[ns]
15 days 45 days ... 349 days
bry_time
(bry_time)
timedelta64[ns]
15 days 45 days ... 349 days
Oh true, in the case of a climatology... Sorry!
Can this issue be closed @dafyddstephenson? Or what do you think about this:
In case of a climatology (as here), bry_time will just hold the year 2000 values, or whatever is closest to the reference time. If this is confusing, I can change it to year 2012 values or whatever is the first covered year of the simulation (based on start_time).
It can be closed, though I'd maybe suggest an attribute that indicates it's a climatology in a more human-readable format, and for abs_time
to be formatted differently in this case - What do you think?
Both good ideas! I will work on those.
The attribute should maybe be global, rather than one of bry_time
?
ROMS actually likes the bgc bry file! 🎉
... however the values for
bry_time
look off to me, I assume related toclimatology=True
? My run is supposed to be in january 2012, butreturns
meanwhile for physics:
returns:
as expected.
So all of the bgc bry values are in 2000, when my run is in 2012, and there doesn't appear to be anything in the metadata telling ROMS that this is a special case. I would expect ROMS to error out on initialisation in this case, but it doesn't. I'm not sure the behaviour that follows within ROMS is expected, just that there isn't an error. Could you explain? Thanks!