Content
At the moment, all data specs are hard-coded into model1, model2, cosmopath, sec2date, read_grib1, and namcouple. The only exception is a pre-processor in the demo benchmark test case.
The introduction of new data is principally a matter of changing source directories. Read_grib1 crops a portion from the supplied field, which introduces another degree of freedom. Thirdly, sec2date converts the model time in seconds since the beginning of the run into calendar dates, and defines when this beginning takes place. Finally, OASIS3’s name list namcouple as well as model1 and model2 must know the total model time. With the exception of the demo benchmark test case, all active variable inputs are expected to be in Grib format.
Running the demo benchmark test case
A shell variable in job_script.sh, CPPKEYGRIB
, operates a pre-processor which automatically introduces the data for the demo benchmark test case. CPPKEYGRIB
needs to be anything but ‘GRIB
’ in this case. The only place it does not reach is OASIS3’s namcouple, so there is a prepared name list:
downscale/data_oasis3/nc-namcouple
It only needs the new name namcouple and the algorithm can access it correctly. It may pay to make a back-up copy of the old file:
downscale/data_oasis3/namcouple
New source directories
Model1, read_grib1 and namcouple do not contain directories subject to change. Inconsequentially, read_grib1 creates Grib indices for itself in the working directory.
Model2
The variable ‘file_name
’ holds the relevant data path. It must point to the fine external data in the NetCDF, just like in the demo benchmark test case. Just below the header with all the declarations, there is a convenient IF-clause where it can be changed without upsetting the pre-processor switch for the demo benchmark test case.
Temporal adjustment
namcouple
The namcouple needs to know to the total model time in seconds and the coupling time period, the inverse of the coupling frequency. Please refer to the dedicated section.
Model1
In model1, there is a variable called ‘nnn
’ which specifies the expected time steps. Please consider changing it in the 1st IF-clause below the header as opposed to in the header with the declaration. The specs in the declaration facilitate the easy switch to the demo benchmark test case. There is a parameter there which you might consider changing, called ‘DELTA_T
’. It defines the length of the time step in seconds, an important information for OASIS3 and the sub-directory structure of the input and output data in the Grib case.
Model2
In model2, as the brother of model1, there also are variables called ‘nnn
’ and ‘delta_t
’ and the recommended IF-clause. It is highlighted by the comments ‘!HEADER APPENDIX.
’ and ‘!Dear user,
’.
Sec2date
With the information supplied to model1 and model2, sec2date finds the appropriate time stamp. Since the time stamp is a calendar date, it also has to define a beginning, currently midnight between New Year’s eve and New Year’s day, 0 UTC, 2008. The subroutine’s parameter OFFSET is added to the given time. This allows for choosing another start date within 2008.