@@ -739,7 +739,7 @@ module GFS_typedefs
739
739
integer :: rrtmgp_nrghice ! < Number of ice-roughness categories
740
740
integer :: rrtmgp_nGauss_ang ! < Number of angles used in Gaussian quadrature
741
741
logical :: do_GPsw_Glw ! < If set to true use rrtmgp for SW calculation, rrtmg for LW.
742
- character (len= 128 ) :: active_gases_array(100 ) ! < character array for each trace gas name
742
+ character (len= 128 ), pointer :: active_gases_array(:) = > null ( ) ! < character array for each trace gas name
743
743
logical :: use_LW_jacobian ! < If true, use Jacobian of LW to update radiation tendency.
744
744
logical :: damp_LW_fluxadj ! < If true, damp the LW flux adjustment using the Jacobian w/ height with logistic function
745
745
real (kind_phys) :: lfnc_k ! < Logistic function transition depth (Pa)
@@ -1153,8 +1153,8 @@ module GFS_typedefs
1153
1153
integer :: n_var_lndp
1154
1154
logical :: lndp_each_step ! flag to indicate that land perturbations are applied at every time step,
1155
1155
! otherwise they are applied only after gcycle is run
1156
- character (len= 3 ) :: lndp_var_list(6 ) ! dimension here must match n_var_max_lndp in stochy_nml_def
1157
- real (kind= kind_phys) :: lndp_prt_list(6 ) ! dimension here must match n_var_max_lndp in stochy_nml_def
1156
+ character (len= 3 ) , pointer :: lndp_var_list(: ) ! dimension here must match n_var_max_lndp in stochy_nml_def
1157
+ real (kind= kind_phys), pointer :: lndp_prt_list(: ) ! dimension here must match n_var_max_lndp in stochy_nml_def
1158
1158
! also previous code had dimension 5 for each pert, to allow
1159
1159
! multiple patterns. It wasn't fully coded (and wouldn't have worked
1160
1160
! with nlndp>1, so I just dropped it). If we want to code it properly,
@@ -2165,7 +2165,6 @@ module GFS_typedefs
2165
2165
real (kind= kind_phys), pointer :: sfc_alb_uvvis_dif(:,:) = > null () ! <
2166
2166
real (kind= kind_phys), pointer :: toa_src_lw(:,:) = > null () ! <
2167
2167
real (kind= kind_phys), pointer :: toa_src_sw(:,:) = > null () ! <
2168
- character (len= 128 ), pointer :: active_gases_array(:) = > null () ! < Character array for each trace gas name
2169
2168
integer , pointer :: icseed_lw(:) = > null () ! < RRTMGP seed for RNG for longwave radiation
2170
2169
integer , pointer :: icseed_sw(:) = > null () ! < RRTMGP seed for RNG for shortwave radiation
2171
2170
type (proflw_type), pointer :: flxprf_lw(:,:) = > null () ! < DDT containing RRTMGP longwave fluxes
@@ -2185,26 +2184,12 @@ module GFS_typedefs
2185
2184
type (ty_gas_concs) :: gas_concentrations ! < RRTMGP DDT
2186
2185
type (ty_source_func_lw) :: sources ! < RRTMGP DDT
2187
2186
2188
- !- - HWRF physics: dry mixing ratios
2189
- real (kind= kind_phys), pointer :: qv_r(:,:) = > null () ! <
2190
- real (kind= kind_phys), pointer :: qc_r(:,:) = > null () ! <
2191
- real (kind= kind_phys), pointer :: qi_r(:,:) = > null () ! <
2192
- real (kind= kind_phys), pointer :: qr_r(:,:) = > null () ! <
2193
- real (kind= kind_phys), pointer :: qs_r(:,:) = > null () ! <
2194
- real (kind= kind_phys), pointer :: qg_r(:,:) = > null () ! <
2195
-
2196
2187
!- - GSL drag suite
2197
2188
real (kind= kind_phys), pointer :: varss(:) = > null () ! <
2198
2189
real (kind= kind_phys), pointer :: ocss(:) = > null () ! <
2199
2190
real (kind= kind_phys), pointer :: oa4ss(:,:) = > null () ! <
2200
2191
real (kind= kind_phys), pointer :: clxss(:,:) = > null () ! <
2201
2192
2202
- !- - Ferrier-Aligo MP scheme
2203
- real (kind= kind_phys), pointer :: f_rain (:,:) = > null () ! <
2204
- real (kind= kind_phys), pointer :: f_ice (:,:) = > null () ! <
2205
- real (kind= kind_phys), pointer :: f_rimef (:,:) = > null () ! <
2206
- real (kind= kind_phys), pointer :: cwm (:,:) = > null () ! <
2207
-
2208
2193
!- - 3D diagnostics
2209
2194
integer :: rtg_ozone_index, rtg_tke_index
2210
2195
@@ -3010,7 +2995,7 @@ subroutine coupling_create (Coupling, IM, Model)
3010
2995
endif
3011
2996
3012
2997
!- -- stochastic land perturbation option
3013
- if (Model% lndp_type .NE. 0 ) then
2998
+ if (Model% lndp_type /= 0 ) then
3014
2999
allocate (Coupling% sfc_wts (IM,Model% n_var_lndp))
3015
3000
Coupling% sfc_wts = clear_val
3016
3001
endif
@@ -3964,6 +3949,13 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
3964
3949
Model% do_GPsw_Glw = do_GPsw_Glw
3965
3950
Model% active_gases = active_gases
3966
3951
Model% ngases = nGases
3952
+ if (Model% do_RRTMGP) then
3953
+ allocate (Model% active_gases_array(Model% nGases))
3954
+ ! Reset, will be populated by RRTMGP
3955
+ do ipat= 1 ,Model% nGases
3956
+ Model% active_gases_array(ipat) = ' '
3957
+ enddo
3958
+ endif
3967
3959
Model% rrtmgp_root = rrtmgp_root
3968
3960
Model% lw_file_gas = lw_file_gas
3969
3961
Model% lw_file_clouds = lw_file_clouds
@@ -4420,10 +4412,16 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
4420
4412
Model% use_zmtnblck = use_zmtnblck
4421
4413
Model% do_shum = do_shum
4422
4414
Model% do_skeb = do_skeb
4415
+ !- -- stochastic surface perturbation options
4423
4416
Model% lndp_type = lndp_type
4424
4417
Model% n_var_lndp = n_var_lndp
4425
4418
Model% lndp_each_step = lndp_each_step
4426
-
4419
+ if (Model% lndp_type/= 0 ) then
4420
+ allocate (Model% lndp_var_list(Model% n_var_lndp))
4421
+ allocate (Model% lndp_prt_list(Model% n_var_lndp))
4422
+ Model% lndp_var_list(:) = ' '
4423
+ Model% lndp_prt_list(:) = clear_val
4424
+ end if
4427
4425
!- -- cellular automata options
4428
4426
! force namelist constsitency
4429
4427
allocate (Model% vfact_ca(levs))
@@ -7200,7 +7198,6 @@ subroutine interstitial_create (Interstitial, IM, Model)
7200
7198
allocate (Interstitial% sfc_alb_uvvis_dif (Model% rrtmgp_nBandsSW,IM))
7201
7199
allocate (Interstitial% toa_src_sw (IM,Model% rrtmgp_nGptsSW))
7202
7200
allocate (Interstitial% toa_src_lw (IM,Model% rrtmgp_nGptsLW))
7203
- allocate (Interstitial% active_gases_array (Model% nGases))
7204
7201
!
7205
7202
! gas_concentrations (ty_gas_concs)
7206
7203
!
@@ -7328,21 +7325,6 @@ subroutine interstitial_create (Interstitial, IM, Model)
7328
7325
allocate (Interstitial% cnv_ndrop (IM,Model% levs))
7329
7326
allocate (Interstitial% cnv_nice (IM,Model% levs))
7330
7327
end if
7331
- if (Model% imp_physics == Model% imp_physics_fer_hires) then
7332
- !- -- if HWRF physics?
7333
- allocate (Interstitial% qv_r (IM,Model% levs))
7334
- allocate (Interstitial% qc_r (IM,Model% levs))
7335
- allocate (Interstitial% qi_r (IM,Model% levs))
7336
- allocate (Interstitial% qr_r (IM,Model% levs))
7337
- allocate (Interstitial% qs_r (IM,Model% levs))
7338
- allocate (Interstitial% qg_r (IM,Model% levs))
7339
-
7340
- !- -- Ferrier-Aligo MP scheme
7341
- allocate (Interstitial% f_ice (IM,Model% levs))
7342
- allocate (Interstitial% f_rain (IM,Model% levs))
7343
- allocate (Interstitial% f_rimef (IM,Model% levs))
7344
- allocate (Interstitial% cwm (IM,Model% levs))
7345
- end if
7346
7328
if (Model% do_shoc) then
7347
7329
if (.not. associated (Interstitial% qrn)) allocate (Interstitial% qrn (IM,Model% levs))
7348
7330
if (.not. associated (Interstitial% qsnw)) allocate (Interstitial% qsnw (IM,Model% levs))
@@ -7609,22 +7591,6 @@ subroutine interstitial_rad_reset (Interstitial, Model)
7609
7591
Interstitial% tsfa = clear_val
7610
7592
Interstitial% tsfg = clear_val
7611
7593
7612
- ! F-A scheme
7613
- if (Model% imp_physics == Model% imp_physics_fer_hires) then
7614
- Interstitial% qv_r = clear_val
7615
- Interstitial% qc_r = clear_val
7616
- Interstitial% qi_r = clear_val
7617
- Interstitial% qr_r = clear_val
7618
- Interstitial% qs_r = clear_val
7619
- Interstitial% qg_r = clear_val
7620
- if (Model% spec_adv) then
7621
- Interstitial% f_ice = clear_val
7622
- Interstitial% f_rain = clear_val
7623
- Interstitial% f_rimef = clear_val
7624
- Interstitial% cwm = clear_val
7625
- end if
7626
- end if
7627
-
7628
7594
if (Model% do_RRTMGP) then
7629
7595
Interstitial% tracer = clear_val
7630
7596
Interstitial% tv_lay = clear_val
@@ -7936,12 +7902,6 @@ subroutine interstitial_phys_reset (Interstitial, Model)
7936
7902
Interstitial% cnv_ndrop = clear_val
7937
7903
Interstitial% cnv_nice = clear_val
7938
7904
end if
7939
- if (Model% imp_physics == Model% imp_physics_fer_hires .and. Model% spec_adv) then
7940
- Interstitial% f_ice = clear_val
7941
- Interstitial% f_rain = clear_val
7942
- Interstitial% f_rimef = clear_val
7943
- Interstitial% cwm = clear_val
7944
- end if
7945
7905
if (Model% do_shoc) then
7946
7906
Interstitial% qrn = clear_val
7947
7907
Interstitial% qsnw = clear_val
0 commit comments