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

Update active crown fire per Scott and Reinhardt 2001, Rothermel 1977 #1

Open
wants to merge 1,091 commits into
base: active_crown_fire
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1091 commits
Select commit Hold shift + click to select a range
74cb26b
refactor copy and dealloc
May 4, 2023
ce12d05
update for refactor
May 4, 2023
34b0fa0
fix circular dependencies with hydraulics objects
May 4, 2023
f93a8b4
Merge branch 'main' into patch_refactor
May 4, 2023
d879aea
converting variables to snake case
glemieux May 4, 2023
848bbea
adjust regridding methods
glemieux May 4, 2023
9a6a903
get rid of CMakeLists, only for unit test branch
May 5, 2023
c2e4e24
various fixes and improvements
glemieux May 5, 2023
243137f
put cohort mod in biogeochem folder
May 5, 2023
c77dff1
remove chil check in EDSurfaceAlbedoMod
May 5, 2023
99eac94
Separated luh2 module and luh2 call script
glemieux May 5, 2023
1e0e02f
put endrun back
May 8, 2023
e5e3f49
remove allocatable arrays
May 8, 2023
b04fd2e
More updates
glemieux May 8, 2023
9692da0
Update phi1b calculation to use xl directly
glemieux May 8, 2023
3d5709b
add abort back
May 8, 2023
447b2f4
add fragmentation scalar
May 8, 2023
20f9cb1
add shr_sys_abort use
May 8, 2023
ecae3ab
fragmentation scalar
May 8, 2023
472eaa6
start working on allowing read in of regridder file
glemieux May 8, 2023
2e1c736
Fix regridding loop
glemieux May 9, 2023
21c7c96
begin to update for style
May 9, 2023
d6ff82c
Merge branch 'patch_refactor_noallocate' into patch_refactor
May 9, 2023
e8c2ea8
update style on patchmod
May 9, 2023
4b9e9d5
update style to match style guide
May 9, 2023
cac9670
Merge pull request #1023 from JessicaNeedham/JFN-IO-termcflux
glemieux May 9, 2023
92a57d0
Remove unnecessary xarray import call
glemieux May 9, 2023
009e457
remove old chil local variable and commented out code
glemieux May 9, 2023
14b1791
Merge pull request #1022 from adrifoster/check_fates_xl
glemieux May 9, 2023
a265ef3
update for style
May 10, 2023
772d687
Merge branch 'main' into patch_refactor
May 10, 2023
548467d
add target
May 10, 2023
c7662c1
Add clarifying language per reviewer suggestions
glemieux May 10, 2023
0c2d335
Add parameter patch file
glemieux May 10, 2023
5c72c2f
Adding state correction function
glemieux May 12, 2023
0b86cd2
Add handling of regridder argument option
glemieux May 13, 2023
430bd03
switch the importdata and prepdataset functions
glemieux May 13, 2023
3a31c2a
Correct some issues
glemieux May 13, 2023
9af66f0
adding type checks
glemieux May 13, 2023
23dabb7
adding check against the time variable for the input dataset
glemieux May 13, 2023
61306a0
fix import function
glemieux May 13, 2023
4e830a8
fix argument call
glemieux May 13, 2023
e4b43ac
update check function outputs
glemieux May 13, 2023
5916d15
get rid of temporary cohort allocation
May 15, 2023
6a8f12b
do_inventory_out off
May 15, 2023
8bd42ea
remove temp cohort
May 16, 2023
3879006
update l2fr definition
May 16, 2023
614e4a4
dangling pointer
May 16, 2023
4745516
update to target
May 16, 2023
f22540d
Add bash script
glemieux May 16, 2023
f93741b
fix crown_damage
May 16, 2023
9ec5545
update UpdateParamAPI tool
glemieux May 16, 2023
ea5d83a
update parameter file
glemieux May 16, 2023
34f804b
Update biogeochem/EDPatchDynamicsMod.F90
adamhb May 17, 2023
fe98bd0
Update biogeochem/EDPhysiologyMod.F90
adamhb May 17, 2023
f3dfcb1
Update biogeochem/EDPhysiologyMod.F90
adamhb May 17, 2023
e3e60df
Update biogeochem/EDPhysiologyMod.F90
adamhb May 17, 2023
89b7cb0
Update parteh/PRTAllometricCarbonMod.F90
adamhb May 17, 2023
384255d
small updates made to comments, indents, and the regeneration model s…
adamhb May 17, 2023
70c89c7
Merge branch 'regeneration' of https://github.com/adamhb/fates into r…
adamhb May 17, 2023
eb79dd8
refactoring luh2 module
glemieux May 17, 2023
1941e66
Add merge flag to import data
glemieux May 18, 2023
1cee030
fix order of operations
glemieux May 18, 2023
4eadfb7
add commands to remove intermediate file copies
glemieux May 18, 2023
e6278f6
move all luh2 code into named folder
glemieux May 18, 2023
21c573b
correct indexing for elongation factor
glemieux May 19, 2023
28bcafc
convert YEAR from cftime object to number
glemieux May 23, 2023
934ad20
Changed defaults for drought deciduous.
mpaiao May 24, 2023
a178f9d
bugfixes to reduce memory usage and interpret cftime reference point
ckoven May 31, 2023
846f7d3
Merge pull request #28 from ckoven/fates-luh2_data
glemieux May 31, 2023
befe7dd
Adding the fates_rad_model to the parameter file
rgknox Jun 6, 2023
5956465
Merge pull request #2 from rgknox/mpaiao-pr-drgt-decid
mpaiao Jun 6, 2023
afb8194
Added TRS recruitment parameters
rgknox Jun 6, 2023
894206b
Small syntax updates to trs parameter long-names
rgknox Jun 6, 2023
4a14057
Merged in Adam HBs definitions for pft parameters
rgknox Jun 6, 2023
fea2085
Merged in more regeneration parameter definitions and the model switc…
rgknox Jun 6, 2023
fb05618
Merge pull request #3 from rgknox/mpaiao-pr-drgt-decid
mpaiao Jun 6, 2023
fce15a9
Merge pull request #1008 from adamhb/cwd_partitioning
glemieux Jun 6, 2023
074c043
Added AHB parameters to parteh
rgknox Jun 7, 2023
4aae59a
Merge branch 'mpaiao-pr-drgt-decid' of github.com:mpaiao/fates into m…
rgknox Jun 7, 2023
49c30b0
Merge pull request #4 from rgknox/mpaiao-pr-drgt-decid
mpaiao Jun 7, 2023
091627e
Updated memory needed for phenoology restart
rgknox Jun 7, 2023
fad6947
Merge pull request #5 from rgknox/mpaiao-pr-drgt-decid
mpaiao Jun 7, 2023
0428259
Merge branch 'sci.1.65.3_api.25.4.0-branch' into clm-cbalance-merged
rgknox Jun 8, 2023
66d3797
changes in response to Ryan's comments
adamhb Jun 9, 2023
e0eb4ad
Initializing EMA NPP used for nitrogen fixation correctly, also addin…
rgknox Jun 12, 2023
635fcce
Made special routine to calculate forest floor light levels for seedl…
rgknox Jun 13, 2023
e57df0d
Added seedling light intensity subroutine
rgknox Jun 13, 2023
c276459
removed unused variable
rgknox Jun 13, 2023
f539a24
Merge branch 'main' into patch_refactor
Jun 15, 2023
8365c33
fixed typo that was preventing a clear error message to be written wh…
ckoven Jun 21, 2023
efde58c
Fix to the restart order issue
rgknox Jun 23, 2023
49f82ab
moved nlevsclass calculation earlier in subroutine
rgknox Jun 23, 2023
180ba13
Moved restart calls for new phen variables to different location
rgknox Jun 26, 2023
fa431f5
removed change of vcmax parameter
rgknox Jun 26, 2023
bd82b5f
updating the default parameter file per fixes in the api update xml t…
rgknox Jun 26, 2023
facbf55
fix to the parameter file
rgknox Jun 27, 2023
0a3c66c
Added future parameters for addressing issue 1014 in an upcoming pull…
mpaiao Jun 27, 2023
6aba10c
Merge resolution
rgknox Jun 27, 2023
59f56ee
reapplied parameter update from xml, something got lost in a merge
rgknox Jun 27, 2023
cbf0d69
add seed dispersal parameters for PR 1005
glemieux Jun 28, 2023
a6008b9
adds two new parameters to address issue 1014
glemieux Jun 28, 2023
e4cf214
provisions for frozen/arid conditions on drought deciduous suction tr…
rgknox Jun 28, 2023
6f44d03
Merge branch 'mpaiao-pr-drgt-decid' of github.com:mpaiao/fates into m…
rgknox Jun 28, 2023
8d2d765
Updating parameter file
rgknox Jun 28, 2023
1864070
simple conflict resolution
rgknox Jun 28, 2023
f87ea87
fixed parameter name
rgknox Jun 28, 2023
5830b35
Update EDPhysiologyMod.F90
mpaiao Jun 28, 2023
a1f3dc5
Merge pull request #6 from rgknox/mpaiao-pr-drgt-decid
mpaiao Jun 28, 2023
6da2d85
correct values assignment error for param patch
glemieux Jun 28, 2023
693061b
Merge branch 'drdt-decid-seed-disp-cp' into mpaiao-pr-drgt-decid
glemieux Jun 28, 2023
516c7e8
fix default param name in file
glemieux Jun 28, 2023
d20b78c
Merge pull request #1043 from ckoven/pftindexswapper_error_correction
glemieux Jun 30, 2023
b8ad811
Merge pull request #958 from mpaiao/mpaiao-pr-drgt-decid
glemieux Jun 30, 2023
1da0565
Merge tag 'sci.1.66.0_api.25.5.0' into regeneration
glemieux Jun 30, 2023
3fb8673
remove regeneration model setting check
glemieux Jun 30, 2023
7395273
update seedlingparpatch to handle newly spawned patches
glemieux Jul 6, 2023
5373010
initial refactor of seedlingparpatch
glemieux Jul 7, 2023
06b92a9
add missing end do
glemieux Jul 7, 2023
53cd4a1
update SeedlingParPatch to avoid zero ncan per pft
glemieux Jul 7, 2023
7eb363d
update names and remove old code
glemieux Jul 7, 2023
7c8a53c
Fix EDInitMod.F90 initialisation of drought deciduous variables
mpaiao Jul 7, 2023
f47c2ee
Merge branch 'main' into patch_refactor
Jul 7, 2023
f7776b2
Remove duplicated init of the drought deciduous local variables
mpaiao Jul 7, 2023
b6b45bf
Merge branch 'regeneration' into regeneration-seedlingparpatch_refactor
glemieux Jul 7, 2023
da80dd9
Merge pull request #1 from glemieux/regeneration-seedlingparpatch_ref…
adamhb Jul 7, 2023
e1a3f73
Merge pull request #1050 from NGEET/mpaiao-drgt-decid-patch
glemieux Jul 8, 2023
78a3ebb
Merge tag 'sci.1.66.1_api.25.5.0' into ema_npp_fix
glemieux Jul 10, 2023
6d424f4
Merge pull request #1041 from rgknox/ema_npp_fix
glemieux Jul 11, 2023
64c5036
merge conflicts fix
Jul 13, 2023
36e6c50
adding some consistency checks
Jul 13, 2023
0da02a9
don't fuse/sort cohorts if in SP
Jul 13, 2023
7d18eaa
Fix c3/c4 if else in Ryan 1991 LMR model.
JessicaNeedham Jul 17, 2023
66e5b2e
Moving jmax out of c3/c4 if else
JessicaNeedham Jul 17, 2023
43d5e55
Merge pull request #1053 from JessicaNeedham/jfn-lmr-c3c4-fix
glemieux Jul 18, 2023
c295e3e
Added allocation restrictions on TRS running means, reduced memory us…
rgknox Jul 18, 2023
fa6df9f
Merge tag 'sci.1.65.7_api.25.4.0' into cross_grid_seed
glemieux Jul 18, 2023
9317261
fix type of unset used
glemieux Jul 18, 2023
3a0c352
replace use of ldecomp
glemieux Jul 18, 2023
3f6b2be
added use statement
rgknox Jul 19, 2023
fa4d124
Merge branch 'main' into regeneration-merge-1.66.3
rgknox Jul 19, 2023
37c44c8
Merge pull request #2 from rgknox/regeneration
adamhb Jul 19, 2023
ef3e76f
add loop names to seedupdate
glemieux Jul 19, 2023
e229d6f
move dispersal fraction outside of element loop
glemieux Jul 19, 2023
145d77d
Refactor seed disperal out of bc types
glemieux Jul 19, 2023
204e5aa
Merge branch 'cross_grid_seed' into cross_grid_seed_bc-to-site_refactor
glemieux Jul 19, 2023
69691b5
remove bc_out argument due to refactor
glemieux Jul 20, 2023
8d7764f
fix on germinated seed mortality, a switch check and history field na…
rgknox Jul 20, 2023
a1a1b61
Merge pull request #3 from rgknox/regeneration
adamhb Jul 20, 2023
40281ba
fix errors
Jul 20, 2023
6635ca0
change name of error tol
Jul 20, 2023
a3a8c5d
changed litter initialization to invalid for cold-start SP runs
rgknox Jul 20, 2023
e3fc66d
the changes to default parameter file had already been implemented in…
rgknox Jul 20, 2023
d09b149
removed xml patch file
rgknox Jul 21, 2023
3fcc9fc
Merge pull request #1021 from adamhb/regeneration
rgknox Jul 21, 2023
3ce9481
Merge branch 'main' into clm-cbalance
rgknox Jul 24, 2023
d652c21
implement decode_times=False
glemieux Jul 24, 2023
14153c5
remove call to attribute update in shell script
glemieux Jul 24, 2023
35dee92
reworking luh2 shell script call
glemieux Jul 24, 2023
822699a
Correct seed_in_external and seed_out calculations
glemieux Jul 24, 2023
5f3dd90
Merge tag 'sci.1.66.0_api.25.5.0' into cross_grid_seed
glemieux Jul 24, 2023
2e4cc83
update parameter patch file for api25.5
glemieux Jul 24, 2023
f08b81f
add api25.5 param file to archive
glemieux Jul 24, 2023
4a6aca7
correct call to previously archived default (api25.5)
glemieux Jul 24, 2023
c62e401
remove archive and api update
glemieux Jul 24, 2023
a276f25
Merge tag 'sci.1.67.0_api.25.5.0' into cross_grid_seed
glemieux Jul 24, 2023
57ac62a
Merge branch 'main' into canopy_bug
Jul 26, 2023
436a956
Fix EDInitMod.F90 initialisation of drought deciduous variables
mpaiao Jul 7, 2023
b6816f6
fix init error
Jul 26, 2023
f458ea7
Remove duplicated init of the drought deciduous local variables
mpaiao Jul 7, 2023
7a64fe8
Merge commit '6d424f467a6236ff24c41be2143244ae0a43b2f8' into patch_re…
Jul 26, 2023
a67e006
Merge commit '43d5e55480154e4bd487edd8da3f54e9c6bc4c42' into patch_re…
Jul 26, 2023
84f96f0
Merge branch 'main' into patch_refactor
Jul 27, 2023
6a8898a
removing conditional on ch4 bcs
rgknox Jul 27, 2023
44668e2
remove default
Jul 27, 2023
1054ce5
fix deallocate
Jul 27, 2023
8bfb215
remove duplicate uses
Jul 28, 2023
ec19393
fix choice range and add shell script input options
glemieux Jul 28, 2023
8f7f9b2
address comments
Jul 28, 2023
e0311ca
Update biogeochem/EDCohortDynamicsMod.F90
adrifoster Jul 28, 2023
97ae354
Updates to bgc coupling
rgknox Jul 31, 2023
cf41e0a
fix spmode cohort height initialization
glemieux Aug 1, 2023
65ed340
swapped long names for MAINT_RESP* variables
Aug 1, 2023
67b8d01
Add comments and remove unnecessary dependence to yaml file
glemieux Aug 1, 2023
63124fd
add luh2 readme
glemieux Aug 1, 2023
e44bc90
remove old comments
glemieux Aug 1, 2023
4615b8a
Add system exit if unrecognized file type provided as argument
glemieux Aug 1, 2023
8cbb7ab
update luh2 tool argparse options and time handling
glemieux Aug 2, 2023
9cbfe4f
update the usage description in luh2.py
glemieux Aug 2, 2023
caf4aae
Merge pull request #1032 from glemieux/tools/fates-luh2_data
glemieux Aug 3, 2023
a6c3a74
remove duplicate calculation of leaf_c
glemieux Aug 7, 2023
a90710a
Merge pull request #1024 from adrifoster/patch_refactor
glemieux Aug 8, 2023
e12062f
Small syntax updates and accomodations for moving litter flux bc outs
rgknox Aug 10, 2023
4f41112
Merge branch 'main' into clm-cbalance-merged
rgknox Aug 11, 2023
39b6a15
put back error tolerance values
Aug 14, 2023
91aded9
update to ensure b4b
Aug 14, 2023
fc96b96
Merge branch 'main' into canopy_bug
Aug 14, 2023
c831cbf
fix merge conflict
Aug 14, 2023
f5c75ef
add fates_r8
Aug 14, 2023
5e7ed9d
add missing variable
Aug 14, 2023
9a27cd2
relax tolerance a bit
Aug 15, 2023
cd6299a
add error constant
Aug 15, 2023
0630320
update error tolerance
Aug 18, 2023
b1a2efb
test new fix
adrifoster Aug 18, 2023
5f72b2a
update indentation
Aug 18, 2023
7750e5b
correct units per issue #1047
glemieux Aug 21, 2023
ee7924c
Merge pull request #1055 from adrifoster/canopy_bug
glemieux Aug 22, 2023
905bf11
Merge pull request #1056 from jennykowalcz/jkowalcz-IO-historyfix
glemieux Aug 22, 2023
6f9ceee
Merge tag 'sci.1.67.2_api.27.0.0' into cross_grid_seed
glemieux Aug 23, 2023
7b0cbf5
make global number of gridcells an input argument
glemieux Aug 24, 2023
e067714
restore accidentally deleted error status variables
glemieux Aug 24, 2023
ce241b6
Update PULL_REQUEST_TEMPLATE.md
glemieux Aug 24, 2023
74228ca
add site x pft restart variable for seed_in from dispersal
glemieux Aug 24, 2023
397d822
Update PULL_REQUEST_TEMPLATE.md
glemieux Aug 25, 2023
eb25064
fix error with large size initialisation in nocomp mode
JessicaNeedham Aug 26, 2023
e5cd151
add seed_out to restart
glemieux Aug 30, 2023
98c36b3
Update checklist with contributor/integrator
glemieux Aug 30, 2023
adb0711
add missing newlines
glemieux Aug 31, 2023
73f31ab
Merge pull request #1069 from NGEET/glemieux-patch-1
glemieux Aug 31, 2023
efbb302
refactoring code to accomodate use of mpi_allgatherv in place of a re…
glemieux Sep 1, 2023
6a792e8
updates to pass bag compiler build
glemieux Sep 5, 2023
e402f0c
Small quality of life update to cohort age in create_cohort
rgknox Sep 11, 2023
466960b
Merge pull request #2 from rgknox/jfn-nocomplargetreeinitfix
JessicaNeedham Sep 11, 2023
dc8d222
cap atkin lmr at 0 to prevent negatives - add param warnings
JessicaNeedham Sep 19, 2023
c722825
add note on place where code should maybe be updated
JessicaNeedham Sep 19, 2023
f2d8c8a
wrap warning message in FatesWarn() construct
JessicaNeedham Sep 19, 2023
56f3465
move hard coded parameters to FatesConstantsMod
JessicaNeedham Sep 19, 2023
5921c15
update parameter check to use FatesConstants
JessicaNeedham Sep 19, 2023
ddff4c4
move call to PRTDerviedParams up
JessicaNeedham Sep 20, 2023
d3c3f98
Changge all 'hite' to 'height'
JessicaNeedham Sep 25, 2023
90e1400
change the dispersal cadence to be a hlm defined switch
glemieux Sep 25, 2023
540caa1
update kernel mode check to cadence check
glemieux Sep 25, 2023
34fe689
reverse dispersal type dimensions for memory continuity for mpi colle…
glemieux Sep 11, 2023
4173192
add neighbor array list to neighborhood data structure
glemieux Sep 26, 2023
c24643b
fix bad merge
glemieux Sep 26, 2023
57aae11
Merge branch 'cross_grid_seed' into cross_grid_seed-hlm_modeswitch
glemieux Sep 26, 2023
3a00e84
add missing unset
glemieux Sep 27, 2023
a7e4ee0
remove unnecessary dispersal cadence logic gates
glemieux Sep 27, 2023
a92057d
seed dispersal comment clean up
glemieux Sep 27, 2023
040e23a
Merge pull request #1086 from JessicaNeedham/jfn-atkin-lmr-cap
rgknox Sep 28, 2023
21e18c6
Merge pull request #1072 from JessicaNeedham/jfn-nocomplargetreeinitfix
rgknox Sep 29, 2023
ad314d1
Merge tag 'sci.1.67.4_api.27.0.0' into hitefix
glemieux Oct 9, 2023
8733caf
fix hite from merging in sci.1.67.4_api.27.0.0
glemieux Oct 10, 2023
a3048a6
Merge pull request #1091 from JessicaNeedham/hitefix
glemieux Oct 10, 2023
866721a
Merge tag 'sci.1.67.5_api.27.0.0' into cross_grid_seed
glemieux Oct 18, 2023
df403b3
remove elm incompatible gindex uses from fatesinterfacemod
glemieux Oct 20, 2023
c4642a7
remove old diagnostic write statements
glemieux Oct 20, 2023
1d18bb6
Merge pull request #1005 from YanlanLiu/cross_grid_seed
glemieux Oct 20, 2023
5ff191b
Merge branch 'main' into active_crown_Scott_2001
Oct 24, 2023
3090ea4
fix merge conflicts
Oct 26, 2023
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
30 changes: 20 additions & 10 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,29 +14,39 @@
<!--- the model is expected to generated different answers -->
<!--- from the master version of the code -->


### Checklist:
### Checklist
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
- [ ] My change requires a change to the documentation.
- [ ] I have updated the in-code documentation .AND. (the [technical note](https://github.com/NGEET/fates-docs) .OR. the wiki) accordingly.
- [ ] I have read the [**CONTRIBUTING**](https://github.com/NGEET/fates/blob/master/CONTRIBUTING.md) document.
*If this is your first time contributing, please read the [**CONTRIBUTING**](https://github.com/NGEET/fates/blob/main/CONTRIBUTING.md) document.*

All checklist items must be checked to enable merging this pull request:

*Contributor*
- [ ] The in-code documentation has been updated with descriptive comments
- [ ] The documentation has been assessed to determine if updates are necessary

*Integrator*
- [ ] FATES PASS/FAIL regression tests were run
- [ ] If answers were expected to change, evaluation was performed and provided
- [ ] Evaluation of test results for answer changes was performed and results provided

### Documentation
<!--- If this pull requests warrants an update to the tech doc or user's guide, and said changes have been made paste a link to the documentation pull request below. -->
<!--- If documentation updates are needed, but changes do not yet have their own separate pull request, please create an issue on either repo so that we can keep track of necessary updates.-->
- [Technical Note](https://github.com/NGEET/fates-docs) update:
- [User's Guide](https://github.com/NGEET/fates-users-guide) update:

### Test Results:
<!--- Non-trivial changes require the PASS/FAIL regression tests. -->
<!--- If changes to code are NOT expected to change answers, tests must -->
<!--- be run against a baseline. -->

CTSM (or) E3SM (specify which) test hash-tag:
*CTSM (or) E3SM (specify which) test hash-tag:*

CTSM (or) E3SM (specify which) baseline hash-tag:
*CTSM (or) E3SM (specify which) baseline hash-tag:*

FATES baseline hash-tag:
*FATES baseline hash-tag:*

Test Output:
*Test Output:*

<!--- paste in test results here -->

Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/add-to-gh_projects.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# This is a basic workflow to help you get started with Actions

name: Add issue to github project issue triage board

# Controls when the workflow will run
on:
issues:
types:
- opened

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
add-to-project:
name: add issue to issue triage board project
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
with:
# URL of the project to add issues to
project-url: https://github.com/orgs/NGEET/projects/1
# A GitHub personal access token with write access to the project
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}

17 changes: 5 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@

This repository holds the Functionally Assembled Terrestrial Ecosystem Simulator (FATES). FATES is a numerical terrestrial ecosystem model. Its development and support is primarily supported by the Department of Energy's Office of Science, through the Next Generation Ecosystem Experiment - Tropics ([NGEE-T](https://ngee-tropics.lbl.gov/)) project.

For more information on the FATES model, see our [User's Guide](https://fates-users-guide.readthedocs.io/en/latest/) and [technical documentation](https://fates-docs.readthedocs.io/en/latest/index.html).
For more information on the FATES model, see our [User's Guide](https://fates-users-guide.readthedocs.io/en/latest/) and [technical documentation](https://fates-docs.readthedocs.io/en/latest/index.html).

Please submit any questions you may have to the [FATES Github Discussions board](https://github.com/NGEET/fates/discussions).

To receive email updates about forthcoming release tags, regular meeting notifications, and other important announcements, please join the [FATES Google group](https://groups.google.com/g/fates_model).

## Important Guides:
------------------------------
Expand All @@ -21,7 +24,6 @@ For more information on the FATES model, see our [User's Guide](https://fates-us

[Code of Conduct](https://github.com/NGEET/fates/blob/master/CODE_OF_CONDUCT.md)


## Important Note:
------------------------------

Expand All @@ -33,13 +35,4 @@ https://github.com/E3SM-Project/E3SM

https://github.com/ESCOMP/cesm

## Important Note About Host-Models and Compatible Branches:
------------------------------------------------------------

The FATES and E3SM teams maintain compatability of the NGEET/FATES master branch with the **E3SM master** branch. When changes to the FATES API force compatability updates with E3SM, there may be some modest lag time.

The FATES team maintains compatability of the NGEET/FATES master branch with the **CTSM fates_next_api** branch. Since the FATES team uses this branch for its internal testing, this compatability is tightly (immediately) maintained and these two should always be in sync. However, CTSM master may become out of sync with FATES master for large periods (months) of time.




The FATES, E3SM and CTSM teams maintain compatability of the NGEET/FATES master branch with the E3SM master and CTSM master branches respectively. There may be some modest lag time in which the latest commit on the FATES master branch is available to these host land models (HLM) by default. This is typically correlated with FATES development updates forcing necessary changes to the FATES API. See the table of [FATES API/HLM compatibility](https://fates-users-guide.readthedocs.io/en/latest/user/Table-of-FATES-API-and-HLM-STATUS.html) for information on which fates tag corresponds to which HLM tag or commit.
225 changes: 225 additions & 0 deletions biogeochem/DamageMainMod.F90
Original file line number Diff line number Diff line change
@@ -0,0 +1,225 @@
module DamageMainMod

use FatesConstantsMod , only : r8 => fates_r8
use FatesConstantsMod , only : i4 => fates_int
use FatesConstantsMod , only : itrue, ifalse
use FatesConstantsMod , only : years_per_day
use FatesConstantsMod , only : nearzero
use FatesGlobals , only : fates_log
use FatesGlobals , only : endrun => fates_endrun
use shr_log_mod , only : errMsg => shr_log_errMsg
use EDPftvarcon , only : EDPftvarcon_inst
use EDParamsMod , only : damage_event_code
use EDParamsMod , only : ED_val_history_damage_bin_edges
use FatesInterfaceTypesMod, only : hlm_current_day
use FatesInterfaceTypesMod, only : hlm_current_month
use FatesInterfaceTypesMod, only : hlm_current_year
use FatesInterfaceTypesMod, only : hlm_model_day
use FatesInterfaceTypesMod, only : hlm_day_of_year

implicit none
private

logical, protected :: damage_time ! if true then damage occurs during current time step

character(len=*), parameter, private :: sourcefile = &
__FILE__

public :: GetCrownReduction
public :: GetDamageFrac
public :: IsItDamageTime
public :: damage_time
public :: GetDamageMortality


logical :: debug = .false. ! for debugging


! The following is the special classification for undamaged plants
! and is used in contexts where cohort%damageclass is used. This is
! to flag to the user that an undamaged plant is assumed in those contexts

integer, parameter, public :: undamaged_class = 1


! ============================================================================
! ============================================================================

contains




subroutine IsItDamageTime(is_master)

!----------------------------------------------------------------------------
! This subroutine determines whether damage should occur (it is called daily)
! This is almost an exact replica of the IsItLoggingTime subroutine
!-----------------------------------------------------------------------------


integer, intent(in) :: is_master
!type(ed_site_type), intent(inout), target :: currentSite

integer :: icode ! Integer equivalent of the event code (parameter file only allows reals)
integer :: damage_date ! Day of month for damage extracted from event code
integer :: damage_month ! Month of year for damage extracted from event code
integer :: damage_year ! Year for damage extracted from event code
integer :: model_day_int ! Model day

character(len=64) :: fmt = '(a,i2.2,a,i2.2,a,i4.4)'

damage_time = .false.
icode = int(damage_event_code)

model_day_int = int(hlm_model_day)

if(icode .eq. 1) then
! Damage is turned off
damage_time = .false.

else if(icode .eq. 2) then
! Damage event on first time step
if(model_day_int .eq.1) then
damage_time = .true.
end if

else if(icode .eq. 3) then
! Damage event every day - this is not recommended as it will result in a very large
! number of cohorts which will likely be terminated
damage_time = .true.

else if(icode .eq. 4) then
! Damage event once a month
if(hlm_current_day.eq.1 ) then
damage_time = .true.
end if

else if(icode < 0 .and. icode > -366) then
! Damage event every year on a specific day of the year
! specified as negative day of year
if(hlm_day_of_year .eq. abs(icode) ) then
damage_time = .true.
end if

else if(icode > 10000 ) then
! Specific Event: YYYYMMDD
damage_date = icode - int(100* floor(real(icode,r8)/100._r8))
damage_year = floor(real(icode,r8)/10000._r8)
damage_month = floor(real(icode,r8)/100._r8) - damage_year*100

if(hlm_current_day .eq. damage_date .and. &
hlm_current_month .eq. damage_month .and. &
hlm_current_year .eq. damage_year ) then
damage_time = .true.
end if

else
! Bad damage event flag
write(fates_log(),*) 'An invalid damage code was specified in fates_params'
write(fates_log(),*) 'Check DamageMainMod.F90:IsItDamageTime()'
write(fates_log(),*) 'for a breakdown of the valid codes and change'
write(fates_log(),*) 'fates_damage_event_code in the file accordingly.'
write(fates_log(),*) 'exiting'
call endrun(msg=errMsg(sourcefile, __LINE__))
end if

if(damage_time .and. (is_master.eq.itrue) ) then
write(fates_log(),fmt) 'Damage Event Enacted on date: ', &
hlm_current_month,'-', hlm_current_day,'-',hlm_current_year
end if

return

end subroutine IsItDamageTime

!----------------------------------------------------------------------------

subroutine GetDamageFrac(cc_cd, nc_cd, pft, dist_frac)


! Given the current cohort damage class find the fraction of individuals
! going to the new damage class.
! This subroutine consults a look up table of transitions from param derived.

! USES
use FatesParameterDerivedMod, only : param_derived


! ARGUMENTS
integer, intent(in) :: cc_cd ! current cohort crown damage
integer, intent(in) :: nc_cd ! new cohort crown damage
integer, intent(in) :: pft ! plant functional type
real(r8), intent(out) :: dist_frac ! fraction of current cohort moving to
! new damage level

dist_frac = param_derived%damage_transitions(cc_cd, nc_cd, pft)

end subroutine GetDamageFrac

!-------------------------------------------------------

subroutine GetCrownReduction(crowndamage, crown_reduction)

!------------------------------------------------------------------
! This subroutine takes the crown damage class of a cohort (integer)
! and returns the fraction of the crown that is lost.
!-------------------------------------------------------------------

integer(i4), intent(in) :: crowndamage ! crown damage class of the cohort
real(r8), intent(out) :: crown_reduction ! fraction of crown lost from damage

crown_reduction = ED_val_history_damage_bin_edges(crowndamage)/100.0_r8

return
end subroutine GetCrownReduction


!----------------------------------------------------------------------------------------


subroutine GetDamageMortality(crowndamage,pft, dgmort)

!------------------------------------------------------------------
! This subroutine calculates damage-dependent mortality.
! Not all damage related mortality will be captured by mechanisms in FATES
! (e.g. carbon starvation mortality). Damage could also lead to damage
! due to unrepresented mechanisms such as pathogens or increased
! vulnerability to wind throws. This function captures mortality due to
! those unrepresented mechanisms.
!------------------------------------------------------------------

use EDPftvarcon , only : EDPftvarcon_inst

integer(i4), intent(in) :: crowndamage ! crown damage class of the cohort
integer(i4), intent(in) :: pft ! plant functional type
real(r8), intent(out) :: dgmort ! mortality directly associated with damage

! local variables
real(r8) :: damage_mort_p1 ! inflection point of the damage mortalty relationship
real(r8) :: damage_mort_p2 ! rate parameter for the damage mortality relationship
real(r8) :: crown_loss ! fraction of crown lost

damage_mort_p1 = EDPftvarcon_inst%damage_mort_p1(pft)
damage_mort_p2 = EDPftvarcon_inst%damage_mort_p2(pft)

! make damage mortality a function of crownloss and not crowndamage
! class so that it doesn't need to be re-parameterised if the number
! of damage classes change.
crown_loss = ED_val_history_damage_bin_edges(crowndamage)/100.0_r8

if (crowndamage .eq. 1 ) then
dgmort = 0.0_r8
else
dgmort = 1.0_r8 / (1.0_r8 + exp(-1.0_r8 * damage_mort_p2 * &
(crown_loss - damage_mort_p1) ) )

end if

return
end subroutine GetDamageMortality
!----------------------------------------------------------------------------------------


end module DamageMainMod

Loading