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

"to include GF updates in GSDv0beta4" #338

Merged
merged 5 commits into from
Oct 24, 2019
Merged

"to include GF updates in GSDv0beta4" #338

merged 5 commits into from
Oct 24, 2019

Conversation

haiqinli
Copy link
Collaborator

To include Grell-Freitas convection update in regression test of GSDv0beta4/GSDv0beta4mRUC, which has improved forecast skill.
1). Use FCT to represent cloud subsidence effect of cloud water/ice;
2). modified convective cloud detrainment;
3). to include number concentrations;
2). to include rain evaporation below cloud base for deep and congestus convection.

Copy link
Collaborator

@climbfuji climbfuji left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I cannot say much about the physics changes in the GF scheme itself, but regarding GFS_suite_interstitial_4: please do not pass in the Model/GFS_control DDT. You only need Model%imfdeepcnv, and you can pass this in instead using the following metadata:

[imfdeepcnv]
  standard_name = flag_for_mass_flux_deep_convection_scheme
  long_name = flag for mass-flux deep convection scheme
  units = flag
  dimensions = ()
  type = integer
  intent = in
  optional = F

@haiqinli
Copy link
Collaborator Author

Dom, thank you very much for your suggestions. I have updated the input variable of imfdeepcnv for GFS_suite_interstitial.F90 (meta) accordingly.

@climbfuji
Copy link
Collaborator

I think I understand by now what the code changes are about, running a few tests on hera, cheyenne and my macbook before merging. Thanks for making the changes that I requested.

Copy link
Collaborator

@climbfuji climbfuji left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverting my previous approval. After adding the changes, all regression tests in rt_ccpp_gsd.conf that include GF segfault (all tests w/o GF still run fine).

@haiqinli
Copy link
Collaborator Author

1). correct the number of tracers (ntrac) for gq0
2). initialize dtime_max for FCT
2). stricter condition of rain_evap_blew_cloudbase

Passed the regression test of rt_ccpp_gsd.conf with the above updates.

@climbfuji
Copy link
Collaborator

Associated PR: https://github.com/NCAR/NEMSfv3gfs/pull/272, see this PR for testing information.

@haiqinli
Copy link
Collaborator Author

Update cu_gf_driver.F90 to pass the regression test case of ccpp_gsd_noah_repro. Now all the cases in rt_ccpp_gsd.conf passed the regression test of static build and dynamic build.

@climbfuji
Copy link
Collaborator

Thanks, Haiqin! I will give this a try as well. I do not understand how the change in your recent commit can cause such an error, but let's see how the testing goes!

@climbfuji
Copy link
Collaborator

I pulled this PR into the latest version of gsd/develop and ran the rt_ccpp_gsd.conf tests in create and verify mode. All tests now pass. The change made in 3a28055 doesn't give a clear explanation as to why the fv3_ccpp_gsd_noah tests failed before making this change, however this is beyond the scope of this PR. I am going to merge this PR and update the submodule pointer in NEMSfv3gfs/gsd/develop afterwards.

However, I would like to note that during my investigation of the above issues, I ran all tests in rt_ccpp_gsd.conf in DEBUG (instead of REPRO) mode, and the following three tests crash:

fv3_ccpp_gf_thompson
fv3_ccpp_gsd
fv3_ccpp_gsd_noah

