Skip to content

Using yaml files as config files for OLMT #3

Description

@jsta

I have a pipeline where I have a json file that is parsed by jq to feed arguments to OLMT. Maybe this repo could include a script, that wraps yq to parse the proposed yaml file to do something similar?

# # my pipeline for launching a run with a json file supplying OLMT arguments
python3 ./site_fullrun.py `jq -r 'to_entries[] | "--\(.key) \(.value)"' config.json`

cat config.json
{
  "compiler": "gnu",
  "mpilib": "openmpi",
  "machine": "docker",
  "site": "AK-TLG",
  "sitegroup": "NGEEArctic",
  "cpl_bypass": "",
  "era5": "",
  "metdir": "inputdata/atm/datm7/era5_noleap/tl",
  "domainfile": "inputdata/share/domains/domain.clm/domain.lnd.1x1pt.nc",
  "surffile": "inputdata/lnd/clm2/surfdata_map/surfdata_1x1pt.nc",
  "landusefile": "inputdata/lnd/clm2/surfdata_map/landuse.timeseries_1x1.nc",
  "nofire": "",
  "no_budgets": "",
  "nopointdata": "",
  "model_root": "/home/e3smuser/src",
  "runroot": "/home/e3smuser/output"
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions