[MITgcm-devel] cal_time2dump

Martin Losch martin.losch at awi.de
Tue Jun 7 04:20:33 EDT 2016


Hi there,

I think there is a bug in cal_time2dump.F

When I specify in data.diagnostics:
frequency = 1 month
timePhase = 99 years
I expect that the monthly averages start in year 100, ie. 99year + 1month would be the first monthly averagy that I get.

This does not work if calendarDumps=.True. in data.cal, because cal_time2dump computes
        shTime = myTime - phase
        prTime = shTime - step
        CALL CAL_GETDATE( myIter, shTime, thisDate, myThid )
        CALL CAL_GETDATE( myIter, prTime, prevDate, myThid )
and then evaluates the difference between thisDate and prevDate. But shTime and prTime both contain “-phase”, so that the model starts writing averages in the first year. Since I don’t know these packages very well and I don’t want to break anything, I’d like to know what to do here. Is this intentional? If not, should it be fixed by adding something to the if-statement ( myTime.GE.phase )? Or should cal_getdate actuall return something special if shTime<0, and the problem is in that routine?

Martin




More information about the MITgcm-devel mailing list