-
Notifications
You must be signed in to change notification settings - Fork 374
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
fates api 33 compatibility, two-stream radiation #6279
Merged
peterdschwartz
merged 14 commits into
E3SM-Project:master
from
rgknox:lnd/fates-twostream
Apr 25, 2024
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
cbb0890
Add fates land use module
glemieux 1bffbfe
add logic to avoid rho and tau calculation when fates is on
glemieux b559bd3
add fates landuse data default and update fates default paramfile
glemieux 088b63f
remove depricated fates history variables from fates testmods
glemieux f09f5e3
add code comment describing variable short names
glemieux ea3ec34
adding fates radiation subfolder
rgknox 54ca44f
Changing fates radiation calls to be method agnostic
rgknox 9b1d3ba
setting fates submodule pointer to sci.1.72.0_api.33.0.0
rgknox a49e2ca
add two stream testmod to fates test list
glemieux 65df1fe
correct fates two stream testmod
glemieux 468157c
remove history variables from fates allvar test module
glemieux 5e48373
fix fates path definition in two stream testmod
glemieux 801afee
Update elmfates_interfaceMod.F90
rgknox 03371d6
add land grid check to fates_cold test mod
glemieux File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
components/elm/cime_config/testdefs/testmods_dirs/elm/fates_cold/shell_commands
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,8 @@ | ||
./xmlchange TEST_MEMLEAK_TOLERANCE=0.75 | ||
./xmlchange NTHRDS=1 | ||
|
||
# Change PIO settings as temporary fix for #6316 | ||
if [ `./xmlquery --value LND_GRID` == 1.9x2.5 ]; then | ||
./xmlchange PIO_NUMTASKS=4 | ||
./xmlchange PIO_STRIDE=-999 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
components/elm/cime_config/testdefs/testmods_dirs/elm/fates_cold_landuse/include_user_mods
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../fates_cold |
2 changes: 2 additions & 0 deletions
2
components/elm/cime_config/testdefs/testmods_dirs/elm/fates_cold_landuse/user_nl_elm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
flanduse_timeseries = '$DIN_LOC_ROOT/lnd/clm2/surfdata_map/landuse.timeseries_4x5_hist_simyr1850-2015_200311.nc' | ||
do_harvest = .true. |
1 change: 1 addition & 0 deletions
1
components/elm/cime_config/testdefs/testmods_dirs/elm/fates_cold_luh2/include_user_mods
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../fates_cold |
1 change: 1 addition & 0 deletions
1
components/elm/cime_config/testdefs/testmods_dirs/elm/fates_cold_luh2/shell_commands
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
./xmlchange TEST_MEMLEAK_TOLERANCE=0.2 |
1 change: 1 addition & 0 deletions
1
components/elm/cime_config/testdefs/testmods_dirs/elm/fates_cold_luh2/user_nl_elm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
use_fates_luh = .true. |
19 changes: 19 additions & 0 deletions
19
components/elm/cime_config/testdefs/testmods_dirs/elm/fates_cold_twostream/README
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
Testing FATES two-stream radiation scheme is activated by switching the fates_rad_model | ||
parameter from 1 to 2. This is all that is needed, both radiation schemes | ||
1) Norman and 2) two-stream use the same optical parameters. | ||
|
||
fates_rad_model | ||
|
||
Note that to avoid exceeding the filename string length maximum, the parameter | ||
file generated on the fly is placed in the $SRCROOT/src/fates/parameter_files | ||
directory. This may still run into problems is the $SRCROOT string is too long. | ||
|
||
Like the test with seed dispersal activation, the main downside of this method is | ||
that this file will require a custom update for every fates parameter file API update. | ||
Allowing the HLM to generate the file at runtime via buildnamelist step | ||
will provide the capability to build the fates parameter file on | ||
the fly which with the appropriate values for this test. | ||
|
||
Note that the test as currently designed is not machine agnostic as it requires | ||
specific shell commands for enabling the workflow to have access to ncgen. Currently | ||
this test is only usable on perlmutter. |
1 change: 1 addition & 0 deletions
1
components/elm/cime_config/testdefs/testmods_dirs/elm/fates_cold_twostream/include_user_mods
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../fates_cold |
15 changes: 15 additions & 0 deletions
15
components/elm/cime_config/testdefs/testmods_dirs/elm/fates_cold_twostream/shell_commands
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
module load e4s | ||
spack env activate gcc | ||
spack load nco | ||
|
||
SRCDIR=`./xmlquery SRCROOT --value` | ||
CASEDIR=`./xmlquery CASEROOT --value` | ||
FATESDIR=$SRCDIR/components/elm/src/external_models/fates | ||
FATESPARAMFILE=$CASEDIR/fates_params_twostream.nc | ||
|
||
ncgen -o $FATESPARAMFILE $FATESDIR/parameter_files/fates_params_default.cdl | ||
|
||
$FATESDIR/tools/modify_fates_paramfile.py --O --fin $FATESPARAMFILE --fout $FATESPARAMFILE --var fates_rad_model --val 2 --allpfts | ||
|
||
spack unload nco | ||
module unload e4s |
1 change: 1 addition & 0 deletions
1
components/elm/cime_config/testdefs/testmods_dirs/elm/fates_cold_twostream/user_nl_elm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
fates_paramfile = '$CASEROOT/fates_params_twostream.nc' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is the parameter file generated on the fly by
ncgen
and then modified, instead of having the file added to the inutdeck server?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We update the parameter file frequently in FATES. This prevents us from having to make changes to multiple test files every time we change an irrelevant parameter (which would also be a liability to injecting bugs.. ie what if we don't update all the files correctly every time there is a change).
Note that in the future, it is intended that we will have many of these on-the-fly parameter files generated, so that we can stress test the model with many different configurations. It would not be a matter of updating 1 or two files, but think more like 5-10.