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

Namelist updates and runtime fixes #502

Merged
merged 17 commits into from
Aug 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 2 additions & 0 deletions .github/workflows/ci_build_scm_ubuntu_22.04_nvidia.yml
Original file line number Diff line number Diff line change
Expand Up @@ -291,10 +291,12 @@ jobs:
make -j

- name: Download data for SCM
if: contains(matrix.enable-gpu-acc, 'False')
run: |
cd ${SCM_ROOT}
./contrib/get_all_static_data.sh
./contrib/get_thompson_tables.sh
./contrib/get_aerosol_climo.sh

- name: Run SCM RTs (w/o GPU)
if: contains(matrix.enable-gpu-acc, 'False')
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_test_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ jobs:
run: |
mkdir $HOME/output
chmod a+rw $HOME/output
docker run --rm -v $HOME/output:/home ${{ env.TEST_TAG }} ./run_scm.py -f ../../test/rt_test_cases.py --runtime_mult 0.1 -d
docker run --rm -v $HOME/output:/home ${{ env.TEST_TAG }} ./run_scm.py -f ../../test/rt_test_cases.py --runtime_mult 0.1 --mpi_command "mpirun -np 1 --allow-run-as-root" -d
2 changes: 1 addition & 1 deletion ccpp/physics
4 changes: 2 additions & 2 deletions ccpp/physics_namelists/input_GFS_v15p2_RRTMGP.nml
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@
do_RRTMGP = .true.
active_gases = 'h2o_co2_o3_n2o_ch4_o2'
ngases = 6
rrtmgp_root = '../../ccpp/physics/physics/rte-rrtmgp/'
rrtmgp_root = '../../ccpp/physics/physics/Radiation/RRTMGP/rte-rrtmgp/'
lw_file_gas = 'rrtmgp/data/rrtmgp-data-lw-g256-2018-12-04.nc'
lw_file_clouds = 'extensions/cloud_optics/rrtmgp-cloud-optics-coeffs-lw.nc'
sw_file_gas = 'rrtmgp/data/rrtmgp-data-sw-g224-2018-12-04.nc'
sw_file_clouds = 'extensions/cloud_optics/rrtmgp-cloud-optics-coeffs-sw.nc'
sw_file_clouds = 'extensions/cloud_optics/rrtmgp-cloud-optics-coeffs-reordered-sw.nc'
doG_cldoptics = .true.
rrtmgp_ngauss_ang = 3
rrtmgp_nrghice = 3
Expand Down
4 changes: 2 additions & 2 deletions ccpp/physics_namelists/input_GFS_v16_RRTMGP.nml
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,11 @@
doGP_lwscat = .true.
active_gases = 'h2o_co2_o3_n2o_ch4_o2'
ngases = 6
rrtmgp_root = '../../ccpp/physics/physics/rte-rrtmgp/'
rrtmgp_root = '../../ccpp/physics/physics/Radiation/RRTMGP/rte-rrtmgp/'
lw_file_gas = 'rrtmgp/data/rrtmgp-data-lw-g128-210809.nc'
lw_file_clouds = 'extensions/cloud_optics/rrtmgp-cloud-optics-coeffs-lw.nc'
sw_file_gas = 'rrtmgp/data/rrtmgp-data-sw-g112-210809.nc'
sw_file_clouds = 'extensions/cloud_optics/rrtmgp-cloud-optics-coeffs-sw.nc'
sw_file_clouds = 'extensions/cloud_optics/rrtmgp-cloud-optics-coeffs-reordered-sw.nc'
rrtmgp_nGptsSW = 112
rrtmgp_nGptsLW = 128
rrtmgp_nBandsLW = 16
Expand Down
158 changes: 158 additions & 0 deletions ccpp/physics_namelists/input_GFS_v16_RRTMGP_ps.nml
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@

&gfs_physics_nml
cal_pre = .false.
cdmbgwd = 4.0, 0.15, 1.0, 1.0
cnvcld = .true.
cnvgwd = .true.
debug = .false.
do_shum = .false.
do_skeb = .false.
do_spp = .false.
do_sppt = .false.
do_tofd = .true.
do_ugwp = .false.
dspheat = .true.
effr_in = .true.
fhcyc = 0
fhlwr = 1200.0
fhswr = 1200.0
fhzero = 1.0
h2o_phys = .true.
hybedmf = .false.
iaer = 5111
ialb = 1
iau_inc_files = ''
icliq_sw = 2
ico2 = 2
iems = 1
imfdeepcnv = 2
imfshalcnv = 2
imp_physics = 11
iopt_alb = 2
iopt_btr = 1
iopt_crs = 1
iopt_dveg = 1
iopt_frz = 1
iopt_inf = 1
iopt_rad = 1
iopt_run = 1
iopt_sfc = 1
iopt_snf = 4
iopt_stc = 1
iopt_tbot = 2
iovr = 3
isatmedmf = 1
isol = 2
isot = 1
isubc_lw = 2
isubc_sw = 2
ivegsrc = 1
ldiag3d = .true.
ldiag_ugwp = .false.
lgfdlmprad = .true.
lheatstrg = .false.
lndp_type = 0
lsm = 1
lsoil = 4
lwhtr = .true.
n_var_lndp = 0
n_var_spp = 0
nsfullradar_diag = 3600
nst_anl = .true.
nstf_name = 2, 1, 0, 0, 0
oz_phys = .false.
oz_phys_2015 = .true.
pdfcld = .false.
prautco = 0.00015, 0.00015
pre_rad = .false.
print_diff_pgr = .false.
prslrd0 = 0.0
psautco = 0.0008, 0.0005
qdiag3d = .true.
random_clds = .false.
redrag = .true.
satmedmf = .true.
shal_cnv = .true.
swhtr = .true.
trans_trac = .true.
use_ufo = .true.
do_RRTMGP = .true.
doGP_cldoptics_LUT = .true.
doGP_lwscat = .true.
active_gases = 'h2o_co2_o3_n2o_ch4_o2'
ngases = 6
rrtmgp_root = '../../ccpp/physics/physics/Radiation/RRTMGP/rte-rrtmgp/'
lw_file_gas = 'rrtmgp/data/rrtmgp-data-lw-g128-210809.nc'
lw_file_clouds = 'extensions/cloud_optics/rrtmgp-cloud-optics-coeffs-lw.nc'
sw_file_gas = 'rrtmgp/data/rrtmgp-data-sw-g112-210809.nc'
sw_file_clouds = 'extensions/cloud_optics/rrtmgp-cloud-optics-coeffs-reordered-sw.nc'
rrtmgp_nGptsSW = 112
rrtmgp_nGptsLW = 128
rrtmgp_nBandsLW = 16
rrtmgp_nBandsSW = 14
/

&gfdl_cloud_microphysics_nml
c_cracw = 0.8
c_paut = 0.5
c_pgacs = 0.01
c_psaci = 0.05
ccn_l = 300.0
ccn_o = 100.0
const_vg = .false.
const_vi = .false.
const_vr = .false.
const_vs = .false.
de_ice = .false.
do_qa = .false.
do_sedi_heat = .false.
dw_land = 0.16
dw_ocean = 0.1
fast_sat_adj = .false.
fix_negative = .true.
icloud_f = 1
mono_prof = .true.
mp_time = 150.0
prog_ccn = .false.
qi0_crt = 8e-05
qi_lim = 1.0
ql_gen = 0.001
ql_mlt = 0.001
qs0_crt = 0.001
rad_graupel = .true.
rad_rain = .true.
rad_snow = .true.
reiflag = 2
rh_inc = 0.3
rh_inr = 0.3
rh_ins = 0.3
rthresh = 1e-05
sedi_transport = .true.
tau_g2v = 900.0
tau_i2s = 1000.0
tau_l2v = 225.0
tau_v2l = 150.0
use_ccn = .true.
use_ppm = .false.
vg_max = 12.0
vi_max = 1.0
vr_max = 12.0
vs_max = 2.0
z_slope_ice = .true.
z_slope_liq = .true.
/

