diff --git a/physics/GFS_DCNV_generic.F90 b/physics/GFS_DCNV_generic.F90 index 14b728631d..6c214813bf 100644 --- a/physics/GFS_DCNV_generic.F90 +++ b/physics/GFS_DCNV_generic.F90 @@ -26,14 +26,14 @@ subroutine GFS_DCNV_generic_pre_run (im, levs, ldiag3d, qdiag3d, do_cnvgwd, cplc integer, intent(in) :: im, levs logical, intent(in) :: ldiag3d, qdiag3d, 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 - real(kind=kind_phys), dimension(im,levs), intent(inout) :: gq0_water_vapor - real(kind=kind_phys), dimension(im,levs), intent(inout) :: save_u - real(kind=kind_phys), dimension(im,levs), intent(inout) :: save_v - real(kind=kind_phys), dimension(im,levs), intent(inout) :: save_t - real(kind=kind_phys), dimension(im,levs), intent(inout) :: save_qv + real(kind=kind_phys), dimension(:,:), intent(in) :: gu0 + real(kind=kind_phys), dimension(:,:), intent(in) :: gv0 + real(kind=kind_phys), dimension(:,:), intent(in) :: gt0 + real(kind=kind_phys), dimension(:,:), intent(inout) :: gq0_water_vapor + real(kind=kind_phys), dimension(:,:), intent(inout) :: save_u + real(kind=kind_phys), dimension(:,:), intent(inout) :: save_v + real(kind=kind_phys), dimension(:,:), intent(inout) :: save_t + real(kind=kind_phys), dimension(:,:), intent(inout) :: save_qv ! dqdti only allocated if cplchm is .true. real(kind=kind_phys), dimension(:,:), intent(inout) :: dqdti character(len=*), intent(out) :: errmsg @@ -107,18 +107,18 @@ subroutine GFS_DCNV_generic_post_run (im, levs, lssav, ldiag3d, qdiag3d, ras, cs logical, intent(in) :: flag_for_dcnv_generic_tend real(kind=kind_phys), intent(in) :: frain, dtf - real(kind=kind_phys), dimension(im), intent(in) :: rain1, cld1d - real(kind=kind_phys), dimension(im,levs), intent(in) :: save_u, save_v, save_t, save_qv - real(kind=kind_phys), dimension(im,levs), intent(in) :: gu0, gv0, gt0, gq0_water_vapor - real(kind=kind_phys), dimension(im,levs), intent(in) :: ud_mf, dd_mf, dt_mf + real(kind=kind_phys), dimension(:), intent(in) :: rain1, cld1d + real(kind=kind_phys), dimension(:,:), intent(in) :: save_u, save_v, save_t, save_qv + real(kind=kind_phys), dimension(:,:), intent(in) :: gu0, gv0, gt0, gq0_water_vapor + real(kind=kind_phys), dimension(:,:), intent(in) :: ud_mf, dd_mf, dt_mf real(kind=kind_phys), intent(in) :: con_g integer, intent(in) :: npdf3d, num_p3d, ncnvcld3d - real(kind=kind_phys), dimension(im), intent(inout) :: rainc, cldwrk + real(kind=kind_phys), dimension(:), intent(inout) :: rainc, cldwrk ! dt3dt, dq3dt, du3dt, dv3dt upd_mf, dwn_mf, det_mf only allocated if ldiag3d == .true. real(kind=kind_phys), dimension(:,:), intent(inout) :: dt3dt, dq3dt, du3dt, dv3dt real(kind=kind_phys), dimension(:,:), intent(inout) :: upd_mf, dwn_mf, det_mf - real(kind=kind_phys), dimension(im,levs), intent(inout) :: cnvw, cnvc + real(kind=kind_phys), dimension(:,:), intent(inout) :: cnvw, cnvc ! The following arrays may not be allocated, depending on certain flags and microphysics schemes. ! Since Intel 15 crashes when passing unallocated arrays to arrays defined with explicit shape, ! use assumed-shape arrays. Note that Intel 18 and GNU 6.2.0-8.1.0 tolerate explicit-shape arrays diff --git a/physics/GFS_GWD_generic.F90 b/physics/GFS_GWD_generic.F90 index 94153d5325..c6bbcb5ea3 100644 --- a/physics/GFS_GWD_generic.F90 +++ b/physics/GFS_GWD_generic.F90 @@ -6,6 +6,9 @@ module GFS_GWD_generic_pre contains +!! \section arg_table_GFS_GWD_generic_pre_init Argument Table +!! \htmlinclude GFS_GWD_generic_pre_init.html +!! subroutine GFS_GWD_generic_pre_init() end subroutine GFS_GWD_generic_pre_init @@ -27,15 +30,15 @@ subroutine GFS_GWD_generic_pre_run( & implicit none integer, intent(in) :: im, levs, nmtvr - real(kind=kind_phys), intent(in) :: mntvar(im,nmtvr) + real(kind=kind_phys), intent(in) :: mntvar(:,:) real(kind=kind_phys), intent(out) :: & - & oc(im), oa4(im,4), clx(im,4), & + & oc(:), oa4(:,:), clx(:,:), & & varss(:), ocss(:), oa4ss(:,:), clxss(:,:), & - & theta(im), sigma(im), gamma(im), elvmax(im) + & theta(:), sigma(:), gamma(:), elvmax(:) logical, intent(in) :: lssav, ldiag3d, flag_for_gwd_generic_tend - real(kind=kind_phys), intent(in) :: dtdt(im,levs), dudt(im,levs), dvdt(im,levs) + real(kind=kind_phys), intent(in) :: dtdt(:,:), dudt(:,:), dvdt(:,:) ! dt3dt only allocated only if ldiag3d is .true. real(kind=kind_phys), intent(inout) :: dt3dt(:,:), du3dt(:,:), dv3dt(:,:) real(kind=kind_phys), intent(in) :: dtf @@ -132,6 +135,9 @@ subroutine GFS_GWD_generic_pre_run( & end subroutine GFS_GWD_generic_pre_run !> @} +!! \section arg_table_GFS_GWD_generic_pre_finalize Argument Table +!! \htmlinclude GFS_GWD_generic_pre_finalize.html +!! subroutine GFS_GWD_generic_pre_finalize() end subroutine GFS_GWD_generic_pre_finalize @@ -189,6 +195,9 @@ subroutine GFS_GWD_generic_post_run(lssav, ldiag3d, dtf, dusfcg, dvsfcg, dudt, d end subroutine GFS_GWD_generic_post_run !> @} +!! \section arg_table_GFS_GWD_generic_post_finalize Argument Table +!! \htmlinclude GFS_GWD_generic_post_finalize.html +!! subroutine GFS_GWD_generic_post_finalize() end subroutine GFS_GWD_generic_post_finalize diff --git a/physics/GFS_GWD_generic.meta b/physics/GFS_GWD_generic.meta index dc7ed7a708..d12bca3311 100644 --- a/physics/GFS_GWD_generic.meta +++ b/physics/GFS_GWD_generic.meta @@ -162,7 +162,7 @@ dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys - intent = inout + intent = in optional = F [dvdt] standard_name = tendency_of_y_wind_due_to_model_physics @@ -171,7 +171,7 @@ dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys - intent = inout + intent = in optional = F [dtdt] standard_name = tendency_of_air_temperature_due_to_model_physics diff --git a/physics/GFS_MP_generic.F90 b/physics/GFS_MP_generic.F90 index 43311801ab..04450b6126 100644 --- a/physics/GFS_MP_generic.F90 +++ b/physics/GFS_MP_generic.F90 @@ -12,18 +12,19 @@ end subroutine GFS_MP_generic_pre_init !> \section arg_table_GFS_MP_generic_pre_run Argument Table !! \htmlinclude GFS_MP_generic_pre_run.html !! - subroutine GFS_MP_generic_pre_run(im, levs, ldiag3d, qdiag3d, do_aw, ntcw, nncl, ntrac, gt0, gq0, save_t, save_qv, save_q, errmsg, errflg) + subroutine GFS_MP_generic_pre_run(im, levs, ldiag3d, qdiag3d, do_aw, ntcw, nncl, & + ntrac, gt0, gq0, save_t, save_qv, save_q, errmsg, errflg) ! use machine, only: kind_phys implicit none - integer, intent(in) :: im, levs, ntcw, nncl, ntrac - logical, intent(in) :: ldiag3d, qdiag3d, do_aw - real(kind=kind_phys), dimension(im, levs), intent(in) :: gt0 - real(kind=kind_phys), dimension(im, levs, ntrac), intent(in) :: gq0 + integer, intent(in) :: im, levs, ntcw, nncl, ntrac + logical, intent(in) :: ldiag3d, qdiag3d, do_aw + real(kind=kind_phys), dimension(:,:), intent(in) :: gt0 + real(kind=kind_phys), dimension(:,:,:), intent(in) :: gq0 - real(kind=kind_phys), dimension(im, levs), intent(inout) :: save_t, save_qv - real(kind=kind_phys), dimension(im, levs, ntrac), intent(inout) :: save_q + real(kind=kind_phys), dimension(:,:), intent(inout) :: save_t, save_qv + real(kind=kind_phys), dimension(:,:,:), intent(inout) :: save_q character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg @@ -100,41 +101,41 @@ subroutine GFS_MP_generic_post_run(im, levs, kdt, nrcm, ncld, nncl, ntcw, ntrac, integer, intent(in) :: imp_physics, imp_physics_gfdl, imp_physics_thompson, imp_physics_mg, imp_physics_fer_hires logical, intent(in) :: cal_pre, lssav, ldiag3d, qdiag3d, cplflx, cplchm - real(kind=kind_phys), intent(in) :: dtf, frain, con_g - real(kind=kind_phys), dimension(im), intent(in) :: rain1, xlat, xlon, tsfc - real(kind=kind_phys), dimension(im), intent(inout) :: ice, snow, graupel, rainc - real(kind=kind_phys), dimension(:), intent(in) :: rain0, ice0, snow0, graupel0 ! conditionally allocated in GFS_typedefs (imp_physics == GFDL or Thompson) - real(kind=kind_phys), dimension(im,nrcm), intent(in) :: rann - real(kind=kind_phys), dimension(im,levs), intent(in) :: gt0, prsl, save_t, save_qv, del - real(kind=kind_phys), dimension(im,levs+1), intent(in) :: prsi, phii - real(kind=kind_phys), dimension(im,levs,ntrac), intent(in) :: gq0 + real(kind=kind_phys), intent(in) :: dtf, frain, con_g + real(kind=kind_phys), dimension(:), intent(in) :: rain1, xlat, xlon, tsfc + real(kind=kind_phys), dimension(:), intent(inout) :: ice, snow, graupel, rainc + real(kind=kind_phys), dimension(:), intent(in) :: rain0, ice0, snow0, graupel0 + real(kind=kind_phys), dimension(:,:), intent(in) :: rann + real(kind=kind_phys), dimension(:,:), intent(in) :: gt0, prsl, save_t, save_qv, del + real(kind=kind_phys), dimension(:,:), intent(in) :: prsi, phii + real(kind=kind_phys), dimension(:,:,:), intent(in) :: gq0 - real(kind=kind_phys), dimension(im), intent(in ) :: sr - real(kind=kind_phys), dimension(im), intent(inout) :: rain, domr_diag, domzr_diag, domip_diag, doms_diag, tprcp, & - srflag, cnvprcp, totprcp, totice, totsnw, totgrp, cnvprcpb, & - totprcpb, toticeb, totsnwb, totgrpb, pwat - real(kind=kind_phys), dimension(:), intent(inout) :: rain_cpl, rainc_cpl, snow_cpl + real(kind=kind_phys), dimension(:), intent(in ) :: sr + real(kind=kind_phys), dimension(:), intent(inout) :: rain, domr_diag, domzr_diag, domip_diag, doms_diag, tprcp, & + srflag, cnvprcp, totprcp, totice, totsnw, totgrp, cnvprcpb, & + totprcpb, toticeb, totsnwb, totgrpb, pwat + real(kind=kind_phys), dimension(:), intent(inout) :: rain_cpl, rainc_cpl, snow_cpl - real(kind=kind_phys), dimension(:,:), intent(inout) :: dt3dt ! only if ldiag3d - real(kind=kind_phys), dimension(:,:), intent(inout) :: dq3dt ! only if ldiag3d and qdiag3d + real(kind=kind_phys), dimension(:,:), intent(inout) :: dt3dt ! only if ldiag3d + real(kind=kind_phys), dimension(:,:), intent(inout) :: dq3dt ! only if ldiag3d and qdiag3d ! Stochastic physics / surface perturbations - real(kind=kind_phys), dimension(:), intent(inout) :: drain_cpl, dsnow_cpl + real(kind=kind_phys), dimension(:), intent(inout) :: drain_cpl, dsnow_cpl ! Rainfall variables previous time step integer, intent(in) :: lsm, lsm_ruc, lsm_noahmp - real(kind=kind_phys), dimension(:), intent(inout) :: raincprv - real(kind=kind_phys), dimension(:), intent(inout) :: rainncprv - real(kind=kind_phys), dimension(:), intent(inout) :: iceprv - real(kind=kind_phys), dimension(:), intent(inout) :: snowprv - real(kind=kind_phys), dimension(:), intent(inout) :: graupelprv - real(kind=kind_phys), dimension(:), intent(inout) :: draincprv - real(kind=kind_phys), dimension(:), intent(inout) :: drainncprv - real(kind=kind_phys), dimension(:), intent(inout) :: diceprv - real(kind=kind_phys), dimension(:), intent(inout) :: dsnowprv - real(kind=kind_phys), dimension(:), intent(inout) :: dgraupelprv - - real(kind=kind_phys), intent(in) :: dtp + real(kind=kind_phys), dimension(:), intent(inout) :: raincprv + real(kind=kind_phys), dimension(:), intent(inout) :: rainncprv + real(kind=kind_phys), dimension(:), intent(inout) :: iceprv + real(kind=kind_phys), dimension(:), intent(inout) :: snowprv + real(kind=kind_phys), dimension(:), intent(inout) :: graupelprv + real(kind=kind_phys), dimension(:), intent(inout) :: draincprv + real(kind=kind_phys), dimension(:), intent(inout) :: drainncprv + real(kind=kind_phys), dimension(:), intent(inout) :: diceprv + real(kind=kind_phys), dimension(:), intent(inout) :: dsnowprv + real(kind=kind_phys), dimension(:), intent(inout) :: dgraupelprv + + real(kind=kind_phys), intent(in) :: dtp ! CCPP error handling character(len=*), intent(out) :: errmsg diff --git a/physics/GFS_MP_generic.meta b/physics/GFS_MP_generic.meta index c42b12c31b..fa4be3ea7c 100644 --- a/physics/GFS_MP_generic.meta +++ b/physics/GFS_MP_generic.meta @@ -105,7 +105,7 @@ dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys - intent = out + intent = inout optional = F [save_q] standard_name = tracer_concentration_save @@ -330,7 +330,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = in + intent = inout optional = F [rain1] standard_name = lwe_thickness_of_explicit_precipitation_amount diff --git a/physics/GFS_PBL_generic.F90 b/physics/GFS_PBL_generic.F90 index cd13e27212..5183836ec8 100644 --- a/physics/GFS_PBL_generic.F90 +++ b/physics/GFS_PBL_generic.F90 @@ -101,11 +101,11 @@ subroutine GFS_PBL_generic_pre_run (im, levs, nvdiff, ntrac, integer, intent(in) :: imp_physics_zhao_carr, imp_physics_mg, imp_physics_fer_hires logical, intent(in) :: cplchm, ltaerosol, hybedmf, do_shoc, satmedmf - real(kind=kind_phys), dimension(im, levs, ntrac), intent(in) :: qgrs - real(kind=kind_phys), dimension(im, levs), intent(in) :: ugrs, vgrs, tgrs - real(kind=kind_phys), dimension(im, levs, nvdiff), intent(inout) :: vdftra - real(kind=kind_phys), dimension(im, levs), intent(out) :: save_u, save_v, save_t - real(kind=kind_phys), dimension(im, levs, ntrac), intent(out) :: save_q + real(kind=kind_phys), dimension(:,:,:), intent(in) :: qgrs + real(kind=kind_phys), dimension(:,:), intent(in) :: ugrs, vgrs, tgrs + real(kind=kind_phys), dimension(:,:, :), intent(inout) :: vdftra + real(kind=kind_phys), dimension(:,:), intent(out) :: save_u, save_v, save_t + real(kind=kind_phys), dimension(:,:, :), intent(out) :: save_q ! CCPP error handling variables character(len=*), intent(out) :: errmsg @@ -336,8 +336,8 @@ subroutine GFS_PBL_generic_post_run (im, levs, nvdiff, ntrac, integer, intent(in) :: kdt logical, intent(in) :: flag_for_pbl_generic_tend - real(kind=kind_phys), dimension(im, levs), intent(in) :: save_u, save_v, save_t - real(kind=kind_phys), dimension(im, levs, ntrac), intent(in) :: save_q + real(kind=kind_phys), dimension(:,:), intent(in) :: save_u, save_v, save_t + real(kind=kind_phys), dimension(:,:, :), intent(in) :: save_q real(kind=kind_phys), intent(in) :: dtf real(kind=kind_phys), intent(in) :: rd, cp, fvirt, hvap @@ -346,14 +346,14 @@ subroutine GFS_PBL_generic_post_run (im, levs, nvdiff, ntrac, real(kind=kind_phys), dimension(:), intent(in) :: dusfc_cice, dvsfc_cice, dtsfc_cice, dqsfc_cice, & wind, stress_wat, hflx_wat, evap_wat, ugrs1, vgrs1 - real(kind=kind_phys), dimension(im, levs, ntrac), intent(in) :: qgrs - real(kind=kind_phys), dimension(im, levs), intent(in) :: ugrs, vgrs, tgrs + real(kind=kind_phys), dimension(:,:, :), intent(in) :: qgrs + real(kind=kind_phys), dimension(:,:), intent(in) :: ugrs, vgrs, tgrs - 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 + real(kind=kind_phys), dimension(:,:, :), intent(in) :: dvdftra + real(kind=kind_phys), dimension(:), intent(in) :: dusfc1, dvsfc1, dtsfc1, dqsfc1, xmu + real(kind=kind_phys), dimension(:,:), intent(in) :: dudt, dvdt, dtdt, htrsw, htrlw - real(kind=kind_phys), dimension(im, levs, ntrac), intent(inout) :: dqdt + real(kind=kind_phys), dimension(:,:, :), intent(inout) :: dqdt ! The following arrays may not be allocated, depending on certain flags (cplflx, ...). ! Since Intel 15 crashes when passing unallocated arrays to arrays defined with explicit shape, @@ -370,7 +370,7 @@ subroutine GFS_PBL_generic_post_run (im, levs, nvdiff, ntrac, real(kind=kind_phys), dimension(:,:), intent(in) :: dkt ! From canopy heat storage - reduction factors in latent/sensible heat flux due to surface roughness - real(kind=kind_phys), dimension(im), intent(in) :: hffac, hefac + real(kind=kind_phys), dimension(:), intent(in) :: hffac, hefac character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg diff --git a/physics/GFS_PBL_generic.meta b/physics/GFS_PBL_generic.meta index 3cf93d54e4..01f5ec3cea 100644 --- a/physics/GFS_PBL_generic.meta +++ b/physics/GFS_PBL_generic.meta @@ -1334,18 +1334,18 @@ kind = kind_phys intent = in optional = F -[hefac] - standard_name = surface_upward_latent_heat_flux_reduction_factor - long_name = surface upward latent heat flux reduction factor from canopy heat storage +[hffac] + standard_name = surface_upward_sensible_heat_flux_reduction_factor + long_name = surface upward sensible heat flux reduction factor from canopy heat storage units = none dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in optional = F -[hffac] - standard_name = surface_upward_sensible_heat_flux_reduction_factor - long_name = surface upward sensible heat flux reduction factor from canopy heat storage +[hefac] + standard_name = surface_upward_latent_heat_flux_reduction_factor + long_name = surface upward latent heat flux reduction factor from canopy heat storage units = none dimensions = (horizontal_loop_extent) type = real diff --git a/physics/GFS_SCNV_generic.F90 b/physics/GFS_SCNV_generic.F90 index ae8fac5f9f..450f0e5a9f 100644 --- a/physics/GFS_SCNV_generic.F90 +++ b/physics/GFS_SCNV_generic.F90 @@ -23,9 +23,9 @@ subroutine GFS_SCNV_generic_pre_run (im, levs, ldiag3d, qdiag3d, gu0, gv0, gt0, integer, intent(in) :: im, levs logical, intent(in) :: ldiag3d, qdiag3d, flag_for_scnv_generic_tend - real(kind=kind_phys), dimension(im,levs), intent(in) :: gu0, gv0, gt0, gq0_water_vapor + real(kind=kind_phys), dimension(:, :), intent(in) :: gu0, gv0, gt0, gq0_water_vapor - real(kind=kind_phys), dimension(im,levs), intent(inout) :: save_u, save_v, save_t, save_qv + real(kind=kind_phys), dimension(:, :), intent(inout) :: save_u, save_v, save_t, save_qv character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg @@ -84,20 +84,20 @@ subroutine GFS_SCNV_generic_post_run (im, levs, nn, lssav, ldiag3d, qdiag3d, cpl integer, intent(in) :: im, levs, nn logical, intent(in) :: lssav, ldiag3d, qdiag3d, cplchm, flag_for_scnv_generic_tend real(kind=kind_phys), intent(in) :: frain - real(kind=kind_phys), dimension(im,levs), intent(in) :: gu0, gv0, gt0, gq0_water_vapor - real(kind=kind_phys), dimension(im,levs), intent(in) :: save_u, save_v, save_t, save_qv + real(kind=kind_phys), dimension(:, :), intent(in) :: gu0, gv0, gt0, gq0_water_vapor + real(kind=kind_phys), dimension(:, :), intent(in) :: save_u, save_v, save_t, save_qv ! dqdti, dt3dt, dq3dt, only allocated if ldiag3d == .true. real(kind=kind_phys), dimension(:,:), intent(inout) :: dqdti real(kind=kind_phys), dimension(:,:), intent(inout) :: du3dt, dv3dt, dt3dt, dq3dt - real(kind=kind_phys), dimension(im,levs,nn), intent(inout) :: clw + real(kind=kind_phys), dimension(:, :,:), intent(inout) :: clw ! Post code for SAS/SAMF integer, intent(in) :: npdf3d, num_p3d, ncnvcld3d logical, intent(in) :: shcnvcw - real(kind=kind_phys), dimension(im), intent(in) :: rain1 - real(kind=kind_phys), dimension(im,levs), intent(in) :: cnvw, cnvc - real(kind=kind_phys), dimension(im), intent(inout) :: rainc, cnvprcp, cnvprcpb + real(kind=kind_phys), dimension(:), intent(in) :: rain1 + real(kind=kind_phys), dimension(:, :), intent(in) :: cnvw, cnvc + real(kind=kind_phys), dimension(:), intent(inout) :: rainc, cnvprcp, cnvprcpb ! The following arrays may not be allocated, depending on certain flags and microphysics schemes. ! Since Intel 15 crashes when passing unallocated arrays to arrays defined with explicit shape, ! use assumed-shape arrays. Note that Intel 18 and GNU 6.2.0-8.1.0 tolerate explicit-shape arrays diff --git a/physics/GFS_SCNV_generic.meta b/physics/GFS_SCNV_generic.meta index a3122da714..dea2f039c0 100644 --- a/physics/GFS_SCNV_generic.meta +++ b/physics/GFS_SCNV_generic.meta @@ -82,7 +82,7 @@ dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys - intent = out + intent = inout optional = F [save_v] standard_name = y_wind_save @@ -91,7 +91,7 @@ dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys - intent = out + intent = inout optional = F [save_t] standard_name = air_temperature_save @@ -100,7 +100,7 @@ dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys - intent = out + intent = inout optional = F [save_qv] standard_name = water_vapor_specific_humidity_save @@ -109,7 +109,7 @@ dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys - intent = out + intent = inout optional = F [flag_for_scnv_generic_tend] standard_name = flag_for_generic_shallow_convection_tendency @@ -179,17 +179,17 @@ type = logical intent = in optional = F -[qdiag3d] - standard_name = flag_tracer_diagnostics_3D - long_name = flag for 3d tracer diagnostic fields +[ldiag3d] + standard_name = flag_diagnostics_3D + long_name = flag for 3d diagnostic fields units = flag dimensions = () type = logical intent = in optional = F -[ldiag3d] - standard_name = flag_diagnostics_3D - long_name = flag for 3d diagnostic fields +[qdiag3d] + standard_name = flag_tracer_diagnostics_3D + long_name = flag for 3d tracer diagnostic fields units = flag dimensions = () type = logical diff --git a/physics/GFS_cloud_diagnostics.F90 b/physics/GFS_cloud_diagnostics.F90 index 1a7258b104..215143bb27 100644 --- a/physics/GFS_cloud_diagnostics.F90 +++ b/physics/GFS_cloud_diagnostics.F90 @@ -41,7 +41,7 @@ end subroutine GFS_cloud_diagnostics_init !! subroutine GFS_cloud_diagnostics_run(nCol, nLev, lsswr, lslwr, lat, de_lgth, p_lay, & cld_frac, p_lev, deltaZ, cloud_overlap_param, precip_overlap_param, con_pi, & - mbota, mtopa, cldsa, errmsg, errflg) + mtopa, mbota, cldsa, errmsg, errflg) implicit none ! Inputs @@ -53,15 +53,15 @@ subroutine GFS_cloud_diagnostics_run(nCol, nLev, lsswr, lslwr, lat, de_lgth, p_l lslwr ! Call LW radiation real(kind_phys), intent(in) :: & con_pi ! Physical constant: pi - real(kind_phys), dimension(nCol), intent(in) :: & + real(kind_phys), dimension(:), intent(in) :: & lat, & ! Latitude de_lgth ! Decorrelation length - real(kind_phys), dimension(nCol,nLev), intent(in) :: & + real(kind_phys), dimension(:,:), intent(in) :: & p_lay, & ! Pressure at model-layer cld_frac ! Total cloud fraction - real(kind_phys), dimension(nCol,nLev+1), intent(in) :: & + real(kind_phys), dimension(:,:), intent(in) :: & p_lev ! Pressure at model interfaces - real(kind_phys), dimension(nCol,nLev), intent(in) :: & + real(kind_phys), dimension(:,:), intent(in) :: & deltaZ, & ! Layer thickness (km) cloud_overlap_param, & ! Cloud-overlap parameter precip_overlap_param ! Precipitation overlap parameter @@ -71,10 +71,10 @@ subroutine GFS_cloud_diagnostics_run(nCol, nLev, lsswr, lslwr, lat, de_lgth, p_l errmsg ! Error message integer, intent(out) :: & errflg ! Error flag - integer,dimension(ncol,3),intent(out) :: & + integer,dimension(:,:),intent(out) :: & mbota, & ! Vertical indices for cloud tops mtopa ! Vertical indices for cloud bases - real(kind_phys), dimension(ncol,5), intent(out) :: & + real(kind_phys), dimension(:,:), intent(out) :: & cldsa ! Fraction of clouds for low, middle, high, total and BL ! Local variables @@ -136,7 +136,7 @@ subroutine hml_cloud_diagnostics_initialize(imp_physics, imp_physics_fer_hires, integer, intent(in) :: & nLev, & ! Number of vertical-layers mpi_rank - real(kind_phys), dimension(nLev+1), intent(in) :: & + real(kind_phys), dimension(:), intent(in) :: & sigmainit ! Outputs integer, intent(out) :: & diff --git a/physics/GFS_cloud_diagnostics.meta b/physics/GFS_cloud_diagnostics.meta index e87b19f754..1e68928f02 100644 --- a/physics/GFS_cloud_diagnostics.meta +++ b/physics/GFS_cloud_diagnostics.meta @@ -47,6 +47,15 @@ intent = in kind = kind_phys optional = F +[de_lgth] + standard_name = cloud_decorrelation_length + long_name = cloud decorrelation length + units = km + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F [p_lay] standard_name = air_pressure_at_layer_for_RRTMGP_in_hPa long_name = air pressure at vertical layer for radiation calculation @@ -74,31 +83,6 @@ kind = kind_phys intent = in optional = F -[mtopa] - standard_name = model_layer_number_at_cloud_top - long_name = vertical indices for low, middle and high cloud tops - units = index - dimensions = (horizontal_loop_extent,3) - type = integer - intent = out - optional = F -[mbota] - standard_name = model_layer_number_at_cloud_base - long_name = vertical indices for low, middle and high cloud bases - units = index - dimensions = (horizontal_loop_extent,3) - type = integer - intent = out - optional = F -[de_lgth] - standard_name = cloud_decorrelation_length - long_name = cloud decorrelation length - units = km - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F [deltaZ] standard_name = layer_thickness long_name = layer_thickness @@ -135,6 +119,22 @@ kind = kind_phys intent = in optional = F +[mtopa] + standard_name = model_layer_number_at_cloud_top + long_name = vertical indices for low, middle and high cloud tops + units = index + dimensions = (horizontal_loop_extent,3) + type = integer + intent = out + optional = F +[mbota] + standard_name = model_layer_number_at_cloud_base + long_name = vertical indices for low, middle and high cloud bases + units = index + dimensions = (horizontal_loop_extent,3) + type = integer + intent = out + optional = F [cldsa] standard_name = cloud_area_fraction_for_radiation long_name = fraction of clouds for low, middle, high, total and BL diff --git a/physics/GFS_debug.F90 b/physics/GFS_debug.F90 index 2d7f5616f1..99f36f0777 100644 --- a/physics/GFS_debug.F90 +++ b/physics/GFS_debug.F90 @@ -1543,5 +1543,4 @@ subroutine GFS_checkland_run (me, master, blkno, im, kdt, iter, flag_iter, flag_ end do end subroutine GFS_checkland_run - end module GFS_checkland diff --git a/physics/GFS_phys_time_vary.fv3.meta b/physics/GFS_phys_time_vary.fv3.meta index 373e36846b..f9ce50fa0e 100644 --- a/physics/GFS_phys_time_vary.fv3.meta +++ b/physics/GFS_phys_time_vary.fv3.meta @@ -1672,7 +1672,6 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - active = (flag_for_nsstm_run > 0) intent = inout optional = F [tsfc] diff --git a/physics/GFS_phys_time_vary.scm.F90 b/physics/GFS_phys_time_vary.scm.F90 index fb46de2bd1..9fa4e2de33 100644 --- a/physics/GFS_phys_time_vary.scm.F90 +++ b/physics/GFS_phys_time_vary.scm.F90 @@ -18,7 +18,7 @@ module GFS_phys_time_vary use h2ointerp, only : read_h2odata, setindxh2o, h2ointerpol use aerclm_def, only : aerin, aer_pres, ntrcaer, ntrcaerm - use aerinterp, only : read_aerdata, setindxaer, aerinterpol + use aerinterp, only : read_aerdata, setindxaer, aerinterpol, read_aerdataf use iccn_def, only : ciplin, ccnin, ci_pres use iccninterp, only : read_cidata, setindxci, ciinterpol @@ -160,7 +160,7 @@ subroutine GFS_phys_time_vary_init ( integer, intent(out) :: errflg ! Local variables - integer :: i, j, ix, vegtyp + integer :: i, j, ix, vegtyp, iamin, iamax, jamin, jamax real(kind_phys) :: rsnow !--- Noah MP @@ -176,7 +176,11 @@ subroutine GFS_phys_time_vary_init ( errflg = 0 if (is_initialized) return - + iamin=999 + iamax=-999 + jamin=999 + jamax=-999 + !> - Call read_o3data() to read ozone data call read_o3data (ntoz, me, master) @@ -270,6 +274,10 @@ subroutine GFS_phys_time_vary_init ( jindx2_aer, ddy_aer, xlon_d, & iindx1_aer, iindx2_aer, ddx_aer, & me, master) + iamin=min(minval(iindx1_aer), iamin) + iamax=max(maxval(iindx2_aer), iamax) + jamin=min(minval(jindx1_aer), jamin) + jamax=max(maxval(jindx2_aer), jamax) endif !> - Call setindxci() to initialize IN and CCN data @@ -322,6 +330,14 @@ subroutine GFS_phys_time_vary_init ( sncovr_ice(:) = sncovr(:) endif endif + + if (errflg/=0) return + + if (iaerclm) then + call read_aerdataf (iamin, iamax, jamin, jamax, me, master, iflip, & + idate, errmsg, errflg) + if (errflg/=0) return + end if if (lsm == lsm_noahmp) then if (all(tvxy <= zero)) then @@ -371,16 +387,20 @@ subroutine GFS_phys_time_vary_init ( tsnoxy (:,:) = missing_value smoiseq(:,:) = missing_value zsnsoxy(:,:) = missing_value - + + imn = idate(2) + do ix=1,im if (landfrac(ix) >= drythresh) then tvxy(ix) = tsfcl(ix) tgxy(ix) = tsfcl(ix) tahxy(ix) = tsfcl(ix) - if (snowd(ix) > 0.01_kind_phys .and. tsfcl(ix) > con_t0c ) tvxy(ix) = con_t0c - if (snowd(ix) > 0.01_kind_phys .and. tsfcl(ix) > con_t0c ) tgxy(ix) = con_t0c - if (snowd(ix) > 0.01_kind_phys .and. tsfcl(ix) > con_t0c ) tahxy(ix) = con_t0c + if (snowd(ix) > 0.01_kind_phys .and. tsfcl(ix) > con_t0c ) then + tvxy(ix) = con_t0c + tgxy(ix) = con_t0c + tahxy(ix) = con_t0c + end if canicexy(ix) = 0.0_kind_phys canliqxy(ix) = canopy(ix) @@ -404,14 +424,12 @@ subroutine GFS_phys_time_vary_init ( albinir(ix) = 0.2_kind_phys emiss(ix) = 0.95_kind_phys - waxy(ix) = 4900.0_kind_phys wtxy(ix) = waxy(ix) zwtxy(ix) = (25.0_kind_phys + 2.0_kind_phys) - waxy(ix) / 1000.0_kind_phys / 0.2_kind_phys vegtyp = vtype(ix) if (vegtyp == 0) vegtyp = 7 - imn = idate(2) if ((vegtyp == isbarren_table) .or. (vegtyp == isice_table) .or. (vegtyp == isurban_table) .or. (vegtyp == iswater_table)) then @@ -491,9 +509,8 @@ subroutine GFS_phys_time_vary_init ( dzsno(-1) = 0.20_kind_phys dzsno(0) = snd - 0.05_kind_phys - 0.20_kind_phys else - errmsg = 'Error in GFS_phys_time_vary.fv3.F90: Problem with the logic assigning snow layers in Noah MP initialization' + errmsg = 'Error in GFS_phys_time_vary.scm.F90: Problem with the logic assigning snow layers in Noah MP initialization' errflg = 1 - return endif ! Now we have the snowxy field @@ -570,6 +587,8 @@ subroutine GFS_phys_time_vary_init ( enddo ! ix + if (errflg/=0) return + deallocate(dzsno) deallocate(dzsnso) @@ -619,7 +638,7 @@ subroutine GFS_phys_time_vary_timestep_init ( jindx1_aer, jindx2_aer, ddy_aer, iindx1_aer, iindx2_aer, ddx_aer, aer_nm, & jindx1_ci, jindx2_ci, ddy_ci, iindx1_ci, iindx2_ci, ddx_ci, in_nm, ccn_nm, & imap, jmap, prsl, seed0, rann, do_ugwp_v1, jindx1_tau, jindx2_tau, ddy_j1tau, ddy_j2tau,& - tau_amf, errmsg, errflg) + tau_amf, nthrds, errmsg, errflg) implicit none @@ -648,6 +667,7 @@ subroutine GFS_phys_time_vary_timestep_init ( integer, intent(in) :: jindx1_tau(:), jindx2_tau(:) real(kind_phys), intent(in) :: ddy_j1tau(:), ddy_j2tau(:) real(kind_phys), intent(inout) :: tau_amf(:) + integer, intent(in) :: nthrds character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg @@ -724,21 +744,12 @@ subroutine GFS_phys_time_vary_timestep_init ( h2opl, ddy_h) endif -!> - Call aerinterpol() to make aerosol interpolation - if (iaerclm) then - call aerinterpol (me, master, im, idate, fhour, & - jindx1_aer, jindx2_aer, & - ddy_aer, iindx1_aer, & - iindx2_aer, ddx_aer, & - levs, prsl, aer_nm) - endif - !> - Call ciinterpol() to make IN and CCN data interpolation if (iccn == 1) then - call ciinterpol (me, im, idate, fhour, & - jindx1_ci, jindx2_ci, & - ddy_ci, iindx1_ci, & - iindx2_ci, ddx_ci, & + call ciinterpol (me, im, idate, fhour, & + jindx1_ci, jindx2_ci, & + ddy_ci, iindx1_ci, & + iindx2_ci, ddx_ci, & levs, prsl, in_nm, ccn_nm) endif @@ -749,6 +760,17 @@ subroutine GFS_phys_time_vary_timestep_init ( ddy_j1tau, ddy_j2tau, tau_amf) endif +!> - Call aerinterpol() to make aerosol interpolation + if (iaerclm) then + ! aerinterpol is using threading inside, don't + ! move into OpenMP parallel section above + call aerinterpol (me, master, nthrds, im, idate, & + fhour, jindx1_aer, jindx2_aer,& + ddy_aer, iindx1_aer, & + iindx2_aer, ddx_aer, & + levs, prsl, aer_nm) + endif + ! Not needed for SCM: !> - Call gcycle() to repopulate specific time-varying surface properties for AMIP/forecast runs !if (nscyc > 0) then diff --git a/physics/GFS_phys_time_vary.scm.meta b/physics/GFS_phys_time_vary.scm.meta index 1edaa32c81..74408d533a 100644 --- a/physics/GFS_phys_time_vary.scm.meta +++ b/physics/GFS_phys_time_vary.scm.meta @@ -1462,6 +1462,14 @@ kind = kind_phys intent = inout optional = F +[nthrds] + standard_name = omp_threads + long_name = number of OpenMP threads available for physics schemes + units = count + dimensions = () + type = integer + intent = in + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP diff --git a/physics/GFS_rrtmg_pre.F90 b/physics/GFS_rrtmg_pre.F90 index e3ae929ba6..158067c05e 100644 --- a/physics/GFS_rrtmg_pre.F90 +++ b/physics/GFS_rrtmg_pre.F90 @@ -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 @@ -122,54 +122,52 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, & real(kind=kind_phys), dimension(:,:), intent(inout) :: effrl_inout, & effri_inout, & effrs_inout - real(kind=kind_phys), dimension(im,lm+LTP), intent(inout) :: clouds1, & + real(kind=kind_phys), dimension(:,:), intent(inout) :: clouds1, & clouds2, clouds3, & clouds4, clouds5 - integer, intent(out) :: kd, kt, kb - - integer, dimension(im,3), intent(out) :: mbota, mtopa - - real(kind=kind_phys), intent(out) :: raddt - - real(kind=kind_phys), dimension(im), intent(out) :: tsfg, tsfa - real(kind=kind_phys), dimension(im), intent(out) :: de_lgth, & - alb1d - - real(kind=kind_phys), dimension(im,lm+LTP), intent(out) :: delp, dz, & - plyr, tlyr, & - qlyr, olyr - - real(kind=kind_phys), dimension(im,lm+1+LTP), intent(out) :: plvl, tlvl - - - - real(kind=kind_phys), dimension(im,lm+LTP), intent(out) :: gasvmr_co2, & - gasvmr_n2o, & - gasvmr_ch4, & - gasvmr_o2, & - gasvmr_co, & - gasvmr_cfc11,& - gasvmr_cfc12,& - gasvmr_cfc22,& - gasvmr_ccl4,& - gasvmr_cfc113 - real(kind=kind_phys), dimension(im,NSPC1), intent(out) :: aerodp - real(kind=kind_phys), dimension(im,lm+LTP), intent(out) :: clouds6, & - clouds7, & - clouds8, & - clouds9, & - cldfra - real(kind=kind_phys), dimension(im,5), intent(out) :: cldsa - - real(kind=kind_phys), dimension(im,lm+LTP,NBDSW), intent(out) :: faersw1,& - faersw2,& - faersw3 - - real(kind=kind_phys), dimension(im,lm+LTP,NBDLW), intent(out) :: faerlw1,& - faerlw2,& - faerlw3 - real(kind=kind_phys), dimension(im,lm+LTP), intent(out) :: alpha + integer, intent(out) :: kd, kt, kb + + integer, dimension(:,:), intent(out) :: mbota, mtopa + + real(kind=kind_phys), intent(out) :: raddt + + real(kind=kind_phys), dimension(:), intent(out) :: tsfg, tsfa + real(kind=kind_phys), dimension(:), intent(out) :: de_lgth, & + alb1d + + real(kind=kind_phys), dimension(:,:), intent(out) :: delp, dz, & + plyr, tlyr, & + qlyr, olyr + + real(kind=kind_phys), dimension(:,:), intent(out) :: plvl, tlvl + + real(kind=kind_phys), dimension(:,:), intent(out) :: gasvmr_co2, & + gasvmr_n2o, & + gasvmr_ch4, & + gasvmr_o2, & + gasvmr_co, & + gasvmr_cfc11,& + gasvmr_cfc12,& + gasvmr_cfc22,& + gasvmr_ccl4,& + gasvmr_cfc113 + real(kind=kind_phys), dimension(:,:), intent(out) :: aerodp + real(kind=kind_phys), dimension(:,:), intent(out) :: clouds6, & + clouds7, & + clouds8, & + clouds9, & + cldfra + real(kind=kind_phys), dimension(:,:), intent(out) :: cldsa + + real(kind=kind_phys), dimension(:,:,:), intent(out) :: faersw1,& + faersw2,& + faersw3 + + real(kind=kind_phys), dimension(:,:,:), intent(out) :: faerlw1,& + faerlw2,& + faerlw3 + real(kind=kind_phys), dimension(:,:), intent(out) :: alpha character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg diff --git a/physics/GFS_rrtmg_pre.meta b/physics/GFS_rrtmg_pre.meta index e26cdeac1f..344befa97b 100644 --- a/physics/GFS_rrtmg_pre.meta +++ b/physics/GFS_rrtmg_pre.meta @@ -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 @@ -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 @@ -1194,4 +1194,3 @@ type = integer intent = out optional = F - diff --git a/physics/GFS_rrtmg_setup.F90 b/physics/GFS_rrtmg_setup.F90 index dd2a19b5d7..9d0e426432 100644 --- a/physics/GFS_rrtmg_setup.F90 +++ b/physics/GFS_rrtmg_setup.F90 @@ -165,7 +165,7 @@ subroutine GFS_rrtmg_setup_init ( & implicit none ! interface variables - real (kind=kind_phys), intent(in) :: si(levr+1) + real (kind=kind_phys), intent(in) :: si(:) integer, intent(in) :: levr integer, intent(in) :: ictm integer, intent(in) :: isol @@ -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 diff --git a/physics/GFS_rrtmgp_cloud_overlap_pre.F90 b/physics/GFS_rrtmgp_cloud_overlap_pre.F90 index 031a50b9eb..edd3aab93b 100644 --- a/physics/GFS_rrtmgp_cloud_overlap_pre.F90 +++ b/physics/GFS_rrtmgp_cloud_overlap_pre.F90 @@ -21,13 +21,13 @@ 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 - integer, intent(in) :: & + integer, intent(in) :: & nCol, & ! Number of horizontal grid points nLev, & ! Number of vertical layers yearlen, & ! Length of current year (365/366) WTF? @@ -39,7 +39,7 @@ subroutine GFS_rrtmgp_cloud_overlap_pre_run(nCol, nLev, yearlen, doSWrad, doLWra idcor_con, & ! Flag for decorrelation-length. Use constant value idcor_hogan, & ! Flag for decorrelation-length. (https://rmets.onlinelibrary.wiley.com/doi/full/10.1002/qj.647) idcor_oreopoulos ! Flag for decorrelation-length. (10.5194/acp-12-9097-2012) - logical, intent(in) :: & + logical, intent(in) :: & doSWrad, & ! Call SW radiation? doLWrad ! Call LW radiation real(kind_phys), intent(in) :: & @@ -49,19 +49,19 @@ subroutine GFS_rrtmgp_cloud_overlap_pre_run(nCol, nLev, yearlen, doSWrad, doLWra con_rd, & ! Physical constant: gas-constant for dry air con_epsq, & ! Physical constant: Minimum value for specific humidity dcorr_con ! Decorrelation-length (used if idcor = idcor_con) - real(kind_phys), dimension(nCol), intent(in) :: & + real(kind_phys), dimension(:), intent(in) :: & lat ! Latitude - 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) cld_frac ! Total cloud fraction - real(kind_phys), dimension(nCol,nLev+1), intent(in) :: & + real(kind_phys), dimension(:,:), intent(in) :: & p_lev ! Pressure at model-level interfaces (Pa) ! Outputs - real(kind_phys), dimension(nCol),intent(out) :: & + real(kind_phys), dimension(:),intent(out) :: & de_lgth ! Decorrelation length - real(kind_phys), dimension(nCol,nLev),intent(out) :: & + real(kind_phys), dimension(:,:),intent(out) :: & cloud_overlap_param, & ! Cloud-overlap parameter precip_overlap_param, & ! Precipitation overlap parameter deltaZc ! Layer thickness (from layer-centers)(km) diff --git a/physics/GFS_rrtmgp_cloud_overlap_pre.meta b/physics/GFS_rrtmgp_cloud_overlap_pre.meta index b8e5c9b702..6e8cac89e8 100644 --- a/physics/GFS_rrtmgp_cloud_overlap_pre.meta +++ b/physics/GFS_rrtmgp_cloud_overlap_pre.meta @@ -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 @@ -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 @@ -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 @@ -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) @@ -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 diff --git a/physics/GFS_rrtmgp_gfdlmp_pre.F90 b/physics/GFS_rrtmgp_gfdlmp_pre.F90 index c6d6673c3d..ccbfd1df89 100644 --- a/physics/GFS_rrtmgp_gfdlmp_pre.F90 +++ b/physics/GFS_rrtmgp_gfdlmp_pre.F90 @@ -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 diff --git a/physics/GFS_rrtmgp_gfdlmp_pre.meta b/physics/GFS_rrtmgp_gfdlmp_pre.meta index 77a6f5d942..bb3b9fc9f4 100644 --- a/physics/GFS_rrtmgp_gfdlmp_pre.meta +++ b/physics/GFS_rrtmgp_gfdlmp_pre.meta @@ -39,62 +39,6 @@ type = integer intent = in optional = F -[doSWrad] - standard_name = flag_to_calc_sw - long_name = logical flags for sw radiation calls - units = flag - dimensions = () - type = logical - intent = in - optional = F -[doLWrad] - standard_name = flag_to_calc_lw - long_name = logical flags for lw radiation calls - units = flag - dimensions = () - type = logical - intent = in - optional = F -[effr_in] - standard_name = flag_for_cloud_effective_radii - long_name = flag for cloud effective radii calculations in GFDL microphysics - units = flag - dimensions = () - type = logical - intent = in - optional = F -[doGP_cldoptics_PADE] - standard_name = flag_to_calc_lw_cld_optics_using_RRTMGP_PADE - long_name = logical flag to control cloud optics scheme. - units = flag - dimensions = () - type = logical - intent = in - optional = F -[doGP_cldoptics_LUT] - standard_name = flag_to_calc_lw_cld_optics_using_RRTMGP_LUT - long_name = logical flag to control cloud optics scheme. - units = flag - dimensions = () - type = logical - intent = in - optional = F -[do_mynnedmf] - standard_name = do_mynnedmf - long_name = flag to activate MYNN-EDMF - units = flag - dimensions = () - type = logical - intent = in - optional = F -[kdt] - standard_name = index_of_time_step - long_name = current forecast iteration - units = index - dimensions = () - type = integer - intent = in - optional = F [i_cldliq] standard_name = index_for_liquid_cloud_condensate long_name = tracer index for cloud condensate (or liquid water) @@ -143,6 +87,73 @@ type = integer intent = in optional = F +[doSWrad] + standard_name = flag_to_calc_sw + long_name = logical flags for sw radiation calls + units = flag + dimensions = () + type = logical + intent = in + optional = F +[doLWrad] + standard_name = flag_to_calc_lw + long_name = logical flags for lw radiation calls + units = flag + dimensions = () + type = logical + intent = in + optional = F +[effr_in] + standard_name = flag_for_cloud_effective_radii + long_name = flag for cloud effective radii calculations in GFDL microphysics + units = flag + dimensions = () + type = logical + intent = in + optional = F +[kdt] + standard_name = index_of_time_step + long_name = current forecast iteration + units = index + dimensions = () + type = integer + intent = in + optional = F +[do_mynnedmf] + standard_name = do_mynnedmf + long_name = flag to activate MYNN-EDMF + units = flag + dimensions = () + type = logical + intent = in + optional = F +[p_lev] + standard_name = air_pressure_at_interface_for_RRTMGP_in_hPa + long_name = air pressure at vertical interface for radiation calculation + units = hPa + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = in + optional = F +[p_lay] + standard_name = air_pressure_at_layer_for_RRTMGP_in_hPa + long_name = air pressure at vertical layer for radiation calculation + units = hPa + dimensions = (horizontal_loop_extent,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[tv_lay] + standard_name = virtual_temperature + long_name = layer virtual temperature + units = K + dimensions = (horizontal_loop_extent,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F [effrin_cldliq] standard_name = effective_radius_of_stratiform_cloud_liquid_water_particle_in_um long_name = eff. radius of cloud liquid water particle in micrometer @@ -178,34 +189,7 @@ type = real kind = kind_phys intent = in - optional = F -[p_lev] - standard_name = air_pressure_at_interface_for_RRTMGP_in_hPa - long_name = air pressure at vertical interface for radiation calculation - units = hPa - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) - type = real - kind = kind_phys - intent = in - optional = F -[p_lay] - standard_name = air_pressure_at_layer_for_RRTMGP_in_hPa - long_name = air pressure at vertical layer for radiation calculation - units = hPa - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[tv_lay] - standard_name = virtual_temperature - long_name = layer virtual temperature - units = K - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = in - optional = F + optional = F [tracer] standard_name = chemical_tracers long_name = chemical tracers @@ -233,6 +217,22 @@ kind = kind_phys intent = in optional = F +[doGP_cldoptics_PADE] + standard_name = flag_to_calc_lw_cld_optics_using_RRTMGP_PADE + long_name = logical flag to control cloud optics scheme. + units = flag + dimensions = () + type = logical + intent = in + optional = F +[doGP_cldoptics_LUT] + standard_name = flag_to_calc_lw_cld_optics_using_RRTMGP_LUT + long_name = logical flag to control cloud optics scheme. + units = flag + dimensions = () + type = logical + intent = in + optional = F [cld_frac] standard_name = total_cloud_fraction long_name = layer total cloud fraction diff --git a/physics/GFS_rrtmgp_setup.F90 b/physics/GFS_rrtmgp_setup.F90 index 308456e06d..a55c84ae7c 100644 --- a/physics/GFS_rrtmgp_setup.F90 +++ b/physics/GFS_rrtmgp_setup.F90 @@ -56,14 +56,14 @@ subroutine GFS_rrtmgp_setup_init(imp_physics, imp_physics_fer_hires, imp_physics imp_physics_zhao_carr, & ! Flag for zhao-carr scheme imp_physics_zhao_carr_pdf, & ! Flag for zhao-carr+PDF scheme imp_physics_mg ! Flag for MG scheme - real(kind_phys), dimension(levr+1), intent(in) :: & + real(kind_phys), dimension(:), intent(in) :: & si integer, intent(in) :: levr, ictm, isol, ico2, iaer, ialb, iems, & ntcw, num_p3d, ntoz, iovr, isubc_sw, isubc_lw, & icliq_sw, iflip, me logical, intent(in) :: & crick_proof, ccnorm, norad_precip - integer, intent(in), dimension(4) :: & + integer, intent(in), dimension(:) :: & idate ! Outputs diff --git a/physics/GFS_rrtmgp_setup.meta b/physics/GFS_rrtmgp_setup.meta index 1237184d85..7890d3d487 100644 --- a/physics/GFS_rrtmgp_setup.meta +++ b/physics/GFS_rrtmgp_setup.meta @@ -38,6 +38,8 @@ units = flag dimensions = () type = integer + intent = in + optional = F [imp_physics_wsm6] intent = in optional = F diff --git a/physics/GFS_rrtmgp_sw_pre.F90 b/physics/GFS_rrtmgp_sw_pre.F90 index 4570805365..68f2a07c1c 100644 --- a/physics/GFS_rrtmgp_sw_pre.F90 +++ b/physics/GFS_rrtmgp_sw_pre.F90 @@ -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, & @@ -41,15 +41,15 @@ subroutine GFS_rrtmgp_sw_pre_run(me, nCol, nLev, lndp_type, n_var_lndp,lndp_var_ nLev, & ! Number of vertical layers n_var_lndp, & ! Number of surface variables perturbed lndp_type ! Type of land perturbations scheme used - character(len=3), dimension(n_var_lndp), intent(in) :: & + character(len=3), dimension(:), intent(in) :: & lndp_var_list - real(kind_phys), dimension(n_var_lndp), intent(in) :: & + real(kind_phys), dimension(:), intent(in) :: & lndp_prt_list logical,intent(in) :: & doSWrad ! Call RRTMGP SW radiation? real(kind_phys), intent(in) :: & solhr ! Time in hours after 00z at the current timestep - real(kind_phys), dimension(nCol), intent(in) :: & + real(kind_phys), dimension(:), intent(in) :: & lsmask, & ! Landmask: sea/land/ice=0/1/2 lon, & ! Longitude coslat, & ! Cosine(latitude) @@ -75,25 +75,25 @@ subroutine GFS_rrtmgp_sw_pre_run(me, nCol, nLev, lndp_type, n_var_lndp,lndp_var_ albivis, & ! surface albedo from lsm (diffuse,vis) (frac) albinir ! surface albedo from lsm (diffuse,nir) (frac) - real(kind_phys), dimension(nCol,n_var_lndp), intent(in) :: & + real(kind_phys), dimension(:,:), intent(in) :: & sfc_wts ! Weights for stochastic surface physics perturbation () - real(kind_phys), dimension(nCol,nLev),intent(in) :: & + real(kind_phys), dimension(:,:),intent(in) :: & p_lay, & ! Layer pressure tv_lay, & ! Layer virtual-temperature relhum ! Layer relative-humidity - real(kind_phys), dimension(nCol,nLev+1),intent(in) :: & + real(kind_phys), dimension(:,:),intent(in) :: & p_lev ! Pressure @ layer interfaces (Pa) ! Outputs integer, intent(out) :: & nday ! Number of daylit points - integer, dimension(ncol), intent(out) :: & + integer, dimension(:), intent(out) :: & idxday ! Indices for daylit points - real(kind_phys), dimension(ncol), intent(inout) :: & + real(kind_phys), dimension(:), intent(inout) :: & coszen, & ! Cosine of SZA coszdg, & ! Cosine of SZA, daytime sfc_alb_dif ! Mean surface diffused (nIR+uvvis) sw albedo - real(kind_phys), dimension(sw_gas_props%get_nband(),ncol), intent(out) :: & + real(kind_phys), dimension(:,:), intent(out) :: & sfc_alb_nir_dir, & ! Surface albedo (direct) sfc_alb_nir_dif, & ! Surface albedo (diffuse) sfc_alb_uvvis_dir, & ! Surface albedo (direct) diff --git a/physics/GFS_rrtmgp_sw_pre.meta b/physics/GFS_rrtmgp_sw_pre.meta index 5a165f9ad5..349750879f 100644 --- a/physics/GFS_rrtmgp_sw_pre.meta +++ b/physics/GFS_rrtmgp_sw_pre.meta @@ -30,7 +30,7 @@ dimensions = () type = integer intent = in - optional = F + optional = F [n_var_lndp] standard_name = number_of_land_surface_variables_perturbed long_name = number of land surface variables perturbed @@ -38,7 +38,7 @@ dimensions = () type = integer intent = in - optional = F + optional = F [lndp_type] standard_name = index_for_stochastic_land_surface_perturbation_type long_name = index for stochastic land surface perturbations type @@ -47,15 +47,6 @@ type = integer intent = in optional = F -[lndp_prt_list] - standard_name =magnitude_of_perturbations_for_landperts - long_name = magnitude of perturbations for landperts - units = variable - dimensions = (number_of_land_surface_variables_perturbed) - type = real - kind = kind_phys - intent = in - optional = F [lndp_var_list] standard_name = variables_to_be_perturbed_for_landperts long_name = variables to be perturbed for landperts @@ -65,6 +56,15 @@ kind = len=3 intent = in optional = F +[lndp_prt_list] + standard_name =magnitude_of_perturbations_for_landperts + long_name = magnitude of perturbations for landperts + units = variable + dimensions = (number_of_land_surface_variables_perturbed) + type = real + kind = kind_phys + intent = in + optional = F [doSWrad] standard_name = flag_to_calc_sw long_name = logical flags for sw radiation calls @@ -109,15 +109,6 @@ kind = kind_phys intent = in optional = F -[lsmask] - standard_name = sea_land_ice_mask_real - long_name = landmask: sea/land/ice=0/1/2 - units = flag - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F [snowd] standard_name = surface_snow_thickness_water_equivalent long_name = water equivalent snow depth @@ -243,7 +234,7 @@ type = real kind = kind_phys intent = in - optional = F + optional = F [tisfc] standard_name = sea_ice_temperature long_name = sea ice surface skin temperature @@ -289,6 +280,15 @@ kind = kind_phys intent = in optional = F +[lsmask] + standard_name = sea_land_ice_mask_real + long_name = landmask: sea/land/ice=0/1/2 + units = flag + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F [sfc_wts] standard_name = weights_for_stochastic_surface_physics_perturbation long_name = weights for stochastic surface physics perturbation @@ -298,6 +298,15 @@ kind = kind_phys intent = in optional = F +[p_lay] + standard_name = air_pressure_at_layer_for_RRTMGP_in_hPa + long_name = air pressure at vertical layer for radiation calculation + units = hPa + dimensions = (horizontal_loop_extent,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F [tv_lay] standard_name = virtual_temperature long_name = layer virtual temperature @@ -316,15 +325,6 @@ kind = kind_phys intent = in optional = F -[p_lay] - standard_name = air_pressure_at_layer_for_RRTMGP_in_hPa - long_name = air pressure at vertical layer for radiation calculation - units = hPa - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = in - optional = F [p_lev] standard_name = air_pressure_at_interface_for_RRTMGP_in_hPa long_name = air pressure at vertical interface for radiation calculation @@ -334,6 +334,40 @@ kind = kind_phys intent = in optional = F +[nday] + standard_name = daytime_points_dimension + long_name = daytime points dimension + units = count + dimensions = () + type = integer + intent = out + optional = F +[idxday] + standard_name = daytime_points + long_name = daytime points + units = index + dimensions = (horizontal_loop_extent) + type = integer + intent = out + optional = F +[coszen] + standard_name = cosine_of_zenith_angle + long_name = mean cos of zenith angle over rad call period + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[coszdg] + standard_name = daytime_mean_cosz_over_rad_call_period + long_name = daytime mean cosz over rad call period + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F [sfc_alb_nir_dir] standard_name = surface_albedo_nearIR_direct long_name = near-IR (direct) surface albedo (sfc_alb_nir_dir) @@ -370,40 +404,6 @@ kind = kind_phys intent = out optional = F -[nday] - standard_name = daytime_points_dimension - long_name = daytime points dimension - units = count - dimensions = () - type = integer - intent = out - optional = F -[idxday] - standard_name = daytime_points - long_name = daytime points - units = index - dimensions = (horizontal_loop_extent) - type = integer - intent = out - optional = F -[coszen] - standard_name = cosine_of_zenith_angle - long_name = mean cos of zenith angle over rad call period - units = none - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = inout - optional = F -[coszdg] - standard_name = daytime_mean_cosz_over_rad_call_period - long_name = daytime mean cosz over rad call period - units = none - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = inout - optional = F [sfc_alb_dif] standard_name = surface_diffused_shortwave_albedo long_name = mean surface diffused sw albedo diff --git a/physics/GFS_rrtmgp_thompsonmp_pre.F90 b/physics/GFS_rrtmgp_thompsonmp_pre.F90 index 72884b1688..85877704f2 100644 --- a/physics/GFS_rrtmgp_thompsonmp_pre.F90 +++ b/physics/GFS_rrtmgp_thompsonmp_pre.F90 @@ -77,20 +77,20 @@ subroutine GFS_rrtmgp_thompsonmp_pre_run(nCol, nLev, nTracers, ncnd, doSWrad, do con_rd, & ! Physical constant: gas-constant for dry air con_eps ! Physical constant: gas constant air / gas constant H2O - real(kind_phys), dimension(nCol,nLev), intent(in) :: & + real(kind_phys), dimension(:,:), intent(in) :: & tv_lay, & ! Virtual temperature (K) t_lay, & ! Temperature (K) qs_lay, & ! Saturation vapor pressure (Pa) q_lay, & ! water-vapor mixing ratio (kg/kg) relhum, & ! Relative humidity p_lay ! Pressure at model-layers (Pa) - 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 () ! In/Outs - 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 diff --git a/physics/GFS_rrtmgp_thompsonmp_pre.meta b/physics/GFS_rrtmgp_thompsonmp_pre.meta index 12ea489563..c17abde74e 100644 --- a/physics/GFS_rrtmgp_thompsonmp_pre.meta +++ b/physics/GFS_rrtmgp_thompsonmp_pre.meta @@ -55,30 +55,6 @@ type = logical intent = in optional = F -[effr_in] - standard_name = flag_for_cloud_effective_radii - long_name = flag for cloud effective radii calculations in GFDL microphysics - units = flag - dimensions = () - type = logical - intent = in - optional = F -[lmfshal] - standard_name = flag_for_lmfshal - long_name = flag for lmfshal - units = flag - dimensions = () - type = logical - intent = in - optional = F -[ltaerosol] - standard_name = flag_for_aerosol_physics - long_name = flag for aerosol physics - units = flag - dimensions = () - type = logical - intent = in - optional = F [i_cldliq] standard_name = index_for_liquid_cloud_condensate long_name = tracer index for cloud condensate (or liquid water) @@ -151,78 +127,19 @@ type = integer intent = in optional = F -[effrin_cldliq] - standard_name = effective_radius_of_stratiform_cloud_liquid_water_particle_in_um - long_name = eff. radius of cloud liquid water particle in micrometer - units = um - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[effrin_cldice] - standard_name = effective_radius_of_stratiform_cloud_ice_particle_in_um - long_name = eff. radius of cloud ice water particle in micrometer - units = um - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[effrin_cldsnow] - standard_name = effective_radius_of_stratiform_cloud_snow_particle_in_um - long_name = effective radius of cloud snow particle in micrometers - units = um - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[do_mynnedmf] - standard_name = do_mynnedmf - long_name = flag to activate MYNN-EDMF - units = flag - dimensions = () - type = logical - intent = in - optional = F -[imfdeepcnv] - standard_name = flag_for_mass_flux_deep_convection_scheme - long_name = flag for mass-flux deep convection scheme - units = flag - dimensions = () - type = integer - intent = in - optional = F -[imfdeepcnv_gf] - standard_name = flag_for_gf_deep_convection_scheme - long_name = flag for Grell-Freitas deep convection scheme - units = flag - dimensions = () - type = integer - intent = in - optional = F -[doGP_cldoptics_PADE] - standard_name = flag_to_calc_lw_cld_optics_using_RRTMGP_PADE - long_name = logical flag to control cloud optics scheme. - units = flag - dimensions = () - type = logical - intent = in - optional = F -[doGP_cldoptics_LUT] - standard_name = flag_to_calc_lw_cld_optics_using_RRTMGP_LUT - long_name = logical flag to control cloud optics scheme. +[effr_in] + standard_name = flag_for_cloud_effective_radii + long_name = flag for cloud effective radii calculations in GFDL microphysics units = flag dimensions = () - type = logical + type = logical intent = in - optional = F + optional = F [p_lev] standard_name = air_pressure_at_interface_for_RRTMGP_in_hPa long_name = air pressure at vertical interface for radiation calculation units = hPa - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + dimensions = (horizontal_dimension,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -231,7 +148,7 @@ standard_name = air_pressure_at_layer_for_RRTMGP_in_hPa long_name = air pressure at vertical layer for radiation calculation units = hPa - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys intent = in @@ -240,7 +157,7 @@ standard_name = virtual_temperature long_name = layer virtual temperature units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys intent = in @@ -254,6 +171,42 @@ kind = kind_phys intent = in optional = F +[effrin_cldliq] + standard_name = effective_radius_of_stratiform_cloud_liquid_water_particle_in_um + long_name = eff. radius of cloud liquid water particle in micrometer + units = um + dimensions = (horizontal_loop_extent,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[effrin_cldice] + standard_name = effective_radius_of_stratiform_cloud_ice_particle_in_um + long_name = eff. radius of cloud ice water particle in micrometer + units = um + dimensions = (horizontal_loop_extent,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[effrin_cldsnow] + standard_name = effective_radius_of_stratiform_cloud_snow_particle_in_um + long_name = effective radius of cloud snow particle in micrometers + units = um + dimensions = (horizontal_loop_extent,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[tracer] + standard_name = chemical_tracers + long_name = chemical tracers + units = g g-1 + dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers) + type = real + kind = kind_phys + intent = in + optional = F [qs_lay] standard_name = saturation_vapor_pressure long_name = saturation vapor pressure @@ -271,7 +224,7 @@ type = real kind = kind_phys intent = in - optional = F + optional = F [relhum] standard_name = relative_humidity long_name = layer relative humidity @@ -281,15 +234,6 @@ kind = kind_phys intent = in optional = F -[tracer] - standard_name = tracer_concentration - long_name = model layer mean tracer concentration - units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers) - type = real - kind = kind_phys - intent = in - optional = F [con_g] standard_name = gravitational_acceleration long_name = gravitational acceleration @@ -316,6 +260,62 @@ type = real kind = kind_phys intent = in + optional = F +[lmfshal] + standard_name = flag_for_lmfshal + long_name = flag for lmfshal + units = flag + dimensions = () + type = logical + intent = in + optional = F +[ltaerosol] + standard_name = flag_for_aerosol_physics + long_name = flag for aerosol physics + units = flag + dimensions = () + type = logical + intent = in + optional = F +[do_mynnedmf] + standard_name = do_mynnedmf + long_name = flag to activate MYNN-EDMF + units = flag + dimensions = () + type = logical + intent = in + optional = F +[imfdeepcnv] + standard_name = flag_for_mass_flux_deep_convection_scheme + long_name = flag for mass-flux deep convection scheme + units = flag + dimensions = () + type = integer + intent = in + optional = F +[imfdeepcnv_gf] + standard_name = flag_for_gf_deep_convection_scheme + long_name = flag for Grell-Freitas deep convection scheme + units = flag + dimensions = () + type = integer + intent = in + optional = F +[doGP_cldoptics_PADE] + standard_name = flag_to_calc_lw_cld_optics_using_RRTMGP_PADE + long_name = logical flag to control cloud optics scheme. + units = flag + dimensions = () + type = logical + intent = in + optional = F +[doGP_cldoptics_LUT] + standard_name = flag_to_calc_lw_cld_optics_using_RRTMGP_LUT + long_name = logical flag to control cloud optics scheme. + units = flag + dimensions = () + type = logical + intent = in optional = F [cld_frac] standard_name = total_cloud_fraction diff --git a/physics/GFS_rrtmgp_zhaocarr_pre.F90 b/physics/GFS_rrtmgp_zhaocarr_pre.F90 index fa1a1bf8c9..d7eecd090d 100644 --- a/physics/GFS_rrtmgp_zhaocarr_pre.F90 +++ b/physics/GFS_rrtmgp_zhaocarr_pre.F90 @@ -32,9 +32,9 @@ subroutine GFS_rrtmgp_zhaocarr_pre_run(nCol, nLev, nCnd, nTracers, i_cldliq, lss lslwr, effr_in, uni_cld, lmfshal, lat, lsmask, p_lev, p_lay, t_lay, relhum, & tv_lay, effrin_cldliq, effrin_cldice, effrin_cldrain, effrin_cldsnow, & shoc_sgs_cldfrac, cncvw, tracer, & - con_eps, con_epsq, con_epsqs, con_epsm1, con_g, con_ttp, con_rd, con_pi, & + con_ttp, con_epsq, con_epsqs, con_eps, con_epsm1, con_g, con_rd, con_pi, & cld_frac, cld_lwp, cld_reliq, cld_iwp, cld_reice, cld_swp, cld_resnow, cld_rwp, & - cld_rerain, de_lgth, deltaZ, cloud_overlap_param, errmsg, errflg) + cld_rerain, deltaZ, de_lgth, cloud_overlap_param, errmsg, errflg) implicit none ! Inputs @@ -59,10 +59,10 @@ subroutine GFS_rrtmgp_zhaocarr_pre_run(nCol, nLev, nCnd, nTracers, i_cldliq, lss con_ttp, & ! Triple point temperature of water (K) con_rd, & ! Ideal gas constant for dry air (J/kg/K) con_pi ! Pi - real(kind_phys), dimension(nCol), intent(in) :: & + real(kind_phys), dimension(:), intent(in) :: & lsmask, & ! Land/Sea mask lat ! Latitude - 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) t_lay, & ! Temperature at model-layers (K) @@ -73,15 +73,15 @@ subroutine GFS_rrtmgp_zhaocarr_pre_run(nCol, nLev, nCnd, nTracers, i_cldliq, lss effrin_cldsnow, & ! Effective radius for snow cloud-particles (microns) shoc_sgs_cldfrac, & ! Subgrid-scale cloud fraction from the SHOC scheme cncvw ! Convective cloud water mixing ratio (kg/kg) - 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),intent(out) :: & + real(kind_phys), dimension(:),intent(out) :: & de_lgth ! Decorrelation length - real(kind_phys), dimension(nCol,nLev),intent(out) :: & + real(kind_phys), dimension(:, :),intent(out) :: & cld_frac, & ! Total cloud fraction cld_lwp, & ! Cloud liquid water path cld_reliq, & ! Cloud liquid effective radius diff --git a/physics/GFS_rrtmgp_zhaocarr_pre.meta b/physics/GFS_rrtmgp_zhaocarr_pre.meta index 576520e61c..4239a364ad 100644 --- a/physics/GFS_rrtmgp_zhaocarr_pre.meta +++ b/physics/GFS_rrtmgp_zhaocarr_pre.meta @@ -23,6 +23,14 @@ type = integer intent = in optional = F +[ncnd] + standard_name = number_of_cloud_condensate_types + long_name = number of cloud condensate types + units = count + dimensions = () + type = integer + intent = in + optional = F [nTracers] standard_name = number_of_tracers long_name = number of tracers @@ -31,14 +39,14 @@ type = integer intent = in optional = F -[ncnd] - standard_name = number_of_cloud_condensate_types - long_name = number of cloud condensate types - units = count +[i_cldliq] + standard_name = index_for_liquid_cloud_condensate + long_name = tracer index for cloud condensate (or liquid water) + units = index dimensions = () - type = integer + type = integer intent = in - optional = F + optional = F [lsswr] standard_name = flag_to_calc_sw long_name = logical flags for sw radiation calls @@ -79,14 +87,6 @@ type = logical intent = in optional = F -[i_cldliq] - standard_name = index_for_liquid_cloud_condensate - long_name = tracer index for cloud condensate (or liquid water) - units = index - dimensions = () - type = integer - intent = in - optional = F [lat] standard_name = latitude long_name = latitude @@ -95,6 +95,15 @@ type = real intent = in kind = kind_phys +[lsmask] + standard_name = sea_land_ice_mask_real + long_name = landmask: sea/land/ice=0/1/2 + units = flag + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F [p_lev] standard_name = air_pressure_at_interface_for_RRTMGP_in_hPa long_name = air pressure at vertical interface for radiation calculation @@ -113,15 +122,15 @@ kind = kind_phys intent = in optional = F -[tv_lay] - standard_name = virtual_temperature - long_name = layer virtual temperature +[t_lay] + standard_name = air_temperature_at_layer_for_RRTMGP + long_name = air temperature at vertical layer for radiation calculation units = K dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in - optional = F + optional = F [relhum] standard_name = relative_humidity long_name = layer relative humidity @@ -131,15 +140,15 @@ kind = kind_phys intent = in optional = F -[t_lay] - standard_name = air_temperature_at_layer_for_RRTMGP - long_name = air temperature at vertical layer for radiation calculation +[tv_lay] + standard_name = virtual_temperature + long_name = layer virtual temperature units = K dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in - optional = F + optional = F [effrin_cldliq] standard_name = effective_radius_of_stratiform_cloud_liquid_water_particle_in_um long_name = eff. radius of cloud liquid water particle in micrometer @@ -203,15 +212,6 @@ kind = kind_phys intent = in optional = F -[lsmask] - standard_name = sea_land_ice_mask_real - long_name = landmask: sea/land/ice=0/1/2 - units = flag - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F [con_ttp] standard_name = triple_point_temperature_of_water long_name = triple point temperature of water @@ -365,15 +365,6 @@ kind = kind_phys intent = out optional = F -[cloud_overlap_param] - standard_name = cloud_overlap_param - long_name = cloud overlap parameter - units = km - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = out - optional = F [deltaZ] standard_name = layer_thickness long_name = layer_thickness @@ -392,6 +383,15 @@ kind = kind_phys intent = out optional = F +[cloud_overlap_param] + standard_name = cloud_overlap_param + long_name = cloud overlap parameter + units = km + dimensions = (horizontal_loop_extent,vertical_dimension) + type = real + kind = kind_phys + intent = out + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP diff --git a/physics/GFS_stochastics.F90 b/physics/GFS_stochastics.F90 index 5e6329a103..0f11249554 100644 --- a/physics/GFS_stochastics.F90 +++ b/physics/GFS_stochastics.F90 @@ -54,7 +54,7 @@ subroutine GFS_stochastics_run (im, km, kdt, delt, do_sppt, pert_mp, use_zmtnblc logical, intent(in) :: use_zmtnblck logical, intent(in) :: do_shum logical, intent(in) :: do_skeb - real(kind_phys), dimension(1:im), intent(in) :: zmtnblck + real(kind_phys), dimension(:), intent(in) :: zmtnblck ! sppt_wts only allocated if do_sppt == .true. real(kind_phys), dimension(:,:), intent(inout) :: sppt_wts ! skebu_wts, skebv_wts only allocated if do_skeb == .true. @@ -63,24 +63,24 @@ subroutine GFS_stochastics_run (im, km, kdt, delt, do_sppt, pert_mp, use_zmtnblc ! shum_wts only allocated if do_shum == .true. real(kind_phys), dimension(:,:), intent(in) :: shum_wts ! inverse/flipped weights are always allocated - real(kind_phys), dimension(1:im,1:km), intent(inout) :: sppt_wts_inv - real(kind_phys), dimension(1:im,1:km), intent(inout) :: skebu_wts_inv - real(kind_phys), dimension(1:im,1:km), intent(inout) :: skebv_wts_inv - real(kind_phys), dimension(1:im,1:km), intent(inout) :: shum_wts_inv - real(kind_phys), dimension(1:im,1:km), intent(in) :: diss_est - real(kind_phys), dimension(1:im,1:km), intent(in) :: ugrs - real(kind_phys), dimension(1:im,1:km), intent(in) :: vgrs - real(kind_phys), dimension(1:im,1:km), intent(in) :: tgrs - real(kind_phys), dimension(1:im,1:km), intent(in) :: qgrs_wv + real(kind_phys), dimension(:,:), intent(inout) :: sppt_wts_inv + real(kind_phys), dimension(:,:), intent(inout) :: skebu_wts_inv + real(kind_phys), dimension(:,:), intent(inout) :: skebv_wts_inv + real(kind_phys), dimension(:,:), intent(inout) :: shum_wts_inv + real(kind_phys), dimension(:,:), intent(in) :: diss_est + real(kind_phys), dimension(:,:), intent(in) :: ugrs + real(kind_phys), dimension(:,:), intent(in) :: vgrs + real(kind_phys), dimension(:,:), intent(in) :: tgrs + real(kind_phys), dimension(:,:), intent(in) :: qgrs_wv real(kind_phys), dimension(:,:), intent(in) :: qgrs_cw real(kind_phys), dimension(:,:), intent(in) :: qgrs_rw real(kind_phys), dimension(:,:), intent(in) :: qgrs_sw real(kind_phys), dimension(:,:), intent(in) :: qgrs_iw real(kind_phys), dimension(:,:), intent(in) :: qgrs_gl - real(kind_phys), dimension(1:im,1:km), intent(inout) :: gu0 - real(kind_phys), dimension(1:im,1:km), intent(inout) :: gv0 - real(kind_phys), dimension(1:im,1:km), intent(inout) :: gt0 - real(kind_phys), dimension(1:im,1:km), intent(inout) :: gq0_wv + real(kind_phys), dimension(:,:), intent(inout) :: gu0 + real(kind_phys), dimension(:,:), intent(inout) :: gv0 + real(kind_phys), dimension(:,:), intent(inout) :: gt0 + real(kind_phys), dimension(:,:), intent(inout) :: gq0_wv real(kind_phys), dimension(:,:), intent(inout) :: gq0_cw real(kind_phys), dimension(:,:), intent(inout) :: gq0_rw real(kind_phys), dimension(:,:), intent(inout) :: gq0_sw @@ -92,13 +92,13 @@ subroutine GFS_stochastics_run (im, km, kdt, delt, do_sppt, pert_mp, use_zmtnblc integer, intent(in) :: ntiw integer, intent(in) :: ntgl real(kind_phys), dimension(:,:), intent(inout) :: dtdtnp - real(kind_phys), dimension(1:im), intent(in) :: rain - real(kind_phys), dimension(1:im), intent(in) :: rainc - real(kind_phys), dimension(1:im), intent(inout) :: tprcp - real(kind_phys), dimension(1:im), intent(inout) :: totprcp - real(kind_phys), dimension(1:im), intent(inout) :: cnvprcp - real(kind_phys), dimension(1:im), intent(inout) :: totprcpb - real(kind_phys), dimension(1:im), intent(inout) :: cnvprcpb + real(kind_phys), dimension(:), intent(in) :: rain + real(kind_phys), dimension(:), intent(in) :: rainc + real(kind_phys), dimension(:), intent(inout) :: tprcp + real(kind_phys), dimension(:), intent(inout) :: totprcp + real(kind_phys), dimension(:), intent(inout) :: cnvprcp + real(kind_phys), dimension(:), intent(inout) :: totprcpb + real(kind_phys), dimension(:), intent(inout) :: cnvprcpb logical, intent(in) :: cplflx ! rain_cpl, snow_cpl only allocated if cplflx == .true. or cplchm == .true. real(kind_phys), dimension(:), intent(inout) :: rain_cpl @@ -106,8 +106,8 @@ subroutine GFS_stochastics_run (im, km, kdt, delt, do_sppt, pert_mp, use_zmtnblc ! drain_cpl, dsnow_cpl only allocated if cplflx == .true. or cplchm == .true. real(kind_phys), dimension(:), intent(in) :: drain_cpl real(kind_phys), dimension(:), intent(in) :: dsnow_cpl - real(kind_phys), dimension(1:km), intent(in) :: si - real(kind_phys), dimension(1:km), intent(inout) :: vfact_ca + real(kind_phys), dimension(:), intent(in) :: si + real(kind_phys), dimension(:), intent(inout) :: vfact_ca real(kind_phys), dimension(:), intent(in) :: ca1 character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg diff --git a/physics/GFS_stochastics.meta b/physics/GFS_stochastics.meta index 26dcfd47e1..9ca532e72d 100644 --- a/physics/GFS_stochastics.meta +++ b/physics/GFS_stochastics.meta @@ -40,46 +40,6 @@ kind = kind_phys intent = in optional = F -[ntcw] - standard_name = index_for_liquid_cloud_condensate - long_name = tracer index for cloud condensate (or liquid water) - units = index - dimensions = () - type = integer - intent = in - optional = F -[ntiw] - standard_name = index_for_ice_cloud_condensate - long_name = tracer index for ice water - units = index - dimensions = () - intent = in - optional = F - type = integer -[ntrw] - standard_name = index_for_rain_water - long_name = tracer index for rain water - units = index - dimensions = () - type = integer - intent = in - optional = F -[ntsw] - standard_name = index_for_snow_water - long_name = tracer index for snow water - units = index - dimensions = () - type = integer - intent = in - optional = F -[ntgl] - standard_name = index_for_graupel - long_name = tracer index for graupel - units = index - dimensions = () - type = integer - intent = in - optional = F [do_sppt] standard_name = flag_for_stochastic_physics_perturbations long_name = flag for stochastic physics perturbations @@ -307,18 +267,18 @@ kind = kind_phys intent = in optional = F -[qgrs_iw] - standard_name = ice_water_mixing_ratio - long_name = moist mixing ratio of cloud ice +[qgrs_sw] + standard_name = snow_water_mixing_ratio + long_name = moist mixing ratio of snow units = kg kg-1 dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in optional = F -[qgrs_sw] - standard_name = snow_water_mixing_ratio - long_name = moist mixing ratio of snow +[qgrs_iw] + standard_name = ice_water_mixing_ratio + long_name = moist mixing ratio of cloud ice units = kg kg-1 dimensions = (horizontal_loop_extent,vertical_dimension) type = real @@ -370,6 +330,15 @@ kind = kind_phys intent = inout optional = F +[dtdtnp] + standard_name = tendency_of_air_temperature_to_withold_from_sppt + long_name = temp. change from physics that should not be perturbed by sppt + units = K s-1 + dimensions = (horizontal_loop_extent,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F [gq0_cw] standard_name = cloud_condensed_water_mixing_ratio_updated_by_physics long_name = cloud condensed water mixing ratio updated by physics @@ -388,18 +357,18 @@ kind = kind_phys intent = inout optional = F -[gq0_iw] - standard_name = ice_water_mixing_ratio_updated_by_physics - long_name = moist mixing ratio of cloud ice updated by physics +[gq0_sw] + standard_name = snow_water_mixing_ratio_updated_by_physics + long_name = moist mixing ratio of snow updated by physics units = kg kg-1 dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout optional = F -[gq0_sw] - standard_name = snow_water_mixing_ratio_updated_by_physics - long_name = moist mixing ratio of snow updated by physics +[gq0_iw] + standard_name = ice_water_mixing_ratio_updated_by_physics + long_name = moist mixing ratio of cloud ice updated by physics units = kg kg-1 dimensions = (horizontal_loop_extent,vertical_dimension) type = real @@ -415,15 +384,6 @@ kind = kind_phys intent = inout optional = F -[dtdtnp] - standard_name = tendency_of_air_temperature_to_withold_from_sppt - long_name = temp. change from physics that should not be perturbed by sppt - units = K s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = in - optional = F [rain] standard_name = lwe_thickness_of_precipitation_amount_on_dynamics_timestep long_name = total rain at this time step @@ -531,6 +491,46 @@ kind = kind_phys intent = in optional = F +[ntcw] + standard_name = index_for_liquid_cloud_condensate + long_name = tracer index for cloud condensate (or liquid water) + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntrw] + standard_name = index_for_rain_water + long_name = tracer index for rain water + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntsw] + standard_name = index_for_snow_water + long_name = tracer index for snow water + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntiw] + standard_name = index_for_ice_cloud_condensate + long_name = tracer index for ice water + units = index + dimensions = () + intent = in + optional = F + type = integer +[ntgl] + standard_name = index_for_graupel + long_name = tracer index for graupel + units = index + dimensions = () + type = integer + intent = in + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP diff --git a/physics/GFS_surface_composites.F90 b/physics/GFS_surface_composites.F90 index 876ac1ed29..c06c7100ee 100644 --- a/physics/GFS_surface_composites.F90 +++ b/physics/GFS_surface_composites.F90 @@ -34,35 +34,33 @@ subroutine GFS_surface_composites_pre_run (im, lkm, frac_grid, flag_cice, cplflx tsfc_lnd, tsfc_ice, tisfc, tice, tsurf, tsurf_wat, tsurf_lnd, tsurf_ice, & gflx_ice, tgice, islmsk, islmsk_cice, slmsk, semis_rad, semis_wat, semis_lnd, semis_ice, & qss, qss_wat, qss_lnd, qss_ice, hflx, hflx_wat, hflx_lnd, hflx_ice, & - min_lakeice, min_seaice, & - zorlo, zorll, zorli, & - errmsg, errflg) + min_lakeice, min_seaice, zorlo, zorll, zorli, errmsg, errflg) implicit none ! Interface variables integer, intent(in ) :: im, lkm logical, intent(in ) :: frac_grid, cplflx, cplwav2atm - logical, dimension(im), intent(inout) :: flag_cice - logical, dimension(im), intent(inout) :: dry, icy, use_flake, ocean, wet - real(kind=kind_phys), dimension(im), intent(in ) :: landfrac, lakefrac, lakedepth, oceanfrac - real(kind=kind_phys), dimension(im), intent(inout) :: cice, hice - real(kind=kind_phys), dimension(im), intent( out) :: frland - real(kind=kind_phys), dimension(im), intent(in ) :: snowd, tprcp, uustar, weasd, qss, hflx - - real(kind=kind_phys), dimension(im), intent(inout) :: tsfc, tsfco, tsfcl, tisfc, tsurf - real(kind=kind_phys), dimension(im), intent(inout) :: snowd_wat, snowd_lnd, snowd_ice, tprcp_wat, & - tprcp_lnd, tprcp_ice, tsfc_wat, tsfc_lnd, tsfc_ice, tsurf_wat,tsurf_lnd, tsurf_ice, & - uustar_wat, uustar_lnd, uustar_ice, weasd_wat, weasd_lnd, weasd_ice, & - qss_wat, qss_lnd, qss_ice, hflx_wat, hflx_lnd, hflx_ice, ep1d_ice, gflx_ice - real(kind=kind_phys), dimension(im), intent( out) :: tice + logical, dimension(:), intent(inout) :: flag_cice + logical, dimension(:), intent(inout) :: dry, icy, use_flake, ocean, wet + real(kind=kind_phys), dimension(:), intent(in ) :: landfrac, lakefrac, lakedepth, oceanfrac + real(kind=kind_phys), dimension(:), intent(inout) :: cice, hice + real(kind=kind_phys), dimension(:), intent( out) :: frland + real(kind=kind_phys), dimension(:), intent(in ) :: snowd, tprcp, uustar, weasd, qss, hflx + + real(kind=kind_phys), dimension(:), intent(inout) :: tsfc, tsfco, tsfcl, tisfc, tsurf + real(kind=kind_phys), dimension(:), intent(inout) :: snowd_wat, snowd_lnd, snowd_ice, tprcp_wat, & + tprcp_lnd, tprcp_ice, tsfc_wat, tsfc_lnd, tsfc_ice, tsurf_wat,tsurf_lnd, tsurf_ice, & + uustar_wat, uustar_lnd, uustar_ice, weasd_wat, weasd_lnd, weasd_ice, & + qss_wat, qss_lnd, qss_ice, hflx_wat, hflx_lnd, hflx_ice, ep1d_ice, gflx_ice + real(kind=kind_phys), dimension(:), intent( out) :: tice real(kind=kind_phys), intent(in ) :: tgice - integer, dimension(im), intent(inout) :: islmsk, islmsk_cice - real(kind=kind_phys), dimension(im), intent(in ) :: semis_rad - real(kind=kind_phys), dimension(im), intent(inout) :: semis_wat, semis_lnd, semis_ice, slmsk + integer, dimension(:), intent(inout) :: islmsk, islmsk_cice + real(kind=kind_phys), dimension(:), intent(in ) :: semis_rad + real(kind=kind_phys), dimension(:), intent(inout) :: semis_wat, semis_lnd, semis_ice, slmsk real(kind=kind_phys), intent(in ) :: min_lakeice, min_seaice ! - real(kind=kind_phys), dimension(im), intent(inout) :: zorlo, zorll, zorli + real(kind=kind_phys), dimension(:), intent(inout) :: zorlo, zorll, zorli ! real(kind=kind_phys), parameter :: timin = 173.0_kind_phys ! minimum temperature allowed for snow/ice @@ -278,12 +276,12 @@ subroutine GFS_surface_composites_inter_run (im, dry, icy, wet, semis_wat, semis implicit none ! Interface variables - integer, intent(in ) :: im - logical, dimension(im), intent(in ) :: dry, icy, wet - real(kind=kind_phys), dimension(im), intent(in ) :: semis_wat, semis_lnd, semis_ice, adjsfcdlw, & - adjsfcdsw, adjsfcnsw - real(kind=kind_phys), dimension(im), intent(inout) :: gabsbdlw_lnd, gabsbdlw_ice, gabsbdlw_wat - real(kind=kind_phys), dimension(im), intent(out) :: adjsfcusw + integer, intent(in ) :: im + logical, dimension(:), intent(in ) :: dry, icy, wet + real(kind=kind_phys), dimension(:), intent(in ) :: semis_wat, semis_lnd, semis_ice, adjsfcdlw, & + adjsfcdsw, adjsfcnsw + real(kind=kind_phys), dimension(:), intent(inout) :: gabsbdlw_lnd, gabsbdlw_ice, gabsbdlw_wat + real(kind=kind_phys), dimension(:), intent(out) :: adjsfcusw ! CCPP error handling character(len=*), intent(out) :: errmsg @@ -364,9 +362,9 @@ subroutine GFS_surface_composites_post_run ( integer, intent(in) :: im, kice, km logical, intent(in) :: cplflx, frac_grid, cplwav2atm - logical, dimension(im), intent(in) :: flag_cice, dry, wet, icy - integer, dimension(im), intent(in) :: islmsk - real(kind=kind_phys), dimension(im), intent(in) :: landfrac, lakefrac, oceanfrac, & + logical, dimension(:), intent(in) :: flag_cice, dry, wet, icy + integer, dimension(:), intent(in) :: islmsk + real(kind=kind_phys), dimension(:), intent(in) :: landfrac, lakefrac, oceanfrac, & cd_wat, cd_lnd, cd_ice, cdq_wat, cdq_lnd, cdq_ice, rb_wat, rb_lnd, rb_ice, stress_wat, & stress_lnd, stress_ice, ffmm_wat, ffmm_lnd, ffmm_ice, ffhh_wat, ffhh_lnd, ffhh_ice, uustar_wat, uustar_lnd, uustar_ice, & fm10_wat, fm10_lnd, fm10_ice, fh2_wat, fh2_lnd, fh2_ice, tsurf_wat, tsurf_lnd, tsurf_ice, cmm_wat, cmm_lnd, cmm_ice, & @@ -374,15 +372,15 @@ subroutine GFS_surface_composites_post_run ( snowd_wat, snowd_lnd, snowd_ice,tprcp_wat, tprcp_lnd, tprcp_ice, evap_wat, evap_lnd, evap_ice, hflx_wat, hflx_lnd, & hflx_ice, qss_wat, qss_lnd, qss_ice, tsfc_wat, tsfc_lnd, tsfc_ice - real(kind=kind_phys), dimension(im), intent(inout) :: zorl, zorlo, zorll, zorli, cd, cdq, rb, stress, ffmm, ffhh, uustar, fm10, & + real(kind=kind_phys), dimension(:), intent(inout) :: zorl, zorlo, zorll, zorli, cd, cdq, rb, stress, ffmm, ffhh, uustar, fm10, & fh2, tsurf, cmm, chh, gflx, ep1d, weasd, snowd, tprcp, evap, hflx, qss, tsfc, tsfco, tsfcl, tisfc - real(kind=kind_phys), dimension(im), intent(in ) :: tice ! interstitial sea ice temperature - real(kind=kind_phys), dimension(im), intent(inout) :: hice, cice + real(kind=kind_phys), dimension(:), intent(in ) :: tice ! interstitial sea ice temperature + real(kind=kind_phys), dimension(:), intent(inout) :: hice, cice real(kind=kind_phys), intent(in ) :: min_seaice - real(kind=kind_phys), dimension(im, kice), intent(in ) :: tiice - real(kind=kind_phys), dimension(im, km), intent(inout) :: stc + real(kind=kind_phys), dimension(:,:), intent(in ) :: tiice + real(kind=kind_phys), dimension(:,:), intent(inout) :: stc character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg diff --git a/physics/GFS_surface_composites.meta b/physics/GFS_surface_composites.meta index 7603299c86..996fb54aac 100644 --- a/physics/GFS_surface_composites.meta +++ b/physics/GFS_surface_composites.meta @@ -37,7 +37,7 @@ units = flag dimensions = (horizontal_loop_extent) type = logical - intent = in + intent = inout optional = F [cplflx] standard_name = flag_for_flux_coupling @@ -1769,7 +1769,7 @@ dimensions = (horizontal_loop_extent,ice_vertical_dimension) type = real kind = kind_phys - intent = inout + intent = in optional = F [stc] standard_name = soil_temperature diff --git a/physics/GFS_surface_generic.F90 b/physics/GFS_surface_generic.F90 index 2392e6bb09..70a5b35418 100644 --- a/physics/GFS_surface_generic.F90 +++ b/physics/GFS_surface_generic.F90 @@ -40,48 +40,48 @@ subroutine GFS_surface_generic_pre_run (im, levs, vfrac, islmsk, isot, ivegsrc, ! Interface variables integer, intent(in) :: im, levs, isot, ivegsrc - integer, dimension(im), intent(in) :: islmsk - integer, dimension(im), intent(inout) :: soiltyp, vegtype, slopetyp + integer, dimension(:), intent(in) :: islmsk + integer, dimension(:), intent(inout) :: soiltyp, vegtype, slopetyp real(kind=kind_phys), intent(in) :: con_g - real(kind=kind_phys), dimension(im), intent(in) :: vfrac, stype, vtype, slope, prsik_1, prslk_1 + real(kind=kind_phys), dimension(:), intent(in) :: vfrac, stype, vtype, slope, prsik_1, prslk_1 - real(kind=kind_phys), dimension(im), intent(inout) :: tsfc - real(kind=kind_phys), dimension(im,levs), intent(in) :: phil + real(kind=kind_phys), dimension(:), intent(inout) :: tsfc + real(kind=kind_phys), dimension(:,:), intent(in) :: phil - real(kind=kind_phys), dimension(im), intent(inout) :: sigmaf, work3, tsurf, zlvl + real(kind=kind_phys), dimension(:), intent(inout) :: sigmaf, work3, tsurf, zlvl ! Stochastic physics / surface perturbations - real(kind=kind_phys), dimension(:), intent(out) :: drain_cpl - real(kind=kind_phys), dimension(:), intent(out) :: dsnow_cpl - real(kind=kind_phys), dimension(:), intent(in) :: rain_cpl - real(kind=kind_phys), dimension(:), intent(in) :: snow_cpl + real(kind=kind_phys), dimension(:), intent(out) :: drain_cpl + real(kind=kind_phys), dimension(:), intent(out) :: dsnow_cpl + real(kind=kind_phys), dimension(:), intent(in) :: rain_cpl + real(kind=kind_phys), dimension(:), intent(in) :: snow_cpl integer, intent(in) :: lndp_type integer, intent(in) :: n_var_lndp - character(len=3), dimension(n_var_lndp), intent(in) :: lndp_var_list - real(kind=kind_phys), dimension(n_var_lndp), intent(in) :: lndp_prt_list - real(kind=kind_phys), dimension(:,:), intent(in) :: sfc_wts - real(kind=kind_phys), dimension(im), intent(out) :: z01d - real(kind=kind_phys), dimension(im), intent(out) :: zt1d - real(kind=kind_phys), dimension(im), intent(out) :: bexp1d - real(kind=kind_phys), dimension(im), intent(out) :: xlai1d - real(kind=kind_phys), dimension(im), intent(out) :: vegf1d - real(kind=kind_phys), intent(out) :: lndp_vgf - real(kind=kind_phys), dimension(im,n_var_lndp), intent(inout) :: sfc_wts_inv + character(len=3), dimension(:), intent(in) :: lndp_var_list + real(kind=kind_phys), dimension(:), intent(in) :: lndp_prt_list + real(kind=kind_phys), dimension(:,:), intent(in) :: sfc_wts + real(kind=kind_phys), dimension(:), intent(out) :: z01d + real(kind=kind_phys), dimension(:), intent(out) :: zt1d + real(kind=kind_phys), dimension(:), intent(out) :: bexp1d + real(kind=kind_phys), dimension(:), intent(out) :: xlai1d + real(kind=kind_phys), dimension(:), intent(out) :: vegf1d + real(kind=kind_phys), intent(out) :: lndp_vgf + real(kind=kind_phys), dimension(:,:), intent(inout) :: sfc_wts_inv logical, intent(in) :: cplflx real(kind=kind_phys), dimension(:), intent(in) :: slimskin_cpl - logical, dimension(im), intent(inout) :: flag_cice - integer, dimension(im), intent(out) :: islmsk_cice - real(kind=kind_phys), dimension(im), intent(in) :: & + logical, dimension(:), intent(inout) :: flag_cice + integer, dimension(:), intent(out) :: islmsk_cice + real(kind=kind_phys), dimension(:), intent(in) :: & tisfc, tsfco, fice, hice - real(kind=kind_phys), dimension(im), intent(out) :: wind - real(kind=kind_phys), dimension(im), intent(in ) :: u1, v1 + real(kind=kind_phys), dimension(:), intent(out) :: wind + real(kind=kind_phys), dimension(:), intent(in ) :: u1, v1 ! surface wind enhancement due to convection - real(kind=kind_phys), dimension(im), intent(inout ) :: cnvwind + real(kind=kind_phys), dimension(:), intent(inout ) :: cnvwind ! - real(kind=kind_phys), dimension(im), intent(out) :: smcwlt2, smcref2 + real(kind=kind_phys), dimension(:), intent(out) :: smcwlt2, smcref2 ! CCPP error handling character(len=*), intent(out) :: errmsg @@ -223,31 +223,29 @@ subroutine GFS_surface_generic_post_run (im, cplflx, cplwav, lssav, icy, wet, dt integer, intent(in) :: im logical, intent(in) :: cplflx, cplwav, lssav - logical, dimension(im), intent(in) :: icy, wet + logical, dimension(:), intent(in) :: icy, wet real(kind=kind_phys), intent(in) :: dtf - real(kind=kind_phys), dimension(im), intent(in) :: ep1d, gflx, tgrs_1, qgrs_1, ugrs_1, vgrs_1, adjsfcdlw, adjsfcdsw, & + real(kind=kind_phys), dimension(:), intent(in) :: ep1d, gflx, tgrs_1, qgrs_1, ugrs_1, vgrs_1, adjsfcdlw, adjsfcdsw, & adjnirbmd, adjnirdfd, adjvisbmd, adjvisdfd, adjsfculw, adjsfculw_wat, adjnirbmu, adjnirdfu, adjvisbmu, adjvisdfu, & t2m, q2m, u10m, v10m, tsfc, tsfc_wat, pgr, xcosz, evbs, evcw, trans, sbsno, snowc, snohf - real(kind=kind_phys), dimension(im), intent(inout) :: epi, gfluxi, t1, q1, u1, v1, gflux, evbsa, & + real(kind=kind_phys), dimension(:), intent(inout) :: epi, gfluxi, t1, q1, u1, v1, dlwsfci_cpl, dswsfci_cpl, dlwsfc_cpl, & + dswsfc_cpl, dnirbmi_cpl, dnirdfi_cpl, dvisbmi_cpl, dvisdfi_cpl, dnirbm_cpl, dnirdf_cpl, dvisbm_cpl, dvisdf_cpl, & + nlwsfci_cpl, nlwsfc_cpl, t2mi_cpl, q2mi_cpl, u10mi_cpl, v10mi_cpl, tsfci_cpl, psurfi_cpl, nnirbmi_cpl, nnirdfi_cpl, & + nvisbmi_cpl, nvisdfi_cpl, nswsfci_cpl, nswsfc_cpl, nnirbm_cpl, nnirdf_cpl, nvisbm_cpl, nvisdf_cpl, gflux, evbsa, & evcwa, transa, sbsnoa, snowca, snohfa, ep - real(kind=kind_phys), dimension(:), intent(inout) :: dlwsfci_cpl, dswsfci_cpl, dlwsfc_cpl, & - dswsfc_cpl, dnirbmi_cpl, dnirdfi_cpl, dvisbmi_cpl, dvisdfi_cpl, dnirbm_cpl, dnirdf_cpl, dvisbm_cpl, dvisdf_cpl, & - nlwsfci_cpl, nlwsfc_cpl, t2mi_cpl, q2mi_cpl, u10mi_cpl, v10mi_cpl, tsfci_cpl, psurfi_cpl, nnirbmi_cpl, nnirdfi_cpl, & - nvisbmi_cpl, nvisdfi_cpl, nswsfci_cpl, nswsfc_cpl, nnirbm_cpl, nnirdf_cpl, nvisbm_cpl, nvisdf_cpl - - real(kind=kind_phys), dimension(im), intent(inout) :: runoff, srunoff - real(kind=kind_phys), dimension(im), intent(in) :: drain, runof + real(kind=kind_phys), dimension(:), intent(inout) :: runoff, srunoff + real(kind=kind_phys), dimension(:), intent(in) :: drain, runof ! For canopy heat storage logical, intent(in) :: lheatstrg real(kind=kind_phys), intent(in) :: z0fac, e0fac - real(kind=kind_phys), dimension(im), intent(in) :: zorl - real(kind=kind_phys), dimension(im), intent(in) :: hflx, evap - real(kind=kind_phys), dimension(im), intent(out) :: hflxq, evapq - real(kind=kind_phys), dimension(im), intent(out) :: hffac, hefac + real(kind=kind_phys), dimension(:), intent(in) :: zorl + real(kind=kind_phys), dimension(:), intent(in) :: hflx, evap + real(kind=kind_phys), dimension(:), intent(out) :: hflxq, evapq + real(kind=kind_phys), dimension(:), intent(out) :: hffac, hefac ! CCPP error handling variables character(len=*), intent(out) :: errmsg diff --git a/physics/GFS_surface_generic.meta b/physics/GFS_surface_generic.meta index 47b685f727..e174de1532 100644 --- a/physics/GFS_surface_generic.meta +++ b/physics/GFS_surface_generic.meta @@ -249,17 +249,17 @@ kind = kind_phys intent = in optional = F -[sfc_wts_inv] - standard_name = weights_for_stochastic_surface_physics_perturbation_flipped - long_name = weights for stochastic surface physics perturbation, flipped +[lndp_var_list] + standard_name = variables_to_be_perturbed_for_landperts + long_name = variables to be perturbed for landperts units = none - dimensions = (horizontal_loop_extent,number_of_land_surface_variables_perturbed) - type = real - kind = kind_phys - intent = inout + dimensions = (number_of_land_surface_variables_perturbed) + type = character + kind = len=3 + intent = in optional = F [lndp_prt_list] - standard_name = magnitude_of_perturbations_for_landperts + standard_name =magnitude_of_perturbations_for_landperts long_name = magnitude of perturbations for landperts units = variable dimensions = (number_of_land_surface_variables_perturbed) @@ -267,15 +267,6 @@ kind = kind_phys intent = in optional = F -[lndp_var_list] - standard_name = variables_to_be_perturbed_for_landperts - long_name = variables to be perturbed for landperts - units = none - dimensions = (number_of_land_surface_variables_perturbed) - type = character - kind = len=3 - intent = in - optional = F [z01d] standard_name = perturbation_of_momentum_roughness_length long_name = perturbation of momentum roughness length @@ -330,6 +321,15 @@ kind = kind_phys intent = out optional = F +[sfc_wts_inv] + standard_name = weights_for_stochastic_surface_physics_perturbation_flipped + long_name = weights for stochastic surface physics perturbation, flipped + units = none + dimensions = (horizontal_loop_extent,number_of_land_surface_variables_perturbed) + type = real + kind = kind_phys + intent = inout + optional = F [cplflx] standard_name = flag_for_flux_coupling long_name = flag controlling cplflx collection (default off) @@ -1329,18 +1329,18 @@ kind = kind_phys intent = out optional = F -[hefac] - standard_name = surface_upward_latent_heat_flux_reduction_factor - long_name = surface upward latent heat flux reduction factor from canopy heat storage +[hffac] + standard_name = surface_upward_sensible_heat_flux_reduction_factor + long_name = surface upward sensible heat flux reduction factor from canopy heat storage units = none dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out optional = F -[hffac] - standard_name = surface_upward_sensible_heat_flux_reduction_factor - long_name = surface upward sensible heat flux reduction factor from canopy heat storage +[hefac] + standard_name = surface_upward_latent_heat_flux_reduction_factor + long_name = surface upward latent heat flux reduction factor from canopy heat storage units = none dimensions = (horizontal_loop_extent) type = real diff --git a/physics/GFS_surface_loop_control.F90 b/physics/GFS_surface_loop_control.F90 index c7f727d273..82c55c4ad8 100644 --- a/physics/GFS_surface_loop_control.F90 +++ b/physics/GFS_surface_loop_control.F90 @@ -15,11 +15,9 @@ end subroutine GFS_surface_loop_control_part1_finalize !> \brief Brief description of the subroutine !! -#if 0 !! \section arg_table_GFS_surface_loop_control_part1_run Arguments !! \htmlinclude GFS_surface_loop_control_part1_run.html !! -#endif !! \section general General Algorithm !! \section detailed Detailed Algorithm !! @{ @@ -31,10 +29,10 @@ subroutine GFS_surface_loop_control_part1_run (im, iter, wind, flag_guess, errms implicit none ! Interface variables - integer, intent(in) :: im - integer, intent(in) :: iter - real(kind=kind_phys), dimension(im), intent(in) :: wind - logical, dimension(im), intent(inout) :: flag_guess + integer, intent(in) :: im + integer, intent(in) :: iter + real(kind=kind_phys), dimension(:), intent(in) :: wind + logical, dimension(:), intent(inout) :: flag_guess character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg @@ -80,7 +78,7 @@ end subroutine GFS_surface_loop_control_part2_finalize !! \section detailed Detailed Algorithm !! @{ - subroutine GFS_surface_loop_control_part2_run (im, iter, wind, & + subroutine GFS_surface_loop_control_part2_run (im, iter, wind, & flag_guess, flag_iter, dry, wet, icy, nstf_name1, errmsg, errflg) use machine, only: kind_phys @@ -90,10 +88,10 @@ subroutine GFS_surface_loop_control_part2_run (im, iter, wind, & ! Interface variables integer, intent(in) :: im integer, intent(in) :: iter - real(kind=kind_phys), dimension(im), intent(in) :: wind - logical, dimension(im), intent(inout) :: flag_guess - logical, dimension(im), intent(inout) :: flag_iter - logical, dimension(im), intent(in) :: dry, wet, icy + real(kind=kind_phys), dimension(:), intent(in) :: wind + logical, dimension(:), intent(inout) :: flag_guess + logical, dimension(:), intent(inout) :: flag_iter + logical, dimension(:), intent(in) :: dry, wet, icy integer, intent(in) :: nstf_name1 character(len=*), intent(out) :: errmsg diff --git a/physics/GFS_time_vary_pre.fv3.F90 b/physics/GFS_time_vary_pre.fv3.F90 index 71a33c8bec..98ac6a07fd 100644 --- a/physics/GFS_time_vary_pre.fv3.F90 +++ b/physics/GFS_time_vary_pre.fv3.F90 @@ -74,8 +74,8 @@ subroutine GFS_time_vary_pre_timestep_init (jdat, idat, dtp, lkm, lsm, lsm_noahm implicit none - integer, intent(in) :: idate(4) - integer, intent(in) :: jdat(1:8), idat(1:8) + integer, intent(in) :: idate(:) + integer, intent(in) :: jdat(:), idat(:) integer, intent(in) :: lkm, lsm, lsm_noahmp, & nsswr, nslwr, me, & master, nscyc, nhfrad diff --git a/physics/GFS_time_vary_pre.scm.F90 b/physics/GFS_time_vary_pre.scm.F90 index 73117f3d14..c9ee9f9460 100644 --- a/physics/GFS_time_vary_pre.scm.F90 +++ b/physics/GFS_time_vary_pre.scm.F90 @@ -73,8 +73,8 @@ subroutine GFS_time_vary_pre_timestep_init (jdat, idat, dtp, lsm, lsm_noahmp, ns implicit none - integer, intent(in) :: idate(4) - integer, intent(in) :: jdat(1:8), idat(1:8) + integer, intent(in) :: idate(:) + integer, intent(in) :: jdat(:), idat(:) integer, intent(in) :: lsm, lsm_noahmp, & nsswr, nslwr, me, & master, nscyc diff --git a/physics/cires_ugwp.F90 b/physics/cires_ugwp.F90 index f985f3fdd4..8f06b5401c 100644 --- a/physics/cires_ugwp.F90 +++ b/physics/cires_ugwp.F90 @@ -55,7 +55,7 @@ subroutine cires_ugwp_init (me, master, nlunit, input_nml_file, logunit, & integer, intent (in) :: latr real(kind=kind_phys), intent (in) :: ak(:), bk(:) real(kind=kind_phys), intent (in) :: dtp - real(kind=kind_phys), intent (in) :: cdmbgwd(4), cgwf(2) ! "scaling" controls for "old" GFS-GW schemes + real(kind=kind_phys), intent (in) :: cdmbgwd(:), cgwf(:) ! "scaling" controls for "old" GFS-GW schemes real(kind=kind_phys), intent (in) :: pa_rf_in, tau_rf_in real(kind=kind_phys), intent (in) :: con_p0 logical, intent (in) :: do_ugwp @@ -162,24 +162,24 @@ subroutine cires_ugwp_run(do_ugwp, me, master, im, levs, ntrac, dtp, kdt, lonr ! interface variables integer, intent(in) :: me, master, im, levs, ntrac, kdt, lonr, nmtvr - integer, intent(in), dimension(im) :: kpbl - real(kind=kind_phys), intent(in), dimension(im) :: oro, oro_uf, hprime, oc, theta, sigma, gamma + integer, intent(in), dimension(:) :: kpbl + real(kind=kind_phys), intent(in), dimension(:) :: oro, oro_uf, hprime, oc, theta, sigma, gamma logical, intent(in) :: flag_for_gwd_generic_tend ! elvmax is intent(in) for CIRES UGWP, but intent(inout) for GFS GWDPS - real(kind=kind_phys), intent(inout), dimension(im) :: elvmax - real(kind=kind_phys), intent(in), dimension(im, 4) :: clx, oa4 - real(kind=kind_phys), intent(in), dimension(im) :: xlat, xlat_d, sinlat, coslat, area - real(kind=kind_phys), intent(in), dimension(im, levs) :: del, ugrs, vgrs, tgrs, prsl, prslk, phil - real(kind=kind_phys), intent(in), dimension(im, levs+1) :: prsi, phii - real(kind=kind_phys), intent(in), dimension(im, levs, ntrac):: qgrs - real(kind=kind_phys), intent(in) :: dtp, cdmbgwd(4) + real(kind=kind_phys), intent(inout), dimension(:) :: elvmax + real(kind=kind_phys), intent(in), dimension(:, :) :: clx, oa4 + real(kind=kind_phys), intent(in), dimension(:) :: xlat, xlat_d, sinlat, coslat, area + real(kind=kind_phys), intent(in), dimension(:, :) :: del, ugrs, vgrs, tgrs, prsl, prslk, phil + real(kind=kind_phys), intent(in), dimension(:, :) :: prsi, phii + real(kind=kind_phys), intent(in), dimension(:,:,:):: qgrs + real(kind=kind_phys), intent(in) :: dtp, cdmbgwd(:) logical, intent(in) :: do_ugwp, do_tofd, ldiag_ugwp - real(kind=kind_phys), intent(out), dimension(im) :: dusfcg, dvsfcg - real(kind=kind_phys), intent(out), dimension(im) :: zmtb, zlwb, zogw, rdxzb - real(kind=kind_phys), intent(out), dimension(im) :: tau_mtb, tau_ogw, tau_tofd, tau_ngw - real(kind=kind_phys), intent(out), dimension(im, levs):: gw_dudt, gw_dvdt, gw_dtdt, gw_kdis - real(kind=kind_phys), intent(out), dimension(im, levs):: dudt_mtb, dudt_ogw, dudt_tms + real(kind=kind_phys), intent(out), dimension(:) :: dusfcg, dvsfcg + real(kind=kind_phys), intent(out), dimension(:) :: zmtb, zlwb, zogw, rdxzb + real(kind=kind_phys), intent(out), dimension(:) :: tau_mtb, tau_ogw, tau_tofd, tau_ngw + real(kind=kind_phys), intent(out), dimension(:, :):: gw_dudt, gw_dvdt, gw_dtdt, gw_kdis + real(kind=kind_phys), intent(out), dimension(:, :):: dudt_mtb, dudt_ogw, dudt_tms ! These arrays are only allocated if ldiag=.true. real(kind=kind_phys), intent(inout), dimension(:,:) :: ldu3dt_ogw, ldv3dt_ogw, ldt3dt_ogw @@ -187,13 +187,13 @@ subroutine cires_ugwp_run(do_ugwp, me, master, im, levs, ntrac, dtp, kdt, lonr logical, intent(in) :: ldiag3d, lssav ! These arrays only allocated if ldiag_ugwp = .true. - real(kind=kind_phys), intent(out), dimension(:,:) :: du3dt_mtb, du3dt_ogw, du3dt_tms + real(kind=kind_phys), intent(inout), dimension(:,:) :: du3dt_mtb, du3dt_ogw, du3dt_tms - real(kind=kind_phys), intent(inout), dimension(im, levs):: dudt, dvdt, dtdt + real(kind=kind_phys), intent(inout), dimension(:, :):: dudt, dvdt, dtdt real(kind=kind_phys), intent(in) :: con_g, con_pi, con_cp, con_rd, con_rv, con_fvirt, con_omega - real(kind=kind_phys), intent(in), dimension(im) :: rain + real(kind=kind_phys), intent(in), dimension(:) :: rain integer, intent(in) :: ntke real(kind=kind_phys), intent(in), dimension(:,:) :: q_tke, dqdt_tke diff --git a/physics/cnvc90.f b/physics/cnvc90.f index 0f3d0f19d0..bbdf0aafe4 100644 --- a/physics/cnvc90.f +++ b/physics/cnvc90.f @@ -27,16 +27,16 @@ SUBROUTINE cnvc90_run(CLSTP,IM,RN,KBOT,KTOP,KM,PRSI, & ! Interface variables real(kind=kind_phys), intent(in) :: clstp integer, intent(in) :: im, km - real(kind=kind_phys), intent(in) :: RN(IM) - integer, intent(in) :: KBOT(IM) - integer, intent(in) :: KTOP(IM) - real(kind=kind_phys), intent(in) :: prsi(IM,km+1) - real(kind=kind_phys), intent(inout) :: ACV(IM) - real(kind=kind_phys), intent(inout) :: ACVB(IM) - real(kind=kind_phys), intent(inout) :: ACVT(IM) - real(kind=kind_phys), intent(inout) :: CV(IM) - real(kind=kind_phys), intent(inout) :: CVB(IM) - real(kind=kind_phys), intent(inout) :: CVT(IM) + real(kind=kind_phys), intent(in) :: RN(:) + integer, intent(in) :: KBOT(:) + integer, intent(in) :: KTOP(:) + real(kind=kind_phys), intent(in) :: prsi(:,:) + real(kind=kind_phys), intent(inout) :: ACV(:) + real(kind=kind_phys), intent(inout) :: ACVB(:) + real(kind=kind_phys), intent(inout) :: ACVT(:) + real(kind=kind_phys), intent(inout) :: CV(:) + real(kind=kind_phys), intent(inout) :: CVB(:) + real(kind=kind_phys), intent(inout) :: CVT(:) character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg diff --git a/physics/cs_conv.F90 b/physics/cs_conv.F90 index 24ce63256d..d47dcd457b 100644 --- a/physics/cs_conv.F90 +++ b/physics/cs_conv.F90 @@ -19,23 +19,23 @@ subroutine cs_conv_pre_run(im, levs, ntrac, ncld, q, clw1, clw2, & & errmsg, errflg) - use machine , only : r8 => kind_phys + use machine , only : kind_phys implicit none ! --- inputs integer, intent(in) :: im, levs, ntrac, ncld - real(r8), dimension(im,levs), intent(in) :: q - real(r8), dimension(im,levs), intent(in) :: clw1,clw2 - real(r8), dimension(im), intent(in) :: work1, work2 - real(r8), intent(in) :: cs_parm1, cs_parm2 + real(kind_phys), dimension(:,:), intent(in) :: q + real(kind_phys), dimension(:,:), intent(in) :: clw1,clw2 + real(kind_phys), dimension(:), intent(in) :: work1, work2 + real(kind_phys), intent(in) :: cs_parm1, cs_parm2 ! --- input/output - real(r8), dimension(ntrac-ncld+2), intent(out) :: fswtr, fscav - real(r8), dimension(im), intent(out) :: wcbmax - real(r8), dimension(im,levs), intent(out) :: save_q1,save_q2 + real(kind_phys), dimension(:), intent(out) :: fswtr, fscav + real(kind_phys), dimension(:), intent(out) :: wcbmax + real(kind_phys), dimension(:,:), intent(out) :: save_q1,save_q2 ! save_q3 is not allocated for Zhao-Carr MP - real(r8), dimension(:,:), intent(out) :: save_q3 + real(kind_phys), dimension(:,:), intent(out) :: save_q3 character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg @@ -83,17 +83,17 @@ end subroutine cs_conv_post_finalize !! subroutine cs_conv_post_run(im, kmax, do_aw, sigmatot, sigmafrac, errmsg, errflg) - use machine , only : r8 => kind_phys + use machine , only : kind_phys implicit none ! --- inputs integer, intent(in) :: im, kmax logical, intent(in) :: do_aw - real(r8), dimension(im,kmax), intent(in) :: sigmatot + real(kind_phys), dimension(:,:), intent(in) :: sigmatot ! --- input/output - real(r8), dimension(im,kmax), intent(out) :: sigmafrac + real(kind_phys), dimension(:,:), intent(out) :: sigmafrac character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg @@ -131,7 +131,7 @@ module cs_conv !! Author: Minoru Chikira !--------------------------------------------------------------------------------- ! - use machine , only : r8 => kind_phys + use machine , only : kind_phys use physcons, only : cp => con_cp, grav => con_g, & & rair => con_rd, rvap => con_rv, & & cliq => con_cliq, cvap => con_cvap, & @@ -145,20 +145,20 @@ module cs_conv private ! Make default type private to the module - real(r8), parameter :: zero=0.0d0, one=1.0d0, half=0.5d0 - real(r8), parameter :: cpoel=cp/el, cpoesub=cp/(el+emelt), esubocp=1.0/cpoesub, & + real(kind_phys), parameter :: zero=0.0d0, one=1.0d0, half=0.5d0 + real(kind_phys), parameter :: cpoel=cp/el, cpoesub=cp/(el+emelt), esubocp=1.0/cpoesub, & elocp=el/cp, oneocp=one/cp, gocp=grav/cp, gravi=one/grav,& - emeltocp=emelt/cp, cpoemelt=cp/emelt, epsln=1.e-10_r8 + emeltocp=emelt/cp, cpoemelt=cp/emelt, epsln=1.e-10_kind_phys - real(r8), parameter :: fact1=(cvap-cliq)/rvap, fact2=el/rvap-fact1*t0c !< to calculate d(qs)/dT + real(kind_phys), parameter :: fact1=(cvap-cliq)/rvap, fact2=el/rvap-fact1*t0c !< to calculate d(qs)/dT logical, parameter :: adjustp=.true. ! logical, parameter :: adjustp=.false. ! Tuning parameters set from namelist ! -! real(r8), parameter, public :: CLMD = 0.60, & !< entrainment efficiency (now thru argument) - real(r8), parameter, public :: & +! real(kind_phys), parameter, public :: CLMD = 0.60, & !< entrainment efficiency (now thru argument) + real(kind_phys), parameter, public :: & PA=0.15, & !< factor for buoyancy to affect updraft velocity CPRES = 0.55, & !< pressure factor for momentum transport ALP0 = 5.0e7, & !< alpha parameter in prognostic closure @@ -177,11 +177,11 @@ module cs_conv !DD precz0 and preczh control partitioning of water between detrainment !DD and precipitation. Decrease for more precip - real(r8), public :: precz0, preczh, clmd, clmp, clmdpa + real(kind_phys), public :: precz0, preczh, clmd, clmp, clmdpa ! ! Private data ! - real(r8), parameter :: unset_r8 = -999._r8 ! missing value + real(kind_phys), parameter :: unset_kind_phys = -999._kind_phys ! missing value ! integer :: iulog !< unit to write debugging and diagnostic output !DD Note - see if I can find corresponding variable in a GFS module @@ -294,102 +294,103 @@ subroutine cs_conv_run( IJSDIM , KMAX , ntracp1 , NN, & ! input arguments ! INTEGER, INTENT(IN) :: IJSDIM, KMAX, ntracp1, nn, NTR, mype, nctp, mp_phys, kdt, lat !! DD, for GFS, pass in - logical, intent(in) :: otspt(1:ntracp1,1:2)! otspt(:,1) - on/off switch for tracer transport by updraft and + logical, intent(in) :: otspt(:,:) ! otspt(:,1) - on/off switch for tracer transport by updraft and ! downdraft. should not include subgrid PDF and turbulence ! otspt(:,2) - on/off switch for tracer transport by subsidence ! should include subgrid PDF and turbulence - real(r8), intent(inout) :: t(IJSDIM,KMAX) ! temperature at mid-layer (K) - real(r8), intent(inout) :: q(IJSDIM,KMAX) ! water vapor array including moisture (kg/kg) - real(r8), intent(inout) :: clw(IJSDIM,KMAX,nn) ! tracer array including cloud condensate (kg/kg) - real(r8), intent(in) :: pap(IJSDIM,KMAX) ! pressure at mid-layer (Pa) - real(r8), intent(in) :: paph(IJSDIM,KMAX+1) ! pressure at boundaries (Pa) - real(r8), intent(in) :: zm(IJSDIM,KMAX) ! geopotential at mid-layer (m) - real(r8), intent(in) :: zi(IJSDIM,KMAX+1) ! geopotential at boundaries (m) - real(r8), intent(in) :: fscav(ntr), fswtr(ntr), wcbmaxm(ijsdim) - real(r8), intent(in) :: precz0in, preczhin, clmdin + real(kind_phys), intent(inout) :: t(:,:) ! temperature at mid-layer (K) + real(kind_phys), intent(inout) :: q(:,:) ! water vapor array including moisture (kg/kg) + real(kind_phys), intent(inout) :: clw(:,:,:) ! tracer array including cloud condensate (kg/kg) + real(kind_phys), intent(in) :: pap(:,:) ! pressure at mid-layer (Pa) + real(kind_phys), intent(in) :: paph(:,:) ! pressure at boundaries (Pa) + real(kind_phys), intent(in) :: zm(:,:) ! geopotential at mid-layer (m) + real(kind_phys), intent(in) :: zi(:,:) ! geopotential at boundaries (m) + real(kind_phys), intent(in) :: fscav(:), fswtr(:), wcbmaxm(:) + real(kind_phys), intent(in) :: precz0in, preczhin, clmdin ! added for cs_convr - real(r8), intent(inout) :: u(IJSDIM,KMAX) ! zonal wind at mid-layer (m/s) - real(r8), intent(inout) :: v(IJSDIM,KMAX) ! meridional wind at mid-layer (m/s) + real(kind_phys), intent(inout) :: u(:,:) ! zonal wind at mid-layer (m/s) + real(kind_phys), intent(inout) :: v(:,:) ! meridional wind at mid-layer (m/s) - real(r8), intent(in) :: DELTA ! physics time step - real(r8), intent(in) :: DELTI ! dynamics time step (model time increment in seconds) + real(kind_phys), intent(in) :: DELTA ! physics time step + real(kind_phys), intent(in) :: DELTI ! dynamics time step (model time increment in seconds) logical, intent(in) :: do_aw, do_awdd, flx_form ! ! modified arguments ! - real(r8), intent(inout) :: CBMFX(IJSDIM,nctp) ! cloud base mass flux (kg/m2/s) + real(kind_phys), intent(inout) :: CBMFX(:,:) ! cloud base mass flux (kg/m2/s) ! ! output arguments ! ! updraft, downdraft, and detrainment mass flux (kg/m2/s) - real(r8), intent(inout), dimension(IJSDIM,KMAX) :: ud_mf, dd_mf, dt_mf + real(kind_phys), intent(inout), dimension(:,:) :: ud_mf, dd_mf, dt_mf - real(r8), intent(out) :: rain1(IJSDIM) ! lwe thickness of deep convective precipitation amount (m) + real(kind_phys), intent(out) :: rain1(:) ! lwe thickness of deep convective precipitation amount (m) ! GJF* These variables are conditionally allocated depending on whether the ! Morrison-Gettelman microphysics is used, so they must be declared ! using assumed shape. - real(r8), intent(out), dimension(:,:) :: qlcn, qicn, w_upi,cnv_mfd, & - cnv_dqldt, clcn, cnv_fice, & - cnv_ndrop, cnv_nice, cf_upi + real(kind_phys), intent(out), dimension(:,:) :: qlcn, qicn, w_upi,cnv_mfd, & + cnv_dqldt, clcn, cnv_fice, & + cnv_ndrop, cnv_nice, cf_upi ! *GJF - integer, intent(inout) :: kcnv(ijsdim) ! zero if no deep convection and 1 otherwise + logical, intent(in) :: lprnt + integer, intent(in) :: ipr + integer, intent(inout) :: kcnv(:) ! zero if no deep convection and 1 otherwise character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg !DDsigma - output added for AW sigma diagnostics ! interface sigma and vertical velocity by cloud type (1=sfc) -! real(r8), intent(out), dimension(IJSDIM,KMAX,nctp) :: sigmai, vverti - real(r8), intent(out), dimension(IJSDIM,KMAX) :: sigma ! sigma sigma totaled over cloud type - on interfaces (1=sfc) +! real(kind_phys), intent(out), dimension(:,:,:) :: sigmai, vverti + real(kind_phys), intent(out), dimension(:,:) :: sigma ! sigma sigma totaled over cloud type - on interfaces (1=sfc) ! sigma terms in eq 91 and 92 -! real(r8), dimension(IJSDIM,KMAX) :: sfluxterm, qvfluxterm, condterm +! real(kind_phys), dimension(IJSDIM,KMAX) :: sfluxterm, qvfluxterm, condterm !DDsigma ! ! output arguments of CS_CUMLUS ! - real(r8), dimension(IJSDIM,KMAX,nctp) :: vverti + real(kind_phys), dimension(IJSDIM,KMAX,nctp) :: vverti - real(r8) GTT(IJSDIM,KMAX) !< temperature tendency [K/s] - real(r8) GTQ(IJSDIM,KMAX,NTR) !< tracer tendency [kg/kg/s] - real(r8) GTU(IJSDIM,KMAX) !< zonal velocity tendency [m/s2] - real(r8) GTV(IJSDIM,KMAX) !< meridional velocity tendency [m/s2] - real(r8) GTPRP(IJSDIM,KMAX) !< precipitation (including snowfall) flux at interfaces [kg/m2/s] - real(r8) GSNWP(IJSDIM,KMAX) !< snowfall flux at interfaces [kg/m2/s] + real(kind_phys) GTT(IJSDIM,KMAX) !< temperature tendency [K/s] + real(kind_phys) GTQ(IJSDIM,KMAX,NTR) !< tracer tendency [kg/kg/s] + real(kind_phys) GTU(IJSDIM,KMAX) !< zonal velocity tendency [m/s2] + real(kind_phys) GTV(IJSDIM,KMAX) !< meridional velocity tendency [m/s2] + real(kind_phys) GTPRP(IJSDIM,KMAX) !< precipitation (including snowfall) flux at interfaces [kg/m2/s] + real(kind_phys) GSNWP(IJSDIM,KMAX) !< snowfall flux at interfaces [kg/m2/s] integer KT(IJSDIM,nctp) !< cloud top index for each cloud type - real(r8) :: cape(IJSDIM) !< convective available potential energy (J/kg) - real(r8) :: prec(IJSDIM) !< precipitation at surface (including snowfall) (kg/m2/s) - real(r8) :: snow(IJSDIM) !< snowfall at surface (kg/m2/s) + real(kind_phys) :: cape(IJSDIM) !< convective available potential energy (J/kg) + real(kind_phys) :: prec(IJSDIM) !< precipitation at surface (including snowfall) (kg/m2/s) + real(kind_phys) :: snow(IJSDIM) !< snowfall at surface (kg/m2/s) ! ! input arguments of CS_CUMLUS ! - real(r8) GDT(IJSDIM,KMAX) !< temperature [K] - real(r8) GDQ(IJSDIM,KMAX,NTR) !< tracers including moisture [kg/kg] !DDsigmadiag - real(r8) GDU(IJSDIM,KMAX) !< zonal wind [m/s] - real(r8) GDV(IJSDIM,KMAX) !< meridional wind [m/s] - real(r8) GDTM(IJSDIM,KMAX+1) !< temperature at boundaries of layers [K] - real(r8) GDP(IJSDIM,KMAX) !< pressure [Pa] - real(r8) GDPM(IJSDIM,KMAX+1) !< pressure at boundaries of layers [Pa] - real(r8) GDZ(IJSDIM,KMAX) !< altitude [m] - real(r8) GDZM(IJSDIM,KMAX+1) !< altitude at boundaries of layers [m] - real(r8) delp(IJSDIM,KMAX) !< pressure difference between layers [Pa] - real(r8) delpi(IJSDIM,KMAX) !< grav/delp + real(kind_phys) GDT(IJSDIM,KMAX) !< temperature [K] + real(kind_phys) GDQ(IJSDIM,KMAX,NTR) !< tracers including moisture [kg/kg] !DDsigmadiag + real(kind_phys) GDU(IJSDIM,KMAX) !< zonal wind [m/s] + real(kind_phys) GDV(IJSDIM,KMAX) !< meridional wind [m/s] + real(kind_phys) GDTM(IJSDIM,KMAX+1) !< temperature at boundaries of layers [K] + real(kind_phys) GDP(IJSDIM,KMAX) !< pressure [Pa] + real(kind_phys) GDPM(IJSDIM,KMAX+1) !< pressure at boundaries of layers [Pa] + real(kind_phys) GDZ(IJSDIM,KMAX) !< altitude [m] + real(kind_phys) GDZM(IJSDIM,KMAX+1) !< altitude at boundaries of layers [m] + real(kind_phys) delp(IJSDIM,KMAX) !< pressure difference between layers [Pa] + real(kind_phys) delpi(IJSDIM,KMAX) !< grav/delp ! ! local variables ! -!DD real(r8) :: zs(IJSDIM) !< surface height [m] +!DD real(kind_phys) :: zs(IJSDIM) !< surface height [m] integer KTMAX(IJSDIM) !< max of KT - real(r8) :: ftintm, wrk, wrk1, tem - integer i, k, n, ISTS, IENS, kp1, ipr + real(kind_phys) :: ftintm, wrk, wrk1, tem + integer i, k, n, ISTS, IENS, kp1 !DD borrowed from RAS to go form total condensate to ice/water separately ! parameter (tf=130.16, tcr=160.16, tcrf=1.0/(tcr-tf),tcl=2.0) ! parameter (tf=230.16, tcr=260.16, tcrf=1.0/(tcr-tf)) - real(r8), parameter :: tf=233.16, tcr=263.16, tcrf=1.0/(tcr-tf), tcl=2.0 + real(kind_phys), parameter :: tf=233.16, tcr=263.16, tcrf=1.0/(tcr-tf), tcl=2.0 logical, save :: first=.true. - logical lprnt ! Initialize CCPP error handling variables errmsg = '' @@ -723,208 +724,208 @@ SUBROUTINE CS_CUMLUS (im , IJSDIM, KMAX , NTR , & !DD dimensions logical, intent(in) :: otspt1(ntr), otspt2(ntr), lprnt ! ! [OUTPUT] - REAL(r8), INTENT(OUT) :: GTT (IJSDIM, KMAX ) ! heating rate - REAL(r8), INTENT(OUT) :: GTQ (IJSDIM, KMAX, NTR) ! change in q - REAL(r8), INTENT(OUT) :: GTU (IJSDIM, KMAX ) ! tendency of u - REAL(r8), INTENT(OUT) :: GTV (IJSDIM, KMAX ) ! tendency of v - REAL(r8), INTENT(OUT) :: CMDET (IJSDIM, KMAX ) ! detrainment mass flux + REAL(kind_phys), INTENT(OUT) :: GTT (IJSDIM, KMAX ) ! heating rate + REAL(kind_phys), INTENT(OUT) :: GTQ (IJSDIM, KMAX, NTR) ! change in q + REAL(kind_phys), INTENT(OUT) :: GTU (IJSDIM, KMAX ) ! tendency of u + REAL(kind_phys), INTENT(OUT) :: GTV (IJSDIM, KMAX ) ! tendency of v + REAL(kind_phys), INTENT(OUT) :: CMDET (IJSDIM, KMAX ) ! detrainment mass flux ! assuming there is no flux at the top of the atmospherea - Moorthi - REAL(r8), INTENT(OUT) :: GTPRP (IJSDIM, KMAX ) ! rain+snow flux - REAL(r8), INTENT(OUT) :: GSNWP (IJSDIM, KMAX ) ! snowfall flux - REAL(r8), INTENT(OUT) :: GMFX0 (IJSDIM, KMAX ) ! updraft mass flux - REAL(r8), INTENT(OUT) :: GMFX1 (IJSDIM, KMAX ) ! downdraft mass flux + REAL(kind_phys), INTENT(OUT) :: GTPRP (IJSDIM, KMAX ) ! rain+snow flux + REAL(kind_phys), INTENT(OUT) :: GSNWP (IJSDIM, KMAX ) ! snowfall flux + REAL(kind_phys), INTENT(OUT) :: GMFX0 (IJSDIM, KMAX ) ! updraft mass flux + REAL(kind_phys), INTENT(OUT) :: GMFX1 (IJSDIM, KMAX ) ! downdraft mass flux - REAL(r8), INTENT(OUT) :: CAPE (IJSDIM ) + REAL(kind_phys), INTENT(OUT) :: CAPE (IJSDIM ) INTEGER , INTENT(OUT) :: KT (IJSDIM, NCTP ) ! cloud top ! ! [MODIFIED] - REAL(r8), INTENT(INOUT) :: CBMFX (IM, NCTP) ! cloud base mass flux + REAL(kind_phys), INTENT(INOUT) :: CBMFX (IM, NCTP) ! cloud base mass flux !DDsigma - output added for AW sigma diagnostics ! sigma and vert. velocity as a function of cloud type (1==sfc) - real(r8), intent(out), dimension(IM,KMAX) :: sigma !sigma totaled over cloud type - on interfaces (1=sfc) - real(r8), intent(out), dimension(IM,KMAX,nctp) :: vverti + real(kind_phys), intent(out), dimension(IM,KMAX) :: sigma !sigma totaled over cloud type - on interfaces (1=sfc) + real(kind_phys), intent(out), dimension(IM,KMAX,nctp) :: vverti ! for computing AW flux form of tendencies ! The tendencies are summed over all cloud types -! real(r8), intent(out), dimension(IM,KMAX) :: & !DDsigmadiag - real(r8), allocatable, dimension(:,:) :: sfluxterm, qvfluxterm,& ! tendencies of DSE and water vapor due to eddy mass flux +! real(kind_phys), intent(out), dimension(IM,KMAX) :: & !DDsigmadiag + real(kind_phys), allocatable, dimension(:,:) :: sfluxterm, qvfluxterm,& ! tendencies of DSE and water vapor due to eddy mass flux qlfluxterm, qifluxterm,& ! tendencies of cloud water and cloud ice due to eddy mass flux ! The fluxes are for an individual cloud type and reused. ! condtermt, condtermq are eddy flux of temperature and water vapor condtermt, condtermq, frzterm, & prectermq, prectermfrz - real(r8), allocatable, dimension(:,:,:) :: trfluxterm ! tendencies of tracers due to eddy mass flux + real(kind_phys), allocatable, dimension(:,:,:) :: trfluxterm ! tendencies of tracers due to eddy mass flux ! ! [INPUT] - REAL(r8), INTENT(IN) :: GDT (IJSDIM, KMAX ) ! temperature T - REAL(r8), INTENT(IN) :: GDQ (IJSDIM, KMAX, NTR) ! humidity, tracer !DDsigmadiag - REAL(r8), INTENT(IN) :: GDU (IJSDIM, KMAX ) ! westerly u - REAL(r8), INTENT(IN) :: GDV (IJSDIM, KMAX ) ! southern wind v - REAL(r8), INTENT(IN) :: GDTM (IJSDIM, KMAX+1 ) ! temperature T - REAL(r8), INTENT(IN) :: GDP (IJSDIM, KMAX ) ! pressure P - REAL(r8), INTENT(IN) :: GDPM (IJSDIM, KMAX+1 ) ! pressure (half lev) - REAL(r8), INTENT(IN) :: GDZ (IJSDIM, KMAX ) ! altitude - REAL(r8), INTENT(IN) :: GDZM (IJSDIM, KMAX+1 ) ! altitude - REAL(r8), INTENT(IN) :: DELTA ! delta(t) (dynamics) - REAL(r8), INTENT(IN) :: DELTI ! delta(t) (internal variable) + REAL(kind_phys), INTENT(IN) :: GDT (IJSDIM, KMAX ) ! temperature T + REAL(kind_phys), INTENT(IN) :: GDQ (IJSDIM, KMAX, NTR) ! humidity, tracer !DDsigmadiag + REAL(kind_phys), INTENT(IN) :: GDU (IJSDIM, KMAX ) ! westerly u + REAL(kind_phys), INTENT(IN) :: GDV (IJSDIM, KMAX ) ! southern wind v + REAL(kind_phys), INTENT(IN) :: GDTM (IJSDIM, KMAX+1 ) ! temperature T + REAL(kind_phys), INTENT(IN) :: GDP (IJSDIM, KMAX ) ! pressure P + REAL(kind_phys), INTENT(IN) :: GDPM (IJSDIM, KMAX+1 ) ! pressure (half lev) + REAL(kind_phys), INTENT(IN) :: GDZ (IJSDIM, KMAX ) ! altitude + REAL(kind_phys), INTENT(IN) :: GDZM (IJSDIM, KMAX+1 ) ! altitude + REAL(kind_phys), INTENT(IN) :: DELTA ! delta(t) (dynamics) + REAL(kind_phys), INTENT(IN) :: DELTI ! delta(t) (internal variable) INTEGER, INTENT(IN) :: ISTS, IENS ! array range - real(r8), intent(in) :: fscav(ntr), fswtr(ntr), wcbmaxm(ijsdim) + real(kind_phys), intent(in) :: fscav(ntr), fswtr(ntr), wcbmaxm(ijsdim) ! ! [INTERNAL WORK] - REAL(r8), allocatable :: GPRCC (:, :) ! rainfall -! REAL(r8) GPRCC (IJSDIM, NTR) ! rainfall -! REAL(r8) GSNWC (IJSDIM) ! snowfall -! REAL(r8) CUMCLW(IJSDIM, KMAX) ! cloud water in cumulus -! REAL(r8) CUMFRC(IJSDIM) ! cumulus cloud fraction -! -! REAL(r8) GTCFRC(IJSDIM, KMAX) ! change in cloud fraction -! REAL(r8) FLIQC (IJSDIM, KMAX) ! liquid ratio in cumulus -! -! REAL(r8) GDCFRC(IJSDIM, KMAX) ! cloud fraction -! - REAL(r8) GDW (IJSDIM, KMAX) ! total water - REAL(r8) DELP (IJSDIM, KMAX) - REAL(r8) DELPI (IJSDIM, KMAX) - REAL(r8) GDQS (IJSDIM, KMAX) ! saturate moisture - REAL(r8) FDQS (IJSDIM, KMAX) - REAL(r8) GAM (IJSDIM, KMAX) - REAL(r8) GDS (IJSDIM, KMAX) ! dry static energy - REAL(r8) GDH (IJSDIM, KMAX) ! moist static energy - REAL(r8) GDHS (IJSDIM, KMAX) ! saturate MSE -! - REAL(r8) GCYM (IJSDIM, KMAX, NCTP)! norm. mass flux (half lev) - REAL(r8) GCHB (IJSDIM) ! cloud base MSE-Li*Qi - REAL(r8) GCWB (IJSDIM) ! cloud base total water - REAL(r8) GCUB (IJSDIM) ! cloud base U - REAL(r8) GCVB (IJSDIM) ! cloud base V - REAL(r8) GCIB (IJSDIM) ! cloud base ice - REAL(r8) GCtrB (IJSDIM,ntrq:ntr) ! cloud base tracer - REAL(r8) GCYT (IJSDIM, NCTP) ! norm. mass flux @top - REAL(r8) GCHT (IJSDIM, NCTP) ! cloud top MSE - REAL(r8) GCQT (IJSDIM, NCTP) ! cloud top q - REAL(r8) GCwT (IJSDIM) ! cloud top total water - REAL(r8) GCUT (IJSDIM, NCTP) ! cloud top U - REAL(r8) GCVT (IJSDIM, NCTP) ! cloud top V - REAL(r8) GCLT (IJSDIM, NCTP) ! cloud top cloud water - REAL(r8) GCIT (IJSDIM, NCTP) ! cloud top cloud ice - REAL(r8) GCtrT (IJSDIM, ntrq:ntr, NCTP) ! cloud top tracer - REAL(r8) GTPRT (IJSDIM, NCTP) ! precipitation/M - REAL(r8) GCLZ (IJSDIM, KMAX) ! cloud liquid for each CTP - REAL(r8) GCIZ (IJSDIM, KMAX) ! cloud ice for each CTP - -! REAL(r8) ACWF (IJSDIM, NCTP) ! cloud work function - REAL(r8) ACWF (IJSDIM ) ! cloud work function - REAL(r8) GPRCIZ(IJSDIM, KMAX) ! precipitation - REAL(r8) GSNWIZ(IJSDIM, KMAX) ! snowfall - REAL(r8) GTPRC0(IJSDIM) ! precip. before evap. - - REAL(r8) GMFLX (IJSDIM, KMAX) ! mass flux (updraft+downdraft) - REAL(r8) QLIQ (IJSDIM, KMAX) ! total cloud liquid - REAL(r8) QICE (IJSDIM, KMAX) ! total cloud ice - REAL(r8) GPRCI (IJSDIM, KMAX) ! rainfall generation - REAL(r8) GSNWI (IJSDIM, KMAX) ! snowfall generation - - REAL(r8) GPRCP (IJSDIM, KMAX) ! rainfall flux -! - REAL(r8) GTEVP (IJSDIM, KMAX) ! evaporation+sublimation - REAL(r8) GMDD (IJSDIM, KMAX) ! downdraft mass flux - -! REAL(r8) CUMHGT(IJSDIM, NCTP) ! cloud top height -! REAL(r8) CTOPP (IJSDIM) ! cloud top pressure - - REAL(r8) GDZTR (IJSDIM) ! tropopause height -! REAL(r8) FLIQOU(IJSDIM, KMAX) ! liquid ratio in cumulus + REAL(kind_phys), allocatable :: GPRCC (:, :) ! rainfall +! REAL(kind_phys) GPRCC (IJSDIM, NTR) ! rainfall +! REAL(kind_phys) GSNWC (IJSDIM) ! snowfall +! REAL(kind_phys) CUMCLW(IJSDIM, KMAX) ! cloud water in cumulus +! REAL(kind_phys) CUMFRC(IJSDIM) ! cumulus cloud fraction +! +! REAL(kind_phys) GTCFRC(IJSDIM, KMAX) ! change in cloud fraction +! REAL(kind_phys) FLIQC (IJSDIM, KMAX) ! liquid ratio in cumulus +! +! REAL(kind_phys) GDCFRC(IJSDIM, KMAX) ! cloud fraction +! + REAL(kind_phys) GDW (IJSDIM, KMAX) ! total water + REAL(kind_phys) DELP (IJSDIM, KMAX) + REAL(kind_phys) DELPI (IJSDIM, KMAX) + REAL(kind_phys) GDQS (IJSDIM, KMAX) ! saturate moisture + REAL(kind_phys) FDQS (IJSDIM, KMAX) + REAL(kind_phys) GAM (IJSDIM, KMAX) + REAL(kind_phys) GDS (IJSDIM, KMAX) ! dry static energy + REAL(kind_phys) GDH (IJSDIM, KMAX) ! moist static energy + REAL(kind_phys) GDHS (IJSDIM, KMAX) ! saturate MSE +! + REAL(kind_phys) GCYM (IJSDIM, KMAX, NCTP)! norm. mass flux (half lev) + REAL(kind_phys) GCHB (IJSDIM) ! cloud base MSE-Li*Qi + REAL(kind_phys) GCWB (IJSDIM) ! cloud base total water + REAL(kind_phys) GCUB (IJSDIM) ! cloud base U + REAL(kind_phys) GCVB (IJSDIM) ! cloud base V + REAL(kind_phys) GCIB (IJSDIM) ! cloud base ice + REAL(kind_phys) GCtrB (IJSDIM,ntrq:ntr) ! cloud base tracer + REAL(kind_phys) GCYT (IJSDIM, NCTP) ! norm. mass flux @top + REAL(kind_phys) GCHT (IJSDIM, NCTP) ! cloud top MSE + REAL(kind_phys) GCQT (IJSDIM, NCTP) ! cloud top q + REAL(kind_phys) GCwT (IJSDIM) ! cloud top total water + REAL(kind_phys) GCUT (IJSDIM, NCTP) ! cloud top U + REAL(kind_phys) GCVT (IJSDIM, NCTP) ! cloud top V + REAL(kind_phys) GCLT (IJSDIM, NCTP) ! cloud top cloud water + REAL(kind_phys) GCIT (IJSDIM, NCTP) ! cloud top cloud ice + REAL(kind_phys) GCtrT (IJSDIM, ntrq:ntr, NCTP) ! cloud top tracer + REAL(kind_phys) GTPRT (IJSDIM, NCTP) ! precipitation/M + REAL(kind_phys) GCLZ (IJSDIM, KMAX) ! cloud liquid for each CTP + REAL(kind_phys) GCIZ (IJSDIM, KMAX) ! cloud ice for each CTP + +! REAL(kind_phys) ACWF (IJSDIM, NCTP) ! cloud work function + REAL(kind_phys) ACWF (IJSDIM ) ! cloud work function + REAL(kind_phys) GPRCIZ(IJSDIM, KMAX) ! precipitation + REAL(kind_phys) GSNWIZ(IJSDIM, KMAX) ! snowfall + REAL(kind_phys) GTPRC0(IJSDIM) ! precip. before evap. + + REAL(kind_phys) GMFLX (IJSDIM, KMAX) ! mass flux (updraft+downdraft) + REAL(kind_phys) QLIQ (IJSDIM, KMAX) ! total cloud liquid + REAL(kind_phys) QICE (IJSDIM, KMAX) ! total cloud ice + REAL(kind_phys) GPRCI (IJSDIM, KMAX) ! rainfall generation + REAL(kind_phys) GSNWI (IJSDIM, KMAX) ! snowfall generation + + REAL(kind_phys) GPRCP (IJSDIM, KMAX) ! rainfall flux +! + REAL(kind_phys) GTEVP (IJSDIM, KMAX) ! evaporation+sublimation + REAL(kind_phys) GMDD (IJSDIM, KMAX) ! downdraft mass flux + +! REAL(kind_phys) CUMHGT(IJSDIM, NCTP) ! cloud top height +! REAL(kind_phys) CTOPP (IJSDIM) ! cloud top pressure + + REAL(kind_phys) GDZTR (IJSDIM) ! tropopause height +! REAL(kind_phys) FLIQOU(IJSDIM, KMAX) ! liquid ratio in cumulus INTEGER KB (IJSDIM) INTEGER KSTRT (IJSDIM) ! tropopause level - REAL(r8) GAMX - REAL(r8) CIN (IJSDIM) + REAL(kind_phys) GAMX + REAL(kind_phys) CIN (IJSDIM) INTEGER JBUOY (IJSDIM) - REAL(r8) DELZ, BUOY, DELWC, DELER - REAL(r8) WCBX (IJSDIM) -! REAL(r8) ERMR (NCTP) ! entrainment rate (ASMODE) + REAL(kind_phys) DELZ, BUOY, DELWC, DELER + REAL(kind_phys) WCBX (IJSDIM) +! REAL(kind_phys) ERMR (NCTP) ! entrainment rate (ASMODE) ! SAVE ERMR INTEGER KTMX (NCTP) ! max of cloud top INTEGER KTMXT ! max of cloud top -! REAL(r8) TIMED - REAL(r8) GDCLDX, GDMU2X, GDMU3X +! REAL(kind_phys) TIMED + REAL(kind_phys) GDCLDX, GDMU2X, GDMU3X ! -! REAL(r8) HBGT (IJSDIM) ! imbalance in column heat -! REAL(r8) WBGT (IJSDIM) ! imbalance in column water +! REAL(kind_phys) HBGT (IJSDIM) ! imbalance in column heat +! REAL(kind_phys) WBGT (IJSDIM) ! imbalance in column water !DDsigma begin local work variables - all on model interfaces (sfc=1) - REAL(r8) lamdai ! lamda for cloud type ctp - REAL(r8) gdqm, gdlm, gdim ! water vapor - REAL(r8) gdtrm(ntrq:ntr) ! tracer + REAL(kind_phys) lamdai ! lamda for cloud type ctp + REAL(kind_phys) gdqm, gdlm, gdim ! water vapor + REAL(kind_phys) gdtrm(ntrq:ntr) ! tracer ! the following are new arguments to cumup to get them out for AW - REAL(r8) wcv (IJSDIM, KMAX) ! in-cloud vertical velocity - REAL(r8) GCTM (IJSDIM, KMAX) ! cloud T (half lev) !DDsigmadiag make output - REAL(r8) GCQM (IJSDIM, KMAX) ! cloud q (half lev) !DDsigmadiag make output - REAL(r8) GCwM (IJSDIM, KMAX) ! cloud q (half lev) !DDsigmadiag make output - REAL(r8) GCiM (IJSDIM, KMAX) ! cloud q (half lev) !DDsigmadiag make output - REAL(r8) GClM (IJSDIM, KMAX) ! cloud q (half lev) !DDsigmadiag make output - REAL(r8) GChM (IJSDIM, KMAX) ! cloud q (half lev) !DDsigmadiag make output - REAL(r8) GCtrM (IJSDIM, KMAX, ntrq:ntr) ! cloud tracer (half lev) !DDsigmadiag make output + REAL(kind_phys) wcv (IJSDIM, KMAX) ! in-cloud vertical velocity + REAL(kind_phys) GCTM (IJSDIM, KMAX) ! cloud T (half lev) !DDsigmadiag make output + REAL(kind_phys) GCQM (IJSDIM, KMAX) ! cloud q (half lev) !DDsigmadiag make output + REAL(kind_phys) GCwM (IJSDIM, KMAX) ! cloud q (half lev) !DDsigmadiag make output + REAL(kind_phys) GCiM (IJSDIM, KMAX) ! cloud q (half lev) !DDsigmadiag make output + REAL(kind_phys) GClM (IJSDIM, KMAX) ! cloud q (half lev) !DDsigmadiag make output + REAL(kind_phys) GChM (IJSDIM, KMAX) ! cloud q (half lev) !DDsigmadiag make output + REAL(kind_phys) GCtrM (IJSDIM, KMAX, ntrq:ntr) ! cloud tracer (half lev) !DDsigmadiag make output ! eddy flux profiles for dse, water vapor, cloud water, cloud ice - REAL(r8), dimension(Kmax+1) :: sfluxtem, qvfluxtem, qlfluxtem, qifluxtem - REAL(r8), dimension(Kmax+1,ntrq:ntr) :: trfluxtem ! tracer + REAL(kind_phys), dimension(Kmax+1) :: sfluxtem, qvfluxtem, qlfluxtem, qifluxtem + REAL(kind_phys), dimension(Kmax+1,ntrq:ntr) :: trfluxtem ! tracer ! tendency profiles - condensation heating, condensation moistening, heating due to ! freezing, total precip production, frozen precip production - REAL(r8), dimension(ijsdim,Kmax) :: dtcondtem, dqcondtem, dtfrztem, dqprectem,& ! Moorthi + REAL(kind_phys), dimension(ijsdim,Kmax) :: dtcondtem, dqcondtem, dtfrztem, dqprectem,& ! Moorthi dfrzprectem, lamdaprod !< product of (1+lamda) through cloud type ctp - REAL(r8), dimension(ijsdim,Kmax) :: dtevap, dqevap, dtmelt, dtsubl + REAL(kind_phys), dimension(ijsdim,Kmax) :: dtevap, dqevap, dtmelt, dtsubl ! factor to modify precip rate to force conservation of water. With bug fixes it's ! not doing anything now. - REAL(r8), dimension(ijsdim) :: moistening_aw - real(r8), dimension(ijsdim,kmax) :: gctbl, gcqbl,gcwbl, gcqlbl, gcqibl, & !DDsigmadiag updraft profiles below cloud Base + REAL(kind_phys), dimension(ijsdim) :: moistening_aw + real(kind_phys), dimension(ijsdim,kmax) :: gctbl, gcqbl,gcwbl, gcqlbl, gcqibl, & !DDsigmadiag updraft profiles below cloud Base sigmad ! downdraft area fraction - real(r8), dimension(ijsdim,kmax,ntrq:ntr) :: gctrbl !DDsigmadiag tracer updraft profiles below cloud Base + real(kind_phys), dimension(ijsdim,kmax,ntrq:ntr) :: gctrbl !DDsigmadiag tracer updraft profiles below cloud Base ! rhs_q, rhs_h are residuals of condensed water, MSE budgets to compute condensation, ! and heating due to freezing - real(r8) :: rhs_q, rhs_h, fsigma, sigmai, delpinv -! real(r8) :: rhs_q, rhs_h, sftem, qftem, qlftem, qiftem, & + real(kind_phys) :: rhs_q, rhs_h, fsigma, sigmai, delpinv +! real(kind_phys) :: rhs_q, rhs_h, sftem, qftem, qlftem, qiftem, & ! fsigma ! factor to reduce mass flux terms (1-sigma**2) for AW !DDsigma end local work variables ! ! profiles of heating due to precip evaporation, melting and sublimation, and the ! evap, melting and sublimation rates. - REAL(r8), allocatable, dimension(:,:) :: dtdwn, & ! t tendency downdraft detrainment + REAL(kind_phys), allocatable, dimension(:,:) :: dtdwn, & ! t tendency downdraft detrainment dqvdwn, & ! qv tendency downdraft detrainment dqldwn, & ! ql tendency downdraft detrainment dqidwn ! qi tendency downdraft detrainment - REAL(r8), allocatable, dimension(:,:,:) :: dtrdwn ! tracer tendency downdraft detrainment + REAL(kind_phys), allocatable, dimension(:,:,:) :: dtrdwn ! tracer tendency downdraft detrainment !DDsigma end local work variables ! ! [INTERNAL PARM] - REAL(r8), parameter :: WCBMIN = zero ! min. of updraft velocity at cloud base + REAL(kind_phys), parameter :: WCBMIN = zero ! min. of updraft velocity at cloud base -!M REAL(r8) :: WCBMAX = 1.4_r8 ! max. of updraft velocity at cloud base +!M REAL(kind_phys) :: WCBMAX = 1.4_kind_phys ! max. of updraft velocity at cloud base !M wcbas commented by Moorthi since it is not used -!M REAL(r8) :: WCBAS = 2._r8 ! updraft velocity**2 at cloud base (ASMODE) -!M REAL(r8) :: ERAMIN = 1.e-5_r8 ! min. of entrainment rate +!M REAL(kind_phys) :: WCBAS = 2._kind_phys ! updraft velocity**2 at cloud base (ASMODE) +!M REAL(kind_phys) :: ERAMIN = 1.e-5_kind_phys ! min. of entrainment rate ! used only in OPT_ASMODE -!M REAL(r8) :: ERAMAX = 2.e-3_r8 ! max. of entrainment rate +!M REAL(kind_phys) :: ERAMAX = 2.e-3_kind_phys ! max. of entrainment rate ! used only in OPT_ASMODE LOGICAL :: OINICB = .false. ! set 0.d0 to CBMFX when .true. -! REAL(r8) :: VARMIN = 1.e-13_r8 ! minimum of PDF variance -! REAL(r8) :: VARMAX = 5.e-7_r8 ! maximum of PDF variance -! REAL(r8) :: SKWMAX = 0.566_r8 ! maximum of PDF skewness +! REAL(kind_phys) :: VARMIN = 1.e-13_kind_phys ! minimum of PDF variance +! REAL(kind_phys) :: VARMAX = 5.e-7_kind_phys ! maximum of PDF variance +! REAL(kind_phys) :: SKWMAX = 0.566_kind_phys ! maximum of PDF skewness - REAL(r8) :: PSTRMX = 400.e2_r8 ! max P of tropopause - REAL(r8) :: PSTRMN = 50.e2_r8 ! min P of tropopause - REAL(r8) :: GCRSTR = 1.e-4_r8 ! crit. dT/dz tropopause + REAL(kind_phys) :: PSTRMX = 400.e2_kind_phys ! max P of tropopause + REAL(kind_phys) :: PSTRMN = 50.e2_kind_phys ! min P of tropopause + REAL(kind_phys) :: GCRSTR = 1.e-4_kind_phys ! crit. dT/dz tropopause - real(kind=r8) :: tem, esat, mflx_e, cbmfl, tem1, tem2, tem3 + real(kind=kind_phys) :: tem, esat, mflx_e, cbmfl, tem1, tem2, tem3 INTEGER :: KBMX, I, K, CTP, ierr, n, kp1, km1, kk, kbi, l, l1 ! LOGICAL, SAVE :: OFIRST = .TRUE. ! called first time? @@ -1722,7 +1723,7 @@ SUBROUTINE CS_CUMLUS (im , IJSDIM, KMAX , NTR , & !DD dimensions ! is occuring now which is a good sign! DD if(flx_form .and. adjustp) then DO I = ISTS, IENS - if(gprcp(i,1)+gsnwp(i,1) > 1.e-12_r8) then + if(gprcp(i,1)+gsnwp(i,1) > 1.e-12_kind_phys) then moistening_aw(i) = - moistening_aw(i) / (gprcp(i,1)+gsnwp(i,1)) else moistening_aw(i) = 1.0 @@ -1791,42 +1792,42 @@ SUBROUTINE CUMBAS & ! cloud base ! ! [OUTPUT] INTEGER KB (IJSDIM) ! cloud base - REAL(r8) GCYM (IJSDIM, KMAX) ! norm. mass flux (half lev) + REAL(kind_phys) GCYM (IJSDIM, KMAX) ! norm. mass flux (half lev) INTEGER KBMX - REAL(r8) GCHB (IJSDIM) ! cloud base MSE - REAL(r8) GCWB (IJSDIM) ! cloud base total water - REAL(r8) GCUB (IJSDIM) ! cloud base U - REAL(r8) GCVB (IJSDIM) ! cloud base V - REAL(r8) GCIB (IJSDIM) ! cloud base ice - REAL(r8) GCtrB (IJSDIM,ntrq:ntr) ! cloud base tracer + REAL(kind_phys) GCHB (IJSDIM) ! cloud base MSE + REAL(kind_phys) GCWB (IJSDIM) ! cloud base total water + REAL(kind_phys) GCUB (IJSDIM) ! cloud base U + REAL(kind_phys) GCVB (IJSDIM) ! cloud base V + REAL(kind_phys) GCIB (IJSDIM) ! cloud base ice + REAL(kind_phys) GCtrB (IJSDIM,ntrq:ntr) ! cloud base tracer !DDsigma added to arglist for AW, subcloud updraft profiles: temperature, water vapor ! total water, cloud water, and cloud ice respectively - REAL(r8), dimension(ijsdim,kmax) :: gctbl, gcqbl, gcwbl, gcqlbl, gcqibl !>DDsigmadiag - REAL(r8), dimension(ijsdim,kmax,ntrq:ntr) :: gctrbl !DDsigmadiag + REAL(kind_phys), dimension(ijsdim,kmax) :: gctbl, gcqbl, gcwbl, gcqlbl, gcqibl !>DDsigmadiag + REAL(kind_phys), dimension(ijsdim,kmax,ntrq:ntr) :: gctrbl !DDsigmadiag ! ! [INPUT] - REAL(r8) GDH (IJSDIM, KMAX) ! moist static energy - REAL(r8) GDW (IJSDIM, KMAX) ! total water - REAL(r8) GDq (IJSDIM, KMAX, ntr) ! water vapor and tracer - REAL(r8) GDHS (IJSDIM, KMAX) ! saturate MSE - REAL(r8) GDQS (IJSDIM, KMAX) ! saturate humidity - REAL(r8) GDQI (IJSDIM, KMAX) ! cloud ice - REAL(r8) GDU (IJSDIM, KMAX) ! u-velocity - REAL(r8) GDV (IJSDIM, KMAX) ! v-velocity - REAL(r8) GDZM (IJSDIM, KMAX+1) ! Altitude (half lev) - REAL(r8) GDPM (IJSDIM, KMAX+1) ! pressure (half lev) - REAL(r8) FDQS (IJSDIM, KMAX) - REAL(r8) GAM (IJSDIM, KMAX) + REAL(kind_phys) GDH (IJSDIM, KMAX) ! moist static energy + REAL(kind_phys) GDW (IJSDIM, KMAX) ! total water + REAL(kind_phys) GDq (IJSDIM, KMAX, ntr) ! water vapor and tracer + REAL(kind_phys) GDHS (IJSDIM, KMAX) ! saturate MSE + REAL(kind_phys) GDQS (IJSDIM, KMAX) ! saturate humidity + REAL(kind_phys) GDQI (IJSDIM, KMAX) ! cloud ice + REAL(kind_phys) GDU (IJSDIM, KMAX) ! u-velocity + REAL(kind_phys) GDV (IJSDIM, KMAX) ! v-velocity + REAL(kind_phys) GDZM (IJSDIM, KMAX+1) ! Altitude (half lev) + REAL(kind_phys) GDPM (IJSDIM, KMAX+1) ! pressure (half lev) + REAL(kind_phys) FDQS (IJSDIM, KMAX) + REAL(kind_phys) GAM (IJSDIM, KMAX) INTEGER ISTS, IENS ! ! [INTERNAL WORK] - REAL(r8) CBASE (IJSDIM) ! one over cloud base height -! REAL(r8) CBASEP(IJSDIM) ! cloud base pressure - REAL(r8) DELZ, GAMX, wrk -! REAL(r8) DELZ, QSL, GAMX, wrk -! REAL(r8), dimension(ijsdim,kmax) :: gchbl !DDsigmadiag - real(r8), dimension(ijsdim) :: gcqb, tx1, spbl, qsl + REAL(kind_phys) CBASE (IJSDIM) ! one over cloud base height +! REAL(kind_phys) CBASEP(IJSDIM) ! cloud base pressure + REAL(kind_phys) DELZ, GAMX, wrk +! REAL(kind_phys) DELZ, QSL, GAMX, wrk +! REAL(kind_phys), dimension(ijsdim,kmax) :: gchbl !DDsigmadiag + real(kind_phys), dimension(ijsdim) :: gcqb, tx1, spbl, qsl INTEGER I, K, kp1, n ! ! [INTERNAL PARM] @@ -2030,91 +2031,91 @@ SUBROUTINE CUMUP & !! in-cloud properties logical :: lprnt ! ! [OUTPUT] - REAL(r8) ACWF (IJSDIM) !< cloud work function - REAL(r8) GCLZ (IJSDIM, KMAX) !< cloud liquid water*eta - REAL(r8) GCIZ (IJSDIM, KMAX) !< cloud ice*eta - REAL(r8) GPRCIZ(IJSDIM, KMAX) !< rain generation*eta - REAL(r8) GSNWIZ(IJSDIM, KMAX) !< snow generation*eta - REAL(r8) GCYT (IJSDIM) !< norm. mass flux @top - REAL(r8) GCHT (IJSDIM) !< cloud top MSE*eta - REAL(r8) GCQT (IJSDIM) !< cloud top moisture*eta - REAL(r8) GCLT (IJSDIM) !< cloud top liquid water*eta - REAL(r8) GCIT (IJSDIM) !< cloud top ice*eta - REAL(r8) GCtrT (IJSDIM, ntrq:ntr) !< cloud top tracer*eta - REAL(r8) GTPRT (IJSDIM) !< cloud top (rain+snow)*eta - REAL(r8) GCUT (IJSDIM) !< cloud top u*eta - REAL(r8) GCVT (IJSDIM) !< cloud top v*eta - REAL(r8) GCwT (IJSDIM) !< cloud top v*eta - INTEGER KT (IJSDIM) !< cloud top - INTEGER KTMX !< max of cloud top - REAL(r8) WCV (IJSDIM, KMAX) !< updraft velocity (half lev) !DD sigma make output + REAL(kind_phys) ACWF (IJSDIM) !< cloud work function + REAL(kind_phys) GCLZ (IJSDIM, KMAX) !< cloud liquid water*eta + REAL(kind_phys) GCIZ (IJSDIM, KMAX) !< cloud ice*eta + REAL(kind_phys) GPRCIZ(IJSDIM, KMAX) !< rain generation*eta + REAL(kind_phys) GSNWIZ(IJSDIM, KMAX) !< snow generation*eta + REAL(kind_phys) GCYT (IJSDIM) !< norm. mass flux @top + REAL(kind_phys) GCHT (IJSDIM) !< cloud top MSE*eta + REAL(kind_phys) GCQT (IJSDIM) !< cloud top moisture*eta + REAL(kind_phys) GCLT (IJSDIM) !< cloud top liquid water*eta + REAL(kind_phys) GCIT (IJSDIM) !< cloud top ice*eta + REAL(kind_phys) GCtrT (IJSDIM, ntrq:ntr) !< cloud top tracer*eta + REAL(kind_phys) GTPRT (IJSDIM) !< cloud top (rain+snow)*eta + REAL(kind_phys) GCUT (IJSDIM) !< cloud top u*eta + REAL(kind_phys) GCVT (IJSDIM) !< cloud top v*eta + REAL(kind_phys) GCwT (IJSDIM) !< cloud top v*eta + INTEGER KT (IJSDIM) !< cloud top + INTEGER KTMX !< max of cloud top + REAL(kind_phys) WCV (IJSDIM, KMAX) !< updraft velocity (half lev) !DD sigma make output ! ! [MODIFIED] - REAL(r8) GCYM (IJSDIM, KMAX) !< norm. mass flux + REAL(kind_phys) GCYM (IJSDIM, KMAX) !< norm. mass flux ! ! [INPUT] - REAL(r8) GCHB (IJSDIM) !< cloud base Moist Static Energy - REAL(r8) GCWB (IJSDIM) !< cloud base total water - REAL(r8) GCUB (IJSDIM) !< cloud base U - REAL(r8) GCVB (IJSDIM) !< cloud base V - REAL(r8) GCIB (IJSDIM) !< cloud base ice - REAL(r8) GCtrB (IJSDIM,ntrq:ntr) !< cloud base tracers - REAL(r8) GDU (IJSDIM, KMAX) !< U - REAL(r8) GDV (IJSDIM, KMAX) !< V - REAL(r8) GDH (IJSDIM, KMAX) !< moist static energy - REAL(r8) GDW (IJSDIM, KMAX) !< total water - REAL(r8) GDHS (IJSDIM, KMAX) !< saturation MSE - REAL(r8) GDQS (IJSDIM, KMAX) !< saturation q - REAL(r8) GDT (IJSDIM, KMAX) !< T - REAL(r8) GDTM (IJSDIM, KMAX+1) !< T (half lev) - REAL(r8) GDQ (IJSDIM, KMAX, NTR) !< q !!DDsigmadiag - REAL(r8) GDQI (IJSDIM, KMAX) !< cloud ice - REAL(r8) GDZ (IJSDIM, KMAX) !< z - REAL(r8) GDZM (IJSDIM, KMAX+1) !< z (half lev) - REAL(r8) GDPM (IJSDIM, KMAX+1) !< p (half lev) - REAL(r8) FDQS (IJSDIM, KMAX) - REAL(r8) GAM (IJSDIM, KMAX) - REAL(r8) GDZTR (IJSDIM) !< tropopause height - REAL(r8) CPRES !< pres. fac. for cum. fric. - REAL(r8) WCB(ijsdim) !< cloud base updraft velocity**2 -! REAL(r8) ERMR !< entrainment rate (ASMODE) + REAL(kind_phys) GCHB (IJSDIM) !< cloud base Moist Static Energy + REAL(kind_phys) GCWB (IJSDIM) !< cloud base total water + REAL(kind_phys) GCUB (IJSDIM) !< cloud base U + REAL(kind_phys) GCVB (IJSDIM) !< cloud base V + REAL(kind_phys) GCIB (IJSDIM) !< cloud base ice + REAL(kind_phys) GCtrB (IJSDIM,ntrq:ntr) !< cloud base tracers + REAL(kind_phys) GDU (IJSDIM, KMAX) !< U + REAL(kind_phys) GDV (IJSDIM, KMAX) !< V + REAL(kind_phys) GDH (IJSDIM, KMAX) !< moist static energy + REAL(kind_phys) GDW (IJSDIM, KMAX) !< total water + REAL(kind_phys) GDHS (IJSDIM, KMAX) !< saturation MSE + REAL(kind_phys) GDQS (IJSDIM, KMAX) !< saturation q + REAL(kind_phys) GDT (IJSDIM, KMAX) !< T + REAL(kind_phys) GDTM (IJSDIM, KMAX+1) !< T (half lev) + REAL(kind_phys) GDQ (IJSDIM, KMAX, NTR) !< q !!DDsigmadiag + REAL(kind_phys) GDQI (IJSDIM, KMAX) !< cloud ice + REAL(kind_phys) GDZ (IJSDIM, KMAX) !< z + REAL(kind_phys) GDZM (IJSDIM, KMAX+1) !< z (half lev) + REAL(kind_phys) GDPM (IJSDIM, KMAX+1) !< p (half lev) + REAL(kind_phys) FDQS (IJSDIM, KMAX) + REAL(kind_phys) GAM (IJSDIM, KMAX) + REAL(kind_phys) GDZTR (IJSDIM) !< tropopause height + REAL(kind_phys) CPRES !< pres. fac. for cum. fric. + REAL(kind_phys) WCB(ijsdim) !< cloud base updraft velocity**2 +! REAL(kind_phys) ERMR !< entrainment rate (ASMODE) INTEGER KB (IJSDIM) INTEGER CTP, ISTS, IENS ! ! [INTERNAL WORK] - REAL(r8) ACWFK (IJSDIM,KMAX) !< cloud work function - REAL(r8) ACWFN (IJSDIM,KMAX) !< negative part of cloud work function - REAL(r8) myGCHt !< cloud top h *eta (half lev) - REAL(r8) GCHMZ (IJSDIM, KMAX) !< cloud h *eta (half lev) - REAL(r8) GCWMZ (IJSDIM, KMAX) !< cloud Qt*eta (half lev) - REAL(r8) GCUMZ (IJSDIM, KMAX) !< cloud U *eta (half lev) - REAL(r8) GCVMZ (IJSDIM, KMAX) !< cloud V *eta (half lev) - REAL(r8) GCqMZ (IJSDIM ) !< cloud qv*eta (half lev) - REAL(r8) GCIMZ (IJSDIM, KMAX) !< cloud Qi*eta (half lev) - REAL(r8) GCtrMZ(IJSDIM, KMAX,ntrq:ntr)!< cloud tracer*eta (half lev) - REAL(r8) GTPRMZ(IJSDIM, KMAX) !< rain+snow *eta (half lev) -! - REAL(r8) BUOY (IJSDIM, KMAX) !< buoyancy - REAL(r8) BUOYM (IJSDIM, KMAX) !< buoyancy (half lev) - REAL(r8) WCM (IJSDIM ) !< updraft velocity**2 (half lev) -! REAL(r8) WCM (IJSDIM, KMAX) !< updraft velocity**2 (half lev) -!DD sigma make output REAL(r8) WCV ( IJSDIM, KMAX+1 ) !! updraft velocity (half lev) - REAL(r8) GCY (IJSDIM, KMAX) !< norm. mass flux -! REAL(r8) ELAR (IJSDIM, KMAX) !< entrainment rate - REAL(r8) ELAR !< entrainment rate at mid layer -! - REAL(r8) GCHM (IJSDIM, KMAX) !< cloud MSE (half lev) - REAL(r8) GCWM (IJSDIM, KMAX) !< cloud Qt (half lev) !DDsigmadiag - REAL(r8) GCTM (IJSDIM, KMAX) !< cloud T (half lev) !DDsigmadiag make output - REAL(r8) GCQM (IJSDIM, KMAX) !< cloud q (half lev) !DDsigmadiag make output - REAL(r8) GCLM (IJSDIM, KMAX) !< cloud liquid ( half lev) - REAL(r8) GCIM (IJSDIM, KMAX) !< cloud ice (half lev) - REAL(r8) GCUM (IJSDIM, KMAX) !< cloud U (half lev) - REAL(r8) GCVM (IJSDIM, KMAX) !< cloud V (half lev) - REAL(r8) GCtrM (IJSDIM, KMAX,ntrq:ntr) !< cloud tracer (half lev) -! - REAL(r8), dimension(IJSDIM) :: WCM_, ELARM1, GDZMKB - REAL(r8) GDQSM, GDHSM, GDQM, GDSM, GDCM, FDQSM, GCCM, & + REAL(kind_phys) ACWFK (IJSDIM,KMAX) !< cloud work function + REAL(kind_phys) ACWFN (IJSDIM,KMAX) !< negative part of cloud work function + REAL(kind_phys) myGCHt !< cloud top h *eta (half lev) + REAL(kind_phys) GCHMZ (IJSDIM, KMAX) !< cloud h *eta (half lev) + REAL(kind_phys) GCWMZ (IJSDIM, KMAX) !< cloud Qt*eta (half lev) + REAL(kind_phys) GCUMZ (IJSDIM, KMAX) !< cloud U *eta (half lev) + REAL(kind_phys) GCVMZ (IJSDIM, KMAX) !< cloud V *eta (half lev) + REAL(kind_phys) GCqMZ (IJSDIM ) !< cloud qv*eta (half lev) + REAL(kind_phys) GCIMZ (IJSDIM, KMAX) !< cloud Qi*eta (half lev) + REAL(kind_phys) GCtrMZ(IJSDIM, KMAX,ntrq:ntr)!< cloud tracer*eta (half lev) + REAL(kind_phys) GTPRMZ(IJSDIM, KMAX) !< rain+snow *eta (half lev) +! + REAL(kind_phys) BUOY (IJSDIM, KMAX) !< buoyancy + REAL(kind_phys) BUOYM (IJSDIM, KMAX) !< buoyancy (half lev) + REAL(kind_phys) WCM (IJSDIM ) !< updraft velocity**2 (half lev) +! REAL(kind_phys) WCM (IJSDIM, KMAX) !< updraft velocity**2 (half lev) +!DD sigma make output REAL(kind_phys) WCV ( IJSDIM, KMAX+1 ) !! updraft velocity (half lev) + REAL(kind_phys) GCY (IJSDIM, KMAX) !< norm. mass flux +! REAL(kind_phys) ELAR (IJSDIM, KMAX) !< entrainment rate + REAL(kind_phys) ELAR !< entrainment rate at mid layer +! + REAL(kind_phys) GCHM (IJSDIM, KMAX) !< cloud MSE (half lev) + REAL(kind_phys) GCWM (IJSDIM, KMAX) !< cloud Qt (half lev) !DDsigmadiag + REAL(kind_phys) GCTM (IJSDIM, KMAX) !< cloud T (half lev) !DDsigmadiag make output + REAL(kind_phys) GCQM (IJSDIM, KMAX) !< cloud q (half lev) !DDsigmadiag make output + REAL(kind_phys) GCLM (IJSDIM, KMAX) !< cloud liquid ( half lev) + REAL(kind_phys) GCIM (IJSDIM, KMAX) !< cloud ice (half lev) + REAL(kind_phys) GCUM (IJSDIM, KMAX) !< cloud U (half lev) + REAL(kind_phys) GCVM (IJSDIM, KMAX) !< cloud V (half lev) + REAL(kind_phys) GCtrM (IJSDIM, KMAX,ntrq:ntr) !< cloud tracer (half lev) +! + REAL(kind_phys), dimension(IJSDIM) :: WCM_, ELARM1, GDZMKB + REAL(kind_phys) GDQSM, GDHSM, GDQM, GDSM, GDCM, FDQSM, GCCM, & DELZ, ELADZ, DCTM , CPGMI, DELC, FICE, ELARM2,GCCMZ, & PRECR, GTPRIZ, DELZL, GCCT, DCT, WCVX, PRCZH, wrk INTEGER K, I, kk, km1, kp1, n @@ -2122,43 +2123,43 @@ SUBROUTINE CUMUP & !! in-cloud properties ! CHARACTER CTNUM*2 ! !DD#ifdef OPT_CUMBGT -!DD REAL(r8) HBGT (IJSDIM) ! heat budget -!DD REAL(r8) WBGT (IJSDIM) ! water budget -!DD REAL(r8) PBGT (IJSDIM) ! precipitation budget -!DD REAL(r8) MBGT (IJSDIM) ! mass budget -!DD REAL(r8) GTPRX (IJSDIM) ! (rain+snow)*eta at top -!DD REAL(r8) GSNWT (IJSDIM) ! cloud top snow*eta -!DD REAL(r8) HBMX, WBMX, PBMX, MBMX +!DD REAL(kind_phys) HBGT (IJSDIM) ! heat budget +!DD REAL(kind_phys) WBGT (IJSDIM) ! water budget +!DD REAL(kind_phys) PBGT (IJSDIM) ! precipitation budget +!DD REAL(kind_phys) MBGT (IJSDIM) ! mass budget +!DD REAL(kind_phys) GTPRX (IJSDIM) ! (rain+snow)*eta at top +!DD REAL(kind_phys) GSNWT (IJSDIM) ! cloud top snow*eta +!DD REAL(kind_phys) HBMX, WBMX, PBMX, MBMX !DD SAVE HBMX, WBMX, PBMX, MBMX !DD#endif ! ! [INTERNAL PARAM] - REAL(r8), parameter :: ZTREF = 1._r8, ztrefi = one/ztref, & + REAL(kind_phys), parameter :: ZTREF = 1._kind_phys, ztrefi = one/ztref, & ELAMIN = zero, ELAMAX = 4.e-3 ! min and max entrainment rate - REAL(r8) :: PB = 1.0_r8 -!m REAL(r8) :: TAUZ = 5.0e3_r8 - REAL(r8) :: TAUZ = 1.0e4_r8 -!m REAL(r8) :: ELMD = 2.4e-3 ! for Neggers and Siebesma (2002) -!m REAL(r8) :: ELAMAX = 5.e-3 ! max. of entrainment rate -! REAL(r8) :: WCCRT = zero -!m REAL(r8) :: WCCRT = 0.01 - REAL(r8) :: WCCRT = 1.0e-6_r8, wvcrt=1.0e-3_r8 - REAL(r8) :: TSICE = 268.15_r8 ! compatible with macrop_driver - REAL(r8) :: TWICE = 238.15_r8 ! compatible with macrop_driver - -! REAL(r8) :: wfn_neg = 0.1 - REAL(r8) :: wfn_neg = 0.15 -! REAL(r8) :: wfn_neg = 0.25 -! REAL(r8) :: wfn_neg = 0.30 -! REAL(r8) :: wfn_neg = 0.35 + REAL(kind_phys) :: PB = 1.0_kind_phys +!m REAL(kind_phys) :: TAUZ = 5.0e3_kind_phys + REAL(kind_phys) :: TAUZ = 1.0e4_kind_phys +!m REAL(kind_phys) :: ELMD = 2.4e-3 ! for Neggers and Siebesma (2002) +!m REAL(kind_phys) :: ELAMAX = 5.e-3 ! max. of entrainment rate +! REAL(kind_phys) :: WCCRT = zero +!m REAL(kind_phys) :: WCCRT = 0.01 + REAL(kind_phys) :: WCCRT = 1.0e-6_kind_phys, wvcrt=1.0e-3_kind_phys + REAL(kind_phys) :: TSICE = 268.15_kind_phys ! compatible with macrop_driver + REAL(kind_phys) :: TWICE = 238.15_kind_phys ! compatible with macrop_driver + +! REAL(kind_phys) :: wfn_neg = 0.1 + REAL(kind_phys) :: wfn_neg = 0.15 +! REAL(kind_phys) :: wfn_neg = 0.25 +! REAL(kind_phys) :: wfn_neg = 0.30 +! REAL(kind_phys) :: wfn_neg = 0.35 - REAL(r8) :: esat, tem -! REAL(r8) :: esat, tem, rhs_h, rhs_q + REAL(kind_phys) :: esat, tem +! REAL(kind_phys) :: esat, tem, rhs_h, rhs_q ! - REAL(r8) Z ! altitude - REAL(r8) ZH ! scale height - REAL(r8) T ! temperature + REAL(kind_phys) Z ! altitude + REAL(kind_phys) ZH ! scale height + REAL(kind_phys) T ! temperature ! ! ! Note: iteration is not made to diagnose cloud ice for simplicity @@ -2177,8 +2178,8 @@ SUBROUTINE CUMUP & !! in-cloud properties enddo do k=1,kmax do i=ists,iens - ACWFK (I,k) = unset_r8 - ACWFN (I,k) = unset_r8 + ACWFK (I,k) = unset_kind_phys + ACWFN (I,k) = unset_kind_phys GCLZ (I,k) = zero GCIZ (I,k) = zero GPRCIZ(I,k) = zero @@ -2191,24 +2192,24 @@ SUBROUTINE CUMUP & !! in-cloud properties GCVMZ (I,k) = zero GTPRMZ(I,k) = zero ! - BUOY (I,k) = unset_r8 - BUOYM (I,k) = unset_r8 - WCV (I,k) = unset_r8 - GCY (I,k) = unset_r8 -! - GCHM (I,k) = unset_r8 - GCWM (I,k) = unset_r8 - GCTM (I,k) = unset_r8 - GCQM (I,k) = unset_r8 - GCLM (I,k) = unset_r8 - GCIM (I,k) = unset_r8 - GCUM (I,k) = unset_r8 - GCVM (I,k) = unset_r8 + BUOY (I,k) = unset_kind_phys + BUOYM (I,k) = unset_kind_phys + WCV (I,k) = unset_kind_phys + GCY (I,k) = unset_kind_phys +! + GCHM (I,k) = unset_kind_phys + GCWM (I,k) = unset_kind_phys + GCTM (I,k) = unset_kind_phys + GCQM (I,k) = unset_kind_phys + GCLM (I,k) = unset_kind_phys + GCIM (I,k) = unset_kind_phys + GCUM (I,k) = unset_kind_phys + GCVM (I,k) = unset_kind_phys enddo enddo do i=ists,iens GCqMZ(I) = zero - WCM(I) = unset_r8 + WCM(I) = unset_kind_phys WCM_(I) = zero enddo ! tracers @@ -2218,7 +2219,7 @@ SUBROUTINE CUMUP & !! in-cloud properties enddo do k=1,kmax do i=ists,iens - GCTRM(I,k,n) = unset_r8 + GCTRM(I,k,n) = unset_kind_phys enddo enddo enddo @@ -2631,16 +2632,16 @@ SUBROUTINE CUMUP & !! in-cloud properties pure function FPREC(Z,ZH) implicit none - real(r8), intent(in) :: Z - real(r8), intent(in) :: ZH - real(r8) :: FPREC + real(kind_phys), intent(in) :: Z + real(kind_phys), intent(in) :: ZH + real(kind_phys) :: FPREC FPREC = MIN(MAX(one-EXP(-(Z-PRECZ0)/ZH), zero), one) end function FPREC pure function FRICE(T) implicit none - real(r8), intent(in) :: T - real(r8) :: FRICE + real(kind_phys), intent(in) :: T + real(kind_phys) :: FRICE FRICE = MIN(MAX((TSICE-T)/(TSICE-TWICE), zero), one) end function FRICE @@ -2662,37 +2663,37 @@ SUBROUTINE CUMBMX & !! cloud base mass flux INTEGER, INTENT(IN) :: IJSDIM, KMAX ! DD, for GFS, pass in ! ! [MODIFY] - REAL(r8) CBMFX (IJSDIM) !< cloud base mass flux + REAL(kind_phys) CBMFX (IJSDIM) !< cloud base mass flux ! ! [INPUT] - REAL(r8) ACWF (IJSDIM) !< cloud work function - REAL(r8) GCYT (IJSDIM) !< norm mass flux @top - REAL(r8) GDZM (IJSDIM, KMAX+1) !< height - REAL(r8) GDW (IJSDIM, KMAX) !< total water - REAL(r8) GDQS (IJSDIM, KMAX) !< saturate humidity - REAL(r8) DELP (IJSDIM, KMAX) !< delt pressure - INTEGER KT (IJSDIM) !< cloud top - INTEGER KTMX !< max. of cloud top - INTEGER KB (IJSDIM) !< cloud base - REAL(r8) DELT !< time step + REAL(kind_phys) ACWF (IJSDIM) !< cloud work function + REAL(kind_phys) GCYT (IJSDIM) !< norm mass flux @top + REAL(kind_phys) GDZM (IJSDIM, KMAX+1) !< height + REAL(kind_phys) GDW (IJSDIM, KMAX) !< total water + REAL(kind_phys) GDQS (IJSDIM, KMAX) !< saturate humidity + REAL(kind_phys) DELP (IJSDIM, KMAX) !< delt pressure + INTEGER KT (IJSDIM) !< cloud top + INTEGER KTMX !< max. of cloud top + INTEGER KB (IJSDIM) !< cloud base + REAL(kind_phys) DELT !< time step INTEGER ISTS, IENS ! ! [INTERNAL WORK] - REAL(r8), dimension(ijsdim) :: QX, QSX, RHM + REAL(kind_phys), dimension(ijsdim) :: QX, QSX, RHM INTEGER I, K - REAL(r8) ALP, FMAX1, wrk + REAL(kind_phys) ALP, FMAX1, wrk ! ! [INTERNAL PARAM] - REAL(r8) :: FMAX = 1.5e-2_r8 ! maximum flux -! REAL(r8) :: RHMCRT = zero ! critical val. of cloud mean RH -! REAL(r8) :: RHMCRT = 0.25_r8 ! critical val. of cloud mean RH - REAL(r8) :: RHMCRT = 0.50_r8 ! critical val. of cloud mean RH - REAL(r8) :: ALP1 = zero - REAL(r8) :: TAUD = 1.e3_r8 -! REAL(r8) :: TAUD = 6.e2_r8 - REAL(r8) :: ZFMAX = 3.5e3_r8 - REAL(r8) :: ZDFMAX = 5.e2_r8 -! REAL(r8) :: FMAXP = 2._r8 + REAL(kind_phys) :: FMAX = 1.5e-2_kind_phys ! maximum flux +! REAL(kind_phys) :: RHMCRT = zero ! critical val. of cloud mean RH +! REAL(kind_phys) :: RHMCRT = 0.25_kind_phys ! critical val. of cloud mean RH + REAL(kind_phys) :: RHMCRT = 0.50_kind_phys ! critical val. of cloud mean RH + REAL(kind_phys) :: ALP1 = zero + REAL(kind_phys) :: TAUD = 1.e3_kind_phys +! REAL(kind_phys) :: TAUD = 6.e2_kind_phys + REAL(kind_phys) :: ZFMAX = 3.5e3_kind_phys + REAL(kind_phys) :: ZDFMAX = 5.e2_kind_phys +! REAL(kind_phys) :: FMAXP = 2._kind_phys ! do i=ists,iens qx(i) = zero @@ -2747,23 +2748,23 @@ SUBROUTINE CUMFLX & !! cloud mass flux INTEGER, INTENT(IN) :: IJSDIM, KMAX, IM !! DD, for GFS, pass in ! ! [OUTPUT] - REAL(r8) GMFLX (IJSDIM, KMAX) !< mass flux - REAL(r8) CMDET (IJSDIM, KMAX) !< detrainment mass flux - REAL(r8) GPRCI (IJSDIM, KMAX) !< rainfall generation - REAL(r8) GSNWI (IJSDIM, KMAX) !< snowfall generation - REAL(r8) QLIQ (IJSDIM, KMAX) !< cloud liquid - REAL(r8) QICE (IJSDIM, KMAX) !< cloud ice - REAL(r8) GTPRC0(IJSDIM) !< precip. before evap. + REAL(kind_phys) GMFLX (IJSDIM, KMAX) !< mass flux + REAL(kind_phys) CMDET (IJSDIM, KMAX) !< detrainment mass flux + REAL(kind_phys) GPRCI (IJSDIM, KMAX) !< rainfall generation + REAL(kind_phys) GSNWI (IJSDIM, KMAX) !< snowfall generation + REAL(kind_phys) QLIQ (IJSDIM, KMAX) !< cloud liquid + REAL(kind_phys) QICE (IJSDIM, KMAX) !< cloud ice + REAL(kind_phys) GTPRC0(IJSDIM) !< precip. before evap. ! ! [INPUT] - REAL(r8) CBMFX (IJSDIM) !< cloud base mass flux - REAL(r8) GCYM (IJSDIM, KMAX) !< normalized mass flux - REAL(r8) GCYT (IJSDIM) !< detraining mass flux - REAL(r8) GPRCIZ(IJSDIM, KMAX) !< precipitation/M - REAL(r8) GSNWIZ(IJSDIM, KMAX) !< snowfall/M - REAL(r8) GTPRT (IJSDIM) !< rain+snow @top - REAL(r8) GCLZ (IJSDIM, KMAX) !< cloud liquid/M - REAL(r8) GCIZ (IJSDIM, KMAX) !< cloud ice/M + REAL(kind_phys) CBMFX (IJSDIM) !< cloud base mass flux + REAL(kind_phys) GCYM (IJSDIM, KMAX) !< normalized mass flux + REAL(kind_phys) GCYT (IJSDIM) !< detraining mass flux + REAL(kind_phys) GPRCIZ(IJSDIM, KMAX) !< precipitation/M + REAL(kind_phys) GSNWIZ(IJSDIM, KMAX) !< snowfall/M + REAL(kind_phys) GTPRT (IJSDIM) !< rain+snow @top + REAL(kind_phys) GCLZ (IJSDIM, KMAX) !< cloud liquid/M + REAL(kind_phys) GCIZ (IJSDIM, KMAX) !< cloud ice/M INTEGER KB (IJSDIM) !< cloud base INTEGER KT (IJSDIM) !< cloud top INTEGER KTMX !< max of cloud top @@ -2809,34 +2810,34 @@ SUBROUTINE CUMDET & !! detrainment INTEGER, INTENT(IN) :: im, IJSDIM, KMAX, NTR, nctp, ntrq !! DD, for GFS, pass in ! ! [MODIFY] - REAL(r8) GTT (IJSDIM, KMAX) !< temperature tendency - REAL(r8) GTQ (IJSDIM, KMAX, NTR) !< moisture tendency -! REAL(r8) GTCFRC(IJSDIM, KMAX) !< cloud fraction tendency - REAL(r8) GTU (IJSDIM, KMAX) !< u tendency - REAL(r8) GTV (IJSDIM, KMAX) !< v tendency + REAL(kind_phys) GTT (IJSDIM, KMAX) !< temperature tendency + REAL(kind_phys) GTQ (IJSDIM, KMAX, NTR) !< moisture tendency +! REAL(kind_phys) GTCFRC(IJSDIM, KMAX) !< cloud fraction tendency + REAL(kind_phys) GTU (IJSDIM, KMAX) !< u tendency + REAL(kind_phys) GTV (IJSDIM, KMAX) !< v tendency ! ! [INPUT] - REAL(r8) GDH (IJSDIM, KMAX) !< moist static energy - REAL(r8) GDQ (IJSDIM, KMAX, NTR) !< humidity qv -! REAL(r8) GDCFRC(IJSDIM, KMAX) !< cloud fraction - REAL(r8) GDU (IJSDIM, KMAX) - REAL(r8) GDV (IJSDIM, KMAX) - REAL(r8) DELPI (IJSDIM, KMAX) - REAL(r8) CBMFX (IM, NCTP) !< cloud base mass flux - REAL(r8) GCYT (IJSDIM, NCTP) !< detraining mass flux - REAL(r8) GCHT (IJSDIM, NCTP) !< detraining MSE - REAL(r8) GCQT (IJSDIM, NCTP) !< detraining qv - REAL(r8) GCLT (IJSDIM, NCTP) !< detraining ql - REAL(r8) GCIT (IJSDIM, NCTP) !< detraining qi - REAL(r8) GCtrT (IJSDIM, ntrq:ntr, NCTP)!< detraining tracer - REAL(r8) GCUT (IJSDIM, NCTP) !< detraining u - REAL(r8) GCVT (IJSDIM, NCTP) !< detraining v - REAL(r8) GDQI (IJSDIM, KMAX) !< cloud ice + REAL(kind_phys) GDH (IJSDIM, KMAX) !< moist static energy + REAL(kind_phys) GDQ (IJSDIM, KMAX, NTR) !< humidity qv +! REAL(kind_phys) GDCFRC(IJSDIM, KMAX) !< cloud fraction + REAL(kind_phys) GDU (IJSDIM, KMAX) + REAL(kind_phys) GDV (IJSDIM, KMAX) + REAL(kind_phys) DELPI (IJSDIM, KMAX) + REAL(kind_phys) CBMFX (IM, NCTP) !< cloud base mass flux + REAL(kind_phys) GCYT (IJSDIM, NCTP) !< detraining mass flux + REAL(kind_phys) GCHT (IJSDIM, NCTP) !< detraining MSE + REAL(kind_phys) GCQT (IJSDIM, NCTP) !< detraining qv + REAL(kind_phys) GCLT (IJSDIM, NCTP) !< detraining ql + REAL(kind_phys) GCIT (IJSDIM, NCTP) !< detraining qi + REAL(kind_phys) GCtrT (IJSDIM, ntrq:ntr, NCTP)!< detraining tracer + REAL(kind_phys) GCUT (IJSDIM, NCTP) !< detraining u + REAL(kind_phys) GCVT (IJSDIM, NCTP) !< detraining v + REAL(kind_phys) GDQI (IJSDIM, KMAX) !< cloud ice INTEGER KT (IJSDIM, NCTP) !< cloud top INTEGER ISTS, IENS ! ! [INTERNAL WORK] - REAL(r8) GTHCI, GTQVCI, GTXCI + REAL(kind_phys) GTHCI, GTQVCI, GTXCI integer I, K, CTP, kk,n ! @@ -2884,33 +2885,33 @@ SUBROUTINE CUMSBH & !! adiabat. descent INTEGER, INTENT(IN) :: IJSDIM, IM, KMAX, NTR, ntrq !! DD, for GFS, pass in ! ! [MODIFY] - REAL(r8) GTT (IJSDIM, KMAX) !< Temperature tendency - REAL(r8) GTQ (IJSDIM, KMAX, NTR) !< Moisture etc tendency - REAL(r8) GTU (IJSDIM, KMAX) !< u tendency - REAL(r8) GTV (IJSDIM, KMAX) !< v tendency + REAL(kind_phys) GTT (IJSDIM, KMAX) !< Temperature tendency + REAL(kind_phys) GTQ (IJSDIM, KMAX, NTR) !< Moisture etc tendency + REAL(kind_phys) GTU (IJSDIM, KMAX) !< u tendency + REAL(kind_phys) GTV (IJSDIM, KMAX) !< v tendency ! ! [INPUT] - REAL(r8) GDH (IJSDIM, KMAX) - REAL(r8) GDQ (IJSDIM, KMAX, NTR) !< humidity etc - REAL(r8) GDQI (IJSDIM, KMAX) - REAL(r8) GDU (IJSDIM, KMAX) - REAL(r8) GDV (IJSDIM, KMAX) - REAL(r8) DELPI (IJSDIM, KMAX) - REAL(r8) GMFLX (IJSDIM, KMAX) !< mass flux (updraft+downdraft) - REAL(r8) GMFX0 (IJSDIM, KMAX) !< mass flux (updraft only) + REAL(kind_phys) GDH (IJSDIM, KMAX) + REAL(kind_phys) GDQ (IJSDIM, KMAX, NTR) !< humidity etc + REAL(kind_phys) GDQI (IJSDIM, KMAX) + REAL(kind_phys) GDU (IJSDIM, KMAX) + REAL(kind_phys) GDV (IJSDIM, KMAX) + REAL(kind_phys) DELPI (IJSDIM, KMAX) + REAL(kind_phys) GMFLX (IJSDIM, KMAX) !< mass flux (updraft+downdraft) + REAL(kind_phys) GMFX0 (IJSDIM, KMAX) !< mass flux (updraft only) INTEGER KB(IJSDIM) !< cloud base index - negative means no convection INTEGER KTMX - REAL(r8) CPRES !< pressure factor for cumulus friction + REAL(kind_phys) CPRES !< pressure factor for cumulus friction INTEGER ISTS, IENS ! ! [INTERNAL WORK] - REAL(r8) SBH0, SBQ0, SBL0, SBI0, SBC0, SBS0, & + REAL(kind_phys) SBH0, SBQ0, SBL0, SBI0, SBC0, SBS0, & SBH1, SBQ1, SBL1, SBI1, SBC1, SBS1, FX1, & SBU0, SBV0, SBU1, SBV1, GTHCI, GTQVCI, & GTQLCI, GTQICI, GTM2CI, GTM3CI, wrk, wrk1 - REAL(r8) FX(ISTS:IENS) + REAL(kind_phys) FX(ISTS:IENS) - REAL(r8), dimension(IJSDIM, KMAX) :: GTLSBH, GTISBH + REAL(kind_phys), dimension(IJSDIM, KMAX) :: GTLSBH, GTISBH integer :: I, K, KM, KP, n ! ! @@ -3006,22 +3007,22 @@ SUBROUTINE CUMSBW & !! adiabat. descent INTEGER, INTENT(IN) :: IJSDIM, IM, KMAX!! DD, for GFS, pass in ! ! [MODIFY] - REAL(r8) GTU (IJSDIM, KMAX) !< u tendency - REAL(r8) GTV (IJSDIM, KMAX) !< v tendency + REAL(kind_phys) GTU (IJSDIM, KMAX) !< u tendency + REAL(kind_phys) GTV (IJSDIM, KMAX) !< v tendency ! ! [INPUT] - REAL(r8) GDU (IJSDIM, KMAX) - REAL(r8) GDV (IJSDIM, KMAX) - REAL(r8) DELPI (IJSDIM, KMAX) - REAL(r8) GMFLX (IJSDIM, KMAX) !< mass flux (updraft+downdraft) - REAL(r8) GMFX0 (IJSDIM, KMAX) !< mass flux (updraft only) + REAL(kind_phys) GDU (IJSDIM, KMAX) + REAL(kind_phys) GDV (IJSDIM, KMAX) + REAL(kind_phys) DELPI (IJSDIM, KMAX) + REAL(kind_phys) GMFLX (IJSDIM, KMAX) !< mass flux (updraft+downdraft) + REAL(kind_phys) GMFX0 (IJSDIM, KMAX) !< mass flux (updraft only) INTEGER KB(IJSDIM) !< cloud base index - negative means no convection INTEGER KTMX, ISTS, IENS - REAL(r8) CPRES !< pressure factor for cumulus friction + REAL(kind_phys) CPRES !< pressure factor for cumulus friction ! ! [INTERNAL WORK] - REAL(r8) FX1, SBU0, SBV0, SBU1, SBV1, wrk, wrk1 - REAL(r8) FX(ISTS:IENS) + REAL(kind_phys) FX1, SBU0, SBV0, SBU1, SBV1, wrk, wrk1 + REAL(kind_phys) FX(ISTS:IENS) integer :: I, K, KM, KP ! @@ -3089,114 +3090,114 @@ SUBROUTINE CUMDWN & ! Freeze & Melt & Evaporation logical, intent(in) :: do_aw, do_awdd, flx_form ! ! [MODIFY] - REAL(r8) GTT (IJSDIM, KMAX) !< Temperature tendency - REAL(r8) GTQ (IJSDIM, KMAX, NTR) !< Moisture etc tendency - REAL(r8) GTU (IJSDIM, KMAX) !< u tendency - REAL(r8) GTV (IJSDIM, KMAX) !< v tendency - REAL(r8) GMFLX (IJSDIM, KMAX) !< mass flux + REAL(kind_phys) GTT (IJSDIM, KMAX) !< Temperature tendency + REAL(kind_phys) GTQ (IJSDIM, KMAX, NTR) !< Moisture etc tendency + REAL(kind_phys) GTU (IJSDIM, KMAX) !< u tendency + REAL(kind_phys) GTV (IJSDIM, KMAX) !< v tendency + REAL(kind_phys) GMFLX (IJSDIM, KMAX) !< mass flux ! ! [OUTPUT] - REAL(r8) GPRCP (IJSDIM, KMAX) !< rainfall flux - REAL(r8) GSNWP (IJSDIM, KMAX) !< snowfall flux - REAL(r8) GTEVP (IJSDIM, KMAX) !< evaporation+sublimation - REAL(r8) GMDD (IJSDIM, KMAX) !< downdraft mass flux + REAL(kind_phys) GPRCP (IJSDIM, KMAX) !< rainfall flux + REAL(kind_phys) GSNWP (IJSDIM, KMAX) !< snowfall flux + REAL(kind_phys) GTEVP (IJSDIM, KMAX) !< evaporation+sublimation + REAL(kind_phys) GMDD (IJSDIM, KMAX) !< downdraft mass flux !AW microphysical tendencies - REAL(r8) gtmelt (IJSDIM, KMAX) !< t tendency ice-liq - REAL(r8) gtevap (IJSDIM, KMAX) !< t tendency liq-vapor - REAL(r8) gtsubl (IJSDIM, KMAX) !< t tendency ice-vapor + REAL(kind_phys) gtmelt (IJSDIM, KMAX) !< t tendency ice-liq + REAL(kind_phys) gtevap (IJSDIM, KMAX) !< t tendency liq-vapor + REAL(kind_phys) gtsubl (IJSDIM, KMAX) !< t tendency ice-vapor !AW eddy flux tendencies - REAL(r8) dtdwn (IJSDIM, KMAX) !< t tendency downdraft detrainment - REAL(r8) dqvdwn (IJSDIM, KMAX) !< qv tendency downdraft detrainment - REAL(r8) dqldwn (IJSDIM, KMAX) !< ql tendency downdraft detrainment - REAL(r8) dqidwn (IJSDIM, KMAX) !< qi tendency downdraft detrainment - REAL(r8) dtrdwn (IJSDIM, KMAX, ntrq:ntr) !< tracer tendency downdraft detrainment + REAL(kind_phys) dtdwn (IJSDIM, KMAX) !< t tendency downdraft detrainment + REAL(kind_phys) dqvdwn (IJSDIM, KMAX) !< qv tendency downdraft detrainment + REAL(kind_phys) dqldwn (IJSDIM, KMAX) !< ql tendency downdraft detrainment + REAL(kind_phys) dqidwn (IJSDIM, KMAX) !< qi tendency downdraft detrainment + REAL(kind_phys) dtrdwn (IJSDIM, KMAX, ntrq:ntr) !< tracer tendency downdraft detrainment ! AW downdraft area fraction (assumed zero for now) - REAL(r8) sigmad (IJSDIM,KMAX) !< DDsigma cloud downdraft area fraction + REAL(kind_phys) sigmad (IJSDIM,KMAX) !< DDsigma cloud downdraft area fraction ! [INPUT] - REAL(r8) GPRCI (IJSDIM, KMAX) !< rainfall generation - REAL(r8) GSNWI (IJSDIM, KMAX) !< snowfall generation - REAL(r8) GDH (IJSDIM, KMAX) !< moist static energy - REAL(r8) GDW (IJSDIM, KMAX) !< total water - REAL(r8) GDQ (IJSDIM, KMAX, NTR) !< humidity etc - REAL(r8) GDQI (IJSDIM, KMAX) !< cloud ice - REAL(r8) GDQS (IJSDIM, KMAX) !< saturate humidity - REAL(r8) GDS (IJSDIM, KMAX) !< dry static energy - REAL(r8) GDHS (IJSDIM, KMAX) !< saturate moist static energy - REAL(r8) GDT (IJSDIM, KMAX) !< air temperature T - REAL(r8) GDU (IJSDIM, KMAX) !< u-velocity - REAL(r8) GDV (IJSDIM, KMAX) !< v-velocity - REAL(r8) GDZ (IJSDIM, KMAX) !< altitude - REAL(r8) GDZM (IJSDIM, KMAX+1) !< altitude (half lev) - REAL(r8) FDQS (IJSDIM, KMAX) - REAL(r8) DELP (IJSDIM, KMAX) - REAL(r8) DELPI (IJSDIM, KMAX) + REAL(kind_phys) GPRCI (IJSDIM, KMAX) !< rainfall generation + REAL(kind_phys) GSNWI (IJSDIM, KMAX) !< snowfall generation + REAL(kind_phys) GDH (IJSDIM, KMAX) !< moist static energy + REAL(kind_phys) GDW (IJSDIM, KMAX) !< total water + REAL(kind_phys) GDQ (IJSDIM, KMAX, NTR) !< humidity etc + REAL(kind_phys) GDQI (IJSDIM, KMAX) !< cloud ice + REAL(kind_phys) GDQS (IJSDIM, KMAX) !< saturate humidity + REAL(kind_phys) GDS (IJSDIM, KMAX) !< dry static energy + REAL(kind_phys) GDHS (IJSDIM, KMAX) !< saturate moist static energy + REAL(kind_phys) GDT (IJSDIM, KMAX) !< air temperature T + REAL(kind_phys) GDU (IJSDIM, KMAX) !< u-velocity + REAL(kind_phys) GDV (IJSDIM, KMAX) !< v-velocity + REAL(kind_phys) GDZ (IJSDIM, KMAX) !< altitude + REAL(kind_phys) GDZM (IJSDIM, KMAX+1) !< altitude (half lev) + REAL(kind_phys) FDQS (IJSDIM, KMAX) + REAL(kind_phys) DELP (IJSDIM, KMAX) + REAL(kind_phys) DELPI (IJSDIM, KMAX) INTEGER KB (IJSDIM) INTEGER KTMX, ISTS, IENS ! ! [INTERNAL WORK] ! Note: Some variables have 3-dimensions for the purpose of budget check. - REAL(r8) EVAPD (IJSDIM, KMAX) !< evap. in downdraft - REAL(r8) SUBLD (IJSDIM, KMAX) !< subl. in downdraft - REAL(r8) EVAPE (IJSDIM, KMAX) !< evap. in environment - REAL(r8) SUBLE (IJSDIM, KMAX) !< subl. in environment - REAL(r8) EVAPX (IJSDIM, KMAX) !< evap. env. to DD - REAL(r8) SUBLX (IJSDIM, KMAX) !< subl. env. to DD - REAL(r8) GMDDE (IJSDIM, KMAX) !< downdraft entrainment - REAL(r8) SNMLT (IJSDIM, KMAX) !< melt - freeze - REAL(r8) GCHDD (IJSDIM, KMAX) !< MSE detrainment - REAL(r8) GCWDD (IJSDIM, KMAX) !< water detrainment - REAL(r8) GTTEV (IJSDIM, KMAX) !< T tendency by evaporation - REAL(r8) GTQEV (IJSDIM, KMAX) !< q tendency by evaporation - REAL(r8) GCHD (ISTS:IENS) !< downdraft MSE - REAL(r8) GCWD (ISTS:IENS) !< downdraft q + REAL(kind_phys) EVAPD (IJSDIM, KMAX) !< evap. in downdraft + REAL(kind_phys) SUBLD (IJSDIM, KMAX) !< subl. in downdraft + REAL(kind_phys) EVAPE (IJSDIM, KMAX) !< evap. in environment + REAL(kind_phys) SUBLE (IJSDIM, KMAX) !< subl. in environment + REAL(kind_phys) EVAPX (IJSDIM, KMAX) !< evap. env. to DD + REAL(kind_phys) SUBLX (IJSDIM, KMAX) !< subl. env. to DD + REAL(kind_phys) GMDDE (IJSDIM, KMAX) !< downdraft entrainment + REAL(kind_phys) SNMLT (IJSDIM, KMAX) !< melt - freeze + REAL(kind_phys) GCHDD (IJSDIM, KMAX) !< MSE detrainment + REAL(kind_phys) GCWDD (IJSDIM, KMAX) !< water detrainment + REAL(kind_phys) GTTEV (IJSDIM, KMAX) !< T tendency by evaporation + REAL(kind_phys) GTQEV (IJSDIM, KMAX) !< q tendency by evaporation + REAL(kind_phys) GCHD (ISTS:IENS) !< downdraft MSE + REAL(kind_phys) GCWD (ISTS:IENS) !< downdraft q ! profiles of downdraft variables for AW flux tendencies - REAL(r8) GCdseD(ISTS:IENS, KMAX) !< downdraft dse - REAL(r8) GCqvD (ISTS:IENS, KMAX) !< downdraft qv -! REAL(r8) GCqlD (ISTS:IENS, KMAX) !< downdraft ql -! REAL(r8) GCqiD (ISTS:IENS, KMAX) !< downdraft qi - REAL(r8) GCtrD (ISTS:IENS, ntrq:ntr) !< downdraft tracer - - REAL(r8) GCUD (ISTS:IENS) !< downdraft u - REAL(r8) GCVD (ISTS:IENS) !< downdraft v - REAL(r8) FSNOW (ISTS:IENS) - REAL(r8) GMDDD (ISTS:IENS) - - REAL(r8) GDTW, GCHX, GCTX, GCQSX, GTPRP, EVSU, GTEVE, LVIC, & + REAL(kind_phys) GCdseD(ISTS:IENS, KMAX) !< downdraft dse + REAL(kind_phys) GCqvD (ISTS:IENS, KMAX) !< downdraft qv +! REAL(kind_phys) GCqlD (ISTS:IENS, KMAX) !< downdraft ql +! REAL(kind_phys) GCqiD (ISTS:IENS, KMAX) !< downdraft qi + REAL(kind_phys) GCtrD (ISTS:IENS, ntrq:ntr) !< downdraft tracer + + REAL(kind_phys) GCUD (ISTS:IENS) !< downdraft u + REAL(kind_phys) GCVD (ISTS:IENS) !< downdraft v + REAL(kind_phys) FSNOW (ISTS:IENS) + REAL(kind_phys) GMDDD (ISTS:IENS) + + REAL(kind_phys) GDTW, GCHX, GCTX, GCQSX, GTPRP, EVSU, GTEVE, LVIC, & DQW, DTW, GDQW, DZ, GCSD, FDET, GDHI, GMDDX, & GMDDMX, GCHDX, GCWDX, GCUDD, GCVDD, GTHCI, GTQVCI, & wrk, wrk1, wrk2, wrk3, wrk4, tx1, & WMX, HMX, DDWMX, DDHMX, dp_above, dp_below, fsigma, & fmelt, fevp, wrkn, gctrdd(ntrq:ntr) -!M REAL(r8) GTHCI, GTQVCI, GTQLCI, GTQICI, GTUCI, GTVCI +!M REAL(kind_phys) GTHCI, GTQVCI, GTQLCI, GTQICI, GTUCI, GTVCI !DD#ifdef OPT_CUMBGT ! Water, energy, downdraft water and downdraft energy budgets -! REAL(r8), dimension(ISTS:IENS) :: WBGT, HBGT, DDWBGT, DDHBGT +! REAL(kind_phys), dimension(ISTS:IENS) :: WBGT, HBGT, DDWBGT, DDHBGT integer ij, i, k, kp1, n !DD#endif ! ! [INTERNAL PARM] - REAL(r8), parameter :: TWSNOW = 273.15_r8 !< wet-bulb temp. rain/snow - REAL(r8), parameter :: FTMLT = 4._r8 !< temp. factor for melt - REAL(r8), parameter :: GMFLXC = 5.e-2_r8 !< critical mass flux - REAL(r8), parameter :: VTERMS = 2._r8 !< terminal velocity of snowflake -! REAL(r8), parameter :: MELTAU = 10._r8 !< melting timescale - REAL(r8), parameter :: MELTAU = 20._r8 !< melting timescale ! Moorthi june 30, 2017 -! -! REAL(r8), parameter :: EVAPR = 0.4_r8 !< evaporation factor ! Moorthi June 28, 2017 - REAL(r8), parameter :: EVAPR = 0.3_r8 !< evaporation factor -! REAL(r8), parameter :: EVAPR = 0._r8 !< evaporation factor - REAL(r8), parameter :: REVPDD = 1._r8 !< max rate of DD to evapolation - REAL(r8), parameter :: RDDR = 5.e-4_r8 !< DD rate (T0 R0 W0)^-1 -! REAL(r8), parameter :: RDDR = 0._r8 !< DD rate (T0 R0 W0)^-1 - REAL(r8), parameter :: RDDMX = 0.5_r8 !< norm. flux of downdraft - REAL(r8), parameter :: VTERM = 5._r8 !< term. vel. of precip. -! REAL(r8), parameter :: VTERM = 4._r8 !< term. vel. of precip. ! Moorthi June 28, 2017 - REAL(r8), parameter :: EVATAU = 2._r8 !< evaporation/sublimation timescale - REAL(r8), parameter :: ZDMIN = 5.e2_r8 !< min altitude of downdraft detrainment - real(r8), parameter :: evapovtrm=EVAPR/VTERM + REAL(kind_phys), parameter :: TWSNOW = 273.15_kind_phys !< wet-bulb temp. rain/snow + REAL(kind_phys), parameter :: FTMLT = 4._kind_phys !< temp. factor for melt + REAL(kind_phys), parameter :: GMFLXC = 5.e-2_kind_phys !< critical mass flux + REAL(kind_phys), parameter :: VTERMS = 2._kind_phys !< terminal velocity of snowflake +! REAL(kind_phys), parameter :: MELTAU = 10._kind_phys !< melting timescale + REAL(kind_phys), parameter :: MELTAU = 20._kind_phys !< melting timescale ! Moorthi june 30, 2017 +! +! REAL(kind_phys), parameter :: EVAPR = 0.4_kind_phys !< evaporation factor ! Moorthi June 28, 2017 + REAL(kind_phys), parameter :: EVAPR = 0.3_kind_phys !< evaporation factor +! REAL(kind_phys), parameter :: EVAPR = 0._kind_phys !< evaporation factor + REAL(kind_phys), parameter :: REVPDD = 1._kind_phys !< max rate of DD to evapolation + REAL(kind_phys), parameter :: RDDR = 5.e-4_kind_phys !< DD rate (T0 R0 W0)^-1 +! REAL(kind_phys), parameter :: RDDR = 0._kind_phys !< DD rate (T0 R0 W0)^-1 + REAL(kind_phys), parameter :: RDDMX = 0.5_kind_phys !< norm. flux of downdraft + REAL(kind_phys), parameter :: VTERM = 5._kind_phys !< term. vel. of precip. +! REAL(kind_phys), parameter :: VTERM = 4._kind_phys !< term. vel. of precip. ! Moorthi June 28, 2017 + REAL(kind_phys), parameter :: EVATAU = 2._kind_phys !< evaporation/sublimation timescale + REAL(kind_phys), parameter :: ZDMIN = 5.e2_kind_phys !< min altitude of downdraft detrainment + real(kind_phys), parameter :: evapovtrm=EVAPR/VTERM !NOTE ! downdraft area ffraction still needs to be computed for AW, assumed zero for now, @@ -3542,29 +3543,29 @@ SUBROUTINE CUMCLD & !! cloudiness INTEGER, INTENT(IN) :: IJSDIM, KMAX ! DD, for GFS, pass in ! ! [OUTPUT] - REAL(r8) CUMFRC(IJSDIM) !< cumulus cloud fraction + REAL(kind_phys) CUMFRC(IJSDIM) !< cumulus cloud fraction ! ! [MODIFY] - REAL(r8) CUMCLW(IJSDIM, KMAX) !< cloud water in cumulus - REAL(r8) QLIQ (IJSDIM, KMAX) !< cloud liquid - REAL(r8) QICE (IJSDIM, KMAX) !< cloud ice - REAL(r8) FLIQC (IJSDIM, KMAX) !< liquid ratio in cumulus + REAL(kind_phys) CUMCLW(IJSDIM, KMAX) !< cloud water in cumulus + REAL(kind_phys) QLIQ (IJSDIM, KMAX) !< cloud liquid + REAL(kind_phys) QICE (IJSDIM, KMAX) !< cloud ice + REAL(kind_phys) FLIQC (IJSDIM, KMAX) !< liquid ratio in cumulus ! ! [INPUT] - REAL(r8) GMFLX (IJSDIM, KMAX) !< cumulus mass flux + REAL(kind_phys) GMFLX (IJSDIM, KMAX) ! cumulus mass flux INTEGER KTMX INTEGER ISTS, IENS ! ! [WORK] INTEGER I, K - REAL(r8) CUMF, QC, wrk + REAL(kind_phys) CUMF, QC, wrk ! ! [INTERNAL PARAM] - REAL(r8), parameter :: CMFMIN = 2.e-3_r8, &!< Mc->cloudiness - CMFMAX = 3.e-1_r8, &!< Mc->cloudiness - CLMIN = 1.e-3_r8, &!< cloudiness Min. - CLMAX = 0.1_r8, &!< cloudiness Max. - FACLW = 0.1_r8, &!< Mc->CLW + REAL(kind_phys), parameter :: CMFMIN = 2.e-3_kind_phys, &!< Mc->cloudiness + CMFMAX = 3.e-1_kind_phys, &!< Mc->cloudiness + CLMIN = 1.e-3_kind_phys, &!< cloudiness Min. + CLMAX = 0.1_kind_phys, &!< cloudiness Max. + FACLW = 0.1_kind_phys, &!< Mc->CLW FACLF = (CLMAX-CLMIN)/LOG(CMFMAX/CMFMIN) ! CUMFRC(ISTS:IENS) = zero @@ -3614,37 +3615,37 @@ SUBROUTINE CUMUPR & !! Tracer Updraft INTEGER, INTENT(IN) :: im, IJSDIM, KMAX, NTR, nctp !! DD, for GFS, pass in ! ! [MODIFY] - REAL(r8) GTR (IJSDIM, KMAX, NTR) - REAL(r8) GPRCC (IJSDIM, NTR) + REAL(kind_phys) GTR (IJSDIM, KMAX, NTR) + REAL(kind_phys) GPRCC (IJSDIM, NTR) ! ! [INPUT] - REAL(r8) GDR (IJSDIM, KMAX, NTR) - REAL(r8) CBMFX (IM, NCTP) - REAL(r8) GCYM (IJSDIM, KMAX, nctp) - REAL(r8) GCYT (IJSDIM, NCTP) - REAL(r8) GCQT (IJSDIM, NCTP) - REAL(r8) GCLT (IJSDIM, NCTP) - REAL(r8) GCIT (IJSDIM, NCTP) - REAL(r8) GTPRT (IJSDIM, NCTP) - REAL(r8) GTEVP (IJSDIM, KMAX) - REAL(r8) GTPRC0(IJSDIM) !! precip. before evap. - real(r8) fscav(ntr), fswtr(ntr) + REAL(kind_phys) GDR (IJSDIM, KMAX, NTR) + REAL(kind_phys) CBMFX (IM, NCTP) + REAL(kind_phys) GCYM (IJSDIM, KMAX, nctp) + REAL(kind_phys) GCYT (IJSDIM, NCTP) + REAL(kind_phys) GCQT (IJSDIM, NCTP) + REAL(kind_phys) GCLT (IJSDIM, NCTP) + REAL(kind_phys) GCIT (IJSDIM, NCTP) + REAL(kind_phys) GTPRT (IJSDIM, NCTP) + REAL(kind_phys) GTEVP (IJSDIM, KMAX) + REAL(kind_phys) GTPRC0(IJSDIM) !! precip. before evap. + real(kind_phys) fscav(ntr), fswtr(ntr) INTEGER KB (IJSDIM ) INTEGER KBMX INTEGER KT (IJSDIM, NCTP) INTEGER KTMX (NCTP) INTEGER KTMXT - REAL(r8) DELPI (IJSDIM, KMAX) + REAL(kind_phys) DELPI (IJSDIM, KMAX) LOGICAL OTSPT (NTR) !! transport with this routine? INTEGER ISTS, IENS ! ! [INTERNAL WORK] INTEGER I, K, LT, TP, CTP - REAL(r8) :: GCRTD, SCAV, GCWT, GPRCR, evpf, cbmfxl - REAL(r8), dimension(ists:iens) :: GCRB, GCRT, DR, gtprc0i -! REAL(r8), dimension(ists:iens,kmax) :: DGCB, DZ, RDZM, EVPF -! REAL(r8), dimension(ists:iens,nctp) :: DZT, RGCWT, MASK1, MASK2 - REAL(r8), dimension(ists:iens,nctp) :: RGCWT, MASK1 + REAL(kind_phys) :: GCRTD, SCAV, GCWT, GPRCR, evpf, cbmfxl + REAL(kind_phys), dimension(ists:iens) :: GCRB, GCRT, DR, gtprc0i +! REAL(kind_phys), dimension(ists:iens,kmax) :: DGCB, DZ, RDZM, EVPF +! REAL(kind_phys), dimension(ists:iens,nctp) :: DZT, RGCWT, MASK1, MASK2 + REAL(kind_phys), dimension(ists:iens,nctp) :: RGCWT, MASK1 ! do i=ists,iens if (gtprc0(i) > zero) then @@ -3751,18 +3752,18 @@ SUBROUTINE CUMDNR & !! Tracer Downdraft INTEGER, INTENT(IN) :: IM, IJSDIM, KMAX, NTR !! DD, for GFS, pass in ! ! [MODIFY] - REAL(r8) GTR (IJSDIM, KMAX, NTR) ! Temperature tendency + REAL(kind_phys) GTR (IJSDIM, KMAX, NTR) ! Temperature tendency ! ! [INPUT] - REAL(r8) GDR (IJSDIM, KMAX, NTR) - REAL(r8) GMDD (IJSDIM, KMAX) ! downdraft mass flux - REAL(r8) DELPI (IJSDIM, KMAX ) + REAL(kind_phys) GDR (IJSDIM, KMAX, NTR) + REAL(kind_phys) GMDD (IJSDIM, KMAX) ! downdraft mass flux + REAL(kind_phys) DELPI (IJSDIM, KMAX ) LOGICAL OTSPT (NTR) INTEGER KTMX, ISTS, IENS ! ! [INTERNAL WORK] - REAL(r8) GCRD (ISTS:IENS) ! downdraft q - REAL(r8) GMDDE, GMDDD, GCRDD + REAL(kind_phys) GCRD (ISTS:IENS) ! downdraft q + REAL(kind_phys) GMDDE, GMDDD, GCRDD INTEGER I, K, LT, kp1 ! ! @@ -3802,20 +3803,20 @@ SUBROUTINE CUMSBR & !! Tracer Subsidence INTEGER, INTENT(IN) :: IM, IJSDIM, KMAX, NTR !! DD, for GFS, pass in ! ! [MODIFY] - REAL(r8) GTR (IJSDIM, KMAX, NTR) !! tracer tendency + REAL(kind_phys) GTR (IJSDIM, KMAX, NTR) !! tracer tendency ! ! [INPUT] - REAL(r8) GDR (IJSDIM, KMAX, NTR) !! tracer - REAL(r8) DELPI (IJSDIM, KMAX) - REAL(r8) GMFLX (IJSDIM, KMAX) !! mass flux + REAL(kind_phys) GDR (IJSDIM, KMAX, NTR) !! tracer + REAL(kind_phys) DELPI (IJSDIM, KMAX) + REAL(kind_phys) GMFLX (IJSDIM, KMAX) !! mass flux INTEGER KTMX LOGICAL OTSPT (NTR) !! tracer transport on/off INTEGER ISTS, IENS ! ! [INTERNAL WORK] INTEGER I, K, KM, KP, LT - REAL(r8) SBR0, SBR1, FX1 - REAL(r8) FX(ISTS:IENS) + REAL(kind_phys) SBR0, SBR1, FX1 + REAL(kind_phys) FX(ISTS:IENS) ! DO LT=1,NTR IF (OTSPT(LT)) THEN @@ -3856,12 +3857,12 @@ SUBROUTINE CUMFXR & ! Tracer mass fixe INTEGER, INTENT(IN) :: IM, IJSDIM, KMAX, NTR !! DD, for GFS, pass in ! ! [MODIFY] - REAL(r8) GTR (IJSDIM, KMAX, NTR) ! tracer tendency + REAL(kind_phys) GTR (IJSDIM, KMAX, NTR) ! tracer tendency ! ! [INPUT] - REAL(r8) GDR (IJSDIM, KMAX, NTR) ! tracer - REAL(r8) DELP (IJSDIM, KMAX) - REAL(r8) DELTA ! time step + REAL(kind_phys) GDR (IJSDIM, KMAX, NTR) ! tracer + REAL(kind_phys) DELP (IJSDIM, KMAX) + REAL(kind_phys) DELTA ! time step INTEGER KTMX INTEGER IMFXR (NTR) ! 0: mass fixer is not applied @@ -3876,10 +3877,10 @@ SUBROUTINE CUMFXR & ! Tracer mass fixe INTEGER ISTS, IENS ! ! [INTERNAL WORK] - REAL(r8) GDR1 - REAL(r8) GDR2 (ISTS:IENS, KMAX) - REAL(r8), dimension(ISTS:IENS) :: TOT0, TOT1, TRAT - REAL(r8) FWAT + REAL(kind_phys) GDR1 + REAL(kind_phys) GDR2 (ISTS:IENS, KMAX) + REAL(kind_phys), dimension(ISTS:IENS) :: TOT0, TOT1, TRAT + REAL(kind_phys) FWAT INTEGER I, K, LT ! ! Attention: tracers are forced to be positive unless IMFXR=0. @@ -3948,12 +3949,12 @@ SUBROUTINE CUMFXR1 & ! Tracer mass fixer INTEGER, INTENT(IN) :: IM, IJSDIM, KMAX ! DD, for GFS, pass in ! ! [MODIFY] - REAL(r8) GTR (IJSDIM, KMAX) ! tracer tendency + REAL(kind_phys) GTR (IJSDIM, KMAX) ! tracer tendency ! ! [INPUT] - REAL(r8) GDR (IJSDIM, KMAX) ! tracer - REAL(r8) DELP (IJSDIM, KMAX) - REAL(r8) DELTA ! time step + REAL(kind_phys) GDR (IJSDIM, KMAX) ! tracer + REAL(kind_phys) DELP (IJSDIM, KMAX) + REAL(kind_phys) DELTA ! time step INTEGER KTMX INTEGER IMFXR ! 0: mass fixer is not applied @@ -3966,10 +3967,10 @@ SUBROUTINE CUMFXR1 & ! Tracer mass fixer INTEGER ISTS, IENS ! ! [INTERNAL WORK] - REAL(r8) GDR1 - REAL(r8) GDR2 (ISTS:IENS, KMAX) - REAL(r8), dimension(ISTS:IENS) :: TOT0, TOT1, TRAT - REAL(r8) FWAT + REAL(kind_phys) GDR1 + REAL(kind_phys) GDR2 (ISTS:IENS, KMAX) + REAL(kind_phys), dimension(ISTS:IENS) :: TOT0, TOT1, TRAT + REAL(kind_phys) FWAT INTEGER I, K ! ! Attention: tracers are forced to be positive unless IMFXR=0. @@ -4034,17 +4035,17 @@ SUBROUTINE CUMCHK & ! check range of output va INTEGER, INTENT(IN) :: IJSDIM, KMAX, NTR ! DD, for GFS, pass in ! ! [INPUT] - REAL(r8) GTT (IJSDIM, KMAX) ! heating rate - REAL(r8) GTQ (IJSDIM, KMAX, NTR) ! change in q - REAL(r8) GTU (IJSDIM, KMAX) ! tendency of u - REAL(r8) GTV (IJSDIM, KMAX) ! tendency of v - REAL(r8) GPRCC (IJSDIM, NTR ) ! rainfall - REAL(r8) GSNWC (IJSDIM) ! snowfall - REAL(r8) CUMCLW(IJSDIM, KMAX) ! cloud water in cumulus - REAL(r8) CUMFRC(IJSDIM) ! cumulus cloud fraction - REAL(r8) GTCFRC(IJSDIM, KMAX) ! change in cloud fraction - REAL(r8) FLIQC (IJSDIM, KMAX) ! liquid ratio in cumulus - REAL(r8) GTPRP (IJSDIM, KMAX) ! rain+snow flux + REAL(kind_phys) GTT (IJSDIM, KMAX) ! heating rate + REAL(kind_phys) GTQ (IJSDIM, KMAX, NTR) ! change in q + REAL(kind_phys) GTU (IJSDIM, KMAX) ! tendency of u + REAL(kind_phys) GTV (IJSDIM, KMAX) ! tendency of v + REAL(kind_phys) GPRCC (IJSDIM, NTR ) ! rainfall + REAL(kind_phys) GSNWC (IJSDIM) ! snowfall + REAL(kind_phys) CUMCLW(IJSDIM, KMAX) ! cloud water in cumulus + REAL(kind_phys) CUMFRC(IJSDIM) ! cumulus cloud fraction + REAL(kind_phys) GTCFRC(IJSDIM, KMAX) ! change in cloud fraction + REAL(kind_phys) FLIQC (IJSDIM, KMAX) ! liquid ratio in cumulus + REAL(kind_phys) GTPRP (IJSDIM, KMAX) ! rain+snow flux ! INTEGER ISTS, IENS ! @@ -4052,19 +4053,19 @@ SUBROUTINE CUMCHK & ! check range of output va INTEGER I, K ! ! [INTERNAL PARM] - REAL(r8) :: GTTMAX = 1.e-2_r8 - REAL(r8) :: GTQVMAX = 1.e-4_r8 - REAL(r8) :: GTQLMAX = 1.e-5_r8 - REAL(r8) :: GTUMAX = 1.e-2_r8 - REAL(r8) :: GTVMAX = 1.e-2_r8 - REAL(r8) :: GTCFMAX = 1.e-3_r8 - REAL(r8) :: PRCCMAX = 1.e-2_r8 - REAL(r8) :: SNWCMAX = 1.e-2_r8 - REAL(r8) :: CLWMAX = 1.e-3_r8 - REAL(r8) :: TPRPMAX = 1.e-2_r8 - REAL(r8) :: GTQIMAX = 1.e-5_r8 - !REAL(r8) :: GTM2MAX = 1._r8 - !REAL(r8) :: GTM3MAX = 1._r8 + REAL(kind_phys) :: GTTMAX = 1.e-2_kind_phys + REAL(kind_phys) :: GTQVMAX = 1.e-4_kind_phys + REAL(kind_phys) :: GTQLMAX = 1.e-5_kind_phys + REAL(kind_phys) :: GTUMAX = 1.e-2_kind_phys + REAL(kind_phys) :: GTVMAX = 1.e-2_kind_phys + REAL(kind_phys) :: GTCFMAX = 1.e-3_kind_phys + REAL(kind_phys) :: PRCCMAX = 1.e-2_kind_phys + REAL(kind_phys) :: SNWCMAX = 1.e-2_kind_phys + REAL(kind_phys) :: CLWMAX = 1.e-3_kind_phys + REAL(kind_phys) :: TPRPMAX = 1.e-2_kind_phys + REAL(kind_phys) :: GTQIMAX = 1.e-5_kind_phys + !REAL(kind_phys) :: GTM2MAX = 1._kind_phys + !REAL(kind_phys) :: GTM3MAX = 1._kind_phys ! DO K=1,KMAX DO I=ISTS, IENS diff --git a/physics/cs_conv_aw_adj.F90 b/physics/cs_conv_aw_adj.F90 index 756161d8c9..74cac91841 100644 --- a/physics/cs_conv_aw_adj.F90 +++ b/physics/cs_conv_aw_adj.F90 @@ -40,15 +40,15 @@ subroutine cs_conv_aw_adj_run(im, levs, do_cscnv, do_aw, do_shoc, & logical, intent(in) :: do_cscnv, do_aw, do_shoc integer, intent(in) :: ntrac, ncld, ntcw, ntclamt, nncl real(kind_phys), intent(in) :: con_g - real(kind_phys), dimension(im,levs), intent(inout) :: sigmafrac - real(kind_phys), dimension(im,levs), intent(inout) :: gt0 - real(kind_phys), dimension(im,levs,ntrac), intent(inout) :: gq0 - real(kind_phys), dimension(im,levs), intent(in) :: save_t - real(kind_phys), dimension(im,levs,ntrac), intent(in) :: save_q - real(kind_phys), dimension(im,levs+1), intent(in) :: prsi - real(kind_phys), dimension(im,levs), intent(inout) :: cldfrac - real(kind_phys), dimension(im,levs), intent(inout) :: subcldfrac - real(kind_phys), dimension(im), intent(inout) :: prcp + real(kind_phys), dimension(:,:), intent(inout) :: sigmafrac + real(kind_phys), dimension(:,:), intent(inout) :: gt0 + real(kind_phys), dimension(:,:,:), intent(inout) :: gq0 + real(kind_phys), dimension(:,:), intent(in) :: save_t + real(kind_phys), dimension(:,:,:), intent(in) :: save_q + real(kind_phys), dimension(:,:), intent(in) :: prsi + real(kind_phys), dimension(:,:), intent(inout) :: cldfrac + real(kind_phys), dimension(:,:), intent(inout) :: subcldfrac + real(kind_phys), dimension(:), intent(inout) :: prcp integer, intent(in ) :: imp_physics, imp_physics_mg character(len=*), intent( out) :: errmsg integer, intent( out) :: errflg diff --git a/physics/cu_gf_driver.F90 b/physics/cu_gf_driver.F90 index dcf0d183b1..27165e067d 100644 --- a/physics/cu_gf_driver.F90 +++ b/physics/cu_gf_driver.F90 @@ -96,45 +96,47 @@ subroutine cu_gf_driver_run(ntracer,garea,im,km,dt,cactiv, & logical, intent(in ) :: flag_for_scnv_generic_tend,flag_for_dcnv_generic_tend logical, intent(in ) :: ldiag3d,qdiag3d - real(kind=kind_phys), dimension( im , km ), intent(in ) :: forcet,forceqv_spechum,w,phil - real(kind=kind_phys), dimension( im , km ), intent(inout ) :: t,us,vs - real(kind=kind_phys), dimension( im , km ), intent(inout ) :: qci_conv - real(kind=kind_phys), dimension( im ) :: rand_mom,rand_vmas - real(kind=kind_phys), dimension( im,4 ) :: rand_clos - real(kind=kind_phys), dimension( im , km, 11 ) :: gdc,gdc2 - real(kind=kind_phys), dimension( im , km ), intent(out ) :: cnvw_moist,cnvc - real(kind=kind_phys), dimension( im , km ), intent(inout ) :: cliw, clcw - - real(kind=kind_phys), dimension( : , : ), intent(inout ) :: & + real(kind=kind_phys), dimension( : , : ), intent(in ) :: forcet,forceqv_spechum,w,phil + real(kind=kind_phys), dimension( : , : ), intent(inout ) :: t,us,vs + real(kind=kind_phys), dimension( : , : ), intent(inout ) :: qci_conv + real(kind=kind_phys), dimension( : , : ), intent(out ) :: cnvw_moist,cnvc + real(kind=kind_phys), dimension( : , : ), intent(inout ) :: cliw, clcw + + real(kind=kind_phys), dimension( : , : ), intent(inout ) :: & du3dt_SCNV,dv3dt_SCNV,dt3dt_SCNV,dq3dt_SCNV, & du3dt_DCNV,dv3dt_DCNV,dt3dt_DCNV,dq3dt_DCNV - integer, dimension (im), intent(inout) :: hbot,htop,kcnv - integer, dimension (im), intent(in) :: xland - real(kind=kind_phys), dimension (im), intent(in) :: pbl + integer, dimension (:), intent(out) :: hbot,htop,kcnv + integer, dimension (:), intent(in) :: xland + real(kind=kind_phys), dimension (:), intent(in) :: pbl integer, dimension (im) :: tropics ! ruc variable - real(kind=kind_phys), dimension (im) :: hfx2,qfx2,psuri - real(kind=kind_phys), dimension (im,km) :: ud_mf,dd_mf,dt_mf - real(kind=kind_phys), dimension (im), intent(inout) :: raincv,cld1d - real(kind=kind_phys), dimension (im,km) :: t2di,p2di + real(kind=kind_phys), dimension (:), intent(in) :: hfx2,qfx2,psuri + real(kind=kind_phys), dimension (:,:), intent(out) :: ud_mf,dd_mf,dt_mf + real(kind=kind_phys), dimension (:), intent(out) :: raincv,cld1d + real(kind=kind_phys), dimension (:,:), intent(in) :: t2di,p2di ! Specific humidity from FV3 - real(kind=kind_phys), dimension (im,km), intent(in) :: qv2di_spechum - real(kind=kind_phys), dimension (im,km), intent(inout) :: qv_spechum + real(kind=kind_phys), dimension (:,:), intent(in) :: qv2di_spechum + real(kind=kind_phys), dimension (:,:), intent(inout) :: qv_spechum ! Local water vapor mixing ratios and cloud water mixing ratios real(kind=kind_phys), dimension (im,km) :: qv2di, qv, forceqv, cnvw ! - real(kind=kind_phys), dimension( im ),intent(in) :: garea + real(kind=kind_phys), dimension(:),intent(in) :: garea real(kind=kind_phys), intent(in ) :: dt integer, intent(in ) :: imfshalcnv + integer, dimension(:), intent(inout) :: cactiv + character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg -! define locally for now. - integer, dimension(im),intent(inout) :: cactiv + +! local variables integer, dimension(im) :: k22_shallow,kbcon_shallow,ktop_shallow - real(kind=kind_phys), dimension(im) :: ht - real(kind=kind_phys), dimension(im) :: dx + real(kind=kind_phys), dimension (im) :: rand_mom,rand_vmas + real(kind=kind_phys), dimension (im,4) :: rand_clos + real(kind=kind_phys), dimension (im,km,11) :: gdc,gdc2 + real(kind=kind_phys), dimension (im) :: ht + real(kind=kind_phys), dimension (im) :: dx real(kind=kind_phys), dimension (im,km) :: outt,outq,outqc,phh,subm,cupclw,cupclws real(kind=kind_phys), dimension (im,km) :: dhdt,zu,zus,zd,phf,zum,zdm,outum,outvm real(kind=kind_phys), dimension (im,km) :: outts,outqs,outqcs,outu,outv,outus,outvs diff --git a/physics/cu_ntiedtke.F90 b/physics/cu_ntiedtke.F90 index a39930d770..0fab755dcf 100644 --- a/physics/cu_ntiedtke.F90 +++ b/physics/cu_ntiedtke.F90 @@ -154,16 +154,16 @@ subroutine cu_ntiedtke_run(pu,pv,pt,pqv,tdi,qvdi,pqvf,ptf,clw,poz,pzz,prsl,prsi, ! in&out variables integer, intent(in) :: lq, km, ktrac real(kind=kind_phys), intent(in ) :: dt - integer, dimension( lq ), intent(in) :: lmask - real(kind=kind_phys), dimension( lq ), intent(in ) :: evap, hfx, dx - real(kind=kind_phys), dimension( lq , km ), intent(inout) :: pu, pv, pt, pqv - real(kind=kind_phys), dimension( lq , km ), intent(in ) :: tdi, qvdi, poz, prsl, pomg, pqvf, ptf - real(kind=kind_phys), dimension( lq , km+1 ), intent(in ) :: pzz, prsi - real(kind=kind_phys), dimension( lq , km, ktrac ), intent(inout ) :: clw - - integer, dimension( lq ), intent(out) :: kbot, ktop, kcnv - real(kind=kind_phys), dimension( lq ), intent(out) :: zprecc - real(kind=kind_phys), dimension (lq,km), intent(out) :: ud_mf, dd_mf, dt_mf, cnvw, cnvc + integer, dimension( : ), intent(in) :: lmask + real(kind=kind_phys), dimension( : ), intent(in ) :: evap, hfx, dx + real(kind=kind_phys), dimension( :, : ), intent(inout) :: pu, pv, pt, pqv + real(kind=kind_phys), dimension( :, :), intent(in ) :: tdi, qvdi, poz, prsl, pomg, pqvf, ptf + real(kind=kind_phys), dimension( :, : ), intent(in ) :: pzz, prsi + real(kind=kind_phys), dimension( :, :, : ), intent(inout ) :: clw + + integer, dimension( : ), intent(out) :: kbot, ktop, kcnv + real(kind=kind_phys), dimension( : ), intent(out) :: zprecc + real(kind=kind_phys), dimension (:, :), intent(out) :: ud_mf, dd_mf, dt_mf, cnvw, cnvc ! error messages character(len=*), intent(out) :: errmsg diff --git a/physics/dcyc2.f b/physics/dcyc2.f index 04e7e03176..ad9365851c 100644 --- a/physics/dcyc2.f +++ b/physics/dcyc2.f @@ -172,15 +172,15 @@ end subroutine dcyc2t3_finalize subroutine dcyc2t3_run & ! --- inputs: & ( solhr,slag,sdec,cdec,sinlat,coslat, & - & xlon,coszen,tsfc_lnd,tsfc_ice,tsfc_wat,tf,tsflw, & + & xlon,coszen,tsfc_lnd,tsfc_ice,tsfc_wat,tf,tsflw,tsfc, & & sfcemis_lnd, sfcemis_ice, sfcemis_wat, & & sfcdsw,sfcnsw,sfcdlw,swh,swhc,hlw,hlwc, & & sfcnirbmu,sfcnirdfu,sfcvisbmu,sfcvisdfu, & & sfcnirbmd,sfcnirdfd,sfcvisbmd,sfcvisdfd, & & im, levs, deltim, fhswr, & & dry, icy, wet, & - & minGPpres, tsfc, use_LW_jacobian, sfculw, fluxlwUP_jac, & - & t_lay, t_lev, p_lay, p_lev, flux2D_lwUP, flux2D_lwDOWN, & + & minGPpres, use_LW_jacobian, sfculw, fluxlwUP_jac, & + & t_lay, t_lev, p_lay, p_lev, flux2D_lwUP, flux2D_lwDOWN, & & pert_radtend, do_sppt,ca_global, & ! & dry, icy, wet, lprnt, ipr, & ! --- input/output: @@ -212,41 +212,41 @@ subroutine dcyc2t3_run & ! integer, intent(in) :: ipr ! logical lprnt - logical, dimension(im), intent(in) :: dry, icy, wet + logical, dimension(:), intent(in) :: dry, icy, wet logical, intent(in) :: use_LW_jacobian, pert_radtend logical, intent(in) :: do_sppt,ca_global real(kind=kind_phys), intent(in) :: solhr, slag, cdec, sdec, & & deltim, fhswr, minGPpres - real(kind=kind_phys), dimension(im), intent(in) :: & + real(kind=kind_phys), dimension(:), intent(in) :: & & sinlat, coslat, xlon, coszen, tf, tsflw, sfcdlw, & & sfcdsw, sfcnsw, sfculw, tsfc - real(kind=kind_phys), dimension(im), intent(in) :: & + real(kind=kind_phys), dimension(:), intent(in) :: & & tsfc_lnd, tsfc_ice, tsfc_wat, & & sfcemis_lnd, sfcemis_ice, sfcemis_wat - real(kind=kind_phys), dimension(im), intent(in) :: & + real(kind=kind_phys), dimension(:), intent(in) :: & & sfcnirbmu, sfcnirdfu, sfcvisbmu, sfcvisdfu, & & sfcnirbmd, sfcnirdfd, sfcvisbmd, sfcvisdfd - real(kind=kind_phys), dimension(im,levs), intent(in) :: swh, hlw & - & ,swhc, hlwc, p_lay, t_lay - real(kind=kind_phys), dimension(im,levs+1), intent(in) :: p_lev, & + real(kind=kind_phys), dimension(:,:), intent(in) :: swh, hlw, & + & swhc, hlwc, p_lay, t_lay + + real(kind=kind_phys), dimension(:,:), intent(in) :: p_lev, & & flux2D_lwUP, flux2D_lwDOWN, fluxlwUP_jac, t_lev ! --- input/output: - real(kind=kind_phys), dimension(im,levs), intent(inout) :: dtdt, & - & htrlw - real(kind=kind_phys), dimension(:,:), intent(inout) :: dtdtnp + real(kind=kind_phys), dimension(:,:), intent(inout) :: dtdt, htrlw + real(kind=kind_phys), dimension(:,:), intent(inout) :: dtdtnp ! --- outputs: - real(kind=kind_phys), dimension(im), intent(out) :: & + real(kind=kind_phys), dimension(:), intent(out) :: & & adjsfcdsw, adjsfcnsw, adjsfcdlw, adjsfculw, xmu, xcosz, & & adjnirbmu, adjnirdfu, adjvisbmu, adjvisdfu, & & adjnirbmd, adjnirdfd, adjvisbmd, adjvisdfd - real(kind=kind_phys), dimension(im), intent(out) :: & + real(kind=kind_phys), dimension(:), intent(out) :: & & adjsfculw_lnd, adjsfculw_ice, adjsfculw_wat character(len=*), intent(out) :: errmsg diff --git a/physics/dcyc2.meta b/physics/dcyc2.meta index 1758f6c43d..a460db7abc 100644 --- a/physics/dcyc2.meta +++ b/physics/dcyc2.meta @@ -88,18 +88,18 @@ kind = kind_phys intent = in optional = F -[tsfc_wat] - standard_name = surface_skin_temperature_over_water_interstitial - long_name = surface skin temperature over water (temporary use as interstitial) +[tsfc_ice] + standard_name = surface_skin_temperature_over_ice_interstitial + long_name = surface skin temperature over ice (temporary use as interstitial) units = K dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in optional = F -[tsfc_ice] - standard_name = surface_skin_temperature_over_ice_interstitial - long_name = surface skin temperature over ice (temporary use as interstitial) +[tsfc_wat] + standard_name = surface_skin_temperature_over_water_interstitial + long_name = surface skin temperature over water (temporary use as interstitial) units = K dimensions = (horizontal_loop_extent) type = real @@ -187,15 +187,6 @@ kind = kind_phys intent = in optional = F -[sfculw] - standard_name = surface_upwelling_longwave_flux_on_radiation_time_step - long_name = total sky sfc upward lw flux - units = W m-2 - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F [swh] standard_name = tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step long_name = total sky shortwave heating rate on radiation time step @@ -362,14 +353,94 @@ type = logical intent = in optional = F -[dtdt] - standard_name = tendency_of_air_temperature_due_to_model_physics - long_name = total radiative heating rate at current time - units = K s-1 +[minGPpres] + standard_name = minimum_pressure_in_RRTMGP + long_name = minimum pressure allowed in RRTMGP + units = Pa + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[use_LW_jacobian] + standard_name = flag_to_calc_RRTMGP_LW_jacobian + long_name = logical flag to control RRTMGP LW calculation + units = flag + dimensions = () + type = logical + intent = in + optional = F +[sfculw] + standard_name = surface_upwelling_longwave_flux_on_radiation_time_step + long_name = total sky sfc upward lw flux + units = W m-2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[fluxlwUP_jac] + standard_name = RRTMGP_jacobian_of_lw_flux_upward + long_name = RRTMGP Jacobian upward longwave flux profile + units = W m-2 K-1 + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = in + optional = F +[t_lay] + standard_name = air_temperature_updated_by_physics + long_name = model layer mean temperature updated by physics + units = K dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys - intent = inout + intent = in + optional = F +[t_lev] + standard_name = air_temperature_at_interface_for_RRTMGP + long_name = air temperature at vertical interface for radiation calculation + units = K + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = in + optional = F +[p_lay] + standard_name = air_pressure + long_name = mean layer pressure + units = Pa + dimensions = (horizontal_loop_extent,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[p_lev] + standard_name = air_pressure_at_interface + long_name = air pressure at model layer interfaces + units = Pa + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = in + optional = F +[flux2D_lwUP] + standard_name = RRTMGP_lw_flux_profile_upward_allsky + long_name = RRTMGP upward longwave all-sky flux profile + units = W m-2 + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = in + optional = F +[flux2D_lwDOWN] + standard_name = RRTMGP_lw_flux_profile_downward_allsky + long_name = RRTMGP downward longwave all-sky flux profile + units = W m-2 + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = in optional = F [pert_radtend] standard_name = flag_for_stochastic_radiative_heating_perturbations @@ -395,6 +466,15 @@ type = logical intent = in optional = F +[dtdt] + standard_name = tendency_of_air_temperature_due_to_model_physics + long_name = total radiative heating rate at current time + units = K s-1 + dimensions = (horizontal_loop_extent,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F [dtdtnp] standard_name = tendency_of_air_temperature_to_withold_from_sppt long_name = temp. change from physics that should not be perturbed by sppt @@ -404,6 +484,15 @@ kind = kind_phys intent = inout optional = F +[htrlw] + standard_name = updated_tendency_of_air_temperature_due_to_longwave_heating_on_physics_time_step + long_name = total sky longwave heating rate on physics time step + units = K s-1 + dimensions = (horizontal_loop_extent,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F [adjsfcdsw] standard_name = surface_downwelling_shortwave_flux long_name = surface downwelling shortwave flux at current time @@ -431,6 +520,15 @@ kind = kind_phys intent = out optional = F +[adjsfculw] + standard_name = surface_upwelling_longwave_flux + long_name = surface upwelling longwave flux at current time + units = W m-2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = out + optional = F [adjsfculw_lnd] standard_name = surface_upwelling_longwave_flux_over_land_interstitial long_name = surface upwelling longwave flux at current time over land (temporary use as interstitial) @@ -458,15 +556,6 @@ kind = kind_phys intent = out optional = F -[adjsfculw] - standard_name = surface_upwelling_longwave_flux - long_name = surface upwelling longwave flux at current time - units = W m-2 - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = out - optional = F [xmu] standard_name = zenith_angle_temporal_adjustment_factor_for_shortwave_fluxes long_name = zenith angle temporal adjustment factor for shortwave fluxes @@ -557,95 +646,6 @@ kind = kind_phys intent = out optional = F -[minGPpres] - standard_name = minimum_pressure_in_RRTMGP - long_name = minimum pressure allowed in RRTMGP - units = Pa - dimensions = () - type = real - kind = kind_phys - intent = in - optional = F -[use_LW_jacobian] - standard_name = flag_to_calc_RRTMGP_LW_jacobian - long_name = logical flag to control RRTMGP LW calculation - units = flag - dimensions = () - type = logical - intent = in - optional = F -[fluxlwUP_jac] - standard_name = RRTMGP_jacobian_of_lw_flux_upward - long_name = RRTMGP Jacobian upward longwave flux profile - units = W m-2 K-1 - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) - type = real - kind = kind_phys - intent = in - optional = F -[htrlw] - standard_name = updated_tendency_of_air_temperature_due_to_longwave_heating_on_physics_time_step - long_name = total sky longwave heating rate on physics time step - units = K s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = out - optional = F -[t_lev] - standard_name = air_temperature_at_interface_for_RRTMGP - long_name = air temperature at vertical interface for radiation calculation - units = K - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) - type = real - kind = kind_phys - intent = in - optional = F -[t_lay] - standard_name = air_temperature_updated_by_physics - long_name = model layer mean temperature updated by physics - units = K - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[p_lay] - standard_name = air_pressure - long_name = mean layer pressure - units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[p_lev] - standard_name = air_pressure_at_interface - long_name = air pressure at model layer interfaces - units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) - type = real - kind = kind_phys - intent = in - optional = F -[flux2D_lwUP] - standard_name = RRTMGP_lw_flux_profile_upward_allsky - long_name = RRTMGP upward longwave all-sky flux profile - units = W m-2 - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) - type = real - kind = kind_phys - intent = in - optional = F -[flux2D_lwDOWN] - standard_name = RRTMGP_lw_flux_profile_downward_allsky - long_name = RRTMGP downward longwave all-sky flux profile - units = W m-2 - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) - type = real - kind = kind_phys - intent = in - optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP diff --git a/physics/drag_suite.F90 b/physics/drag_suite.F90 index 195b1862e6..92a1c0bd32 100644 --- a/physics/drag_suite.F90 +++ b/physics/drag_suite.F90 @@ -300,8 +300,8 @@ subroutine drag_suite_run( & integer, intent(in) :: im, km, imx, kdt, ipr, me, master integer, intent(in) :: gwd_opt logical, intent(in) :: lprnt - integer, intent(in) :: KPBL(im) - real(kind=kind_phys), intent(in) :: deltim, G, CP, RD, RV, cdmbgwd(2) + integer, intent(in) :: KPBL(:) + real(kind=kind_phys), intent(in) :: deltim, G, CP, RD, RV, cdmbgwd(:) integer :: kpblmax integer, parameter :: ims=1, kms=1, its=1, kts=1 @@ -310,29 +310,29 @@ subroutine drag_suite_run( & real(kind=kind_phys) :: g_inv real(kind=kind_phys), intent(inout) :: & - & dudt(im,km),dvdt(im,km), & - & dtdt(im,km) - real(kind=kind_phys), intent(out) :: rdxzb(im) + & dudt(:,:),dvdt(:,:), & + & dtdt(:,:) + real(kind=kind_phys), intent(out) :: rdxzb(:) real(kind=kind_phys), intent(in) :: & - & u1(im,km),v1(im,km), & - & t1(im,km),q1(im,km), & - & PHII(im,km+1),prsl(im,km), & - & prslk(im,km),PHIL(im,km) - real(kind=kind_phys), intent(in) :: prsi(im,km+1), & - & del(im,km) - real(kind=kind_phys), intent(in) :: var(im),oc1(im), & - & oa4(im,4),ol4(im,4), & - & dx(im) - real(kind=kind_phys), intent(in) :: varss(im),oc1ss(im), & - & oa4ss(im,4),ol4ss(im,4) - real(kind=kind_phys), intent(in) :: THETA(im),SIGMA(im), & - & GAMMA(im),ELVMAX(im) + & u1(:,:),v1(:,:), & + & t1(:,:),q1(:,:), & + & PHII(:,:),prsl(:,:), & + & prslk(:,:),PHIL(:,:) + real(kind=kind_phys), intent(in) :: prsi(:,:), & + & del(:,:) + real(kind=kind_phys), intent(in) :: var(:),oc1(:), & + & oa4(:,:),ol4(:,:), & + & dx(:) + real(kind=kind_phys), intent(in) :: varss(:),oc1ss(:), & + & oa4ss(:,:),ol4ss(:,:) + real(kind=kind_phys), intent(in) :: THETA(:),SIGMA(:), & + & GAMMA(:),ELVMAX(:) ! added for small-scale orographic wave drag real(kind=kind_phys), dimension(im,km) :: utendwave,vtendwave,thx,thvx - real(kind=kind_phys), intent(in) :: br1(im), & - & hpbl(im), & - & slmsk(im) + real(kind=kind_phys), intent(in) :: br1(:), & + & hpbl(:), & + & slmsk(:) real(kind=kind_phys), dimension(im) :: govrth,xland !real(kind=kind_phys), dimension(im,km) :: dz2 real(kind=kind_phys) :: tauwavex0,tauwavey0, & @@ -346,7 +346,7 @@ subroutine drag_suite_run( & !Output: real(kind=kind_phys), intent(out) :: & - & dusfc(im), dvsfc(im) + & dusfc(:), dvsfc(:) !Output (optional): real(kind=kind_phys), intent(out) :: & & dusfc_ls(:),dvsfc_ls(:), & diff --git a/physics/drag_suite.meta b/physics/drag_suite.meta index 3035a2c955..26912cee4f 100644 --- a/physics/drag_suite.meta +++ b/physics/drag_suite.meta @@ -271,7 +271,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = inout + intent = in optional = F [dtaux2d_ls] standard_name = tendency_of_x_wind_due_to_mesoscale_orographic_gravity_wave_drag diff --git a/physics/flake_driver.F90 b/physics/flake_driver.F90 index 535d2b9f20..1e87144610 100644 --- a/physics/flake_driver.F90 +++ b/physics/flake_driver.F90 @@ -81,21 +81,21 @@ SUBROUTINE flake_driver_run ( & integer, intent(in) :: im, imon,yearlen ! integer, dimension(im), intent(in) :: islmsk - real (kind=kind_phys), dimension(im), intent(in) :: ps, wind, & + real (kind=kind_phys), dimension(:), intent(in) :: ps, wind, & & t1, q1, dlwflx, dswsfc, zlvl, elev real (kind=kind_phys), intent(in) :: delt - real (kind=kind_phys), dimension(im), intent(in) :: & + real (kind=kind_phys), dimension(:), intent(in) :: & & xlat, weasd, lakedepth - real (kind=kind_phys),dimension(im),intent(inout) :: & + real (kind=kind_phys),dimension(:),intent(inout) :: & & snwdph, hice, tsurf, t_sfc, hflx, evap, fice, ustar, qsfc, & & ch, cm, chh, cmm real (kind=kind_phys), intent(in) :: julian - logical, dimension(im), intent(in) :: flag_iter, wet, use_flake + logical, dimension(:), intent(in) :: flag_iter, wet, use_flake character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg diff --git a/physics/flake_driver.meta b/physics/flake_driver.meta index 3584b2d8e3..74fb6b7e62 100644 --- a/physics/flake_driver.meta +++ b/physics/flake_driver.meta @@ -120,7 +120,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = inout + intent = in optional = F [lakedepth] standard_name = lake_depth @@ -223,7 +223,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = in + intent = inout optional = F [hice] standard_name = sea_ice_thickness @@ -241,7 +241,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = in + intent = inout optional = F [fice] standard_name = sea_ice_concentration diff --git a/physics/gcm_shoc.F90 b/physics/gcm_shoc.F90 index af7d6db49c..97d12c3f6c 100644 --- a/physics/gcm_shoc.F90 +++ b/physics/gcm_shoc.F90 @@ -36,12 +36,12 @@ subroutine shoc_run (nx, nzm, tcr, tcrf, con_cp, con_g, con_hvap, con_hfus, con_ con_rd, con_pi, con_fvirt, con_eps, & dtp, supice, pcrit, cefac, cesfac, tkef1, dis_opt ! - real(kind=kind_phys), intent(in), dimension(nx) :: hflx, evap - real(kind=kind_phys), intent(in), dimension(nx,nzm) :: prsl, delp, phil, u, v, omega, rhc, prnum - real(kind=kind_phys), intent(in), dimension(nx,nzm+1) :: phii + real(kind=kind_phys), intent(in), dimension(:) :: hflx, evap + real(kind=kind_phys), intent(in), dimension(:,:) :: prsl, delp, phil, u, v, omega, rhc, prnum + real(kind=kind_phys), intent(in), dimension(:,:) :: phii ! - real(kind=kind_phys), intent(inout), dimension(nx,nzm) :: gt0, cld_sgs, tke, tkh, wthv_sec - real(kind=kind_phys), intent(inout), dimension(nx,nzm,ntrac) :: gq0 + real(kind=kind_phys), intent(inout), dimension(:,:) :: gt0, cld_sgs, tke, tkh, wthv_sec + real(kind=kind_phys), intent(inout), dimension(:,:,:) :: gq0 character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg @@ -1726,7 +1726,7 @@ end subroutine assumed_pdf real function esatw(t) - real t ! temperature (K) + real t ! temperature (K) real a0,a1,a2,a3,a4,a5,a6,a7,a8 data a0,a1,a2,a3,a4,a5,a6,a7,a8 / & 6.11239921, 0.443987641, 0.142986287e-1, & @@ -1739,8 +1739,8 @@ end function esatw real function qsatw(t,p) ! implicit none - real t ! temperature (K) - real p ! pressure (Pa) + real t ! temperature (K) + real p ! pressure (Pa) real esat ! esat = fpvs(t) esat = fpvsl(t) @@ -1751,7 +1751,7 @@ end function qsatw real function esati(t) - real t ! temperature (K) + real t ! temperature (K) real a0,a1,a2,a3,a4,a5,a6,a7,a8 data a0,a1,a2,a3,a4,a5,a6,a7,a8 / & 6.11147274, 0.503160820, 0.188439774e-1, & @@ -1771,8 +1771,8 @@ real function esati(t) end function esati real function qsati(t,p) - real t ! temperature (K) - real p ! pressure (Pa) + real t ! temperature (K) + real p ! pressure (Pa) real esat !,esati ! esat = fpvs(t) esat = fpvsi(t) @@ -1782,7 +1782,7 @@ real function qsati(t,p) end function qsati real function dtesatw(t) - real t ! temperature (K) + real t ! temperature (K) real a0,a1,a2,a3,a4,a5,a6,a7,a8 data a0,a1,a2,a3,a4,a5,a6,a7,a8 / & 0.443956472, 0.285976452e-1, 0.794747212e-3, & @@ -1794,14 +1794,14 @@ real function dtesatw(t) end function dtesatw real function dtqsatw(t,p) - real t ! temperature (K) - real p ! pressure (Pa) + real t ! temperature (K) + real p ! pressure (Pa) ! real dtesatw dtqsatw = 100.0*0.622*dtesatw(t)/p end function dtqsatw real function dtesati(t) - real t ! temperature (K) + real t ! temperature (K) real a0,a1,a2,a3,a4,a5,a6,a7,a8 data a0,a1,a2,a3,a4,a5,a6,a7,a8 / & 0.503223089, 0.377174432e-1, 0.126710138e-2, & @@ -1822,8 +1822,8 @@ end function dtesati real function dtqsati(t,p) - real t ! temperature (K) - real p ! pressure (Pa) + real t ! temperature (K) + real p ! pressure (Pa) ! real dtesati dtqsati = 100.0*0.622*dtesati(t)/p end function dtqsati diff --git a/physics/get_prs_fv3.F90 b/physics/get_prs_fv3.F90 index 224c8c8538..b55ad1abe2 100644 --- a/physics/get_prs_fv3.F90 +++ b/physics/get_prs_fv3.F90 @@ -24,12 +24,12 @@ subroutine get_prs_fv3_run(ix, levs, phii, prsi, tgrs, qgrs1, del, del_gz, errms ! Interface variables integer, intent(in) :: ix, levs - real(kind=kind_phys), dimension(ix,levs+1), intent(in) :: phii - real(kind=kind_phys), dimension(ix,levs+1), intent(in) :: prsi - real(kind=kind_phys), dimension(ix,levs), intent(in) :: tgrs - real(kind=kind_phys), dimension(ix,levs), intent(in) :: qgrs1 - real(kind=kind_phys), dimension(ix,levs), intent(out) :: del - real(kind=kind_phys), dimension(ix,levs+1), intent(out) :: del_gz + real(kind=kind_phys), dimension(:,:), intent(in) :: phii + real(kind=kind_phys), dimension(:,:), intent(in) :: prsi + real(kind=kind_phys), dimension(:,:), intent(in) :: tgrs + real(kind=kind_phys), dimension(:,:), intent(in) :: qgrs1 + real(kind=kind_phys), dimension(:,:), intent(out) :: del + real(kind=kind_phys), dimension(:,:), intent(out) :: del_gz character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg @@ -85,11 +85,11 @@ subroutine get_phi_fv3_run(ix, levs, gt0, gq01, del_gz, phii, phil, errmsg, errf ! Interface variables integer, intent(in) :: ix, levs - real(kind=kind_phys), dimension(ix,levs), intent(in) :: gt0 - real(kind=kind_phys), dimension(ix,levs), intent(in) :: gq01 - real(kind=kind_phys), dimension(ix,levs+1), intent(inout) :: del_gz - real(kind=kind_phys), dimension(ix,levs+1), intent(out) :: phii - real(kind=kind_phys), dimension(ix,levs), intent(out) :: phil + real(kind=kind_phys), dimension(:,:), intent(in) :: gt0 + real(kind=kind_phys), dimension(:,:), intent(in) :: gq01 + real(kind=kind_phys), dimension(:,:), intent(inout) :: del_gz + real(kind=kind_phys), dimension(:,:), intent(out) :: phii + real(kind=kind_phys), dimension(:,:), intent(out) :: phil character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg diff --git a/physics/gfdl_cloud_microphys.F90 b/physics/gfdl_cloud_microphys.F90 index c41323ad53..9574fe59ea 100644 --- a/physics/gfdl_cloud_microphys.F90 +++ b/physics/gfdl_cloud_microphys.F90 @@ -135,29 +135,29 @@ subroutine gfdl_cloud_microphys_run( & ! interface variables integer, intent(in ) :: levs, im real(kind=kind_phys), intent(in ) :: con_g, con_fvirt, con_rd, con_eps - real(kind=kind_phys), intent(in ), dimension(1:im) :: frland, garea - integer, intent(in ), dimension(1:im) :: islmsk - real(kind=kind_phys), intent(inout), dimension(1:im,1:levs) :: gq0, gq0_ntcw, gq0_ntrw, gq0_ntiw, & + real(kind=kind_phys), intent(in ), dimension(:) :: frland, garea + integer, intent(in ), dimension(:) :: islmsk + real(kind=kind_phys), intent(inout), dimension(:,:) :: gq0, gq0_ntcw, gq0_ntrw, gq0_ntiw, & gq0_ntsw, gq0_ntgl, gq0_ntclamt - real(kind=kind_phys), intent(inout), dimension(1:im,1:levs) :: gt0, gu0, gv0 - real(kind=kind_phys), intent(in ), dimension(1:im,1:levs) :: vvl, prsl, del - real(kind=kind_phys), intent(in ), dimension(1:im,1:levs+1) :: phii + real(kind=kind_phys), intent(inout), dimension(:,:) :: gt0, gu0, gv0 + real(kind=kind_phys), intent(in ), dimension(:,:) :: vvl, prsl, del + real(kind=kind_phys), intent(in ), dimension(:,:) :: phii ! rain/snow/ice/graupel/precip amounts, fraction of frozen precip - real(kind_phys), intent(out ), dimension(1:im) :: rain0 - real(kind_phys), intent(out ), dimension(1:im) :: snow0 - real(kind_phys), intent(out ), dimension(1:im) :: ice0 - real(kind_phys), intent(out ), dimension(1:im) :: graupel0 - real(kind_phys), intent(out ), dimension(1:im) :: prcp0 - real(kind_phys), intent(out ), dimension(1:im) :: sr + real(kind_phys), intent(out ), dimension(:) :: rain0 + real(kind_phys), intent(out ), dimension(:) :: snow0 + real(kind_phys), intent(out ), dimension(:) :: ice0 + real(kind_phys), intent(out ), dimension(:) :: graupel0 + real(kind_phys), intent(out ), dimension(:) :: prcp0 + real(kind_phys), intent(out ), dimension(:) :: sr real(kind_phys), intent(in) :: dtp ! physics time step logical, intent (in) :: hydrostatic, phys_hydrostatic logical, intent (in) :: lradar - real(kind=kind_phys), intent(inout), dimension(1:im,1:levs) :: refl_10cm + real(kind=kind_phys), intent(inout), dimension(:,:) :: refl_10cm logical, intent (in) :: reset, effr_in - real(kind=kind_phys), intent(inout), dimension(1:im,1:levs) :: rew, rei, rer, res, reg + real(kind=kind_phys), intent(inout), dimension(:,:) :: rew, rei, rer, res, reg character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg diff --git a/physics/gfdl_sfc_layer.F90 b/physics/gfdl_sfc_layer.F90 index 73c1725461..f9fc949a4e 100644 --- a/physics/gfdl_sfc_layer.F90 +++ b/physics/gfdl_sfc_layer.F90 @@ -130,16 +130,16 @@ subroutine gfdl_sfc_layer_run (im, nsoil, km, xlat, xlon, flag_iter, lsm, & logical, intent(in) :: cplwav, cplwav2atm !GJF: this scheme has not been tested with these on logical, intent(in) :: lcurr_sf !GJF: this scheme has not been tested with this option turned on; the variables scurx and scury need to be input in order to use this logical, intent(in) :: pert_Cd !GJF: this scheme has not been tested with this option turned on; the variables ens_random_seed and ens_Cdamp need to be input in order to use this - logical, dimension(im), intent(in) :: flag_iter, wet, dry, icy - integer, dimension(im), intent(in) :: isltyp, vegtype - real(kind=kind_phys), intent(in) :: dt, sfenth - real(kind=kind_phys), intent(in) :: rd,grav,ep1,ep2 - real(kind=kind_phys), dimension(im,nsoil), intent(in) :: smois - real(kind=kind_phys), dimension(im), intent(in) :: psfc, prsl1, & + logical, dimension(:), intent(in) :: flag_iter, wet, dry, icy + integer, dimension(:), intent(in) :: isltyp, vegtype + real(kind=kind_phys), intent(in) :: dt, sfenth + real(kind=kind_phys), intent(in) :: rd,grav,ep1,ep2 + real(kind=kind_phys), dimension(:,:), intent(in) :: smois + real(kind=kind_phys), dimension(:), intent(in) :: psfc, prsl1, & q1, t1, u1, v1, wspd, u10, v10, gsw, glw, z1, shdmax, sigmaf, xlat, & xlon, tsurf_wat, tsurf_lnd, tsurf_ice - real(kind=kind_phys), intent(inout), dimension(im) :: tskin_wat, & + real(kind=kind_phys), intent(inout), dimension(:) :: tskin_wat, & tskin_lnd, tskin_ice, ustar_wat, ustar_lnd, ustar_ice, & znt_wat, znt_lnd, znt_ice, cdm_wat, cdm_lnd, cdm_ice, & stress_wat, stress_lnd, stress_ice, rib_wat, rib_lnd, rib_ice, & @@ -373,10 +373,10 @@ subroutine gfdl_sfc_layer_run (im, nsoil, km, xlat, xlon, flag_iter, lsm, & ztmax(i) = ztmax(i)*100.0 !convert from m to cm z0max(i) = z0max(i)*100.0 !convert from m to cm - call mflux2 (fxh(i), fxe(i), fxmx(i), fxmy(i), cdm_lnd(i), rib_lnd(i), & + call mflux2 (fxh(i), fxe(i), fxmx(i), fxmy(i), cdm_lnd(i:i), rib_lnd(i:i), & xxfh(i), ztmax(i), z0max(i), tstrc(i), & pspc(i), pkmax(i), wetc(i), slwdc(i), z1_cm(i), icoef_sf, iwavecpl, lcurr_sf, charn(i), msang(i), & - scurx(i), scury(i), pert_Cd, ens_random_seed, ens_Cdamp, upc(i), vpc(i), t1(i), q1(i), & + scurx(i), scury(i), pert_Cd, ens_random_seed, ens_Cdamp, upc(i), vpc(i), t1(i:i), q1(i:i), & dt, wind10(i), xxfh2(i), ntsflg, sfenth, tzot(i), ep2, errmsg, & errflg) if (errflg /= 0) return @@ -522,10 +522,10 @@ subroutine gfdl_sfc_layer_run (im, nsoil, km, xlat, xlon, flag_iter, lsm, & ztmax(i) = ztmax(i)*100.0 !m to cm z0max(i) = z0max(i)*100.0 !m to cm - call mflux2 (fxh(i), fxe(i), fxmx(i), fxmy(i), cdm_ice(i), rib_ice(i), & + call mflux2 (fxh(i), fxe(i), fxmx(i), fxmy(i), cdm_ice(i:i), rib_ice(i:i), & xxfh(i), ztmax(i), z0max(i), tstrc(i), & pspc(i), pkmax(i), wetc(i), slwdc(i), z1_cm(i), icoef_sf, iwavecpl, lcurr_sf, charn(i), msang(i), & - scurx(i), scury(i), pert_Cd, ens_random_seed, ens_Cdamp, upc(i), vpc(i), t1(i), q1(i), & + scurx(i), scury(i), pert_Cd, ens_random_seed, ens_Cdamp, upc(i), vpc(i), t1(i:i), q1(i:i), & dt, wind10(i), xxfh2(i), ntsflg, sfenth, tzot(i), ep2, errmsg, & errflg) if (errflg /= 0) return @@ -629,10 +629,10 @@ subroutine gfdl_sfc_layer_run (im, nsoil, km, xlat, xlon, flag_iter, lsm, & !GJF: mflux2 expects negative roughness length for ocean points znt_wat(i) = -znt_wat(i) - call mflux2 (fxh(i), fxe(i), fxmx(i), fxmy(i), cdm_wat(i), rib_wat(i), & - xxfh(i), znt_wat(i), mznt(i), tstrc(i), & + call mflux2 (fxh(i), fxe(i), fxmx(i), fxmy(i), cdm_wat(i:i), rib_wat(i:i), & + xxfh(i), znt_wat(i:i), mznt(i), tstrc(i), & pspc(i), pkmax(i), wetc(i), slwdc(i), z1_cm(i), icoef_sf, iwavecpl, lcurr_sf, charn(i), msang(i), & - scurx(i), scury(i), pert_Cd, ens_random_seed, ens_Cdamp, upc(i), vpc(i), t1(i), q1(i), & + scurx(i), scury(i), pert_Cd, ens_random_seed, ens_Cdamp, upc(i), vpc(i), t1(i:i), q1(i:i), & dt, wind10(i), xxfh2(i), ntsflg, sfenth, tzot(i), ep2, errmsg, & errflg) if (errflg /= 0) return diff --git a/physics/gscond.f b/physics/gscond.f index 28f24763c9..6466d989d0 100644 --- a/physics/gscond.f +++ b/physics/gscond.f @@ -10,14 +10,14 @@ module zhaocarr_gscond ! \brief Brief description of the subroutine ! -!> \section arg_table_gscond_init Argument Table +!> \section arg_table_zhaocarr_gscond_init Argument Table !! subroutine zhaocarr_gscond_init end subroutine zhaocarr_gscond_init ! \brief Brief description of the subroutine ! -!> \section arg_table_gscond_finalize Argument Table +!> \section arg_table_zhaocarr_gscond_finalize Argument Table !! subroutine zhaocarr_gscond_finalize end subroutine zhaocarr_gscond_finalize @@ -73,14 +73,14 @@ subroutine zhaocarr_gscond_run (im,km,dt,dtf,prsl,ps,q,clw1 & ! Interface variables integer, intent(in) :: im, km, ipr real(kind=kind_phys), intent(in) :: dt, dtf - real(kind=kind_phys), intent(in) :: prsl(im,km), ps(im) - real(kind=kind_phys), intent(inout) :: q(im,km) - real(kind=kind_phys), intent(in) :: clw1(im,km), clw2(im,km) - real(kind=kind_phys), intent(out) :: cwm(im,km) - real(kind=kind_phys), intent(inout) :: t(im,km) & - &, tp(im,km), qp(im,km), psp(im) & - &, tp1(im,km), qp1(im,km), psp1(im) - real(kind=kind_phys), intent(in) :: u(im,km) + real(kind=kind_phys), intent(in) :: prsl(:,:), ps(:) + real(kind=kind_phys), intent(inout) :: q(:,:) + real(kind=kind_phys), intent(in) :: clw1(:,:), clw2(:,:) + real(kind=kind_phys), intent(out) :: cwm(:,:) + real(kind=kind_phys), intent(inout) :: t(:,:) & + &, tp(:,:), qp(:,:), psp(:) & + &, tp1(:,:), qp1(:,:), psp1(:) + real(kind=kind_phys), intent(in) :: u(:,:) logical, intent(in) :: lprnt ! character(len=*), intent(out) :: errmsg diff --git a/physics/gscond.meta b/physics/gscond.meta index 75b2d3a89d..d8eb2f01ed 100644 --- a/physics/gscond.meta +++ b/physics/gscond.meta @@ -3,6 +3,16 @@ type = scheme dependencies = funcphys.f90,machine.F,physcons.F90 +######################################################################## +[ccpp-arg-table] + name = zhaocarr_gscond_init + type = scheme + +######################################################################## +[ccpp-arg-table] + name = zhaocarr_gscond_finalize + type = scheme + ######################################################################## [ccpp-arg-table] name = zhaocarr_gscond_run diff --git a/physics/gwdc.f b/physics/gwdc.f index fc81373ce0..acb43b519f 100644 --- a/physics/gwdc.f +++ b/physics/gwdc.f @@ -26,7 +26,7 @@ subroutine gwdc_pre_run ( & integer, intent(in) :: im, levs integer, intent(in) :: kbot(:), ktop(:) real(kind=kind_phys), intent(in) :: dtp - real(kind=kind_phys), intent(in) :: cgwf(2) + real(kind=kind_phys), intent(in) :: cgwf(:) real(kind=kind_phys), intent(in) :: dx(:), work1(:), work2(:) real(kind=kind_phys), intent(in) :: & & gt0(:,:), gt0_init(:,:), del(:,:) @@ -163,7 +163,6 @@ subroutine gwdc_run (im,km,lat,u1,v1,t1,q1,deltim, & USE MACHINE , ONLY : kind_phys implicit none -! DH* TODO - add intent information for all variables !---------------------------- Arguments -------------------------------- ! ! Input variables @@ -188,15 +187,15 @@ subroutine gwdc_run (im,km,lat,u1,v1,t1,q1,deltim, & !----------------------------------------------------------------------- integer, intent(in) :: im, km, lat, ipr - integer, intent(in) :: ktop(im),kbot(im),kcnv(im) + integer, intent(in) :: ktop(:),kbot(:),kcnv(:) real(kind=kind_phys), intent(in) :: grav,cp,rd,fv,fhour,deltim,pi - real(kind=kind_phys), dimension(im), intent(in) :: qmax - real(kind=kind_phys), dimension(im), intent(out) :: tauctx,taucty - real(kind=kind_phys), dimension(im), intent(in) :: cldf,dlength - real(kind=kind_phys), dimension(im,km), intent(in) :: u1,v1,t1, & + real(kind=kind_phys), dimension(:), intent(in) :: qmax + real(kind=kind_phys), dimension(:), intent(out) :: tauctx,taucty + real(kind=kind_phys), dimension(:), intent(in) :: cldf,dlength + real(kind=kind_phys), dimension(:,:), intent(in) :: u1,v1,t1, & & q1,pmid1,dpmid1 - real(kind=kind_phys), dimension(im,km), intent(out) :: utgwc,vtgwc - real(kind=kind_phys), dimension(im,km+1), intent(in) :: pint1 + real(kind=kind_phys), dimension(:,:), intent(out) :: utgwc,vtgwc + real(kind=kind_phys), dimension(:,:), intent(in) :: pint1 ! logical, intent(in) :: lprnt ! diff --git a/physics/gwdps.f b/physics/gwdps.f index c6d9ab584a..285bdf67c4 100644 --- a/physics/gwdps.f +++ b/physics/gwdps.f @@ -296,23 +296,23 @@ subroutine gwdps_run( & ! ! Interface variables integer, intent(in) :: im, km, imx, kdt, ipr, me - integer, intent(in) :: KPBL(IM) ! Index for the PBL top layer! + integer, intent(in) :: KPBL(:) ! Index for the PBL top layer! real(kind=kind_phys), intent(in) :: & - & deltim, G, CP, RD, RV, cdmbgwd(4) + & deltim, G, CP, RD, RV, cdmbgwd(:) real(kind=kind_phys), intent(inout) :: & - & A(IM,KM), B(IM,KM), C(IM,KM) + & A(:,:), B(:,:), C(:,:) real(kind=kind_phys), intent(in) :: & - & U1(IM,KM), V1(IM,KM), T1(IM,KM), & - & Q1(IM,KM), PRSI(IM,KM+1), DEL(IM,KM), & - & PRSL(IM,KM), PRSLK(IM,KM), PHIL(IM,KM), & - & PHII(IM,KM+1) + & U1(:,:), V1(:,:), T1(:,:), & + & Q1(:,:), PRSI(:,:), DEL(:,:), & + & PRSL(:,:), PRSLK(:,:), PHIL(:,:), & + & PHII(:,:) real(kind=kind_phys), intent(in) :: & - & OC(IM), OA4(IM,4), CLX4(IM,4), HPRIME(IM) - real(kind=kind_phys), intent(inout) :: ELVMAX(IM) + & OC(:), OA4(:,:), CLX4(:,:), HPRIME(:) + real(kind=kind_phys), intent(inout) :: ELVMAX(:) real(kind=kind_phys), intent(in) :: & - & THETA(IM), SIGMA(IM), GAMMA(IM) - real(kind=kind_phys), intent(out) :: DUSFC(IM), DVSFC(IM), & - & RDXZB(IM) + & THETA(:), SIGMA(:), GAMMA(:) + real(kind=kind_phys), intent(out) :: DUSFC(:), DVSFC(:), & + & RDXZB(:) integer, intent(in) :: nmtvr logical, intent(in) :: lprnt character(len=*), intent(out) :: errmsg @@ -1310,4 +1310,4 @@ end subroutine gwdps_run subroutine gwdps_finalize() end subroutine gwdps_finalize - end module gwdps + end module gwdps \ No newline at end of file diff --git a/physics/h2o_def.meta b/physics/h2o_def.meta index 94ec7be2c1..524828ba4b 100644 --- a/physics/h2o_def.meta +++ b/physics/h2o_def.meta @@ -26,4 +26,3 @@ dimensions = (vertical_dimension_of_h2o_forcing_data) type = real kind = kind_phys - active = (flag_for_stratospheric_water_vapor_physics) diff --git a/physics/h2ophys.f b/physics/h2ophys.f index 8222638ae8..502ef97961 100644 --- a/physics/h2ophys.f +++ b/physics/h2ophys.f @@ -37,10 +37,10 @@ subroutine h2ophys_run(im, levs, kh2o, dt, h2o, ph2o, prsl, & ! interface variables integer, intent(in) :: im, levs, kh2o, h2o_coeff, me real(kind=kind_phys), intent(in) :: dt - real(kind=kind_phys), intent(inout) :: h2o(im,levs) - real(kind=kind_phys), intent(in) :: ph2o(kh2o) - real(kind=kind_phys), intent(in) :: prsl(im,levs) - real(kind=kind_phys), intent(in) :: h2opltc(im,kh2o,h2o_coeff) + real(kind=kind_phys), intent(inout) :: h2o(:,:) + real(kind=kind_phys), intent(in) :: ph2o(:) + real(kind=kind_phys), intent(in) :: prsl(:,:) + real(kind=kind_phys), intent(in) :: h2opltc(:,:,:) logical , intent(in) :: ldiag3d !real(kind=kind_phys), intent(inout) :: h2op(im,levs,h2o_coeff) character(len=*), intent(out) :: errmsg diff --git a/physics/m_micro.F90 b/physics/m_micro.F90 index 8e6d6698ef..7624d7e3e0 100644 --- a/physics/m_micro.F90 +++ b/physics/m_micro.F90 @@ -38,7 +38,7 @@ subroutine m_micro_init(imp_physics, imp_physics_mg, fprcp, gravit, rair, rh2o, mg_do_graupel, mg_nccons, mg_nicons, mg_ngcons, & mg_do_ice_gmao, mg_do_liq_liu real(kind=kind_phys), intent(in) :: gravit, rair, rh2o, cpair, eps, tmelt, latvap, latice - real(kind=kind_phys), intent(in) :: mg_dcs, mg_qcvar, mg_ts_auto_ice(2), mg_rhmini, & + real(kind=kind_phys), intent(in) :: mg_dcs, mg_qcvar, mg_ts_auto_ice(:), mg_rhmini, & mg_berg_eff_factor, mg_ncnst, mg_ninst, mg_ngnst character(len=16), intent(in) :: mg_precip_frac_method character(len=*), intent(out) :: errmsg @@ -175,13 +175,12 @@ subroutine m_micro_run( im, lm, flipv, dt_i & integer, parameter :: ncolmicro = 1 integer,intent(in) :: im, lm, kdt, fprcp, pdfflag, iccn logical,intent(in) :: flipv, skip_macro - real (kind=kind_phys), intent(in):: dt_i, alf_fac, qc_min(2) + real (kind=kind_phys), intent(in):: dt_i, alf_fac, qc_min(:) - real (kind=kind_phys), dimension(im,lm),intent(in) :: & + real (kind=kind_phys), dimension(:,:),intent(in) :: & & prsl_i,u_i,v_i,phil, omega_i, QLLS_i,QILS_i, & & lwheat_i,swheat_i - real (kind=kind_phys), dimension(im,0:lm),intent(in):: prsi_i, & - & phii + real (kind=kind_phys), dimension(:,:),intent(in):: prsi_i, phii ! GJF* These variables are conditionally allocated depending on whether the ! Morrison-Gettelman microphysics is used, so they must be declared ! using assumed shape. @@ -190,26 +189,26 @@ subroutine m_micro_run( im, lm, flipv, dt_i & & CNV_MFD_i, cf_upi, CNV_FICE_i, CNV_NDROP_i, & & CNV_NICE_i, w_upi ! *GJF - real (kind=kind_phys), dimension(im,lm),intent(in) :: & + real (kind=kind_phys), dimension(:,:),intent(in) :: & & rhc_i, naai_i, npccn_i - real (kind=kind_phys), dimension(im,lm,ntrcaer),intent(in) :: & + real (kind=kind_phys), dimension(:,:,:),intent(in) :: & & aerfld_i - real (kind=kind_phys),dimension(im),intent(in):: TAUGWX, & + real (kind=kind_phys),dimension(:),intent(in):: TAUGWX, & & TAUGWY, TAUOROX, TAUOROY, FRLAND,ZPBL,xlat,xlon ! & TAUGWY, TAUX, TAUY, TAUOROX, TAUOROY,ps_i,FRLAND,ZPBL ! & CNVPRCP ! output - real (kind=kind_phys),dimension(im,lm), intent(out) :: lwm_o, qi_o, & + real (kind=kind_phys),dimension(:,:), intent(out) :: lwm_o, qi_o, & cldreffl, cldreffi, cldreffr, cldreffs, cldreffg - real (kind=kind_phys),dimension(im), intent(out) :: rn_o, sr_o + real (kind=kind_phys),dimension(:), intent(out) :: rn_o, sr_o character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg ! input and output ! Anning Cheng 10/24/2016 twat for total water, diagnostic purpose - integer, dimension(IM), intent(inout):: KCBL - real (kind=kind_phys),dimension(im,lm),intent(inout):: q_io, t_io, & + integer, dimension(:), intent(inout):: KCBL + real (kind=kind_phys),dimension(:,:),intent(inout):: q_io, t_io, & & ncpl_io,ncpi_io,CLLS_io ! GJF* These variables are conditionally allocated depending on whether the ! Morrison-Gettelman microphysics is used, so they must be declared @@ -443,7 +442,7 @@ subroutine m_micro_run( im, lm, flipv, dt_i & END DO END DO DO K=0, LM - ll = lm-k + ll = lm-k+1 DO I = 1,IM PLE(i,k) = prsi_i(i,ll) * 0.01_kp ! interface pressure in hPa zet(i,k+1) = phii(i,ll) * onebg diff --git a/physics/m_micro_interstitial.F90 b/physics/m_micro_interstitial.F90 index 55b2bbe938..8d0132cf1c 100644 --- a/physics/m_micro_interstitial.F90 +++ b/physics/m_micro_interstitial.F90 @@ -169,22 +169,22 @@ subroutine m_micro_post_run( & integer, intent(in) :: im, levs, fprcp logical, intent(in) :: mg3_as_mg2 - real(kind=kind_phys), intent(in ) :: ncpr(1:im,1:levs) - real(kind=kind_phys), intent(in ) :: ncps(1:im,1:levs) - real(kind=kind_phys), intent(in ) :: ncgl(1:im,1:levs) - real(kind=kind_phys), intent(inout) :: qrn(1:im,1:levs) - real(kind=kind_phys), intent(inout) :: qsnw(1:im,1:levs) - real(kind=kind_phys), intent(inout) :: qgl(1:im,1:levs) - real(kind=kind_phys), intent(inout) :: gq0_ice(1:im,1:levs) - real(kind=kind_phys), intent(inout) :: gq0_rain(1:im,1:levs) - real(kind=kind_phys), intent(inout) :: gq0_snow(1:im,1:levs) - real(kind=kind_phys), intent(inout) :: gq0_graupel(1:im,1:levs) - real(kind=kind_phys), intent(inout) :: gq0_rain_nc(1:im,1:levs) - real(kind=kind_phys), intent(inout) :: gq0_snow_nc(1:im,1:levs) - real(kind=kind_phys), intent(inout) :: gq0_graupel_nc(1:im,1:levs) - real(kind=kind_phys), intent( out) :: ice(1:im) - real(kind=kind_phys), intent( out) :: snow(1:im) - real(kind=kind_phys), intent( out) :: graupel(1:im) + real(kind=kind_phys), intent(in ) :: ncpr(:,:) + real(kind=kind_phys), intent(in ) :: ncps(:,:) + real(kind=kind_phys), intent(in ) :: ncgl(:,:) + real(kind=kind_phys), intent(inout) :: qrn(:,:) + real(kind=kind_phys), intent(inout) :: qsnw(:,:) + real(kind=kind_phys), intent(inout) :: qgl(:,:) + real(kind=kind_phys), intent(in ) :: gq0_ice(:,:) + real(kind=kind_phys), intent(out ) :: gq0_rain(:,:) + real(kind=kind_phys), intent(out ) :: gq0_snow(:,:) + real(kind=kind_phys), intent(out ) :: gq0_graupel(:,:) + real(kind=kind_phys), intent(out ) :: gq0_rain_nc(:,:) + real(kind=kind_phys), intent(out ) :: gq0_snow_nc(:,:) + real(kind=kind_phys), intent(out ) :: gq0_graupel_nc(:,:) + real(kind=kind_phys), intent( out) :: ice(:) + real(kind=kind_phys), intent( out) :: snow(:) + real(kind=kind_phys), intent( out) :: graupel(:) real(kind=kind_phys), intent(in ) :: dtp character(len=*), intent(out) :: errmsg diff --git a/physics/m_micro_interstitial.meta b/physics/m_micro_interstitial.meta index 7961cb2db7..2cc3d3a9a7 100644 --- a/physics/m_micro_interstitial.meta +++ b/physics/m_micro_interstitial.meta @@ -392,7 +392,7 @@ dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys - intent = inout + intent = in optional = F [gq0_rain] standard_name = rain_water_mixing_ratio_updated_by_physics diff --git a/physics/maximum_hourly_diagnostics.F90 b/physics/maximum_hourly_diagnostics.F90 index 174e0c95c2..615c49bedd 100644 --- a/physics/maximum_hourly_diagnostics.F90 +++ b/physics/maximum_hourly_diagnostics.F90 @@ -37,23 +37,23 @@ subroutine maximum_hourly_diagnostics_run(im, levs, reset, lradar, imp_physics, logical, intent(in) :: reset, lradar integer, intent(in) :: imp_physics, imp_physics_gfdl, imp_physics_thompson, imp_physics_fer_hires real(kind_phys), intent(in ) :: con_g - real(kind_phys), intent(in ) :: phil(im,levs) - real(kind_phys), intent(in ) :: gt0(im,levs) - real(kind_phys), intent(in ) :: refl_10cm(im,levs) - real(kind_phys), intent(inout) :: refdmax(im) - real(kind_phys), intent(inout) :: refdmax263k(im) - real(kind_phys), intent(in ) :: u10m(im) - real(kind_phys), intent(in ) :: v10m(im) - real(kind_phys), intent(inout) :: u10max(im) - real(kind_phys), intent(inout) :: v10max(im) - real(kind_phys), intent(inout) :: spd10max(im) - real(kind_phys), intent(in ) :: pgr(im) - real(kind_phys), intent(in ) :: t2m(im) - real(kind_phys), intent(in ) :: q2m(im) - real(kind_phys), intent(inout) :: t02max(im) - real(kind_phys), intent(inout) :: t02min(im) - real(kind_phys), intent(inout) :: rh02max(im) - real(kind_phys), intent(inout) :: rh02min(im) + real(kind_phys), intent(in ) :: phil(:,:) + real(kind_phys), intent(in ) :: gt0(:,:) + real(kind_phys), intent(in ) :: refl_10cm(:,:) + real(kind_phys), intent(inout) :: refdmax(:) + real(kind_phys), intent(inout) :: refdmax263k(:) + real(kind_phys), intent(in ) :: u10m(:) + real(kind_phys), intent(in ) :: v10m(:) + real(kind_phys), intent(inout) :: u10max(:) + real(kind_phys), intent(inout) :: v10max(:) + real(kind_phys), intent(inout) :: spd10max(:) + real(kind_phys), intent(in ) :: pgr(:) + real(kind_phys), intent(in ) :: t2m(:) + real(kind_phys), intent(in ) :: q2m(:) + real(kind_phys), intent(inout) :: t02max(:) + real(kind_phys), intent(inout) :: t02min(:) + real(kind_phys), intent(inout) :: rh02max(:) + real(kind_phys), intent(inout) :: rh02min(:) character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg @@ -126,12 +126,12 @@ end subroutine maximum_hourly_diagnostics_run subroutine max_fields(phil,ref3D,grav,im,levs,refd,tk,refd263k) integer, intent(in) :: im,levs real (kind=kind_phys), intent(in) :: grav - real (kind=kind_phys), intent(in),dimension(im,levs) :: phil,ref3D,tk + real (kind=kind_phys), intent(in),dimension(:,:) :: phil,ref3D,tk integer :: i,k,ll,ipt,kpt real :: dbz1avg,zmidp1,zmidloc,refl,fact real, dimension(im,levs) :: z real, dimension(im) :: zintsfc - real, dimension(im), intent(inout) :: refd,refd263k + real, dimension(:), intent(inout) :: refd,refd263k REAL :: dbz1(2),dbzk,dbzk1 logical :: counter do i=1,im diff --git a/physics/module_MYJPBL_wrapper.F90 b/physics/module_MYJPBL_wrapper.F90 index 240dfdc3ca..e789ac035e 100644 --- a/physics/module_MYJPBL_wrapper.F90 +++ b/physics/module_MYJPBL_wrapper.F90 @@ -86,38 +86,38 @@ SUBROUTINE myjpbl_wrapper_run( & real(kind=kind_phys),intent(in) :: dt_phs, xkzm_m, xkzm_h, xkzm_s !MYJ-2D - real(kind=kind_phys),dimension(im),intent(in) :: & - & prsik_1, prslk_1, prslki, slmsk, garea, & + real(kind=kind_phys),dimension(:),intent(in) :: & + & prsik_1, prslk_1, prslki, slmsk, garea, & snowd, evap, hflx, cm, ch, wind, hprime1 - real(kind=kind_phys),dimension(im),intent(inout) :: & - & pblh, zorl, ustar, tsfc, qsfc - real(kind=kind_phys),dimension(im),intent(inout) :: & - & phy_myj_qsfc, phy_myj_thz0, phy_myj_qz0, & - & phy_myj_uz0, phy_myj_vz0, phy_myj_z0base, & - & phy_myj_akhs, phy_myj_akms, & - & phy_myj_chkqlm, phy_myj_elflx, & + real(kind=kind_phys),dimension(:),intent(inout) :: & + & zorl, ustar, tsfc, qsfc + real(kind=kind_phys),dimension(:),intent(inout) :: & + & phy_myj_qsfc, phy_myj_thz0, phy_myj_qz0, & + & phy_myj_uz0, phy_myj_vz0, phy_myj_z0base, & + & phy_myj_akhs, phy_myj_akms, & + & phy_myj_chkqlm, phy_myj_elflx, & & phy_myj_a1u, phy_myj_a1t, phy_myj_a1q - real(kind=kind_phys),dimension(im),intent(out) :: & - & dusfc,dvsfc,dtsfc,dqsfc,gamt,gamq - integer,dimension(im),intent(out) :: kpbl - integer,dimension(im),intent(in) :: kinver + real(kind=kind_phys),dimension(:),intent(out) :: & + & pblh,dusfc,dvsfc,dtsfc,dqsfc,gamt,gamq + integer,dimension(:),intent(out) :: kpbl + integer,dimension(:),intent(in) :: kinver !MYJ-3D - real(kind=kind_phys),dimension(im,levs+1),intent(in) :: & + real(kind=kind_phys),dimension(:,:),intent(in) :: & phii, prsi - real(kind=kind_phys),dimension(im,levs),intent(in) :: & + real(kind=kind_phys),dimension(:,:),intent(in) :: & & ugrs, vgrs, tgrs, prsl -! real(kind=kind_phys),dimension(im,levs),intent(inout) :: & +! real(kind=kind_phys),dimension(:,:),intent(inout) :: & ! dudt, dvdt, dtdt, dkt - real(kind=kind_phys),dimension(im,levs),intent(inout) :: & + real(kind=kind_phys),dimension(:,:),intent(inout) :: & dudt, dvdt, dtdt - real(kind=kind_phys),dimension(im,levs),intent(out) :: & + real(kind=kind_phys),dimension(:,:),intent(out) :: & dkt - real(kind=kind_phys),dimension(:,:),intent(inout) :: & + real(kind=kind_phys),dimension(:,:),intent(inout) :: & du3dt_PBL, dv3dt_PBL, dt3dt_PBL, dq3dt_PBL !MYJ-4D - real(kind=kind_phys),dimension(im,levs,ntrac),intent(inout) :: & + real(kind=kind_phys),dimension(:,:,:),intent(inout) :: & & qgrs,dqdt !LOCAL @@ -157,7 +157,6 @@ SUBROUTINE myjpbl_wrapper_run( & & ,rho,qfc1,gdx,xkzm_hx,xkzm_mx,tx1, tx2 ! real(kind=kind_phys), dimension(im,levs,ntrac) :: & ! & qgrs_myj - real(kind=kind_phys),dimension(im,levs) :: dkt2 ! Initialize CCPP error handling variables errmsg = '' @@ -553,12 +552,12 @@ SUBROUTINE myjpbl_wrapper_run( & ! end do end do - dkt2=0. + dkt=0. do k=1,levs k1=levs-k+1 do i=1,im -! dkt2(i,k)=max(xcofh(i,k1),xkzo(i,k)) - dkt2(i,k)=xcofh(i,k1) +! dkt(i,k)=max(xcofh(i,k1),xkzo(i,k)) + dkt(i,k)=xcofh(i,k1) end do end do if(ntke.gt.0)then @@ -662,7 +661,7 @@ SUBROUTINE myjpbl_wrapper_run( & q2(i,k) end do do k=1,levs - print*,'xcofh,el_myj,dkt2=',k,xcofh(i,k),el_myj(i,k),dkt2(i,k) + print*,'xcofh,el_myj,dkt=',k,xcofh(i,k),el_myj(i,k),dkt(i,k) end do end if @@ -805,9 +804,6 @@ SUBROUTINE myjpbl_wrapper_run( & ! print* ! endif - ! External dkt has dimensions (1:im,1:levs-1) - dkt(1:im,1:levs-1) = dkt2(1:im,1:levs-1) - END SUBROUTINE myjpbl_wrapper_run !###================================================================= diff --git a/physics/module_MYJPBL_wrapper.meta b/physics/module_MYJPBL_wrapper.meta index 877301cc47..d241c6f7e0 100644 --- a/physics/module_MYJPBL_wrapper.meta +++ b/physics/module_MYJPBL_wrapper.meta @@ -405,7 +405,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = inout + intent = in optional = F [ch] standard_name = surface_drag_coefficient_for_heat_and_moisture_in_air @@ -414,7 +414,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = inout + intent = in optional = F [wind] standard_name = wind_speed_at_lowest_model_layer @@ -443,19 +443,19 @@ kind = kind_phys intent = inout optional = F -[hflx] - standard_name = kinematic_surface_upward_sensible_heat_flux_reduced_by_surface_roughness - long_name = kinematic surface upward sensible heat flux - units = K m s-1 +[evap] + standard_name = kinematic_surface_upward_latent_heat_flux_reduced_by_surface_roughness + long_name = kinematic surface upward latent heat flux + units = kg kg-1 m s-1 dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in optional = F -[evap] - standard_name = kinematic_surface_upward_latent_heat_flux_reduced_by_surface_roughness - long_name = kinematic surface upward latent heat flux - units = kg kg-1 m s-1 +[hflx] + standard_name = kinematic_surface_upward_sensible_heat_flux_reduced_by_surface_roughness + long_name = kinematic surface upward sensible heat flux + units = K m s-1 dimensions = (horizontal_loop_extent) type = real kind = kind_phys @@ -576,7 +576,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = inout + intent = out optional = F [gamq] standard_name = countergradient_mixing_term_for_water_vapor @@ -585,7 +585,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = inout + intent = out optional = F [con_cp] standard_name = specific_heat_of_dry_air_at_constant_pressure diff --git a/physics/module_MYJSFC_wrapper.F90 b/physics/module_MYJSFC_wrapper.F90 index e3dcf41112..d908900c46 100644 --- a/physics/module_MYJSFC_wrapper.F90 +++ b/physics/module_MYJSFC_wrapper.F90 @@ -91,22 +91,22 @@ SUBROUTINE myjsfc_wrapper_run( & real(kind=kind_phys),intent(in) :: con_cp, con_g, con_rd !MYJ-2D - logical,dimension(im),intent(in) :: flag_iter - real(kind=kind_phys),dimension(im),intent(in) :: & + logical,dimension(:),intent(in) :: flag_iter + real(kind=kind_phys),dimension(:),intent(in) :: & & prsik_1, prslk_1, tsfc, qsfc, slmsk - real(kind=kind_phys),dimension(im),intent(inout) :: & + real(kind=kind_phys),dimension(:),intent(inout) :: & & phy_myj_qsfc, phy_myj_thz0, phy_myj_qz0, & & phy_myj_uz0, phy_myj_vz0, phy_myj_z0base, & & phy_myj_akhs, phy_myj_akms, & & phy_myj_chkqlm, phy_myj_elflx, & & phy_myj_a1u, phy_myj_a1t, phy_myj_a1q - real(kind=kind_phys),dimension(im),intent(inout) :: & + real(kind=kind_phys),dimension(:),intent(inout) :: & & pblh, zorl, ustar, rib - real(kind=kind_phys),dimension(im),intent(out) :: & + real(kind=kind_phys),dimension(:),intent(inout) :: & & cm, ch, stress, ffm, ffh, fm10, fh2 - real(kind=kind_phys), dimension(im), intent(inout) :: & + real(kind=kind_phys), dimension(:), intent(inout) :: & & landfrac, lakefrac, oceanfrac, fice - real(kind=kind_phys), dimension(im), intent(inout) :: & + real(kind=kind_phys), dimension(:), intent(inout) :: & & z0rl_wat, z0rl_lnd, z0rl_ice, & & ustar_wat, ustar_lnd, ustar_ice, & & cm_wat, cm_lnd, cm_ice, & @@ -121,12 +121,12 @@ SUBROUTINE myjsfc_wrapper_run( & !MYJ-3D - real(kind=kind_phys),dimension(im,levs+1),intent(in) :: & + real(kind=kind_phys),dimension(:,:),intent(in) :: & phii, prsi - real(kind=kind_phys),dimension(im,levs),intent(in) :: & + real(kind=kind_phys),dimension(:,:),intent(in) :: & & ugrs, vgrs, tgrs, prsl !MYJ-4D - real(kind=kind_phys),dimension(im,levs,ntrac),intent(in) :: & + real(kind=kind_phys),dimension(:,:,:),intent(in) :: & & qgrs !LOCAL diff --git a/physics/module_MYJSFC_wrapper.meta b/physics/module_MYJSFC_wrapper.meta index f048683a3b..f3ec33193e 100644 --- a/physics/module_MYJSFC_wrapper.meta +++ b/physics/module_MYJSFC_wrapper.meta @@ -208,7 +208,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = inout + intent = in optional = F [phy_myj_qsfc] standard_name = surface_specific_humidity_for_MYJ_schemes @@ -397,7 +397,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = out + intent = inout optional = F [ffm] standard_name = Monin_Obukhov_similarity_function_for_momentum @@ -748,7 +748,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = out + intent = inout optional = F [con_cp] standard_name = specific_heat_of_dry_air_at_constant_pressure diff --git a/physics/module_MYNNPBL_wrapper.F90 b/physics/module_MYNNPBL_wrapper.F90 index 4ea29b1f5f..837cf85946 100644 --- a/physics/module_MYNNPBL_wrapper.F90 +++ b/physics/module_MYNNPBL_wrapper.F90 @@ -10,6 +10,9 @@ MODULE mynnedmf_wrapper contains +!> \section arg_table_mynnedmf_wrapper_init Argument Table +!! \htmlinclude mynnedmf_wrapper_init.html +!! subroutine mynnedmf_wrapper_init (lheatstrg, errmsg, errflg) implicit none @@ -236,13 +239,13 @@ SUBROUTINE mynnedmf_wrapper_run( & REAL(kind=kind_phys) :: tem !MYNN-3D - real(kind=kind_phys), dimension(im,levs+1), intent(in) :: phii - real(kind=kind_phys), dimension(im,levs ), intent(inout) :: & + real(kind=kind_phys), dimension(:,:), intent(in) :: phii + real(kind=kind_phys), dimension(:,:), intent(inout) :: & & dtdt, dudt, dvdt, & & dqdt_water_vapor, dqdt_liquid_cloud, dqdt_ice_cloud, & & dqdt_cloud_droplet_num_conc, dqdt_ice_num_conc, & & dqdt_ozone, dqdt_water_aer_num_conc, dqdt_ice_aer_num_conc - real(kind=kind_phys), dimension(im,levs), intent(inout) :: & + real(kind=kind_phys), dimension(:,:), intent(inout) :: & & qke, qke_adv, EL_PBL, Sh3D, & & qc_bl, qi_bl, cldfra_bl !These 10 arrays are only allocated when bl_mynn_output > 0 @@ -250,7 +253,7 @@ SUBROUTINE mynnedmf_wrapper_run( & & edmf_a,edmf_w,edmf_qt, & & edmf_thl,edmf_ent,edmf_qc, & & sub_thl,sub_sqv,det_thl,det_sqv - real(kind=kind_phys), dimension(im,levs), intent(in) :: & + real(kind=kind_phys), dimension(:,:), intent(in) :: & & u,v,omega,t3d, & & exner,prsl, & & qgrs_water_vapor, & @@ -261,13 +264,13 @@ SUBROUTINE mynnedmf_wrapper_run( & & qgrs_ozone, & & qgrs_water_aer_num_conc, & & qgrs_ice_aer_num_conc - real(kind=kind_phys), dimension(im,levs), intent(out) :: & + real(kind=kind_phys), dimension(:,:), intent(out) :: & & Tsq, Qsq, Cov, exch_h, exch_m real(kind=kind_phys), dimension(:,:), intent(inout) :: & & du3dt_PBL, du3dt_OGWD, dv3dt_PBL, dv3dt_OGWD, & & do3dt_PBL, dq3dt_PBL, dt3dt_PBL - real(kind=kind_phys), dimension(im), intent(in) :: xmu - real(kind=kind_phys), dimension(im, levs), intent(in) :: htrsw, htrlw + real(kind=kind_phys), dimension(:), intent(in) :: xmu + real(kind=kind_phys), dimension(:,:), intent(in) :: htrsw, htrlw !LOCAL real(kind=kind_phys), dimension(im,levs) :: & & sqv,sqc,sqi,qnc,qni,ozone,qnwfa,qnifa, & @@ -286,31 +289,30 @@ SUBROUTINE mynnedmf_wrapper_run( & REAL(kind=kind_phys), DIMENSION( ndvel ) :: vd1 !MYNN-2D - real(kind=kind_phys), dimension(im), intent(in) :: & + real(kind=kind_phys), dimension(:), intent(in) :: & & dx,zorl,slmsk,tsurf,qsfc,ps, & & hflx,qflx,ust,wspd,rb,recmol - real(kind=kind_phys), dimension(im), intent(in) :: & + real(kind=kind_phys), dimension(:), intent(in) :: & & dusfc_cice,dvsfc_cice,dtsfc_cice,dqsfc_cice, & & stress_wat,hflx_wat,qflx_wat, & & oceanfrac,fice - logical, dimension(im), intent(in) :: & + logical, dimension(:), intent(in) :: & & wet, dry, icy - real(kind=kind_phys), dimension(im), intent(inout) :: & - & pblh - real(kind=kind_phys), dimension(im), intent(out) :: & + real(kind=kind_phys), dimension(:), intent(inout) :: & + & pblh,dusfc_diag,dvsfc_diag,dtsfc_diag,dqsfc_diag + real(kind=kind_phys), dimension(:), intent(out) :: & & ch,dtsfc1,dqsfc1,dusfc1,dvsfc1, & - & dtsfci_diag,dqsfci_diag,dtsfc_diag,dqsfc_diag, & - & dusfci_diag,dvsfci_diag,dusfc_diag,dvsfc_diag, & + & dtsfci_diag,dqsfci_diag,dusfci_diag,dvsfci_diag, & & maxMF - integer, dimension(im), intent(inout) :: & + integer, dimension(:), intent(inout) :: & & kpbl,nupdraft,ktop_plume - real(kind=kind_phys), dimension(:), intent(inout) :: & + real(kind=kind_phys), dimension(:), intent(inout) :: & & dusfc_cpl,dvsfc_cpl,dtsfc_cpl,dqsfc_cpl - real(kind=kind_phys), dimension(:), intent(inout) :: & + real(kind=kind_phys), dimension(:), intent(inout) :: & & dusfci_cpl,dvsfci_cpl,dtsfci_cpl,dqsfci_cpl !LOCAL diff --git a/physics/module_MYNNSFC_wrapper.F90 b/physics/module_MYNNSFC_wrapper.F90 index f42bf46f39..2de8cd4080 100644 --- a/physics/module_MYNNSFC_wrapper.F90 +++ b/physics/module_MYNNSFC_wrapper.F90 @@ -130,41 +130,33 @@ SUBROUTINE mynnsfc_wrapper_run( & & iz0tlnd = 0, & !control: 0 & isfflx = 1 + integer, intent(in) :: im, levs + integer, intent(in) :: iter, itimestep, lsm, lsm_ruc + logical, intent(in) :: flag_init,flag_restart,lprnt integer, intent(in) :: ivegsrc integer, intent(in) :: sfc_z0_type ! option for calculating surface roughness length over ocean logical, intent(in) :: redrag ! reduced drag coeff. flag for high wind over sea (j.han) + real(kind=kind_phys), intent(in) :: delt !Input data - integer, dimension(im), intent(in) :: vegtype - real(kind=kind_phys), dimension(im), intent(in) :: & + integer, dimension(:), intent(in) :: vegtype + real(kind=kind_phys), dimension(:), intent(in) :: & & sigmaf,shdmax,z0pert,ztpert -!MYNN-1D - REAL :: delt - INTEGER :: im, levs - INTEGER :: iter, k, i, itimestep, lsm, lsm_ruc - LOGICAL :: flag_init,flag_restart,lprnt - INTEGER :: IDS,IDE,JDS,JDE,KDS,KDE, & - & IMS,IME,JMS,JME,KMS,KME, & - & ITS,ITE,JTS,JTE,KTS,KTE - - real(kind=kind_phys), dimension(im,levs+1), & + real(kind=kind_phys), dimension(:,:), & & intent(in) :: phii - real(kind=kind_phys), dimension(im,levs), & + real(kind=kind_phys), dimension(:,:), & & intent(in) :: exner, PRSL, & & u, v, t3d, qvsh, qc - real(kind=kind_phys), dimension(im,levs) :: & - & pattern_spp_pbl, dz, th, qv - - logical, dimension(im), intent(in) :: wet, dry, icy + logical, dimension(:), intent(in) :: wet, dry, icy - real(kind=kind_phys), dimension(im), intent(in) :: & + real(kind=kind_phys), dimension(:), intent(in) :: & & tskin_wat, tskin_lnd, tskin_ice, & & tsurf_wat, tsurf_lnd, tsurf_ice, & & snowh_wat, snowh_lnd, snowh_ice - real(kind=kind_phys), dimension(im), intent(inout) :: & + real(kind=kind_phys), dimension(:), intent(inout) :: & & znt_wat, znt_lnd, znt_ice, & & ust_wat, ust_lnd, ust_ice, & & cm_wat, cm_lnd, cm_ice, & @@ -184,7 +176,7 @@ SUBROUTINE mynnsfc_wrapper_run( & & dx, pblh, slmsk, ps, & & qsfc_lnd_ruc, qsfc_ice_ruc - real(kind=kind_phys), dimension(im), intent(inout) :: & + real(kind=kind_phys), dimension(:), intent(inout) :: & & ustm, hflx, qflx, wspd, qsfc, & & FLHC, FLQC, U10, V10, TH2, T2, Q2, & & CHS2, CQS2, rmol, zol, mol, ch, & @@ -195,6 +187,15 @@ SUBROUTINE mynnsfc_wrapper_run( & & chs, ck, cd, mavail, xland, GZ1OZ0, & & cpm, qgh, qfx, qsfc_ruc + real(kind=kind_phys), dimension(im,levs) :: & + & pattern_spp_pbl, dz, th, qv + +!MYNN-1D + INTEGER :: k, i + INTEGER :: IDS,IDE,JDS,JDE,KDS,KDE, & + & IMS,IME,JMS,JME,KMS,KME, & + & ITS,ITE,JTS,JTE,KTS,KTE + ! Initialize CCPP error handling variables errmsg = '' errflg = 0 diff --git a/physics/module_SGSCloud_RadPost.F90 b/physics/module_SGSCloud_RadPost.F90 index bedb660a60..ea262596f5 100644 --- a/physics/module_SGSCloud_RadPost.F90 +++ b/physics/module_SGSCloud_RadPost.F90 @@ -34,8 +34,8 @@ subroutine sgscloud_radpost_run( & integer, intent(in) :: im, levs logical, intent(in) :: flag_init, flag_restart - real(kind=kind_phys), dimension(im,levs), intent(inout) :: qc, qi - real(kind=kind_phys), dimension(im,levs), intent(in) :: qc_save, qi_save + real(kind=kind_phys), dimension(:,:), intent(inout) :: qc, qi + real(kind=kind_phys), dimension(:,:), intent(in) :: qc_save, qi_save character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg ! Local variable diff --git a/physics/module_SGSCloud_RadPre.F90 b/physics/module_SGSCloud_RadPre.F90 index a315f9efa6..bea33c2b7a 100644 --- a/physics/module_SGSCloud_RadPre.F90 +++ b/physics/module_SGSCloud_RadPre.F90 @@ -11,9 +11,15 @@ module sgscloud_radpre contains +!> \section arg_table_sgscloud_radpre_init Argument Table +!! \htmlinclude sgscloud_radpre_init.html +!! subroutine sgscloud_radpre_init () end subroutine sgscloud_radpre_init +!> \section arg_table_sgscloud_radpre_finalize Argument Table +!! \htmlinclude sgscloud_radpre_finalize.html +!! subroutine sgscloud_radpre_finalize () end subroutine sgscloud_radpre_finalize @@ -67,20 +73,20 @@ subroutine sgscloud_radpre_run( & integer, intent(in) :: im, levs, imfdeepcnv, imfdeepcnv_gf, & & nlay, imp_physics, imp_physics_gfdl logical, intent(in) :: flag_init, flag_restart, do_mynnedmf - real(kind=kind_phys), dimension(im,levs), intent(inout) :: qc, qi - real(kind=kind_phys), dimension(im,levs), intent(inout) :: qr, qs, qg + real(kind=kind_phys), dimension(:,:), intent(inout) :: qc, qi + real(kind=kind_phys), dimension(:,:), intent(inout) :: qr, qs, qg ! qci_conv only allocated if GF is used real(kind=kind_phys), dimension(:,:), intent(inout) :: qci_conv - real(kind=kind_phys), dimension(im,levs), intent(in) :: T3D,delp, & + real(kind=kind_phys), dimension(:,:), intent(in) :: T3D,delp, & & qv,P3D - real(kind=kind_phys), dimension(im,levs), intent(inout) :: & + real(kind=kind_phys), dimension(:,:), intent(inout) :: & & clouds1,clouds2,clouds3,clouds4,clouds5 - real(kind=kind_phys), dimension(im,levs), intent(inout) :: qc_save, qi_save - real(kind=kind_phys), dimension(im,levs), intent(in) :: qc_bl, qi_bl, cldfra_bl - real(kind=kind_phys), dimension(im), intent(in) :: slmsk, xlat, de_lgth - real(kind=kind_phys), dimension(im,nlay), intent(in) :: plyr, dz - real(kind=kind_phys), dimension(im,5), intent(inout) :: cldsa - integer, dimension(im,3), intent(inout) :: mbota, mtopa + real(kind=kind_phys), dimension(:,:), intent(inout) :: qc_save, qi_save + real(kind=kind_phys), dimension(:,:), intent(in) :: qc_bl, qi_bl, cldfra_bl + real(kind=kind_phys), dimension(:), intent(in) :: slmsk, xlat, de_lgth + real(kind=kind_phys), dimension(:,:), intent(in) :: plyr, dz + real(kind=kind_phys), dimension(:,:), intent(inout) :: cldsa + integer, dimension(:,:), intent(inout) :: mbota, mtopa integer, intent(in) :: iovr character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg diff --git a/physics/module_SGSCloud_RadPre.meta b/physics/module_SGSCloud_RadPre.meta index e9a18df8b8..d454578c69 100644 --- a/physics/module_SGSCloud_RadPre.meta +++ b/physics/module_SGSCloud_RadPre.meta @@ -39,6 +39,14 @@ type = logical intent = in optional = F +[do_mynnedmf] + standard_name = do_mynnedmf + long_name = flag to activate MYNN-EDMF + units = flag + dimensions = () + type = logical + intent = in + optional = F [qc] standard_name = cloud_condensed_water_mixing_ratio long_name = ratio of mass of cloud water to mass of dry air plus vapor (without condensates) @@ -313,14 +321,6 @@ type = integer intent = inout optional = F -[do_mynnedmf] - standard_name = do_mynnedmf - long_name = flag to activate MYNN-EDMF - units = flag - dimensions = () - type = logical - intent = in - optional = F [imp_physics] standard_name = flag_for_microphysics_scheme long_name = choice of microphysics scheme diff --git a/physics/moninedmf.f b/physics/moninedmf.f index 1344eab56e..2abd2226cb 100644 --- a/physics/moninedmf.f +++ b/physics/moninedmf.f @@ -83,42 +83,42 @@ subroutine hedmf_run (im,km,ntrac,ntcw,dv,du,tau,rtg, & ! logical, intent(in) :: lprnt, hurr_pbl, lssav, ldiag3d, qdiag3d logical, intent(in) :: flag_for_pbl_generic_tend - integer, intent(in) :: ipr, islimsk(im) - integer, intent(in) :: im, km, ntrac, ntcw, kinver(im), ntoz - integer, intent(out) :: kpbl(im) + integer, intent(in) :: ipr, islimsk(:) + integer, intent(in) :: im, km, ntrac, ntcw, kinver(:), ntoz + integer, intent(out) :: kpbl(:) ! real(kind=kind_phys), intent(in) :: delt, xkzm_m, xkzm_h, xkzm_s real(kind=kind_phys), intent(in) :: xkzminv, moninq_fac, var_ric, & & coef_ric_l, coef_ric_s - real(kind=kind_phys), intent(inout) :: dv(im,km), du(im,km), & - & tau(im,km), rtg(im,km,ntrac) + real(kind=kind_phys), intent(inout) :: dv(:,:), du(:,:), & + & tau(:,:), rtg(:,:,:) ! Only allocated if ldiag3d or qdiag3d are true real(kind=kind_phys), intent(inout), dimension(:,:) :: & & du3dt_PBL,dv3dt_PBL,dt3dt_PBL,dq3dt_PBL,do3dt_PBL real(kind=kind_phys), intent(in) :: & - & u1(im,km), v1(im,km), & - & t1(im,km), q1(im,km,ntrac), & - & swh(im,km), hlw(im,km), & - & xmu(im), psk(im), & - & rbsoil(im), zorl(im), & - & u10m(im), v10m(im), & - & fm(im), fh(im), & - & tsea(im), & - & heat(im), evap(im), & - & stress(im), spd1(im) + & u1(:,:), v1(:,:), & + & t1(:,:), q1(:,:,:), & + & swh(:,:), hlw(:,:), & + & xmu(:), psk(:), & + & rbsoil(:), zorl(:), & + & u10m(:), v10m(:), & + & fm(:), fh(:), & + & tsea(:), & + & heat(:), evap(:), & + & stress(:), spd1(:) real(kind=kind_phys), intent(in) :: & - & prsi(im,km+1), del(im,km), & - & prsl(im,km), prslk(im,km), & - & phii(im,km+1), phil(im,km) + & prsi(:,:), del(:,:), & + & prsl(:,:), prslk(:,:), & + & phii(:,:), phil(:,:) real(kind=kind_phys), intent(out) :: & - & dusfc(im), dvsfc(im), & - & dtsfc(im), dqsfc(im), & - & hpbl(im) + & dusfc(:), dvsfc(:), & + & dtsfc(:), dqsfc(:), & + & hpbl(:) real(kind=kind_phys), intent(out) :: & - & dkt(im,km), dku(im,km) + & dkt(:,:), dku(:,:) real(kind=kind_phys), intent(inout) :: & - & hgamt(im), hgamq(im) + & hgamt(:), hgamq(:) ! logical, intent(in) :: dspheat ! flag for tke dissipative heating @@ -381,10 +381,14 @@ subroutine hedmf_run (im,km,ntrac,ntcw,dv,du,tau,rtg, & enddo enddo !> - Initialize diffusion coefficients to 0 and calculate the total radiative heating rate (dku, dkt, radx) - do k = 1,km1 + do k = 1,km do i = 1,im dku(i,k) = 0. dkt(i,k) = 0. + enddo + enddo + do k = 1,km1 + do i = 1,im dktx(i,k) = 0. cku(i,k) = 0. ckt(i,k) = 0. diff --git a/physics/moninshoc.f b/physics/moninshoc.f index 2c18887d9f..7fe652d1b3 100644 --- a/physics/moninshoc.f +++ b/physics/moninshoc.f @@ -45,33 +45,32 @@ subroutine moninshoc_run (im,km,ntrac,ntcw,ncnd,dv,du,tau,rtg, ! integer, intent(in) :: im, & km, ntrac, ntcw, ncnd, ntke, ntoz - integer, dimension(im), intent(in) :: kinver - + integer, dimension(:), intent(in) :: kinver real(kind=kind_phys), intent(in) :: delt, & xkzm_m, xkzm_h, xkzm_s, xkzminv real(kind=kind_phys), intent(in) :: grav, & rd, cp, hvap, fv - real(kind=kind_phys), dimension(im), intent(in) :: psk, + real(kind=kind_phys), dimension(:), intent(in) :: psk, & rbsoil, zorl, u10m, v10m, fm, fh, tsea, heat, evap, stress, spd1 - real(kind=kind_phys), dimension(im,km), intent(in) :: u1, v1, + real(kind=kind_phys), dimension(:,:), intent(in) :: u1, v1, & t1, tkh, del, prsl, phil, prslk - real(kind=kind_phys), dimension(im,km+1), intent(in) :: prsi, phii - real(kind=kind_phys), dimension(im,km,ntrac), intent(in) :: q1 + real(kind=kind_phys), dimension(:,:), intent(in) :: prsi, phii + real(kind=kind_phys), dimension(:,:,:), intent(in) :: q1 - real(kind=kind_phys), dimension(im,km), intent(inout) :: du, dv, + real(kind=kind_phys), dimension(:,:), intent(inout) :: du, dv, & tau - real(kind=kind_phys), dimension(im,km,ntrac), intent(inout) :: rtg + real(kind=kind_phys), dimension(:,:,:), intent(inout) :: rtg real(kind=kind_phys), dimension(:,:), intent(inout) :: & du3dt_PBL, dv3dt_PBL, dt3dt_PBL, dq3dt_PBL, do3dt_PBL logical, intent(in) :: ldiag3d, & qdiag3d, gen_tend - integer, dimension(im), intent(out) :: kpbl - real(kind=kind_phys), dimension(im), intent(out) :: dusfc, + integer, dimension(:), intent(out) :: kpbl + real(kind=kind_phys), dimension(:), intent(out) :: dusfc, & dvsfc, dtsfc, dqsfc, hpbl - real(kind=kind_phys), dimension(im,km), intent(out) :: prnum - real(kind=kind_phys), dimension(im,km), intent(out) :: dkt + real(kind=kind_phys), dimension(:,:), intent(out) :: prnum + real(kind=kind_phys), dimension(:,:), intent(out) :: dkt character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg @@ -121,6 +120,9 @@ subroutine moninshoc_run (im,km,ntrac,ntcw,ncnd,dv,du,tau,rtg, errmsg = '' errflg = 0 ! +! Set intent(out) variables + dkt = zero +! !----------------------------------------------------------------------- ! ! compute preliminary variables diff --git a/physics/mp_fer_hires.F90 b/physics/mp_fer_hires.F90 index d22f0a18b8..9bbda5ad0b 100644 --- a/physics/mp_fer_hires.F90 +++ b/physics/mp_fer_hires.F90 @@ -54,9 +54,9 @@ subroutine mp_fer_hires_init(ncol, nlev, dtp, imp_physics, & logical, intent(in) :: restart character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg - real(kind_phys), intent(out), optional :: f_ice(1:ncol,1:nlev) - real(kind_phys), intent(out), optional :: f_rain(1:ncol,1:nlev) - real(kind_phys), intent(out), optional :: f_rimef(1:ncol,1:nlev) + real(kind_phys), intent(out) :: f_ice(:,:) + real(kind_phys), intent(out) :: f_rain(:,:) + real(kind_phys), intent(out) :: f_rimef(:,:) ! Local variables @@ -152,27 +152,27 @@ SUBROUTINE mp_fer_hires_run(NCOL, NLEV, DT ,SPEC_ADV & logical, intent(in ) :: spec_adv integer, intent(in ) :: mpirank integer, intent(in ) :: mpiroot - real(kind_phys), intent(in ) :: slmsk(1:ncol) - real(kind_phys), intent(in ) :: prsi(1:ncol,1:nlev+1) - real(kind_phys), intent(in ) :: p_phy(1:ncol,1:nlev) + real(kind_phys), intent(in ) :: slmsk(:) + real(kind_phys), intent(in ) :: prsi(:,:) + real(kind_phys), intent(in ) :: p_phy(:,:) real(kind_phys), intent(in ) :: epsq,r_d,p608,cp,g - real(kind_phys), intent(inout) :: t(1:ncol,1:nlev) - real(kind_phys), intent(inout) :: q(1:ncol,1:nlev) - real(kind_phys), intent(inout) :: cwm(1:ncol,1:nlev) - real(kind_phys), intent(inout) :: train(1:ncol,1:nlev) - real(kind_phys), intent(out ) :: sr(1:ncol) - real(kind_phys), intent(inout) :: f_ice(1:ncol,1:nlev) - real(kind_phys), intent(inout) :: f_rain(1:ncol,1:nlev) - real(kind_phys), intent(inout) :: f_rimef(1:ncol,1:nlev) - real(kind_phys), intent(inout) :: qc(1:ncol,1:nlev) - real(kind_phys), intent(inout) :: qr(1:ncol,1:nlev) - real(kind_phys), intent(inout) :: qi(1:ncol,1:nlev) - real(kind_phys), intent(inout) :: qg(1:ncol,1:nlev) ! QRIMEF - - real(kind_phys), intent(inout) :: prec(1:ncol) - real(kind_phys), intent(inout) :: refl_10cm(1:ncol,1:nlev) + real(kind_phys), intent(inout) :: t(:,:) + real(kind_phys), intent(inout) :: q(:,:) + real(kind_phys), intent(inout) :: cwm(:,:) + real(kind_phys), intent(inout) :: train(:,:) + real(kind_phys), intent(out ) :: sr(:) + real(kind_phys), intent(out ) :: f_ice(:,:) + real(kind_phys), intent(out ) :: f_rain(:,:) + real(kind_phys), intent(out ) :: f_rimef(:,:) + real(kind_phys), intent(inout) :: qc(:,:) + real(kind_phys), intent(inout) :: qr(:,:) + real(kind_phys), intent(inout) :: qi(:,:) + real(kind_phys), intent(inout) :: qg(:,:) ! QRIMEF + + real(kind_phys), intent(inout) :: prec(:) + real(kind_phys), intent(inout) :: refl_10cm(:,:) real(kind_phys), intent(in ) :: rhgrd - real(kind_phys), intent(in ) :: dx(1:ncol) + real(kind_phys), intent(in ) :: dx(:) character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg ! diff --git a/physics/mp_fer_hires.meta b/physics/mp_fer_hires.meta index 1872b5614a..fa09f66db0 100644 --- a/physics/mp_fer_hires.meta +++ b/physics/mp_fer_hires.meta @@ -64,7 +64,7 @@ type = real kind = kind_phys intent = out - optional = T + optional = F [f_rain] standard_name = fraction_of_rain_water_cloud long_name = fraction of rain water cloud @@ -73,7 +73,7 @@ type = real kind = kind_phys intent = out - optional = T + optional = F [f_rimef] standard_name = rime_factor long_name = rime factor @@ -82,7 +82,7 @@ type = real kind = kind_phys intent = out - optional = T + optional = F [mpicomm] standard_name = mpi_comm long_name = MPI communicator @@ -153,6 +153,7 @@ type = integer intent = out optional = F + ######################################################################## [ccpp-arg-table] name = mp_fer_hires_run @@ -298,18 +299,18 @@ kind = kind_phys intent = inout optional = F -[qi] - standard_name = ice_water_mixing_ratio_updated_by_physics - long_name = ratio of mass of ice water to mass of dry air plus vapor (without condensates) updated by physics +[qr] + standard_name = rain_water_mixing_ratio_updated_by_physics + long_name = ratio of mass of rain water to mass of dry air plus vapor (without condensates) updated by physics units = kg kg-1 dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout optional = F -[qr] - standard_name = rain_water_mixing_ratio_updated_by_physics - long_name = ratio of mass of rain water to mass of dry air plus vapor (without condensates) updated by physics +[qi] + standard_name = ice_water_mixing_ratio_updated_by_physics + long_name = ratio of mass of ice water to mass of dry air plus vapor (without condensates) updated by physics units = kg kg-1 dimensions = (horizontal_loop_extent,vertical_dimension) type = real diff --git a/physics/mp_thompson.F90 b/physics/mp_thompson.F90 index 6031af94ad..1ad4b2d4ba 100644 --- a/physics/mp_thompson.F90 +++ b/physics/mp_thompson.F90 @@ -347,14 +347,14 @@ subroutine mp_thompson_run(ncol, nlev, con_g, con_rd, & real(kind_phys), intent(in ) :: con_eps ! Hydrometeors logical, intent(in ) :: convert_dry_rho - real(kind_phys), intent(inout) :: spechum(1:ncol,1:nlev) - real(kind_phys), intent(inout) :: qc(1:ncol,1:nlev) - real(kind_phys), intent(inout) :: qr(1:ncol,1:nlev) - real(kind_phys), intent(inout) :: qi(1:ncol,1:nlev) - real(kind_phys), intent(inout) :: qs(1:ncol,1:nlev) - real(kind_phys), intent(inout) :: qg(1:ncol,1:nlev) - real(kind_phys), intent(inout) :: ni(1:ncol,1:nlev) - real(kind_phys), intent(inout) :: nr(1:ncol,1:nlev) + real(kind_phys), intent(inout) :: spechum(:,:) + real(kind_phys), intent(inout) :: qc(:,:) + real(kind_phys), intent(inout) :: qr(:,:) + real(kind_phys), intent(inout) :: qi(:,:) + real(kind_phys), intent(inout) :: qs(:,:) + real(kind_phys), intent(inout) :: qg(:,:) + real(kind_phys), intent(inout) :: ni(:,:) + real(kind_phys), intent(inout) :: nr(:,:) ! Aerosols logical, intent(in) :: is_aerosol_aware, reset ! The following arrays are not allocated if is_aerosol_aware is false @@ -364,25 +364,25 @@ subroutine mp_thompson_run(ncol, nlev, con_g, con_rd, & real(kind_phys), optional, intent(in ) :: nwfa2d(:) real(kind_phys), optional, intent(in ) :: nifa2d(:) ! State variables and timestep information - real(kind_phys), intent(inout) :: tgrs(1:ncol,1:nlev) - real(kind_phys), intent(in ) :: prsl(1:ncol,1:nlev) - real(kind_phys), intent(in ) :: phii(1:ncol,1:nlev+1) - real(kind_phys), intent(in ) :: omega(1:ncol,1:nlev) + real(kind_phys), intent(inout) :: tgrs(:,:) + real(kind_phys), intent(in ) :: prsl(:,:) + real(kind_phys), intent(in ) :: phii(:,:) + real(kind_phys), intent(in ) :: omega(:,:) real(kind_phys), intent(in ) :: dtp ! Precip/rain/snow/graupel fall amounts and fraction of frozen precip - real(kind_phys), intent( out) :: prcp(1:ncol) - real(kind_phys), intent( out) :: rain(1:ncol) - real(kind_phys), intent( out) :: graupel(1:ncol) - real(kind_phys), intent( out) :: ice(1:ncol) - real(kind_phys), intent( out) :: snow(1:ncol) - real(kind_phys), intent( out) :: sr(1:ncol) + real(kind_phys), intent(inout) :: prcp(:) + real(kind_phys), intent(inout) :: rain(:) + real(kind_phys), intent(inout) :: graupel(:) + real(kind_phys), intent(inout) :: ice(:) + real(kind_phys), intent(inout) :: snow(:) + real(kind_phys), intent( out) :: sr(:) ! Radar reflectivity - real(kind_phys), intent( out) :: refl_10cm(1:ncol,1:nlev) + real(kind_phys), intent( out) :: refl_10cm(:,:) logical, optional, intent(in ) :: do_radar_ref ! Cloud effective radii - real(kind_phys), optional, intent( out) :: re_cloud(1:ncol,1:nlev) - real(kind_phys), optional, intent( out) :: re_ice(1:ncol,1:nlev) - real(kind_phys), optional, intent( out) :: re_snow(1:ncol,1:nlev) + real(kind_phys), optional, intent( out) :: re_cloud(:,:) + real(kind_phys), optional, intent( out) :: re_ice(:,:) + real(kind_phys), optional, intent( out) :: re_snow(:,:) ! MPI information integer, intent(in) :: mpicomm integer, intent(in) :: mpirank @@ -547,45 +547,85 @@ subroutine mp_thompson_run(ncol, nlev, con_g, con_rd, & !> - Call mp_gt_driver() with or without aerosols if (is_aerosol_aware) then - call mp_gt_driver(qv=qv, qc=qc, qr=qr, qi=qi, qs=qs, qg=qg, ni=ni, nr=nr, & - nc=nc, nwfa=nwfa, nifa=nifa, nwfa2d=nwfa2d, nifa2d=nifa2d, & - tt=tgrs, p=prsl, w=w, dz=dz, dt_in=dtp, & - rainnc=rain_mp, rainncv=delta_rain_mp, & - snownc=snow_mp, snowncv=delta_snow_mp, & - icenc=ice_mp, icencv=delta_ice_mp, & - graupelnc=graupel_mp, graupelncv=delta_graupel_mp, sr=sr, & - refl_10cm=refl_10cm, & - diagflag=diagflag, do_radar_ref=do_radar_ref_mp, & - re_cloud=re_cloud, re_ice=re_ice, re_snow=re_snow, & - has_reqc=has_reqc, has_reqi=has_reqi, has_reqs=has_reqs, & - rand_perturb_on=rand_perturb_on, kme_stoch=kme_stoch, & - ! DH* 2020-06-05 not passing this optional argument, see - ! comment in module_mp_thompson.F90 / mp_gt_driver - !rand_pert=rand_pert, & - ids=ids, ide=ide, jds=jds, jde=jde, kds=kds, kde=kde, & - ims=ims, ime=ime, jms=jms, jme=jme, kms=kms, kme=kme, & - its=its, ite=ite, jts=jts, jte=jte, kts=kts, kte=kte, & - errmsg=errmsg, errflg=errflg, reset=reset) - + if (do_effective_radii) then + call mp_gt_driver(qv=qv, qc=qc, qr=qr, qi=qi, qs=qs, qg=qg, ni=ni, nr=nr, & + nc=nc, nwfa=nwfa, nifa=nifa, nwfa2d=nwfa2d, nifa2d=nifa2d, & + tt=tgrs, p=prsl, w=w, dz=dz, dt_in=dtp, & + rainnc=rain_mp, rainncv=delta_rain_mp, & + snownc=snow_mp, snowncv=delta_snow_mp, & + icenc=ice_mp, icencv=delta_ice_mp, & + graupelnc=graupel_mp, graupelncv=delta_graupel_mp, sr=sr, & + refl_10cm=refl_10cm, & + diagflag=diagflag, do_radar_ref=do_radar_ref_mp, & + re_cloud=re_cloud, re_ice=re_ice, re_snow=re_snow, & + has_reqc=has_reqc, has_reqi=has_reqi, has_reqs=has_reqs, & + rand_perturb_on=rand_perturb_on, kme_stoch=kme_stoch, & + ! DH* 2020-06-05 not passing this optional argument, see + ! comment in module_mp_thompson.F90 / mp_gt_driver + !rand_pert=rand_pert, & + ids=ids, ide=ide, jds=jds, jde=jde, kds=kds, kde=kde, & + ims=ims, ime=ime, jms=jms, jme=jme, kms=kms, kme=kme, & + its=its, ite=ite, jts=jts, jte=jte, kts=kts, kte=kte, & + errmsg=errmsg, errflg=errflg, reset=reset) + else + call mp_gt_driver(qv=qv, qc=qc, qr=qr, qi=qi, qs=qs, qg=qg, ni=ni, nr=nr, & + nc=nc, nwfa=nwfa, nifa=nifa, nwfa2d=nwfa2d, nifa2d=nifa2d, & + tt=tgrs, p=prsl, w=w, dz=dz, dt_in=dtp, & + rainnc=rain_mp, rainncv=delta_rain_mp, & + snownc=snow_mp, snowncv=delta_snow_mp, & + icenc=ice_mp, icencv=delta_ice_mp, & + graupelnc=graupel_mp, graupelncv=delta_graupel_mp, sr=sr, & + refl_10cm=refl_10cm, & + diagflag=diagflag, do_radar_ref=do_radar_ref_mp, & + has_reqc=has_reqc, has_reqi=has_reqi, has_reqs=has_reqs, & + rand_perturb_on=rand_perturb_on, kme_stoch=kme_stoch, & + ! DH* 2020-06-05 not passing this optional argument, see + ! comment in module_mp_thompson.F90 / mp_gt_driver + !rand_pert=rand_pert, & + ids=ids, ide=ide, jds=jds, jde=jde, kds=kds, kde=kde, & + ims=ims, ime=ime, jms=jms, jme=jme, kms=kms, kme=kme, & + its=its, ite=ite, jts=jts, jte=jte, kts=kts, kte=kte, & + errmsg=errmsg, errflg=errflg, reset=reset) + end if else - call mp_gt_driver(qv=qv, qc=qc, qr=qr, qi=qi, qs=qs, qg=qg, ni=ni, nr=nr, & - tt=tgrs, p=prsl, w=w, dz=dz, dt_in=dtp, & - rainnc=rain_mp, rainncv=delta_rain_mp, & - snownc=snow_mp, snowncv=delta_snow_mp, & - icenc=ice_mp, icencv=delta_ice_mp, & - graupelnc=graupel_mp, graupelncv=delta_graupel_mp, sr=sr, & - refl_10cm=refl_10cm, & - diagflag=diagflag, do_radar_ref=do_radar_ref_mp, & - re_cloud=re_cloud, re_ice=re_ice, re_snow=re_snow, & - has_reqc=has_reqc, has_reqi=has_reqi, has_reqs=has_reqs, & - rand_perturb_on=rand_perturb_on, kme_stoch=kme_stoch, & - ! DH* 2020-06-05 not passing this optional argument, see - ! comment in module_mp_thompson.F90 / mp_gt_driver - !rand_pert=rand_pert, & - ids=ids, ide=ide, jds=jds, jde=jde, kds=kds, kde=kde, & - ims=ims, ime=ime, jms=jms, jme=jme, kms=kms, kme=kme, & - its=its, ite=ite, jts=jts, jte=jte, kts=kts, kte=kte, & - errmsg=errmsg, errflg=errflg, reset=reset) + if (do_effective_radii) then + call mp_gt_driver(qv=qv, qc=qc, qr=qr, qi=qi, qs=qs, qg=qg, ni=ni, nr=nr, & + tt=tgrs, p=prsl, w=w, dz=dz, dt_in=dtp, & + rainnc=rain_mp, rainncv=delta_rain_mp, & + snownc=snow_mp, snowncv=delta_snow_mp, & + icenc=ice_mp, icencv=delta_ice_mp, & + graupelnc=graupel_mp, graupelncv=delta_graupel_mp, sr=sr, & + refl_10cm=refl_10cm, & + diagflag=diagflag, do_radar_ref=do_radar_ref_mp, & + re_cloud=re_cloud, re_ice=re_ice, re_snow=re_snow, & + has_reqc=has_reqc, has_reqi=has_reqi, has_reqs=has_reqs, & + rand_perturb_on=rand_perturb_on, kme_stoch=kme_stoch, & + ! DH* 2020-06-05 not passing this optional argument, see + ! comment in module_mp_thompson.F90 / mp_gt_driver + !rand_pert=rand_pert, & + ids=ids, ide=ide, jds=jds, jde=jde, kds=kds, kde=kde, & + ims=ims, ime=ime, jms=jms, jme=jme, kms=kms, kme=kme, & + its=its, ite=ite, jts=jts, jte=jte, kts=kts, kte=kte, & + errmsg=errmsg, errflg=errflg, reset=reset) + else + call mp_gt_driver(qv=qv, qc=qc, qr=qr, qi=qi, qs=qs, qg=qg, ni=ni, nr=nr, & + tt=tgrs, p=prsl, w=w, dz=dz, dt_in=dtp, & + rainnc=rain_mp, rainncv=delta_rain_mp, & + snownc=snow_mp, snowncv=delta_snow_mp, & + icenc=ice_mp, icencv=delta_ice_mp, & + graupelnc=graupel_mp, graupelncv=delta_graupel_mp, sr=sr, & + refl_10cm=refl_10cm, & + diagflag=diagflag, do_radar_ref=do_radar_ref_mp, & + has_reqc=has_reqc, has_reqi=has_reqi, has_reqs=has_reqs, & + rand_perturb_on=rand_perturb_on, kme_stoch=kme_stoch, & + ! DH* 2020-06-05 not passing this optional argument, see + ! comment in module_mp_thompson.F90 / mp_gt_driver + !rand_pert=rand_pert, & + ids=ids, ide=ide, jds=jds, jde=jde, kds=kds, kde=kde, & + ims=ims, ime=ime, jms=jms, jme=jme, kms=kms, kme=kme, & + its=its, ite=ite, jts=jts, jte=jte, kts=kts, kte=kte, & + errmsg=errmsg, errflg=errflg, reset=reset) + end if end if if (errflg/=0) return @@ -610,11 +650,11 @@ subroutine mp_thompson_run(ncol, nlev, con_g, con_rd, & !> - Convert rainfall deltas from mm to m (on physics timestep); add to inout variables ! "rain" in Thompson MP refers to precipitation (total of liquid rainfall+snow+graupel+ice) - prcp = max(0.0, delta_rain_mp/1000.0_kind_phys) - graupel = max(0.0, delta_graupel_mp/1000.0_kind_phys) - ice = max(0.0, delta_ice_mp/1000.0_kind_phys) - snow = max(0.0, delta_snow_mp/1000.0_kind_phys) - rain = max(0.0, (delta_rain_mp - (delta_graupel_mp + delta_ice_mp + delta_snow_mp))/1000.0_kind_phys) + prcp = prcp + max(0.0, delta_rain_mp/1000.0_kind_phys) + graupel = graupel + max(0.0, delta_graupel_mp/1000.0_kind_phys) + ice = ice + max(0.0, delta_ice_mp/1000.0_kind_phys) + snow = snow + max(0.0, delta_snow_mp/1000.0_kind_phys) + rain = rain + max(0.0, (delta_rain_mp - (delta_graupel_mp + delta_ice_mp + delta_snow_mp))/1000.0_kind_phys) end subroutine mp_thompson_run !>@} diff --git a/physics/mp_thompson.meta b/physics/mp_thompson.meta index 7f1e9197e6..2378900240 100644 --- a/physics/mp_thompson.meta +++ b/physics/mp_thompson.meta @@ -250,7 +250,7 @@ dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys - intent = inout + intent = out optional = T [re_ice] standard_name = effective_radius_of_stratiform_cloud_ice_particle_in_um @@ -259,7 +259,7 @@ dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys - intent = inout + intent = out optional = T [re_snow] standard_name = effective_radius_of_stratiform_cloud_snow_particle_in_um @@ -268,7 +268,7 @@ dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys - intent = inout + intent = out optional = T [mpicomm] standard_name = mpi_comm diff --git a/physics/mp_thompson_post.F90 b/physics/mp_thompson_post.F90 index cca74951dd..c53f61b0cc 100644 --- a/physics/mp_thompson_post.F90 +++ b/physics/mp_thompson_post.F90 @@ -57,14 +57,14 @@ subroutine mp_thompson_post_run(ncol, nlev, tgrs_save, tgrs, prslk, dtp, ttendli implicit none ! Interface variables - integer, intent(in) :: ncol - integer, intent(in) :: nlev - real(kind_phys), dimension(1:ncol,1:nlev), intent(in) :: tgrs_save - real(kind_phys), dimension(1:ncol,1:nlev), intent(inout) :: tgrs - real(kind_phys), dimension(1:ncol,1:nlev), intent(in) :: prslk - real(kind_phys), intent(in) :: dtp - real(kind_phys), intent(in) :: ttendlim - integer, intent(in) :: kdt + integer, intent(in) :: ncol + integer, intent(in) :: nlev + real(kind_phys), dimension(:,:), intent(in) :: tgrs_save + real(kind_phys), dimension(:,:), intent(inout) :: tgrs + real(kind_phys), dimension(:,:), intent(in) :: prslk + real(kind_phys), intent(in) :: dtp + real(kind_phys), intent(in) :: ttendlim + integer, intent(in) :: kdt ! MPI information integer, intent(in ) :: mpicomm integer, intent(in ) :: mpirank diff --git a/physics/mp_thompson_pre.F90 b/physics/mp_thompson_pre.F90 index 4087ac8154..957c1f118e 100644 --- a/physics/mp_thompson_pre.F90 +++ b/physics/mp_thompson_pre.F90 @@ -28,8 +28,8 @@ subroutine mp_thompson_pre_run(ncol, nlev, tgrs, tgrs_save, errmsg, errflg) ! Interface variables integer, intent(in ) :: ncol integer, intent(in ) :: nlev - real(kind_phys), intent(in ) :: tgrs(1:ncol,1:nlev) - real(kind_phys), intent( out) :: tgrs_save(1:ncol,1:nlev) + real(kind_phys), intent(in ) :: tgrs(:,:) + real(kind_phys), intent( out) :: tgrs_save(:,:) ! CCPP error handling character(len=*), intent( out) :: errmsg diff --git a/physics/ozphys.f b/physics/ozphys.f index 3d3c1d0041..c1f464cb4b 100644 --- a/physics/ozphys.f +++ b/physics/ozphys.f @@ -58,13 +58,13 @@ subroutine ozphys_run ( & ! Interface variables integer, intent(in) :: im, levs, ko3, oz_coeff, me real(kind=kind_phys), intent(inout) :: & - & oz(im,levs) + & oz(:,:) ! These arrays may not be allocated and need assumed array sizes real(kind=kind_phys), intent(inout) :: & & ozp1(:,:), ozp2(:,:), ozp3(:,:), ozp4(:,:) real(kind=kind_phys), intent(in) :: & - & dt, po3(ko3), prdout(im,ko3,oz_coeff), & - & prsl(im,levs), tin(im,levs), delp(im,levs), & + & dt, po3(:), prdout(:,:,:), & + & prsl(:,:), tin(:,:), delp(:,:), & & con_g real :: gravi logical, intent(in) :: ldiag3d, qdiag3d diff --git a/physics/ozphys_2015.f b/physics/ozphys_2015.f index cc60ed2b45..af8be0702e 100644 --- a/physics/ozphys_2015.f +++ b/physics/ozphys_2015.f @@ -62,21 +62,22 @@ subroutine ozphys_2015_run ( & real(kind=kind_phys),intent(in) :: con_g real :: gravi integer, intent(in) :: im, levs, ko3, pl_coeff,me - real(kind=kind_phys), intent(in) :: po3(ko3), & - & prsl(im,levs), tin(im,levs), & - & delp(im,levs), & - & prdout(im,ko3,pl_coeff), dt + logical, intent(in) :: ldiag3d, qdiag3d + real(kind=kind_phys), intent(in) :: po3(:), & + & prsl(:,:), tin(:,:), & + & delp(:,:), & + & prdout(:,:,:), dt ! These arrays may not be allocated and need assumed array sizes real(kind=kind_phys), intent(inout) :: & & ozp1(:,:), ozp2(:,:), ozp3(:,:),ozp4(:,:) - real(kind=kind_phys), intent(inout) :: oz(im,levs) + real(kind=kind_phys), intent(inout) :: oz(:,:) character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg integer k,kmax,kmin,l,i,j - logical ldiag3d, flg(im), qdiag3d + logical flg(im) real(kind=kind_phys) pmax, pmin, tem, temp real(kind=kind_phys) wk1(im), wk2(im), wk3(im),prod(im,pl_coeff), & & ozib(im), colo3(im,levs+1), coloz(im,levs+1),& diff --git a/physics/precpd.f b/physics/precpd.f index c64474c019..2cc2e169ad 100644 --- a/physics/precpd.f +++ b/physics/precpd.f @@ -98,13 +98,13 @@ subroutine zhaocarr_precpd_run (im,km,dt,del,prsl,q,cwm,t,rn & ! Interface variables integer, intent(in) :: im, km, jpr real (kind=kind_phys), intent(in) :: dt - real (kind=kind_phys), intent(in) :: del(im,km), prsl(im,km) - real (kind=kind_phys), intent(inout) :: q(im,km), t(im,km), & - & cwm(im,km) - real (kind=kind_phys), intent(out) :: rn(im), sr(im), rainp(im,km) - real (kind=kind_phys), intent(in) :: u00k(im,km) - real (kind=kind_phys), intent(in) :: psautco(2), prautco(2), & - & evpco, wminco(2), wk1(im) + real (kind=kind_phys), intent(in) :: del(:,:), prsl(:,:) + real (kind=kind_phys), intent(inout) :: q(:,:), t(:,:), & + & cwm(:,:) + real (kind=kind_phys), intent(out) :: rn(:), sr(:), rainp(:,:) + real (kind=kind_phys), intent(in) :: u00k(:,:) + real (kind=kind_phys), intent(in) :: psautco(:), prautco(:), & + & evpco, wminco(:), wk1(:) logical, intent(in) :: lprnt character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg diff --git a/physics/radlw_main.F90 b/physics/radlw_main.F90 index 7655e76d2c..8fcaecd295 100644 --- a/physics/radlw_main.F90 +++ b/physics/radlw_main.F90 @@ -613,26 +613,26 @@ subroutine rrtmg_lw_run & logical, intent(in) :: lprnt - real (kind=kind_phys), dimension(npts,nlp1), intent(in) :: plvl, & + real (kind=kind_phys), dimension(:,:), intent(in) :: plvl, & & tlvl - real (kind=kind_phys), dimension(npts,nlay), intent(in) :: plyr, & + real (kind=kind_phys), dimension(:,:), intent(in) :: plyr, & & tlyr, qlyr, olyr, dzlyr, delpin - real (kind=kind_phys),dimension(npts,nlay),intent(in)::gasvmr_co2,& + real (kind=kind_phys),dimension(:,:),intent(in)::gasvmr_co2, & & gasvmr_n2o, gasvmr_ch4, gasvmr_o2, gasvmr_co, gasvmr_cfc11, & & gasvmr_cfc12, gasvmr_cfc22, gasvmr_ccl4 - real (kind=kind_phys), dimension(npts,nlay),intent(in):: cld_cf - real (kind=kind_phys), dimension(npts,nlay),intent(in),optional:: & + real (kind=kind_phys), dimension(:,:),intent(in):: cld_cf + real (kind=kind_phys), dimension(:,:),intent(in),optional:: & & cld_lwp, cld_ref_liq, cld_iwp, cld_ref_ice, & & cld_rwp, cld_ref_rain, cld_swp, cld_ref_snow, & & cld_od - real (kind=kind_phys), dimension(npts), intent(in) :: sfemis, & + real (kind=kind_phys), dimension(:), intent(in) :: sfemis, & & sfgtmp, de_lgth real (kind=kind_phys), dimension(npts,nlay), intent(in) :: alpha - real (kind=kind_phys), dimension(npts,nlay,nbands),intent(in):: & + real (kind=kind_phys), dimension(:,:,:),intent(in):: & & aeraod, aerssa !mz* HWRF -- OUTPUT from mcica_subcol_lw @@ -661,22 +661,22 @@ subroutine rrtmg_lw_run & !mz ! --- outputs: - real (kind=kind_phys), dimension(npts,nlay), intent(inout) :: hlwc - real (kind=kind_phys), dimension(npts,nlay), intent(inout) :: & + real (kind=kind_phys), dimension(:,:), intent(inout) :: hlwc + real (kind=kind_phys), dimension(:,:), intent(inout) :: & & cldtau - type (topflw_type), dimension(npts), intent(inout) :: topflx - type (sfcflw_type), dimension(npts), intent(inout) :: sfcflx + type (topflw_type), dimension(:), intent(inout) :: topflx + type (sfcflw_type), dimension(:), intent(inout) :: sfcflx character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg !! --- optional outputs: - real (kind=kind_phys), dimension(npts,nlay,nbands),optional, & + real (kind=kind_phys), dimension(:,:,:),optional, & & intent(inout) :: hlwb - real (kind=kind_phys), dimension(npts,nlay), optional, & + real (kind=kind_phys), dimension(:,:), optional, & & intent(inout) :: hlw0 - type (proflw_type), dimension(npts,nlp1), optional, & + type (proflw_type), dimension(:,:), optional, & & intent(inout) :: flxprf logical, intent(in) :: lslwr diff --git a/physics/radsw_main.F90 b/physics/radsw_main.F90 index 77fd61fcc8..0f5a8b110c 100644 --- a/physics/radsw_main.F90 +++ b/physics/radsw_main.F90 @@ -701,60 +701,60 @@ subroutine rrtmg_sw_run & logical, intent(in) :: lprnt, lsswr - real (kind=kind_phys), dimension(npts,nlp1), intent(in) :: & + real (kind=kind_phys), dimension(:,:), intent(in) :: & & plvl, tlvl - real (kind=kind_phys), dimension(npts,nlay), intent(in) :: & + real (kind=kind_phys), dimension(:,:), intent(in) :: & & plyr, tlyr, qlyr, olyr, dzlyr, delpin - real (kind=kind_phys),dimension(npts),intent(in):: sfcalb_nir_dir - real (kind=kind_phys),dimension(npts),intent(in):: sfcalb_nir_dif - real (kind=kind_phys),dimension(npts),intent(in):: sfcalb_uvis_dir - real (kind=kind_phys),dimension(npts),intent(in):: sfcalb_uvis_dif - - real(kind=kind_phys),dimension(npts,nlay),intent(in)::gasvmr_co2 - real(kind=kind_phys),dimension(npts,nlay),intent(in)::gasvmr_n2o - real(kind=kind_phys),dimension(npts,nlay),intent(in)::gasvmr_ch4 - real(kind=kind_phys),dimension(npts,nlay),intent(in)::gasvmr_o2 - real(kind=kind_phys),dimension(npts,nlay),intent(in)::gasvmr_co - real(kind=kind_phys),dimension(npts,nlay),intent(in)::gasvmr_cfc11 - real(kind=kind_phys),dimension(npts,nlay),intent(in)::gasvmr_cfc12 - real(kind=kind_phys),dimension(npts,nlay),intent(in)::gasvmr_cfc22 - real(kind=kind_phys),dimension(npts,nlay),intent(in)::gasvmr_ccl4 - - real (kind=kind_phys), dimension(npts,nlay),intent(in):: cld_cf - real (kind=kind_phys), dimension(npts,nlay),intent(in),optional:: & + real (kind=kind_phys),dimension(:),intent(in):: sfcalb_nir_dir + real (kind=kind_phys),dimension(:),intent(in):: sfcalb_nir_dif + real (kind=kind_phys),dimension(:),intent(in):: sfcalb_uvis_dir + real (kind=kind_phys),dimension(:),intent(in):: sfcalb_uvis_dif + + real(kind=kind_phys),dimension(:,:),intent(in)::gasvmr_co2 + real(kind=kind_phys),dimension(:,:),intent(in)::gasvmr_n2o + real(kind=kind_phys),dimension(:,:),intent(in)::gasvmr_ch4 + real(kind=kind_phys),dimension(:,:),intent(in)::gasvmr_o2 + real(kind=kind_phys),dimension(:,:),intent(in)::gasvmr_co + real(kind=kind_phys),dimension(:,:),intent(in)::gasvmr_cfc11 + real(kind=kind_phys),dimension(:,:),intent(in)::gasvmr_cfc12 + real(kind=kind_phys),dimension(:,:),intent(in)::gasvmr_cfc22 + real(kind=kind_phys),dimension(:,:),intent(in)::gasvmr_ccl4 + + real (kind=kind_phys), dimension(:,:),intent(in):: cld_cf + real (kind=kind_phys), dimension(:,:),intent(in),optional:: & & cld_lwp, cld_ref_liq, cld_iwp, cld_ref_ice, & & cld_rwp, cld_ref_rain, cld_swp, cld_ref_snow, & & cld_od, cld_ssa, cld_asy - real(kind=kind_phys),dimension(npts,nlay,nbdsw),intent(in)::aeraod - real(kind=kind_phys),dimension(npts,nlay,nbdsw),intent(in)::aerssa - real(kind=kind_phys),dimension(npts,nlay,nbdsw),intent(in)::aerasy + real(kind=kind_phys),dimension(:,:,:),intent(in)::aeraod + real(kind=kind_phys),dimension(:,:,:),intent(in)::aerssa + real(kind=kind_phys),dimension(:,:,:),intent(in)::aerasy real (kind=kind_phys), intent(in) :: cosz(npts), solcon, & & de_lgth(npts) real (kind=kind_phys), dimension(npts,nlay), intent(in) :: alpha ! --- outputs: - real (kind=kind_phys), dimension(npts,nlay), intent(inout) :: hswc - real (kind=kind_phys), dimension(npts,nlay), intent(inout) :: & + real (kind=kind_phys), dimension(:,:), intent(inout) :: hswc + real (kind=kind_phys), dimension(:,:), intent(inout) :: & & cldtau - type (topfsw_type), dimension(npts), intent(inout) :: topflx - type (sfcfsw_type), dimension(npts), intent(inout) :: sfcflx + type (topfsw_type), dimension(:), intent(inout) :: topflx + type (sfcfsw_type), dimension(:), intent(inout) :: sfcflx character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg !! --- optional outputs: - real (kind=kind_phys), dimension(npts,nlay,nbdsw), optional, & + real (kind=kind_phys), dimension(:,:,:), optional, & & intent(inout) :: hswb - real (kind=kind_phys), dimension(npts,nlay), optional, & + real (kind=kind_phys), dimension(:,:), optional, & & intent(inout) :: hsw0 - type (profsw_type), dimension(npts,nlp1), optional, & + type (profsw_type), dimension(:,:), optional, & & intent(inout) :: flxprf - type (cmpfsw_type), dimension(npts), optional, & + type (cmpfsw_type), dimension(:), optional, & & intent(inout) :: fdncmp ! --- locals: diff --git a/physics/rascnv.F90 b/physics/rascnv.F90 index c57315109a..ee58baecdd 100644 --- a/physics/rascnv.F90 +++ b/physics/rascnv.F90 @@ -327,41 +327,41 @@ subroutine rascnv_run(IM, k, ntr, dt, dtf & ! ! Implicit none -! - LOGICAL FLIPV ! ! input +! + logical, intent(in) :: flipv ! integer, intent(in) :: im, k, ntr, me, nrcm, ntk, kdt & &, mp_phys, mp_phys_mg - integer, dimension(im) :: kbot, ktop, kcnv, kpbl -! - real(kind=kind_phys), intent(in) :: dxmin, dxinv, ccwf(2) & - &, psauras(2), prauras(2) & - &, wminras(2), dlqf(2) -! - real(kind=kind_phys), dimension(im,k+1) :: prsi, prsik, phii - - real(kind=kind_phys), dimension(im,k) :: tin, qin, uin, vin & - &, prsl, prslk, phil & - - &, ud_mf, dd_mf, dt_mf & - &, rhc, qlcn, qicn, w_upi & - &, cnv_mfd & - &, cnv_dqldt, clcn & - &, cnv_fice, cnv_ndrop & - &, cnv_nice, cf_upi - real(kind=kind_phys), dimension(im) :: area, cdrag & - &, rainc, ddvel - real(kind=kind_phys), dimension(im,nrcm):: rannum - real(kind=kind_phys) ccin(im,k,ntr+2) - real(kind=kind_phys) trcmin(ntr+2) - - real(kind=kind_phys) DT, dtf + integer, dimension(:), intent(out) :: kbot, ktop + integer, dimension(:), intent(inout) :: kcnv + integer, dimension(:), intent(in) :: kpbl +! + real(kind=kind_phys), intent(in) :: dxmin, dxinv, ccwf(:) & + &, psauras(:), prauras(:) & + &, wminras(:), dlqf(:) +! + real(kind=kind_phys), dimension(:,:), intent(in) :: prsi, prsik, phii + + real(kind=kind_phys), dimension(:,:), intent(inout) :: tin, qin, uin, vin + real(kind=kind_phys), dimension(:,:), intent(in) :: prsl, prslk, phil & + &, rhc + real(kind=kind_phys), dimension(:,:), intent(out) :: ud_mf, dd_mf, dt_mf + real(kind=kind_phys), dimension(:,:), intent(inout) :: qlcn, qicn, w_upi & + &, cnv_mfd & + &, cnv_dqldt, clcn & + &, cnv_fice, cnv_ndrop & + &, cnv_nice, cf_upi + real(kind=kind_phys), dimension(:) , intent(in) :: area, cdrag + real(kind=kind_phys), dimension(:) , intent(out) :: rainc, ddvel + real(kind=kind_phys), dimension(:,:), intent(in) :: rannum + real(kind=kind_phys), intent(inout) :: ccin(:,:,:) + real(kind=kind_phys), intent(in) :: dt, dtf ! ! Added for aerosol scavenging for GOCART ! - real(kind=kind_phys), intent(in) :: fscav(ntr) + real(kind=kind_phys), intent(in) :: fscav(:) ! &, ctei_r(im), ctei_rm character(len=*), intent(out) :: errmsg @@ -369,6 +369,7 @@ subroutine rascnv_run(IM, k, ntr, dt, dtf & ! ! locals ! + real(kind=kind_phys) :: trcmin(ntr+2) real(kind=kind_phys), dimension(k) :: toi, qoi, tcu, qcu & &, pcu, clw, cli, qii, qli& &, phi_l, prsm,psjm & diff --git a/physics/rayleigh_damp.f b/physics/rayleigh_damp.f index 8d05f8b0bd..61eaa2d925 100644 --- a/physics/rayleigh_damp.f +++ b/physics/rayleigh_damp.f @@ -69,9 +69,9 @@ subroutine rayleigh_damp_run ( & logical,intent(in) :: lsidea,ldiag3d integer,intent(in) :: im, km,levr real(kind=kind_phys),intent(in) :: DT, CP, PRSLRD0, ral_ts - real(kind=kind_phys),intent(in) :: pgr(im), PRSL(IM,KM) - real(kind=kind_phys),intent(in) :: U1(IM,KM), V1(IM,KM) - real(kind=kind_phys),intent(inout) :: A(IM,KM), B(IM,KM), C(IM,KM) + real(kind=kind_phys),intent(in) :: pgr(:), PRSL(:,:) + real(kind=kind_phys),intent(in) :: U1(:,:), V1(:,:) + real(kind=kind_phys),intent(inout) :: A(:,:), B(:,:), C(:,:) real(kind=kind_phys),intent(inout) :: du3dt(:,:) real(kind=kind_phys),intent(inout) :: dv3dt(:,:) real(kind=kind_phys),intent(inout) :: dt3dt(:,:) diff --git a/physics/rrtmg_lw_pre.F90 b/physics/rrtmg_lw_pre.F90 index 276a0a5bd3..0494e283f6 100644 --- a/physics/rrtmg_lw_pre.F90 +++ b/physics/rrtmg_lw_pre.F90 @@ -22,10 +22,10 @@ subroutine rrtmg_lw_pre_run (im, lslwr, xlat, xlon, slmsk, snowd, sncovr,& integer, intent(in) :: im logical, intent(in) :: lslwr - real(kind=kind_phys), dimension(im), intent(in) :: xlat, xlon, slmsk, & + real(kind=kind_phys), dimension(:), intent(in) :: xlat, xlon, slmsk, & snowd, sncovr, zorl, hprime, tsfg, tsfa real(kind=kind_phys), dimension(:), intent(in) :: emiss - real(kind=kind_phys), dimension(im), intent(out) :: semis + real(kind=kind_phys), dimension(:), intent(out) :: semis character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg diff --git a/physics/rrtmg_sw_post.F90 b/physics/rrtmg_sw_post.F90 index 98d9ac7674..a5906fb758 100644 --- a/physics/rrtmg_sw_post.F90 +++ b/physics/rrtmg_sw_post.F90 @@ -26,20 +26,20 @@ subroutine rrtmg_sw_post_run (im, levr, levs, ltp, nday, lm, kd, lsswr, & integer, intent(in) :: im, levr, levs, & ltp, nday, lm, kd logical, intent(in) :: lsswr, swhtr - real(kind=kind_phys), dimension(im), intent(in) :: sfcalb1, sfcalb2, & + real(kind=kind_phys), dimension(:), intent(in) :: sfcalb1, sfcalb2, & sfcalb3, sfcalb4 - real(kind=kind_phys), dimension(im, levr+LTP), intent(in) :: htswc, htsw0 + real(kind=kind_phys), dimension(:,:), intent(in) :: htswc, htsw0 - real(kind=kind_phys), dimension(im), intent(inout) :: nirbmdi, nirdfdi, & + real(kind=kind_phys), dimension(:), intent(inout) :: nirbmdi, nirdfdi, & visbmdi, visdfdi, & nirbmui, nirdfui, & visbmui, visdfui, & sfcdsw, sfcnsw - real(kind=kind_phys), dimension(im,levs), intent(inout) :: htrsw, swhc + real(kind=kind_phys), dimension(:,:), intent(inout) :: htrsw, swhc - type(cmpfsw_type), dimension(im), intent(inout) :: scmpsw - type(sfcfsw_type), dimension(im), intent(inout) :: sfcfsw - type(topfsw_type), dimension(im), intent(inout) :: topfsw + type(cmpfsw_type), dimension(:), intent(inout) :: scmpsw + type(sfcfsw_type), dimension(:), intent(inout) :: sfcfsw + type(topfsw_type), dimension(:), intent(inout) :: topfsw character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg diff --git a/physics/rrtmg_sw_pre.F90 b/physics/rrtmg_sw_pre.F90 index b281d42a7b..2ea7de3d6a 100644 --- a/physics/rrtmg_sw_pre.F90 +++ b/physics/rrtmg_sw_pre.F90 @@ -27,9 +27,9 @@ subroutine rrtmg_sw_pre_run (im, lndp_type, n_var_lndp, lsswr, lndp_var_list, ln character(len=3) , dimension(:), intent(in) :: lndp_var_list logical, intent(in) :: lsswr real(kind=kind_phys), dimension(:), intent(in) :: lndp_prt_list - real(kind=kind_phys), dimension(im), intent(in) :: tsfg, tsfa, coszen - real(kind=kind_phys), dimension(im), intent(in) :: alb1d - real(kind=kind_phys), dimension(im), intent(in) :: slmsk, snowd, & + real(kind=kind_phys), dimension(:), intent(in) :: tsfg, tsfa, coszen + real(kind=kind_phys), dimension(:), intent(in) :: alb1d + real(kind=kind_phys), dimension(:), intent(in) :: slmsk, snowd, & sncovr, snoalb, & zorl, hprime, & alvsf, alnsf, & @@ -38,10 +38,10 @@ subroutine rrtmg_sw_pre_run (im, lndp_type, n_var_lndp, lsswr, lndp_var_list, ln fice, tisfc real(kind=kind_phys), dimension(:), intent(in) :: albdvis, albdnir, & albivis, albinir - real(kind=kind_phys), dimension(im), intent(inout) :: sfalb + real(kind=kind_phys), dimension(:), intent(inout) :: sfalb integer, intent(out) :: nday - integer, dimension(im), intent(out) :: idxday - real(kind=kind_phys), dimension(im), intent(out) :: sfcalb1, sfcalb2, & + integer, dimension(:), intent(out) :: idxday + real(kind=kind_phys), dimension(:), intent(out) :: sfcalb1, sfcalb2, & sfcalb3, sfcalb4 character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg diff --git a/physics/rrtmgp_lw_aerosol_optics.F90 b/physics/rrtmgp_lw_aerosol_optics.F90 index 515a38fe36..df0e771635 100644 --- a/physics/rrtmgp_lw_aerosol_optics.F90 +++ b/physics/rrtmgp_lw_aerosol_optics.F90 @@ -42,24 +42,24 @@ subroutine rrtmgp_lw_aerosol_optics_run(doLWrad, nCol, nLev, nTracer, nTracerAer nLev, & ! Number of vertical layers nTracer, & ! Number of tracers nTracerAer ! Number of aerosol tracers - real(kind_phys), dimension(nCol), intent(in) :: & + real(kind_phys), dimension(:), intent(in) :: & lon, & ! Longitude lat, & ! Latitude lsmask ! Land/sea/sea-ice mask - real(kind_phys), dimension(nCol,Nlev),intent(in) :: & + real(kind_phys), dimension(:,:),intent(in) :: & p_lay, & ! Pressure @ layer-centers (Pa) tv_lay, & ! Virtual-temperature @ layer-centers (K) relhum, & ! Relative-humidity @ layer-centers p_lk ! Exner function @ layer-centers (1) - real(kind_phys), dimension(nCol, nLev, nTracer),intent(in) :: & + real(kind_phys), dimension(:,:, :),intent(in) :: & tracer ! trace gas concentrations - real(kind_phys), dimension(nCol, nLev, nTracerAer),intent(in) :: & + real(kind_phys), dimension(:,:, :),intent(in) :: & aerfld ! aerosol input concentrations - real(kind_phys), dimension(nCol,nLev+1),intent(in) :: & + real(kind_phys), dimension(:,:),intent(in) :: & p_lev ! Pressure @ layer-interfaces (Pa) ! Outputs - real(kind_phys), dimension(nCol,NSPC1), intent(inout) :: & + real(kind_phys), dimension(:,:), intent(inout) :: & aerodp ! Vertical integrated optical depth for various aerosol species type(ty_optical_props_1scl),intent(inout) :: & lw_optical_props_aerosol ! RRTMGP DDT: Longwave aerosol optical properties (tau) diff --git a/physics/rrtmgp_lw_pre.F90 b/physics/rrtmgp_lw_pre.F90 index f4ee288f7f..d5808f199c 100644 --- a/physics/rrtmgp_lw_pre.F90 +++ b/physics/rrtmgp_lw_pre.F90 @@ -33,7 +33,7 @@ subroutine rrtmgp_lw_pre_run (doLWrad, nCol, xlon, xlat, slmsk, zorl, snowd, snc doLWrad ! Logical flag for longwave radiation call integer, intent(in) :: & nCol ! Number of horizontal grid points - real(kind_phys), dimension(nCol), intent(in) :: & + real(kind_phys), dimension(:), intent(in) :: & xlon, & ! Longitude xlat, & ! Latitude slmsk, & ! Land/sea/sea-ice mask @@ -47,13 +47,13 @@ subroutine rrtmgp_lw_pre_run (doLWrad, nCol, xlon, xlat, slmsk, zorl, snowd, snc emiss ! Surface emissivity from Noah MP ! Outputs - real(kind_phys), dimension(lw_gas_props%get_nband(),ncol), intent(out) :: & + real(kind_phys), dimension(:,:), intent(out) :: & sfc_emiss_byband ! Surface emissivity in each band character(len=*), intent(out) :: & errmsg ! Error message integer, intent(out) :: & errflg ! Error flag - real(kind_phys), dimension(nCol), intent(out) :: & + real(kind_phys), dimension(:), intent(out) :: & semis ! Local variables diff --git a/physics/rrtmgp_lw_pre.meta b/physics/rrtmgp_lw_pre.meta index 5446580df4..f2773fddad 100644 --- a/physics/rrtmgp_lw_pre.meta +++ b/physics/rrtmgp_lw_pre.meta @@ -104,6 +104,15 @@ kind = kind_phys intent = in optional = F +[sfc_emiss_byband] + standard_name = surface_emissivity_in_each_RRTMGP_LW_band + long_name = surface emissivity in each RRTMGP LW band + units = none + dimensions = (number_of_lw_bands_rrtmgp,horizontal_loop_extent) + type = real + kind = kind_phys + intent = out + optional = F [emiss] standard_name = surface_emissivity_lsm long_name = surface emissivity from lsm @@ -122,15 +131,6 @@ kind = kind_phys intent = out optional = F -[sfc_emiss_byband] - standard_name = surface_emissivity_in_each_RRTMGP_LW_band - long_name = surface emissivity in each RRTMGP LW band - units = none - dimensions = (number_of_lw_bands_rrtmgp,horizontal_loop_extent) - type = real - kind = kind_phys - intent = out - optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP diff --git a/physics/rrtmgp_sw_aerosol_optics.F90 b/physics/rrtmgp_sw_aerosol_optics.F90 index 4cbbae0198..3a74771b72 100644 --- a/physics/rrtmgp_sw_aerosol_optics.F90 +++ b/physics/rrtmgp_sw_aerosol_optics.F90 @@ -43,26 +43,26 @@ subroutine rrtmgp_sw_aerosol_optics_run(doSWrad, nCol, nLev, nTracer, nTracerAer nLev, & ! Number of vertical layers nTracer, & ! Number of tracers nTracerAer ! Number of aerosol tracers - integer,intent(in),dimension(nCol) :: & + integer,intent(in),dimension(:) :: & idxday ! Indices for daylit points. - real(kind_phys), dimension(nCol), intent(in) :: & + real(kind_phys), dimension(:), intent(in) :: & lon, & ! Longitude lat, & ! Latitude lsmask ! Land/sea/sea-ice mask - real(kind_phys), dimension(nCol,Nlev),intent(in) :: & + real(kind_phys), dimension(:,:),intent(in) :: & p_lay, & ! Pressure @ layer-centers (Pa) tv_lay, & ! Virtual-temperature @ layer-centers (K) relhum, & ! Relative-humidity @ layer-centers p_lk ! Exner function @ layer-centers (1) - real(kind_phys), dimension(nCol, nLev, nTracer),intent(in) :: & + real(kind_phys), dimension(:, :,:),intent(in) :: & tracer ! trace gas concentrations - real(kind_phys), dimension(nCol, nLev, nTracerAer),intent(in) :: & + real(kind_phys), dimension(:, :,:),intent(in) :: & aerfld ! aerosol input concentrations - real(kind_phys), dimension(nCol,nLev+1),intent(in) :: & + real(kind_phys), dimension(:,:),intent(in) :: & p_lev ! Pressure @ layer-interfaces (Pa) ! Outputs - real(kind_phys), dimension(nCol,NSPC1), intent(inout) :: & + real(kind_phys), dimension(:,:), intent(inout) :: & aerodp ! Vertical integrated optical depth for various aerosol species type(ty_optical_props_2str),intent(out) :: & sw_optical_props_aerosol ! RRTMGP DDT: Longwave aerosol optical properties (tau) diff --git a/physics/samfdeepcnv.f b/physics/samfdeepcnv.f index b898db4141..a0d884e03d 100644 --- a/physics/samfdeepcnv.f +++ b/physics/samfdeepcnv.f @@ -78,29 +78,28 @@ subroutine samfdeepcnv_run (im,km,itc,ntc,cliq,cp,cvap, & implicit none ! integer, intent(in) :: im, km, itc, ntc, ntk, ntr, ncloud - integer, intent(in) :: islimsk(im) + integer, intent(in) :: islimsk(:) real(kind=kind_phys), intent(in) :: cliq, cp, cvap, eps, epsm1, & & fv, grav, hvap, rd, rv, t0c real(kind=kind_phys), intent(in) :: delt - real(kind=kind_phys), intent(in) :: psp(im), delp(im,km), & - & prslp(im,km), garea(im), dot(im,km), phil(im,km) + real(kind=kind_phys), intent(in) :: psp(:), delp(:,:), & + & prslp(:,:), garea(:), dot(:,:), phil(:,:) real(kind=kind_phys), dimension(:), intent(in) :: fscav logical, intent(in) :: hwrf_samfdeep real(kind=kind_phys), intent(in) :: nthresh - real(kind=kind_phys), dimension(:), intent(in) :: ca_deep - real(kind=kind_phys), dimension(:), intent(out) :: rainevap + real(kind=kind_phys), intent(in) :: ca_deep(:) + real(kind=kind_phys), intent(out) :: rainevap(:) logical, intent(in) :: do_ca,ca_closure,ca_entr,ca_trigger - integer, intent(inout) :: kcnv(im) - ! DH* TODO - check dimensions of qtr, ntr+2 correct? *DH - real(kind=kind_phys), intent(inout) :: qtr(im,km,ntr+2), & - & q1(im,km), t1(im,km), u1(im,km), v1(im,km), & - & cnvw(im,km), cnvc(im,km) + integer, intent(inout) :: kcnv(:) + real(kind=kind_phys), intent(inout) :: qtr(:,:,:), & + & q1(:,:), t1(:,:), u1(:,:), v1(:,:), & + & cnvw(:,:), cnvc(:,:) - integer, intent(out) :: kbot(im), ktop(im) - real(kind=kind_phys), intent(out) :: cldwrk(im), & - & rn(im), & - & ud_mf(im,km),dd_mf(im,km), dt_mf(im,km) + integer, intent(out) :: kbot(:), ktop(:) + real(kind=kind_phys), intent(out) :: cldwrk(:), & + & rn(:), & + & ud_mf(:,:),dd_mf(:,:), dt_mf(:,:) ! GJF* These variables are conditionally allocated depending on whether the ! Morrison-Gettelman microphysics is used, so they must be declared @@ -109,7 +108,7 @@ subroutine samfdeepcnv_run (im,km,itc,ntc,cliq,cp,cvap, & & qlcn, qicn, w_upi, cnv_mfd, cnv_dqldt, clcn & &, cnv_fice, cnv_ndrop, cnv_nice, cf_upi ! *GJF - integer :: mp_phys, mp_phys_mg + integer, intent(in) :: mp_phys, mp_phys_mg real(kind=kind_phys), intent(in) :: clam, c0s, c1, & & betal, betas, asolfac, & diff --git a/physics/samfshalcnv.f b/physics/samfshalcnv.f index ce6ae62c4f..f2a22b38cc 100644 --- a/physics/samfshalcnv.f +++ b/physics/samfshalcnv.f @@ -53,22 +53,22 @@ subroutine samfshalcnv_run(im,km,itc,ntc,cliq,cp,cvap, & implicit none ! integer, intent(in) :: im, km, itc, ntc, ntk, ntr, ncloud - integer, intent(in) :: islimsk(im) + integer, intent(in) :: islimsk(:) real(kind=kind_phys), intent(in) :: cliq, cp, cvap, & & eps, epsm1, fv, grav, hvap, rd, rv, t0c real(kind=kind_phys), intent(in) :: delt - real(kind=kind_phys), intent(in) :: psp(im), delp(im,km), & - & prslp(im,km), garea(im), hpbl(im), dot(im,km), phil(im,km) + real(kind=kind_phys), intent(in) :: psp(:), delp(:,:), & + & prslp(:,:), garea(:), hpbl(:), dot(:,:), phil(:,:) ! real(kind=kind_phys), dimension(:), intent(in) :: fscav - integer, intent(inout) :: kcnv(im) + integer, intent(inout) :: kcnv(:) ! DH* TODO - check dimensions of qtr, ntr+2 correct? *DH - real(kind=kind_phys), intent(inout) :: qtr(im,km,ntr+2), & - & q1(im,km), t1(im,km), u1(im,km), v1(im,km) + real(kind=kind_phys), intent(inout) :: qtr(:,:,:), & + & q1(:,:), t1(:,:), u1(:,:), v1(:,:) ! - integer, intent(out) :: kbot(im), ktop(im) - real(kind=kind_phys), intent(out) :: rn(im), & - & cnvw(im,km), cnvc(im,km), ud_mf(im,km), dt_mf(im,km) + integer, intent(out) :: kbot(:), ktop(:) + real(kind=kind_phys), intent(out) :: rn(:), & + & cnvw(:,:), cnvc(:,:), ud_mf(:,:), dt_mf(:,:) ! real(kind=kind_phys), intent(in) :: clam, c0s, c1, & & asolfac, pgcon diff --git a/physics/satmedmfvdif.F b/physics/satmedmfvdif.F index ec6add8a54..b3e9af21f1 100644 --- a/physics/satmedmfvdif.F +++ b/physics/satmedmfvdif.F @@ -71,8 +71,8 @@ subroutine satmedmfvdif_run(im,km,ntrac,ntcw,ntiw,ntke, & ! !---------------------------------------------------------------------- integer, intent(in) :: im, km, ntrac, ntcw, ntiw, ntke - integer, intent(in) :: kinver(im) - integer, intent(out) :: kpbl(im) + integer, intent(in) :: kinver(:) + integer, intent(out) :: kpbl(:) ! logical, intent(in) :: gen_tend, ldiag3d, qdiag3d real(kind=kind_phys), intent(inout), dimension(:,:) :: & @@ -81,26 +81,26 @@ subroutine satmedmfvdif_run(im,km,ntrac,ntcw,ntiw,ntke, & real(kind=kind_phys), intent(in) :: grav,rd,cp,rv,hvap,hfus,fv, & & eps,epsm1 real(kind=kind_phys), intent(in) :: delt, xkzm_m, xkzm_h, xkzm_s - real(kind=kind_phys), intent(inout) :: dv(im,km), du(im,km), & - & tdt(im,km), rtg(im,km,ntrac) + real(kind=kind_phys), intent(inout) :: dv(:,:), du(:,:), & + & tdt(:,:), rtg(:,:,:) real(kind=kind_phys), intent(in) :: & - & u1(im,km), v1(im,km), & - & t1(im,km), q1(im,km,ntrac), & - & swh(im,km), hlw(im,km), & - & xmu(im), garea(im), & - & psk(im), rbsoil(im), & - & zorl(im), tsea(im), & - & u10m(im), v10m(im), & - & fm(im), fh(im), & - & evap(im), heat(im), & - & stress(im), spd1(im), & - & prsi(im,km+1), del(im,km), & - & prsl(im,km), prslk(im,km), & - & phii(im,km+1), phil(im,km) + & u1(:,:), v1(:,:), & + & t1(:,:), q1(:,:,:), & + & swh(:,:), hlw(:,:), & + & xmu(:), garea(:), & + & psk(:), rbsoil(:), & + & zorl(:), tsea(:), & + & u10m(:), v10m(:), & + & fm(:), fh(:), & + & evap(:), heat(:), & + & stress(:), spd1(:), & + & prsi(:,:), del(:,:), & + & prsl(:,:), prslk(:,:), & + & phii(:,:), phil(:,:) real(kind=kind_phys), intent(out) :: & - & dusfc(im), dvsfc(im), & - & dtsfc(im), dqsfc(im), & - & hpbl(im) + & dusfc(:), dvsfc(:), & + & dtsfc(:), dqsfc(:), & + & hpbl(:) ! logical, intent(in) :: dspheat character(len=*), intent(out) :: errmsg diff --git a/physics/satmedmfvdifq.F b/physics/satmedmfvdifq.F index d6de1a0654..106c893771 100644 --- a/physics/satmedmfvdifq.F +++ b/physics/satmedmfvdifq.F @@ -75,42 +75,42 @@ subroutine satmedmfvdifq_run(im,km,ntrac,ntcw,ntiw,ntke, & ! !---------------------------------------------------------------------- integer, intent(in) :: im, km, ntrac, ntcw, ntiw, ntke, ntoz - integer, intent(in) :: kinver(im) - integer, intent(in) :: islimsk(im) - integer, intent(out) :: kpbl(im) + integer, intent(in) :: kinver(:) + integer, intent(in) :: islimsk(:) + integer, intent(out) :: kpbl(:) logical, intent(in) :: gen_tend,ldiag3d,qdiag3d ! real(kind=kind_phys), intent(in) :: grav,rd,cp,rv,hvap,hfus,fv, & & eps,epsm1 real(kind=kind_phys), intent(in) :: delt, xkzm_m, xkzm_h, xkzm_s real(kind=kind_phys), intent(in) :: dspfac, bl_upfr, bl_dnfr - real(kind=kind_phys), intent(inout) :: dv(im,km), du(im,km), & - & tdt(im,km), rtg(im,km,ntrac) + real(kind=kind_phys), intent(inout) :: dv(:,:), du(:,:), & + & tdt(:,:), rtg(:,:,:) real(kind=kind_phys), intent(in) :: & - & u1(im,km), v1(im,km), & - & t1(im,km), q1(im,km,ntrac), & - & swh(im,km), hlw(im,km), & - & xmu(im), garea(im), & - & snwdph_lnd(im), & - & psk(im), rbsoil(im), & - & zorl(im), tsea(im), & - & u10m(im), v10m(im), & - & fm(im), fh(im), & - & evap(im), heat(im), & - & stress(im), spd1(im), & - & prsi(im,km+1), del(im,km), & - & prsl(im,km), prslk(im,km), & - & phii(im,km+1), phil(im,km) + & u1(:,:), v1(:,:), & + & t1(:,:), q1(:,:,:), & + & swh(:,:), hlw(:,:), & + & xmu(:), garea(:), & + & snwdph_lnd(:), & + & psk(:), rbsoil(:), & + & zorl(:), tsea(:), & + & u10m(:), v10m(:), & + & fm(:), fh(:), & + & evap(:), heat(:), & + & stress(:), spd1(:), & + & prsi(:,:), del(:,:), & + & prsl(:,:), prslk(:,:), & + & phii(:,:), phil(:,:) real(kind=kind_phys), intent(inout), dimension(:,:) :: & & du3dt(:,:), dv3dt(:,:), & & dt3dt(:,:), dq3dt(:,:), & & do3dt(:,:) real(kind=kind_phys), intent(out) :: & - & dusfc(im), dvsfc(im), & - & dtsfc(im), dqsfc(im), & - & hpbl(im) + & dusfc(:), dvsfc(:), & + & dtsfc(:), dqsfc(:), & + & hpbl(:) real(kind=kind_phys), intent(out) :: & - & dkt(im,km), dku(im,km) + & dkt(:,:), dku(:,:) ! logical, intent(in) :: dspheat character(len=*), intent(out) :: errmsg @@ -497,10 +497,14 @@ subroutine satmedmfvdifq_run(im,km,ntrac,ntcw,ntiw,ntke, & ! !> - Initialize diffusion coefficients to 0 and calculate the total !! radiative heating rate (dku, dkt, radx) - do k=1,km1 + do k=1,km do i=1,im dku(i,k) = 0. dkt(i,k) = 0. + enddo + enddo + do k=1,km1 + do i=1,im dkq(i,k) = 0. cku(i,k) = 0. ckt(i,k) = 0. diff --git a/physics/satmedmfvdifq.meta b/physics/satmedmfvdifq.meta index 5ea52a5a3a..a4a71eed57 100644 --- a/physics/satmedmfvdifq.meta +++ b/physics/satmedmfvdifq.meta @@ -678,7 +678,7 @@ units = flag dimensions = () type = logical - intent = inout + intent = in optional = F [qdiag3d] standard_name = flag_tracer_diagnostics_3D @@ -686,7 +686,7 @@ units = flag dimensions = () type = logical - intent = inout + intent = in optional = F [errmsg] standard_name = ccpp_error_message diff --git a/physics/scm_sfc_flux_spec.F90 b/physics/scm_sfc_flux_spec.F90 index a40ac99c04..398bff5d6d 100644 --- a/physics/scm_sfc_flux_spec.F90 +++ b/physics/scm_sfc_flux_spec.F90 @@ -15,6 +15,10 @@ module scm_sfc_flux_spec CONTAINS !******************************************************************************************* +!! +!! \section arg_table_scm_sfc_flux_spec_init Argument Table +!! \htmlinclude scm_sfc_flux_spec_init.html +!! subroutine scm_sfc_flux_spec_init(lheatstrg, errmsg, errflg) logical, intent(in) :: lheatstrg diff --git a/physics/sfc_cice.f b/physics/sfc_cice.f index f845f60912..a07759f71e 100644 --- a/physics/sfc_cice.f +++ b/physics/sfc_cice.f @@ -98,23 +98,23 @@ subroutine sfc_cice_run & use machine , only : kind_phys implicit none - real(kind=kind_phys), parameter :: one = 1.0_kind_phys - real(kind=kind_phys), parameter :: dsi = one/0.33_kind_phys - real (kind=kind_phys), intent(in) :: hvap, cp, rvrdm1, rd + real(kind=kind_phys), parameter :: one = 1.0_kind_phys + real(kind=kind_phys), parameter :: dsi = one/0.33_kind_phys + real(kind=kind_phys), intent(in) :: hvap, cp, rvrdm1, rd ! --- inputs: integer, intent(in) :: im logical, intent(in) :: cplflx ! real (kind=kind_phys), dimension(im), intent(in) :: u1, v1, & - real (kind=kind_phys), dimension(im), intent(in) :: & + real (kind=kind_phys), dimension(:), intent(in) :: & & t1, q1, cm, ch, prsl1, wind, dqsfc, dtsfc, dusfc, dvsfc &, snowd - logical, intent(in) :: flag_cice(im), flag_iter(im) + logical, dimension(:), intent(in) :: flag_cice, flag_iter ! --- outputs: - real (kind=kind_phys), dimension(im), intent(inout) :: qsurf, & + real (kind=kind_phys), dimension(:), intent(inout) :: qsurf, & & cmm, chh, evap, hflx, stress &, weasd, snwdph, ep ! diff --git a/physics/sfc_diag.f b/physics/sfc_diag.f index b78c9b2f7c..e91bd0e14e 100644 --- a/physics/sfc_diag.f +++ b/physics/sfc_diag.f @@ -33,10 +33,10 @@ subroutine sfc_diag_run & ! integer, intent(in) :: im real(kind=kind_phys), intent(in) :: grav,cp,eps,epsm1 - real(kind=kind_phys), dimension(im), intent(in) :: & + real(kind=kind_phys), dimension(:), intent(in) :: & & ps, u1, v1, t1, q1, tskin, & & qsurf, prslki, evap, fm, fh, fm10, fh2 - real(kind=kind_phys), dimension(im), intent(out) :: & + real(kind=kind_phys), dimension(:), intent(out) :: & & f10m, u10m, v10m, t2m, q2m character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg diff --git a/physics/sfc_diag_post.F90 b/physics/sfc_diag_post.F90 index 767e98db5c..1bf3e7e676 100644 --- a/physics/sfc_diag_post.F90 +++ b/physics/sfc_diag_post.F90 @@ -26,11 +26,11 @@ subroutine sfc_diag_post_run (im, lsm, lsm_noahmp, dry, lssav, dtf, con_eps, con integer, intent(in) :: im, lsm, lsm_noahmp logical, intent(in) :: lssav real(kind=kind_phys), intent(in) :: dtf, con_eps, con_epsm1 - logical , dimension(im), intent(in) :: dry - real(kind=kind_phys), dimension(im), intent(in) :: pgr, u10m, v10m + logical , dimension(:), intent(in) :: dry + real(kind=kind_phys), dimension(:), intent(in) :: pgr, u10m, v10m real(kind=kind_phys), dimension(:) , intent(in) :: t2mmp, q2mp - real(kind=kind_phys), dimension(im), intent(inout) :: t2m, q2m, tmpmin, tmpmax, spfhmin, spfhmax - real(kind=kind_phys), dimension(im), intent(inout) :: wind10mmax, u10mmax, v10mmax, dpt2m + real(kind=kind_phys), dimension(:), intent(inout) :: t2m, q2m, tmpmin, tmpmax, spfhmin, spfhmax + real(kind=kind_phys), dimension(:), intent(inout) :: wind10mmax, u10mmax, v10mmax, dpt2m character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg diff --git a/physics/sfc_diff.f b/physics/sfc_diff.f index b7ef1ea680..93102e4675 100644 --- a/physics/sfc_diff.f +++ b/physics/sfc_diff.f @@ -90,24 +90,24 @@ subroutine sfc_diff_run (im,rvrdm1,eps,epsm1,grav, & !intent(in) integer, intent(in) :: im, ivegsrc integer, intent(in) :: sfc_z0_type ! option for calculating surface roughness length over ocean - integer, dimension(im), intent(in) :: vegtype + integer, dimension(:), intent(in) :: vegtype logical, intent(in) :: redrag ! reduced drag coeff. flag for high wind over sea (j.han) - logical, dimension(im), intent(in) :: flag_iter, wet, dry, icy + logical, dimension(:), intent(in) :: flag_iter, wet, dry, icy - real(kind=kind_phys), dimension(im), intent(in) :: u10m,v10m + real(kind=kind_phys), dimension(:), intent(in) :: u10m,v10m real(kind=kind_phys), intent(in) :: rvrdm1, eps, epsm1, grav - real(kind=kind_phys), dimension(im), intent(in) :: & + real(kind=kind_phys), dimension(:), intent(in) :: & & ps,t1,q1,z1,prsl1,prslki,prsik1,prslk1, & & wind,sigmaf,shdmax, & & z0pert,ztpert ! mg, sfc-perts - real(kind=kind_phys), dimension(im), intent(in) :: & + real(kind=kind_phys), dimension(:), intent(in) :: & & tskin_wat, tskin_lnd, tskin_ice, & & tsurf_wat, tsurf_lnd, tsurf_ice, & & snwdph_wat,snwdph_lnd,snwdph_ice - real(kind=kind_phys), dimension(im), intent(in) :: z0rl_wav - real(kind=kind_phys), dimension(im), intent(inout) :: & + real(kind=kind_phys), dimension(:), intent(in) :: z0rl_wav + real(kind=kind_phys), dimension(:), intent(inout) :: & & z0rl_wat, z0rl_lnd, z0rl_ice, & & ustar_wat, ustar_lnd, ustar_ice, & & cm_wat, cm_lnd, cm_ice, & diff --git a/physics/sfc_drv.f b/physics/sfc_drv.f index 4343d5dffb..1f786b4962 100644 --- a/physics/sfc_drv.f +++ b/physics/sfc_drv.f @@ -234,9 +234,9 @@ subroutine lsm_noah_run & & epsm1, rvrdm1 real (kind=kind_phys), intent(in) :: pertvegf - integer, dimension(im), intent(in) :: soiltyp, vegtype, slopetyp + integer, dimension(:), intent(in) :: soiltyp, vegtype, slopetyp - real (kind=kind_phys), dimension(im), intent(in) :: ps, & + real (kind=kind_phys), dimension(:), intent(in) :: ps, & & t1, q1, sigmaf, sfcemis, dlwflx, dswsfc, snet, tg3, cm, & & ch, prsl1, prslki, wind, shdmin, shdmax, & & snoalb, sfalb, zf, & @@ -244,19 +244,19 @@ subroutine lsm_noah_run & real (kind=kind_phys), intent(in) :: delt - logical, dimension(im), intent(in) :: flag_iter, flag_guess, land + logical, dimension(:), intent(in) :: flag_iter, flag_guess, land logical, intent(in) :: lheatstrg ! --- in/out: - real (kind=kind_phys), dimension(im), intent(inout) :: weasd, & + real (kind=kind_phys), dimension(:), intent(inout) :: weasd, & & snwdph, tskin, tprcp, srflag, canopy, trans, tsurf, zorl - real (kind=kind_phys), dimension(im,km), intent(inout) :: & + real (kind=kind_phys), dimension(:,:), intent(inout) :: & & smc, stc, slc ! --- output: - real (kind=kind_phys), dimension(im), intent(inout) :: sncovr1, & + real (kind=kind_phys), dimension(:), intent(inout) :: sncovr1, & & qsurf, gflux, drain, evap, hflx, ep, runoff, cmm, chh, & & evbs, evcw, sbsno, snowc, stm, snohf, smcwlt2, smcref2, & & wet1 diff --git a/physics/sfc_drv_ruc.F90 b/physics/sfc_drv_ruc.F90 index 23d99d6ef9..916144cf54 100644 --- a/physics/sfc_drv_ruc.F90 +++ b/physics/sfc_drv_ruc.F90 @@ -47,25 +47,25 @@ subroutine lsm_ruc_init (me, master, isot, ivegsrc, nlunit, & integer, intent(in) :: lsm_ruc, lsm - real (kind=kind_phys), dimension(im), intent(in) :: slmsk - real (kind=kind_phys), dimension(im), intent(in) :: stype - real (kind=kind_phys), dimension(im), intent(in) :: vtype - real (kind=kind_phys), dimension(im), intent(in) :: tsfc_lnd - real (kind=kind_phys), dimension(im), intent(in) :: tsfc_wat - real (kind=kind_phys), dimension(im), intent(in) :: tg3 + real (kind=kind_phys), dimension(:), intent(in) :: slmsk + real (kind=kind_phys), dimension(:), intent(in) :: stype + real (kind=kind_phys), dimension(:), intent(in) :: vtype + real (kind=kind_phys), dimension(:), intent(in) :: tsfc_lnd + real (kind=kind_phys), dimension(:), intent(in) :: tsfc_wat + real (kind=kind_phys), dimension(:), intent(in) :: tg3 - real (kind=kind_phys), dimension(im,lsoil), intent(in) :: smc,slc,stc + real (kind=kind_phys), dimension(:,:), intent(in) :: smc,slc,stc ! --- in/out: - real (kind=kind_phys), dimension(im), intent(inout) :: wetness + real (kind=kind_phys), dimension(:), intent(inout) :: wetness ! --- out - real (kind=kind_phys), dimension(:), intent(out) :: zs - real (kind=kind_phys), dimension(im,lsoil_ruc), intent(inout) :: sh2o, smfrkeep - real (kind=kind_phys), dimension(im,lsoil_ruc), intent(inout) :: tslb, smois - real (kind=kind_phys), dimension(im,kice), intent(out) :: tsice + real (kind=kind_phys), dimension(:), intent(out) :: zs + real (kind=kind_phys), dimension(:,:), intent(inout) :: sh2o, smfrkeep + real (kind=kind_phys), dimension(:,:), intent(inout) :: tslb, smois + real (kind=kind_phys), dimension(:,:), intent(out) :: tsice - real (kind=kind_phys), dimension(:), intent(out) :: pores, resid + real (kind=kind_phys), dimension(:), intent(out) :: pores, resid character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg @@ -236,7 +236,6 @@ end subroutine lsm_ruc_finalize ! tslb - real, soil temp (k) im,km ! ! sh2o - real, liquid soil moisture im,km ! ! canopy - real, canopy moisture content (mm) im ! -! trans - real, total plant transpiration (m/s) im ! ! tsurf - real, surface skin temperature (after iteration) im ! ! ! ! outputs: ! @@ -250,6 +249,7 @@ end subroutine lsm_ruc_finalize ! evcw - real, canopy water evaporation (m/s) im ! ! sbsno - real, sublimation/deposit from snopack (m/s) im ! ! stm - real, total soil column moisture content (m) im ! +! trans - real, total plant transpiration (m/s) im ! ! zorl - real, surface roughness im ! ! wetness - real, normalized soil wetness im ! ! ! @@ -317,7 +317,7 @@ subroutine lsm_ruc_run & ! inputs integer, intent(in) :: lsm_ruc, lsm integer, intent(in) :: imp_physics, imp_physics_gfdl, imp_physics_thompson - real (kind=kind_phys), dimension(im), intent(in) :: & + real (kind=kind_phys), dimension(:), intent(in) :: & & t1, sigmaf, laixy, dlwflx, dswsfc, snet, tg3, & & prsl1, wind, shdmin, shdmax, & & snoalb, alvwf, alnwf, zf, qc, q1, & @@ -333,18 +333,19 @@ subroutine lsm_ruc_run & ! inputs con_pi, con_rd, & con_hvap, con_fvirt - logical, dimension(im), intent(in) :: flag_iter, flag_guess - logical, dimension(im), intent(in) :: land, icy, lake - logical, dimension(im), intent(in) :: flag_cice + logical, dimension(:), intent(in) :: flag_iter, flag_guess + logical, dimension(:), intent(in) :: land, icy, lake + logical, dimension(:), intent(in) :: flag_cice logical, intent(in) :: frac_grid logical, intent(in) :: do_mynnsfclay logical, intent(in) :: rdlai ! --- in/out: - integer, dimension(im), intent(inout) :: soiltyp, vegtype - real (kind=kind_phys), dimension(lsoil_ruc), intent(in) :: zs - real (kind=kind_phys), dimension(im), intent(inout) :: srflag, & + integer, dimension(:), intent(inout) :: soiltyp, vegtype + real (kind=kind_phys), dimension(:), intent(in) :: zs + real (kind=kind_phys), dimension(:), intent(in) :: srflag + real (kind=kind_phys), dimension(:), intent(inout) :: & & canopy, trans, smcwlt2, smcref2, & ! for land & weasd_lnd, snwdph_lnd, tskin_lnd, & @@ -356,15 +357,15 @@ subroutine lsm_ruc_run & ! inputs & sfcqc_ice, sfcqv_ice, fice, tice ! --- in - real (kind=kind_phys), dimension(im), intent(in) :: & + real (kind=kind_phys), dimension(:), intent(in) :: & & rainnc, rainc, ice, snow, graupel ! --- in/out: ! --- on RUC levels - real (kind=kind_phys), dimension(im,lsoil_ruc), intent(inout) :: & + real (kind=kind_phys), dimension(:,:), intent(inout) :: & & smois, tsice, tslb, sh2o, keepfr, smfrkeep ! --- output: - real (kind=kind_phys), dimension(im), intent(inout) :: & + real (kind=kind_phys), dimension(:), intent(inout) :: & & rhosnf, runof, drain, runoff, srunoff, evbs, evcw, & & stm, wetness, semis_lnd, semis_ice, & ! for land diff --git a/physics/sfc_drv_ruc.meta b/physics/sfc_drv_ruc.meta index b77a96713e..e504c07006 100644 --- a/physics/sfc_drv_ruc.meta +++ b/physics/sfc_drv_ruc.meta @@ -144,7 +144,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - intent = inout + intent = in optional = F [tsfc_lnd] standard_name = surface_skin_temperature @@ -153,7 +153,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - intent = inout + intent = in optional = F [tsfc_wat] standard_name = sea_surface_temperature @@ -162,7 +162,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - intent = inout + intent = in optional = F [tg3] standard_name = deep_soil_temperature @@ -731,7 +731,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = in + intent = inout optional = F [smcwlt2] standard_name = volume_fraction_of_condensed_water_in_soil_at_wilting_point @@ -893,7 +893,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = in + intent = inout optional = F [weasd_ice] standard_name = water_equivalent_accumulated_snow_depth_over_ice @@ -992,7 +992,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = out + intent = inout optional = F [tsurf_lnd] standard_name = surface_skin_temperature_after_iteration_over_land @@ -1055,7 +1055,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = out + intent = inout optional = F [evap_lnd] standard_name = kinematic_surface_upward_latent_heat_flux_over_land @@ -1064,7 +1064,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = out + intent = inout optional = F [hflx_lnd] standard_name = kinematic_surface_upward_sensible_heat_flux_over_land @@ -1073,7 +1073,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = out + intent = inout optional = F [runof] standard_name = surface_runoff_flux @@ -1082,7 +1082,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = out + intent = inout optional = F [runoff] standard_name = total_runoff @@ -1109,7 +1109,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = out + intent = inout optional = F [cm_lnd] standard_name = surface_drag_coefficient_for_momentum_in_air_over_land @@ -1136,7 +1136,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = out + intent = inout optional = F [evcw] standard_name = canopy_upward_latent_heat_flux @@ -1145,7 +1145,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = out + intent = inout optional = F [stm] standard_name = soil_moisture_content @@ -1244,7 +1244,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = out + intent = inout optional = F [evap_ice] standard_name = kinematic_surface_upward_latent_heat_flux_over_ice @@ -1253,7 +1253,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = out + intent = inout optional = F [ep1d_ice] standard_name = surface_upward_potential_latent_heat_flux_over_ice @@ -1271,7 +1271,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = out + intent = inout optional = F [cm_ice] standard_name = surface_drag_coefficient_for_momentum_in_air_over_ice @@ -1307,7 +1307,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = out + intent = inout optional = F [sbsno] standard_name = snow_deposition_sublimation_upward_latent_heat_flux @@ -1316,7 +1316,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = out + intent = inout optional = F [cmm_lnd] standard_name = surface_drag_wind_speed_for_momentum_in_air_over_land @@ -1325,7 +1325,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = out + intent = inout optional = F [chh_lnd] standard_name = surface_drag_mass_flux_for_heat_and_moisture_in_air_over_land @@ -1334,7 +1334,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = out + intent = inout optional = F [cmm_ice] standard_name = surface_drag_wind_speed_for_momentum_in_air_over_ice @@ -1343,7 +1343,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = out + intent = inout optional = F [chh_ice] standard_name = surface_drag_mass_flux_for_heat_and_moisture_in_air_over_ice @@ -1352,7 +1352,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = out + intent = inout optional = F [flag_iter] standard_name = flag_for_iteration diff --git a/physics/sfc_noah_wrfv4.F90 b/physics/sfc_noah_wrfv4.F90 index c435b2d386..038adf1c6b 100644 --- a/physics/sfc_noah_wrfv4.F90 +++ b/physics/sfc_noah_wrfv4.F90 @@ -94,7 +94,8 @@ end subroutine sfc_noah_wrfv4_finalize !! !> \section general_noah_wrfv4_drv NOAH LSM WRFv4 General Algorithm !> @{ - subroutine sfc_noah_wrfv4_run (im, isice, flag_lsm, flag_lsm_glacier, srflag, isurban, rdlai, & + subroutine sfc_noah_wrfv4_run ( & + im, isice, flag_lsm, flag_lsm_glacier, srflag, isurban, rdlai, & ua_phys, usemonalb, aoasis, fasdas, dt, zlvl, & nsoil, sthick, lwdn, soldn, solnet, sfcprs, prcp, sfctmp, q1k, & th1, qs1, dqsdt2, vegtyp, soiltyp, slopetyp, shdfac, shmin, & @@ -118,20 +119,20 @@ subroutine sfc_noah_wrfv4_run (im, isice, flag_lsm, flag_lsm_glacier, srflag, is real(kind=kind_phys), intent(in) :: dt, cp, rd, sigma, cph2o, cpice, lsubf - integer, dimension(im), intent(in) :: vegtyp, soiltyp, slopetyp - logical, dimension(im), intent(in) :: flag_lsm, flag_lsm_glacier - real(kind=kind_phys), dimension(im), intent(in) :: srflag, zlvl, lwdn, soldn, solnet, & + integer, dimension(:), intent(in) :: vegtyp, soiltyp, slopetyp + logical, dimension(:), intent(in) :: flag_lsm, flag_lsm_glacier + real(kind=kind_phys), dimension(:), intent(in) :: srflag, zlvl, lwdn, soldn, solnet, & sfcprs, prcp, sfctmp, q1k, th1, qs1, & dqsdt2, shmin, shmax, snoalb, tbot - real(kind=kind_phys), dimension(nsoil), intent(in) :: sthick + real(kind=kind_phys), dimension(:), intent(in) :: sthick - real(kind=kind_phys), dimension(im), intent(inout) :: shdfac, albbrd, z0brd, z0k, emissi, & + real(kind=kind_phys), dimension(:), intent(inout) :: shdfac, albbrd, z0brd, z0k, emissi, & cmc, t1, snowhk, sneqv, chk, flx1, & flx2, flx3, ribb, snotime - real(kind=kind_phys), dimension(im,nsoil), intent(inout) :: stc, smc, swc + real(kind=kind_phys), dimension(:,:), intent(inout) :: stc, smc, swc !variables that are intent(out) in module_sf_noahlsm, but are inout here due to being set within an IF statement - real(kind=kind_phys), dimension(im), intent(inout) :: embrd, sheat, eta, ec, & + real(kind=kind_phys), dimension(:), intent(inout) :: embrd, sheat, eta, ec, & edir, ett, esnow, etp, ssoil, sncovr, & runoff1, runoff2, soilm, qsurf, smcwlt, & smcref, smcmax diff --git a/physics/sfc_noah_wrfv4.meta b/physics/sfc_noah_wrfv4.meta index 44e5ff4cc0..f35e4ad54f 100644 --- a/physics/sfc_noah_wrfv4.meta +++ b/physics/sfc_noah_wrfv4.meta @@ -749,7 +749,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = in + intent = inout optional = F [errmsg] standard_name = ccpp_error_message diff --git a/physics/sfc_noah_wrfv4_interstitial.F90 b/physics/sfc_noah_wrfv4_interstitial.F90 index b30f8a1311..7b37de5688 100644 --- a/physics/sfc_noah_wrfv4_interstitial.F90 +++ b/physics/sfc_noah_wrfv4_interstitial.F90 @@ -144,21 +144,21 @@ subroutine sfc_noah_wrfv4_pre_run (im, nsoil, ialb, isice, land, & ! Note that the version of NOAH LSM expected here is "generic" - there are no urban, fasdas, or ! or University of Arizona(?) additions. - integer, intent(in) :: im, nsoil, ialb, isice - logical, intent(in) :: restart, first_time_step - real(kind=kind_phys), intent(in) :: dt, rhowater, rd, rvrdm1, eps, epsm1 - - logical, dimension(im), intent(in) :: flag_guess, flag_iter, land - real(kind=kind_phys), dimension(im), intent(in) :: sfcprs, tprcp, sfctmp, q1, prslki, wind, cm, ch, snwdph - real(kind=kind_phys), dimension(im), intent(in) :: weasd, tsfc, vtype - real(kind=kind_phys), dimension(im,nsoil), intent(in) :: smc, stc, slc - - logical, dimension(im), intent(inout) :: flag_lsm, flag_lsm_glacier - real(kind=kind_phys), dimension(im), intent(inout) :: snoalb, prcp, q2k, rho1, qs1, th1, dqsdt2, canopy, cmc, snowhk, chk, cmm, chh - real(kind=kind_phys), dimension(im), intent(inout) :: weasd_save, snwdph_save, tsfc_save, canopy_save - real(kind=kind_phys), dimension(im,nsoil), intent(inout) :: smc_save, stc_save, slc_save - real(kind=kind_phys), dimension(im), intent(inout) :: ep, evap, hflx, gflux, drain, evbs, evcw, trans, sbsno, snowc, snohf - real(kind=kind_phys), dimension(nsoil), intent(inout) :: sthick + integer, intent(in) :: im, nsoil, ialb, isice + logical, intent(in) :: restart, first_time_step + real(kind=kind_phys), intent(in) :: dt, rhowater, rd, rvrdm1, eps, epsm1 + + logical, dimension(:), intent(in) :: flag_guess, flag_iter, land + real(kind=kind_phys), dimension(:), intent(in) :: sfcprs, tprcp, sfctmp, q1, prslki, wind, cm, ch, snwdph + real(kind=kind_phys), dimension(:), intent(in) :: weasd, tsfc, vtype + real(kind=kind_phys), dimension(:,:), intent(in) :: smc, stc, slc + + logical, dimension(:), intent(inout) :: flag_lsm, flag_lsm_glacier + real(kind=kind_phys), dimension(:), intent(inout) :: snoalb, prcp, q2k, rho1, qs1, th1, dqsdt2, canopy, cmc, snowhk, chk, cmm, chh + real(kind=kind_phys), dimension(:), intent(inout) :: weasd_save, snwdph_save, tsfc_save, canopy_save + real(kind=kind_phys), dimension(:,:), intent(inout) :: smc_save, stc_save, slc_save + real(kind=kind_phys), dimension(:), intent(inout) :: ep, evap, hflx, gflux, drain, evbs, evcw, trans, sbsno, snowc, snohf + real(kind=kind_phys), dimension(:), intent(inout) :: sthick character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg @@ -688,17 +688,17 @@ subroutine sfc_noah_wrfv4_post_run (im, nsoil, land, flag_guess, flag_lsm, & implicit none integer, intent(in) :: im, nsoil - logical, dimension(im), intent(in) :: land, flag_guess, flag_lsm + logical, dimension(:), intent(in) :: land, flag_guess, flag_lsm real(kind=kind_phys), intent(in) :: rhowater, cp, hvap - real(kind=kind_phys), dimension(im), intent(in) :: cmc, rho1, sheat, eta, & + real(kind=kind_phys), dimension(:), intent(in) :: cmc, rho1, sheat, eta, & flx1, flx2, flx3, sncovr, runoff1, runoff2, soilm, snowhk - real(kind=kind_phys), dimension(im), intent(in) :: weasd_save, snwdph_save, tsfc_save, tsurf, canopy_save, smcmax - real(kind=kind_phys), dimension(im,nsoil), intent(in) :: smc_save, stc_save, slc_save + real(kind=kind_phys), dimension(:), intent(in) :: weasd_save, snwdph_save, tsfc_save, tsurf, canopy_save, smcmax + real(kind=kind_phys), dimension(:,:), intent(in) :: smc_save, stc_save, slc_save - real(kind=kind_phys), dimension(im), intent(inout) :: canopy, shflx, lhflx, & + real(kind=kind_phys), dimension(:), intent(inout) :: canopy, shflx, lhflx, & snohf, snowc, runoff, drain, stm, wet1 - real(kind=kind_phys), dimension(im), intent(inout) :: weasd, snwdph, tsfc - real(kind=kind_phys), dimension(im, nsoil), intent(inout) :: smc, stc, slc + real(kind=kind_phys), dimension(:), intent(inout) :: weasd, snwdph, tsfc + real(kind=kind_phys), dimension(:,:), intent(inout) :: smc, stc, slc character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg diff --git a/physics/sfc_noahmp_drv.F90 b/physics/sfc_noahmp_drv.F90 index 392e290712..a1f65f26a7 100644 --- a/physics/sfc_noahmp_drv.F90 +++ b/physics/sfc_noahmp_drv.F90 @@ -92,11 +92,11 @@ end subroutine noahmpdrv_finalize !! - If a "guess" run, restore the land-related prognostic fields. ! ! !----------------------------------- - subroutine noahmpdrv_run & + subroutine noahmpdrv_run & !................................... ! --- inputs: - ( im, km, itime, ps, u1, v1, t1, q1, soiltyp, vegtype, & - sigmaf, dlwflx, dswsfc, snet, delt, tg3, cm, ch, & + ( im, km, lsnowl, itime, ps, u1, v1, t1, q1, soiltyp, & + vegtype, sigmaf, dlwflx, dswsfc, snet, delt, tg3, cm, ch, & prsl1, prslki, zf, dry, wind, slopetyp, & shdmin, shdmax, snoalb, sfalb, flag_iter, flag_guess, & idveg, iopt_crs, iopt_btr, iopt_run, iopt_sfc, iopt_frz, & @@ -153,140 +153,141 @@ subroutine noahmpdrv_run & ! --- CCPP interface fields (in call order) ! - integer , intent(in) :: im ! horiz dimension and num of used pts - integer , intent(in) :: km ! vertical soil layer dimension - integer , intent(in) :: itime ! NOT USED - real(kind=kind_phys), dimension(im) , intent(in) :: ps ! surface pressure [Pa] - real(kind=kind_phys), dimension(im) , intent(in) :: u1 ! u-component of wind [m/s] - real(kind=kind_phys), dimension(im) , intent(in) :: v1 ! u-component of wind [m/s] - real(kind=kind_phys), dimension(im) , intent(in) :: t1 ! layer 1 temperature [K] - real(kind=kind_phys), dimension(im) , intent(in) :: q1 ! layer 1 specific humidity [kg/kg] - integer , dimension(im) , intent(in) :: soiltyp ! soil type (integer index) - integer , dimension(im) , intent(in) :: vegtype ! vegetation type (integer index) - real(kind=kind_phys), dimension(im) , intent(in) :: sigmaf ! areal fractional cover of green vegetation - real(kind=kind_phys), dimension(im) , intent(in) :: dlwflx ! downward longwave radiation [W/m2] - real(kind=kind_phys), dimension(im) , intent(in) :: dswsfc ! downward shortwave radiation [W/m2] - real(kind=kind_phys), dimension(im) , intent(in) :: snet ! total sky sfc netsw flx into ground[W/m2] - real(kind=kind_phys) , intent(in) :: delt ! time interval [s] - real(kind=kind_phys), dimension(im) , intent(in) :: tg3 ! deep soil temperature [K] - real(kind=kind_phys), dimension(im) , intent(in) :: cm ! surface exchange coeff for momentum [-] - real(kind=kind_phys), dimension(im) , intent(in) :: ch ! surface exchange coeff heat & moisture[-] - real(kind=kind_phys), dimension(im) , intent(in) :: prsl1 ! sfc layer 1 mean pressure [Pa] - real(kind=kind_phys), dimension(im) , intent(in) :: prslki ! to calculate potential temperature - real(kind=kind_phys), dimension(im) , intent(in) :: zf ! height of bottom layer [m] - logical , dimension(im) , intent(in) :: dry ! = T if a point with any land - real(kind=kind_phys), dimension(im) , intent(in) :: wind ! wind speed [m/s] - integer , dimension(im) , intent(in) :: slopetyp ! surface slope classification - real(kind=kind_phys), dimension(im) , intent(in) :: shdmin ! min green vegetation coverage [fraction] - real(kind=kind_phys), dimension(im) , intent(in) :: shdmax ! max green vegetation coverage [fraction] - real(kind=kind_phys), dimension(im) , intent(in) :: snoalb ! upper bound on max albedo over deep snow - real(kind=kind_phys), dimension(im) , intent(inout) :: sfalb ! mean surface albedo [fraction] - logical , dimension(im) , intent(in) :: flag_iter ! - logical , dimension(im) , intent(in) :: flag_guess ! - integer , intent(in) :: idveg ! option for dynamic vegetation - integer , intent(in) :: iopt_crs ! option for canopy stomatal resistance - integer , intent(in) :: iopt_btr ! option for soil moisture factor for stomatal resistance - integer , intent(in) :: iopt_run ! option for runoff and groundwater - integer , intent(in) :: iopt_sfc ! option for surface layer drag coeff (ch & cm) - integer , intent(in) :: iopt_frz ! option for supercooled liquid water (or ice fraction) - integer , intent(in) :: iopt_inf ! option for frozen soil permeability - integer , intent(in) :: iopt_rad ! option for radiation transfer - integer , intent(in) :: iopt_alb ! option for ground snow surface albedo - integer , intent(in) :: iopt_snf ! option for partitioning precipitation into rainfall & snowfall - integer , intent(in) :: iopt_tbot ! option for lower boundary condition of soil temperature - integer , intent(in) :: iopt_stc ! option for snow/soil temperature time scheme (only layer 1) - real(kind=kind_phys), dimension(im) , intent(in) :: xlatin ! latitude - real(kind=kind_phys), dimension(im) , intent(in) :: xcoszin ! cosine of zenith angle - integer , intent(in) :: iyrlen ! year length [days] - real(kind=kind_phys) , intent(in) :: julian ! julian day of year - real(kind=kind_phys), dimension(im) , intent(in) :: rainn_mp ! microphysics non-convective precipitation [mm] - real(kind=kind_phys), dimension(im) , intent(in) :: rainc_mp ! microphysics convective precipitation [mm] - real(kind=kind_phys), dimension(im) , intent(in) :: snow_mp ! microphysics snow [mm] - real(kind=kind_phys), dimension(im) , intent(in) :: graupel_mp ! microphysics graupel [mm] - real(kind=kind_phys), dimension(im) , intent(in) :: ice_mp ! microphysics ice/hail [mm] - real(kind=kind_phys) , intent(in) :: con_hvap ! latent heat condensation [J/kg] - real(kind=kind_phys) , intent(in) :: con_cp ! specific heat air [J/kg/K] - real(kind=kind_phys) , intent(in) :: con_jcal ! joules per calorie (not used) - real(kind=kind_phys) , intent(in) :: rhoh2o ! density of water [kg/m^3] - real(kind=kind_phys) , intent(in) :: con_eps ! Rd/Rv - real(kind=kind_phys) , intent(in) :: con_epsm1 ! Rd/Rv - 1 - real(kind=kind_phys) , intent(in) :: con_fvirt ! Rv/Rd - 1 - real(kind=kind_phys) , intent(in) :: con_rd ! gas constant air [J/kg/K] - real(kind=kind_phys) , intent(in) :: con_hfus ! lat heat H2O fusion [J/kg] - real(kind=kind_phys), dimension(im) , intent(inout) :: weasd ! water equivalent accumulated snow depth [mm] - real(kind=kind_phys), dimension(im) , intent(inout) :: snwdph ! snow depth [mm] - real(kind=kind_phys), dimension(im) , intent(inout) :: tskin ! ground surface skin temperature [K] - real(kind=kind_phys), dimension(im) , intent(inout) :: tprcp ! total precipitation [m] - real(kind=kind_phys), dimension(im) , intent(inout) :: srflag ! snow/rain flag for precipitation - real(kind=kind_phys), dimension(im,km) , intent(inout) :: smc ! total soil moisture content [m3/m3] - real(kind=kind_phys), dimension(im,km) , intent(inout) :: stc ! soil temp [K] - real(kind=kind_phys), dimension(im,km) , intent(inout) :: slc ! liquid soil moisture [m3/m3] - real(kind=kind_phys), dimension(im) , intent(inout) :: canopy ! canopy moisture content [mm] - real(kind=kind_phys), dimension(im) , intent(inout) :: trans ! total plant transpiration [m/s] - real(kind=kind_phys), dimension(im) , intent(inout) :: tsurf ! surface skin temperature [after iteration] - real(kind=kind_phys), dimension(im) , intent(inout) :: zorl ! surface roughness [cm] - real(kind=kind_phys), dimension(im) , intent(inout) :: snowxy ! actual no. of snow layers - real(kind=kind_phys), dimension(im) , intent(inout) :: tvxy ! vegetation leaf temperature [K] - real(kind=kind_phys), dimension(im) , intent(inout) :: tgxy ! bulk ground surface temperature [K] - real(kind=kind_phys), dimension(im) , intent(inout) :: canicexy ! canopy-intercepted ice [mm] - real(kind=kind_phys), dimension(im) , intent(inout) :: canliqxy ! canopy-intercepted liquid water [mm] - real(kind=kind_phys), dimension(im) , intent(inout) :: eahxy ! canopy air vapor pressure [Pa] - real(kind=kind_phys), dimension(im) , intent(inout) :: tahxy ! canopy air temperature [K] - real(kind=kind_phys), dimension(im) , intent(inout) :: cmxy ! bulk momentum drag coefficient [m/s] - real(kind=kind_phys), dimension(im) , intent(inout) :: chxy ! bulk sensible heat exchange coefficient [m/s] - real(kind=kind_phys), dimension(im) , intent(inout) :: fwetxy ! wetted or snowed fraction of the canopy [-] - real(kind=kind_phys), dimension(im) , intent(inout) :: sneqvoxy ! snow mass at last time step[mm h2o] - real(kind=kind_phys), dimension(im) , intent(inout) :: alboldxy ! snow albedo at last time step [-] - real(kind=kind_phys), dimension(im) , intent(inout) :: qsnowxy ! snowfall on the ground [mm/s] - real(kind=kind_phys), dimension(im) , intent(inout) :: wslakexy ! lake water storage [mm] - real(kind=kind_phys), dimension(im) , intent(inout) :: zwtxy ! water table depth [m] - real(kind=kind_phys), dimension(im) , intent(inout) :: waxy ! water in the "aquifer" [mm] - real(kind=kind_phys), dimension(im) , intent(inout) :: wtxy ! groundwater storage [mm] - real(kind=kind_phys), dimension(im,-2:0), intent(inout) :: tsnoxy ! snow temperature [K] - real(kind=kind_phys), dimension(im,-2:4), intent(inout) :: zsnsoxy ! snow/soil layer depth [m] - real(kind=kind_phys), dimension(im,-2:0), intent(inout) :: snicexy ! snow layer ice [mm] - real(kind=kind_phys), dimension(im,-2:0), intent(inout) :: snliqxy ! snow layer liquid water [mm] - real(kind=kind_phys), dimension(im) , intent(inout) :: lfmassxy ! leaf mass [g/m2] - real(kind=kind_phys), dimension(im) , intent(inout) :: rtmassxy ! mass of fine roots [g/m2] - real(kind=kind_phys), dimension(im) , intent(inout) :: stmassxy ! stem mass [g/m2] - real(kind=kind_phys), dimension(im) , intent(inout) :: woodxy ! mass of wood (incl. woody roots) [g/m2] - real(kind=kind_phys), dimension(im) , intent(inout) :: stblcpxy ! stable carbon in deep soil [g/m2] - real(kind=kind_phys), dimension(im) , intent(inout) :: fastcpxy ! short-lived carbon, shallow soil [g/m2] - real(kind=kind_phys), dimension(im) , intent(inout) :: xlaixy ! leaf area index [m2/m2] - real(kind=kind_phys), dimension(im) , intent(inout) :: xsaixy ! stem area index [m2/m2] - real(kind=kind_phys), dimension(im) , intent(inout) :: taussxy ! snow age factor [-] - real(kind=kind_phys), dimension(im,1:4) , intent(inout) :: smoiseq ! eq volumetric soil moisture [m3/m3] - real(kind=kind_phys), dimension(im) , intent(inout) :: smcwtdxy ! soil moisture content in the layer to the water table when deep - real(kind=kind_phys), dimension(im) , intent(inout) :: deeprechxy ! recharge to the water table when deep - real(kind=kind_phys), dimension(im) , intent(inout) :: rechxy ! recharge to the water table - real(kind=kind_phys), dimension(im) , intent(out) :: albdvis ! albedo - direct visible [fraction] - real(kind=kind_phys), dimension(im) , intent(out) :: albdnir ! albedo - direct NIR [fraction] - real(kind=kind_phys), dimension(im) , intent(out) :: albivis ! albedo - diffuse visible [fraction] - real(kind=kind_phys), dimension(im) , intent(out) :: albinir ! albedo - diffuse NIR [fraction] - real(kind=kind_phys), dimension(im) , intent(out) :: emiss ! sfc lw emissivity [fraction] - real(kind=kind_phys), dimension(im) , intent(out) :: sncovr1 ! snow cover over land [fraction] - real(kind=kind_phys), dimension(im) , intent(out) :: qsurf ! specific humidity at sfc [kg/kg] - real(kind=kind_phys), dimension(im) , intent(out) :: gflux ! soil heat flux [W/m2] - real(kind=kind_phys), dimension(im) , intent(out) :: drain ! subsurface runoff [mm/s] - real(kind=kind_phys), dimension(im) , intent(out) :: evap ! total latent heat flux [W/m2] - real(kind=kind_phys), dimension(im) , intent(out) :: hflx ! sensible heat flux [W/m2] - real(kind=kind_phys), dimension(im) , intent(out) :: ep ! potential evaporation [mm/s?] - real(kind=kind_phys), dimension(im) , intent(out) :: runoff ! surface runoff [mm/s] - real(kind=kind_phys), dimension(im) , intent(out) :: cmm ! cm*U [m/s] - real(kind=kind_phys), dimension(im) , intent(out) :: chh ! ch*U*rho [kg/m2/s] - real(kind=kind_phys), dimension(im) , intent(out) :: evbs ! direct soil evaporation [m/s] - real(kind=kind_phys), dimension(im) , intent(out) :: evcw ! canopy water evaporation [m/s] - real(kind=kind_phys), dimension(im) , intent(out) :: sbsno ! sublimation/deposit from snopack [W/m2] - real(kind=kind_phys), dimension(im) , intent(out) :: snowc ! fractional snow cover [-] - real(kind=kind_phys), dimension(im) , intent(out) :: stm ! total soil column moisture content [mm] - real(kind=kind_phys), dimension(im) , intent(out) :: snohf ! snow/freezing-rain latent heat flux [W/m2] - real(kind=kind_phys), dimension(im) , intent(out) :: smcwlt2 ! dry soil moisture threshold [m3/m3] - real(kind=kind_phys), dimension(im) , intent(out) :: smcref2 ! soil moisture threshold [m3/m3] - real(kind=kind_phys), dimension(im) , intent(out) :: wet1 ! normalized surface soil saturated fraction - real(kind=kind_phys), dimension(im) , intent(out) :: t2mmp ! combined T2m from tiles - real(kind=kind_phys), dimension(im) , intent(out) :: q2mp ! combined q2m from tiles - character(len=*) , intent(out) :: errmsg - integer , intent(out) :: errflg + integer , intent(in) :: im ! horiz dimension and num of used pts + integer , intent(in) :: km ! vertical soil layer dimension + integer , intent(in) :: lsnowl ! lower bound for snow level arrays + integer , intent(in) :: itime ! NOT USED + real(kind=kind_phys), dimension(:) , intent(in) :: ps ! surface pressure [Pa] + real(kind=kind_phys), dimension(:) , intent(in) :: u1 ! u-component of wind [m/s] + real(kind=kind_phys), dimension(:) , intent(in) :: v1 ! u-component of wind [m/s] + real(kind=kind_phys), dimension(:) , intent(in) :: t1 ! layer 1 temperature [K] + real(kind=kind_phys), dimension(:) , intent(in) :: q1 ! layer 1 specific humidity [kg/kg] + integer , dimension(:) , intent(in) :: soiltyp ! soil type (integer index) + integer , dimension(:) , intent(in) :: vegtype ! vegetation type (integer index) + real(kind=kind_phys), dimension(:) , intent(in) :: sigmaf ! areal fractional cover of green vegetation + real(kind=kind_phys), dimension(:) , intent(in) :: dlwflx ! downward longwave radiation [W/m2] + real(kind=kind_phys), dimension(:) , intent(in) :: dswsfc ! downward shortwave radiation [W/m2] + real(kind=kind_phys), dimension(:) , intent(in) :: snet ! total sky sfc netsw flx into ground[W/m2] + real(kind=kind_phys) , intent(in) :: delt ! time interval [s] + real(kind=kind_phys), dimension(:) , intent(in) :: tg3 ! deep soil temperature [K] + real(kind=kind_phys), dimension(:) , intent(in) :: cm ! surface exchange coeff for momentum [-] + real(kind=kind_phys), dimension(:) , intent(in) :: ch ! surface exchange coeff heat & moisture[-] + real(kind=kind_phys), dimension(:) , intent(in) :: prsl1 ! sfc layer 1 mean pressure [Pa] + real(kind=kind_phys), dimension(:) , intent(in) :: prslki ! to calculate potential temperature + real(kind=kind_phys), dimension(:) , intent(in) :: zf ! height of bottom layer [m] + logical , dimension(:) , intent(in) :: dry ! = T if a point with any land + real(kind=kind_phys), dimension(:) , intent(in) :: wind ! wind speed [m/s] + integer , dimension(:) , intent(in) :: slopetyp ! surface slope classification + real(kind=kind_phys), dimension(:) , intent(in) :: shdmin ! min green vegetation coverage [fraction] + real(kind=kind_phys), dimension(:) , intent(in) :: shdmax ! max green vegetation coverage [fraction] + real(kind=kind_phys), dimension(:) , intent(in) :: snoalb ! upper bound on max albedo over deep snow + real(kind=kind_phys), dimension(:) , intent(inout) :: sfalb ! mean surface albedo [fraction] + logical , dimension(:) , intent(in) :: flag_iter ! + logical , dimension(:) , intent(in) :: flag_guess ! + integer , intent(in) :: idveg ! option for dynamic vegetation + integer , intent(in) :: iopt_crs ! option for canopy stomatal resistance + integer , intent(in) :: iopt_btr ! option for soil moisture factor for stomatal resistance + integer , intent(in) :: iopt_run ! option for runoff and groundwater + integer , intent(in) :: iopt_sfc ! option for surface layer drag coeff (ch & cm) + integer , intent(in) :: iopt_frz ! option for supercooled liquid water (or ice fraction) + integer , intent(in) :: iopt_inf ! option for frozen soil permeability + integer , intent(in) :: iopt_rad ! option for radiation transfer + integer , intent(in) :: iopt_alb ! option for ground snow surface albedo + integer , intent(in) :: iopt_snf ! option for partitioning precipitation into rainfall & snowfall + integer , intent(in) :: iopt_tbot ! option for lower boundary condition of soil temperature + integer , intent(in) :: iopt_stc ! option for snow/soil temperature time scheme (only layer 1) + real(kind=kind_phys), dimension(:) , intent(in) :: xlatin ! latitude + real(kind=kind_phys), dimension(:) , intent(in) :: xcoszin ! cosine of zenith angle + integer , intent(in) :: iyrlen ! year length [days] + real(kind=kind_phys) , intent(in) :: julian ! julian day of year + real(kind=kind_phys), dimension(:) , intent(in) :: rainn_mp ! microphysics non-convective precipitation [mm] + real(kind=kind_phys), dimension(:) , intent(in) :: rainc_mp ! microphysics convective precipitation [mm] + real(kind=kind_phys), dimension(:) , intent(in) :: snow_mp ! microphysics snow [mm] + real(kind=kind_phys), dimension(:) , intent(in) :: graupel_mp ! microphysics graupel [mm] + real(kind=kind_phys), dimension(:) , intent(in) :: ice_mp ! microphysics ice/hail [mm] + real(kind=kind_phys) , intent(in) :: con_hvap ! latent heat condensation [J/kg] + real(kind=kind_phys) , intent(in) :: con_cp ! specific heat air [J/kg/K] + real(kind=kind_phys) , intent(in) :: con_jcal ! joules per calorie (not used) + real(kind=kind_phys) , intent(in) :: rhoh2o ! density of water [kg/m^3] + real(kind=kind_phys) , intent(in) :: con_eps ! Rd/Rv + real(kind=kind_phys) , intent(in) :: con_epsm1 ! Rd/Rv - 1 + real(kind=kind_phys) , intent(in) :: con_fvirt ! Rv/Rd - 1 + real(kind=kind_phys) , intent(in) :: con_rd ! gas constant air [J/kg/K] + real(kind=kind_phys) , intent(in) :: con_hfus ! lat heat H2O fusion [J/kg] + real(kind=kind_phys), dimension(:) , intent(inout) :: weasd ! water equivalent accumulated snow depth [mm] + real(kind=kind_phys), dimension(:) , intent(inout) :: snwdph ! snow depth [mm] + real(kind=kind_phys), dimension(:) , intent(inout) :: tskin ! ground surface skin temperature [K] + real(kind=kind_phys), dimension(:) , intent(inout) :: tprcp ! total precipitation [m] + real(kind=kind_phys), dimension(:) , intent(inout) :: srflag ! snow/rain flag for precipitation + real(kind=kind_phys), dimension(:,:) , intent(inout) :: smc ! total soil moisture content [m3/m3] + real(kind=kind_phys), dimension(:,:) , intent(inout) :: stc ! soil temp [K] + real(kind=kind_phys), dimension(:,:) , intent(inout) :: slc ! liquid soil moisture [m3/m3] + real(kind=kind_phys), dimension(:) , intent(inout) :: canopy ! canopy moisture content [mm] + real(kind=kind_phys), dimension(:) , intent(inout) :: trans ! total plant transpiration [m/s] + real(kind=kind_phys), dimension(:) , intent(inout) :: tsurf ! surface skin temperature [after iteration] + real(kind=kind_phys), dimension(:) , intent(inout) :: zorl ! surface roughness [cm] + real(kind=kind_phys), dimension(:) , intent(inout) :: snowxy ! actual no. of snow layers + real(kind=kind_phys), dimension(:) , intent(inout) :: tvxy ! vegetation leaf temperature [K] + real(kind=kind_phys), dimension(:) , intent(inout) :: tgxy ! bulk ground surface temperature [K] + real(kind=kind_phys), dimension(:) , intent(inout) :: canicexy ! canopy-intercepted ice [mm] + real(kind=kind_phys), dimension(:) , intent(inout) :: canliqxy ! canopy-intercepted liquid water [mm] + real(kind=kind_phys), dimension(:) , intent(inout) :: eahxy ! canopy air vapor pressure [Pa] + real(kind=kind_phys), dimension(:) , intent(inout) :: tahxy ! canopy air temperature [K] + real(kind=kind_phys), dimension(:) , intent(inout) :: cmxy ! bulk momentum drag coefficient [m/s] + real(kind=kind_phys), dimension(:) , intent(inout) :: chxy ! bulk sensible heat exchange coefficient [m/s] + real(kind=kind_phys), dimension(:) , intent(inout) :: fwetxy ! wetted or snowed fraction of the canopy [-] + real(kind=kind_phys), dimension(:) , intent(inout) :: sneqvoxy ! snow mass at last time step[mm h2o] + real(kind=kind_phys), dimension(:) , intent(inout) :: alboldxy ! snow albedo at last time step [-] + real(kind=kind_phys), dimension(:) , intent(inout) :: qsnowxy ! snowfall on the ground [mm/s] + real(kind=kind_phys), dimension(:) , intent(inout) :: wslakexy ! lake water storage [mm] + real(kind=kind_phys), dimension(:) , intent(inout) :: zwtxy ! water table depth [m] + real(kind=kind_phys), dimension(:) , intent(inout) :: waxy ! water in the "aquifer" [mm] + real(kind=kind_phys), dimension(:) , intent(inout) :: wtxy ! groundwater storage [mm] + real(kind=kind_phys), dimension(:,lsnowl:), intent(inout) :: tsnoxy ! snow temperature [K] + real(kind=kind_phys), dimension(:,lsnowl:), intent(inout) :: zsnsoxy ! snow/soil layer depth [m] + real(kind=kind_phys), dimension(:,lsnowl:), intent(inout) :: snicexy ! snow layer ice [mm] + real(kind=kind_phys), dimension(:,lsnowl:), intent(inout) :: snliqxy ! snow layer liquid water [mm] + real(kind=kind_phys), dimension(:) , intent(inout) :: lfmassxy ! leaf mass [g/m2] + real(kind=kind_phys), dimension(:) , intent(inout) :: rtmassxy ! mass of fine roots [g/m2] + real(kind=kind_phys), dimension(:) , intent(inout) :: stmassxy ! stem mass [g/m2] + real(kind=kind_phys), dimension(:) , intent(inout) :: woodxy ! mass of wood (incl. woody roots) [g/m2] + real(kind=kind_phys), dimension(:) , intent(inout) :: stblcpxy ! stable carbon in deep soil [g/m2] + real(kind=kind_phys), dimension(:) , intent(inout) :: fastcpxy ! short-lived carbon, shallow soil [g/m2] + real(kind=kind_phys), dimension(:) , intent(inout) :: xlaixy ! leaf area index [m2/m2] + real(kind=kind_phys), dimension(:) , intent(inout) :: xsaixy ! stem area index [m2/m2] + real(kind=kind_phys), dimension(:) , intent(inout) :: taussxy ! snow age factor [-] + real(kind=kind_phys), dimension(:,:) , intent(inout) :: smoiseq ! eq volumetric soil moisture [m3/m3] + real(kind=kind_phys), dimension(:) , intent(inout) :: smcwtdxy ! soil moisture content in the layer to the water table when deep + real(kind=kind_phys), dimension(:) , intent(inout) :: deeprechxy ! recharge to the water table when deep + real(kind=kind_phys), dimension(:) , intent(inout) :: rechxy ! recharge to the water table + real(kind=kind_phys), dimension(:) , intent(out) :: albdvis ! albedo - direct visible [fraction] + real(kind=kind_phys), dimension(:) , intent(out) :: albdnir ! albedo - direct NIR [fraction] + real(kind=kind_phys), dimension(:) , intent(out) :: albivis ! albedo - diffuse visible [fraction] + real(kind=kind_phys), dimension(:) , intent(out) :: albinir ! albedo - diffuse NIR [fraction] + real(kind=kind_phys), dimension(:) , intent(out) :: emiss ! sfc lw emissivity [fraction] + real(kind=kind_phys), dimension(:) , intent(out) :: sncovr1 ! snow cover over land [fraction] + real(kind=kind_phys), dimension(:) , intent(out) :: qsurf ! specific humidity at sfc [kg/kg] + real(kind=kind_phys), dimension(:) , intent(out) :: gflux ! soil heat flux [W/m2] + real(kind=kind_phys), dimension(:) , intent(out) :: drain ! subsurface runoff [mm/s] + real(kind=kind_phys), dimension(:) , intent(out) :: evap ! total latent heat flux [W/m2] + real(kind=kind_phys), dimension(:) , intent(out) :: hflx ! sensible heat flux [W/m2] + real(kind=kind_phys), dimension(:) , intent(out) :: ep ! potential evaporation [mm/s?] + real(kind=kind_phys), dimension(:) , intent(out) :: runoff ! surface runoff [mm/s] + real(kind=kind_phys), dimension(:) , intent(out) :: cmm ! cm*U [m/s] + real(kind=kind_phys), dimension(:) , intent(out) :: chh ! ch*U*rho [kg/m2/s] + real(kind=kind_phys), dimension(:) , intent(out) :: evbs ! direct soil evaporation [m/s] + real(kind=kind_phys), dimension(:) , intent(out) :: evcw ! canopy water evaporation [m/s] + real(kind=kind_phys), dimension(:) , intent(out) :: sbsno ! sublimation/deposit from snopack [W/m2] + real(kind=kind_phys), dimension(:) , intent(out) :: snowc ! fractional snow cover [-] + real(kind=kind_phys), dimension(:) , intent(out) :: stm ! total soil column moisture content [mm] + real(kind=kind_phys), dimension(:) , intent(out) :: snohf ! snow/freezing-rain latent heat flux [W/m2] + real(kind=kind_phys), dimension(:) , intent(out) :: smcwlt2 ! dry soil moisture threshold [m3/m3] + real(kind=kind_phys), dimension(:) , intent(out) :: smcref2 ! soil moisture threshold [m3/m3] + real(kind=kind_phys), dimension(:) , intent(out) :: wet1 ! normalized surface soil saturated fraction + real(kind=kind_phys), dimension(:) , intent(out) :: t2mmp ! combined T2m from tiles + real(kind=kind_phys), dimension(:) , intent(out) :: q2mp ! combined q2m from tiles + character(len=*) , intent(out) :: errmsg + integer , intent(out) :: errflg ! ! --- some new options, hard code for now @@ -339,11 +340,11 @@ subroutine noahmpdrv_run & real(kind=kind_phys), dimension(im, km) :: stc_old real(kind=kind_phys), dimension(im, km) :: slc_old real(kind=kind_phys), dimension(im, km) :: smoiseq_old - real(kind=kind_phys), dimension(im,-2: 0) :: tsno_old - real(kind=kind_phys), dimension(im,-2: 0) :: snice_old - real(kind=kind_phys), dimension(im,-2: 0) :: snliq_old - real(kind=kind_phys), dimension(im,-2:km) :: zsnso_old - real(kind=kind_phys), dimension(im,-2:km) :: tsnso_old + real(kind=kind_phys), dimension(im,lsnowl: 0) :: tsno_old + real(kind=kind_phys), dimension(im,lsnowl: 0) :: snice_old + real(kind=kind_phys), dimension(im,lsnowl: 0) :: snliq_old + real(kind=kind_phys), dimension(im,lsnowl:km) :: zsnso_old + real(kind=kind_phys), dimension(im,lsnowl:km) :: tsnso_old ! ! --- local inputs to noah-mp and glacier subroutines; listed in order in noah-mp call diff --git a/physics/sfc_noahmp_drv.meta b/physics/sfc_noahmp_drv.meta index 6cdb5901ed..76811a3783 100644 --- a/physics/sfc_noahmp_drv.meta +++ b/physics/sfc_noahmp_drv.meta @@ -93,6 +93,14 @@ type = integer intent = in optional = F +[lsnowl] + standard_name = lower_bound_of_snow_vertical_dimension_for_land_surface_model + long_name = lower bound of of snow-related arrays for land surface model + units = count + dimensions = () + type = integer + intent = in + optional = F [itime] standard_name = index_of_time_step long_name = current forecast iteration @@ -320,7 +328,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = in + intent = inout optional = F [flag_iter] standard_name = flag_for_iteration diff --git a/physics/sfc_nst.f b/physics/sfc_nst.f index 517aa7ff01..f03e725f36 100644 --- a/physics/sfc_nst.f +++ b/physics/sfc_nst.f @@ -188,26 +188,26 @@ subroutine sfc_nst_run & & nstf_name5 real (kind=kind_phys), intent(in) :: hvap, cp, hfus, jcal, eps, & & epsm1, rvrdm1, rd, rhw0, sbc, pi, tgice - real (kind=kind_phys), dimension(im), intent(in) :: ps, u1, v1, & + real (kind=kind_phys), dimension(:), intent(in) :: ps, u1, v1, & & t1, q1, tref, cm, ch, prsl1, prslki, prsik1, prslk1, & & xlon,xcosz, & & sinlat, stress, sfcemis, dlwflx, sfcnsw, rain, wind real (kind=kind_phys), intent(in) :: timestep real (kind=kind_phys), intent(in) :: solhr - logical, dimension(im), intent(in) :: flag_iter, flag_guess, wet, & - & use_flake + logical, dimension(:), intent(in) :: flag_iter, flag_guess, wet, & + & use_flake ! &, icy logical, intent(in) :: lprnt ! --- input/outputs: ! control variables of dtl system (5+2) and sl (2) and coefficients for d(tz)/d(ts) calculation - real (kind=kind_phys), dimension(im), intent(inout) :: tskin, & + real (kind=kind_phys), dimension(:), intent(inout) :: tskin, & & tsurf, xt, xs, xu, xv, xz, zm, xtts, xzts, dt_cool, & & z_c, c_0, c_d, w_0, w_d, d_conv, ifd, qrain ! --- outputs: - real (kind=kind_phys), dimension(im), intent(inout) :: & + real (kind=kind_phys), dimension(:), intent(inout) :: & & qsurf, gflux, cmm, chh, evap, hflx, ep character(len=*), intent(out) :: errmsg @@ -683,15 +683,15 @@ subroutine sfc_nst_pre_run ! --- inputs: integer, intent(in) :: im, nthreads - logical, dimension(im), intent(in) :: wet, use_flake + logical, dimension(:), intent(in) :: wet, use_flake real (kind=kind_phys), intent(in) :: tgice - real (kind=kind_phys), dimension(im), intent(in) :: + real (kind=kind_phys), dimension(:), intent(in) :: & tsfc_wat, xt, xz, dt_cool, z_c, oceanfrac, & tsfco logical, intent(in) :: cplflx ! --- input/outputs: - real (kind=kind_phys), dimension(im), intent(inout) :: + real (kind=kind_phys), dimension(:), intent(inout) :: & tsurf_wat, tseal, tref ! --- outputs: @@ -794,20 +794,19 @@ subroutine sfc_nst_post_run & ! --- inputs: integer, intent(in) :: im, kdt, nthreads - logical, dimension(im), intent(in) :: wet, icy, use_flake + logical, dimension(:), intent(in) :: wet, icy, use_flake real (kind=kind_phys), intent(in) :: rlapse, tgice - real (kind=kind_phys), dimension(im), intent(in) :: oro, oro_uf + real (kind=kind_phys), dimension(:), intent(in) :: oro, oro_uf integer, intent(in) :: nstf_name1, nstf_name4, nstf_name5 - real (kind=kind_phys), dimension(im), intent(in) :: xt, xz, & + real (kind=kind_phys), dimension(:), intent(in) :: xt, xz, & & dt_cool, z_c, tref, xlon ! --- input/outputs: - real (kind=kind_phys), dimension(im), intent(inout) :: tsurf_wat, & + real (kind=kind_phys), dimension(:), intent(inout) :: tsurf_wat, & & tsfc_wat ! --- outputs: - real (kind=kind_phys), dimension(size(xlon,1)), intent(out) :: & - & dtzm + real (kind=kind_phys), dimension(:), intent(out) :: dtzm character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg diff --git a/physics/sfc_ocean.F b/physics/sfc_ocean.F index 736b45f922..67a6df04ff 100644 --- a/physics/sfc_ocean.F +++ b/physics/sfc_ocean.F @@ -99,13 +99,13 @@ subroutine sfc_ocean_run & integer, intent(in) :: im real (kind=kind_phys), intent(in) :: rd, eps, epsm1, rvrdm1 - real (kind=kind_phys), dimension(im), intent(in) :: ps, & + real (kind=kind_phys), dimension(:), intent(in) :: ps, & & t1, q1, tskin, cm, ch, prsl1, prslki, wind - logical, dimension(im), intent(in) :: flag_iter, wet, use_flake + logical, dimension(:), intent(in) :: flag_iter, wet, use_flake ! --- outputs: - real (kind=kind_phys), dimension(im), intent(inout) :: qsurf, & + real (kind=kind_phys), dimension(:), intent(inout) :: qsurf, & & cmm, chh, gflux, evap, hflx, ep character(len=*), intent(out) :: errmsg diff --git a/physics/sfc_sice.f b/physics/sfc_sice.f index 081bbf48e3..e739e724cf 100644 --- a/physics/sfc_sice.f +++ b/physics/sfc_sice.f @@ -14,9 +14,6 @@ end subroutine sfc_sice_finalize !>\defgroup gfs_sice_main GFS Three-layer Thermodynomics Sea-Ice Scheme Module !! \brief This is three-layer thermodynomics sea-ice model based on Winton (2000) \cite winton_2000. -!! \section arg_table_sfc_sice_run Argument Table -!! \htmlinclude sfc_sice_run.html -!! !> \section general_sice_run GFS Sea Ice Driver General Algorithm !!The model has four prognostic variables: the snow layer thickness \f$h_s\f$, the ice layer thickness !! \f$h_i\f$, the upper and lower ice layer temperatures located at the midpoints of the layers @@ -38,19 +35,22 @@ end subroutine sfc_sice_finalize !! the water line to ice, and 3) to equalize the thickness of the two !! ice layers. !> \section detailed_sice_run GFS Sea Ice Driver Detailed Algorithm +!! +!! \section arg_table_sfc_sice_run Argument Table +!! \htmlinclude sfc_sice_run.html +!! !> @{ subroutine sfc_sice_run & - & ( im, kice, sbc, hvap, tgice, cp, eps, epsm1, rvrdm1, grav, & ! --- inputs: - & t0c, rd, ps, t1, q1, delt, & - & sfcemis, dlwflx, sfcnsw, sfcdsw, srflag, & - & cm, ch, prsl1, prslki, prsik1, prslk1, wind, & - & flag_iter, lprnt, ipr, & - & hice, fice, tice, weasd, tskin, tprcp, tiice, ep, & ! --- input/outputs: - & snwdph, qsurf, snowmt, gflux, cmm, chh, evap, hflx, & ! - & frac_grid, icy, islmsk_cice, & - & min_lakeice, min_seaice, oceanfrac, & - & errmsg, errflg - & ) + & ( im, kice, sbc, hvap, tgice, cp, eps, epsm1, rvrdm1, grav, & ! --- inputs: + & t0c, rd, ps, t1, q1, delt, & + & sfcemis, dlwflx, sfcnsw, sfcdsw, srflag, & + & cm, ch, prsl1, prslki, prsik1, prslk1, wind, & + & flag_iter, lprnt, ipr, & + & hice, fice, tice, weasd, tskin, tprcp, tiice, ep, & ! --- input/outputs: + & snwdph, qsurf, snowmt, gflux, cmm, chh, evap, hflx, & ! + & frac_grid, icy, islmsk_cice, & + & min_lakeice, min_seaice, oceanfrac, & + & errmsg, errflg ) ! ===================================================================== ! ! description: ! @@ -157,25 +157,25 @@ subroutine sfc_sice_run & real (kind=kind_phys), intent(in) :: sbc, hvap, tgice, cp, eps, & & epsm1, grav, rvrdm1, t0c, rd - real (kind=kind_phys), dimension(im), intent(in) :: ps, & + real (kind=kind_phys), dimension(:), intent(in) :: ps, & & t1, q1, sfcemis, dlwflx, sfcnsw, sfcdsw, srflag, cm, ch, & & prsl1, prslki, prsik1, prslk1, wind, oceanfrac ! integer, dimension(im), intent(in) :: islimsk - integer, dimension(im), intent(in) :: islmsk_cice + integer, dimension(:), intent(in) :: islmsk_cice real (kind=kind_phys), intent(in) :: delt, min_seaice, & & min_lakeice - logical, dimension(im), intent(in) :: flag_iter, icy + logical, dimension(:), intent(in) :: flag_iter, icy ! --- input/outputs: - real (kind=kind_phys), dimension(im), intent(inout) :: hice, & + real (kind=kind_phys), dimension(:), intent(inout) :: hice, & & fice, tice, weasd, tskin, tprcp, ep - real (kind=kind_phys), dimension(im,kice), intent(inout) :: tiice + real (kind=kind_phys), dimension(:,:), intent(inout) :: tiice ! --- outputs: - real (kind=kind_phys), dimension(im), intent(inout) :: snwdph, & + real (kind=kind_phys), dimension(:), intent(inout) :: snwdph, & & qsurf, snowmt, gflux, cmm, chh, evap, hflx character(len=*), intent(out) :: errmsg diff --git a/physics/shinhongvdif.F90 b/physics/shinhongvdif.F90 index e0b775f1b0..e93ad32459 100644 --- a/physics/shinhongvdif.F90 +++ b/physics/shinhongvdif.F90 @@ -111,33 +111,33 @@ subroutine shinhongvdif_run(im,km,ux,vx,tx,qx,p2d,p2di,pi2d, & logical, intent(in ) :: lssav, ldiag3d, qdiag3d, & flag_for_pbl_generic_tend ! 3D in - real(kind=kind_phys), dimension(im, km) , & + real(kind=kind_phys), dimension(:,:) , & intent(in ) :: phil, & pi2d, & p2d, & ux, & vx, & tx - real(kind=kind_phys), dimension( im, km, ntrac ) , & + real(kind=kind_phys), dimension(:,:,:) , & intent(in ) :: qx - real(kind=kind_phys), dimension( im, km+1 ) , & + real(kind=kind_phys), dimension(:,:) , & intent(in ) :: p2di, & phii ! 3D in&out - real(kind=kind_phys), dimension(im, km) , & + real(kind=kind_phys), dimension(:,:) , & intent(inout) :: utnp, & vtnp, & ttnp - real(kind=kind_phys), dimension(im, km, ntrac ) , & + real(kind=kind_phys), dimension(:,:,:) , & intent(inout) :: qtnp - real(kind=kind_phys), dimension(:,:) , & + real(kind=kind_phys), dimension(:,:) , & intent(inout) :: du3dt_PBL, dv3dt_PBL, dt3dt_PBL, dq3dt_PBL, do3dt_PBL ! 2D in - integer, dimension(im) , & + integer, dimension(:) , & intent(in ) :: landmask - real(kind=kind_phys), dimension(im) , & + real(kind=kind_phys), dimension(:) , & intent(in ) :: heat, & evap, & br, & @@ -151,10 +151,10 @@ subroutine shinhongvdif_run(im,km,ux,vx,tx,qx,p2d,p2di,pi2d, & v10, & dx ! 2D: out - integer, dimension(im) , & + integer, dimension(:) , & intent(out ) :: kpbl1d - real(kind=kind_phys), dimension(im) , & + real(kind=kind_phys), dimension(:) , & intent(out ) :: hpbl, & dusfc, & dvsfc, & @@ -1326,7 +1326,7 @@ subroutine shinhongvdif_run(im,km,ux,vx,tx,qx,p2d,p2di,pi2d, & ! !---- find the mixing length ! - call mixlen(lmh,uxk,vxk,txk,thxk,qx(i,kts,1),qx(i,kts,ntcw) & + call mixlen(lmh,uxk,vxk,txk,thxk,qx(i,kts:kte,1),qx(i,kts:kte,ntcw) & ,q2xk,zqk,ust(i),corf,epshol(i) & ,s2,gh,rig,el & ,hpbl(i),kpbl(i),lmxl,ct(i) & @@ -1477,13 +1477,13 @@ subroutine tridin_ysu(cl,cm,cu,r2,au,f2,its,ite,kts,kte,nt) ! real(kind=kind_phys), dimension( its:ite, kts:kte ) , & intent(in ) :: cm - real(kind=kind_phys), dimension( its:ite, kts:kte,nt ) , & + real(kind=kind_phys), dimension( its:ite, kts:kte,nt) , & intent(in ) :: r2 ! real(kind=kind_phys), dimension( its:ite, kts:kte ) , & intent(inout) :: au, & cu - real(kind=kind_phys), dimension( its:ite, kts:kte,nt ) , & + real(kind=kind_phys), dimension( its:ite, kts:kte,nt) , & intent(inout) :: f2 ! real(kind=kind_phys) :: fk @@ -1624,7 +1624,7 @@ subroutine mixlen(lmh,u,v,t,the,q,cwm,q2,z,ustar,corf,epshol, & qol2st,qol2un,qdzl,rdz,sq,srel,szq,tem,thm,vkrmz,rlambda, & rlb,rln,f real(kind=kind_phys) :: ckp - real(kind=kind_phys), dimension( kts:kte ) :: q1, & + real(kind=kind_phys), dimension( kts:kte ) :: q1, & en2 real(kind=kind_phys), dimension( kts+1:kte ) :: dth, & elm, & @@ -1790,12 +1790,12 @@ subroutine prodq2(lmh,dtturbl,ustar,s2,ri,q2,el,z,akm,akh, & ! logical, intent(in ) :: pblflg ! - real(kind=kind_phys), dimension( kts:kte ) , & + real(kind=kind_phys), dimension( : ) , & intent(in ) :: uxk, & vxk, & thxk, & thvxk - real(kind=kind_phys), dimension( kts+1:kte ) , & + real(kind=kind_phys), dimension( : ) , & intent(in ) :: s2, & ri, & akm, & @@ -1806,10 +1806,10 @@ subroutine prodq2(lmh,dtturbl,ustar,s2,ri,q2,el,z,akm,akh, & vfxpbl, & qfxpbl ! - real(kind=kind_phys), dimension( kts:kte+1 ) , & + real(kind=kind_phys), dimension( : ) , & intent(in ) :: z ! - real(kind=kind_phys), dimension( kts:kte ) , & + real(kind=kind_phys), dimension( : ) , & intent(inout) :: q2 ! ! local vars @@ -1897,16 +1897,16 @@ subroutine vdifq(lmh,dtdif,q2,el,z, & ! logical, intent(in ) :: pblflg ! - real(kind=kind_phys), dimension( kts:kte ) , & + real(kind=kind_phys), dimension( : ) , & intent(in ) :: hgame, & ptke1 - real(kind=kind_phys), dimension( kts+1:kte ) , & + real(kind=kind_phys), dimension( : ) , & intent(in ) :: el, & akhk - real(kind=kind_phys), dimension( kts:kte+1 ) , & + real(kind=kind_phys), dimension( : ) , & intent(in ) :: z ! - real(kind=kind_phys), dimension( kts:kte ) , & + real(kind=kind_phys), dimension( : ) , & intent(inout) :: q2 ! ! local vars diff --git a/physics/shinhongvdif.meta b/physics/shinhongvdif.meta index 8c850ff37f..6783fd8002 100644 --- a/physics/shinhongvdif.meta +++ b/physics/shinhongvdif.meta @@ -86,18 +86,18 @@ kind = kind_phys intent = in optional = F -[vtnp] - standard_name = tendency_of_y_wind_due_to_model_physics - long_name = updated tendency of the y wind +[utnp] + standard_name = tendency_of_x_wind_due_to_model_physics + long_name = updated tendency of the x wind units = m s-2 dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout optional = F -[utnp] - standard_name = tendency_of_x_wind_due_to_model_physics - long_name = updated tendency of the x wind +[vtnp] + standard_name = tendency_of_y_wind_due_to_model_physics + long_name = updated tendency of the y wind units = m s-2 dimensions = (horizontal_loop_extent,vertical_dimension) type = real diff --git a/physics/ugwpv1_gsldrag.F90 b/physics/ugwpv1_gsldrag.F90 index 2bfb2948de..44652ffac0 100644 --- a/physics/ugwpv1_gsldrag.F90 +++ b/physics/ugwpv1_gsldrag.F90 @@ -84,15 +84,15 @@ subroutine ugwpv1_gsldrag_init ( & integer, intent (in) :: nlunit character(len=*), intent (in) :: input_nml_file(:) integer, intent (in) :: logunit - integer, intent(in) :: jdat(8) + integer, intent (in) :: jdat(:) integer, intent (in) :: lonr integer, intent (in) :: levs integer, intent (in) :: latr - real(kind=kind_phys), intent (in) :: ak(levs+1), bk(levs+1) + real(kind=kind_phys), intent (in) :: ak(:), bk(:) real(kind=kind_phys), intent (in) :: dtp real(kind=kind_phys), intent (in) :: con_p0, con_pi, con_rerth - real(kind=kind_phys), intent(in) :: con_g, con_cp, con_rd, con_rv, con_omega, con_fvirt + real(kind=kind_phys), intent (in) :: con_g, con_cp, con_rd, con_rv, con_omega, con_fvirt logical, intent (in) :: do_ugwp logical, intent (in) :: do_ugwp_v0, do_ugwp_v0_orog_only, & @@ -308,7 +308,6 @@ subroutine ugwpv1_gsldrag_run(me, master, im, levs, ntrac, lonr, dtp, fhzero,kd ldiag3d, lssav, flag_for_gwd_generic_tend, do_gsl_drag_ls_bl, do_gsl_drag_ss, & do_gsl_drag_tofd, do_ugwp_v1, do_ugwp_v1_orog_only, do_ugwp_v1_w_gsldrag, & gwd_opt, do_tofd, ldiag_ugwp, cdmbgwd, jdat, & -! con_g, con_omega, con_pi, con_cp, con_rd, con_rv, con_rerth, con_fvirt, & nmtvr, hprime, oc, theta, sigma, gamma, elvmax, clx, oa4, & varss,oc1ss,oa4ss,ol4ss, dx, xlat, xlat_d, sinlat, coslat, area, & rain, br1, hpbl, kpbl, slmsk, & @@ -318,10 +317,10 @@ subroutine ugwpv1_gsldrag_run(me, master, im, levs, ntrac, lonr, dtp, fhzero,kd dudt_oss, dvdt_oss, du_osscol, dv_osscol, & dudt_ofd, dvdt_ofd, du_ofdcol, dv_ofdcol, & dudt_ngw, dvdt_ngw, dtdt_ngw, kdis_ngw, dudt_gw, dvdt_gw, dtdt_gw, kdis_gw, & - tau_ogw, tau_ngw, tau_oss, & + tau_ogw, tau_ngw, tau_oss, & zogw, zlwb, zobl, zngw, dusfcg, dvsfcg, dudt, dvdt, dtdt, rdxzb, & ldu3dt_ogw, ldv3dt_ogw, ldt3dt_ogw, ldu3dt_ngw, ldv3dt_ngw, ldt3dt_ngw, & - lprnt, ipr, errmsg, errflg) + lprnt, ipr, errmsg, errflg) ! !######################################################################## ! Attention New Arrays and Names must be ADDED inside @@ -364,20 +363,20 @@ subroutine ugwpv1_gsldrag_run(me, master, im, levs, ntrac, lonr, dtp, fhzero,kd integer, intent(in) :: me, master, im, levs, ntrac,lonr real(kind=kind_phys), intent(in) :: dtp, fhzero - integer, intent(in) :: kdt, jdat(8) + integer, intent(in) :: kdt, jdat(:) ! SSO parameters and variables integer, intent(in) :: gwd_opt !gwd_opt and nmtvr are "redundant" controls integer, intent(in) :: nmtvr - real(kind=kind_phys), intent(in) :: cdmbgwd(4) ! for gsl_drag + real(kind=kind_phys), intent(in) :: cdmbgwd(:) ! for gsl_drag - real(kind=kind_phys), intent(in), dimension(im) :: hprime, oc, theta, sigma, gamma + real(kind=kind_phys), intent(in), dimension(:) :: hprime, oc, theta, sigma, gamma - real(kind=kind_phys), intent(in), dimension(im) :: elvmax - real(kind=kind_phys), intent(in), dimension(im, 4) :: clx, oa4 + real(kind=kind_phys), intent(in), dimension(:) :: elvmax + real(kind=kind_phys), intent(in), dimension(:,:) :: clx, oa4 - real(kind=kind_phys), intent(in), dimension(im) :: varss,oc1ss,dx - real(kind=kind_phys), intent(in), dimension(im, 4) :: oa4ss,ol4ss + real(kind=kind_phys), intent(in), dimension(:) :: varss,oc1ss,dx + real(kind=kind_phys), intent(in), dimension(:,:) :: oa4ss,ol4ss !===== !ccpp-style passing constants, I prefer to take them out from the "call-subr" list @@ -386,48 +385,48 @@ subroutine ugwpv1_gsldrag_run(me, master, im, levs, ntrac, lonr, dtp, fhzero,kd ! con_rv, con_rerth, con_fvirt ! grids - real(kind=kind_phys), intent(in), dimension(im) :: xlat, xlat_d, sinlat, coslat, area + real(kind=kind_phys), intent(in), dimension(:) :: xlat, xlat_d, sinlat, coslat, area ! State vars + PBL/slmsk +rain - real(kind=kind_phys), intent(in), dimension(im, levs) :: del, ugrs, vgrs, tgrs, prsl, prslk, phil - real(kind=kind_phys), intent(in), dimension(im, levs+1) :: prsi, phii - real(kind=kind_phys), intent(in), dimension(im, levs) :: q1 - integer, intent(in), dimension(im) :: kpbl + real(kind=kind_phys), intent(in), dimension(:,:) :: del, ugrs, vgrs, tgrs, prsl, prslk, phil + real(kind=kind_phys), intent(in), dimension(:,:) :: prsi, phii + real(kind=kind_phys), intent(in), dimension(:,:) :: q1 + integer, intent(in), dimension(:) :: kpbl - real(kind=kind_phys), intent(in), dimension(im) :: rain - real(kind=kind_phys), intent(in), dimension(im) :: br1, hpbl, slmsk + real(kind=kind_phys), intent(in), dimension(:) :: rain + real(kind=kind_phys), intent(in), dimension(:) :: br1, hpbl, slmsk ! ! moved to GFS_phys_time_vary -! real(kind=kind_phys), intent(in), dimension(im) :: ddy_j1tau, ddy_j2tau -! integer, intent(in), dimension(im) :: jindx1_tau, jindx2_tau - real(kind=kind_phys), intent(in), dimension(im) :: tau_amf +! real(kind=kind_phys), intent(in), dimension(:) :: ddy_j1tau, ddy_j2tau +! integer, intent(in), dimension(:) :: jindx1_tau, jindx2_tau + real(kind=kind_phys), intent(in), dimension(:) :: tau_amf !Output (optional): - real(kind=kind_phys), intent(out), dimension(im) :: & + real(kind=kind_phys), intent(out), dimension(:) :: & du_ogwcol, dv_ogwcol, du_oblcol, dv_oblcol, & du_osscol, dv_osscol, du_ofdcol, dv_ofdcol ! ! we may add later but due to launch in the upper layes ~ mPa comparing to ORO Pa*(0.1) ! du_ngwcol, dv_ngwcol - real(kind=kind_phys), intent(out), dimension(im) :: dusfcg, dvsfcg - real(kind=kind_phys), intent(out), dimension(im) :: tau_ogw, tau_ngw, tau_oss + real(kind=kind_phys), intent(out), dimension(:) :: dusfcg, dvsfcg + real(kind=kind_phys), intent(out), dimension(:) :: tau_ogw, tau_ngw, tau_oss - real(kind=kind_phys), intent(out) , dimension(im, levs) :: & + real(kind=kind_phys), intent(out) , dimension(:,:) :: & dudt_ogw, dvdt_ogw, dudt_obl, dvdt_obl, & dudt_oss, dvdt_oss, dudt_ofd, dvdt_ofd - real(kind=kind_phys), intent(out) , dimension(im, levs) :: dudt_ngw, dvdt_ngw, kdis_ngw - real(kind=kind_phys), intent(out) , dimension(im, levs) :: dudt_gw, dvdt_gw, kdis_gw + real(kind=kind_phys), intent(out) , dimension(:,:) :: dudt_ngw, dvdt_ngw, kdis_ngw + real(kind=kind_phys), intent(out) , dimension(:,:) :: dudt_gw, dvdt_gw, kdis_gw - real(kind=kind_phys), intent(out) , dimension(im, levs) :: dtdt_ngw, dtdt_gw + real(kind=kind_phys), intent(out) , dimension(:,:) :: dtdt_ngw, dtdt_gw - real(kind=kind_phys), intent(out) , dimension(im) :: zogw, zlwb, zobl, zngw + real(kind=kind_phys), intent(out) , dimension(:) :: zogw, zlwb, zobl, zngw ! ! - real(kind=kind_phys), intent(inout), dimension(im, levs) :: dudt, dvdt, dtdt + real(kind=kind_phys), intent(inout), dimension(:,:) :: dudt, dvdt, dtdt ! ! These arrays are only allocated if ldiag=.true. @@ -439,7 +438,7 @@ subroutine ugwpv1_gsldrag_run(me, master, im, levs, ntrac, lonr, dtp, fhzero,kd - real(kind=kind_phys), intent(out), dimension(im) :: rdxzb ! for stoch phys. mtb-level + real(kind=kind_phys), intent(out), dimension(:) :: rdxzb ! for stoch phys. mtb-level character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg diff --git a/physics/ugwpv1_gsldrag_post.F90 b/physics/ugwpv1_gsldrag_post.F90 index 1d8813f65a..e9bdafa4e8 100644 --- a/physics/ugwpv1_gsldrag_post.F90 +++ b/physics/ugwpv1_gsldrag_post.F90 @@ -10,14 +10,9 @@ module ugwpv1_gsldrag_post subroutine ugwpv1_gsldrag_post_init () end subroutine ugwpv1_gsldrag_post_init -!>@brief The subroutine initializes the unified UGWP - !> \section arg_table_ugwpv1_gsldrag_post_run Argument Table !! \htmlinclude ugwpv1_gsldrag_post_run.html !! - - - subroutine ugwpv1_gsldrag_post_run ( im, levs, & ldiag_ugwp, dtf, & dudt_gw, dvdt_gw, dtdt_gw, du_ofdcol, du_oblcol, tau_ogw, & @@ -36,16 +31,16 @@ subroutine ugwpv1_gsldrag_post_run ( im, levs, & real(kind=kind_phys), intent(in) :: dtf logical, intent(in) :: ldiag_ugwp !< flag for CIRES UGWP Diagnostics - real(kind=kind_phys), intent(in), dimension(im) :: zobl, zlwb, zogw - real(kind=kind_phys), intent(in), dimension(im) :: du_ofdcol, tau_ogw, du_oblcol, tau_ngw - real(kind=kind_phys), intent(inout), dimension(im) :: tot_mtb, tot_ogw, tot_tofd, tot_ngw - real(kind=kind_phys), intent(inout), dimension(im) :: tot_zmtb, tot_zlwb, tot_zogw + real(kind=kind_phys), intent(in), dimension(:) :: zobl, zlwb, zogw + real(kind=kind_phys), intent(in), dimension(:) :: du_ofdcol, tau_ogw, du_oblcol, tau_ngw + real(kind=kind_phys), intent(inout), dimension(:) :: tot_mtb, tot_ogw, tot_tofd, tot_ngw + real(kind=kind_phys), intent(inout), dimension(:) :: tot_zmtb, tot_zlwb, tot_zogw - real(kind=kind_phys), intent(in), dimension(im,levs) :: dtdt_gw, dudt_gw, dvdt_gw - real(kind=kind_phys), intent(in), dimension(im,levs) :: dudt_obl, dudt_ogw, dudt_ofd - real(kind=kind_phys), intent(inout), dimension(im,levs) :: du3dt_mtb, du3dt_ogw, du3dt_tms, du3dt_ngw, dv3dt_ngw + real(kind=kind_phys), intent(in), dimension(:,:) :: dtdt_gw, dudt_gw, dvdt_gw + real(kind=kind_phys), intent(in), dimension(:,:) :: dudt_obl, dudt_ogw, dudt_ofd + real(kind=kind_phys), intent(inout), dimension(:,:) :: du3dt_mtb, du3dt_ogw, du3dt_tms, du3dt_ngw, dv3dt_ngw - real(kind=kind_phys), intent(inout), dimension(im,levs) :: dtdt, dudt, dvdt + real(kind=kind_phys), intent(inout), dimension(:,:) :: dtdt, dudt, dvdt character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg diff --git a/physics/ugwpv1_gsldrag_post.meta b/physics/ugwpv1_gsldrag_post.meta index 45fa4ea991..fdf32cbf47 100644 --- a/physics/ugwpv1_gsldrag_post.meta +++ b/physics/ugwpv1_gsldrag_post.meta @@ -3,11 +3,6 @@ type = scheme dependencies = machine.F -######################################################################## -[ccpp-arg-table] - name = ugwpv1_gsldrag_post_init - type = scheme - ######################################################################## [ccpp-arg-table] name = ugwpv1_gsldrag_post_run @@ -72,24 +67,24 @@ kind = kind_phys intent = in optional = F -[du_oblcol] - standard_name = vertically_integrated_x_momentum_flux_due_to_blocking_drag - long_name = integrated x momentum flux from blocking drag +[du_ofdcol] + standard_name = vertically_integrated_x_momentum_flux_due_to_form_drag + long_name = integrated x momentum flux from form drag units = Pa dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in - optional = F -[du_ofdcol] - standard_name = vertically_integrated_x_momentum_flux_due_to_form_drag - long_name = integrated x momentum flux from form drag + optional = F +[du_oblcol] + standard_name = vertically_integrated_x_momentum_flux_due_to_blocking_drag + long_name = integrated x momentum flux from blocking drag units = Pa dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in - optional = F + optional = F [tau_ogw] standard_name = instantaneous_momentum_flux_due_to_orographic_gravity_wave_drag long_name = momentum flux or stress due to orographic gravity wave drag @@ -313,9 +308,3 @@ type = integer intent = out optional = F - -######################################################################## -[ccpp-arg-table] - name = ugwpv1_gsldrag_post_finalize - type = scheme - diff --git a/physics/unified_ugwp.F90 b/physics/unified_ugwp.F90 index 7fdc43b2b9..288227c8cc 100644 --- a/physics/unified_ugwp.F90 +++ b/physics/unified_ugwp.F90 @@ -74,13 +74,13 @@ subroutine unified_ugwp_init (me, master, nlunit, input_nml_file, logunit, & integer, intent (in) :: nlunit character(len=*), intent (in) :: input_nml_file(:) integer, intent (in) :: logunit - integer, intent(in) :: jdat(8) + integer, intent (in) :: jdat(:) integer, intent (in) :: lonr integer, intent (in) :: levs integer, intent (in) :: latr real(kind=kind_phys), intent (in) :: ak(:), bk(:) real(kind=kind_phys), intent (in) :: dtp - real(kind=kind_phys), intent (in) :: cdmbgwd(4), cgwf(2) ! "scaling" controls for "old" GFS-GW schemes + real(kind=kind_phys), intent (in) :: cdmbgwd(:), cgwf(:) ! "scaling" controls for "old" GFS-GW schemes real(kind=kind_phys), intent (in) :: pa_rf_in, tau_rf_in real(kind=kind_phys), intent (in) :: con_p0, con_pi, con_rerth logical, intent (in) :: do_ugwp @@ -203,7 +203,7 @@ subroutine unified_ugwp_run(me, master, im, levs, ntrac, dtp, fhzero, kdt, ugrs, vgrs, tgrs, q1, prsi, prsl, prslk, phii, phil, & del, kpbl, dusfcg, dvsfcg, gw_dudt, gw_dvdt, gw_dtdt, gw_kdis, & tau_tofd, tau_mtb, tau_ogw, tau_ngw, zmtb, zlwb, zogw, & - dudt_mtb, dudt_tms, du3dt_mtb, du3dt_ogw, du3dt_tms, & + dudt_mtb, dudt_tms, du3dt_mtb, du3dt_ogw, du3dt_tms, & dudt, dvdt, dtdt, rdxzb, con_g, con_omega, con_pi, con_cp, con_rd, con_rv, & con_rerth, con_fvirt, rain, ntke, q_tke, dqdt_tke, lprnt, ipr, & ldu3dt_ogw, ldv3dt_ogw, ldt3dt_ogw, ldu3dt_cgw, ldv3dt_cgw, ldt3dt_cgw, & @@ -216,25 +216,25 @@ subroutine unified_ugwp_run(me, master, im, levs, ntrac, dtp, fhzero, kdt, ! interface variables integer, intent(in) :: me, master, im, levs, ntrac, kdt, lonr, nmtvr integer, intent(in) :: gwd_opt - integer, intent(in), dimension(im) :: kpbl - real(kind=kind_phys), intent(in), dimension(im) :: oro, oro_uf, hprime, oc, theta, sigma, gamma - real(kind=kind_phys), intent(in), dimension(im) :: varss,oc1ss, dx + integer, intent(in), dimension(:) :: kpbl + real(kind=kind_phys), intent(in), dimension(:) :: oro, oro_uf, hprime, oc, theta, sigma, gamma + real(kind=kind_phys), intent(in), dimension(:) :: varss,oc1ss, dx !vay-nov 2020 - real(kind=kind_phys), intent(in), dimension(im,4) :: oa4ss,ol4ss + real(kind=kind_phys), intent(in), dimension(:,:) :: oa4ss,ol4ss - logical, intent(in) :: flag_for_gwd_generic_tend + logical, intent(in) :: flag_for_gwd_generic_tend ! elvmax is intent(in) for CIRES UGWPv1, but intent(inout) for GFS GWDPS - real(kind=kind_phys), intent(inout), dimension(im) :: elvmax - real(kind=kind_phys), intent(in), dimension(im, 4) :: clx, oa4 - real(kind=kind_phys), intent(in), dimension(im) :: xlat, xlat_d, sinlat, coslat, area - real(kind=kind_phys), intent(in), dimension(im, levs) :: del, ugrs, vgrs, tgrs, prsl, prslk, phil - real(kind=kind_phys), intent(in), dimension(im, levs+1) :: prsi, phii - real(kind=kind_phys), intent(in), dimension(im, levs) :: q1 - real(kind=kind_phys), intent(in) :: dtp, fhzero, cdmbgwd(4) - integer, intent(in) :: jdat(8) + real(kind=kind_phys), intent(inout), dimension(:) :: elvmax + real(kind=kind_phys), intent(in), dimension(:,:) :: clx, oa4 + real(kind=kind_phys), intent(in), dimension(:) :: xlat, xlat_d, sinlat, coslat, area + real(kind=kind_phys), intent(in), dimension(:,:) :: del, ugrs, vgrs, tgrs, prsl, prslk, phil + real(kind=kind_phys), intent(in), dimension(:,:) :: prsi, phii + real(kind=kind_phys), intent(in), dimension(:,:) :: q1 + real(kind=kind_phys), intent(in) :: dtp, fhzero, cdmbgwd(:) + integer, intent(in) :: jdat(:) logical, intent(in) :: do_tofd, ldiag_ugwp !Output (optional): @@ -248,14 +248,14 @@ subroutine unified_ugwp_run(me, master, im, levs, ntrac, dtp, fhzero, kdt, & dtaux2d_ss(:,:),dtauy2d_ss(:,:), & & dtaux2d_fd(:,:),dtauy2d_fd(:,:) - real(kind=kind_phys), intent(in) :: br1(im), & - & hpbl(im), & - & slmsk(im) + real(kind=kind_phys), intent(in) :: br1(:), & + & hpbl(:), & + & slmsk(:) - real(kind=kind_phys), intent(out), dimension(im) :: dusfcg, dvsfcg - real(kind=kind_phys), intent(out), dimension(im) :: zmtb, zlwb, zogw, rdxzb - real(kind=kind_phys), intent(out), dimension(im) :: tau_mtb, tau_ogw, tau_tofd, tau_ngw - real(kind=kind_phys), intent(out), dimension(im, levs) :: gw_dudt, gw_dvdt, gw_dtdt, gw_kdis + real(kind=kind_phys), intent(out), dimension(:) :: dusfcg, dvsfcg + real(kind=kind_phys), intent(out), dimension(:) :: zmtb, zlwb, zogw, rdxzb + real(kind=kind_phys), intent(out), dimension(:) :: tau_mtb, tau_ogw, tau_tofd, tau_ngw + real(kind=kind_phys), intent(out), dimension(:,:) :: gw_dudt, gw_dvdt, gw_dtdt, gw_kdis real(kind=kind_phys), intent(out), dimension(:,:) :: dudt_mtb, dudt_tms real(kind=kind_phys), intent(out), dimension(:,:) :: dtaux2d_ls, dtauy2d_ls @@ -265,14 +265,14 @@ subroutine unified_ugwp_run(me, master, im, levs, ntrac, dtp, fhzero, kdt, logical, intent(in) :: ldiag3d, lssav ! These arrays only allocated if ldiag_ugwp = .true. - real(kind=kind_phys), intent(out), dimension(:,:) :: du3dt_mtb, du3dt_ogw, du3dt_tms + real(kind=kind_phys), intent(inout), dimension(:,:) :: du3dt_mtb, du3dt_ogw, du3dt_tms - real(kind=kind_phys), intent(inout), dimension(im, levs):: dudt, dvdt, dtdt + real(kind=kind_phys), intent(inout), dimension(:,:) :: dudt, dvdt, dtdt real(kind=kind_phys), intent(in) :: con_g, con_omega, con_pi, con_cp, con_rd, & con_rv, con_rerth, con_fvirt - real(kind=kind_phys), intent(in), dimension(im) :: rain + real(kind=kind_phys), intent(in), dimension(:) :: rain integer, intent(in) :: ntke real(kind=kind_phys), intent(in), dimension(:,:) :: q_tke, dqdt_tke diff --git a/physics/unified_ugwp.meta b/physics/unified_ugwp.meta index edb8521e05..c51b35c919 100644 --- a/physics/unified_ugwp.meta +++ b/physics/unified_ugwp.meta @@ -66,6 +66,8 @@ units = none dimensions = (8) type = integer + intent = in + optional = F [lonr] standard_name = number_of_equatorial_longitude_points long_name = number of global points in x-dir (i) along the equator @@ -352,6 +354,8 @@ dimensions = () type = real kind = kind_phys + intent = in + optional = F [kdt] standard_name = index_of_time_step long_name = current forecast iteration @@ -713,6 +717,8 @@ units = none dimensions = (8) type = integer + intent = in + optional = F [xlat] standard_name = latitude long_name = grid latitude diff --git a/physics/ysuvdif.F90 b/physics/ysuvdif.F90 index aa29809923..e427eb0eb1 100644 --- a/physics/ysuvdif.F90 +++ b/physics/ysuvdif.F90 @@ -64,19 +64,19 @@ subroutine ysuvdif_run(im,km,ux,vx,tx,qx,p2d,p2di,pi2d, & integer, intent(in ) :: im,km,ntrac,ndiff,ntcw,ntiw,ntoz real(kind=kind_phys), intent(in ) :: g,cp,rd,rv,ep1,ep2,xlv,dt - real(kind=kind_phys), dimension( im,km ), & + real(kind=kind_phys), dimension( :,: ), & intent(in) :: pi2d,p2d,phil,ux,vx,swh,hlw,tx - real(kind=kind_phys), dimension( im,km,ntrac ) , & + real(kind=kind_phys), dimension( :,:,: ) , & intent(in ) :: qx - real(kind=kind_phys), dimension( im, km+1 ) , & + real(kind=kind_phys), dimension( :,: ) , & intent(in ) :: p2di,phii - real(kind=kind_phys), dimension( im ) , & + real(kind=kind_phys), dimension( : ) , & intent(in) :: stress,zorl,heat,evap,wspd,br,psim,psih,psfcpa, & u10,v10,xmu - integer, dimension(im) ,& + integer, dimension(:) ,& intent(in ) :: landmask logical, intent(in ) :: lssav, ldiag3d, qdiag3d, & flag_for_pbl_generic_tend @@ -84,18 +84,20 @@ subroutine ysuvdif_run(im,km,ux,vx,tx,qx,p2d,p2di,pi2d, & !---------------------------------------------------------------------------------- ! input/output variables ! - real(kind=kind_phys), dimension( im,km ) , & + real(kind=kind_phys), dimension( :,: ) , & intent(inout) :: utnp,vtnp,ttnp - real(kind=kind_phys), dimension( im,km,ntrac ) , & + real(kind=kind_phys), dimension( :,:,: ) , & intent(inout) :: qtnp - real(kind=kind_phys), dimension(:,:) , & + real(kind=kind_phys), dimension(:,:) , & intent(inout) :: du3dt_PBL, dv3dt_PBL, dt3dt_PBL, dq3dt_PBL, do3dt_PBL ! !--------------------------------------------------------------------------------- ! output variables - integer, dimension( im ), intent(out ) :: kpbl1d - real(kind=kind_phys), dimension( im ), & + integer, dimension( : ), intent(out ) :: kpbl1d + real(kind=kind_phys), dimension( : ), & intent(out) :: hpbl + real(kind=kind_phys), dimension( : ), & + intent(out) :: dusfc,dvsfc, dtsfc,dqsfc ! error messages character(len=*), intent(out) :: errmsg @@ -108,7 +110,7 @@ subroutine ysuvdif_run(im,km,ux,vx,tx,qx,p2d,p2di,pi2d, & real(kind=kind_phys), dimension( im ) :: hol real(kind=kind_phys), dimension( im, km+1 ) :: zq ! - real(kind=kind_phys), dimension( im, km ) :: & + real(kind=kind_phys), dimension( im, km ) :: & thx,thvx,thlix, & del, & dza, & @@ -117,7 +119,7 @@ subroutine ysuvdif_run(im,km,ux,vx,tx,qx,p2d,p2di,pi2d, & xkzoh, & za ! - real(kind=kind_phys), dimension( im ) :: & + real(kind=kind_phys), dimension( im ) :: & rhox, & govrth, & zl1,thermal, & @@ -125,8 +127,6 @@ subroutine ysuvdif_run(im,km,ux,vx,tx,qx,p2d,p2di,pi2d, & hgamt,hgamq, & brdn,brup, & phim,phih, & - dusfc,dvsfc, & - dtsfc,dqsfc, & prpbl, & wspd1,thermalli ! diff --git a/physics/ysuvdif.meta b/physics/ysuvdif.meta index 9ba31ed27f..bf684dcbe0 100644 --- a/physics/ysuvdif.meta +++ b/physics/ysuvdif.meta @@ -86,18 +86,18 @@ kind = kind_phys intent = in optional = F -[vtnp] - standard_name = tendency_of_y_wind_due_to_model_physics - long_name = updated tendency of the y wind +[utnp] + standard_name = tendency_of_x_wind_due_to_model_physics + long_name = updated tendency of the x wind units = m s-2 dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout optional = F -[utnp] - standard_name = tendency_of_x_wind_due_to_model_physics - long_name = updated tendency of the x wind +[vtnp] + standard_name = tendency_of_y_wind_due_to_model_physics + long_name = updated tendency of the y wind units = m s-2 dimensions = (horizontal_loop_extent,vertical_dimension) type = real