Skip to content

Commit

Permalink
Merge pull request NCAR#281 from climbfuji/cleanup_work_gerrit_codere…
Browse files Browse the repository at this point in the history
…view_20190627

Cleanup work gerrit code review part 2 - 2019/06/29
  • Loading branch information
climbfuji committed Jul 1, 2019
2 parents 8914f4c + f42f84c commit 243abfc
Show file tree
Hide file tree
Showing 65 changed files with 2,722 additions and 1,994 deletions.
2 changes: 1 addition & 1 deletion physics/GFS_MP_generic.F90
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ module GFS_MP_generic_post
subroutine GFS_MP_generic_post_init
end subroutine GFS_MP_generic_post_init

!>\defgroup gfs_calpreciptype GFS/GFDL calpreciptype Main
!>\defgroup gfs_calpreciptype GFS Precipitation Type Diagnostics Module
!! \brief If dominant precip type is requested (i.e., Zhao-Carr MP scheme), 4 more algorithms in calpreciptype()
!! will be called. the tallies are then summed in calwxt_dominant(). For GFDL cloud MP scheme, determine convective
!! rain/snow by surface temperature; and determine explicit rain/snow by rain/snow coming out directly from MP.
Expand Down
7 changes: 6 additions & 1 deletion physics/GFS_debug.F90
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,6 @@ subroutine GFS_diagtoscreen_run (Model, Statein, Stateout, Sfcprop, Coupling,
call print_var(mpirank,omprank, blkno, 'Sfcprop%f10m' , Sfcprop%f10m)
call print_var(mpirank,omprank, blkno, 'Sfcprop%tprcp' , Sfcprop%tprcp)
call print_var(mpirank,omprank, blkno, 'Sfcprop%srflag' , Sfcprop%srflag)
call print_var(mpirank,omprank, blkno, 'Sfcprop%sr' , Sfcprop%sr)
call print_var(mpirank,omprank, blkno, 'Sfcprop%slc' , Sfcprop%slc)
call print_var(mpirank,omprank, blkno, 'Sfcprop%smc' , Sfcprop%smc)
call print_var(mpirank,omprank, blkno, 'Sfcprop%stc' , Sfcprop%stc)
Expand Down Expand Up @@ -321,10 +320,16 @@ subroutine GFS_diagtoscreen_run (Model, Statein, Stateout, Sfcprop, Coupling,
call print_var(mpirank,omprank, blkno, 'Diag%epi ', Diag%epi)
call print_var(mpirank,omprank, blkno, 'Diag%smcwlt2 ', Diag%smcwlt2)
call print_var(mpirank,omprank, blkno, 'Diag%smcref2 ', Diag%smcref2)
call print_var(mpirank,omprank, blkno, 'Diag%sr ', Diag%sr)
call print_var(mpirank,omprank, blkno, 'Diag%tdomr ', Diag%tdomr)
call print_var(mpirank,omprank, blkno, 'Diag%tdomzr ', Diag%tdomzr)
call print_var(mpirank,omprank, blkno, 'Diag%tdomip ', Diag%tdomip)
call print_var(mpirank,omprank, blkno, 'Diag%tdoms ', Diag%tdoms)
if (Model%lsm == Model%lsm_ruc) then
call print_var(mpirank,omprank, blkno, 'Diag%wet1 ', Sfcprop%wetness)
else
call print_var(mpirank,omprank, blkno, 'Diag%wet1 ', Diag%wet1)
end if
call print_var(mpirank,omprank, blkno, 'Diag%skebu_wts ', Diag%skebu_wts)
call print_var(mpirank,omprank, blkno, 'Diag%skebv_wts ', Diag%skebv_wts)
call print_var(mpirank,omprank, blkno, 'Diag%sppt_wts ', Diag%sppt_wts)
Expand Down
34 changes: 23 additions & 11 deletions physics/GFS_phys_time_vary.fv3.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
!! Contains code related to GFS physics suite setup (physics part of time_vary_step)

!>\defgroup mod_GFS_phys_time_vary GFS Physics Time Update
!! This module contains GFS physics time vary subroutines including ozone, h2o, i
!! aerosol and IN&CCN updates.
!! This module contains GFS physics time vary subroutines including ozone, stratospheric water vapor,
!! aerosol, IN&CCN and surface properties updates.
!> @{
module GFS_phys_time_vary

#ifdef OPENMP
Expand Down Expand Up @@ -42,6 +43,8 @@ module GFS_phys_time_vary
!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F |
!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F |
!!
!>\section gen_GFS_phys_time_vary_init GFS_phys_time_vary_init General Algorithm
!! @{
subroutine GFS_phys_time_vary_init (Data, Model, Interstitial, nthrds, errmsg, errflg)

use GFS_typedefs, only: GFS_control_type, GFS_data_type, GFS_interstitial_type
Expand Down Expand Up @@ -111,6 +114,7 @@ subroutine GFS_phys_time_vary_init (Data, Model, Interstitial, nthrds, errmsg, e
!$OMP sections

!$OMP section
!> - Call read_o3data() to read ozone data
call read_o3data (Model%ntoz, Model%me, Model%master)

! Consistency check that the hardcoded values for levozp and
Expand All @@ -130,6 +134,7 @@ subroutine GFS_phys_time_vary_init (Data, Model, Interstitial, nthrds, errmsg, e
end if

!$OMP section
!> - Call read_h2odata() to read stratospheric water vapor data
call read_h2odata (Model%h2o_phys, Model%me, Model%master)

! Consistency check that the hardcoded values for levh2o and
Expand All @@ -149,6 +154,7 @@ subroutine GFS_phys_time_vary_init (Data, Model, Interstitial, nthrds, errmsg, e
end if

!$OMP section
!> - Call read_aerdata() to read aerosol climatology
if (Model%aero_in) then
! Consistency check that the value for ntrcaerm set in GFS_typedefs.F90
! and used to allocate Tbd%aer_nm matches the value defined in aerclm_def
Expand All @@ -173,6 +179,7 @@ subroutine GFS_phys_time_vary_init (Data, Model, Interstitial, nthrds, errmsg, e
endif

!$OMP section
!> - Call read_cidata() to read IN and CCN data
if (Model%iccn) then
call read_cidata ( Model%me, Model%master)
! No consistency check needed for in/ccn data, all values are
Expand Down Expand Up @@ -204,7 +211,7 @@ subroutine GFS_phys_time_vary_init (Data, Model, Interstitial, nthrds, errmsg, e
end if


!--- read in and initialize ozone
!> - Call setindxoz() to initialize ozone data
if (Model%ntoz > 0) then
!$OMP do schedule (dynamic,1)
do nb = 1, nblks
Expand All @@ -214,7 +221,7 @@ subroutine GFS_phys_time_vary_init (Data, Model, Interstitial, nthrds, errmsg, e
!$OMP end do
endif

!--- read in and initialize stratospheric water
!> - Call setindxh2o() to initialize stratospheric water vapor data
if (Model%h2o_phys) then
!$OMP do schedule (dynamic,1)
do nb = 1, nblks
Expand All @@ -224,7 +231,7 @@ subroutine GFS_phys_time_vary_init (Data, Model, Interstitial, nthrds, errmsg, e
!$OMP end do
endif

!--- read in and initialize aerosols
!> - Call setindxaer() to initialize aerosols data
if (Model%aero_in) then
!$OMP do schedule (dynamic,1)
do nb = 1, nblks
Expand All @@ -236,7 +243,7 @@ subroutine GFS_phys_time_vary_init (Data, Model, Interstitial, nthrds, errmsg, e
!$OMP end do
endif

!--- read in and initialize IN and CCN
!> - Call setindxci() to initialize IN and CCN data
if (Model%iccn) then
!$OMP do schedule (dynamic,1)
do nb = 1, nblks
Expand Down Expand Up @@ -267,6 +274,7 @@ subroutine GFS_phys_time_vary_init (Data, Model, Interstitial, nthrds, errmsg, e
is_initialized = .true.

end subroutine GFS_phys_time_vary_init
!! @}


!> \section arg_table_GFS_phys_time_vary_finalize Argument Table
Expand Down Expand Up @@ -324,6 +332,8 @@ end subroutine GFS_phys_time_vary_finalize
!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F |
!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F |
!!
!>\section gen_GFS_phys_time_vary_run GFS_phys_time_vary_run General Algorithm
!> @{
subroutine GFS_phys_time_vary_run (Data, Model, nthrds, errmsg, errflg)

use mersenne_twister, only: random_setseed, random_number
Expand Down Expand Up @@ -413,7 +423,7 @@ subroutine GFS_phys_time_vary_run (Data, Model, nthrds, errmsg, errflg)
enddo
endif ! imfdeepcnv, cal_re, random_clds

!--- o3 interpolation
!> - Call ozinterpol() to make ozone interpolation
if (Model%ntoz > 0) then
!$OMP do schedule (dynamic,1)
do nb = 1, nblks
Expand All @@ -424,7 +434,7 @@ subroutine GFS_phys_time_vary_run (Data, Model, nthrds, errmsg, errflg)
!$OMP end do
endif

!--- h2o interpolation
!> - Call h2ointerpol() to make stratospheric water vapor data interpolation
if (Model%h2o_phys) then
!$OMP do schedule (dynamic,1)
do nb = 1, nblks
Expand All @@ -435,7 +445,7 @@ subroutine GFS_phys_time_vary_run (Data, Model, nthrds, errmsg, errflg)
!$OMP end do
endif

!--- aerosol interpolation
!> - Call aerinterpol() to make aerosol interpolation
if (Model%aero_in) then
!$OMP do schedule (dynamic,1)
do nb = 1, nblks
Expand All @@ -450,7 +460,7 @@ subroutine GFS_phys_time_vary_run (Data, Model, nthrds, errmsg, errflg)
!$OMP end do
endif

!--- ICCN interpolation
!> - Call ciinterpol() to make IN and CCN data interpolation
if (Model%iccn) then
!$OMP do schedule (dynamic,1)
do nb = 1, nblks
Expand All @@ -466,7 +476,7 @@ subroutine GFS_phys_time_vary_run (Data, Model, nthrds, errmsg, errflg)

!$OMP end parallel

!--- repopulate specific time-varying sfc properties for AMIP/forecast runs
!> - Call gcycle() to repopulate specific time-varying surface properties for AMIP/forecast runs
if (Model%nscyc > 0) then
if (mod(Model%kdt,Model%nscyc) == 1) THEN
call gcycle (nblks, Model, Data(:)%Grid, Data(:)%Sfcprop, Data(:)%Cldprop)
Expand Down Expand Up @@ -500,5 +510,7 @@ subroutine GFS_phys_time_vary_run (Data, Model, nthrds, errmsg, errflg)
endif

end subroutine GFS_phys_time_vary_run
!> @}

end module GFS_phys_time_vary
!> @}
7 changes: 3 additions & 4 deletions physics/GFS_rad_time_vary.fv3.F90
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,13 @@ module GFS_rad_time_vary

contains

!>\defgroup GFS_rad_time_vary GFS RRTMG Update
!!\ingroup RRTMG
!! @{
!! \section arg_table_GFS_rad_time_vary_init Argument Table
!!
subroutine GFS_rad_time_vary_init
end subroutine GFS_rad_time_vary_init

!>\defgroup mod_GFS_rad_time_vary GFS Radiation Time Update
!> @{
!> \section arg_table_GFS_rad_time_vary_run Argument Table
!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional |
!! |-------------------|--------------------------------------------------------|-------------------------------------------------------------------------------|----------|------|-----------------------|-----------|--------|----------|
Expand Down Expand Up @@ -105,10 +104,10 @@ subroutine GFS_rad_time_vary_run (Model, Data, nthrds, errmsg, errflg)
endif

end subroutine GFS_rad_time_vary_run
!> @}

!> \section arg_table_GFS_rad_time_vary_finalize Argument Table
!!
subroutine GFS_rad_time_vary_finalize()
end subroutine GFS_rad_time_vary_finalize
!! @}
end module GFS_rad_time_vary
20 changes: 11 additions & 9 deletions physics/aer_cloud.F
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,6 @@ end subroutine aer_cloud_init
!!\param dpre_in mass-weighted diameter of prexisting ice crystals (m)
!!\param ccn_diagr8 array of supersaturations for CCN diagnostics (in-out)
!!\param Ndropr8 Current droplet number concentration (\f$Kg^{-1}\f$)
!!\param qc Liquid water mixing ratio (Kg/Kg)
!!\param use_average_v .false. integrate over the updraft distribution. True: use the mean vertical velocity
!!\param CCN_param CCN activation parameterization. 1- Fountoukis and Nenes (2005), 2-Abdul_Razzak and Ghan (2002) (def = 2)
!!\param IN_param IN activation spectrum (default is 5)
!!\param cdncr8 Activated cloud droplet number concentration (Kg-1)
!!\param smaxliqr8 Maximum supersaturation w.r.t liquid during droplet activation
!!\param incr8 Nucleated ice crystal concentration (Kg-1)
Expand All @@ -172,14 +168,20 @@ end subroutine aer_cloud_init
!!\param Ncdepr8 Nucleated nc by deposition ice nucleation (Kg-1)
!!\param Ncdhfr8 Nucleated nc by immersion in aerosol (Kg -1)
!!\param sc_icer8 Critical saturation ratio in cirrus
!!\param fdust_depr8 Fraction of deposition ice nuclei that are dust
!!\param fdust_immr8 Fraction of immersion mixed-phase ice nuclei that are dust
!!\param fdust_depr8 Fraction of deposition ice nuclei that are dust
!!\param fdust_dhfr8 Fraction of immersion ice nuclei that are dust (not mixed-phase)
!!\param nlimr8 Limiting ice nuclei concentration (m-3)

!===================================================================================


!!\param use_average_v .false. integrate over the updraft distribution. True: use the mean vertical velocity
!!\param CCN_param CCN activation parameterization. 1- Fountoukis and Nenes (2005), 2-Abdul_Razzak and Ghan (2002) (def = 2)
!!\param IN_param IN activation spectrum (default is 5)
!!\param fd_dust
!!\param fd_soot
!!\param pfrz_inc_r8
!!\param sigma_nuc
!!\param rhi_cell
!!\param nccn
!!
subroutine aerosol_activate(tparc_in, pparc_in, sigwparc_in, &
& wparc_ls, Aer_Props, npre_in, dpre_in, ccn_diagr8, Ndropr8, &
& cdncr8, smaxliqr8, incr8, smaxicer8, nheticer8, INimmr8, &
Expand Down
4 changes: 2 additions & 2 deletions physics/cnvc90.f
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module cnvc90
subroutine cnvc90_init()
end subroutine cnvc90_init

!>\defgroup GFS_cnvc90 GFS cnvc90 Main
!>\defgroup GFS_cnvc90 GFS Convective Cloud Diagnostics Module
!> @{
!! This module contains the calculation of fraction of convective cloud,
!! pressure at bottom of convective cloud and at top of convective
Expand All @@ -37,7 +37,7 @@ end subroutine cnvc90_init
!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F |
!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F |
!!
!>\section gen_cnvc90_run GFS cnvc90_run General Algorithm
! \section gen_cnvc_run GFS cnvc90_run General Algorithm
SUBROUTINE cnvc90_run(CLSTP,IM,IX,RN,KBOT,KTOP,KM,PRSI, &
& ACV,ACVB,ACVT,CV,CVB,CVT,errmsg,errflg)

Expand Down
Loading

0 comments on commit 243abfc

Please sign in to comment.