CAM icon indicating copy to clipboard operation
CAM copied to clipboard

-chem none (prescribed bulk aero) broken on cam_dev

Open zarzycki opened this issue 3 years ago • 2 comments

What happened?

Running with -phys cam_dev -chem none re-breaks (https://github.com/ESCOMP/CAM/issues/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 avatar Jul 26 '22 13:07 zarzycki

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.

adamrher avatar Sep 14 '22 16:09 adamrher

@adamrher - Is this still an issue?

cacraigucar avatar Jul 11 '24 21:07 cacraigucar