[MITgcm-support] non-periodic forcing files

Quentin Jamet quentinjamett at gmail.com
Tue Jan 9 12:27:17 EST 2018


Hi Martin,

Thank you for your interests.

The way I am using the external_fields_load is identical to the original 
version. The 'looping strategy' is conserved, but the interpolation is 
made between the last and the first time-records for the first time 
steps, and between the third last and the second last time record for 
the last time steps. Accordingly, two additional time-records are added 
at the end of each forcing file, corresponding to the last (first) time 
record of the preceding (following) year.

As you point out, this method is probably slower that the one used by 
exf. However, these modifications have been motivated by the use of the 
cheapaml package in the configurations I am running. This package makes 
use of the GET_PERIODIC_INTERVAL routine to determine the forcing files, 
so the easiest solution that shown up was to directly modify this 
routine rather to include the way exf-package reads the forcing files 
into cheapaml.

Regards

Quentin


Le 09/01/2018 à 10:57, Martin Losch a écrit :
> Hi Quentin,
>
> thanks for your contribution! (and I am sorry that you didn’t get any reply earlier)
>
> In what sense is this different from the way of “useExfYearlyFields” in the exf-package?
>
> The exf-package may seem very complicated and convoluted and difficult to debug, but it is very flexible and let’s you specify all sorts of forcing cycles and periods for long forcing time series. In most cases I would recommend using the exf package over the original “external_fields_load” methods. In fact, the exf-package only reads one record at a time and remembers this record, whereas the original “external_fields_load” always reads two records, when it is time to read a new record (the new one and the previous one), so that this part of reading is more efficient in the exf-package.
>
> Martin
>
>
>> On 25. Sep 2017, at 21:02, Quentin Jamet <quentinjamett at gmail.com> wrote:
>>
>> Dear MITgcm users,
>> I have made some modifications in the code to force a model with forcing files that are made as sub-samples (in time) of longer time series. This avoid the use of too large forcing files, and, I think, speeds up the reading, which becomes interesting when the model is integrated on a platform with a time limit. It might be of interest for some of you.
>> The idea is to use periodicExternalForcing=.TRUE., and to modify the interpolation in time made at the beginning and at the end of a cycle. Then, externForcingCycle corresponds now to the length of a sub-sample, and externForcingPeriod is the usual time step between time records. Instead of interpolating data between the last and the first time record at the beginning and at the end of a cycle, the interpolation is now made between the third last and the second last time record at the end of a cycle, and between the last and the first time record at the beginning of a cycle. This is made by setting  useYearlyField=.TRUE. in data, &PARM03. Forcing files have to be extended accordingly, with 2 additional time records placed at the end, the last (second last) corresponding to the last (first) time record of the preceding (following) cycle.
>> These modifications are made in get_periodic_interval.F, where two global model parameters are added as input: nIter0 and useYearlyField.
>> - nIter0 is used to discriminate if the interpolation is made between the last and the first time record at the very first model time step within a cycle, or between the third last and the second last time record at the very last model time step within a cycle.
>> - useYearlyField (defined in PARAMS.h, and set by default to .FALSE. in set_defaults.F) allows to switch from periodic to non-periodic (sub-sampled) forcing files.
>> All files that CALL GET_PERIODIC_INTERVAL have to be modified accordingly. A specific flag 'useYearlyField_xxx' can be defined for each package.
>>
>> Modified files are available here: http://ocean.fsu.edu/~qjamet/data/yearlyForcing/code/
>> Feel free to comment/update/share.
>> Best,
>>
>> Quentin
>>
>>
>>
>> _______________________________________________
>> MITgcm-support mailing list
>> MITgcm-support at mitgcm.org
>> http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support
> _______________________________________________
> MITgcm-support mailing list
> MITgcm-support at mitgcm.org
> http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support



More information about the MITgcm-support mailing list