-
Notifications
You must be signed in to change notification settings - Fork 34
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
Re-organize GFDLMP (v1) #162
Conversation
@RuiyuSun how will this change impact results in configurations using this MP scheme, such as HAFS? Is the plan in HAFS to update to v3? |
@lisa-bengtsson I am guessing a similar change may be needed in HAFS. There is a plan to test the v3 in the HAFS future version. |
@RuiyuSun Ok, I thought HAFS pointed to ufs-community/ccpp-physics the same way e.g. GFS does? |
This is the HAFS .gitmodules. https://github.com/hafs-community/HAFS/blob/develop/.gitmodules |
HAFSv2 will use the latest code whenever they decide to freeze the code. This PR should have no impact on HAFSv2 science |
My question is, where is GFDLMP v2? |
GFDL MP v0 (before 2015): HiRAM (Chen and Lin 2011, 2013) |
This is the first time I see explicit versions of parameterizations in CCPP. Typically each scheme just gets progressively developed on the main branch. I would like to understand why you are proposing to add GFDL mp v3 alongside v1, effectively making it a new scheme. Will v1 still be developed? |
I don't know if v1 will be continuously developed by GFDL FV3 team (guessing not). It is still in a version of HAFS and could be tuned for better performance of HAFS. The GFDLMP v1 and v3 names are from GFDL FV3 team. The two versions, v1 and v3, are significantly different in terms of science, code structure and computational cost. The plan is to adopted v1 fast physics working with v3. So the two versions share one file. GFDLMP v3 could be added as a separate scheme like different versions of the convection and PBL schemes. But, placing v1 and v3 under GFDL will reduce a duplication of one common file. |
@dustinswales @grantfirl For some reasons, a RT test control_c384 failed. Please see below: baseline dir = /scratch2/NAGAPE/epic/UFS-WM_RT/NEMSfv3gfs/develop-20240111/control_c384_intel 0: The total amount of wall time = 547.407438 Test 001 control_c384_intel FAIL |
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.
Looks good.
@RuiyuSun Are you still seeing failure with the c384 RT? As for the organization and scheme versioning... I'm fine with the proposed organization: Another other option would be to put v3 at the same level as v1: physics/ |
@dustinswales Thanks for your suggestion. I will consider both. I just did a test and still have the same issue. There is any code change. Why did the RT test fail? _baseline dir = /scratch2/NAGAPE/epic/UFS-WM_RT/NEMSfv3gfs/develop-20240111/control_c384_intel 0: The total amount of wall time = 531.138994 Test 001 control_c384_intel FAIL_ |
@ruiyu Sun - NOAA Federal ***@***.***> did you change the file
"config/ccpp_prebuild_config.py" when you run the tests?
…On Wed, Jan 24, 2024 at 8:17 PM RuiyuSun ***@***.***> wrote:
@RuiyuSun <https://github.com/RuiyuSun> Are you still seeing failure with
the c384 RT?
As for the organization and scheme versioning... I'm fine with the
proposed organization: physics/ MP/ GFDL/ common.F90 v1(2019)/ v3(2022)/
Another other option would be to put v3 at the same level as v1:
physics/ MP/ common.F90 GFDL_2019(v1)/ GFDL_2022(v3)/
@dustinswales <https://github.com/dustinswales> Thanks for your
suggestion. I will consider both. I just did a test and still have the same
issue. There is any code change. Why did the RT test fail?
_baseline dir =
/scratch2/NAGAPE/epic/UFS-WM_RT/NEMSfv3gfs/develop-20240111/control_c384_intel
working dir =
/scratch1/NCEPDEV/stmp2/Ruiyu.Sun/FV3_RT/rt_123806/control_c384_intel
Checking test 001 control_c384_intel results ....
Comparing sfcf000.nc ............ALT CHECK......NOT OK
Comparing sfcf012.nc ............ALT CHECK......NOT OK
Comparing atmf000.nc ............ALT CHECK......NOT OK
Comparing atmf012.nc ............ALT CHECK......NOT OK
Comparing GFSFLX.GrbF00 .........NOT OK
Comparing GFSFLX.GrbF12 .........NOT OK
Comparing GFSPRS.GrbF00 .........NOT OK
Comparing GFSPRS.GrbF12 .........NOT OK
0: The total amount of wall time = 531.138994
0: The maximum resident set size (KB) = 1282520
Test 001 control_c384_intel FAIL_
—
Reply to this email directly, view it on GitHub
<#162 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGTS6URDHV7GQM4N2EDRS4TYQGXDLAVCNFSM6AAAAABCFYZMTGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMBZGE4DONJWGY>
.
You are receiving this because your review was requested.Message ID:
***@***.***>
|
Yes. I added v1 in the path to the two files.
|
@ruiyu Sun - NOAA Federal ***@***.***> I got the same message, not
sure what can cause the failed tests. I will run more tests.
…On Thu, Jan 25, 2024 at 2:09 PM RuiyuSun ***@***.***> wrote:
Yes. I added v1 in the path to the two files.
'physics/physics/MP/GFDL/v1/gfdl_cloud_microphys.F90',
'physics/physics/MP/GFDL/v1/fv_sat_adj.F90',
—
Reply to this email directly, view it on GitHub
<#162 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGTS6UU5NHBQA47ZDHDTB43YQKUWTAVCNFSM6AAAAABCFYZMTGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMJQHAYTSNZYG4>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@RuiyuSun I ran more tests and saw that the results are different for some of the variables in the output files sfcfXXX.nc and atmfXXX.nc after the directory change. Not sure what cause the result change. My guess is that the compile option might impact the results. |
Update: Working w/ change. See /scratch1/BMC/gmtb/Dustin.Swales/UFS/Ruyiu/ufs-weather-model/tests on Hera @RuiyuSun Looking back at the repo reorganization PR, I see that there is a dependency in CmakeLists.txt that you might need to change as well, |
@dustinswales Thanks for your suggestion and making the test. I see your test passed. After adding the change in the CmakeLists.txt my test passed as well. |
… into a subdir v1
GFDL MP v3 has been added to this branch. Thank all for your help. Please let me know if you see any issues. |
@mzhangw @ericaligo-NOAA @dustinswales Please re-review since Ruiyu is adding a new GFDL MP v3 scheme in addition to the v1 directory change. |
@@ -36,7 +36,8 @@ module GFS_rrtmgp_setup | |||
!! \htmlinclude GFS_rrtmgp_setup_init.html | |||
!! | |||
subroutine GFS_rrtmgp_setup_init(do_RRTMGP, imp_physics, imp_physics_fer_hires, & | |||
imp_physics_gfdl, imp_physics_thompson, imp_physics_wsm6, imp_physics_zhao_carr, & | |||
imp_physics_gfdl, imp_physics_gfdl_v3, & |
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.
It is not related to this PR, but all imp_physics_* seems do nothing here.
& qstl, rhly, ccnd(1:IX,1:NLAY,1), cnvw, cnvc, & | ||
& xlat, xlon, slmsk, cldcov, dz, delp, & | ||
& IX, NLAY, NLP1, dzlay, & | ||
& cldtot, cldcnv, lcrick, lcnorm, con_ttp, & ! inout | ||
& cld_frac, cld_lwp, cld_reliq, cld_iwp, & ! --- outputs | ||
& cld_reice,cld_rwp, cld_rerain,cld_swp, & | ||
& cld_resnow) | ||
! | ||
! rsun add an option for gfdlmp when do_sat_adj = .false. and do_qa =.false. |
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.
Is this comment necessary?
! else if (imp_physics == imp_physics_gfdl_v3) then | ||
if(imp_physics == imp_physics_gfdl_v3) then | ||
|
||
!rsun attention to flipping (same as v1 driver: need to be from top to bottom : 1,km) |
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.
A few debug sections with rsun signature could be cleaned up.
kk = levs-k+1 | ||
do i=1,im | ||
|
||
!rsun add update the following fields only for v1 |
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.
Ditto
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.
Some work needs to be done to harmonize this implementation with its predecessor.
- It appears the the fv_sat_adj module could be shared between v1 and v3, rather than maintaining separate versions for each implementation.
- As far as I can tell, there are no changes to the interstitials other than passing a new control switch for the v3 version. Since the decision to use v3 will be at the SDF level, there is no need for a new switch to distinguish versions. If v3 specific coupling is needed at some point, then a new switch could be introduced then.
- The v1 and v3 implementations are in their own subdirectories, but the driver and modules use different naming conventions in each: gfdl_cloud_microphysics/module_gfdl_cloud_microphysics for v1 and gfdl_cld_mp_v3/module_gfdl_cld_mp for v3. I would suggest using something consistent between the two.
real(kind=kind_dyn) :: fac_smlt, fac_r2g, fac_i2s, fac_imlt, fac_l2r, fac_v2l, fac_l2v | ||
real(kind=kind_dyn) :: factor, qim, tice0, c_air, c_vap, dw | ||
!real(kind=kind_dyn) :: qi_gen, sat_adj0 | ||
real :: qi_gen, sat_adj0 |
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.
Change to real(kind=kind_dyn)
! wrf / wsm6 ice initiation scheme; qi_crt = qi_gen * min (qi_lim, 0.1 * tmp) / den | ||
! ----------------------------------------------------------------------- | ||
|
||
qi_gen = 1.82e-6 !< max cloud ice generation during remapping step |
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.
Why not put sat_adj0 and qi_gen in module_gfdl_cld_mp? That would make this module useable across both GFDL MP implementations.
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.
|
||
! DH* TODO: CLEANUP, all of these should be coming in through the argument list | ||
! parameters | ||
real(kind=kind_phys), parameter :: one = 1.0d0 |
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.
Remove the "d0" suffix from these three declarations.
If these parameters need to be of type double, then bring in the correct parameterized working type for double
-use machine, only: kind_phys, kind_dyn
+use machine, only: kind_phys, kind_dyn, kind_dbl_prec
And declare the parameter using that type:
-real(kind=kind_phys), parameter :: one = 1.0d0
+real(kind=kind_dbl_prec), parameter :: one = 1.0
kk = levs-k+1 | ||
do i=1,im | ||
|
||
if (imp_physics == imp_physics_gfdl_v3) then |
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.
Why not just do this check once at the beginning of the code? Right now it's performed three times within the scheme. It would be best to return an error before beginning computations.
! physics constants | ||
! ----------------------------------------------------------------------- | ||
|
||
real, parameter :: grav = 9.80665 ! acceleration due to gravity (m/s^2), ref: IFS |
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.
These constants should be passed into the scheme from the host.
@RuiyuSun In CCPP physics meeting, we just talked about this PR#162, you need to provide answers to the questions from @dustinswales . Thanks |
@Qingfu-Liu @dustinswales I have been working on a solution. Thanks @dustinswales for pointing this out. |
@dustinswales As you pointed out fv_sat_adj and fv_sat_adj_v3 used parameters from two different modules (v1 and v3). If v1 and v3 share one fv_sat_adj (fast physics) from which module the parameters should be used? Thanks. |
…ng sfc fluxes for DEPHYv1 format ccpp-physics PR162: ufs-community/ccpp-physics#162 fv3atm PR779: NOAA-EMC/fv3atm#779 ccppscm PR428: https://github.com/NCAR/ccpp-scm/pull/428/files modified: ../../ccpp/config/ccpp_prebuild_config.py modified: ../../ccpp/physics modified: ../../ccpp/physics_namelists/input_GFS_v17_p8_ugwpv1_C384.nml new file: ../../ccpp/physics_namelists/input_GFS_v17_p8_ugwpv1_C768.nml new file: ../../ccpp/physics_namelists/input_GFS_v17_p8_ugwpv1_gfdlmpv1_C384.nml new file: ../../ccpp/physics_namelists/input_GFS_v17_p8_ugwpv1_gfdlmpv1_C768.nml new file: ../../ccpp/physics_namelists/input_GFS_v17_p8_ugwpv1_gfdlmpv3_C384.nml new file: ../../ccpp/physics_namelists/input_GFS_v17_p8_ugwpv1_gfdlmpv3_C768.nml new file: ../../ccpp/physics_namelists/input_GFS_v17_p8_ugwpv1_nssl_C384.nml new file: ../../ccpp/physics_namelists/input_GFS_v17_p8_ugwpv1_nssl_C768.nml new file: ../../ccpp/suites/suite_SCM_GFS_v16_gfdlmpv3.xml new file: ../../ccpp/suites/suite_SCM_GFS_v17_p8_ugwpv1_gfdlmpv1.xml new file: ../../ccpp/suites/suite_SCM_GFS_v17_p8_ugwpv1_gfdlmpv3.xml new file: ../../ccpp/suites/suite_SCM_GFS_v17_p8_ugwpv1_nssl.xml modified: ../etc/Hera_setup_intel.sh modified: CCPP_typedefs.F90 modified: CCPP_typedefs.meta modified: GFS_typedefs.F90 modified: GFS_typedefs.meta modified: run_scm.py modified: scm_input.F90 modified: suite_info.py
…ng sfc fluxes for DEPHYv1 format ccpp-physics PR162: ufs-community/ccpp-physics#162 fv3atm PR779: NOAA-EMC/fv3atm#779 ccppscm PR428: https://github.com/NCAR/ccpp-scm/pull/428/files modified: ../config/ccpp_prebuild_config.py modified: ../physics new file: input_GFS_v17_p8_ugwpv1_C1152.nml modified: input_GFS_v17_p8_ugwpv1_C192.nml new file: input_GFS_v17_p8_ugwpv1_C3072.nml modified: input_GFS_v17_p8_ugwpv1_C384.nml new file: input_GFS_v17_p8_ugwpv1_C768.nml modified: input_GFS_v17_p8_ugwpv1_C96.nml new file: input_GFS_v17_p8_ugwpv1_gfdlmpv1_C384.nml new file: input_GFS_v17_p8_ugwpv1_gfdlmpv1_C768.nml new file: input_GFS_v17_p8_ugwpv1_gfdlmpv3_C384.nml new file: input_GFS_v17_p8_ugwpv1_gfdlmpv3_C768.nml new file: input_GFS_v17_p8_ugwpv1_nssl_C384.nml new file: input_GFS_v17_p8_ugwpv1_nssl_C768.nml new file: ../suites/suite_SCM_GFS_v16_gfdlmpv3.xml new file: ../suites/suite_SCM_GFS_v17_p8_ugwpv1_gfdlmpv1.xml new file: ../suites/suite_SCM_GFS_v17_p8_ugwpv1_gfdlmpv3.xml new file: ../suites/suite_SCM_GFS_v17_p8_ugwpv1_nssl.xml modified: ../../scm/etc/Hera_setup_intel.sh modified: ../../scm/src/CCPP_typedefs.F90 modified: ../../scm/src/CCPP_typedefs.meta modified: ../../scm/src/GFS_typedefs.F90 modified: ../../scm/src/GFS_typedefs.meta modified: ../../scm/src/run_scm.py modified: ../../scm/src/scm_input.F90 modified: ../../scm/src/suite_info.py
…ng sfc fluxes for DEPHYv1 format ccpp-physics PR162: ufs-community/ccpp-physics#162 fv3atm PR779: NOAA-EMC/fv3atm#779 ccppscm PR428: https://github.com/NCAR/ccpp-scm/pull/428/files modified: ccpp/config/ccpp_prebuild_config.py modified: ccpp/physics new file: ccpp/physics_namelists/input_GFS_v16_gfdlmpv3.nml new file: ccpp/physics_namelists/input_GFS_v17_p8_ugwpv1_C1152.nml modified: ccpp/physics_namelists/input_GFS_v17_p8_ugwpv1_C192.nml new file: ccpp/physics_namelists/input_GFS_v17_p8_ugwpv1_C3072.nml modified: ccpp/physics_namelists/input_GFS_v17_p8_ugwpv1_C384.nml new file: ccpp/physics_namelists/input_GFS_v17_p8_ugwpv1_C768.nml modified: ccpp/physics_namelists/input_GFS_v17_p8_ugwpv1_C96.nml new file: ccpp/physics_namelists/input_GFS_v17_p8_ugwpv1_gfdlmpv1_C384.nml new file: ccpp/physics_namelists/input_GFS_v17_p8_ugwpv1_gfdlmpv1_C768.nml new file: ccpp/physics_namelists/input_GFS_v17_p8_ugwpv1_gfdlmpv3_C384.nml new file: ccpp/physics_namelists/input_GFS_v17_p8_ugwpv1_gfdlmpv3_C768.nml new file: ccpp/physics_namelists/input_GFS_v17_p8_ugwpv1_nssl_C384.nml new file: ccpp/physics_namelists/input_GFS_v17_p8_ugwpv1_nssl_C768.nml new file: ccpp/suites/suite_SCM_GFS_v16_gfdlmpv3.xml new file: ccpp/suites/suite_SCM_GFS_v17_p8_ugwpv1_gfdlmpv1.xml new file: ccpp/suites/suite_SCM_GFS_v17_p8_ugwpv1_gfdlmpv3.xml new file: ccpp/suites/suite_SCM_GFS_v17_p8_ugwpv1_nssl.xml modified: scm/etc/Hera_setup_intel.sh modified: scm/src/CCPP_typedefs.F90 modified: scm/src/CCPP_typedefs.meta modified: scm/src/GFS_typedefs.F90 modified: scm/src/GFS_typedefs.meta modified: scm/src/run_scm.py modified: scm/src/scm_input.F90 modified: scm/src/suite_info.py
…ng sfc fluxes for DEPHYv1 format ccpp-physics PR162: ufs-community/ccpp-physics#162 fv3atm PR779: NOAA-EMC/fv3atm#779 ccppscm PR428: https://github.com/NCAR/ccpp-scm/pull/428/files modified: ../config/ccpp_prebuild_config.py modified: ../physics new file: input_GFS_v16_gfdlmpv3.nml new file: input_GFS_v17_p8_ugwpv1_C1152.nml modified: input_GFS_v17_p8_ugwpv1_C192.nml new file: input_GFS_v17_p8_ugwpv1_C3072.nml modified: input_GFS_v17_p8_ugwpv1_C384.nml new file: input_GFS_v17_p8_ugwpv1_C768.nml modified: input_GFS_v17_p8_ugwpv1_C96.nml new file: input_GFS_v17_p8_ugwpv1_gfdlmpv1_C384.nml new file: input_GFS_v17_p8_ugwpv1_gfdlmpv1_C768.nml new file: input_GFS_v17_p8_ugwpv1_gfdlmpv3_C768.nml new file: input_GFS_v17_p8_ugwpv1_nssl_C384.nml new file: input_GFS_v17_p8_ugwpv1_nssl_C768.nml new file: ../suites/suite_SCM_GFS_v16_gfdlmpv3.xml new file: ../suites/suite_SCM_GFS_v17_p8_ugwpv1_gfdlmpv1.xml new file: ../suites/suite_SCM_GFS_v17_p8_ugwpv1_gfdlmpv3.xml new file: ../suites/suite_SCM_GFS_v17_p8_ugwpv1_nssl.xml modified: ../../scm/etc/Hera_setup_intel.sh modified: ../../scm/src/CCPP_typedefs.F90 modified: ../../scm/src/CCPP_typedefs.meta modified: ../../scm/src/GFS_typedefs.F90 modified: ../../scm/src/GFS_typedefs.meta modified: ../../scm/src/run_scm.py modified: ../../scm/src/scm_input.F90 modified: ../../scm/src/suite_info.py
…ng sfc fluxes for DEPHYv1 format ccpp-physics PR162: ufs-community/ccpp-physics#162 fv3atm PR779: NOAA-EMC/fv3atm#779 ccppscm PR428: https://github.com/NCAR/ccpp-scm/pull/428/files modified: ../../ccpp/config/ccpp_prebuild_config.py modified: ../../ccpp/physics new file: ../../ccpp/physics_namelists/input_GFS_v16_gfdlmpv3.nml new file: ../../ccpp/physics_namelists/input_GFS_v17_p8_ugwpv1_C1152.nml modified: ../../ccpp/physics_namelists/input_GFS_v17_p8_ugwpv1_C192.nml new file: ../../ccpp/physics_namelists/input_GFS_v17_p8_ugwpv1_C3072.nml modified: ../../ccpp/physics_namelists/input_GFS_v17_p8_ugwpv1_C384.nml new file: ../../ccpp/physics_namelists/input_GFS_v17_p8_ugwpv1_C768.nml modified: ../../ccpp/physics_namelists/input_GFS_v17_p8_ugwpv1_C96.nml new file: ../../ccpp/physics_namelists/input_GFS_v17_p8_ugwpv1_gfdlmpv1_C384.nml new file: ../../ccpp/physics_namelists/input_GFS_v17_p8_ugwpv1_gfdlmpv1_C768.nml new file: ../../ccpp/physics_namelists/input_GFS_v17_p8_ugwpv1_gfdlmpv3_C768.nml new file: ../../ccpp/physics_namelists/input_GFS_v17_p8_ugwpv1_nssl_C384.nml new file: ../../ccpp/physics_namelists/input_GFS_v17_p8_ugwpv1_nssl_C768.nml new file: ../../ccpp/suites/suite_SCM_GFS_v16_gfdlmpv3.xml new file: ../../ccpp/suites/suite_SCM_GFS_v17_p8_ugwpv1_gfdlmpv1.xml new file: ../../ccpp/suites/suite_SCM_GFS_v17_p8_ugwpv1_gfdlmpv3.xml new file: ../../ccpp/suites/suite_SCM_GFS_v17_p8_ugwpv1_nssl.xml modified: ../etc/Hera_setup_intel.sh modified: CCPP_typedefs.F90 modified: CCPP_typedefs.meta modified: GFS_typedefs.F90 modified: GFS_typedefs.meta modified: run_scm.py modified: scm_input.F90 modified: scm_type_defs.F90 modified: suite_info.py
Closed in favor of #195 |
GFDL MP directory is re-organized. GFLD directory is removed in the MP directory. Two new directories are added, GFDL_2019_v1 for GFDLMP v1, and GFDL_2022_v3 for GFDLMP v3. Files in the original GFDL directory are moved to GFDL_2019_v1. The purpose is to add GFDL MP v3. The differences between the GFDLMP v1 and v3 are explained from page 13 to 17 in UFS_Physics_Zhou.pdf at this folder. This presentation was given by Linjiong at the 1st Annual UFS Physics Workshop. GFDL MP v3 is added in GFDL_2022_v3.