Generating boundary condition files from raw data

Generating boundary condition files from raw data#

The inicond, latcond and topcond components are characterized by their comp_type; otherwise, their specifications follow the same principles as flux, as described previously.

Good practices#

If your are a new user of the CIF or if you use a raw type of data for the fist time, it is safer to follow the steps:

  1. Prepare a yaml for only generating the boundary conditions (as shown above).

  2. Run the system with this yaml.

  3. Check the generated inputs, as explained in Checking the input files:.

Principles#

The supported raw inputs are the ones supported by the various available plugins for the boundary conditions, which are found in datastreams of type Field (see also cheat-sheet).

To specify different input sources for the various species at the boundaries, these species must be listed as parameters of inicond, latcond and topcond (three independent datatreams) and their names must match the names in ACTIVE_SPECIES. For each parameter, the specifications of the component plugin are inherited by default but it is possible to individualize everything, including the plugin to use, as shown in the following examples.

The information to be provided are:

  1. along the name, type and version of the plugin chosen to deal with the raw files, the information relative to the chosen plugin, which is particular to each plugin and found in the plugin’s documentation.

  2. the up to four pieces of information relative to the component as expected by datavect (see CHIMERE usual inputs and datavact). Note that it is very probable that varname is used since the data of raw outside files have a very small probability of using the same species names as CHIMERE.

  3. recipes to build the transformations from the raw data to CHIMERE’s inputs, i.e. the spatial and temporal interpolations from the initial data to the domain’s grid and the unit conversion. Each recipe is actually a key-word and arguments which are, in the core of the CIF, linked to plugins - this is why the links in the documentation point to plugins, which are not actually accessed by the user in the yaml.

    1. the recipe for building the transformation regrid for the spatial interpolation. If no regrid is specified, the CIF will do a bilinear regridding by default.

    2. if required, the recipe for building the transformation vertical_interpolation for the vertical interpolation. Same as above, if not specified, the default is linear

    3. the recipe for building the transformation time_interpolation for the temporal interpolation. no option yet. under construction

    4. the recipe for building the transformation unit_conversion for converting units

Examples#

Only one species, taken from various raw fields#

datavect:
  plugin:
    name: standard
    version: std
  components:
    inicond:
      parameters:
       CH4:
        plugin:
          name: ECMWF
          version: grib2
          type: field
        dir: /home/comdata1/Meteo/1280franceArgonaut/%Y/%m/
        file: macc.1280franceArgonaut.%Y%m%d0000%H.grb2
        file_2d: 2dmacc.1280franceArgonaut.%Y%m%d0000%H.grb2
        file_freq: 3H
        varname: ch4
        unit_conversion: # Conversion from kg/kg to ppb
          scale: 1810375000.0

    latcond:
      parameters:
        CH4:
         plugin:
           name: CAMS
           version: netcdf
           type: field
         is_lbc: True
         dir: /home/chimereicos/ipison/grib_CAMS_N2O_chimere_cif/
         file: z_cams_l_nilu_%Y%m_v17r1_ra_ml_3h_n2o.nc
         file_freq: 3H
         varname: CH4
         time_interpolation:
           methode: linear

    topcond:
      parameters:
        CH4:
          plugin:
            name: ECMWF
            version: grib2
            type: field
          is_top: True
          dir: /home/comdata1/Meteo/1280franceArgonaut/%Y/%m/
          file: macc.1280franceArgonaut.%Y%m%d0000%H.grb2
          file_2d: 2dmacc.1280franceArgonaut.%Y%m%d0000%H.grb2
          file_freq: 3H
          varname: ch4
          unit_conversion: # Conversion from kg/kg to ppb
            scale: 1810375000.0
          time_interpolation:
            methode: linear