From 7e2d83bbb6741217cd33681fff468b8b314a0b39 Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Thu, 24 Oct 2024 15:19:01 -0400 Subject: [PATCH 1/3] fix some optional arugments --- physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmg_pre.F90 | 2 +- physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmg_pre.meta | 1 + physics/Radiation/RRTMG/radlw_main.F90 | 3 ++- physics/Radiation/RRTMG/radlw_main.meta | 1 + physics/Radiation/RRTMG/radsw_main.F90 | 3 ++- physics/Radiation/RRTMG/radsw_main.meta | 1 + physics/SFC_Models/SeaIce/CICE/sfc_cice.f | 6 ++++-- physics/SFC_Models/SeaIce/CICE/sfc_cice.meta | 1 + 8 files changed, 13 insertions(+), 5 deletions(-) diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmg_pre.F90 b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmg_pre.F90 index eadc041fd..3ed7547dc 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmg_pre.F90 +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmg_pre.F90 @@ -208,7 +208,7 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, lextop,& real(kind=kind_phys), dimension(:,:,:), intent(out) :: faerlw1,& faerlw2,& faerlw3 - real(kind=kind_phys), dimension(:,:), intent(out) :: alpha + real(kind=kind_phys), dimension(:,:), intent(out), optional :: alpha character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmg_pre.meta b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmg_pre.meta index a7df9be2a..0b2553540 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmg_pre.meta +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmg_pre.meta @@ -1474,6 +1474,7 @@ type = real kind = kind_phys intent = out + optional = True [top_at_1] standard_name = flag_for_vertical_ordering_in_radiation long_name = flag for vertical ordering in radiation diff --git a/physics/Radiation/RRTMG/radlw_main.F90 b/physics/Radiation/RRTMG/radlw_main.F90 index cdf5c69ef..af0d84de3 100644 --- a/physics/Radiation/RRTMG/radlw_main.F90 +++ b/physics/Radiation/RRTMG/radlw_main.F90 @@ -630,7 +630,8 @@ subroutine rrtmg_lw_run & 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),intent(in),optional:: & + alpha real (kind=kind_phys), dimension(:,:,:),intent(in):: & & aeraod, aerssa diff --git a/physics/Radiation/RRTMG/radlw_main.meta b/physics/Radiation/RRTMG/radlw_main.meta index 0b0819042..f7a8ee43d 100644 --- a/physics/Radiation/RRTMG/radlw_main.meta +++ b/physics/Radiation/RRTMG/radlw_main.meta @@ -199,6 +199,7 @@ type = real kind = kind_phys intent = in + optional = True [npts] standard_name = horizontal_loop_extent long_name = horizontal dimension diff --git a/physics/Radiation/RRTMG/radsw_main.F90 b/physics/Radiation/RRTMG/radsw_main.F90 index 42ee92213..70123fe19 100644 --- a/physics/Radiation/RRTMG/radsw_main.F90 +++ b/physics/Radiation/RRTMG/radsw_main.F90 @@ -726,7 +726,8 @@ subroutine rrtmg_sw_run & real (kind=kind_phys), intent(in) :: cosz(npts), solcon, & & de_lgth(npts) - real (kind=kind_phys), dimension(npts,nlay), intent(in) :: alpha + real (kind=kind_phys), dimension(npts,nlay),intent(in),optional:: & + alpha ! --- outputs: real (kind=kind_phys), dimension(:,:), intent(inout) :: hswc diff --git a/physics/Radiation/RRTMG/radsw_main.meta b/physics/Radiation/RRTMG/radsw_main.meta index 00a93e438..bd2898ad3 100644 --- a/physics/Radiation/RRTMG/radsw_main.meta +++ b/physics/Radiation/RRTMG/radsw_main.meta @@ -223,6 +223,7 @@ type = real kind = kind_phys intent = in + optional = True [cosz] standard_name = cosine_of_solar_zenith_angle_for_daytime_points_on_radiation_timestep long_name = cosine of the solar zenit angle diff --git a/physics/SFC_Models/SeaIce/CICE/sfc_cice.f b/physics/SFC_Models/SeaIce/CICE/sfc_cice.f index 0df1f67a5..ec8a2c58a 100644 --- a/physics/SFC_Models/SeaIce/CICE/sfc_cice.f +++ b/physics/SFC_Models/SeaIce/CICE/sfc_cice.f @@ -101,8 +101,10 @@ subroutine sfc_cice_run & ! real (kind=kind_phys), dimension(im), intent(in) :: u1, v1, & real (kind=kind_phys), dimension(:), intent(in) :: & - & t1, q1, cm, ch, prsl1, wind, snowd - + & t1, q1, cm, ch, prsl1, wind + real (kind=kind_phys), dimension(:), intent(in), optional :: & + & snowd + real (kind=kind_phys), dimension(:), intent(in), optional :: & & dqsfc, dtsfc, dusfc, dvsfc logical, dimension(:), intent(in) :: flag_cice, flag_iter diff --git a/physics/SFC_Models/SeaIce/CICE/sfc_cice.meta b/physics/SFC_Models/SeaIce/CICE/sfc_cice.meta index 226c6e948..71bf56720 100644 --- a/physics/SFC_Models/SeaIce/CICE/sfc_cice.meta +++ b/physics/SFC_Models/SeaIce/CICE/sfc_cice.meta @@ -160,6 +160,7 @@ type = real kind = kind_phys intent = in + optional = True [qsurf] standard_name = surface_specific_humidity_over_ice long_name = surface air saturation specific humidity over ice From 5bdca0d09aca2aafa28cca5e676f3d0693118111 Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Thu, 24 Oct 2024 15:25:09 -0400 Subject: [PATCH 2/3] fix some more optional variables --- physics/SFC_Models/Land/RUC/lsm_ruc.F90 | 5 +++-- physics/SFC_Models/Land/RUC/lsm_ruc.meta | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/physics/SFC_Models/Land/RUC/lsm_ruc.F90 b/physics/SFC_Models/Land/RUC/lsm_ruc.F90 index f2961d5e7..3b8bc0087 100644 --- a/physics/SFC_Models/Land/RUC/lsm_ruc.F90 +++ b/physics/SFC_Models/Land/RUC/lsm_ruc.F90 @@ -459,8 +459,9 @@ subroutine lsm_ruc_run & ! inputs ! for ice & sncovr1_ice, qsurf_ice, gflux_ice, evap_ice, ep1d_ice, & & cmm_ice, chh_ice, hflx_ice, & - & acsnow_ice, snowmt_ice - + & snowmt_ice + real (kind_phys), dimension(:), intent(inout), optional :: & + acsnow_ice real (kind_phys), dimension(:), intent( out) :: & & albdvis_lnd, albdnir_lnd, albivis_lnd, albinir_lnd real (kind_phys), dimension(:), intent( out), optional :: & diff --git a/physics/SFC_Models/Land/RUC/lsm_ruc.meta b/physics/SFC_Models/Land/RUC/lsm_ruc.meta index 0abe4ada3..eac6a06be 100644 --- a/physics/SFC_Models/Land/RUC/lsm_ruc.meta +++ b/physics/SFC_Models/Land/RUC/lsm_ruc.meta @@ -1653,6 +1653,7 @@ type = real kind = kind_phys intent = inout + optional = True [snowmt_ice] standard_name = surface_snow_melt_over_ice long_name = snow melt during timestep over ice From 0678f44c137957033d357b2168b40fb5ab029be6 Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Thu, 24 Oct 2024 17:06:04 -0400 Subject: [PATCH 3/3] fix another optional argument in RUC LSM --- physics/SFC_Models/Land/RUC/lsm_ruc.F90 | 4 ++-- physics/SFC_Models/Land/RUC/lsm_ruc.meta | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/physics/SFC_Models/Land/RUC/lsm_ruc.F90 b/physics/SFC_Models/Land/RUC/lsm_ruc.F90 index 3b8bc0087..817c819c0 100644 --- a/physics/SFC_Models/Land/RUC/lsm_ruc.F90 +++ b/physics/SFC_Models/Land/RUC/lsm_ruc.F90 @@ -455,13 +455,13 @@ subroutine lsm_ruc_run & ! inputs ! for land & sncovr1_lnd, qsurf_lnd, gflux_lnd, evap_lnd, & & cmm_lnd, chh_lnd, hflx_lnd, sbsno, & - & acsnow_lnd, snowmt_lnd, snohf, & + & snowmt_lnd, snohf, & ! for ice & sncovr1_ice, qsurf_ice, gflux_ice, evap_ice, ep1d_ice, & & cmm_ice, chh_ice, hflx_ice, & & snowmt_ice real (kind_phys), dimension(:), intent(inout), optional :: & - acsnow_ice + acsnow_lnd, acsnow_ice real (kind_phys), dimension(:), intent( out) :: & & albdvis_lnd, albdnir_lnd, albivis_lnd, albinir_lnd real (kind_phys), dimension(:), intent( out), optional :: & diff --git a/physics/SFC_Models/Land/RUC/lsm_ruc.meta b/physics/SFC_Models/Land/RUC/lsm_ruc.meta index eac6a06be..fc3c52d2a 100644 --- a/physics/SFC_Models/Land/RUC/lsm_ruc.meta +++ b/physics/SFC_Models/Land/RUC/lsm_ruc.meta @@ -1489,6 +1489,7 @@ type = real kind = kind_phys intent = inout + optional = True [snowmt_lnd] standard_name = surface_snow_melt_over_land long_name = snow melt during timestep over land