Skip to content

Improve wildcard features in config .toml files. #3

@oj-tooth

Description

@oj-tooth

Suggest enhancement to the current config .toml files to allow further wild card expansion using input parameter {ip}, including [2010, 2012, 2015] for example.

Currently, [inputs] use the following structure:

[inputs]
# Define NEMO ocean model filepaths used to construct NEMODataTree object:
nemo_dir = "/gws/nopw/j04/atlantis/atb299/NPD/eORCA12"
domain_filepath = "/work/scratch-nopw2/otooth/NOC-NPD/domain_cfg_era5v1_mesh_mask.nc"
# Create NEMO model grid datasets from CMORISED variables:
cmorised = false
# Domain Properties:
iperio = true
nftype = "T"
read_mask = true
# NEMO T-grid (scalar) variables:
gridT_filepath = "${nemo_dir}/????/eORCA12_1m_grid_T_{ip}*.nc"
gridT_vars = [ "thetao_con", "so_abs" ]
# NEMO U-grid (zonal vector) variables:
gridU_filepath = "${nemo_dir}/????/eORCA12_1m_grid_U_{ip}*.nc"
gridU_vars = [ "uo", "e3u" ]
# NEMO V-grid (meridional vector) variables:
gridV_filepath = "${nemo_dir}/????/eORCA12_1m_grid_V_{ip}*.nc"
gridV_vars = [ "vo", "e3v" ]

So we could allow the CLI argument ---input-pattern to accept either a single value or a list of values to be substituted ahead of file path discovery using glob.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions