Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vertical dimension of tphysbc_cmfmc should be ilev (not lev) #1274

Open
jimmielin opened this issue Mar 13, 2025 · 0 comments
Open

Vertical dimension of tphysbc_cmfmc should be ilev (not lev) #1274

jimmielin opened this issue Mar 13, 2025 · 0 comments
Assignees
Labels
bug Something isn't working correctly

Comments

@jimmielin
Copy link
Member

What happened?

tphysbc_cmfmc (atmosphere_convective_mass_flux_due_to_all_convection) is incorrectly written with lev as the vertical dimension instead of ilev.

It is defined at module level with interface dimension:

real(r8) :: cmfmc(pcols,pverp) ! Convective mass flux--m sub c

The addfld call should be ilev here

call snapshot_addfld( ntphysbc_var, tphysbc_snapshot, cam_snapshot_before_num, cam_snapshot_after_num, &
'cmfmc', 'tphysbc_cmfmc', 'unset', 'lev')

and in physics/cam7/cam_snapshot.F90 as well.

Because the vertical dimension is declared incorrectly, attempting to read this field in CAM-SIMA will lead to CAM-SIMA crashing.

What are the steps to reproduce the bug?

Observe any tphysbc CAM snapshot

        double tphysbc_cmfmc(time, lev, ncol) ;
                tphysbc_cmfmc:mdims = 1 ;
                tphysbc_cmfmc:units = "unset" ;
                tphysbc_cmfmc:long_name = "tphysbc_cmfmc" ;
                tphysbc_cmfmc:cell_methods = "time: point" ;

What CAM tag were you using?

cam6_4_075

What machine were you running CAM on?

CISL machine (e.g. cheyenne)

What compiler were you using?

Intel

Path to a case directory, if applicable

No response

Will you be addressing this bug yourself?

Yes

Extra info

Will likely bundle the fix into #1271 unless there is another urgent need for this field in other SIMA work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly
Projects
Status: To Do
Development

No branches or pull requests

1 participant