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

-chem none (prescribed bulk aero) broken on cam_dev #626

Open
zarzycki opened this issue Jul 26, 2022 · 3 comments
Open

-chem none (prescribed bulk aero) broken on cam_dev #626

zarzycki opened this issue Jul 26, 2022 · 3 comments
Assignees
Labels
bug Something isn't working correctly CoupledEval3
Milestone

Comments

@zarzycki
Copy link

What happened?

Running with -phys cam_dev -chem none re-breaks (#261) prescribed bulk aerosols. The model is trying to use placeholder indices to access buffer vars that are not there...

261: ERROR: GET_PBUF1D_FIELD_BY_INDEX: index (-1) out of range
54: ERROR: GET_PBUF1D_FIELD_BY_INDEX: index (-1) out of range
59:Image              PC                Routine            Line        Source
59:cesm.exe           0000000002D86D16  Unknown               Unknown  Unknown
59:cesm.exe           00000000028F7C40  shr_abort_mod_mp_         114  shr_abort_mod.F90
59:cesm.exe           000000000073347E  physics_buffer_mp         848  physics_buffer.F90.in
59:cesm.exe           000000000153A470  modal_aero_calcsi        1475  modal_aero_calcsize.F90
59:cesm.exe           0000000001538717  modal_aero_calcsi        1397  modal_aero_calcsize.F90
59:cesm.exe           0000000000781A73  physpkg_mp_tphysb        2744  physpkg.F90
59:cesm.exe           000000000077C27A  physpkg_mp_phys_r        1108  physpkg.F90
59:cesm.exe           000000000057DBC6  cam_comp_mp_cam_r         258  cam_comp.F90
59:cesm.exe           0000000000567D54  atm_comp_nuopc_mp         877  atm_comp_nuopc.F90

While the tracer/chem code is not my "bag," this appears to be because the reg and init aren't called for modal_aero_calcsize when chem -none sets the modal flag in physpkg to false and then tphysbc tries to initialize aerosols by running the wet dep routines.

      !===================================================
      ! Run wet deposition routines to intialize aerosols
      !===================================================

      call modal_aero_calcsize_diag(state, pbuf)
      call modal_aero_wateruptake_dr(state, pbuf)

      !===================================================

So a potential fix might be to have an if statement that calls a different aero init routine within the above block. Just commenting those two lines out as a test resulted in a crash just downstream (NaNs in CLUBB), so something needs to be init, but hopefully someone else knows off the top of their head rather than my feeble brain trying to figure it out.

What are the steps to reproduce the bug?

Build a vanilla F compset after adding -phys cam_dev -chem none to the build flags.

What CAM tag were you using?

cam6_3_064

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?

No

Extra info

No response

@zarzycki zarzycki added the bug Something isn't working correctly label Jul 26, 2022
@cacraigucar cacraigucar moved this to To Do in CAM Development Jul 26, 2022
@cacraigucar cacraigucar added this to the CESM2.3 milestone Jul 26, 2022
@adamrher
Copy link

I'm trying to get a handle on all outstanding cam_dev issues. I believe this is the only one not associated with the CAM6.5 milestone. I'm wondering if it should be so that all cam_dev issues are grouped together. A 6.5 milestone is to introduce more cam_dev tests, so to the extent we envision a -chem none test, this should be resolved before we introduce ore cam_dev tests.

@cacraigucar
Copy link
Collaborator

@adamrher - Is this still an issue?

@adamrher
Copy link

I finally got around to looking at this issue since I've become interested in the -chem none option, which I still don't entirely understand. From what I can tell it is not doing any chemistry, but is running some form of the bulk aerosol model that provides radiatively active constituents, of which are not advected by the dycore. Importantly, it returns false this logical in phys_register in physpkg.F90:

       call rad_cnst_get_info(0, nmodes=nmodes)
       clim_modal_aero = (nmodes > 0)

When clim_modal_aero is false it will not reg, init or call at run time the modal_aero_calcsize_* or modal_aero_wateruptake_* in the non-cam_dev/cam7 version of physpkg.F90. Therefore in the cam_dev/cam7 version of physpkg.F90, we cannot call these routines when -chem none.

Wrapping the clim_modal_aero logic around the tphysbc calls I introduced in cam_dev/cam7 results in a completed run w/ -chem none. @zarzycki mentioned he commented out these calls in his run and got NaN's in clubb, but I'm not getting that (ran successfully for 1 month). A shot in the dark, but @fvitt found an aerosol related variable that we weren't initializing in cam_dev/cam7 sometime in the past year (I can't find the PR) which may be responsible for Colin's error, and why my runs have completed successfully.

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 CoupledEval3
Projects
Status: To Do
Development

No branches or pull requests

4 participants