== Interfaces for user-defined code == \\ '''Description:''' The following table describes the available interfaces for user-defined code in the model, the names and possible arguments of the subroutines involved as well as actions which can be accomplished in these subroutines. The respective name of a source code files is the subroutine name followed by "{{{.f90}}}". Exception: the file containing the module {{{user}}} has the name {{{user_module.f90}}}.\\\\ ||='''Call location''' =||='''Subroutine name and argument(s)''' =||='''Possible actions''' =|| |---------------- {{{#!td style="vertical-align:top; text-align:left;width: 150px" --- }}} {{{#!td style="vertical-align:top; text-align:left;style="width: 50px" {{{MODULE user}}} }}} {{{#!td All user-defined variables which are used outside the respective local scopes of the user-defined subroutines have to be declared here. }}} |---------------- {{{#!td style="vertical-align:top; text-align:left;width: 150px" End of {{{parin.f90}}} }}} {{{#!td style="vertical-align:top; text-align:left;style="width: 50px" {{{user_parin}}} }}} {{{#!td Declaration of user-defined parameters in the {{{NAMELIST}}} group {{{&userpar}}}. These parameters can be read from the local file [../../iofiles#PARIN PARIN] and be used for steering the user-defined code (see [wiki:chapter_40 chapter 4.0]). The user-defined parameter region is already pre-defined in {{{&userpar}}} and must not be changed. Additional {{{NAMELIST}}} groups may be declared if desired. The CPU time needed for executing {{{user_parin}}} is included in the local file [../../iofiles#CPU_MEASURES CPU_MEASURES] within the category "initialisation". }}} |---------------- {{{#!td style="vertical-align:top; text-align:left;width: 150px" End of {{{header.f90}}} }}} {{{#!td style="vertical-align:top; text-align:left;style="width: 50px" {{{user_header( io )}}} }}} {{{#!td Output of the values of the user-defined parameters to the local files [../../iofiles#HEADER HEADER] and [../../iofiles#RUN_CONTROL RUN_CONTROL]. This output should be made anyway in order to subsequently check the parameter values used for the respective run. The number of the output unit is passed as an argument and must be used in each WRITE statement (e.g.: "{{{WRITE ( io,…)}}}"). By default, this subroutine only creates output if a user-defined NAMELIST is found in file [../../iofiles#PARIN PARIN] (in this case the variable {{{user_defined_namelist_found}}} is set ''.TRUE.'' in {{{user_parin}}}). The names of any user-defined subdomains are displayed by default (see [../../inipar#statistic_regions statistic_regions]). }}} |---------------- {{{#!td style="vertical-align:top; text-align:left;width: 150px" End of {{{init_3d_model.f90}}} }}} {{{#!td style="vertical-align:top; text-align:left;style="width: 50px" {{{user_init}}} }}} {{{#!td Here, user-defined initialization actions which should be accomplished before the start of the 3D-model can be implemented (e.g. inhomogenous change of the surface temperature, the roughness length, or similar). At this point, all default parameter initializations of the model (chapter 4.1) have already been carried out at all.\\\\ One of the most important actions here is the definition of user-defined subdomains for statistic analysis and output (see [../../inipar#statistic_regions statistic_regions] and [wiki:chapter_353 chapter 3.5.3]) and of additional time series quantities (see comment line example in the file). CPU time for user_init is considered in the local file [../../iofiles#CPU_MEASURES CPU_MEASURES] within the category "initialisation".\\ See also user_init_3d_model. }}}