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

Correct initialization of soil liquid water content for Noah-MP #1244

Merged
merged 1 commit into from
Dec 18, 2024

Conversation

ldfowler58
Copy link
Contributor

This PR corrects the computation of the soil temperature (TSLB) in the Noah-MP land surface scheme. In this PR, we added the initialization of the soil liquid water (SH2O) in subroutine noahmp_init in module mpas_atmphys_lsm_noahmpinit.F prior to calling subroutine NoahmpInitMain.

Prior to adding the initialization of SH2O, running Noah-MP led TSLB to be set to ConstFreezePoint (273.16 K) in SoilSnowWaterPhaseChangeMod.F90 although the input TSLB was greater than ConstFreezePoint on the very first time step. This error occurred because TSLB is calculated as a function of the soil liquid (MassWatLiqTmp) and ice (MassWatIceTmp) water mass, and MassWatLiqTmp is always equal to 0 when not properly initializing SH2O.

@mgduda mgduda changed the title * Correct initialization of soil liquid water content for Noah-MP Correct initialization of soil liquid water content for Noah-MP Nov 1, 2024
Copy link
Contributor

@mgduda mgduda left a comment

Choose a reason for hiding this comment

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

I think it would be very helpful to add some comments to the code to explain what each branch is doing. For example, which cells are affected by this condition

       if(ivgtyp(i) == mpas_noahmp%isice_table .and. xice(i) .le. 0._RKIND) then

and which are affected by this condition

       if(bexp.gt.0. .and. smcmax.gt.0. .and. psisat.gt.0.) then

?
It could also help to give names (and explanatory comments) for the constants used in the code (263.15, 273.149, 0.02).

src/core_atmosphere/physics/mpas_atmphys_lsm_noahmpinit.F Outdated Show resolved Hide resolved
…ed the initialization

  of variable sh2o (soil liquid water) prior to calling subroutine NoahmpInitMain in
  subroutine noahmp_init.
@ldfowler58 ldfowler58 force-pushed the NSF-MPAS/noahmp_fix_tslb branch from e04e590 to 4ba48ba Compare November 2, 2024 13:56
@ldfowler58
Copy link
Contributor Author

I corrected the index n to ns in the computation of smois. I added a couple of comments to the initialization, as in the non-refactored version of Noah-MP (also refer to module_sf_noahmpdrv.F in WRF/phys).

@mgduda mgduda self-requested a review December 14, 2024 00:58
@mgduda mgduda merged commit e9efa0e into MPAS-Dev:hotfix-v8.2.3 Dec 18, 2024
@CharlesZheZhang
Copy link

Hi, dear developers, I am currently testing MPAS-NoahMP and find sh2o=0 for all the land points in init.nc after running init_atmosphere. This is related to sh2o=0 for all land points, but smois field is good. See attached figures.
sh2o_smois_init nc

This may be related to setting sh2o to 0 for all land points in mpas_atmphys_initialize_real.F https://github.com/ldfowler58/MPAS-Model/blob/91bc0882689b3e60803e5df90636d7713e62cc2c/src/core_atmosphere/physics/mpas_atmphys_initialize_real.F#L473

So it needs an initial value for sh2o from sw_input, similar for smois from sm_input, also similar to real in WRF: https://github.com/wrf-model/WRF/blob/d66e442fccc04111067e29274c9f9eaccc3cef28/share/module_soil_pre.F#L1689

So, if sh2o is correctly outputed to init.nc and read in mpas_atmphys_lsm_noahmpinit.F,
this change starting from L398

!--- initialization of the soil liquid water content:

may not be necessary - before calling NoahmpInitMain

@cenlinhe

@cenlinhe
Copy link

cenlinhe commented Feb 7, 2025

I will double check this.

@ldfowler58
Copy link
Contributor Author

Thanks for finding that "bug". I will work on it as soon as I can. We have a couple of bugs that we fixed and need to make available in the next MPAS bug fix release.

@CharlesZheZhang
Copy link

Following on this PR:
Priori to adding this commit, the mpas_noahmp%sh2o field is correctly initialized in calling NoahmpInitMain:

But they are not correctly assign to sh2o, tslb, smois in these lines:

mpas_noahmp%sh2o(i,ns) = sh2o(ns,i)

I had some print out of the sh2o, tslb, smois fields before and after calling NoahmpInitMain and it shows the mpas_noahmp%sh2o is initialized after the call, but is not assigned to sh2o.
image

So it seems that the additions in this commit are redundant (L398-433), but the changes from L463-465 are critical!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants