ESCOMP / ESCOMP/CAM-SIMA

Add buildnml check ensuring that the ncdata file vertical dimension matches pver

Open
#142 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
No language data
Stars
9
Forks
22
Avg merge
8d 5h
Merged PRs (30d)
4

Description

The number of vertical levels in CAMDEN is set by the `pver` namelist variable. However, currently the vertical level values themselves are set by the `ncdata` input file, which means if the number of levels in the `ncdata` file doesn't match the `pver` value, then the model will crash.

Thus unless vertical interpolation is enabled by the user, it would be ideal to have `buildnml` check if the `pver` value matches the levels from the input file, and if not, then throw an error notifying the user of the discrepancy.

Also, in order to avoid significantly increasing the cost of `buildnml`, which is called multiple times during the model build and submission process, it might be beneficial to add a "namelist" cache that only does the check once, unless the namelist files or settings have been modified by the user since the last check.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the buildnml entry point and trace how pver, the ncdata input file, and vertical interpolation settings are read. Reproduce a mismatch between pver and the ncdata vertical levels, then verify that buildnml reports the discrepancy when interpolation is disabled and avoids unnecessary repeated checks if the proposed cache is included.

Written by the indexing model from the issue text.

Assessment

Domain
build-system
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.