From 67789c9f20d9fd9bb29ccf81e78b0deb908039f0 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Tue, 7 May 2024 06:44:05 -0600 Subject: [PATCH] Add optional arguments to physics/CONV/C3/cu_c3* --- physics/CONV/C3/cu_c3_deep.F90 | 11 +++++--- physics/CONV/C3/cu_c3_driver.F90 | 47 ++++++++++++++++---------------- physics/CONV/C3/cu_c3_sh.F90 | 10 +++++-- 3 files changed, 37 insertions(+), 31 deletions(-) diff --git a/physics/CONV/C3/cu_c3_deep.F90 b/physics/CONV/C3/cu_c3_deep.F90 index b7cd5f62d..9bcbe5910 100644 --- a/physics/CONV/C3/cu_c3_deep.F90 +++ b/physics/CONV/C3/cu_c3_deep.F90 @@ -167,7 +167,7 @@ subroutine cu_c3_deep_run( & real(kind=kind_phys), dimension (its:) & ,intent (in ) :: rand_mom,rand_vmas !$acc declare copyin(rand_clos,rand_mom,rand_vmas) - real(kind=kind_phys), intent(in), dimension (its:) :: ca_deep(:) + real(kind=kind_phys), intent(in), dimension (its:), optional :: ca_deep(:) integer, intent(in) :: do_capsuppress real(kind=kind_phys), intent(in), dimension(:) :: cap_suppress_j !$acc declare create(cap_suppress_j) @@ -188,7 +188,10 @@ subroutine cu_c3_deep_run( & frh_out,rainevap real(kind=kind_phys), dimension (its:,kts:) & ,intent (in ) :: & - tmf, qmicro, sigmain, forceqv_spechum + tmf + real(kind=kind_phys), dimension (its:,kts:) & + ,intent (in ), optional :: & + qmicro, sigmain, forceqv_spechum real(kind=kind_phys), dimension (its:) & ,intent (inout ) :: & pre,xmb_out @@ -223,7 +226,7 @@ subroutine cu_c3_deep_run( & q,qo,zuo,zdo,zdm !$acc declare sigmaout real(kind=kind_phys), dimension (its:,kts:) & - ,intent (out) :: & + ,intent (out), optional :: & sigmaout real(kind=kind_phys), dimension (its:) & ,intent (in ) :: & @@ -376,7 +379,7 @@ subroutine cu_c3_deep_run( & !$acc ktopdby,kbconx,ierr2,ierr3,kbmax) integer, dimension (its:), intent(inout) :: ierr - integer, dimension (its:), intent(in) :: csum + integer, dimension (its:), intent(in), optional :: csum logical, intent(in) :: do_ca, progsigma logical, intent(in) :: flag_init, flag_restart !$acc declare copy(ierr) copyin(csum) diff --git a/physics/CONV/C3/cu_c3_driver.F90 b/physics/CONV/C3/cu_c3_driver.F90 index 8057ed030..a08d47463 100644 --- a/physics/CONV/C3/cu_c3_driver.F90 +++ b/physics/CONV/C3/cu_c3_driver.F90 @@ -846,30 +846,29 @@ subroutine cu_c3_driver_run(ntracer,garea,im,km,dt,flag_init,flag_restart,& ,ca_deep & ,mconv & ,omeg & - - ,cactiv & - ,cnvwt & - ,zu & - ,zd & - ,zdm & ! hli - ,edt & - ,edtm & ! hli - ,xmb & - ,xmbm & - ,xmbs & - ,pret & - ,outu & - ,outv & - ,outt & - ,outq & - ,outqc & - ,kbcon & - ,ktop & - ,cupclw & - ,frhd & - ,rainevap & - ,ierr & - ,ierrc & + ,cactiv & + ,cnvwt & + ,zu & + ,zd & + ,zdm & ! hli + ,edt & + ,edtm & ! hli + ,xmb & + ,xmbm & + ,xmbs & + ,pret & + ,outu & + ,outv & + ,outt & + ,outq & + ,outqc & + ,kbcon & + ,ktop & + ,cupclw & + ,frhd & + ,rainevap & + ,ierr & + ,ierrc & ! the following should be set to zero if not available ,rand_mom & ! for stochastics mom, if temporal and spatial patterns exist ,rand_vmas & ! for stochastics vertmass, if temporal and spatial patterns exist diff --git a/physics/CONV/C3/cu_c3_sh.F90 b/physics/CONV/C3/cu_c3_sh.F90 index 736292092..0625b2949 100644 --- a/physics/CONV/C3/cu_c3_sh.F90 +++ b/physics/CONV/C3/cu_c3_sh.F90 @@ -102,7 +102,11 @@ subroutine cu_c3_sh_run ( & !$acc declare copy(cnvwt,outt,outq,outqc,cupclw,zuo,outu,outv) real(kind=kind_phys), dimension (its:,kts:) & ,intent (in ) :: & - tmf, qmicro, sigmain, forceqv_spechum + tmf + real(kind=kind_phys), dimension (its:,kts:) & + ,intent (in ), optional :: & + qmicro, sigmain, forceqv_spechum + real(kind=kind_phys), dimension (its:) & ,intent (out ) :: & xmb_out @@ -133,9 +137,9 @@ subroutine cu_c3_sh_run ( & real(kind=kind_phys) & ,intent (in ) :: & dtime,tcrit,fv,r_d,betascu,betamcu,betadcu -!$acc declare sigmaout +!$acc declare sigmaout real(kind=kind_phys), dimension (its:,kts:) & - ,intent (out) :: & + ,intent (out), optional :: & sigmaout