Closed dabail10 closed 1 year ago
Hi @dabail10, just to be clear, the change would be only under hist_avg=.true.
, right? Because for snapshots, we would want the time axis to stay as is... (and the same for fields that are always snapshots even when averaging is active, like internal stresses if I remember correctly?)
That is correct. Also, since I changed hist_avg to an array, we can control this for each stream.
@dabail10 You're proposing that the file name it self won't change, correct? I don't believe that is how this feature works in MOM6--I assume the goal in CESM is to have it consistent w/ all components (?).
The explanation I have for MOM6 is that the file name actually references the start/middle/end time
for example, if IC is 2016100300Z, and we run model for 6 hr, in diag_table
"ocn%4yr%2mo%2dy%2hr", 6, "hours", 1, "hours", "time", 6, "hours", "1901 1 1 0 0 0", 0, "", "begin"
The last column can be "begin", "middle", or "end". The output files will then be named, for example, as
for "begin" ocn_2016_10_03_00.nc for time bound [0,6] for "middle" ocn_2016_10_03_03.nc for time bound [0,6] for "end" ocn_2016_10_03_06.nc for time bound [0,6]
If the field is left blank, FMS will default to "middle".
Currently in the monthly and daily. The filenames do not have information about where in the averaging interval it is. It just says 0001-01 and 0001-01-01. Now, the hourly is trickier. So that it would be 0001-01-01-01800 instead of 03600. However, for simplicity, I would not change this and leave it at the end of the averaging period for the seconds in the filename.
I would say if the filename is going to change, then there has to be an option to choose the old or new method. If the internal time axis is going to change, then there has to be an option to choose the old or new method (as you propose). Adding additional metadata or even axis information, like time bounds, should be fine to do in general, but it sounds like that's already there.
So I think what you're proposing is to leave the filenames alone and add new options for where in the average period the time axis is defined. That's OK for me. We definitely wants backwards compatibility. If you decide to do something similar for filenames, then I think we need it to be controlled by a namelist too and independent of the time axis.
Regarding the filename change (since I brought up the MOM6 case), I think on our end the preference would be that the filename did not change, as you proposed. Generally they like the timestamp to reference the end time of the average ("forecast valid at 6Z"). On the workflow end, they rename the MOM6 output to get this ending time for the filename.
This is all good input. Any thoughts on a name for the namelist variable? Something about the the history time axis position ... hist_time_axis ...
Should this close based on #839
Yes
Heads up here. I wanted to start a discussion in particular with @apcraig and @eclare108213. Others are welcome to chime in. CESM is requiring that we change the default time axis to be the middle of the averaging interval instead of the end of the averaging interval. This is very easy to just average time_beg and time_end for each stream. My question for everyone is do we still want the functionality to write the time axis at the end of the averaging interval? That is, I could add a namelist option to control this. The options would be something like:
time_avg_axis = 'begin' time_avg_axis = 'middle' time_avg_axis = 'end'
Then you would use time_beg, (time_beg+time_end)*0.5, or time_end (currently the default). Note that the filenames would not change. This only impacts the time axis in the netCDF file.