Skip to content

PPUG_running_timeseries

Alice Bertini edited this page Aug 30, 2016 · 18 revisions

The timeseries bash wrapper script calls the cesm_tseries_generator.py python script in parallel which reads the env_timeseries.xml file, defines the necessary input specifier �class option to the pyReshaper tool, and calls the reshaper to convert CESM history time slice output data into single variable time series files for specified components and history output streams.

The timeseries generation relies on the adherence to the CESM Model File Naming Conventions.

Users may customize the behavior of the pyReshaper by modifying the XML input values in the env_timeseries.xml file as follows:

<comp_archive_spec name="cam">
  <rootdir>atm</rootdir>
  <multi_instance>True</multi_instance>

  <files>
    <file_extension suffix=".h0\.+">
      <subdir>hist</subdir>
      <tseries_create>TRUE</tseries_create>
      <tseries_output_format>netcdf4c</tseries_output_format>
      <tseries_output_subdir>proc/tseries/monthly</tseries_output_subdir>
      <tseries_tper>monthly</tseries_tper>
      <tseries_filecat_years>10</tseries_filecat_years>

  <tseries_time_variant_variables>
    <variable>ch4vmr</variable>
    <variable>co2vmr</variable>
    etc...

Where each XML element and attribute corresponds to:

<comp_archive_spec name="cam">
component model name
<rootdir>atm</rootdir>
component root directory just below $DOUT_S_ROOT
<multi_instance>True</multi_instance>
True or False indicating if multiple instances of component model need to be converted to variable time series. This option is not yet implemented.

Each <comp_archive_spec> element contains one or more <file_extension> elements corresponding to a history data stream or suffix.

<file_extension suffix=".h0.+">
The suffix attribute is a python regular expression used to match against filenames in the $DOUT_S_ROOT/atm/<subdir> directory.
<subdir>hist</subdir>
The input sub-directory to look for history files matching the file_extension suffix string.
<tseries_create>TRUE</tseries_create>
True or False indicating whether or not to create single variable time series files for this <file_extension> element.
<tseries_output_format>netcdf4c</tseries_output_format>
Output NetCDF format either 'netcdf4c' (netcdf4 compressed (lev=1)), 'netcdf4' (netcdf classic), 'netcdf' (netcdf3 classic), or netcdfLarge. DEFAULT = 'netcdf4c'.
<tseries_output_subdir>proc/tseries/monthly</tseries_output_subdir>
The location of the output single variable time series files for this <file_extension> appended to $DOUT_S_ROOT/<rootdir>/.
<tseries_tper>monthly</tseries_tper>
The time period corresponding to this <file_extension>. TO-DO check a history file to get this information from the header time_freq_period global attribute (not included in clm, pop, or mosart yet).
<tseries_filecat_years>10</tseries_filecat_years>
Number of years to be concatenated or "chunked" into a single variable time series file.
<tseries_time_variant_variables>
Includes one or more <variable> elements each with a single time variant variable name that needs to be included in every single variable time series output file.