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

dtc/hwrf-physics: update from support/hafs 2020/06/18 #463

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
5b5b663
Initializing ice fluxes by PBL calculated values when fluxes from CIC…
ShanSunNOAA Apr 8, 2020
a6e95db
Changing "_ocn"to "_wat" so the variable can be used for lake as well.
ShanSunNOAA Apr 23, 2020
424d7b6
Introducing tiice(:,;,2) as the 2-layer internal ice temperature
ShanSunNOAA Apr 24, 2020
f08797d
Introduce internal ice temperature. It is output only in the fracrtio…
ShanSunNOAA Apr 24, 2020
f22b39c
Updating tiice in gcycle.F90
ShanSunNOAA Apr 26, 2020
25a72ec
Ca develop (#418)
lisa-bengtsson May 4, 2020
379c2f3
scientific documentation update for UFS public release, add two addit…
mzhangw Feb 27, 2020
f48b283
add two new suites: GFSv15p2_no_nsst and GFSv16beta_no_nsst and GFS o…
mzhangw Mar 2, 2020
e63c34f
CCPP V4.0 scidoc update (#402)
mzhangw Mar 2, 2020
ab540e5
add no_nsst suites in all_schemes page per ligia email
mzhangw Mar 9, 2020
01a91cb
update ocean scheme description per Ligias request
mzhangw Mar 27, 2020
5a254ff
fix doxygen compile warnings
mzhangw Mar 27, 2020
e990919
fix m_micro prebuild error
mzhangw Mar 27, 2020
cec1ad9
fix doc of m_micro
mzhangw Mar 27, 2020
540035a
Update physics/docs/pdftxt/mainpage.txt
mzhangw Mar 30, 2020
7dea01c
minor fix
mzhangw Mar 30, 2020
c494cc7
Update version from 3.0.0 to 4.0.0
climbfuji May 6, 2020
5229075
Fix merge conflicts and apply missing updates for scientific document…
climbfuji May 6, 2020
6c1eec4
Remove dcyc2t3_post from physics/dcyc2.meta and scientific documentation
climbfuji May 6, 2020
e340e62
physics/m_micro.F90: correct syntax for \htmlinclude statement
climbfuji May 11, 2020
7b1e66c
Merge pull request #448 from climbfuji/bugfixes_from_public_release
climbfuji May 11, 2020
8f1169b
physics/gfdl_fv_sat_adj.F90: add compatibility check for six water sp…
climbfuji May 11, 2020
dd70b55
Add GitHub workflow for basic checks, add tool to check for ASCII enc…
climbfuji May 11, 2020
91a0dd9
Fix non-ascii encoding in a bunch of files (all comments)
climbfuji May 11, 2020
2fb92e8
Remove comments from .github/workflows/basic_checks.yml
climbfuji May 12, 2020
4f73869
Remove debug print statements from tools/check_encoding.py
climbfuji May 12, 2020
66376d5
Merge pull request #451 from climbfuji/travis-encoding-check_and_satu…
climbfuji May 12, 2020
9c6350f
Merge commit '5b5b663d2bd59942a711551f34e3c9c28c475909' into iceflx_t…
ShanSunNOAA May 20, 2020
df9053b
Merge commit 'f22b39c7dcfd582c9b610857a88942a4627e1d92' into iceflx_t…
ShanSunNOAA May 20, 2020
c2fbbbe
Adding tiice to RUC LSM.
ShanSunNOAA May 22, 2020
e913eed
Merge pull request #454 from shansun6/iceflx_ttice_20200520
climbfuji May 27, 2020
388999d
Merge branch 'master' of https://github.com/NCAR/ccpp-physics into ma…
climbfuji Jun 3, 2020
ba106f7
fix unitialized parameters in samfdeepcnv
mzhangw Apr 30, 2020
42aa6e4
Bugfixes, and formatting changes in physics/samfdeepcnv.f
climbfuji Jun 3, 2020
4fcdf2f
Update of samfdeepcnv.f based on code review
climbfuji Jun 3, 2020
6a6dd2c
Merge pull request #423 from climbfuji/man_hafs_sas_for_master
climbfuji Jun 4, 2020
03ec64b
Merge remote-tracking branch 'remotes/upstream/master' into support/HAFS
BinLiu-NOAA Jun 6, 2020
d58fa4f
Merge branch 'support/HAFS' of https://github.com/hafs-community/ccpp…
climbfuji Jun 18, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/workflows/basic_checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Basic checks for CCPP physics schemes

on: [push, pull_request]

jobs:
build:

runs-on: macos-latest

steps:
- name: Checkout
uses: actions/checkout@v2
- name: Init submodules
run: git submodule update --init --recursive
#- name: Update packages
# run: |
# /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# #brew install autoconf automake coreutils gcc@9 libtool mpich gnu-sed wget
# brew install automake coreutils mpich gnu-sed
- name: Check for ASCII encoding
run: ./tools/check_encoding.py
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ endif (NOT PROJECT)
cmake_minimum_required(VERSION 3.0)

project(ccppphys
VERSION 3.0.0
VERSION 4.0.0
LANGUAGES C CXX Fortran)

# Use rpaths on MacOSX
Expand Down
46 changes: 9 additions & 37 deletions physics/GFS_DCNV_generic.F90
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ end subroutine GFS_DCNV_generic_pre_finalize
!! \htmlinclude GFS_DCNV_generic_pre_run.html
!!
#endif
subroutine GFS_DCNV_generic_pre_run (im, levs, ldiag3d, do_cnvgwd, do_ca, cplchm,&
isppt_deep, gu0, gv0, gt0, gq0_water_vapor, &
subroutine GFS_DCNV_generic_pre_run (im, levs, ldiag3d, do_cnvgwd, cplchm, &
gu0, gv0, gt0, gq0_water_vapor, &
save_u, save_v, save_t, save_qv, ca_deep, &
dqdti, errmsg, errflg)

Expand All @@ -27,7 +27,7 @@ subroutine GFS_DCNV_generic_pre_run (im, levs, ldiag3d, do_cnvgwd, do_ca, cplchm
implicit none

integer, intent(in) :: im, levs
logical, intent(in) :: ldiag3d, do_cnvgwd, do_ca, cplchm, isppt_deep
logical, intent(in) :: ldiag3d, do_cnvgwd, cplchm
real(kind=kind_phys), dimension(im,levs), intent(in) :: gu0
real(kind=kind_phys), dimension(im,levs), intent(in) :: gv0
real(kind=kind_phys), dimension(im,levs), intent(in) :: gt0
Expand All @@ -49,15 +49,7 @@ subroutine GFS_DCNV_generic_pre_run (im, levs, ldiag3d, do_cnvgwd, do_ca, cplchm
errmsg = ''
errflg = 0

if (do_ca) then
do k=1,levs
do i=1,im
gq0_water_vapor(i,k) = gq0_water_vapor(i,k)*(1.0 + ca_deep(i)/500.)
enddo
enddo
endif

if (ldiag3d .or. isppt_deep) then
if (ldiag3d) then
do k=1,levs
do i=1,im
save_t(i,k) = gt0(i,k)
Expand All @@ -73,7 +65,7 @@ subroutine GFS_DCNV_generic_pre_run (im, levs, ldiag3d, do_cnvgwd, do_ca, cplchm
enddo
endif

if (ldiag3d .or. cplchm .or. isppt_deep) then
if (ldiag3d .or. cplchm) then
do k=1,levs
do i=1,im
save_qv(i,k) = gq0_water_vapor(i,k)
Expand Down Expand Up @@ -102,19 +94,19 @@ end subroutine GFS_DCNV_generic_post_finalize
!> \section arg_table_GFS_DCNV_generic_post_run Argument Table
!! \htmlinclude GFS_DCNV_generic_post_run.html
!!
subroutine GFS_DCNV_generic_post_run (im, levs, lssav, ldiag3d, ras, cscnv, do_ca, &
isppt_deep, frain, rain1, dtf, cld1d, save_u, save_v, save_t, save_qv, gu0, gv0, gt0, &
subroutine GFS_DCNV_generic_post_run (im, levs, lssav, ldiag3d, ras, cscnv, &
frain, rain1, dtf, cld1d, save_u, save_v, save_t, save_qv, gu0, gv0, gt0, &
gq0_water_vapor, ud_mf, dd_mf, dt_mf, con_g, npdf3d, num_p3d, ncnvcld3d, &
rainc, cldwrk, dt3dt, dq3dt, du3dt, dv3dt, upd_mf, dwn_mf, det_mf, &
cnvw, cnvc, cnvw_phy_f3d, cnvc_phy_f3d, &
cape, tconvtend, qconvtend, uconvtend, vconvtend, errmsg, errflg)
errmsg, errflg)

use machine, only: kind_phys

implicit none

integer, intent(in) :: im, levs
logical, intent(in) :: lssav, ldiag3d, ras, cscnv, do_ca, isppt_deep
logical, intent(in) :: lssav, ldiag3d, ras, cscnv

real(kind=kind_phys), intent(in) :: frain, dtf
real(kind=kind_phys), dimension(im), intent(in) :: rain1, cld1d
Expand All @@ -135,9 +127,6 @@ subroutine GFS_DCNV_generic_post_run (im, levs, lssav, ldiag3d, ras, cscnv, do_c
! as long as these do not get used when not allocated (it is still invalid Fortran code, though).
real(kind=kind_phys), dimension(:,:), intent(inout) :: cnvw_phy_f3d, cnvc_phy_f3d

real(kind=kind_phys), dimension(im), intent(inout) :: cape
real(kind=kind_phys), dimension(im,levs), intent(inout) :: tconvtend, qconvtend, uconvtend, vconvtend

character(len=*), intent(out) :: errmsg
integer, intent(out) :: errflg

Expand All @@ -148,11 +137,6 @@ subroutine GFS_DCNV_generic_post_run (im, levs, lssav, ldiag3d, ras, cscnv, do_c
errflg = 0

if (.not. ras .and. .not. cscnv) then
if(do_ca) then
do i=1,im
cape(i) = cld1d(i)
enddo
endif
if (npdf3d == 3 .and. num_p3d == 4) then
do k=1,levs
do i=1,im
Expand Down Expand Up @@ -198,18 +182,6 @@ subroutine GFS_DCNV_generic_post_run (im, levs, lssav, ldiag3d, ras, cscnv, do_c

endif ! if (lssav)


if (isppt_deep) then
do k=1,levs
do i=1,im
tconvtend(i,k) = gt0(i,k) - save_t(i,k)
qconvtend(i,k) = gq0_water_vapor(i,k) - save_qv(i,k)
uconvtend(i,k) = gu0(i,k) - save_u(i,k)
vconvtend(i,k) = gv0(i,k) - save_v(i,k)
enddo
enddo
endif

end subroutine GFS_DCNV_generic_post_run

end module GFS_DCNV_generic_post
77 changes: 0 additions & 77 deletions physics/GFS_DCNV_generic.meta
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,6 @@
type = logical
intent = in
optional = F
[do_ca]
standard_name = flag_for_cellular_automata
long_name = cellular automata main switch
units = flag
dimensions = ()
type = logical
intent = in
optional = F
[cplchm]
standard_name = flag_for_chemistry_coupling
long_name = flag controlling cplchm collection (default off)
Expand All @@ -49,14 +41,6 @@
type = logical
intent = in
optional = F
[isppt_deep]
standard_name = flag_for_combination_of_sppt_with_isppt_deep
long_name = switch for combination with isppt_deep.
units = flag
dimensions = ()
type = logical
intent = in
optional = F
[gu0]
standard_name = x_wind_updated_by_physics
long_name = zonal wind updated by physics
Expand Down Expand Up @@ -217,22 +201,6 @@
type = logical
intent = in
optional = F
[do_ca]
standard_name = flag_for_cellular_automata
long_name = cellular automata main switch
units = flag
dimensions = ()
type = logical
intent = in
optional = F
[isppt_deep]
standard_name = flag_for_combination_of_sppt_with_isppt_deep
long_name = switch for combination with isppt_deep.
units = flag
dimensions = ()
type = logical
intent = in
optional = F
[frain]
standard_name = dynamics_to_physics_timestep_ratio
long_name = ratio of dynamics timestep to physics timestep
Expand Down Expand Up @@ -518,51 +486,6 @@
kind = kind_phys
intent = inout
optional = F
[cape]
standard_name = convective_available_potential_energy_for_coupling
long_name = convective available potential energy for coupling
units = m2 s-2
dimensions = (horizontal_dimension)
type = real
kind = kind_phys
intent = inout
optional = F
[tconvtend]
standard_name = tendency_of_air_temperature_due_to_deep_convection_for_coupling_on_physics_timestep
long_name = tendency of air temperature due to deep convection
units = K
dimensions = (horizontal_dimension,vertical_dimension)
type = real
kind = kind_phys
intent = inout
optional = F
[qconvtend]
standard_name = tendency_of_water_vapor_specific_humidity_due_to_deep_convection_for_coupling_on_physics_timestep
long_name = tendency of specific humidity due to deep convection
units = kg kg-1
dimensions = (horizontal_dimension,vertical_dimension)
type = real
kind = kind_phys
intent = inout
optional = F
[uconvtend]
standard_name = tendency_of_x_wind_due_to_deep_convection_for_coupling_on_physics_timestep
long_name = tendency_of_x_wind_due_to_deep_convection
units = m s-1
dimensions = (horizontal_dimension,vertical_dimension)
type = real
kind = kind_phys
intent = inout
optional = F
[vconvtend]
standard_name = tendency_of_y_wind_due_to_deep_convection_for_coupling_on_physics_timestep
long_name = tendency_of_y_wind_due_to_deep_convection
units = m s-1
dimensions = (horizontal_dimension,vertical_dimension)
type = real
kind = kind_phys
intent = inout
optional = F
[errmsg]
standard_name = ccpp_error_message
long_name = error message for error handling in CCPP
Expand Down
6 changes: 3 additions & 3 deletions physics/GFS_MP_generic.F90
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ subroutine GFS_MP_generic_post_run(im, ix, levs, kdt, nrcm, ncld, nncl, ntcw, nt
rann, xlat, xlon, gt0, gq0, prsl, prsi, phii, tsfc, ice, snow, graupel, save_t, save_qv, rain0, ice0, snow0, &
graupel0, del, rain, domr_diag, domzr_diag, domip_diag, doms_diag, tprcp, srflag, sr, cnvprcp, totprcp, totice, &
totsnw, totgrp, cnvprcpb, totprcpb, toticeb, totsnwb, totgrpb, dt3dt, dq3dt, rain_cpl, rainc_cpl, snow_cpl, pwat, &
do_sppt, dtdtr, dtdtc, drain_cpl, dsnow_cpl, lsm, lsm_ruc, lsm_noahmp, raincprv, rainncprv, iceprv, snowprv, &
do_sppt, ca_global, dtdtr, dtdtc, drain_cpl, dsnow_cpl, lsm, lsm_ruc, lsm_noahmp, raincprv, rainncprv, iceprv, snowprv, &
graupelprv, draincprv, drainncprv, diceprv, dsnowprv, dgraupelprv, dtp, errmsg, errflg)
!
use machine, only: kind_phys
Expand Down Expand Up @@ -114,7 +114,7 @@ subroutine GFS_MP_generic_post_run(im, ix, levs, kdt, nrcm, ncld, nncl, ntcw, nt
real(kind=kind_phys), dimension(:,:), intent(inout) :: dt3dt, dq3dt

! Stochastic physics / surface perturbations
logical, intent(in) :: do_sppt
logical, intent(in) :: do_sppt, ca_global
real(kind=kind_phys), dimension(im,levs), intent(inout) :: dtdtr
real(kind=kind_phys), dimension(im,levs), intent(in) :: dtdtc
real(kind=kind_phys), dimension(im), intent(inout) :: drain_cpl
Expand Down Expand Up @@ -375,7 +375,7 @@ subroutine GFS_MP_generic_post_run(im, ix, levs, kdt, nrcm, ncld, nncl, ntcw, nt
enddo

! Stochastic physics / surface perturbations
if (do_sppt) then
if (do_sppt .or. ca_global) then
!--- radiation heating rate
dtdtr(1:im,:) = dtdtr(1:im,:) + dtdtc(1:im,:)*dtf
endif
Expand Down
8 changes: 8 additions & 0 deletions physics/GFS_MP_generic.meta
Original file line number Diff line number Diff line change
Expand Up @@ -722,6 +722,14 @@
type = logical
intent = in
optional = F
[ca_global]
standard_name = flag_for_global_cellular_automata
long_name = switch for global ca
units = flag
dimensions = ()
type = logical
intent = in
optional = F
[dtdtr]
standard_name = tendency_of_air_temperature_due_to_radiative_heating_on_physics_time_step
long_name = temp. change due to radiative heating per time step
Expand Down
33 changes: 20 additions & 13 deletions physics/GFS_PBL_generic.F90
Original file line number Diff line number Diff line change
Expand Up @@ -330,8 +330,8 @@ subroutine GFS_PBL_generic_post_run (im, levs, nvdiff, ntrac,
dqdt, dusfc_cpl, dvsfc_cpl, dtsfc_cpl, &
dqsfc_cpl, dusfci_cpl, dvsfci_cpl, dtsfci_cpl, dqsfci_cpl, dusfc_diag, dvsfc_diag, dtsfc_diag, dqsfc_diag, &
dusfci_diag, dvsfci_diag, dtsfci_diag, dqsfci_diag, dt3dt, du3dt_PBL, du3dt_OGWD, dv3dt_PBL, dv3dt_OGWD, dq3dt, &
dq3dt_ozone, rd, cp,fvirt, hvap, t1, q1, prsl, hflx, ushfsfci, oceanfrac, fice, dusfc_cice, dvsfc_cice, dtsfc_cice, &
dqsfc_cice, wet, dry, icy, wind, stress_ocn, hflx_ocn, evap_ocn, ugrs1, vgrs1, dkt_cpl, dkt, hffac, hefac, &
dq3dt_ozone, rd, cp, fvirt, hvap, t1, q1, prsl, hflx, ushfsfci, oceanfrac, flag_cice, dusfc_cice, dvsfc_cice, &
dtsfc_cice, dqsfc_cice, wet, dry, icy, wind, stress_wat, hflx_wat, evap_wat, ugrs1, vgrs1, dkt_cpl, dkt, hffac, hefac, &
errmsg, errflg)

use machine, only : kind_phys
Expand All @@ -346,13 +346,14 @@ subroutine GFS_PBL_generic_post_run (im, levs, nvdiff, ntrac,
integer, intent(in) :: imp_physics_zhao_carr, imp_physics_mg, imp_physics_fer_hires
logical, intent(in) :: ltaerosol, cplflx, cplchm, lssav, ldiag3d, lsidea
logical, intent(in) :: hybedmf, do_shoc, satmedmf, shinhong, do_ysu
logical, dimension(:), intent(in) :: flag_cice

real(kind=kind_phys), intent(in) :: dtf
real(kind=kind_phys), intent(in) :: rd, cp, fvirt, hvap
real(kind=kind_phys), dimension(:), intent(in) :: t1, q1, hflx, oceanfrac, fice
real(kind=kind_phys), dimension(:), intent(in) :: t1, q1, hflx, oceanfrac
real(kind=kind_phys), dimension(:,:), intent(in) :: prsl
real(kind=kind_phys), dimension(:), intent(in) :: dusfc_cice, dvsfc_cice, dtsfc_cice, dqsfc_cice, &
wind, stress_ocn, hflx_ocn, evap_ocn, ugrs1, vgrs1
wind, stress_wat, hflx_wat, evap_wat, ugrs1, vgrs1
real(kind=kind_phys), dimension(im, levs, nvdiff), intent(in) :: dvdftra
real(kind=kind_phys), dimension(im), intent(in) :: dusfc1, dvsfc1, dtsfc1, dqsfc1, xmu
real(kind=kind_phys), dimension(im, levs), intent(in) :: dudt, dvdt, dtdt, htrsw, htrlw
Expand Down Expand Up @@ -382,7 +383,6 @@ subroutine GFS_PBL_generic_post_run (im, levs, nvdiff, ntrac,
real(kind=kind_phys), parameter :: zero = 0.0d0
real(kind=kind_phys), parameter :: one = 1.0d0
real(kind=kind_phys), parameter :: huge = 9.9692099683868690E36 ! NetCDF float FillValue, same as in GFS_typedefs.F90
real(kind=kind_phys), parameter :: epsln = 1.0d-10 ! same as in GFS_physics_driver.F90
integer :: i, k, kk, k1, n
real(kind=kind_phys) :: tem, tem1, rho

Expand Down Expand Up @@ -550,24 +550,31 @@ subroutine GFS_PBL_generic_post_run (im, levs, nvdiff, ntrac,
if (cplflx) then
do i=1,im
if (oceanfrac(i) > zero) then ! Ocean only, NO LAKES
if (fice(i) > one - epsln) then ! no open water, 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)
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_ocn(i) / wind(i)
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_ocn(i) ! sensible heat flux over open ocean
dqsfci_cpl(i) = hvap * rho * evap_ocn(i) ! latent heat flux over open ocean
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)
Expand Down
Loading