&cires_ugwp_nml
knob_ugwp_azdir = 2, 4, 4, 4
knob_ugwp_doaxyz = 1
knob_ugwp_doheat = 1
knob_ugwp_dokdis = 1
knob_ugwp_effac = 1, 1, 1, 1
knob_ugwp_ndx4lh = 1
knob_ugwp_solver = 2
knob_ugwp_source = 1, 1, 0, 0
knob_ugwp_stoch = 0, 0, 0, 0
knob_ugwp_version = 0
knob_ugwp_wvspec = 1, 25, 25, 25
launch_level = 27
/
4 changes: 3 additions & 1 deletion ccpp/physics_namelists/input_GFS_v17_p8_ugwpv1.nml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,11 @@
do_ugwp_v0_orog_only = .false.
do_ugwp_v0_nst_only = .false.
do_gsl_drag_ls_bl = .true.
do_gsl_drag_ss = .true.
do_gsl_drag_ss = .false.
do_gsl_drag_tofd = .true.
do_ugwp_v1_orog_only = .false.
do_gwd_opt_psl = .true.
psl_gwd_dx_factor = 6.0
min_lakeice = 0.15
min_seaice = 1.0e-6
use_cice_alb = .true.
Expand Down
6 changes: 4 additions & 2 deletions ccpp/physics_namelists/input_GFS_v17_p8_ugwpv1_ps.nml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
pre_rad = .false.
imp_physics = 8
iovr = 3
ltaerosol = .False.
ltaerosol = .false.
lradar = .true.
ttendlim = -999
dt_inner = 150
Expand All @@ -32,9 +32,11 @@
do_ugwp_v0_orog_only = .false.
do_ugwp_v0_nst_only = .false.
do_gsl_drag_ls_bl = .true.
do_gsl_drag_ss = .true.
do_gsl_drag_ss = .false.
do_gsl_drag_tofd = .true.
do_ugwp_v1_orog_only = .false.
do_gwd_opt_psl = .true.
psl_gwd_dx_factor = 6.0
min_lakeice = 0.15
min_seaice = 1.0e-6
use_cice_alb = .true.
Expand Down
4 changes: 1 addition & 3 deletions ccpp/physics_namelists/input_HRRR_gf.nml
Original file line number Diff line number Diff line change
Expand Up @@ -91,15 +91,13 @@
lradar = .true.
lrefres = .true.
lsm = 3
lsoil = 9
lsoil = 4
lsoil_lsm = 9
ltaerosol = .true.
lwhtr = .true.
min_lakeice = 0.15
min_seaice = 0.15
mix_chem = .true.
mosaic_lu = 1
mosaic_soil = 1
nsfullradar_diag = 3600
oz_phys = .false.
oz_phys_2015 = .true.
Expand Down
4 changes: 3 additions & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,11 @@ RUN cd /comsoftware/ccpp-scm/ \
#USER comuser

# Set working directory
WORKDIR /comsoftware/ccpp-scm/scm/bin
WORKDIR /comsoftware/ccpp-scm/
ENV SCM_WORK=/comsoftware
ENV SCM_ROOT=/comsoftware/ccpp-scm/

# For interactive use, vim mouse settings are infuriating
RUN echo "set mouse=" > ~/.vimrc

ENTRYPOINT ["sh", "-c", "./contrib/get_aerosol_climo.sh && cd /comsoftware/ccpp-scm/scm/bin"]
19 changes: 15 additions & 4 deletions scm/etc/scripts/UFS_case_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@
missing_variable_snow_layers = 3
missing_variable_soil_layers = 4
missing_variable_ice_layers = 2
missing_variable_vegetation_categories = 20
missing_variable_soil_categories = 16

# Path to the directory containing processed case input files
PROCESSED_CASE_DIR = '../../data/processed_case_input'
Expand Down Expand Up @@ -1686,7 +1688,7 @@ def get_UFS_surface_data(dir, tile, i, j, old_chgres, lam):
########################################################################################
#
########################################################################################
def get_UFS_oro_data(dir, tile, i, j, lam):
def get_UFS_oro_data(dir, tile, i, j, lam, old_chgres):
"""Get the orographic data for the given tile and indices"""

if lam:
Expand Down Expand Up @@ -1721,6 +1723,9 @@ def get_UFS_oro_data(dir, tile, i, j, lam):
#lake variables (optional)
lake_frac_in = read_NetCDF_var(nc_file, "lake_frac", i, j)
lake_depth_in = read_NetCDF_var(nc_file, "lake_depth", i, j)

vegtype_frac_in = read_NetCDF_surface_var(nc_file, "vegetation_type_pct", i, j, old_chgres, missing_variable_vegetation_categories)
soiltype_frac_in = read_NetCDF_surface_var(nc_file, "soil_type_pct", i, j, old_chgres, missing_variable_soil_categories)

