Skip to content

Commit cd8130d

Browse files
committed
Merge branch 'main' into enhancement/netcdf_missing_value_precisions
2 parents 5e35c49 + c8e4138 commit cd8130d

File tree

7 files changed

+24
-11
lines changed

7 files changed

+24
-11
lines changed

ccpp/physics_namelists/input_GFS_v17_p8_ugwpv1.nml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
iopt_tbot = 2
9595
iopt_stc = 3
9696
debug = .false.
97-
nstf_name = 2,0,0,0,0
97+
nstf_name = 2,1,0,0,0
9898
nst_anl = .true.
9999
psautco = 0.0008,0.0005
100100
prautco = 0.00015,0.00015

ccpp/physics_namelists/input_GFS_v17_p8_ugwpv1_ps.nml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393
iopt_tbot = 2
9494
iopt_stc = 3
9595
debug = .false.
96-
nstf_name = 2,0,0,0,0
96+
nstf_name = 2,1,0,0,0
9797
nst_anl = .true.
9898
psautco = 0.0008,0.0005
9999
prautco = 0.00015,0.00015

ccpp/physics_namelists/input_RAP.nml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
debug = .false.
7979
oz_phys = .false.
8080
oz_phys_2015 = .true.
81-
nstf_name = 2,0,0,0,0
81+
nstf_name = 2,1,0,0,0
8282
nst_anl = .true.
8383
lkm = 0
8484
psautco = 0.0008,0.0005

scm/etc/case_config/DYNAMO_NSA3a.nml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ case_name = 'DYNAMO_NSA3a',
33
input_type = 1
44
lsm_ics = .false.,
55
do_spinup = .false.,
6+
do_sst_initialize_only = .false.
67
spinup_timesteps = 0,
78
reference_profile_choice = 2,
89
column_area = 1.45E8,

scm/src/scm_forcing.F90

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,9 @@ subroutine interpolate_forcing(scm_input, scm_state, in_spinup)
144144

145145
!> - Set the surface parameters to the last available data.
146146
scm_state%pres_surf(i) = scm_input%input_pres_surf(scm_input%input_ntimes)
147-
scm_state%T_surf(i) = scm_input%input_T_surf(scm_input%input_ntimes)
147+
if (.not. scm_state%do_sst_initialize_only) then
148+
scm_state%T_surf(i) = scm_input%input_T_surf(scm_input%input_ntimes)
149+
end if
148150
scm_state%sh_flux(i) = scm_input%input_sh_flux_sfc_kin(scm_input%input_ntimes)
149151
scm_state%lh_flux(i) = scm_input%input_lh_flux_sfc_kin(scm_input%input_ntimes)
150152
end do
@@ -324,7 +326,7 @@ subroutine interpolate_forcing(scm_input, scm_state, in_spinup)
324326
end do
325327
end if
326328

327-
if (scm_state%surface_thermo_control == 0 .or. scm_state%surface_thermo_control == 1 .or. scm_state%surface_thermo_control == 2) then
329+
if (scm_state%surface_thermo_control == 0 .or. scm_state%surface_thermo_control == 1 .or. scm_state%surface_thermo_control == 2 .and. (.not. scm_state%do_sst_initialize_only)) then
328330
!skin temperature is needed if surface fluxes are specified (for calculating bulk Richardson number in the specified surface flux scheme) and for simple ocean scheme
329331
do i=1, scm_state%n_cols
330332
scm_state%T_surf(i) = scm_input%input_T_surf(scm_input%input_ntimes)
@@ -479,7 +481,9 @@ subroutine interpolate_forcing(scm_input, scm_state, in_spinup)
479481
!> - Interpolate the surface parameters in time.
480482
scm_state%pres_surf(i) = (1.0 - lifrac)*scm_input%input_pres_surf(low_t_index) + &
481483
lifrac*scm_input%input_pres_surf(low_t_index+1)
482-
scm_state%T_surf(i) = (1.0 - lifrac)*scm_input%input_T_surf(low_t_index) + lifrac*scm_input%input_T_surf(low_t_index+1)
484+
if (.not. scm_state%do_sst_initialize_only .or. scm_state%model_time == 0.0) then
485+
scm_state%T_surf(i) = (1.0 - lifrac)*scm_input%input_T_surf(low_t_index) + lifrac*scm_input%input_T_surf(low_t_index+1)
486+
end if
483487
scm_state%sh_flux(i) = (1.0 - lifrac)*scm_input%input_sh_flux_sfc_kin(low_t_index) + &
484488
lifrac*scm_input%input_sh_flux_sfc_kin(low_t_index+1)
485489
scm_state%lh_flux(i) = (1.0 - lifrac)*scm_input%input_lh_flux_sfc_kin(low_t_index) + &
@@ -701,8 +705,8 @@ subroutine interpolate_forcing(scm_input, scm_state, in_spinup)
701705
scm_state%dT_dt_rad(i,:) = (1.0 - lifrac)*dT_dt_rad_bracket(1,:) + lifrac*dT_dt_rad_bracket(2,:)
702706
end do
703707
end if
704-
705-
if (scm_state%surface_thermo_control == 0 .or. scm_state%surface_thermo_control == 1 .or. scm_state%surface_thermo_control == 2) then
708+
709+
if (scm_state%surface_thermo_control == 0 .or. scm_state%surface_thermo_control == 1 .or. scm_state%surface_thermo_control == 2 .and. (.not. scm_state%do_sst_initialize_only .or. scm_state%model_time == 0.0)) then
706710
!skin temperature is needed if surface fluxes are specified (for calculating bulk Richardson number in the specified surface flux scheme) and for simple ocean scheme
707711
do i=1, scm_state%n_cols
708712
scm_state%T_surf(i) = (1.0 - lifrac)*scm_input%input_T_surf(low_t_index) + lifrac*scm_input%input_T_surf(low_t_index+1)

