Skip to content

Commit

Permalink
Add optional arguments to physics/CONV/C3/cu_c3*
Browse files Browse the repository at this point in the history
  • Loading branch information
climbfuji committed May 7, 2024
1 parent cafda68 commit 67789c9
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 31 deletions.
11 changes: 7 additions & 4 deletions physics/CONV/C3/cu_c3_deep.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down Expand Up @@ -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 ) :: &
Expand Down Expand Up @@ -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)
Expand Down
47 changes: 23 additions & 24 deletions physics/CONV/C3/cu_c3_driver.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 7 additions & 3 deletions physics/CONV/C3/cu_c3_sh.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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


Expand Down

0 comments on commit 67789c9

Please sign in to comment.