= User-defined parameters = [[TracNav(doc/userint/toc)]] As for the model in general, also the user-defined code will have to be steered by parameters. For each run, the model should be able to read in current values of these parameters. The declaration of user-defined parameters takes place in the user-defined module [wiki:doc/app/userint/int#user_module user] (file {{{user_module.f90}}}). This module must be declared in all relevant user-defined routines via a {{{USE user}}} statement, in order to make the parameters available.\\\\ The user can assign values to the user-defined parameters within the namelist group {{{&user_parameters}}} in the local file [wiki:doc/app/iofiles#PARIN PARIN]. This namelist group must be located after the initialization parameters ({{{&initialization_parameters}}}) and runtime parameters ({{{&runtime_parameters}}}; see [wiki:doc/app/par Model steering by parameters]). 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 [wiki:doc/app/userint/int#user_parin 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 file {{{user_module.f90}}}: {{{ 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 [wiki:doc/app/iofiles#PARIN PARIN]. In [wiki:doc/app/userint/int#user_parin user_parin] the namelist must be extended by the name of the new variable: {{{ namelist /user_parameters/ abcd, data_output_masks_user, data_output_pr_user, data_output_user, region }}} The listed parameters after abcd are included in [wiki:doc/app/userint/int#user_parin user_parin] by default, and they are described in the table below. In the parameter file [wiki:doc/app/iofiles#PARIN PARIN] a value can be assigned: {{{ &user_parameters abcd = .T., ... ,/ }}} User defined parameters in the file [wiki:doc/app/iofiles#PARIN PARIN] are considered as runtime 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 [wiki:doc/app/userint/int#user_header user_header] which writes into the files [wiki:doc/app/iofiles#HEADER HEADER] and [wiki:doc/app/iofiles#RUN_CONTROL RUN_CONTROL] is available. \\\\ '''namelist group name:''' [=#userpar '''{{{user_parameters}}}'''] ---- ||='''Parameter Name''' =||='''[../fortrantypes Fortran]\\[../fortrantypes Type]''' =||='''Default\\Value''' =||='''Explanation''' =|| |---------------- {{{#!td style="vertical-align:top" [=#data_output_masks_user '''data_output_masks_user'''] }}} {{{#!td style="vertical-align:top" C * 10 ('''max_masks''', 100) }}} {{{#!td style="vertical-align:top" '''max_masks''' *100* ' ' }}} {{{#!td User-defined quantities for which masked data are to be output (see [../maskedoutput Masked data output]).\\\\ Beside the PALM standard output quantities (which can be selected via parameter [../d3par#data_output_masks data_output_masks]), the user can define (without any restriction) additional output quantities (e.g. the temperature variance, etc.) of masked data. Each of these quantities has to be given a unique identifier (string) which must be different from the strings defining the standard output quantities (see list in the description of [../d3par#data_output_masks data_output_masks]). Data output can be switched on by assigning the respective strings to '''data_output_masks_user'''. \\\\ The user has to calculate/provide the respective data array(s) by appropriately extending the user interface (see [[../userint/output|here]])\\\\ For further steering of the masked output (output times, defining mask locations, time averaging, etc.), the steering parameters for [../d3par#data_output_masks data_output_masks] apply accordingly.\\\\ }}} |---------------- {{{#!td style="vertical-align:top;width: 150px" [=#data_output_pr_user '''data_output_pr_user'''] }}} {{{#!td style="vertical-align:top;style="width: 50px" C * 10 (200) }}} {{{#!td style="vertical-align:top;style="width: 75px" 200 * ' ' }}} {{{#!td User defined quantities for which horizontally averaged profile data is to be output. \\\\ Beside the PALM standard output quantities (which can be selected via parameter [../d3par#data_output_pr data_output_pr]), the user can define (without any restriction) additional output quantities (e.g. turbulent resolved-scale horizontal momentum fluxes, etc.). Each of these quantities has to be given a unique identifier (string) which must be different from the strings defining the standard output quantities (see list in the description of [../d3par#data_output_pr data_output_pr]). Data output can be switched on by assigning the respective strings to '''data_output_user'''.\\\\ The user has to calculate/provide the respective data array(s) by appropriately extending the user interface (see [[../userint/output|here]]) }}} |---------------- {{{#!td style="vertical-align:top" [=#data_output_user '''data_output_user'''] }}} {{{#!td style="vertical-align:top" C * 10 (100) }}} {{{#!td style="vertical-align:top" 100 * ' ' }}} {{{#!td User defined quantities for which 2d cross section and/or 3d volume data are to be output.\\\\ Beside the PALM standard output quantities (which can be selected via parameter [../d3par#data_output data_output]), the user can define (without any restriction) additional output quantities (e.g. the temperature variance, etc.). Each of these quantities has to be given a unique identifier (string) which must be different from the strings defining the standard output quantities (see list in the description of [../d3par#data_output data_output]). Data output can be switched on by assigning the respective strings to '''data_output_user'''. \\\\ The user has to calculate/provide the respective data array(s) by appropriately extending the user interface (see [[../userint/output|here]])\\\\ For further steering of the user defined output (output times, cross section levels, time averaging, etc.), the steering parameters for [../d3par#data_output data_output] apply accordingly.\\\\ '''Example:'''\\ If the user defined output quantity is the temperature variance and if the user has chosen the string '' 'pt2' '' as an identifier for this quantity, then output of horizontal cross sections can be selected by assigning '''data_output_user''' = '' 'pt2_xy' ''. }}} |---------------- {{{#!td style="vertical-align:top" [=#region '''region'''] }}} {{{#!td style="vertical-align:top" C*40 (0:9) }}} {{{#!td style="vertical-align:top" 'total domain' }}} {{{#!td Name(s) of the subdomain(s) defined by the user.\\\\ With this variable, names can be assigned to the subsections defined by the user (see [../inipar#statistic_regions statistic_regions]). Up to 9 subdomains are allowed ('''region''' (1) to '''region''' (9)), the total domain has the index 0 ('''region''' (0)). }}}