History3G Documentation - GEOS-ESM/MAPL GitHub Wiki

Overall Structure of YAML File

The yaml file can have the following top level keys

  • geoms
  • active_collections
  • time_specs
  • collections

Active collections list

All collections that you want to be written will be named under an active_collections list, for example, if you have collections named collection_1 and collection_2:

active_collections:
  - collection_1
  - collection_2

geoms

A one or more valid supported MAPL3 geometries can be specified here. These can be used to tell a collection an alternative geometry (such as another grid like a lat-lon or cubed sphere) other than the geometry of the component that produces the export to be written. WE RECOMMEND MAKING AND ANCHOR FOR EACH ENTRY Here are a few examples.

geoms:
   lat_lon_example:
       class: latlon
       im_world: 180
       jm_world: 91
       pole: PC
       dateline: DC

time_specs

The time_specs consists of a set of maps, each of which can be used in a collection to specify any temporal related information to use in the collection related to the frequency of output.

WE RECOMMEND MAKING AND ANCHOR FOR EACH ENTRY

Each map supports the following keywords

  • frequency: this is the frequency of output as an ISO time internal
  • ref_time: this is the output time the frequency is relative to as an ISO time. If not specified it defaults to 0z of a day

collections

The collections section supports the following keywords

  • template: this is a grads template. In addition we have added the a %c token which is the collection name
  • geom: this is either a yaml map that defines the geometry or a reference to an anchor (see section on anchors)
  • time_spec this is either a yaml map that specifies the time handling or a reference to an anchor (see section on anchors)
  • var_list: The list of variables to be written, see section on the var_list

Use of Anchors in collections

We highly recommend using anchors for the geom and time_spec and using those. See the example at the end.

var_list

The var list consists of an entry for each item from a component you wish to write in the export. For each item you specify a map with the following format:

alias: {expr: export_short_name.component_name}

The key is the alias you wish the variable to be named in the file. The expr is the expression you wish to write. If you just want a single variable you just put that variable. The variable follows the convention that you specify the short name, a dot, and the component_name

If you have a vector you do ...

Complete Example File

geoms:
  geom1: &geom1
    class: latlon
    im_world: 20
    jm_world: 15
    pole: PC
    dateline: DC

active_collections:
  - test

time_specs:
  three_hour: &six_hour
    frequency: PT6H
    ref_time: T21:00:00

collections:
  test:
    template: "%c_%y4%m2%d2_%h2%n2z.nc4"
    geom: *geom1
    time_spec: *six_hour
    var_list:
      QV: {expr: Q.moist}