FHS94 with MPASA needs PMID:A output
What is the feature/what would you like to discuss?
FHS94 with MPASA does not output PMID:A by default, but PMID:A is essential for MPASA output. I bypassed this problem by manually added fincl1 = 'PMID:A' to my namelist, but the need to edit the namelist for an essential output is not ideal for future users. Therefore, please update the source code to output PMID:A by default for FHS94 with MPASA.
Is there anyone in particular you want to be part of this conversation?
@adamrher
Will this change (regression test) answers?
No
Will you be implementing this enhancement yourself?
No
@HingOng can you point me to a h0a file so I can see what is coming out by default?
@adamrher Here is the path to the h0a file: /glade/derecho/scratch/hxong/f.cam6_4_095.FHS94.mpasa120_mpasa120.deep.000/run/f.cam6_4_095.FHS94.mpasa120_mpasa120.deep.000.cam.h0a.0001-01-31-00000.nc
Also, adding fincl1 = 'PMID:A' to my namelist did not work. The atm.log file says "FLDLST: PMID in fincl(1, 1) not found"
@kuanchihwang would you mind looking into whether PMID can (or should?) be made available in FHS94 w/ the mpas dycore?
The problem is PMID and other pressure variables are only being registered and set for the *_moist subroutines in cam_diagnostics.F90, whereas I think this should be done in the *_dry subroutines. I've moved them into the dry calls here:
/glade/derecho/scratch/aherring/cam6_4_106_FHS94_ne30pg3_ne30pg3_mg17_512pes_251103_pmid-test/SourceMods/src.cam/cam_diagnostics.F90
@HingOng can you test whether this works for you? I just tested it in SE and it looks to be working. You don't need to explicitly add it to the tapes either, it should add PMID to fincl1 automatically.
@OkayHughes you'll need this SourceMod to make PMID available in your SE runs.
Adding more details to what @adamrher wrote.
- During CAM initialization, the
phys_ctl_readnlsubroutine is called to read thephys_ctl_nlnamelist group [1], and thecam_physpkgcharacter variable is set to "held_suarez". - The
cam_ctrl_set_physics_typesubroutine is called, and themoist_physicslogical variable is set to.false.for Held-Suarez scheme [2]. - Subsequently, when the
diag_initsubroutine is called to initialize model diagnostics [3][4], moist diagnostics are not initialized due to being guarded behind the conditional onmoist_physics.
A proposed fix is to move pmid and maybe other pressure-related variables to dry diagnostics. However, this would constitute a behavior change and CAM is now in freeze mode until release branching. We have to decide if it is acceptable to introduce such behavior change during the freeze window.
@HingOng For now, you can git cherry-pick this commit to fix the reported issue.
@adamrher @kuanchihwang Thank you for your solutions. I will test them after the NCAR HPC maintenance completes.
@adamrher I confirm that your SourceMods work with MPAS. @kuanchihwang Your commit looks similar to Adam's SourceMods, so it should work as well.