From d6563b58b23dc5d1d6df1eb5822ff32b85c5e5d8 Mon Sep 17 00:00:00 2001 From: Raffaele Montuoro Date: Mon, 20 Nov 2023 19:49:07 +0000 Subject: [PATCH] Declare additional array arguments as pointers for AQMv7 EE2 compliance (use -check all) --- physics/GFS_DCNV_generic_post.F90 | 2 +- physics/GFS_MP_generic_post.F90 | 26 +++++++++++++------------- physics/GFS_SCNV_generic_post.F90 | 2 +- physics/GFS_suite_interstitial_4.F90 | 4 ++-- physics/gfdl_cloud_microphys.F90 | 2 +- physics/samfdeepcnv.f | 9 +++++---- physics/samfshalcnv.f | 3 ++- 7 files changed, 25 insertions(+), 23 deletions(-) diff --git a/physics/GFS_DCNV_generic_post.F90 b/physics/GFS_DCNV_generic_post.F90 index 7812ee5c2..fda26e0d6 100644 --- a/physics/GFS_DCNV_generic_post.F90 +++ b/physics/GFS_DCNV_generic_post.F90 @@ -38,7 +38,7 @@ subroutine GFS_DCNV_generic_post_run (im, levs, lssav, ldiag3d, qdiag3d, ras, & logical, intent(in) :: satmedmf, trans_trac real(kind=kind_phys), dimension(:), intent(inout) :: rainc, cldwrk - real(kind=kind_phys), dimension(:,:), intent(inout) :: upd_mf, dwn_mf, det_mf + real(kind=kind_phys), dimension(:,:), pointer :: upd_mf, dwn_mf, det_mf real(kind=kind_phys), dimension(:,:), intent(inout) :: cnvw, cnvc real(kind=kind_phys), dimension(:,:,:), pointer :: dtend diff --git a/physics/GFS_MP_generic_post.F90 b/physics/GFS_MP_generic_post.F90 index b7e65bc8b..b513f5bcf 100644 --- a/physics/GFS_MP_generic_post.F90 +++ b/physics/GFS_MP_generic_post.F90 @@ -55,7 +55,7 @@ subroutine GFS_MP_generic_post_run( real(kind=kind_phys), dimension(:,:), intent(in) :: prsi, phii real(kind=kind_phys), dimension(:,:,:), intent(in) :: gq0, save_q - real(kind=kind_phys), dimension(:,:,:), intent(in) :: dfi_radar_tten + real(kind=kind_phys), dimension(:,:,:), pointer :: dfi_radar_tten 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, & @@ -63,7 +63,7 @@ subroutine GFS_MP_generic_post_run( 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) :: dtend + real(kind=kind_phys), dimension(:,:,:), pointer :: dtend integer, dimension(:,:), intent(in) :: dtidx ! Stochastic physics / surface perturbations @@ -71,17 +71,17 @@ subroutine GFS_MP_generic_post_run( ! 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), dimension(:,:), intent(inout) :: dqdt_qmicro + real(kind=kind_phys), dimension(:), pointer :: raincprv + real(kind=kind_phys), dimension(:), pointer :: rainncprv + real(kind=kind_phys), dimension(:), pointer :: iceprv + real(kind=kind_phys), dimension(:), pointer :: snowprv + real(kind=kind_phys), dimension(:), pointer :: graupelprv + real(kind=kind_phys), dimension(:), pointer :: draincprv + real(kind=kind_phys), dimension(:), pointer :: drainncprv + real(kind=kind_phys), dimension(:), pointer :: diceprv + real(kind=kind_phys), dimension(:), pointer :: dsnowprv + real(kind=kind_phys), dimension(:), pointer :: dgraupelprv + real(kind=kind_phys), dimension(:,:), pointer :: dqdt_qmicro real(kind=kind_phys), dimension(:,:), intent(inout) :: prevsq real(kind=kind_phys), intent(in) :: dtp diff --git a/physics/GFS_SCNV_generic_post.F90 b/physics/GFS_SCNV_generic_post.F90 index 0b38ff081..d60f4a77a 100644 --- a/physics/GFS_SCNV_generic_post.F90 +++ b/physics/GFS_SCNV_generic_post.F90 @@ -31,7 +31,7 @@ subroutine GFS_SCNV_generic_post_run (im, levs, nn, lssav, ldiag3d, qdiag3d, & real(kind=kind_phys), dimension(:,:,:), intent(in) :: save_q, gq0 ! dtend only allocated if ldiag3d == .true. - real(kind=kind_phys), intent(inout) :: dtend(:,:,:) + real(kind=kind_phys), pointer :: dtend(:,:,:) integer, intent(in) :: dtidx(:,:) integer, intent(in) :: index_of_temperature, index_of_x_wind, index_of_y_wind, index_of_process_scnv real(kind=kind_phys), dimension(:,:,:), intent(in) :: clw diff --git a/physics/GFS_suite_interstitial_4.F90 b/physics/GFS_suite_interstitial_4.F90 index cbabb991b..72308cf96 100644 --- a/physics/GFS_suite_interstitial_4.F90 +++ b/physics/GFS_suite_interstitial_4.F90 @@ -37,7 +37,7 @@ subroutine GFS_suite_interstitial_4_run (im, levs, ltaerosol, tracers_total, ntr ! dtend and dtidx are only allocated if ldiag3d logical, intent(in) :: ldiag3d, qdiag3d - real(kind=kind_phys), dimension(:,:,:), intent(inout) :: dtend + real(kind=kind_phys), dimension(:,:,:), pointer :: dtend integer, dimension(:,:), intent(in) :: dtidx integer, intent(in) :: index_of_process_conv_trans,ntk,ntke @@ -290,4 +290,4 @@ subroutine GFS_suite_interstitial_4_run (im, levs, ltaerosol, tracers_total, ntr end subroutine GFS_suite_interstitial_4_run - end module GFS_suite_interstitial_4 \ No newline at end of file + end module GFS_suite_interstitial_4 diff --git a/physics/gfdl_cloud_microphys.F90 b/physics/gfdl_cloud_microphys.F90 index 4e8b3d586..4e9a1a28c 100644 --- a/physics/gfdl_cloud_microphys.F90 +++ b/physics/gfdl_cloud_microphys.F90 @@ -160,7 +160,7 @@ subroutine gfdl_cloud_microphys_run( real(kind=kind_phys), intent(inout), dimension(:,:) :: rew, rei, rer, res, reg logical, intent (in) :: cplchm ! ice and liquid water 3d precipitation fluxes - only allocated if cplchm is .true. - real(kind=kind_phys), intent(inout), dimension(:,:) :: pfi_lsan, pfl_lsan + real(kind=kind_phys), pointer , dimension(:,:) :: pfi_lsan, pfl_lsan character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg diff --git a/physics/samfdeepcnv.f b/physics/samfdeepcnv.f index 2a3c256a9..b0000ce63 100644 --- a/physics/samfdeepcnv.f +++ b/physics/samfdeepcnv.f @@ -100,9 +100,10 @@ subroutine samfdeepcnv_run (im,km,first_time_step,restart, & logical, intent(in) :: first_time_step,restart,hwrf_samfdeep, & & progsigma real(kind=kind_phys), intent(in) :: nthresh - real(kind=kind_phys), intent(in) :: ca_deep(:) - real(kind=kind_phys), intent(in) :: sigmain(:,:),qmicro(:,:), & - & tmf(:,:),q(:,:), prevsq(:,:) + real(kind=kind_phys), pointer :: ca_deep(:) + real(kind=kind_phys), intent(in) :: sigmain(:,:), & + & q(:,:), prevsq(:,:) + real(kind=kind_phys), pointer :: qmicro(:,:), tmf(:,:) real(kind=kind_phys), intent(out) :: rainevap(:) real(kind=kind_phys), intent(out) :: sigmaout(:,:) logical, intent(in) :: do_ca,ca_closure,ca_entr,ca_trigger @@ -121,7 +122,7 @@ subroutine samfdeepcnv_run (im,km,first_time_step,restart, & ! GJF* These variables are conditionally allocated depending on whether the ! Morrison-Gettelman microphysics is used, so they must be declared ! using assumed shape. - real(kind=kind_phys), dimension(:,:), intent(inout) :: & + real(kind=kind_phys), dimension(:,:), pointer :: & & qlcn, qicn, w_upi, cnv_mfd, cnv_dqldt, clcn & &, cnv_fice, cnv_ndrop, cnv_nice, cf_upi ! *GJF diff --git a/physics/samfshalcnv.f b/physics/samfshalcnv.f index 645024536..311fc2cb9 100644 --- a/physics/samfshalcnv.f +++ b/physics/samfshalcnv.f @@ -70,7 +70,8 @@ subroutine samfshalcnv_run(im,km,itc,ntc,cliq,cp,cvap, & real(kind=kind_phys), intent(in) :: delt real(kind=kind_phys), intent(in) :: psp(:), delp(:,:), & & prslp(:,:), garea(:), hpbl(:), dot(:,:), phil(:,:), & - & qmicro(:,:),tmf(:,:),prevsq(:,:),q(:,:) + & prevsq(:,:),q(:,:) + real(kind=kind_phys), pointer :: qmicro(:,:),tmf(:,:) real(kind=kind_phys), intent(in) :: sigmain(:,:) !