Skip to content

Commit

Permalink
Merge pull request NOAA-GSL#57 from ufs-community/ufs/dev
Browse files Browse the repository at this point in the history
sync with the develop
  • Loading branch information
HelinWei-NOAA committed Feb 9, 2023
2 parents 6ef8805 + fb066dd commit a5a1a8a
Show file tree
Hide file tree
Showing 67 changed files with 5,698 additions and 5,946 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/ci_fv3_ccpp_prebuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@ name: CI test to run FV3 ccpp_prebuild step
on: [push, pull_request]

jobs:
build-linux:
ccpp-prebuild-FV3:

# The type of runner that the job will run on
runs-on: ubuntu-latest
strategy:
max-parallel: 5
runs-on: ubuntu-20.04

steps:
- name: Checkout current ccpp-physics code
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/ci_scm_ccpp_prebuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@ name: CI test to run SCM ccpp_prebuild step
on: [push, pull_request]

jobs:
build-linux:
ccpp-prebuild-SCM:

# The type of runner that the job will run on
runs-on: ubuntu-latest
strategy:
max-parallel: 5
runs-on: ubuntu-20.04

steps:

Expand Down
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[submodule "physics/rte-rrtmgp"]
path = physics/rte-rrtmgp
url = https://github.com/earth-system-radiation/rte-rrtmgp
branch = dtc/ccpp
branch = main
12 changes: 0 additions & 12 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,10 @@ get_filename_component(LOCAL_CURRENT_SOURCE_DIR ${FULL_PATH_TO_CMAKELISTS} DIREC
# List of files that need to be compiled without OpenMP
set(SCHEMES_OPENMP_OFF ${LOCAL_CURRENT_SOURCE_DIR}/physics/rte-rrtmgp/rrtmgp/mo_gas_optics.F90
${LOCAL_CURRENT_SOURCE_DIR}/physics/rte-rrtmgp/rrtmgp/mo_rrtmgp_constants.F90
${LOCAL_CURRENT_SOURCE_DIR}/physics/rte-rrtmgp/rrtmgp/mo_rrtmgp_util_reorder.F90
${LOCAL_CURRENT_SOURCE_DIR}/physics/rte-rrtmgp/rrtmgp/mo_gas_concentrations.F90
${LOCAL_CURRENT_SOURCE_DIR}/physics/rte-rrtmgp/rrtmgp/mo_rrtmgp_util_string.F90
${LOCAL_CURRENT_SOURCE_DIR}/physics/rte-rrtmgp/rrtmgp/kernels/mo_gas_optics_kernels.F90
${LOCAL_CURRENT_SOURCE_DIR}/physics/rte-rrtmgp/rrtmgp/kernels/mo_rrtmgp_util_reorder_kernels.F90
${LOCAL_CURRENT_SOURCE_DIR}/physics/rte-rrtmgp/rrtmgp/mo_gas_optics_rrtmgp.F90
${LOCAL_CURRENT_SOURCE_DIR}/physics/rte-rrtmgp/tests/mo_testing_io.F90
${LOCAL_CURRENT_SOURCE_DIR}/physics/rte-rrtmgp/tests/clear_sky_regression.F90
${LOCAL_CURRENT_SOURCE_DIR}/physics/rte-rrtmgp/extensions/mo_rrtmgp_clr_all_sky.F90
${LOCAL_CURRENT_SOURCE_DIR}/physics/rte-rrtmgp/extensions/mo_fluxes_byband.F90
${LOCAL_CURRENT_SOURCE_DIR}/physics/rte-rrtmgp/extensions/solar_variability/mo_solar_variability.F90
Expand All @@ -97,14 +93,6 @@ set(SCHEMES_OPENMP_OFF ${LOCAL_CURRENT_SOURCE_DIR}/physics/rte-rrtmgp/rrtmgp/mo_
${LOCAL_CURRENT_SOURCE_DIR}/physics/rte-rrtmgp/extensions/mo_compute_bc.F90
${LOCAL_CURRENT_SOURCE_DIR}/physics/rte-rrtmgp/extensions/cloud_optics/mo_cloud_sampling.F90
${LOCAL_CURRENT_SOURCE_DIR}/physics/rte-rrtmgp/extensions/cloud_optics/mo_cloud_optics.F90
${LOCAL_CURRENT_SOURCE_DIR}/physics/rte-rrtmgp/examples/mo_load_coefficients.F90
${LOCAL_CURRENT_SOURCE_DIR}/physics/rte-rrtmgp/examples/rfmip-clear-sky/rrtmgp_rfmip_sw.F90
${LOCAL_CURRENT_SOURCE_DIR}/physics/rte-rrtmgp/examples/rfmip-clear-sky/mo_rfmip_io.F90
${LOCAL_CURRENT_SOURCE_DIR}/physics/rte-rrtmgp/examples/rfmip-clear-sky/rrtmgp_rfmip_lw.F90
${LOCAL_CURRENT_SOURCE_DIR}/physics/rte-rrtmgp/examples/mo_simple_netcdf.F90
${LOCAL_CURRENT_SOURCE_DIR}/physics/rte-rrtmgp/examples/all-sky/rrtmgp_allsky.F90
${LOCAL_CURRENT_SOURCE_DIR}/physics/rte-rrtmgp/examples/all-sky/mo_load_cloud_coefficients.F90
${LOCAL_CURRENT_SOURCE_DIR}/physics/rte-rrtmgp/examples/all-sky/mo_garand_atmos_io.F90
${LOCAL_CURRENT_SOURCE_DIR}/physics/rte-rrtmgp/rte/mo_rte_config.F90
${LOCAL_CURRENT_SOURCE_DIR}/physics/rte-rrtmgp/rte/mo_source_functions.F90
${LOCAL_CURRENT_SOURCE_DIR}/physics/rte-rrtmgp/rte/mo_rte_sw.F90
Expand Down
48 changes: 25 additions & 23 deletions physics/GFS_rrtmgp_cloud_mp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ module GFS_rrtmgp_cloud_mp
reice_min = 10.0, & ! Minimum ice size allowed by GFDL MP scheme
reice_max = 150.0 ! Maximum ice size allowed by GFDL MP scheme

public GFS_rrtmgp_cloud_mp_run
public GFS_rrtmgp_cloud_mp_init, GFS_rrtmgp_cloud_mp_run, GFS_rrtmgp_cloud_mp_finalize

contains

Expand All @@ -45,7 +45,7 @@ module GFS_rrtmgp_cloud_mp
subroutine GFS_rrtmgp_cloud_mp_run(nCol, nLev, nTracers, ncnd, i_cldliq, i_cldice, &
i_cldrain, i_cldsnow, i_cldgrpl, i_cldtot, i_cldliq_nc, i_cldice_nc, i_twa, kdt, &
imfdeepcnv, imfdeepcnv_gf, imfdeepcnv_samf, doSWrad, doLWrad, effr_in, lmfshal, &
ltaerosol,mraerosol, icloud, imp_physics, imp_physics_thompson, imp_physics_gfdl, &
ltaerosol,mraerosol, icloud, imp_physics, imp_physics_thompson, imp_physics_gfdl, &
lgfdlmprad, do_mynnedmf, uni_cld, lmfdeep2, p_lev, p_lay, t_lay, qs_lay, q_lay, &
relhum, lsmask, xlon, xlat, dx, tv_lay, effrin_cldliq, effrin_cldice, &
effrin_cldrain, effrin_cldsnow, tracer, cnv_mixratio, cld_cnv_frac, qci_conv, &
Expand Down Expand Up @@ -462,6 +462,7 @@ subroutine cloud_mp_MYNN(nCol, nLev, lsmask, t_lay, p_lev, p_lay, qs_lay, relhum
enddo
end subroutine cloud_mp_MYNN


!> \ingroup GFS_rrtmgp_cloud_mp
!! Compute cloud radiative properties for SAMF convective cloud scheme.
!!
Expand All @@ -484,47 +485,48 @@ subroutine cloud_mp_SAMF(nCol, nLev, t_lay, p_lev, p_lay, qs_lay, relhum,
nCol, & ! Number of horizontal grid points
nLev ! Number of vertical layers
real(kind_phys), intent(in) :: &
con_g, & ! Physical constant: gravitational constant
con_ttp, & ! Triple point temperature of water (K)
con_g, & ! Physical constant: gravity (m s-2)
con_ttp, & ! Triple point temperature of water (K)
alpha0 !
real(kind_phys), dimension(:,:),intent(in) :: &
t_lay, & ! Temperature at layer centers (K)
p_lev, & ! Pressure at layer interfaces (Pa)
p_lay, & !
qs_lay, & !
relhum, & !
cnv_mixratio ! Convective cloud mixing-ratio (kg/kg)
t_lay, & ! Temperature at layer-centers (K)
p_lev, & ! Pressure at layer-interfaces (Pa)
p_lay, & ! Presure at layer-centers (Pa)
qs_lay, & ! Specific-humidity at layer-centers (kg/kg)
relhum, & ! Relative-humidity (1)
cnv_mixratio ! Convective cloud mixing-ratio (kg/kg)
! Outputs
real(kind_phys), dimension(:,:),intent(inout) :: &
cld_cnv_lwp, & ! Convective cloud liquid water path
cld_cnv_reliq, & ! Convective cloud liquid effective radius
cld_cnv_iwp, & ! Convective cloud ice water path
cld_cnv_reice, & ! Convective cloud ice effecive radius
cld_cnv_frac ! Convective cloud-fraction (1)
cld_cnv_frac ! Convective cloud-fraction
! Local
integer :: iCol, iLay
real(kind_phys) :: tem1, deltaP, clwc
real(kind_phys) :: tem0, tem1, deltaP, clwc

tem0 = 1.0e5/con_g
do iLay = 1, nLev
do iCol = 1, nCol
if (cnv_mixratio(iCol,iLay) > 0._kind_phys) then
tem1 = min(1.0, max(0.0, (con_ttp-t_lay(iCol,iLay))*0.05))
deltaP = abs(p_lev(iCol,iLay+1)-p_lev(iCol,iLay))*0.01
clwc = max(0.0, cnv_mixratio(iCol,iLay)) * con_g * deltaP
cld_cnv_iwp(iCol,iLay) = clwc * tem1
cld_cnv_lwp(iCol,iLay) = clwc - cld_cnv_iwp(iCol,iLay)
clwc = max(0.0, cnv_mixratio(iCol,iLay)) * tem0 * deltaP
cld_cnv_iwp(iCol,iLay) = clwc * tem1
cld_cnv_lwp(iCol,iLay) = clwc - cld_cnv_iwp(iCol,iLay)
cld_cnv_reliq(iCol,iLay) = reliq_def
cld_cnv_reice(iCol,iLay) = reice_def

! Xu-Randall (1996) cloud-fraction.
cld_cnv_frac(iCol,iLay) = cld_frac_XuRandall(p_lay(iCol,iLay), &
cld_cnv_frac(iCol,iLay) = cld_frac_XuRandall(p_lay(iCol,iLay), &
qs_lay(iCol,iLay), relhum(iCol,iLay), cnv_mixratio(iCol,iLay), alpha0)
endif
enddo
enddo

end subroutine cloud_mp_SAMF

!> \ingroup GFS_rrtmgp_cloud_mp
!! This routine computes the cloud radiative properties for a "unified cloud".
!! - "unified cloud" implies that the cloud-fraction is PROVIDED.
Expand Down Expand Up @@ -656,7 +658,6 @@ subroutine cloud_mp_uni(nCol, nLev, nTracers, ncnd, i_cldliq, i_cldice, i_cldrai
enddo ! nLev

end subroutine cloud_mp_uni

!> \ingroup GFS_rrtmgp_cloud_mp
!! This routine computes the cloud radiative properties for the Thompson cloud micro-
!! physics scheme.
Expand Down Expand Up @@ -834,11 +835,11 @@ function cld_frac_XuRandall(p_lay, qs_lay, relhum, cld_mr, alpha)
return
end function

!> \ingroup GFS_rrtmgp_cloud_mp
!! This routine is a wrapper to update the Thompson effective particle sizes used by the
!! RRTMGP radiation scheme.
!!
!! \section cmp_reff_Thompson_gen General Algorithm
! ######################################################################################
! This routine is a wrapper to update the Thompson effective particle sizes used by the
! RRTMGP radiation scheme.
!
! ######################################################################################
subroutine cmp_reff_Thompson(nLev, nCol, i_cldliq, i_cldice, i_cldsnow, i_cldice_nc, &
i_cldliq_nc, i_twa, q_lay, p_lay, t_lay, tracer, con_eps, con_rd, ltaerosol, &
mraerosol, lsmask, effrin_cldliq, effrin_cldice, effrin_cldsnow)
Expand Down Expand Up @@ -922,4 +923,5 @@ subroutine cmp_reff_Thompson(nLev, nCol, i_cldliq, i_cldice, i_cldsnow, i_cldice
enddo

end subroutine cmp_reff_Thompson

end module GFS_rrtmgp_cloud_mp
6 changes: 3 additions & 3 deletions physics/GFS_rrtmgp_cloud_mp.meta
Original file line number Diff line number Diff line change
Expand Up @@ -345,9 +345,9 @@
kind = kind_phys
intent = inout
[tracer]
standard_name = chemical_tracers
long_name = chemical tracers
units = g g-1
standard_name = tracer_concentration
long_name = model layer mean tracer concentration
units = kg kg-1
dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_tracers)
type = real
kind = kind_phys
Expand Down
188 changes: 0 additions & 188 deletions physics/GFS_rrtmgp_lw_post.F90

This file was deleted.

Loading

0 comments on commit a5a1a8a

Please sign in to comment.