Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
e6618d2
Improve FatesColdAllVars testmod, etc.
samsrabin Jul 17, 2024
8e7a1d8
Point fates external at my refactor-history branch, commit ff87ce15.
samsrabin Jul 17, 2024
810bf34
Improve Derecho develop queue performance.
samsrabin Sep 7, 2024
34206b6
Update fates external to commit b00da773.
samsrabin Sep 10, 2024
ddca108
Update FATES external to d4768cbe.
samsrabin Sep 11, 2024
2aad47e
Update FATES external to cfecb22.
samsrabin Sep 16, 2024
b7809ad
Update FATES external to 4571c37c7.
samsrabin Sep 16, 2024
3eaaccc
TESTING ONLY: Update FATES external to cc911f0a5.
samsrabin Sep 17, 2024
d6db406
Update FATES external to 612d1a5c79.
samsrabin Oct 1, 2024
cc43b21
Update FATES external to 46bcd0c9.
samsrabin Oct 2, 2024
350c584
Update FATES external to 22b1ce9d.
samsrabin Oct 2, 2024
b6b50eb
Update FATES external to c8b04d41.
samsrabin Oct 3, 2024
a695f62
Update FATES external to 7134803f.
samsrabin Oct 3, 2024
1a4f331
Update FATES submodule to c17a4e10.
samsrabin Oct 8, 2024
bf9386b
Update FATES submodule to fa87c89c.
samsrabin Oct 8, 2024
e036037
Update FATES submodule to cdd58546.
samsrabin Oct 16, 2024
c2bc158
Add new FATES outputs to FatesColdAllVars.
samsrabin Oct 16, 2024
cf89633
Set default FATES param file to Derecho copy of this commit's.
samsrabin Oct 16, 2024
0ad1c73
Update FATES external to 60191cf4e.
samsrabin Oct 17, 2024
2555078
Update FATES submodule to aa3b3b931.
samsrabin Oct 17, 2024
f6c7318
Update FATES submodule to b1858ab6d.
samsrabin Oct 18, 2024
61d2536
Update FATES submodule to 15112f8a6.
samsrabin Oct 20, 2024
b2aa93e
Update FATES submodule to 870d9289d.
samsrabin Oct 21, 2024
e40f20b
Update FATES submodule to a8f9da075.
samsrabin Oct 21, 2024
d71954b
Add script to bring in Jackie's parameter changes.
samsrabin Oct 23, 2024
438e167
Update FATES submodule to 7cd56315.
samsrabin Nov 6, 2024
3e244ac
Merge tag 'ctsm5.3.059' into fates-edge-area-202410
samsrabin Jun 23, 2025
6ea82c1
Update FATES submodule to 87f618b6.
samsrabin Jun 23, 2025
9e113a2
Update default FATES param file.
samsrabin Jun 23, 2025
a45152c
Add new testdef FatesEdgeForest.
samsrabin Jun 30, 2025
742b89a
Update FATES: Factor out new subroutine assign_patch_to_bins().
samsrabin Jun 30, 2025
33ae21a
Update FATES: Add test_gffeb_gaussian_numerator().
samsrabin Jul 1, 2025
5d96407
Update FATES: Add gffeb_norm() and tests.
samsrabin Jul 1, 2025
5798af8
FATES: Add checks of edge forest parameters.
samsrabin Jul 7, 2025
9e5ed34
Add fates_edgeforest test suite.
samsrabin Jul 8, 2025
ae7c1fe
FATES: Add hlm_use_edge_forest flag.
samsrabin Jul 8, 2025
9764199
Add izumi_nag test of edge forest.
samsrabin Jul 10, 2025
c72043a
FATES: Explicitly import shr_infnan_isnan.
samsrabin Jul 10, 2025
83338e1
FATES: Compare hlm_use_edge_forest to itrue.
samsrabin Jul 10, 2025
9b5f150
Merge tag 'ctsm5.3.063' into fates-edge-area-202410
samsrabin Jul 11, 2025
87aed7a
izumi_nag fates_edgeforest test now debug.
samsrabin Jul 14, 2025
d491e76
Put my FATES parameter file on SVN server.
samsrabin Jul 14, 2025
feeba45
Clean up fates_edgeforest test suite.
samsrabin Jul 14, 2025
0c75fee
FATES: Merge branch 'fix_testing_ssr' into edge-area-202410
samsrabin Jul 14, 2025
17f1dfd
FATES: Make logical_to_real() public.
samsrabin Jul 14, 2025
2c27390
FATES: Change longname of fates_levedge.
samsrabin Jul 16, 2025
97dac7b
FATES: Clean up FATES edge forest work.
samsrabin Jul 16, 2025
0135350
Merge tag 'ctsm5.3.071' into fates-edge-area-202410
samsrabin Aug 25, 2025
dbf17aa
FATES: Don't set nlevedgeforest=1 if hlm_use_edge_forest false.
samsrabin Sep 9, 2025
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
4 changes: 2 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
#
[submodule "fates"]
path = src/fates
url = https://github.com/NGEET/fates
fxtag = sci.1.87.0_api.41.0.0
url = https://github.com/samsrabin/fates
fxtag = 4d3b7d4fa09141c030fa28ab9687d916aaff6f0c # edge-area-202410-ts20250909-2: Don't set nlevedgeforest=1 if hlm_use_edge_forest false.
fxrequired = AlwaysRequired
# Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed
fxDONOTUSEurl = https://github.com/NGEET/fates
Expand Down
4 changes: 2 additions & 2 deletions bld/CLMBuildNamelist.pm
Original file line number Diff line number Diff line change
Expand Up @@ -807,7 +807,7 @@ sub setup_cmdl_fates_mode {
my @list = ( "fates_spitfire_mode", "use_fates_planthydro", "use_fates_ed_st3", "use_fates_ed_prescribed_phys",
"use_fates_cohort_age_tracking","use_fates_inventory_init","use_fates_fixed_biogeog",
"use_fates_nocomp","use_fates_sp","fates_inventory_ctrl_filename","fates_harvest_mode",
"fates_parteh_mode","use_fates_tree_damage","fates_seeddisp_cadence","use_fates_luh","fluh_timeseries",
"fates_parteh_mode","use_fates_tree_damage","use_fates_edge_forest","fates_seeddisp_cadence","use_fates_luh","fluh_timeseries",
"flandusepftdat","use_fates_potentialveg","use_fates_lupft","fates_history_dimlevel",
"use_fates_daylength_factor", "fates_photosynth_acclimation", "fates_stomatal_model",
"fates_stomatal_assimilation", "fates_leafresp_model", "fates_cstarvation_model",
Expand Down Expand Up @@ -4764,7 +4764,7 @@ sub setup_logic_fates {
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'fates_paramfile', 'phys'=>$nl_flags->{'phys'});
my @list = ( "use_fates_planthydro", "use_fates_ed_st3", "use_fates_ed_prescribed_phys",
"use_fates_inventory_init","fates_seeddisp_cadence","fates_history_dimlevel",
"fates_harvest_mode","fates_parteh_mode", "use_fates_cohort_age_tracking","use_fates_tree_damage",
"fates_harvest_mode","fates_parteh_mode", "use_fates_cohort_age_tracking","use_fates_tree_damage","use_fates_edge_forest",
"use_fates_daylength_factor", "fates_photosynth_acclimation", "fates_stomatal_model",
"fates_stomatal_assimilation", "fates_leafresp_model", "fates_cstarvation_model",
"fates_regeneration_model", "fates_hydro_solver", "fates_radiation_model", "fates_electron_transport_model",
Expand Down
3 changes: 2 additions & 1 deletion bld/namelist_files/namelist_defaults_ctsm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case).
<!-- FATES default parameter file -->
<!-- ================================================================== -->

<fates_paramfile>lnd/clm2/paramdata/fates_params_api.41.0.0_14pft_c250813.nc</fates_paramfile>
<fates_paramfile>lnd/clm2/paramdata/fates_params_default.a5f5a3b4d.nc</fates_paramfile>


<!-- ================================================================== -->
Expand Down Expand Up @@ -2448,6 +2448,7 @@ lnd/clm2/surfdata_esmf/NEON/ctsm5.3.0/surfdata_1x1_NEON_TOOL_hist_2000_78pfts_c2
<use_fates_managed_fire use_fates=".true.">.false.</use_fates_managed_fire>
<use_fates_planthydro use_fates=".true.">.false.</use_fates_planthydro>
<use_fates_tree_damage use_fates=".true.">.false.</use_fates_tree_damage>
<use_fates_edge_forest use_fates=".true.">.false.</use_fates_edge_forest>
<use_fates_cohort_age_tracking use_fates=".true.">.false.</use_fates_cohort_age_tracking>
<use_fates_daylength_factor use_fates=".true.">.true.</use_fates_daylength_factor>
<use_fates_ed_st3 use_fates=".true.">.false.</use_fates_ed_st3>
Expand Down
6 changes: 6 additions & 0 deletions bld/namelist_files/namelist_definition_ctsm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -736,6 +736,12 @@ Toggle to turn on the tree damage module in FATES
(Only relevant if FATES is on)
</entry>

<entry id="use_fates_edge_forest" type="logical" category="physics"
group="clm_inparm" valid_values="" value=".false.">
Toggle to turn on the edge forest module in FATES
(Only relevant if FATES is on)
</entry>

<entry id="fates_spitfire_mode" type="integer" category="physics"
group="clm_inparm" valid_values="0,1,2,3,4,5" value=".false.">
Turn on spitfire module to simulate fire by setting fates_spitfire_mode > 0.
Expand Down
33 changes: 33 additions & 0 deletions cime_config/testdefs/testlist_clm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
rxcropmaturity: Short tests to be run during development related to prescribed crop calendars
matrixcn: Tests exercising the matrix-CN capability
aux_clm_mpi_serial: aux_clm tests using mpi-serial. Useful for redoing tests that failed due to https://github.com/ESCOMP/CTSM/issues/2916, after having replaced libraries/mpi-serial with a fresh copy.
fates_edgeforest: Tests exercising (or not) the FATES edge forest module
subset_data: Tests exercising the subset_data tool and running CTSM with its output
decomp_init: Initialization tests specifically for examining the PE layout decomposition initialization
uhr_decomp_init: Initialization tests at Ultra High Resolution - specifically for examining the PE layout decomposition initialization
Expand Down Expand Up @@ -2935,6 +2936,38 @@
</options>
</test>

<test name="SMS_Lm49" grid="f10_f10_mg37" compset="I2000Clm60Fates" testmods="clm/FatesColdAllVarsMonthly">
<machines>
<machine name="derecho" compiler="intel" category="fates"/>
</machines>
<options>
<option name="wallclock">03:00:00</option>
<option name="comment" >This is a long fates test with a lot of variables being written.</option>
</options>
</test>

<test name="SMS_D_Ld5" grid="f10_f10_mg37" compset="I2000Clm60Fates" testmods="clm/FatesColdEdgeForest">
<machines>
<machine name="derecho" compiler="intel" category="fates"/>
<machine name="derecho" compiler="intel" category="fates_edgeforest"/>
<machine name="izumi" compiler="nag" category="fates"/>
<machine name="izumi" compiler="nag" category="fates_edgeforest"/>
</machines>
<options>
<option name="wallclock">00:20:00</option>
</options>
</test>

<test name="SMS_Lm49" grid="f10_f10_mg37" compset="I2000Clm60Fates" testmods="clm/FatesColdEdgeForestMonthly">
<machines>
<machine name="derecho" compiler="intel" category="fates"/>
<machine name="derecho" compiler="intel" category="fates_edgeforest"/>
</machines>
<options>
<option name="wallclock">03:00:00</option>
</options>
</test>

<test name="SMS_Ld10_D_Mmpi-serial" grid="CLM_USRDAT" compset="I1PtClm60Fates" testmods="clm/FatesFireLightningPopDens--clm/NEON/FATES/NIWO">
<machines>
<machine name="derecho" compiler="intel" category="aux_clm"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,10 @@ hist_fincl1 = 'FATES_TLONGTERM',
'FATES_LBLAYER_COND_AP','FATES_STOMATAL_COND_AP','FATES_TLONGTERM','FATES_PRIMARY_AREA_AP','FATES_NPP_LU','FATES_GPP_LU',
'FATES_SEED_BANK_PF','FATES_UNGERM_SEED_BANK_PF','FATES_SEEDLING_POOL_PF','FATES_SEEDS_IN_PF','FATES_SEEDS_IN_LOCAL_PF',
'FATES_SAPWOOD_AREA_SZPF','FATES_CANOPYAREA','FATES_NCL','FATES_PATCHAREA','FATES_PRIMARY_AREA','FATES_SCORCH_HEIGHT_PF',
'FATES_SECONDARY_AREA_ANTHRO','FATES_SECONDARY_AREA','FATES_ZSTAR'
'FATES_SECONDARY_AREA_ANTHRO','FATES_SECONDARY_AREA','FATES_ZSTAR','FATES_LAI_AP','FATES_FUEL_AMOUNT_AP','FATES_ZSTAR_AP',
'FATES_BURNFRAC_AP','FATES_CANOPYAREA_AP','FATES_SCORCH_HEIGHT_APPF',
'FATES_AREA_PLANTS_AP', 'FATES_AREA_TREES_AP', 'FATES_IS_FOREST', 'FATES_IS_FOREST_AP',
'FATES_IS_FOREST_PCT10', 'FATES_IS_FOREST_PCT10_0GRASS', 'FATES_IS_FOREST_PCT25',
'FATES_IS_FOREST_PCT25_0GRASS', 'FATES_IS_FOREST_PCT50', 'FATES_IS_FOREST_PCT50_0GRASS',
'FATES_IS_FOREST_PCT75', 'FATES_IS_FOREST_PCT75_0GRASS', 'FATES_IS_FOREST_PCT90',
'FATES_IS_FOREST_PCT90_0GRASS', 'FATES_FOREST_AREA_EB'
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
../FatesColdAllVars
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
./xmlchange CLM_BLDNML_OPTS="-no-megan" --append
./xmlchange BFBFLAG="TRUE"
./xmlchange CLM_FORCE_COLDSTART="on"
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

hist_mfilt = 12
hist_nhtfrq = 0
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
./xmlchange CLM_BLDNML_OPTS="-no-megan" --append
./xmlchange BFBFLAG="TRUE"
./xmlchange CLM_FORCE_COLDSTART="on"
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@

fates_spitfire_mode = 5
use_fates_edge_forest = .true.

hist_empty_htapes = .true.
hist_mfilt = 1
hist_nhtfrq = -24
fates_spitfire_mode = 1
fates_history_dimlevel = 2,2
use_fates_tree_damage = .true.
hist_ndens = 1

hist_fincl1 += 'FATES_CANOPYAREA_AP','FATES_PATCHAREA_LU'
hist_fincl1 += 'FATES_CROWNAREA_PF','FATES_CANOPYCROWNAREA_PF'
hist_fincl1 += 'FATES_VEGC_ABOVEGROUND'
hist_fincl1 += 'FATES_VEGC','FATES_VEGC_AP','FATES_VEGC_APPF','FATES_VEGC_PF'
hist_fincl1 += 'FATES_AREA_PLANTS_AP','FATES_AREA_TREES_AP'
hist_fincl1 += 'FATES_LAI', 'FATES_LAI_CANOPY_SZPF','FATES_LAI_USTORY_SZPF'
hist_fincl1 += 'FATES_BURNFRAC','FATES_FIRE_INTENSITY','FATES_FIRE_INTENSITY_BURNFRAC'
hist_fincl1 += 'FATES_FUEL_MOISTURE_FC','FATES_FUEL_AMOUNT_FC'
hist_fincl1 += 'FATES_IGNITIONS','FATES_ROS'
hist_fincl1 += 'FATES_CROWNAREA_PF'
hist_fincl1 += 'FATES_IS_FOREST_PCT10'
hist_fincl1 += 'FATES_IS_FOREST_PCT25'
hist_fincl1 += 'FATES_IS_FOREST_PCT50'
hist_fincl1 += 'FATES_IS_FOREST_PCT75'
hist_fincl1 += 'FATES_IS_FOREST_PCT90'
hist_fincl1 += 'FATES_IS_FOREST_PCT10_0GRASS'
hist_fincl1 += 'FATES_IS_FOREST_PCT25_0GRASS'
hist_fincl1 += 'FATES_IS_FOREST_PCT50_0GRASS'
hist_fincl1 += 'FATES_IS_FOREST_PCT75_0GRASS'
hist_fincl1 += 'FATES_IS_FOREST_PCT90_0GRASS'
hist_fincl1 += 'FATES_FOREST_AREA_EB'
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
../FatesColdEdgeForest
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
./xmlchange CLM_BLDNML_OPTS="-no-megan" --append
./xmlchange BFBFLAG="TRUE"
./xmlchange CLM_FORCE_COLDSTART="on"
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

hist_mfilt = 12
hist_nhtfrq = 0
163 changes: 163 additions & 0 deletions combine_jackie_my_params.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
"""
Replace values in default parameter set with values from Jackie's South America work
"""
import os
import numpy as np
import xarray as xr

PARAM_FILES_DIR = "/glade/u/home/samrabin/ctsm_fates-isforest/src/fates/parameter_files"
file_in = os.path.join(PARAM_FILES_DIR, "fates_params_shuman24.a8f9da07.nc")
file_out = os.path.join(PARAM_FILES_DIR, "fates_params_shuman24.a8f9da07.withchanges.nc")

ds_in = xr.open_dataset(file_in)
ds_out = ds_in.copy()

def replace_values(ds, var, vals_in, indices=None):
"""
Replace values in DataArray
"""
da_in = ds[var]
print(var + ": " + da_in.attrs["long_name"])
ndims = len(da_in.dims)
if indices is None:
vals_in = np.array(vals_in)
if vals_in.size != da_in.size:
raise RuntimeError(f"vals_in.size {vals_in.size} but da_in.size {da_in.size}")
vals_new = vals_in
else:
vals_new = da_in.copy().values

# Handle shortcut to replace all values
if indices == "all":
if isinstance(vals_in, (list, np.ndarray)):
raise RuntimeError("For indices 'all', you must provide a single scalar vals_in")
indices = np.arange(da_in.size)
vals_in = np.full(shape=indices.shape, fill_value=vals_in)

# Check input lists
if not isinstance(vals_in, (list, np.ndarray)):
vals_in = [vals_in]
if not isinstance(indices, (list, np.ndarray)):
indices = [indices]
if max(indices) + 1 > da_in.size:
raise RuntimeError(f"max(indices) {max(indices)} but da_in.size {da_in.size}")
if len(vals_in) != len(indices):
raise RuntimeError(f"len(vals_in) {len(vals_in)} but len(indices) {len(indices)}")

# Convert to 1-d, if needed
did_reshape = ndims > 1
if did_reshape:
orig_dims = vals_new.shape
vals_new = vals_new.ravel()

# Assign new values
for i, val in enumerate(vals_in):
vals_new[indices[i]] = val

# Convert back from 1-d, if needed
if did_reshape:
vals_new = vals_new.reshape(orig_dims)

# Print results
vals_new_raveled = vals_new.ravel()
this_str = ""
any_diff = False
for i, val_orig in enumerate(da_in.values.ravel()):
val_new = vals_new_raveled[i]
if val_orig != val_new:
this_str += f"{val_orig} → {val_new}"
any_diff = True
elif indices is None or i in indices:
this_str += "✔️"
else:
this_str += "_"
this_str += ", "
this_str = this_str[:-2]
if not any_diff:
this_str += " (Jackie's change[s] already incorporated into default param file)"
else:
print(da_in.values)
print(vals_new)
print(this_str)

# Save to Dataset
new_da = xr.DataArray(
data=vals_new,
attrs=da_in.attrs,
dims=da_in.dims,
coords=da_in.coords,
)
ds[var] = new_da
print(" ")
return ds

ds_out = replace_values(ds_out, "fates_fire_FBD", 0.95, 5)
ds_out = replace_values(ds_out, "fates_alloc_storage_cushion", 2.25, 2)
ds_out = replace_values(ds_out, "fates_allom_d2h1", [57.6, 57.6, 1])
ds_out = replace_values(ds_out, "fates_allom_d2h2", [0.74, 0.74, 1])
ds_out = replace_values(ds_out, "fates_allom_la_per_sa_int", 1000, 2)
ds_out = replace_values(ds_out, "fates_allom_sai_scaler", 0.0012, 2)
ds_out = replace_values(ds_out, "fates_fire_alpha_SH", [0.1487, 0.06, 1])
ds_out = replace_values(ds_out, "fates_fire_bark_scaler", [0.0301, 0.1085], [0, 1])
ds_out = replace_values(ds_out, "fates_fire_crown_kill", [1, 0.05, 1])
ds_out = replace_values(ds_out, "fates_grperc", [0.3, 0.3], [0, 1])
ds_out = replace_values(ds_out, "fates_leaf_vcmax25top", [41, 40], [0, 2])
ds_out = replace_values(ds_out, "fates_mort_hf_sm_threshold", [0.025, 0.025], [0, 1])
ds_out = replace_values(ds_out, "fates_wood_density", [0.6305, 0.695, 0.01])
ds_out = replace_values(ds_out, "fates_turnover_branch", [75, 75, 0.3208])
ds_out = replace_values(ds_out, "fates_allom_h2cd1", [0.33, 0.1], [0, 1])
ds_out = replace_values(ds_out, "fates_turnover_leaf", [[1.4025, 1.4025, 0.3208]])
ds_out = replace_values(ds_out, "fates_recruit_height_min", 0.5, 2)
ds_out = replace_values(ds_out, "fates_recruit_init_density", 20, 2)
ds_out = replace_values(ds_out, "fates_stoich_nitr", [0.02675, 0.02675, 0.16], [0, 1, 2])
ds_out = replace_values(ds_out, "fates_allom_d2bl1", [0.12668, 0.12668, 0.000964])
ds_out = replace_values(ds_out, "fates_allom_d2bl2", [1.2813, 1.2813, 1.9492])
ds_out = replace_values(ds_out, "fates_allom_d2ca_coefficient_max", [0.76865, 0.76865, 0.03])
ds_out = replace_values(ds_out, "fates_allom_d2ca_coefficient_min", [0.76865, 0.76865, 0.03])
ds_out = replace_values(ds_out, "fates_allom_l2fr", [0.4863, 0.4863], [0, 1])
ds_out = replace_values(ds_out, "fates_leaf_slamax", [0.03992, 0.03992, 0.0135])
ds_out = replace_values(ds_out, "fates_leaf_slatop", [0.01996, 0.01996, 0.0135])
ds_out = replace_values(ds_out, "fates_mort_scalar_cstarvation", [0.02956, 0.02956, 0.2])
ds_out = replace_values(ds_out, "fates_recruit_seed_alloc", [0.046801, 0.046801], [0, 1])
ds_out = replace_values(ds_out, "fates_fire_cg_strikes", 0.1)
ds_out = replace_values(ds_out, "fates_fire_threshold", 25.0)
ds_out = replace_values(ds_out, "fates_comp_excln", -1.0)
ds_out = replace_values(ds_out, "fates_mort_disturb_frac", 0.5)
ds_out = replace_values(ds_out, "fates_mort_understorey_death", 1.0)
ds_out = replace_values(ds_out, "fates_allom_agb1", [0.0673, 0.0673, 0.000964])
ds_out = replace_values(ds_out, "fates_allom_agb2", [0.976, 0.976, 1.9462])
ds_out = replace_values(ds_out, "fates_allom_amode", [3, 3], [0, 1])
ds_out = replace_values(ds_out, "fates_allom_agb3", [np.nan, np.nan, 0])
ds_out = replace_values(ds_out, "fates_allom_agb4", [np.nan, np.nan, 0])
ds_out = replace_values(ds_out, "fates_allom_fmode", 2.0, "all")
ds_out = replace_values(ds_out, "fates_allom_agb_frac", 1, 2)
ds_out = replace_values(ds_out, "fates_allom_dbh_maxheight", [200.0, 200.0, 1.0])
ds_out = replace_values(ds_out, "fates_allom_hmode", [5.0, 5.0, 3.0])
ds_out = replace_values(ds_out, "fates_allom_lmode", [3.0, 3.0, 1.0])
ds_out = replace_values(ds_out, "fates_allom_fnrt_prof_a", [7, 7], [1, 2])
ds_out = replace_values(ds_out, "fates_allom_fnrt_prof_b", [1, 1], [1, 2])
ds_out = replace_values(ds_out, "fates_rad_leaf_clumping_index", 0.85, 2)
ds_out = replace_values(ds_out, "fates_phen_evergreen", [1, 1], [1, 2])
ds_out = replace_values(ds_out, "fates_phen_stress_decid", [0, 0], [1, 2])
ds_out = replace_values(ds_out, "fates_leaf_stomatal_intercept", 10000, 2)
ds_out = replace_values(ds_out, "fates_leaf_stomatal_slope_ballberry", 4, 2)
ds_out = replace_values(ds_out, "fates_leaf_stomatal_slope_medlyn", [4.1, 4.1, 4.1])
ds_out = replace_values(ds_out, "fates_mort_bmort", [0.01303514, 0.01303514, 0.01303514])
ds_out = replace_values(ds_out, "fates_stoich_phos", [0.0033, 24], [1, 5])
ds_out = replace_values(ds_out, "fates_allom_d2h3", [21.6, 21.6], [0, 1])
ds_out = replace_values(ds_out, "fates_allom_d2bl3", [np.nan, np.nan, 0])
ds_out = replace_values(ds_out, "fates_cnp_turnover_nitr_retrans", np.nan, "all")
ds_out = replace_values(ds_out, "fates_cnp_turnover_phos_retrans", np.nan, "all")
ds_out = replace_values(ds_out, "fates_rad_leaf_xl", 0.1, 1)
ds_out = replace_values(ds_out, "fates_rad_leaf_rhonir", [0.46, 0.46, 0.28])
ds_out = replace_values(ds_out, "fates_rad_leaf_rhovis", [0.11, 0.11, 0.05])
ds_out = replace_values(ds_out, "fates_rad_stem_rhonir", [0.49, 0.49, 0.39])
ds_out = replace_values(ds_out, "fates_rad_stem_rhovis", [0.21, 0.21, 0.16])
ds_out = replace_values(ds_out, "fates_rad_leaf_taunir", [0.33, 0.33, 0.4])
ds_out = replace_values(ds_out, "fates_rad_leaf_tauvis", [0.06, 0.06], [0, 1])
ds_out = replace_values(ds_out, "fates_rad_stem_taunir", 0.001, 2)
ds_out = replace_values(ds_out, "fates_rad_stem_tauvis", 0.001, 2)
ds_out = replace_values(ds_out, "fates_recruit_seed_dbh_repro_threshold", [150, 0.5], [1, 2])
ds_out = replace_values(ds_out, "fates_phen_flush_fraction", np.nan, "all")

ds_out.to_netcdf(file_out)
2 changes: 1 addition & 1 deletion src/fates
Submodule fates updated 39 files
+10 −0 biogeochem/EDCanopyStructureMod.F90
+14 −0 biogeochem/FatesPatchMod.F90
+1 −1 fire/SFMainMod.F90
+8 −1 main/CMakeLists.txt
+1 −0 main/EDInitMod.F90
+11 −1 main/EDParamsMod.F90
+0 −34 main/EDTypesMod.F90
+81 −0 main/FatesEcotypesMod.F90
+653 −0 main/FatesEdgeForestMod.F90
+224 −0 main/FatesEdgeForestParamsMod.F90
+211 −30 main/FatesHistoryInterfaceMod.F90
+7 −0 main/FatesHistoryVariableType.F90
+6 −0 main/FatesIODimensionsMod.F90
+1 −0 main/FatesIOVariableKindMod.F90
+36 −7 main/FatesInterfaceMod.F90
+5 −0 main/FatesInterfaceTypesMod.F90
+1 −0 main/FatesParametersInterface.F90
+22 −0 main/FatesUtilsMod.F90
+1 −0 main/test/CMakeLists.txt
+56 −0 parameter_files/fates_params_default.cdl
+3 −0 testing/CMakeLists.txt
+24 −0 testing/functional_testing/edge_forest/CMakeLists.txt
+253 −0 testing/functional_testing/edge_forest/FatesTestEdgeForest.F90
+173 −0 testing/functional_testing/edge_forest/edge_forest_test.py
+1 −1 testing/functional_testing/fire/mortality/fire_mortality_test.py
+7 −0 testing/functional_tests.cfg
+1 −0 testing/load_functional_tests.py
+2 −59 testing/run_functional_tests.py
+38 −3 testing/run_unit_tests.py
+4 −0 testing/testing_shr/FatesFactoryMod.F90
+3 −0 testing/testing_shr/FatesUnitTestParamReaderMod.F90
+96 −38 testing/testing_shr/SyntheticPatchTypes.F90
+5 −0 testing/unit_testing/ecotypes_test/CMakeLists.txt
+172 −0 testing/unit_testing/ecotypes_test/test_Ecotypes.pf
+5 −0 testing/unit_testing/edge_forest_test/CMakeLists.txt
+637 −0 testing/unit_testing/edge_forest_test/test_EdgeForest.pf
+16 −1 testing/unit_tests.cfg
+73 −0 testing/utils.py
+9 −0 testing/utils_plotting.py
1 change: 1 addition & 0 deletions src/main/clm_varctl.F90
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,7 @@ module clm_varctl
! see bld/namelist_files/namelist_definition_clm4_5.xml for details
logical, public :: use_fates_managed_fire = .false. ! true => turn on managed fire
logical, public :: use_fates_tree_damage = .false. ! true => turn on tree damage module
logical, public :: use_fates_edge_forest = .false. ! true => turn on edge forest module
character(len=256), public :: fates_harvest_mode = '' ! five different harvest modes; see namelist definition
character(len=256), public :: fates_stomatal_model = '' ! stomatal conductance model, Ball-berry or Medlyn
character(len=256), public :: fates_stomatal_assimilation = '' ! net or gross assimilation modes
Expand Down
Loading
Loading