Skip to content

Commit

Permalink
Convert more explicit dimensions of argument variables to assumed-siz…
Browse files Browse the repository at this point in the history
…e dimensions, fix Fortran/metadata inconsistencies
  • Loading branch information
climbfuji committed Apr 12, 2021
1 parent 52bf572 commit 88dbbec
Show file tree
Hide file tree
Showing 38 changed files with 971 additions and 981 deletions.
10 changes: 4 additions & 6 deletions physics/GFS_rrtmg_pre.F90
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, &
ltaerosol, lgfdlmprad, uni_cld, effr_in, do_mynnedmf, lmfshal, &
lmfdeep2, fhswr, fhlwr, solhr, sup, con_eps, epsm1, fvirt, &
rog, rocp, con_rd, xlat_d, xlat, xlon, coslat, sinlat, tsfc, slmsk, &
prsi, prsl, prslk, tgrs, sfc_wts, mg_cld, effrr_in, pert_clds,sppt_wts,&
sppt_amp, cnvw_in, cnvc_in, qgrs, aer_nm, dx, icloud, & !inputs from here and above
prsi, prsl, prslk, tgrs, sfc_wts, mg_cld, effrr_in, pert_clds, &
sppt_wts, sppt_amp, cnvw_in, cnvc_in, qgrs, aer_nm, dx, icloud, & !inputs from here and above
coszen, coszdg, effrl_inout, effri_inout, effrs_inout, &
clouds1, clouds2, clouds3, clouds4, clouds5, & !in/out from here and above
kd, kt, kb, mtopa, mbota, raddt, tsfg, tsfa, de_lgth, alb1d, delp, dz, & !output from here and below
Expand Down Expand Up @@ -128,7 +128,7 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, &

integer, intent(out) :: kd, kt, kb

integer, dimension(im,3), intent(out) :: mbota, mtopa
integer, dimension(:,:), intent(out) :: mbota, mtopa

real(kind=kind_phys), intent(out) :: raddt

Expand All @@ -140,9 +140,7 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, &
plyr, tlyr, &
qlyr, olyr

real(kind=kind_phys), dimension(:,;), intent(out) :: plvl, tlvl


real(kind=kind_phys), dimension(:,:), intent(out) :: plvl, tlvl

real(kind=kind_phys), dimension(:,:), intent(out) :: gasvmr_co2, &
gasvmr_n2o, &
Expand Down
52 changes: 26 additions & 26 deletions physics/GFS_rrtmg_pre.meta
Original file line number Diff line number Diff line change
Expand Up @@ -395,32 +395,6 @@
type = logical
intent = in
optional = F
[sppt_wts]
standard_name = weights_for_stochastic_sppt_perturbation
long_name = weights for stochastic sppt perturbation
units = none
dimensions = (horizontal_loop_extent,vertical_dimension)
type = real
kind = kind_phys
intent = inout
optional = F
[sppt_amp]
standard_name = total_ampltiude_of_sppt_perturbation
long_name = toal ampltidue of stochastic sppt perturbation
units = none
dimensions = ()
type = real
kind = kind_phys
intent = in
optional = F
[pert_clds]
standard_name = flag_for_stochastic_cloud_fraction_perturbations
long_name = flag for stochastic cloud fraction physics perturbations
units = flag
dimensions = ()
type = logical
intent = in
optional = F
[do_mynnedmf]
standard_name = do_mynnedmf
long_name = flag to activate MYNN-EDMF
Expand Down Expand Up @@ -661,6 +635,32 @@
kind = kind_phys
intent = in
optional = F
[pert_clds]
standard_name = flag_for_stochastic_cloud_fraction_perturbations
long_name = flag for stochastic cloud fraction physics perturbations
units = flag
dimensions = ()
type = logical
intent = in
optional = F
[sppt_wts]
standard_name = weights_for_stochastic_sppt_perturbation
long_name = weights for stochastic sppt perturbation
units = none
dimensions = (horizontal_loop_extent,vertical_dimension)
type = real
kind = kind_phys
intent = in
optional = F
[sppt_amp]
standard_name = total_ampltiude_of_sppt_perturbation
long_name = toal ampltidue of stochastic sppt perturbation
units = none
dimensions = ()
type = real
kind = kind_phys
intent = in
optional = F
[cnvw_in]
standard_name = convective_cloud_water_mixing_ratio_in_phy_f3d
long_name = convective cloud water mixing ratio in the phy_f3d array
Expand Down
2 changes: 1 addition & 1 deletion physics/GFS_rrtmg_setup.F90
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ subroutine GFS_rrtmg_setup_init ( &
logical, intent(in) :: ccnorm
integer, intent(in) :: imp_physics
logical, intent(in) :: norad_precip
integer, intent(in) :: idate(4)
integer, intent(in) :: idate(:)
integer, intent(in) :: iflip
! For consistency checks
integer, intent(in) :: im
Expand Down
4 changes: 2 additions & 2 deletions physics/GFS_rrtmgp_cloud_overlap_pre.F90
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ end subroutine GFS_rrtmgp_cloud_overlap_pre_init
!!
subroutine GFS_rrtmgp_cloud_overlap_pre_run(nCol, nLev, yearlen, doSWrad, doLWrad, &
julian, lat, p_lev, p_lay, tv_lay, con_pi, con_g, con_rd, con_epsq, dcorr_con, &
idcor, iovr, iovr_dcorr, iovr_exprand, iovr_exp, idcor_con, idcor_hogan, &
idcor, iovr, iovr_dcorr, iovr_exp, iovr_exprand, idcor_con, idcor_hogan, &
idcor_oreopoulos, cld_frac, &
cloud_overlap_param, precip_overlap_param, de_lgth, deltaZc, errmsg, errflg)
de_lgth, cloud_overlap_param, precip_overlap_param, deltaZc, errmsg, errflg)
implicit none

