-
Notifications
You must be signed in to change notification settings - Fork 118
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
Workaround to fix issues with wrong namelists for nests in fv3atm #86
Workaround to fix issues with wrong namelists for nests in fv3atm #86
Conversation
…r height advection; change dz_min as a input (NOAA-GFDL#53) * 1)Add an option to use original BC or zero-gradient BC to reconstruct interface u/v with PSM for height advection 2)Change dz_min as a namelist input * Change to the original version by adjust the upper interface of ZH when dz<dz_min * add authors for the revision
…on (section atmos_model_nml) in the input namelist
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know what's going on here, but the diff seems off. The dz_min and psm_bc updates are already in NOAA-GFDL:dev/emc, but this comparison/diff makes it seem as if the baseline doesn't have them. I think you need to merge/rebaseline with NOAA-GFDL:dev/emc first?
Yes, I need to rebase this first - it was made based on NOAA-EMC dev/emc last Friday. |
…ed_sphere into nest_workaround_read_ccpp_suite_from_input_nml
Rebased, no more conflicts. |
@climbfuji - can you create an issue to track cleaning this workaround up in a more elegant fashion. |
Sure, please see here: #88 |
How do we want to proceed with this PR? |
I think this should be fine for now in the EMC branch. (In SHiELD we read this from atmos_model.F90.) It would be preferable if the code could all be put into a separate routine called from atmosphere_init() so that it is self contained but this isn't necessary right now. |
Thanks, Lucas. I'll work with Rusty to finalize this PR. |
…ed_sphere into nest_workaround_read_ccpp_suite_from_input_nml
Once @junwang-noaa approves this I can go ahead and merge this into dev/emc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand this fix is to allow the nest tasks to read in a different CCPP suite from the suite file read by other global domain tasks. Further work is required to have different settings for other variables in atmo_model_nml namelist.
… model runs (NOAA-GFDL#86) * make rain/snow tendency consistent with accumulated rain/snow * put drain_cpl and dsnow_cpl in proper container * Updates of IPD and CCPP code to regain bit-for-bit identical results for coupled model runs * Update .gitmodules and submodule pointer for ccpp-physics for code review and testing * gfsphysics/GFS_layer/GFS_physics_driver.F90: need to initialize local variables for bit-for-bit identical results * Bugfix in gfsphysics/GFS_layer/GFS_typedefs.F90, allocate Tbd%drain_cpl and Tbd%dsnow_cpl when cplchm or cplflx is true * Remove local/interstitial variables for seaice coupling, add suite definition file for S2S benchmark runs * Rename S2S suite suite_FV3_GFS_2017_coupled_satmedmf.xml to suite_FV3_GFS_2017_satmedmf_coupled.xml * Revert change to .gitmodules and update submodule pointer for ccpp-physics Co-authored-by: Phil Pegion <[email protected]> Co-authored-by: Philip Pegion <[email protected]>
Description
This workaround is a temporary solution until the refactoring of the generic physics interface for calling GFDL/CCPP physics is completed. The issue is:
The current code in fv3atm has a bug when running nested models. The
atmos_model_nml
section, which contains options such asccpp_suite
,blocksize
,fhdiag
, is currently read in fv3atm beforeatmosphere_init
is called. This is required, becauseatmosphere_init
needsccpp_suite
.However, the capability to read the correct namelist for the nests is only turned on during
atmosphere_init
. The obvious solution would be to moveccpp_suite
into its own namelist sectionccpp_nml
, which could then be read by both the GFDL_atmos_cubed_sphere and fv3atm.However: In light of the upcoming refactoring of the dycore and the ccpp-framework updates, this makes no sense. The planned implementation will use a generic interface in the dycore to either call the original GFDL fast physics (for SHIELD models etc) or the CCPP fast physics (for UFS etc), and will separate the existing suite definition files (SDFs) into two SDFs each (one for the dycore = fast physics, one for fv3atm = traditional physics). This means that we will have two
ccpp_suite
options in the namelist, one in the section relevant for the dycore (fv_core_nml
), one in the section relevant for physics (currentlygfs_physics_nml
). It doesn't make sense to change each namelist template in the repository and instruct all developers to change their namelists twice - better do it once.Therefore, the solution presented here (more workaround) is to read the namelist section
atmos_model_nml
in the dycore in the UFS-specific filedriver/fvGFS/atmosphere.F90
to obtain the correct value ofccpp_suite
afterfv_control_init
is called and beforeccpp_physics_init
is called.For this to work, the reading of the namelist section
atmos_model_nml
must be moved to afteratmosphere_init
- see associated PR ufs-community/ufs-weather-model#488.How Has This Been Tested?
I used the UFS regression test
fv3_stretched_nest
and updatedinput_nest02.nml
to use a different suite definition fileFV3_GFS_2017_stretched_nest
(created manually just for testing) which is identical to the parent SDF except that it also callsh2ophysics
. For consistency, I seth2o_phys = .true.
ininput_nest02.nml
. I then added debug print statements in the CCPP code generator (ccpp_prebuild.py
et al.) that told me that ranks 48+ (used for the nest) indeed calledh2ophys
, and that ranks 0-47 (used for the parent) did not.Checklist:
Please check all whether they apply or not
Associated PRs:
#86
NOAA-EMC/fv3atm#263
ufs-community/ufs-weather-model#488
See ufs-community/ufs-weather-model#488 for testing.