#
nc_file.close()
Expand All @@ -1744,7 +1749,9 @@ def get_UFS_oro_data(dir, tile, i, j, lam):
"oro_uf": orog_raw_in,
"landfrac": land_frac_in,
"lakefrac": lake_frac_in,
"lakedepth": lake_depth_in}
"lakedepth": lake_depth_in,
"vegtype_frac": vegtype_frac_in,
"soiltype_frac": soiltype_frac_in}

return oro

Expand Down Expand Up @@ -3208,6 +3215,8 @@ def write_SCM_case_file(state, surface, oro, forcing, init, case, date, forcing_
snow_dim = nc_file.createDimension('nsnow', len(surface["snicexy"]))
nslsnw_dim = nc_file.createDimension('nsoil_plus_nsnow',len(surface["snicexy"]) + len(surface["stc"]))
ice_dim = nc_file.createDimension('nice', len(surface["tiice"]))
vegcat_dim = nc_file.createDimension('nvegcat', len(oro["vegtype_frac"]))
soilcat_dim =nc_file.createDimension('nsoilcat', len(oro["soiltype_frac"]))

#
timei_var = nc_file.createVariable('t0', wp, ('t0'))
Expand Down Expand Up @@ -3388,7 +3397,9 @@ def write_SCM_case_file(state, surface, oro, forcing, init, case, date, forcing_
{"name": "oro_uf", "type":wp, "dimd": ('t0'), "units": "m", "desc": "unfiltered orography"}, \
{"name": "landfrac", "type":wp, "dimd": ('t0'), "units": "none", "desc": "fraction of horizontal grid area occupied by land"}, \
{"name": "lakefrac", "type":wp, "dimd": ('t0'), "units": "none", "desc": "fraction of horizontal grid area occupied by lake", "default_value":0}, \
{"name": "lakedepth", "type":wp, "dimd": ('t0'), "units": "none", "desc": "lake depth", "default_value":0}]
{"name": "lakedepth", "type":wp, "dimd": ('t0'), "units": "none", "desc": "lake depth", "default_value":0},
{"name": "vegtype_frac", "type":wp, "dimd": ('t0', 'nvegcat'), "units": "none", "desc": "fraction of horizontal grid area occupied by given vegetation category"},
{"name": "soiltype_frac","type":wp, "dimd": ('t0', 'nsoilcat'), "units": "none", "desc": "fraction of horizontal grid area occupied by given soil category"}]
#
var_nsst = [{"name": "tref", "type":wp, "dimd": ('t0'), "units": "K", "desc": "sea surface reference temperature for NSST"}, \
{"name": "z_c", "type":wp, "dimd": ('t0'), "units": "m", "desc": "sub-layer cooling thickness for NSST"}, \
Expand Down Expand Up @@ -3682,7 +3693,7 @@ def main():
check_IC_hist_surface_compatibility(forcing_dir, hist_i, hist_j, surface_data, lam, old_chgres, tile)

#read in orographic data for the initial conditions at the IC point
oro_data = get_UFS_oro_data(in_dir, tile, IC_i, IC_j, lam)
oro_data = get_UFS_oro_data(in_dir, tile, IC_i, IC_j, lam, old_chgres)

#read in the initial condition profiles

Expand Down
11 changes: 11 additions & 0 deletions scm/etc/tracer_config/tracers_GFS_v17_p8_ugwpv1.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
"sphum","water_vapor_specific_humidity","kg kg-1"
"liq_wat","cloud_condensed_water_mixing_ratio","kg kg-1"
"ice_wat","ice_water_mixing_ratio","kg kg-1"
"rainwat","rain_water_mixing_ratio","kg kg-1"
"snowwat","snow_water_mixing_ratio","kg kg-1"
"graupel","graupel_mixing_ratio","kg kg-1"
"ice_nc","ice_number_concentration","kg-1"
"rain_nc","rain_number_concentration","kg-1"
"o3mr","ozone_mixing_ratio","kg kg-1"
"sgs_tke","turbulent_kinetic_energy","m2 s-2"
"sigmab"," prognostic_updraft_area_fraction_in_convection","frac"
Loading
Loading