scm/src/scm_input.F90

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ subroutine get_config_nml(scm_state)
6363
logical :: model_ics !< true means have land info too
6464
logical :: lsm_ics !< true when LSM initial conditions are included (but not all ICs from another model)
6565
logical :: do_spinup
66+
logical :: do_sst_initialize_only
6667
integer :: reference_profile_choice !< 1: McClatchey profile, 2: mid-latitude summer standard atmosphere
6768
integer :: year, month, day, hour, min
6869
real(kind=dp) :: column_area
@@ -80,7 +81,7 @@ subroutine get_config_nml(scm_state)
8081

8182
NAMELIST /case_config/ npz_type, vert_coord_file, case_name, dt, runtime, runtime_mult, n_itt_out, n_itt_diag, &
8283
n_levels, output_dir, thermo_forcing_type, model_ics, &
83-
lsm_ics, do_spinup, C_RES, spinup_timesteps, mom_forcing_type, relax_time, sfc_type, sfc_flux_spec, &
84+
lsm_ics, do_spinup, do_sst_initialize_only, C_RES, spinup_timesteps, mom_forcing_type, relax_time, sfc_type, sfc_flux_spec, &
8485
sfc_roughness_length_cm, reference_profile_choice, year, month, day, hour, min, &
8586
column_area, input_type
8687

@@ -116,6 +117,7 @@ subroutine get_config_nml(scm_state)
116117
model_ics = .false.
117118
lsm_ics = .false.
118119
do_spinup = .false.
120+
do_sst_initialize_only = .false.
119121
reference_profile_choice = 1
120122
year = 2006
121123
month = 1
@@ -200,6 +202,7 @@ subroutine get_config_nml(scm_state)
200202
scm_state%model_ics = model_ics
201203
scm_state%lsm_ics = lsm_ics
202204
scm_state%do_spinup = do_spinup
205+
scm_state%do_sst_initialize_only = do_sst_initialize_only
203206
scm_state%reference_profile_choice = reference_profile_choice
204207
scm_state%relax_time = relax_time
205208
scm_state%input_type = input_type

scm/src/scm_type_defs.F90

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ module scm_type_defs
105105
logical :: model_ics !< true means have land info too
106106
logical :: lsm_ics !< true when LSM initial conditions are included (but not all ICs from another model)
107107
logical :: do_spinup !< true when allowing the model to spin up before the "official" model integration starts
108+
logical :: do_sst_initialize_only !< true when initializing SST only (and letting physics change SST during integration)
108109
integer :: input_type !< 0=> original DTC format, 1=> DEPHY-SCM format
109110
integer :: force_adv_T !< 0=> off, 1=> temperature, 2=> theta, 3=> thetal
110111
logical :: force_adv_qv !< true = on
@@ -1335,12 +1336,16 @@ subroutine physics_set(physics, scm_input, scm_state)
13351336
physics%Sfcprop%xs(i) = real_zero
13361337
physics%Sfcprop%xu(i) = real_zero
13371338
physics%Sfcprop%xv(i) = real_zero
1338-
physics%Sfcprop%xz(i) = 30.0_dp
1339+
physics%Sfcprop%xz(i) = 20.0_dp
13391340
physics%Sfcprop%zm(i) = real_zero
13401341
physics%Sfcprop%xtts(i) = real_zero
13411342
physics%Sfcprop%xzts(i) = real_zero
13421343
physics%Sfcprop%d_conv(i) = real_zero
1343-
physics%Sfcprop%ifd(i) = real_zero
1344+
if (scm_state%sfc_type(i) == 0) then
1345+
physics%Sfcprop%ifd(i) = real_one
1346+
else
1347+
physics%Sfcprop%ifd(i) = real_zero
1348+
endif
13441349
physics%Sfcprop%dt_cool(i) = real_zero
13451350
physics%Sfcprop%qrain(i) = real_zero
13461351
elseif (physics%Model%nstf_name(2) == 0) then ! nsst restart

0 commit comments

Comments
 (0)