The crash occurs for the same reason in all three tests, an out of bounds read of a lookup table in Thompson MP:

  3: forrtl: severe (408): fort: (2): Subscript #2 of the array T_EFRW has value 101 which is greater than the upper bound of 100
  3:
  3: Image              PC                Routine            Line        Source
  3: fv3.exe            000000000647D3C0  Unknown               Unknown  Unknown
  3: fv3.exe            00000000041D7ECE  module_mp_thompso        2060  module_mp_thompson.F90
  3: fv3.exe            00000000041847B6  module_mp_thompso        1229  module_mp_thompson.F90
  3: fv3.exe            0000000003F15F04  mp_thompson_mp_mp         347  mp_thompson.F90
  3: fv3.exe            000000000356512F  ccpp_fv3_gsd_noah        1491  ccpp_FV3_GSD_noah_physics_cap.F90
  3: fv3.exe            0000000002A104B2  ccpp_static_api_m         349  ccpp_static_api.F90
  3: fv3.exe            00000000005E4DEA  ccpp_driver_mp_cc         234  CCPP_driver.F90
  3: libiomp5.so        00002AF90E592A43  __kmp_invoke_micr     Unknown  Unknown
  3: libiomp5.so        00002AF90E5562C6  __kmp_fork_call       Unknown  Unknown
  3: libiomp5.so        00002AF90E515BB0  __kmpc_fork_call      Unknown  Unknown
  3: fv3.exe            00000000005E25FE  ccpp_driver_mp_cc         214  CCPP_driver.F90
  3: fv3.exe            00000000004FC207  atmos_model_mod_m         366  atmos_model.F90
  3: fv3.exe            00000000004EF0FA  module_fcst_grid_         705  module_fcst_grid_comp.F90
  3: libesmf.so         00002AF9098F5E41  _ZN5ESMCI6FTable1        2010  ESMCI_FTable.C
  3: libesmf.so         00002AF9098F9A26  ESMCI_FTableCallE         746  ESMCI_FTable.C
  3: libesmf.so         00002AF909DE579A  _ZN5ESMCI2VM5ente        1178  ESMCI_VM.C
  3: libesmf.so         00002AF9098F7477  c_esmc_ftablecall         898  ESMCI_FTable.C
  3: libesmf.so         00002AF90A028521  esmf_compmod_mp_e        1209  ESMF_Comp.F90
  3: libesmf.so         00002AF90A2E57C4  esmf_gridcompmod_        1889  ESMF_GridComp.F90
  3: fv3.exe            00000000004CC4BF  fv3gfs_cap_mod_mp         988  fv3_cap.F90
  3: libesmf.so         00002AF909CC3080  _ZN5ESMCI13Method         287  ESMCI_MethodTable.C
...

The line in question is:

          Ef_rw = t_Efrw(idx, INT(mvd_c(k)*1.E6))

The variable mvd_c represents the diameter of cloud particles. I do not have sufficient understanding of whether a value of 101 (or 104 as in one of the other crashes) is completely unreasonable (given that the table goes to index 100), but in any case there should be a guard in the code that prevents out-of-bounds reads. I will continue to investigate this issue after the merge of the current PR.

@haiqinli @joeolson42 @tanyasmirnova @hannahcbarnes

@climbfuji climbfuji merged commit 4a17324 into NCAR:gsd/develop Oct 24, 2019
@climbfuji
Copy link
Collaborator

Regression test logs on hera/intel attached.

rt_ccpp_gsd_verify.log
rt_ccpp_gsd_create.log

climbfuji added a commit to climbfuji/ccpp-physics that referenced this pull request Nov 26, 2019
commit 7f530ed
Merge: e0d5f16 b492f2e
Author: Dom Heinzeller <dom.heinzeller@icloud.com>
Date:   Thu Nov 21 15:40:20 2019 -0700

    Merge pull request NCAR#356 from tanyasmirnova/ruc_land_ice_v1

    Added the capability to use climatological LAI in RUC LSM

commit b492f2e
Merge: bd32702 e0d5f16
Author: tanyasmirnova <tanya.smirnova@noaa.gov>
Date:   Wed Nov 20 20:36:42 2019 +0000

    Merge branch 'gsd/develop' of https://github.com/NCAR/ccpp-physics into ruc_land_ice_v1

commit bd32702
Author: tanyasmirnova <tanya.smirnova@noaa.gov>
Date:   Wed Nov 20 20:29:42 2019 +0000

    Added the capability to use a Leaf Area Index (LAI) climatology in RUC LSM.
    Variables xlaixy and rdlai are added to the argument list of lsm_ruc_run.
    If rdlai=.true. in the physics namelist, then the LAI climatology will be passed into
    the RUC LSM and used instead of look-up table value for a given vegetation type.