! Inputs
Expand Down
50 changes: 25 additions & 25 deletions physics/GFS_rrtmgp_cloud_overlap_pre.meta
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@
type = integer
intent = in
optional = F
[yearlen]
standard_name = number_of_days_in_year
long_name = number of days in a year
units = days
dimensions = ()
type = integer
intent = in
optional = F
[doSWrad]
standard_name = flag_to_calc_sw
long_name = logical flags for sw radiation calls
Expand All @@ -39,14 +47,6 @@
type = logical
intent = in
optional = F
[yearlen]
standard_name = number_of_days_in_year
long_name = number of days in a year
units = days
dimensions = ()
type = integer
intent = in
optional = F
[julian]
standard_name = julian_day
long_name = julian day
Expand Down Expand Up @@ -128,6 +128,23 @@
kind = kind_phys
intent = in
optional = F
[dcorr_con]
standard_name = decorreltion_length_used_by_overlap_method
long_name = decorrelation length (default) used by cloud overlap method (iovr)
units = km
dimensions = ()
type = real
intent = in
kind = kind_phys
optional = F
[idcor]
standard_name = flag_for_decorrelation_length_method
long_name = flag for decorrelation length method used in cloud overlap method (iovr)
units = flag
dimensions = ()
type = integer
intent = in
optional = F
[iovr]
standard_name = flag_for_cloud_overlap_method_for_radiation
long_name = flag for cloud overlap method
Expand Down Expand Up @@ -160,14 +177,6 @@
type = integer
intent = in
optional = F
[idcor]
standard_name = flag_for_decorrelation_length_method
long_name = flag for decorrelation length method used in cloud overlap method (iovr)
units = flag
dimensions = ()
type = integer
intent = in
optional = F
[idcor_con]
standard_name = flag_for_constant_decorrelation_length_method
long_name = choice of decorrelation length computation (costant)
Expand All @@ -192,15 +201,6 @@
type = integer
intent = in
optional = F
[dcorr_con]
standard_name = decorreltion_length_used_by_overlap_method
long_name = decorrelation length (default) used by cloud overlap method (iovr)
units = km
dimensions = ()
type = real
intent = in
kind = kind_phys
optional = F
[cld_frac]
standard_name = total_cloud_fraction
long_name = layer total cloud fraction
Expand Down
8 changes: 4 additions & 4 deletions physics/GFS_rrtmgp_gfdlmp_pre.F90
Original file line number Diff line number Diff line change
Expand Up @@ -64,20 +64,20 @@ subroutine GFS_rrtmgp_gfdlmp_pre_run(nCol, nLev, nTracers, ncnd, i_cldliq, i_cld
real(kind_phys), intent(in) :: &
con_g, & ! Physical constant: gravitational constant
con_rd ! Physical constant: gas-constant for dry air
real(kind_phys), dimension(nCol,nLev), intent(in) :: &
real(kind_phys), dimension(:,:), intent(in) :: &
tv_lay, & ! Virtual temperature (K)
p_lay, & ! Pressure at model-layers (Pa)
effrin_cldliq, & ! Effective radius for liquid cloud-particles (microns)
effrin_cldice, & ! Effective radius for ice cloud-particles (microns)
effrin_cldrain, & ! Effective radius for rain cloud-particles (microns)
effrin_cldsnow ! Effective radius for snow cloud-particles (microns)
real(kind_phys), dimension(nCol,nLev+1), intent(in) :: &
real(kind_phys), dimension(:,:), intent(in) :: &
p_lev ! Pressure at model-level interfaces (Pa)
real(kind_phys), dimension(nCol, nLev, nTracers),intent(in) :: &
real(kind_phys), dimension(:,:,:),intent(in) :: &
tracer ! Cloud condensate amount in layer by type ()

! Outputs
real(kind_phys), dimension(nCol,nLev),intent(inout) :: &
real(kind_phys), dimension(:,:),intent(inout) :: &
cld_frac, & ! Total cloud fraction
cld_lwp, & ! Cloud liquid water path
cld_reliq, & ! Cloud liquid effective radius
Expand Down
2 changes: 1 addition & 1 deletion physics/GFS_rrtmgp_sw_pre.F90
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ end subroutine GFS_rrtmgp_sw_pre_init
!> \section arg_table_GFS_rrtmgp_sw_pre_run
!! \htmlinclude GFS_rrtmgp_sw_pre.html
!!
subroutine GFS_rrtmgp_sw_pre_run(me, nCol, nLev, lndp_type, n_var_lndp,lndp_var_list, &
subroutine GFS_rrtmgp_sw_pre_run(me, nCol, nLev, n_var_lndp, lndp_type, lndp_var_list, &
lndp_prt_list, doSWrad, solhr, lon, coslat, sinlat, snowd, sncovr, snoalb, zorl, &
tsfg, tsfa, hprime, alvsf, alnsf, alvwf, alnwf, facsf, facwf, fice, tisfc, albdvis, &
albdnir, albivis, albinir, lsmask, sfc_wts, p_lay, tv_lay, relhum, p_lev, &
Expand Down
Loading

0 comments on commit 88dbbec

Please sign in to comment.