Skip to content

Move sfc emis alb calculation to its own scheme and z0 composite consistent#627

Merged
climbfuji merged 57 commits into
NCAR:mainfrom
climbfuji:move_sfc_emis_alb_calculation_to_its_own_scheme_and_z0_composite_consistent
May 27, 2021
Merged

Move sfc emis alb calculation to its own scheme and z0 composite consistent#627
climbfuji merged 57 commits into
NCAR:mainfrom
climbfuji:move_sfc_emis_alb_calculation_to_its_own_scheme_and_z0_composite_consistent

Conversation

@climbfuji
Copy link
Copy Markdown
Collaborator

@climbfuji climbfuji commented Apr 15, 2021

Description

  • Initialize surface albedo and surface emissivity in GFS_phys_time_vary_init for both NoahMP and RUC LSM (previously only for NoahMP)
  • Update surface albedo and surface emissivity calculation. Move calls to these radiation-scheme independent codes to its own CCPP scheme. From @tanyasmirnova with modifications from @climbfuji.
  • Consistent calculation of surface fluxes and surface roughness length in GFS_surface_composites. For now, the stability routine from GFS's sfc_diff code is used in GFS_surface_composites_post, independent of which surface layer scheme gets used. From @benwgreen with modifications from @climbfuji.
  • Bugfixes to several schemes (RRTMGP, MYNSFC, RUCLSM) to use the correct horizontal dimension in the CCPP metadata files.

Note. During development and testing, we added an option ORIG_ALB_EMS_OPTION_ONE to radiation_surface.f. This CPP directive can be enabled and should allow us to get identical answers for most of the regression tests compared tto the existing baseline. This provides us with a more controlled way to understand the differences in the regression tests.
The old code block and ORIG_ALB_EMS_OPTION_ONE logic will be removed prior to the final regression testing and merging of the code. More information will be given in ufs-community/ufs-weather-model#529. UPDATE This code has been removed.

Testing

See ufs-community/ufs-weather-model#529

Dependencies

#627
NCAR/ccpp-framework#366
NOAA-EMC/ufsatm#285
ufs-community/ufs-weather-model#529

tanyasmirnova and others added 6 commits April 16, 2021 18:49
lsm_ruc_init. This is needed for MYNN surface layer scheme at the first
time step.
…composites_post, add necessary new interstitial variables, clean up old/unused interstitial variables
…ve_sfc_emis_alb_calculation_to_its_own_scheme_and_z0_composite_consistent
Comment thread physics/GFS_surface_composites.F90 Outdated
! BWG, 2021/02/25: cmm=cd*wind, chh=cdq*wind, so use composite cd, cdq
q0 = max( q1(i), qmin )
rho = prsl1(i) / (rd*t1(i)*(one + rvrdm1*q0))
cmm(i) = cd(i)*wind(i) !txl*cmm_lnd(i) + txi*cmm_ice(i) + txo*cmm_wat(i)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The cmm and chh here were supposed to be based off the composite values of cd and cdq from the "fourth call" to the stability subroutine -- so shouldn't Lines 444-445 go further down?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Good point!

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Done

! BWG, 2021/02/25: Need to change composite skin temperature base on ULW (Fanglin)
!tsfc(i) = txl*tsfc_lnd(i) + txi*tice(i) + txo*tsfc_wat(i)
tsfc(i) = ( txl * cdq_lnd(i) * tsfc_lnd(i) &
+ txi * cdq_ice(i) * tice(i) & ! DH* Ben had tsurf_ice(i), but GFS_surface_composites_post_run uses tice instead
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We may need to double-check with Moorthi. I'm not tagging him yet though.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

These different ice temperatures are a real mess. II will try to read through the code to see what the difference is.

Comment thread physics/GFS_surface_composites.F90 Outdated
! layer parameterization being used - to be extended in the future !
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

! BWG, 2021/02/25: Need to change composite skin temperature base on ULW (Fanglin)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Upon further thought, this comment may now be misleading. Fanglin had multiple ideas on how to composite surface temperature (besides simple arithmetic mean). For the instance of "stability", we are going with Mike Barlage's method. We should double-check with him to see if he wants this composite method to be used everywhere, or just for sfc_diff.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Let me know if I should remove the comment, please.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Might as well.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

done

Comment thread physics/GFS_surface_composites.F90 Outdated
+ txo * cdq_wat(i) * tsurf_wat(i)) &
/ (txl * cdq_lnd(i) + txi * cdq_ice(i) + txo * cdq_wat(i) )

virtfac = one + rvrdm1 * max(q1(i),qmin)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Could this line be moved up to go right around Line 442? That would consolidate code (we can use "q0 = max(q1(i),qmin)" ).

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

done

Comment thread physics/GFS_surface_composites.F90 Outdated
stress(i), uustar(i))

