As for the model in general, also the user-defined code will have to be steered by parameters. For each run the model should to be able to read in current values of these parameters. The declaration of user-defined parameters takes place in the user-defined module user (file user_module.f90). This module must be declared in all relevant user-defined routines via a USE statement, in order to make the parameters available.
The user can assign values to the user-defined parameters within the NAMELIST group &userpar in the local file PARIN. This NAMELIST group must be located after the initialization parameters and run parameters (&inipar, &d3par) (see chapter 4.0). Before values of the user-defined parameters can be assigned, the parameters must be declared within the appropriate NAMELIST statement in the user-defined subroutine user_parin.
The following example illustrates the procedure. The example assumes that the user declares a LOGICAL variable named abcd for steering the user-defined code. This variable must be declared in the module user:
LOGICAL:: abcd = .FALSE.
Pay attention that in this example a default value (.FALSE.) is assigned to the variable and it will keep this value if nothing else is assigned within the file PARIN. In user_parin the NAMELIST must be extended by the name of the new variable:
NAMELIST /userpar/ abcd, data_output_user, region.
In the parameter file PARIN a value can be assigned:
.
.
&userpar abcd = .T., ...
User defined parameters in the file PARIN are considered as run parameters, i.e. they must be specified again for each restart run.
In each case the user should
carry out
a control output of the parameter values, so
that their values during the respective model run are really known. For
this
purpose the user-defined subroutine user_header
which writes into the files HEADER
and RUN_CONTROL
is available.
Last
change: $Id: chapter_3.5.2.html 212 2008-11-11 09:09:24Z gronemeier $