Skip to content

Commit 4adcb64

Browse files
Pass in flag to tell program to output dominate category
or fractional categories. Fixes ufs-community#709.
1 parent 3e147b5 commit 4adcb64

File tree

4 files changed

+12
-2
lines changed

4 files changed

+12
-2
lines changed

driver_scripts/driver_grid.hera.sh

+4-1
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,13 @@ module list
7171
# Set grid specs here.
7272
#-----------------------------------------------------------------------
7373

74-
export gtype=uniform # 'uniform', 'stretch', 'nest',
74+
export gtype=regional_esg # 'uniform', 'stretch', 'nest',
7575
# 'regional_gfdl', 'regional_esg'
7676
export make_gsl_orog=false # 'true' if user needs 'oro' files for GSL
7777
# orographic drag suite
78+
export vegsoilt_frac='.true.' # When .false., output dominate soil and
79+
# vegetation type category. When .true.,
80+
# output fraction of each category.
7881
export veg_type_src="modis.igbp.0.05" # veg type data.
7982
# For viirs-based vegetation type data, set to:
8083
# 1) "viirs.igbp.0.05" for global 5km data

sorc/sfc_climo_gen.fd/driver.F90

+4
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,10 @@ program driver
8181

8282
call define_source_grid(localpet, npets, input_vegetation_type_file)
8383
if (fract_vegsoil_type) then
84+
print*,'- WILL OUTPUT VEGETATION TYPE FRACTION.'
8485
call interp2(localpet, input_vegetation_type_file)
8586
else
87+
print*,'- WILL OUTPUT DOMINATE VEGETATION TYPE.'
8688
method=ESMF_REGRIDMETHOD_NEAREST_STOD
8789
call interp(localpet, method, input_vegetation_type_file)
8890
endif
@@ -141,8 +143,10 @@ program driver
141143
if (trim(input_soil_type_file) /= "NULL") then
142144
call define_source_grid(localpet, npets, input_soil_type_file)
143145
if (fract_vegsoil_type) then
146+
print*,'- WILL OUTPUT SOIL TYPE FRACTION.'
144147
call interp2(localpet, input_soil_type_file)
145148
else
149+
print*,'- WILL OUTPUT DOMINATE SOIL TYPE.'
146150
method=ESMF_REGRIDMETHOD_NEAREST_STOD
147151
call interp(localpet, method, input_soil_type_file)
148152
endif

sorc/sfc_climo_gen.fd/program_setup.f90

+2-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ subroutine read_setup_namelist(localpet)
7171
input_vegetation_greenness_file, mosaic_file_mdl, &
7272
orog_dir_mdl, orog_files_mdl, halo, &
7373
vegetation_greenness_method, leaf_area_index_method, &
74-
maximum_snow_albedo_method, snowfree_albedo_method
74+
maximum_snow_albedo_method, snowfree_albedo_method, &
75+
fract_vegsoil_type
7576

7677
print*,"- READ SETUP NAMELIST, LOCALPET: ", localpet
7778

ush/sfc_climo_gen.sh

+2
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ mosaic_file=${mosaic_file:-$FIX_FV3/C${res}_mosaic.nc}
3939
HALO=${HALO:-0}
4040
veg_type_src=${veg_type_src:-"modis.igbp.0.05"}
4141
VEG_TYPE_FILE=${VEG_TYPE_FILE:-${input_sfc_climo_dir}/vegetation_type.${veg_type_src}.nc}
42+
vegsoilt_frac=${vegsoilt_frac:-.false.}
4243

4344
if [ ! -d $SAVE_DIR ]; then
4445
mkdir -p $SAVE_DIR
@@ -75,6 +76,7 @@ halo=$HALO
7576
maximum_snow_albedo_method="bilinear"
7677
snowfree_albedo_method="bilinear"
7778
vegetation_greenness_method="bilinear"
79+
fract_vegsoil_type=${vegsoilt_frac}
7880
/
7981
EOF
8082

0 commit comments

Comments
 (0)