! BWG, 2021/02/25: cmm=cd*wind, chh=cdq*wind, so use composite cd, cdq
q0 = max( q1(i), qmin )
Copy link
Copy Markdown
Collaborator

@benwgreen benwgreen Apr 19, 2021

Choose a reason for hiding this comment

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

With this new change (moving down these lines) I think you can move the q0 line to go right before Line 478 which allows 478 to be virtfac = one + rvrdm1 * q0
Then, Line 498 can be rho = prsl1(i) / (rd * t1 * virtfac) ... right?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

That is what I did

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Sorry, for some reason it was showing up incorrectly. Once I refreshed again I see that you consolidated as suggested.

@climbfuji
Copy link
Copy Markdown
Collaborator Author

I echoed what fanglin said. Maybe there are some issues for the solar zenith angel dependence calculation over ocean.
For my tests, I use the main CCPP-physics branch (HEAD detached at 1fd62ea) as a control, and move_sfc_emis_alb_calculation_to_its_own_scheme_and_z0_composite_consistent (HEAD detached at 38f28a2) for the test case. I didn't use fractional grid for both runs.

@climbfuji Dom, could you please confirm that the suite definitions in the code used by Helin is correct?

@HelinWei-NOAA please post you suite definition file or share a link to the file on hera (or any other RDHPC platform), please. Thanks!

@HelinWei-NOAA
Copy link
Copy Markdown
Contributor

HelinWei-NOAA commented May 20, 2021 via email

@tanyasmirnova
Copy link
Copy Markdown
Collaborator

@HelinWei-NOAA @climbfuji The suite definition looks good to me. Thank you!

tanyasmirnova and others added 5 commits May 25, 2021 13:41
…on_to_its_own_scheme_and_z0_composite_consistent_tgs

Removed SNET.
…_sfc_emis_alb_calculation_to_its_own_scheme_and_z0_composite_consistent
…t, _timestep_init, _timestep_final, _final routines; use horizontal_loop_extent in _run routines
@climbfuji
Copy link
Copy Markdown
Collaborator Author

@grantfirl @tanyasmirnova @benwgreen @SMoorthi-emc @HelinWei-NOAA @JulieSchramm @llpcarson @barlage @yangfanglin @shansun6 @dustinswales Finally this PR is ready to commit. Please have a(nother) look if you can/want, since the changes are substantial. Thanks a lot.

Copy link
Copy Markdown
Collaborator

@tanyasmirnova tanyasmirnova left a comment

Choose a reason for hiding this comment

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

@climbfuji Thank you very much for your tremendous work on this very complicated PR.

@benwgreen
Copy link
Copy Markdown
Collaborator

benwgreen commented May 27, 2021

@climbfuji Thank you very much for your tremendous work on this very complicated PR.

For some reason I'm not a formal reviewer, but I am okay with the code. I owe you (@climbfuji) a beer or 5 for all of the hard work you did -- much appreciated!

@climbfuji
Copy link
Copy Markdown
Collaborator Author

@climbfuji Thank you very much for your tremendous work on this very complicated PR.

For some reason I'm not a formal reviewer, but I am okay with the code. I owe you (@climbfuji) a beer or 5 for all of the hard work you did -- much appreciated!

Actually, you are listed as a reviewer, just need to go to the 'files changed' tab and then you should see the review button. I'd love to have a beer or five with everyone involved in this PR!

Copy link
Copy Markdown
Collaborator

@ShanSunNOAA ShanSunNOAA left a comment

Choose a reason for hiding this comment

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

Thanks for the hard work!

@HelinWei-NOAA
Copy link
Copy Markdown
Contributor

@climbfuji for this commit "Removed SNET. Net sloar radiation is computed from the incoming SW and albedo", only sfc_drv_ruc.F90 was modified for RUC LSM. sfc_drv.f should also be modified for Noah LSM.

@climbfuji
Copy link
Copy Markdown
Collaborator Author

climbfuji commented May 27, 2021 via email

Copy link
Copy Markdown
Member

@dustinswales dustinswales left a comment

Choose a reason for hiding this comment

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

All of the changes to the GP code look fine to me.
Great work!

@climbfuji climbfuji merged commit 24cc09e into NCAR:main May 27, 2021
@climbfuji climbfuji deleted the move_sfc_emis_alb_calculation_to_its_own_scheme_and_z0_composite_consistent branch June 27, 2022 03:19
HelinWei-NOAA pushed a commit to HelinWei-NOAA/ccpp-physics that referenced this pull request Feb 26, 2023
…nout' (NCAR#627)

* Changed UGWP diagnostic variable declaration intents from 'out' to 'inout'

* Updated UGWP diagnostic variable declaration intents in drag_suite.meta
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.