Inconsistent regex in (at least) datm config_component

Open
#401 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
52/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
fortran, xml
Domain
build-system

Research direction

Start by comparing the simyear attribute conditions in datm/cime_config/config_component.xml around lines 79-103 and 266-317. Reproduce the two provided compset_name examples and trace the selected DATM_PRESAERO and DATM_YR_START values; done means inconsistent regex matching no longer allows a typo to select mismatched conditioned values.

Written by the indexing model from the issue text.

Description

In some of the xml entries there is no ^ prefixed to simyear in attribute conditions. A user makes a typo in the compset (f.e. they had a bash variable compset_name="I1850Clm60Sp" and than changed its value to a compset longname to f.e. get rid of prognostic ROF: compset_name="1850_DATM%GSWP3v1_CLM50%SP_SICE_SOCN_SROF_SGLC_SWAV" and made a typo, f.e. left I in front of the symyear: compset_name="I1850_DATM%GSWP3v1_CLM50%SP_SICE_SOCN_SROF_SGLC_SWAV". What will happen is variables like DATM_PRESAERO will get deafult_value value, since ^ is present in the attributes there:
https://github.com/ESCOMP/CDEPS/blob/3f7f22d0426ccc1428a1ebfd4357caf90009132a/datm/cime_config/config_component.xml#L79-L103

While things like DATM_YR_START will pick up the correct conditioned value:

https://github.com/ESCOMP/CDEPS/blob/3f7f22d0426ccc1428a1ebfd4357caf90009132a/datm/cime_config/config_component.xml#L266-L317

In general it should be handled in probably cime by validating the compset's symyear. Which means, that if a user does not check xml variables, he(she) will get correct DATM years but will run with a wrong DATM_PRESAERO, _ PRESNDEP,CO2_TSERIES etc.

Dominant language
Fortran
Stars
32
Forks
71
Avg merge
1d 6h
Merged PRs (30d)
2

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ESCOMP/CDEPS

All issues in ESCOMP/CDEPS

Similar issues

More Build System issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.