PROGRAM preprocess

DART project logo

Jump to DART Documentation Main Index
version information for this file:
$Id: preprocess.html 6380 2013-08-05 23:47:11Z nancy $

NAMELIST / MODULES / FILES / REFERENCES / ERRORS / PLANS / TERMS OF USE

Overview

Preprocess is a DART-supplied preprocessor program which creates observation kind and observation definition modules from a set of other specially formatted Fortran 90 files. The output files are normally named obs_kind/obs_kind_mod.f90 and obs_def/obs_def_mod.f90, but can be renamed by namelist control if needed.

There are three kinds of input files:

  1. A default template for the obs_kind_mod (normally obs_kind/DEFAULT_obs_kind_mod.F90).
  2. A default template of the obs_def_mod (normally obs_def/DEFAULT_obs_def_mod.F90).
  3. 0 or more special obs_def modules which contain observation specific types and code, such as obs_def_mod_reanalysis_bufr_mod.f90. By convention these files are in the obs_def directory.

The DEFAULT files contain specially formatted comment lines which are used as markers to insert additional information into the templates and create the output files.

If one or more special obs_def files are specified, information from these files is incorporated into the output obs_def and obs_kind modules and the observation types specified in the special obs_def files will be available for use by the filter programs.

The special obs_def files must contain a number of sections of specially formatted F90 comments. They can also contain F90 code required for implementing operations needed for the observations. These sections are described in the documentation for the special obs_def modules, especially see obs_def_1d_state_mod.f90.

The DEFAULT obs_kind and obs_def templates also require specially commented sections to indicate where code from the special obs_def modules is to be inserted. See the documentation for the DEFAULT_obs_kind_mod.F90 and the DEFAULT_obs_def_mod.F90 for details.

Although uncommon, it is possible to list no obs_def modules in the namelist, which results in DEFAULT_obs_kind_mod.F90 and DEFAULT_obs_def_mod.F90 being copied directly to the final obs_kind and obs_def modules. In this case, only identity observations can be used by the filter (i.e. the state variable values are directly observed; forward operator is an identity).

[top]

NAMELIST

This namelist is read from the file input.nml. Namelists start with an ampersand '&' and terminate with a slash '/'. Character strings that contain a '/' must be enclosed in quotes to prevent them from prematurely terminating the namelist.

&preprocess_nml
          overwrite_output = .true.,
    input_obs_def_mod_file = '../../../obs_def/DEFAULT_obs_def_mod.F90', 
   output_obs_def_mod_file = '../../../obs_def/obs_def_mod.f90', 
   input_obs_kind_mod_file = '../../../obs_kind/DEFAULT_obs_kind_mod.F90', 
  output_obs_kind_mod_file = '../../../obs_kind/obs_kind_mod.f90', 
               input_files = '../../../obs_def/null',
 /


Item Type Description
input_obs_def_mod_file character(len=129)
Path name of input obs definition module to be preprocessed. Normally this is DEFAULT_obs_def_mod.F90 in the obs_def directory. This file must have the appropriate commented lines indicating where the different parts of the input special obs definition modules are to be inserted.
output_obs_def_mod_file character(len=129)
Path name of output obs definition module to be created by preprocessor. Normally this is obs_def_mod.f90 in the obs_def directory.
input_obs_kind_mod_file character(len=129)
Path name of input obs kind module to be preprocessed. Normally this is DEFAULT_obs_kind_mod.F90 in the obs_kind directory. This file must have the appropriate commented lines indicating where the different parts of the input special obs definition modules are to be inserted.
output_obs_kind_mod_file character(len=129)
Path name of output obs kind module to be created by the preprocessor. Normally this is obs_kind_mod.F90 in the obs_kind directory.
input_files character(len=129)(:)
A list of up to max_input_files file names that contain special format obs definition files that are to be incorporated into the preprocessed obs_kind_mod.f90 and obs_def_mod.f90. The files must be in the special obs definition format that includes commented F90 lines delimitting information about the observation type(s). These files normally reside in the obs_def directory in files such as obs_def_reanalysis_bufr_mod.f90.
overwrite_output logical
If set to .true., will allow preprocess to overwrite existing obs_kind_mod.f90 and obs_def_mod.f90 files without complaint. The default setting has changed from .FALSE. to .TRUE., so by default it will not complain about existing files but will silently update them in place.


[top]

MODULES USED

types_mod
utilities_mod

Namelist interface &preprocess_nml must be read from file input.nml.

[top]

FILES

[top]

REFERENCES

[top]

ERROR CODES and CONDITIONS

RoutineMessageComment
preprocess Namelist must provide input_obs_def_mod_file Need an input obs_def file to preprocess.
preprocess Namelist must provide input_obs_kind_mod_file Need an input obs_kind file to preprocess.
preprocess Namelist must provide output_obs_def_mod_file Need an output obs_def file to create.
preprocess Namelist must provide output_obs_kind_mod_file Need an output obs_kind file to create.
preprocess file ____ does not exist The input obs_def and obs_kind files must exist.
preprocess file ______ exists: Please Rename The output obs_kind and obs_def files must not exist. Want to avoid overwriting something important.
preprocess input_files _______ does NOT exist All of the specified special obs_def input modules must exist.
preprocess file _____ does NOT contain ! BEGIN DART PREPROCESS KIND LIST Each special obs_def input file must contain this comment string.
preprocess file _____ does NOT contain " END DART PREPROCESS KIND LIST Each special obs_def input file must contain this comment string.
preprocess Input DEFAULT obs_kind file ended unexpectedly. Did not find strings indicating where to insert special obs_def sections in the input obs_kind module.
preprocess Input DEFAULT obs_def file ended unexpectedly. Did not find strings indicating where to insert special obs_def sections in the input obs_def module.
preprocess file _____ does NOT contain ! BEGIN DART PREPROCESS. Input special obs_def file must contain this comment string.
preprocess file _____ does NOT contain ! END DART PREPROCESS. Input special obs_def file must contain this comment string.

KNOWN BUGS

none

[top]

FUTURE PLANS

none

[top]

Terms of Use

DART software - Copyright 2004 - 2013 UCAR.
This open source software is provided by UCAR, "as is",
without charge, subject to all terms of use at
http://www.image.ucar.edu/DAReS/DART/DART_download

Contact: DART core group
Revision: $Revision: 6380 $
Source: $URL: https://svn-dares-dart.cgd.ucar.edu/DART/releases/Lanai/preprocess/preprocess.html $
Change Date: $Date: 2013-08-05 17:47:11 -0600 (Mon, 05 Aug 2013) $
Change history:  try "svn log" or "svn diff"