NCAR / NCAR/ccpp-framework

capgen: case-sensitivity when comparing metadata to Fortran

Open
#746 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug capgen
Dominant language
Python
Stars
25
Forks
67
Avg merge
3d 8h
Merged PRs (30d)
2

Description

Description

I am getting the following error when running capgen. In the Fortran code, the actual code (not the comments) is all lowercase because of Codee formatting. In the metadata, it's still uppercase (GFS_stateout vs gfs_stateout). If I lowercase the metadata to match the Fortran code, the error goes away.

Reading host model data from /home/dom/work/neptune-atmos/nep-capgen/external/ccpp/ccpp-physics/physics/Radiation/RRTMG/radsw_param.meta
Reading host model data from /home/dom/work/neptune-atmos/nep-capgen/external/ccpp/ccpp-physics/physics/Radiation/RRTMG/radlw_param.meta
Reading host model data from /home/dom/work/neptune-atmos/nep-capgen/external/ccpp/ccpp-physics/physics/photochem/module_ozphys.meta
Reading host model data from /home/dom/work/neptune-atmos/nep-capgen/external/ccpp/ccpp-physics/physics/photochem/module_h2ophys.meta
Reading host model data from /home/dom/work/neptune-atmos/nep-capgen/external/ccpp/ccpp-physics/physics/MP/TEMPO/TEMPO/module_mp_tempo_params.meta
Reading host model data from /home/dom/work/neptune-atmos/nep-capgen/external/ccpp/ccpp-physics/physics/SFC_Models/Land/Noahmp/lnd_iau_mod.meta
Reading host model data from /home/dom/work/neptune-atmos/nep-capgen/external/ccpp/data/CCPP_typedefs_module.meta
Reading host model data from /home/dom/work/neptune-atmos/nep-capgen/external/ccpp/data/GFS_typedefs_module.meta
No matching Fortran routine found for GFS_stateout_type in /home/dom/work/neptune-atmos/nep-capgen/external/ccpp/data/GFS_typedefs_module.F90
'
CMake Error at external/ccpp/CMakeLists.txt:134 (message):
  ccpp_capgen.py FAILED: result = 1


-- Configuring incomplete, errors occurred!

Steps to Reproduce

See above. Should be reproducible by uppercasing names in one of the metadata files in the existing capgen tests.

Additional Context

n/a

Output

See above.

Contributor guide

No contributing guide indexed for this repository

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.

Research direction

Start with ccpp_capgen.py and the existing capgen tests, reproducing the failure by uppercasing names in one of the metadata files. Compare the metadata lookup with GFS_typedefs_module.F90 and verify that differing case no longer causes a missing routine error. Done means the reproduction succeeds and the capgen tests pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
fortran, python
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
64/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.