Skip to content

Commit

Permalink
merge in changes from #428 from @hertneky
Browse files Browse the repository at this point in the history
  • Loading branch information
grantfirl committed Apr 11, 2024
1 parent 906e1e7 commit e5ff072
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
8 changes: 4 additions & 4 deletions scm/src/run_scm.py
Original file line number Diff line number Diff line change
Expand Up @@ -488,12 +488,12 @@ def setup_rundir(self):
try:
input_type = case_nml['case_config']['input_type']
if input_type == 1:
surface_flux_spec = False
#open the case data file and read the surfaceForcing global attribute
case_data_dir = case_nml['case_config']['case_data_dir']
nc_fid = Dataset(os.path.join(SCM_ROOT, case_data_dir) + '/' + self._case + '_SCM_driver.nc' , 'r')
surfaceForcing = nc_fid.getncattr('surfaceForcing')
nc_fid = Dataset(os.path.join(SCM_ROOT, self._case_data_dir) + '/' + self._case + '_SCM_driver.nc' , 'r')
surfaceForcing = nc_fid.getncattr('surface_forcing_temp')
nc_fid.close()
if (surfaceForcing.lower() == 'flux' or surfaceForcing.lower() == 'surfaceflux'):
if (surfaceForcing.lower() == 'flux' or surfaceForcing.lower() == 'surface_flux'):
surface_flux_spec = True
except KeyError:
# if not using DEPHY format, check to see if surface fluxes are specified in the case configuration file (default is False)
Expand Down
5 changes: 2 additions & 3 deletions scm/src/scm_input.F90
Original file line number Diff line number Diff line change
Expand Up @@ -950,7 +950,7 @@ subroutine get_case_init_DEPHY(scm_state, scm_input)
real(kind=sp) :: z_nudging_temp, z_nudging_theta, z_nudging_thetal, z_nudging_qv, z_nudging_qt, z_nudging_rv, z_nudging_rt, z_nudging_u, z_nudging_v
real(kind=sp) :: p_nudging_temp, p_nudging_theta, p_nudging_thetal, p_nudging_qv, p_nudging_qt, p_nudging_rv, p_nudging_rt, p_nudging_u, p_nudging_v
character(len=5) :: input_surfaceType
character(len=11) :: input_surfaceForcingWind='',input_surfaceForcingMoist='',input_surfaceForcingLSM='',input_surfaceForcingTemp=''
character(len=12) :: input_surfaceForcingWind='',input_surfaceForcingMoist='',input_surfaceForcingLSM='',input_surfaceForcingTemp=''

! initial variables (IC = Initial Condition)
real(kind=dp), allocatable :: input_lat(:) !< column latitude (deg)
Expand Down Expand Up @@ -1630,7 +1630,7 @@ subroutine get_case_init_DEPHY(scm_state, scm_input)
call NetCDF_read_var(ncid, "wprvp_s", .False., input_force_wprvp)
call NetCDF_read_var(ncid, "wprtp_s", .False., input_force_wprtp)
else if (trim(input_surfaceForcingMoist) == 'surface_flux') then
call NetCDF_read_var(ncid, "hfls", .False., input_force_sfc_sens_flx)
call NetCDF_read_var(ncid, "hfls", .False., input_force_sfc_lat_flx)
endif

!
Expand Down Expand Up @@ -1969,7 +1969,6 @@ subroutine get_case_init_DEPHY(scm_state, scm_input)
if (trim(input_surfaceForcingLSM) == "lsm") then
scm_input%input_ozone = input_ozone(:,active_init_time)
scm_input%input_area = input_area(active_init_time)
scm_state%area = input_area(active_init_time)

This comment has been minimized.

Copy link
@dustinswales

dustinswales May 15, 2024

Collaborator

@grantfirl I just noticed this was removed. We need this for the UFS case generation with active LSM.


scm_input%input_stddev = input_stddev(active_init_time)
scm_input%input_convexity= input_convexity(active_init_time)
Expand Down

0 comments on commit e5ff072

Please sign in to comment.