Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loosen restriction on optional arguments. #248

Open
wants to merge 23 commits into
base: ufs/dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
1fc0f54
Optional argument cleanup: Radiation
dustinswales Nov 18, 2024
e2eea95
Optional argument cleanup: Convection
dustinswales Nov 18, 2024
76eaf4a
Optional argument cleanup: GWD
dustinswales Nov 19, 2024
bff271c
Optional argument cleanup: MP
dustinswales Nov 19, 2024
6e0e2f7
Optional argument cleanup: PBL
dustinswales Nov 19, 2024
4572f46
Optional argument cleanup: Surface Layer
dustinswales Nov 19, 2024
8f1c7af
Optional argument cleanup: Surface Models
dustinswales Dec 13, 2024
53d02a9
Optional argument cleanup: CICE and Smoke
dustinswales Dec 13, 2024
c6ad766
Optional argument cleanup: Some interstitials
dustinswales Dec 13, 2024
a6cbcd9
Revert removal of optional arguments in Interstitial schemes.
dustinswales Dec 17, 2024
382cdb0
Merge branch 'ufs/dev' of https://github.com/ufs-community/ccpp-physi…
dustinswales Dec 17, 2024
bdeab29
REvert one more change
dustinswales Dec 18, 2024
339f4b8
Merge branch 'ufs/dev' of https://github.com/ufs-community/ccpp-physi…
dustinswales Jan 3, 2025
03610ea
Merge branch 'ufs/dev' of https://github.com/ufs-community/ccpp-physi…
dustinswales Jan 14, 2025
9576598
Bug
dustinswales Jan 27, 2025
0b21754
Merge branch 'ufs/dev' of https://github.com/ufs-community/ccpp-physi…
dustinswales Jan 27, 2025
6a46eed
Anothe bug
dustinswales Jan 27, 2025
8706c32
One last bug from testing
dustinswales Jan 28, 2025
2e6aff1
SOme more changes from RTs
dustinswales Feb 12, 2025
ef9f759
Merge branch 'ufs/dev' of https://github.com/ufs-community/ccpp-physi…
dustinswales Feb 12, 2025
423464e
Revert some changes
dustinswales Feb 19, 2025
12a3bf4
Merge branch 'ufs/dev' of https://github.com/ufs-community/ccpp-physi…
dustinswales Feb 19, 2025
eed5551
Revert merge conflict
dustinswales Feb 19, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions physics/CONV/C3/cu_c3_deep.F90
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ subroutine cu_c3_deep_run( &
,intent (in ) :: &
tmf
real(kind=kind_phys), dimension (its:,kts:) &
,intent (in ), optional :: &
,intent (in ), optional :: &
qmicro, sigmain, forceqv_spechum
real(kind=kind_phys), dimension (its:) &
,intent (inout ) :: &
Expand Down Expand Up @@ -226,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), optional :: &
,intent (out), optional :: &
sigmaout
real(kind=kind_phys), dimension (its:) &
,intent (in ) :: &
Expand Down
14 changes: 7 additions & 7 deletions physics/CONV/C3/cu_c3_driver_post.F90
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,16 @@ subroutine cu_c3_driver_post_run (im, km, t, q, prevst, prevsq, cactiv, cactiv_m
real(kind_phys), intent(in) :: t(:,:)
real(kind_phys), intent(in) :: q(:,:)
real(kind_phys), dimension(:),intent(in) :: garea
real(kind_phys), intent(out), optional :: prevst(:,:)
real(kind_phys), intent(out), optional :: prevsq(:,:)
integer, intent(in), optional :: cactiv(:)
integer, intent(in), optional :: cactiv_m(:)
real(kind_phys), intent(out), optional :: conv_act(:)
real(kind_phys), intent(out), optional :: conv_act_m(:)
real(kind_phys), intent(out) :: prevst(:,:)
real(kind_phys), intent(out) :: prevsq(:,:)
integer, intent(in) :: cactiv(:)
integer, intent(in) :: cactiv_m(:)
real(kind_phys), intent(out) :: conv_act(:)
real(kind_phys), intent(out) :: conv_act_m(:)
! for Radar reflectivity
real(kind_phys), intent(in) :: dt
real(kind_phys), intent(in) :: raincv(:)
real(kind_phys), intent(in), optional :: maxupmf(:)
real(kind_phys), intent(in) :: maxupmf(:)
real(kind_phys), intent(inout) :: refl_10cm(:,:)
character(len=*), intent(out) :: errmsg
!$acc declare copyin(t,q,cactiv,cactiv_m) copyout(prevst,prevsq,conv_act,conv_act_m)
Expand Down
7 changes: 0 additions & 7 deletions physics/CONV/C3/cu_c3_driver_post.meta
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
type = real
kind = kind_phys
intent = out
optional = True
[prevsq]
standard_name = specific_humidity_on_previous_timestep
long_name = moisture from previous time step
Expand All @@ -54,23 +53,20 @@
type = real
kind = kind_phys
intent = out
optional = True
[cactiv]
standard_name = counter_for_grell_freitas_convection
long_name = convective activity memory
units = none
dimensions = (horizontal_loop_extent)
type = integer
intent = in
optional = True
[cactiv_m]
standard_name = counter_for_grell_freitas_mid_level_convection
long_name = midlevel convective activity memory
units = none
dimensions = (horizontal_loop_extent)
type = integer
intent = in
optional = True
[conv_act]
standard_name = consecutive_calls_for_grell_freitas_convection
long_name = Memory counter for GF
Expand All @@ -79,7 +75,6 @@
type = real
kind = kind_phys
intent = out
optional = True
[conv_act_m]
standard_name = consecutive_calls_for_grell_freitas_mid_level_convection
long_name = Memory counter for GF midlevel
Expand All @@ -88,7 +83,6 @@
type = real
kind = kind_phys
intent = out
optional = True
[dt]
standard_name = timestep_for_physics
long_name = physics time step
Expand Down Expand Up @@ -121,7 +115,6 @@
type = real
kind = kind_phys
intent = in
optional = True
[refl_10cm]
standard_name = radar_reflectivity_10cm
long_name = instantaneous refl_10cm
Expand Down
16 changes: 8 additions & 8 deletions physics/CONV/C3/cu_c3_driver_pre.F90
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,16 @@ subroutine cu_c3_driver_pre_run (flag_init, flag_restart, kdt, fhour, dtp, t, q,
real(kind_phys), intent(in) :: dtp
real(kind_phys), intent(in) :: t(:,:)
real(kind_phys), intent(in) :: q(:,:)
real(kind_phys), intent(in), optional :: prevst(:,:)
real(kind_phys), intent(in), optional :: prevsq(:,:)
real(kind_phys), intent(in) :: prevst(:,:)
real(kind_phys), intent(in) :: prevsq(:,:)
!$acc declare copyin(t,q,prevst,prevsq)
real(kind_phys), intent(out), optional :: forcet(:,:)
real(kind_phys), intent(out), optional :: forceq(:,:)
integer, intent(out), optional :: cactiv(:)
integer, intent(out), optional :: cactiv_m(:)
real(kind_phys), intent(out) :: forcet(:,:)
real(kind_phys), intent(out) :: forceq(:,:)
integer, intent(out) :: cactiv(:)
integer, intent(out) :: cactiv_m(:)
!$acc declare copyout(forcet,forceq,cactiv,cactiv_m)
real(kind_phys), intent(in), optional :: conv_act(:)
real(kind_phys), intent(in), optional :: conv_act_m(:)
real(kind_phys), intent(in) :: conv_act(:)
real(kind_phys), intent(in) :: conv_act_m(:)
!$acc declare copyin(conv_act,conv_act_m)
character(len=*), intent(out) :: errmsg
integer, intent(out) :: errflg
Expand Down
8 changes: 0 additions & 8 deletions physics/CONV/C3/cu_c3_driver_pre.meta
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@
type = real
kind = kind_phys
intent = in
optional = True
[prevsq]
standard_name = specific_humidity_on_previous_timestep
long_name = moisture from previous time step
Expand All @@ -77,7 +76,6 @@
type = real
kind = kind_phys
intent = in
optional = True
[forcet]
standard_name = tendency_of_air_temperature_due_to_nonphysics
long_name = temperature tendency due to dynamics only
Expand All @@ -86,7 +84,6 @@
type = real
kind = kind_phys
intent = out
optional = True
[forceq]
standard_name = tendendy_of_specific_humidity_due_to_nonphysics
long_name = moisture tendency due to dynamics only
Expand All @@ -95,23 +92,20 @@
type = real
kind = kind_phys
intent = out
optional = True
[cactiv]
standard_name = counter_for_grell_freitas_convection
long_name = convective activity memory
units = none
dimensions = (horizontal_loop_extent)
type = integer
intent = out
optional = True
[cactiv_m]
standard_name = counter_for_grell_freitas_mid_level_convection
long_name = midlevel convective activity memory
units = none
dimensions = (horizontal_loop_extent)
type = integer
intent = out
optional = True
[conv_act]
standard_name = consecutive_calls_for_grell_freitas_convection
long_name = Memory counter for GF
Expand All @@ -120,7 +114,6 @@
type = real
kind = kind_phys
intent = in
optional = True
[conv_act_m]
standard_name = consecutive_calls_for_grell_freitas_mid_level_convection
long_name = Memory counter for GF midlevel
Expand All @@ -129,7 +122,6 @@
type = real
kind = kind_phys
intent = in
optional = True
[errmsg]
standard_name = ccpp_error_message
long_name = error message for error handling in CCPP
Expand Down
4 changes: 2 additions & 2 deletions physics/CONV/C3/cu_c3_sh.F90
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ subroutine cu_c3_sh_run ( &
,intent (in ) :: &
tmf
real(kind=kind_phys), dimension (its:,kts:) &
,intent (in ), optional :: &
,intent (in ), optional :: &
qmicro, sigmain, forceqv_spechum

real(kind=kind_phys), dimension (its:) &
Expand Down Expand Up @@ -139,7 +139,7 @@ subroutine cu_c3_sh_run ( &
dtime,tcrit,fv,r_d,betascu,betamcu,betadcu
!$acc declare sigmaout
real(kind=kind_phys), dimension (its:,kts:) &
,intent (out), optional :: &
,intent (out), optional :: &
sigmaout


Expand Down
4 changes: 2 additions & 2 deletions physics/CONV/Chikira_Sugiyama/cs_conv.F90
Original file line number Diff line number Diff line change
Expand Up @@ -195,12 +195,12 @@ subroutine cs_conv_run( IJSDIM , KMAX , ntracp1 , NN, &
!
! modified arguments
!
real(kind_phys), intent(inout), optional :: CBMFX(:,:) ! 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(kind_phys), intent(inout), dimension(:,:), optional :: ud_mf
real(kind_phys), intent(inout), dimension(:,:) :: ud_mf
real(kind_phys), intent(inout), dimension(:,:) :: dd_mf, dt_mf

real(kind_phys), intent(out) :: rain1(:) ! lwe thickness of deep convective precipitation amount (m)
Expand Down
2 changes: 0 additions & 2 deletions physics/CONV/Chikira_Sugiyama/cs_conv.meta
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@
type = real
kind = kind_phys
intent = inout
optional = True
[dd_mf]
standard_name = instantaneous_atmosphere_downdraft_convective_mass_flux
long_name = (downdraft mass flux) * delt
Expand Down Expand Up @@ -216,7 +215,6 @@
type = real
kind = kind_phys
intent = inout
optional = True
[mype]
standard_name = mpi_rank
long_name = current MPI rank
Expand Down
4 changes: 2 additions & 2 deletions physics/CONV/Grell_Freitas/cu_gf_driver.F90
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ subroutine cu_gf_driver_run(ntracer,garea,im,km,dt,flag_init,flag_restart, gf_co
integer :: ichoicem=13 ! 0 2 5 13
integer :: ichoice_s=3 ! 0 1 2 3
integer, intent(in) :: spp_cu_deep ! flag for using SPP perturbations
real(kind_phys), dimension(:,:), intent(in),optional :: &
real(kind_phys), dimension(:,:), optional, intent(in) :: &
& spp_wts_cu_deep
real(kind=kind_phys) :: spp_wts_cu_deep_tmp

Expand Down Expand Up @@ -129,7 +129,7 @@ subroutine cu_gf_driver_run(ntracer,garea,im,km,dt,flag_init,flag_restart, gf_co
integer, dimension (:), intent(out) :: hbot,htop,kcnv
integer, dimension (:), intent(in) :: xland
real(kind=kind_phys), dimension (:), intent(in) :: pbl
real(kind=kind_phys), dimension (:), intent(in), optional :: maxMF
real(kind=kind_phys), dimension (:), intent(in) :: maxMF
!$acc declare copyout(hbot,htop,kcnv)
!$acc declare copyin(xland,pbl)
integer, dimension (im) :: tropics
Expand Down
1 change: 0 additions & 1 deletion physics/CONV/Grell_Freitas/cu_gf_driver.meta
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,6 @@
type = real
kind = kind_phys
intent = inout
optional = True
[cliw]
standard_name = ice_water_mixing_ratio_convective_transport_tracer
long_name = ratio of mass of ice water to mass of dry air plus vapor (without condensates) in the convectively transported tracer array
Expand Down
17 changes: 8 additions & 9 deletions physics/CONV/Grell_Freitas/cu_gf_driver_post.F90
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ module cu_gf_driver_post
!> \section arg_table_cu_gf_driver_post_run Argument Table
!! \htmlinclude cu_gf_driver_post_run.html
!!
subroutine cu_gf_driver_post_run (im, km, t, q, prevst, prevsq, cactiv, cactiv_m, conv_act, conv_act_m, rrfs_sd, ntsmoke, ntdust, ntcoarsepm, chem3d, gq0, errmsg, errflg)
subroutine cu_gf_driver_post_run (im, km, t, q, prevst, prevsq, cactiv, cactiv_m, conv_act, conv_act_m, ntsmoke, ntdust, ntcoarsepm, chem3d, gq0, errmsg, errflg)

use machine, only: kind_phys

Expand All @@ -26,13 +26,12 @@ subroutine cu_gf_driver_post_run (im, km, t, q, prevst, prevsq, cactiv, cactiv_m
integer, intent(in) :: im, km
real(kind_phys), intent(in) :: t(:,:)
real(kind_phys), intent(in) :: q(:,:)
real(kind_phys), intent(out), optional :: prevst(:,:)
real(kind_phys), intent(out), optional :: prevsq(:,:)
integer, intent(in), optional :: cactiv(:)
integer, intent(in), optional :: cactiv_m(:)
real(kind_phys), intent(out), optional :: conv_act(:)
real(kind_phys), intent(out), optional :: conv_act_m(:)
logical, intent(in) :: rrfs_sd
real(kind_phys), intent(out) :: prevst(:,:)
real(kind_phys), intent(out) :: prevsq(:,:)
integer, intent(in) :: cactiv(:)
integer, intent(in) :: cactiv_m(:)
real(kind_phys), intent(out) :: conv_act(:)
real(kind_phys), intent(out) :: conv_act_m(:)
integer, intent(in) :: ntsmoke, ntdust, ntcoarsepm
real(kind_phys), intent(inout), optional :: chem3d(:,:,:)
real(kind_phys), intent(inout) :: gq0(:,:,:)
Expand Down Expand Up @@ -64,7 +63,7 @@ subroutine cu_gf_driver_post_run (im, km, t, q, prevst, prevsq, cactiv, cactiv_m
endif
enddo

if (rrfs_sd) then
if (present(chem3d)) then
gq0(:,:,ntsmoke ) = chem3d(:,:,1)
gq0(:,:,ntdust ) = chem3d(:,:,2)
gq0(:,:,ntcoarsepm) = chem3d(:,:,3)
Expand Down
13 changes: 0 additions & 13 deletions physics/CONV/Grell_Freitas/cu_gf_driver_post.meta
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
type = real
kind = kind_phys
intent = out
optional = True
[prevsq]
standard_name = specific_humidity_on_previous_timestep
long_name = moisture from previous time step
Expand All @@ -54,23 +53,20 @@
type = real
kind = kind_phys
intent = out
optional = True
[cactiv]
standard_name = counter_for_grell_freitas_convection
long_name = convective activity memory
units = none
dimensions = (horizontal_loop_extent)
type = integer
intent = in
optional = True
[cactiv_m]
standard_name = counter_for_grell_freitas_mid_level_convection
long_name = midlevel convective activity memory
units = none
dimensions = (horizontal_loop_extent)
type = integer
intent = in
optional = True
[conv_act]
standard_name = consecutive_calls_for_grell_freitas_convection
long_name = Memory counter for GF
Expand All @@ -79,7 +75,6 @@
type = real
kind = kind_phys
intent = out
optional = True
[conv_act_m]
standard_name = consecutive_calls_for_grell_freitas_mid_level_convection
long_name = Memory counter for GF midlevel
Expand All @@ -88,14 +83,6 @@
type = real
kind = kind_phys
intent = out
optional = True
[rrfs_sd]
standard_name = do_smoke_coupling
long_name = flag controlling rrfs_sd collection
units = flag
dimensions = ()
type = logical
intent = in
[ntsmoke]
standard_name = index_for_smoke_in_tracer_concentration_array
long_name = tracer index for smoke
Expand Down
Loading
Loading