NCAR / NCAR/ccpp-framework

capgen: dimension specifier foo(N) is not the same as foo(1:N) in Fortran code

Open
#747 0 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

Error:

Variable mismatch in gfs_control_type, no Fortran variable idat.

Metadata:

[idat]
  standard_name = date_and_time_at_model_initialization_in_iso_order
  long_name = initialization date and time
  units = none
  dimensions = (8)
  type = integer

Fortran:

integer :: idat(1:8) ! initialization date and time

If I change the Fortran code to

integer :: idat(8) ! initialization date and time

then the error is gone.

Steps to Reproduce

See above. Should be reproducible in one of the capgen tests from develop.

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 the capgen tests from the develop branch and reproduce the mismatch between dimensions (8) in metadata and 1:8 in Fortran. Trace how capgen reads and compares dimension specifiers, then add coverage showing both forms are equivalent and confirm the existing mismatch error is resolved.

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
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.