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

Mods to MYNN sfc and PBL for fractional/coupled #40

Merged
merged 6 commits into from
Jun 25, 2020

Conversation

benwgreen
Copy link

MYNN surface layer needs very slight changes if it will ever be used to compute surface heat/moisture fluxes (currently done by sfc_nst, sfc_ocean, sfc_sice, sfc_drv_ruc) in the fractional framework.
MYNN boundary layer needs an updated way to compute fluxes for the ocean in the case of fractional mask (this change follows the procedure done in GFS_PBL_generic.F90).
Testing finds these changes make no difference in the case of non-fractional mask and atmosphere-only, so regression test GSD_v0 should pass.
@joeolson42 is in favor of these changes.
Refer to Issue 39 (#39)

Suggested reviewers: @joeolson42 and @shansun6

@benwgreen benwgreen requested a review from DomHeinzeller as a code owner June 18, 2020 21:40
Copy link

@DomHeinzeller DomHeinzeller left a comment

Choose a reason for hiding this comment

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

Thanks! Looks good to me. I'll be testing this after #38 and #36 are merged.

@DomHeinzeller
Copy link

This PR has been pulled into #41 and will be merged as part of it.

Copy link

@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.

Could you modify similar line in GFS_PBL_generic.F90
if (fice(i) > one - epsln) then ! no open water, use results from CICE
epsln is not used and can be removed. Thanks!

@climbfuji
Copy link

Could you modify similar line in GFS_PBL_generic.F90
if (fice(i) > one - epsln) then ! no open water, use results from CICE
epsln is not used and can be removed. Thanks!

This will impact the s2s runs when we merge this to the authoritative repositories. Is this what we want?

@ShanSunNOAA
Copy link

ShanSunNOAA commented Jun 25, 2020 via email

@DomHeinzeller
Copy link

Could you modify similar line in GFS_PBL_generic.F90
if (fice(i) > one - epsln) then ! no open water, use results from CICE
epsln is not used and can be removed. Thanks!

This will impact the s2s runs when we merge this to the authoritative repositories. Is this what we want?

Shan, I can't find this line in GFS_PBL_generic.F90. That file in gsd/develop has:

!  --- ...  coupling insertion

      if (cplflx) then
        do i=1,im
          if (oceanfrac(i) > zero) then ! Ocean only, NO LAKES
            if ( .not. wet(i)) then ! no open water
              if (flag_cice(i)) then !use results from CICE
                dusfci_cpl(i) = dusfc_cice(i)
                dvsfci_cpl(i) = dvsfc_cice(i)
                dtsfci_cpl(i) = dtsfc_cice(i)
                dqsfci_cpl(i) = dqsfc_cice(i)
              else !use PBL fluxes when CICE fluxes is unavailable
                dusfci_cpl(i) = dusfc1(i)
                dvsfci_cpl(i) = dvsfc1(i)
                dtsfci_cpl(i) = dtsfc1(i)
                dqsfci_cpl(i) = dqsfc1(i)
              end if
            elseif (icy(i) .or. dry(i)) then ! use stress_ocean from sfc_diff for opw component at mixed point
              tem1 = max(q1(i), 1.e-8)
              rho = prsl(i,1) / (rd*t1(i)*(one+fvirt*tem1))
              if (wind(i) > zero) then
                tem = - rho * stress_wat(i) / wind(i)
                dusfci_cpl(i) = tem * ugrs1(i)   ! U-momentum flux
                dvsfci_cpl(i) = tem * vgrs1(i)   ! V-momentum flux
              else
                dusfci_cpl(i) = zero
                dvsfci_cpl(i) = zero
              endif
              dtsfci_cpl(i) = cp   * rho * hflx_wat(i) ! sensible heat flux over open ocean
              dqsfci_cpl(i) = hvap * rho * evap_wat(i) ! latent heat flux over open ocean
            else                                       ! use results from PBL scheme for 100% open ocean
              dusfci_cpl(i) = dusfc1(i)
              dvsfci_cpl(i) = dvsfc1(i)
              dtsfci_cpl(i) = dtsfc1(i)*hffac(i)
              dqsfci_cpl(i) = dqsfc1(i)*hefac(i)
            endif
!
            dusfc_cpl (i) = dusfc_cpl(i) + dusfci_cpl(i) * dtf
            dvsfc_cpl (i) = dvsfc_cpl(i) + dvsfci_cpl(i) * dtf
            dtsfc_cpl (i) = dtsfc_cpl(i) + dtsfci_cpl(i) * dtf
            dqsfc_cpl (i) = dqsfc_cpl(i) + dqsfci_cpl(i) * dtf
!
          else
            dusfc_cpl(i) = huge
            dvsfc_cpl(i) = huge
            dtsfc_cpl(i) = huge
            dqsfc_cpl(i) = huge
!!
          endif ! Ocean only, NO LAKES
        enddo
      endif

I will make the corresponding change in module_MYNNPBL_wrapper.F90 and push it to the PR.

@DomHeinzeller
Copy link

Could you modify similar line in GFS_PBL_generic.F90
if (fice(i) > one - epsln) then ! no open water, use results from CICE
epsln is not used and can be removed. Thanks!

This will impact the s2s runs when we merge this to the authoritative repositories. Is this what we want?

Shan, I can't find this line in GFS_PBL_generic.F90. That file in gsd/develop has:

!  --- ...  coupling insertion

      if (cplflx) then
        do i=1,im
          if (oceanfrac(i) > zero) then ! Ocean only, NO LAKES
            if ( .not. wet(i)) then ! no open water
              if (flag_cice(i)) then !use results from CICE
                dusfci_cpl(i) = dusfc_cice(i)
                dvsfci_cpl(i) = dvsfc_cice(i)
                dtsfci_cpl(i) = dtsfc_cice(i)
                dqsfci_cpl(i) = dqsfc_cice(i)
              else !use PBL fluxes when CICE fluxes is unavailable
                dusfci_cpl(i) = dusfc1(i)
                dvsfci_cpl(i) = dvsfc1(i)
                dtsfci_cpl(i) = dtsfc1(i)
                dqsfci_cpl(i) = dqsfc1(i)
              end if
            elseif (icy(i) .or. dry(i)) then ! use stress_ocean from sfc_diff for opw component at mixed point
              tem1 = max(q1(i), 1.e-8)
              rho = prsl(i,1) / (rd*t1(i)*(one+fvirt*tem1))
              if (wind(i) > zero) then
                tem = - rho * stress_wat(i) / wind(i)
                dusfci_cpl(i) = tem * ugrs1(i)   ! U-momentum flux
                dvsfci_cpl(i) = tem * vgrs1(i)   ! V-momentum flux
              else
                dusfci_cpl(i) = zero
                dvsfci_cpl(i) = zero
              endif
              dtsfci_cpl(i) = cp   * rho * hflx_wat(i) ! sensible heat flux over open ocean
              dqsfci_cpl(i) = hvap * rho * evap_wat(i) ! latent heat flux over open ocean
            else                                       ! use results from PBL scheme for 100% open ocean
              dusfci_cpl(i) = dusfc1(i)
              dvsfci_cpl(i) = dvsfc1(i)
              dtsfci_cpl(i) = dtsfc1(i)*hffac(i)
              dqsfci_cpl(i) = dqsfc1(i)*hefac(i)
            endif
!
            dusfc_cpl (i) = dusfc_cpl(i) + dusfci_cpl(i) * dtf
            dvsfc_cpl (i) = dvsfc_cpl(i) + dvsfci_cpl(i) * dtf
            dtsfc_cpl (i) = dtsfc_cpl(i) + dtsfci_cpl(i) * dtf
            dqsfc_cpl (i) = dqsfc_cpl(i) + dqsfci_cpl(i) * dtf
!
          else
            dusfc_cpl(i) = huge
            dvsfc_cpl(i) = huge
            dtsfc_cpl(i) = huge
            dqsfc_cpl(i) = huge
!!
          endif ! Ocean only, NO LAKES
        enddo
      endif

I will make the corresponding change in module_MYNNPBL_wrapper.F90 and push it to the PR.

@shansun6 please check this commit I just pushed: 728c076

DomHeinzeller added a commit that referenced this pull request Jun 25, 2020
Mods to MYNN sfc and PBL for fractional/coupled for latest gsd/develop code (based on #40)
@DomHeinzeller DomHeinzeller merged commit 0d6db42 into NOAA-GSL:gsd/develop Jun 25, 2020
@benwgreen benwgreen deleted the bwg_mod_for_frac branch February 25, 2021 16:41
@benwgreen benwgreen restored the bwg_mod_for_frac branch February 25, 2021 16:41
@benwgreen benwgreen deleted the bwg_mod_for_frac branch June 8, 2021 20:27
zhanglikate pushed a commit to zhanglikate/ccpp-physics that referenced this pull request Feb 10, 2023
zhanglikate pushed a commit to zhanglikate/ccpp-physics that referenced this pull request Mar 1, 2024
…nt_mods

Changed UGWP diagnostic variable declaration intents from 'out' to 'inout'
zhanglikate pushed a commit to zhanglikate/ccpp-physics that referenced this pull request Mar 1, 2024
…nt_mods

Changed UGWP diagnostic variable declaration intents from 'out' to 'inout'
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.

4 participants