commit e0d5f16
Merge: 660ede7 e4d291e
Author: Dom Heinzeller <dom.heinzeller@icloud.com>
Date:   Sat Nov 2 05:47:40 2019 +0900

    Merge pull request NCAR#349 from tanyasmirnova/ruc_land_ice_v1

    This commit has a fix for a problem of cloud-radiation coupling with the use of MYNN PBL.

commit e4d291e
Author: tanyasmirnova <tanya.smirnova@noaa.gov>
Date:   Fri Nov 1 16:47:58 2019 +0000

    This commit has a fix for a problem of cloud-radiation coupling with the
    use of MYNN PBL.
    The problem: the first call to the radiation happens before
    the first call to MYNN PBL, therefore CLDFRA_BL=0 in the first call to mynnrad_pre,
    and zero values are sent to array cldcov(:,:).
    When cloud cover is zero, the RRTMG radiation thinks that there are no clouds at all.
    The erroneous cloud-free LW and SW downward radiation fluxes affect the first
    hour of itegration, and cause siginificant cooling in the ploar regions, and too warm
    land surface temperature from cloud-free SW radiation.
    The fix: the fist call to mynnrad_pre should be skipped, so that cloud cover - cldcov(:,:) - is not
    overwritten by zero values of MYNN subgrid-clouds. In this case the initial cloud cover
    is computed in progcld5 from initial cloud water mixing ratio,
    relative humidity and specific humidity in the layer.
    Starting with the second call to the rrtmg radiation, the MYNN subgrid clouds are used.

commit 660ede7
Merge: 4a17324 db9742d
Author: Dom Heinzeller <dom.heinzeller@icloud.com>
Date:   Mon Oct 28 12:38:54 2019 +0900

    Merge pull request NCAR#344 from tanyasmirnova/ruc_land_ice_v1

    Sync RUC LSM code with the version used in RAP/HRRR

commit db9742d
Author: tanyasmirnova <tanya.smirnova@noaa.gov>
Date:   Thu Oct 24 22:14:13 2019 +0000

    Sync the RUC LSM code with the version in RAPv5/HRRRv4.
    Some clean-up in sfc_drv_ruc.F90.

commit 27eb089
Merge: fa3c1d3 4a17324
Author: tanyasmirnova <tanya.smirnova@noaa.gov>
Date:   Thu Oct 24 22:03:14 2019 +0000

    Merge branch 'gsd/develop' of https://github.com/NCAR/ccpp-physics into ruc_land_ice_v1

commit 4a17324
Merge: 543f640 3a28055
Author: Dom Heinzeller <dom.heinzeller@icloud.com>
Date:   Thu Oct 24 10:53:19 2019 +0900

    Merge pull request NCAR#338 from haiqinli/gsd/develop-hli

    "to include GF updates in GSDv0beta4"

commit 3a28055
Author: Haiqin.Li <Haiqin.Li@noaa.gov>
Date:   Wed Oct 23 21:13:25 2019 +0000

    "update to pass the ccpp_gsd_noah_repro regression test case"

commit 0711b82
Author: Haiqin.Li <Haiqin.Li@noaa.gov>
Date:   Sun Oct 20 04:54:18 2019 +0000

    "update to pass ccpp_gsd regression test"

commit fa3c1d3
Author: tanyasmirnova <tanya.smirnova@noaa.gov>
Date:   Thu Oct 17 16:28:55 2019 +0000

    1. Use fraction of frozen precipitation SR directly from Thompson MP.
    2. Bug fix in liquid precipitation and frozen fraction  - SRFLAG. This
       bug was producing 1.e-3 factor maller values of SRFLAG.
    3. Modification to comment for precipitation in sfc_drv_ruc.F90

commit a59d416
Author: Haiqin.Li <Haiqin.Li@noaa.gov>
Date:   Sun Oct 13 20:40:44 2019 +0000

    "clean the code"

commit 4ca463c
Author: Haiqin.Li <Haiqin.Li@noaa.gov>
Date:   Sun Oct 13 20:35:36 2019 +0000

    "update input of imfdeepcnv following Dom's suggestions"

commit 14c1c5b
Author: Haiqin.Li <Haiqin.Li@noaa.gov>
Date:   Fri Sep 27 18:04:33 2019 +0000

    "to include GF updates in GSDv0beta4"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants