Changes between Version 1 and Version 2 of Documentation/UserGuide/Printlev


Ignore:
Timestamp:
2019-01-23T10:26:31+01:00 (5 years ago)
Author:
jgipsl
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Documentation/UserGuide/Printlev

    v1 v2  
    2121 
    2222=== PRINTLEV_''modulename'' : local parameter to one module === 
    23 The function get_ printlev('modulename') makes it possible to have a local write level in a module. Setting PRINTLEV_modulename in run.def changes then the write level in that module. The default value is the global PRINTLEV value. This functionality is available only in modules where the function get_printlev() is called. get_printlev should be called once in the initialization part for the module to define a new local saved variable. This new variable should be used in the whole module for all write statements instead of printlev. For example: 
     23The function get_ printlev('modulename') makes it possible to have a local write level in a module. Setting PRINTLEV_modulename in run.def changes then the write level in that module. The default value is the global PRINTLEV value. This functionality is available only in modules where the function get_printlev() is called. get_printlev should be called once in the initialization part for the module to define a new local saved variable. This new variable should be used in the whole module for all write statements instead of printlev.  
    2424 
    25 In module sechiba: 
     25For example in module condveg: 
     26In the beginning, declare a private module variable, before CONTAINS: (note that the keyword PRIVATE should only be set once) 
     27{{{ 
     28PRIVATE 
     29INTEGER, SAVE :: printlev_loc   !! Local printlev for this module 
     30}}} 
    2631 
     32In subroutine condveg_initialize: 
    2733{{{ 
    28 ! Module declared variable 
    29 INTEGER, SAVE :: printlev_loc 
    30  
    31 ! In subroutine sechiba_init: 
    32 printlev_loc=get_printlev('sechiba')  
     34!! Initialize local printlev 
     35printlev_loc=get_printlev('condveg')  
    3336}}} 
    34 In the example the function printlev_loc will read the variable PRINTLEV _sechiba from run.def. The default value is the same as the global printlev variable.[[BR]] 
     37In the example the function printlev_loc will read the variable PRINTLEV_condveg from run.def. The default value is the same as the global printlev variable.[[BR]] 
    3538 
    3639In the rest of the module, all write statements should be done as follows: