Project

General

Profile

Output setup

By default, a TM5 run outputs only:
  • a tm5.ok file that indicates the run went fine,
  • a restart file, see Restart options,
  • log files, and
  • optics statistics if using the full chemistry project

However optional outputs are available with both the base code and the
proj/user_output project. This page presents all the rc key related to
these outputs.

Log files and Output directory

The following section of the rc file sets up the output directories and provides
some control over the standard log output.

    1 :  !=====================================================================!
    2 :  ! Log & output dir
    3 :  !=====================================================================!
    4 :  ! Log
    5 :  okdebug               :  T
    6 :  go.print.all          :  T
    7 :  go.print.prompt.pe    :  T
    8 :  go.print.trace        :  T
    9 :  go.print.file         :  F
   10 :  go.print.file.base    :  test
   11 :  
   12 :  output.dir            :  ${my.run.dir}/output
   13 :  output.overwrite      :  T
   14 :  
   15 :  ! alternative output dir
   16 :  output.dir.base       :  
   17 :  output.dir.extensions :  
   18 :    
   19 :  output.types          : timing settings

Line 5 : If okdebug is T, additional information is added to the standard
output. Note that this can slow down the run and significantly increases the
size of the log: not recommended for production runs.

Line 6-10 : The go.print.* keys format the standard output. Line 6
specifies if all processors print messages. If set to F, only the root
processor writes. With line 7, processor number prepends the messages. If line
8 is T, TM5 prints the name of a routine between <> when entering the routine,
and between () when leaving it. This features works only with routines that
call the goLabel() routine. If line 9 is T, the standard output is redirected
to a file specified in line 10 (you end up with one file per processor in the
run directory). All calls to write(gol,*) end there. Calls to write(*,*) go to
the job manager standard output or to the screen.

Line 12 : defines the output directory. All output (except restart and log
files) are created there by default.

Line 13 : If set to F, this key will prevent overwriting the output files.

Line 16-17 : A more complex output structure is available through these two
keys. TM5 output directory can be redefined as a series of subdirectories in a
top dir. For an example, to get:

      top-dir/sub1/sub2
you would set those keys:
      output.dir.base         : top-dir
      output.dir.extensions   : sub1 sub2

The main advantage is that extensions can include a runtime dependence with <keys> (they are recognized by the python script). The available <keys> are:
   <jobstep>     : to use the jobstep number  
   <timerange>   : for the timerange as yyyymmdd_hhmnss__yyyymmdd_hhmnss
This alternative output structure is ignored if extensions is empty.

Line 19 : This key is use to create specific output directory if needed for settings (grids) and timing (profiling) output. These directories are defined with the timing.output.subdir and settings.output.subdir keys (see Optional output below).

Output from the base code

With the base code, you can output : budget data, mmix (mean mixing ratio)
data, and a profiling of the run. Look for the following sections in your rc file:

   1 :  !=====================================================================!
   2 :  ! Source code
   3 :  !=====================================================================!
   4 :  my.tm5.define : ... with_budgets ...

   6 :  !=====================================================================!
   7 :  ! Optional output from 'base' code
   8 :  !=====================================================================!
   9 :  ! mmix
  10 :  output.mmix                : T
  11 :  
  12 :  ! budget fluxes through boundaries
  13 :  apply.budget.global.flux   : F
  14 :  budget.global.flux.lon_in  : -12
  15 :  budget.global.flux.lon_out :  36
  16 :  budget.global.flux.lat_in  :  34
  17 :  budget.global.flux.lat_out :  62
  18 :   
  19 :  ! profiling
  20 :  timing.output              : T
  21 :  timing.output.subdir       : profile
  22 :
  23 :  !output.after.step         :

Line 4 : including the with_budgets to the list of cpp flags used to
build the code, will output budgets data. These outputs consists in one file
with the horizontal budget region code of each grid cell
(regionsg_glb600x400.hdf), and one file with the budget values themselves
(budget_2006010100_2006020100_global.hdf).

Line 10 : Setting output.mmix to T will output tracers averaged over the
run. Mean MIXing ratio are found in the
mmix_2006010100_2006020100_glb600x400.hdf files.

Line 13-17 : Additional budget is turn on if apply.budget.global.flux is
set to T. It computes the fluxes through four planes (two zonal, and two meridional), defined by the
budget.global.flux.* keys. The latter must be integers. The output can
be combined to computed the budget in-and-out of a slab of the atmosphere.

Line 20-21 : Setting timing.output to T switches on the profiler. Timing
output will be found in timing.output.subdir directory if it is non-empty,
else in the output.dir.

Line 23 : uncomment to change when the output fields are sampled (e.g. for time series) or accumulated (e.g. for mmix). This refers to the various operators "x,y,z,c,v,s", which correspond to: X-advection, Y-advection, Z-advection, Chemistry, Vertical, Sources-sinks. Sampling happens after the referred process. It is also possible to choose "a" for All, that is sampling happens after TM has been through all processes. If you leave the key commented, the default (and recommended) "v" is used.

Output from the proj/user_output project

Additional outputs are available through the user_output project. Look for
the following sections in your rc file:

    1 :  !=====================================================================!
    2 :  ! Source code
    3 :  !=====================================================================!
    4 :  my.source.dirs : ... proj/user_output ...

    6 :  !=====================================================================!
    7 :  ! Optional output from 'proj/user_output' code
    8 :  !=====================================================================!
    9 :  ! Grids setting
   10 :  settings.output          : T       
   11 :  settings.output.subdir   : 
   12 :   
   13 :  ! Station output
   14 :  output.station           : T
   15 :  inputdir.station         : ${my.scratch}/TM5/TM5-input/
   16 :  input.station.filename   : station.emep.list
   17 :  input.station.filename2  :
   18 :  input.station.fileformat : 1
   19 :  station.speclist         : SO2 NOy CH4 OH
   20 :  output.station.filename  : tm5_emep.hdf
   21 :   
   22 :  ! Flight tracks
   23 :  output.flight            : F
   24 :   
   25 :  ! All fields on root processor
   26 :  output.mix               : T
   27 :  output.mix.dhour         : 2
   28 :   
   29 :  ! Aerocom output
   30 :  output.aerocom2          : F
   31 :  output.aerocom2.dhour    : 1
   32 :  output.aerocom2.stations : T
   33 :  pm.sizelimits            : 2 5 10
   34 : 
   35 :  ! NOAA output
   36 :  output.noaa              : F

Line 4 : To include the required code source for additional output, you need
to add the trunk (ie ${my.branch}=trunk) of the user_output project or one
of its branches (ie ${my.branch}=branches/branchname) to your source
directory. If you do not include that code, all keys in the 'Optional output
from 'proj/user_output' code'' section have no effect.

Line 10 : The settings.output key is set to T by default. It will write
one overview file (regions.nc) with information about each zoom regions:
start/end of latitude and longitude ranges, number of grid points in each
direction). It also writes one file per region (region_glb600x400.nc) with the
latitude and longitude vectors, and the reduced grid information. Set it to F
to not write those files.

Line 11-12 : This grid information will be found in output.dir, or in
settings.output.subdir directory if set.

Line 14-17 : The output.station key turns station output on (T) or off
(F). When on, inputdir.station must provide the fully qualified directory
(with an ending "/"), where input.station.filename and/or
input.station.filename2 input files are expected.

Line 18-20 : The three following keys define the format of the input files, the
list of species/tracers to output, and the name of the ouput file for the
station diagnostic.

Line 23 : This key is a switch for the flight diagnostic, and must be set
(no default). (TODO: document)

Line 26-27 : The first line switches the mix diagnostic, which consists in averaged fields. The averaged is over the output.mix.dhour period. After each output.mix.dhour period a file is written (format: molefrac_yyyymmddmm_yyyymmddmm.nc). Only tracers distributed on the root processor are written to file.

Line 30-33 : AeroCom output, which consists in daily averages output (as aerocom*<date>.nc files) for M7 aerosols (it becomes a dummy if not running full chemistry with M7). The result is one file per day containing 50 2d-fields and 4 3d-fields. This diagnostic requires the with_budget cpp flag and that the <code>my.source.dirs</code> includes one of the proj/budget/lat10xlm/ trunk or branch. Line 31 defines the sampling times step to compute averages. Lines 32 is to switch on/off aerocom output at specific locations (hardcoded in the code).On line 33, you can specify the PM size for which the pm diagnostic is computed. That M7 diagnostic is switched on by including the with_pm cpp flag when building the code.

Line 36 : NOAA output (TODO: document).

Finally, time series are also available and are tailored with the following keys:

      35 :  ! Time Series
      36 :  output.pdump                        :  T
      37 :  output.pdump.dataset.author         :  John Doe
      38 :  output.pdump.dataset.institution    :  My Company, Somewhere
      39 :  output.pdump.dataset.version        :  my experiment
      40 :   
      41 :  output.pdump.fname.model            :  TM5 
      42 :  output.pdump.fname.expid            :  exp1
      43 :  output.pdump.fname.grid.glb300x200  :  3x2
      44 :  output.pdump.fname.grid.eur100x100  :  1x1
      45 :   
      46 :  output.pdump.griddef.apply          :  T
      47 :   
      48 :  output.pdump.tp.apply               :  T
      49 :  output.pdump.tp.dhour               :  1             ! 1 by default:
      50 :   
      51 :  output.pdump.vmr.n                  :  3
      52 :   
      53 :  output.pdump.vmr.001.apply          :  T
      54 :  output.pdump.vmr.001.fname          :  vmr3
      55 :  output.pdump.vmr.001.dhour          :  1
      56 :  output.pdump.vmr.001.tracers        :  SO2 NOy CH4 OH HNO3 PAN H2O2 Radon Lead
      57 :   
      58 :  output.pdump.vmr.002.apply          :  T
      59 :  output.pdump.vmr.002.fname          :  vmr1
      60 :  output.pdump.vmr.002.dhour          :  1
      61 :  output.pdump.vmr.002.tracers        :  O3 O3s CO CH2O
      62 :  output.pdump.vmr.002.subreg         :  T               ! False by default
      63 :  output.pdump.vmr.002.minlon         :  -10.
      64 :  output.pdump.vmr.002.maxlon         :  10.
      65 :  output.pdump.vmr.002.minlat         :  23.
      66 :  output.pdump.vmr.002.maxlat         :  57.
      67 :   
      68 :  output.pdump.vmr.003.apply          :  F
      69 :  output.pdump.vmr.003.fname          :  vmra
      70 :  output.pdump.vmr.003.dhour          :  3
      71 :  output.pdump.vmr.003.tracers        :  SO4 NO3_A BC BCS POM SS1_N SS1_M SS2_N SS2_M SS3_N SS3_M DUST2_N DUST2_M DUST3_N DUST3_M
      72 :   
      73 :  output.pdump.lt.apply               :  T
      74 :  output.pdump.lt.tracers             :  O3
      75 :  output.pdump.lt.localtime           :  2     ! integer
      76 :   
      77 :  output.pdump.lt2.apply              :  F
      78 :  output.pdump.lt2.tracers            :  
      79 :  output.pdump.lt2.localtime          :  
      80 :   
      81 :  output.pdump.depositions.apply      :  T ! requires with_budgets
      82 :  output.pdump.depositions.dhour      :  3
      83 :  output.pdump.depositions.tracers    :  O3 HNO3 NO NO2 H2O2 CH2O PAN CO NH3 NH4 SO2 NOy
      84 :   
      85 :  output.pdump.depvels.apply          :  T  ! requires with_budgets
      86 :  output.pdump.depvels.dhour          :  3
      87 :  output.pdump.depvels.tracers        :  O3 HNO3 NO NO2 H2O2 CH2O PAN CO NH3 NH4 SO2

Line 36 : switch on/off the time series output.

Line 37-39 : metadata for the output file.

Line 41-44 : These keys are used to make the filenames. Time series outputs
start with model and expid. The extra fname.grid.* keys are short
grid name to insert in the filename, but are only required if there is more
than one region.

Line 46 : switch for a grids setting output.

Line 48-49 : switch to get time series of some met fields (pressure,
temperature, winds, ...) every output.pdump.tp.dhour, which defaults to 1h
if not specified.

Line 51 : number of timeseries files for Volume Mixing Ratios (VMR). For each
file number NNN, a series of output.pdump.vmr.NNN.* is required. Three
examples are given here.

Line 53-56 : apply is the switch for file #1, fname is a string to
differentiate the filenames, dhour is the time step of the series, and
tracers provides the list of tracers to include.

Line 62-66 : these keys limit the output to a region of the globe, providing
smaller output. The switch for limiting the output is provided by the
subreg key, which is F by default for all VMR files, and thus
this set of keys is not needed when getting the entire globe.

Line 73-75 : keys for the first local time series.

Line 77-79 : keys for a second local time series. Useful for a different
localtime value.

Line 81-83 : keys for depositions fluxes. Apply is the switch, dhour
the sampling frequency, and tracers give the list of species to include.
The flag "with_budgets" must be used for this to work.

Line 85-87 : same as 81-83, but for depositions velocities.</text>