I have four time-independent CALC_TMETRIC* files (CMAQ-postprocessed), one for each season, and I am trying to combine them into one file with four timesteps for each season. Using m3cple four times (with the CALC_TMETRIC* files as input each time) did not work - only the last file copied would be in OUTFILE, which would also be time-independent.
For this one, you probably need to write custom code; you might want to follow the “standard year” conventions from https://cjcoats.github.io/ioapi/DATETIME.html:
most of the data is for year 0, but include time-step for year -1 and another for year 1, with time steps centered on the season-center so that you can use INTERP3
to get smoothly-varying values, and you can use NEXTIME
to get the dates× (it still works for these dates×, and with negative time steps when you need it):
TSTEP
= 91 1/4 days = 21900000 (H* MMSS
)
Step # 2 is at Feb. 6 (0000037:000000) and you can use
TSTEP=21900000
JDATE=37
JTIME=0
CALL NEXTIME(JDATE,JTIME,-TSTEP) !! to get the starting date&time
DO N = 1, 6 ... CALL WRITE3(FNAME,VNAME,JDATE,JTIME,BUFFER) CALL NEXTIME(JDATE,JTIME,TSTEP) END DO
to loop through these time steps.