Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
294 commits
Select commit Hold shift + click to select a range
97050fc
update interface var type with key name
glemieux Aug 29, 2025
f100888
build error corrections for the registry
glemieux Aug 29, 2025
af15218
Make 2d registration subroutine
glemieux Sep 2, 2025
ff881f0
Revert "remove area fraction from flux into litter pools now that sub…
glemieux Sep 2, 2025
7da4b03
Revert "move litter pointer assignment inside element loop"
glemieux Sep 2, 2025
cffdd59
Revert "whitespace clean up"
glemieux Sep 2, 2025
bc3e44b
Revert "Update the mimics portion of the fluxintolitterpools code to …
glemieux Sep 2, 2025
ee6f38d
Revert "Update fluxintolitterpool non-mimics section to use the patc…
glemieux Sep 2, 2025
06ac9b4
Revert "remove now unused bc_out from flux into litter pool procedure"
glemieux Sep 2, 2025
98ca7bb
create interface registry type to be used by both fates_interface_ty…
glemieux Sep 3, 2025
fcc0bc0
move the registry type-bound procedures from fatesinterfacemod
glemieux Sep 3, 2025
f869a0e
implement the interface registry type in the patch type
glemieux Sep 3, 2025
4a28e04
add a 1d variant of the register generic for the fates-side variables
glemieux Sep 3, 2025
4d11545
add explicit polymorphic pointers in the var type to handle different…
glemieux Sep 9, 2025
849c4d5
correct the definition of the generic registry procedure
glemieux Sep 9, 2025
389f433
minor formatting update
glemieux Sep 9, 2025
3f3ec2c
add function to get the registry key from the given index
glemieux Sep 9, 2025
c8b88b5
start adding the interface update call for the hlm-fates interface du…
glemieux Sep 9, 2025
0c76c7c
removed unused update subroutine
glemieux Sep 9, 2025
0cefb87
correct end function name
glemieux Sep 9, 2025
be4111e
minor white space changes
glemieux Sep 9, 2025
f1fa1d7
simplify the call to update the data via the api pointers by passing …
glemieux Sep 9, 2025
62b6b38
fix getregistrykey output definition
glemieux Sep 9, 2025
1a02f4f
Add the api update procedure.
glemieux Sep 9, 2025
8266933
Start sketch of update variable
glemieux Sep 9, 2025
06ed5bb
add subgrid heirarchy index variables in the registry type
glemieux Sep 10, 2025
d4cc8a8
update the current patch registry column index via the site column_map
glemieux Sep 10, 2025
e1cc928
add variables to hold information about the ordering of the input dat…
glemieux Sep 10, 2025
134f343
correct usage of unset integer constant
glemieux Sep 10, 2025
c5f3683
make update interface a type-bound procedure
glemieux Sep 10, 2025
47ce368
removing the rank dimension integer as we are going to hold that the …
glemieux Sep 10, 2025
7be5145
add subgrid parameter index values
glemieux Sep 11, 2025
95916a0
update the api registration procedure to pass in the subgrid index fo…
glemieux Sep 11, 2025
bad4850
implement the updated api registry assignment of the column index
glemieux Sep 11, 2025
4b964da
whitespace
glemieux Sep 11, 2025
d2a41b1
adding comments and whitespace adjustments
glemieux Sep 11, 2025
f35d8b7
update the registry initialization to reflect the change to the subgr…
glemieux Sep 11, 2025
a28b2ab
add missing rank update
glemieux Sep 11, 2025
f3c34e7
add case select logic and pointers to index into the source data pointer
glemieux Sep 11, 2025
bcfcb30
add type-safe selection constructs to the update interface variable p…
glemieux Sep 11, 2025
32371cf
move subgrid heirarchy values into fates interface types mod
glemieux Sep 12, 2025
6e201bc
remove superseded transfer bc procedures
glemieux Sep 12, 2025
1b475e3
add intent in to all registry subroutines
glemieux Sep 12, 2025
16924aa
remove defunct transferbcin/out procedures in patch type
glemieux Sep 12, 2025
c001497
add data size to the var type
glemieux Sep 12, 2025
7cf0087
add dimension error diagnostics to the var type
glemieux Sep 12, 2025
05c8db9
convert variable size comparison error checking to a subroutine
glemieux Sep 12, 2025
1e6914f
add scalar interface register subroutine
glemieux Sep 12, 2025
2e00287
add nlevsoil to patch-level bcin
glemieux Sep 12, 2025
caece8c
add interface key names as parameter variables
glemieux Sep 12, 2025
bd50484
move subgrid index types into fatesinterfacetypesmod
glemieux Sep 12, 2025
b4a3edc
move patch_api pointer update inside the do while
glemieux Sep 12, 2025
91e6307
todo comment updates
glemieux Sep 12, 2025
88d0bd4
removed unused indexers
glemieux Sep 12, 2025
c6b3e97
Correct which api has the subgrid indice update.
glemieux Sep 12, 2025
f5d7486
adding comments for next steps
glemieux Sep 12, 2025
e9ada14
add update frequency to the registry variable type and and counters t…
glemieux Sep 17, 2025
8b2f8c3
add filters to the registry api type to provide shorter loops during …
glemieux Sep 17, 2025
09a11c3
update the definteinterface call to pass initialization update freque…
glemieux Sep 17, 2025
61ef4a3
minor formatting changes
glemieux Sep 17, 2025
d3227c8
initialize local variable to avoid implicit save
glemieux Sep 17, 2025
5d34cd5
add registry procedure to update on the variables during initialization
glemieux Sep 17, 2025
3b0a12d
minor move of use statment
glemieux Sep 18, 2025
7cce54d
add api registry pointer in the site type to point back to the interf…
glemieux Sep 18, 2025
5c4e3a5
make the fates interface registry a pointer so that we can point the …
glemieux Sep 18, 2025
3c1fdbe
Rename the patch level type bound registry initialization subroutine
glemieux Sep 18, 2025
40a77f0
Add patch level type bound procedure to initialize the interface vari…
glemieux Sep 18, 2025
6b08515
update the create and init patch subroutines to take in the api point…
glemieux Sep 18, 2025
900f7e3
Update all patch create calls with new site api pointer argument
glemieux Sep 18, 2025
b783675
remove bc and registry at the patch level
glemieux Sep 24, 2025
8c8c904
add bcs to site type and interface registry to site bound bcs
glemieux Sep 25, 2025
00f816d
remove subgrid index passing for eventual deprecation
glemieux Sep 26, 2025
804eafb
add subgrid index data to registry type
glemieux Sep 26, 2025
51d4d60
add variable type array for both fates and hlm data on the registry
glemieux Sep 26, 2025
221e386
remove the site-bound subgrid variables
glemieux Sep 28, 2025
cfbe441
change API to BC for naming consistency
glemieux Sep 28, 2025
1fcc8ed
make the site-level bcs allocatable
glemieux Sep 28, 2025
d863c91
add registry initialization procedure at interface level
glemieux Sep 28, 2025
c6f7027
add procedure to record the hlm subgrid indices for the register
glemieux Sep 29, 2025
dfaa4df
change registry var update subroutine since both hlm and fates variab…
glemieux Sep 30, 2025
7991920
Add a function to get the column index for this registry
glemieux Sep 30, 2025
eac1300
Update registration call at the regsitry level to direct where a vari…
glemieux Sep 30, 2025
22db15f
add number of patches to the interface type associated with the regis…
glemieux Sep 30, 2025
01a267a
add procedure to initialize fates boundary conditions
glemieux Sep 30, 2025
c69f80d
add missing procedure statement for registry initialization
glemieux Sep 30, 2025
9195e24
remove extraneous bc type bound procedures due to simplification
glemieux Sep 30, 2025
718c92c
update the initialize boundary conditions routine in the interface type
glemieux Sep 30, 2025
94f4e25
simplify the site-level initialize boundary conditions call due to ch…
glemieux Sep 30, 2025
41c429c
simplify the registry initialization of the BC variables due to inclu…
glemieux Sep 30, 2025
faa3b39
Revert "Update all patch create calls with new site api pointer argum…
glemieux Sep 30, 2025
f007a19
Revert "initial handover from site-level bc_in to patch level bc_in f…
glemieux Sep 30, 2025
e0deb7c
manually revert the addition of boundary conditions to the patch stru…
glemieux Oct 1, 2025
7a46203
simplify the update interface variables call per combining fates and …
glemieux Oct 1, 2025
a27c161
simplify boundary condition initialization
glemieux Oct 1, 2025
a2ae541
minor reordering
glemieux Oct 1, 2025
422b82e
remove defunct bc_in level registry
glemieux Oct 2, 2025
800140b
update registry initiaization to setup registry for both hlm and fate…
glemieux Oct 2, 2025
bb427e2
add missing topounit index to the registry metadata
glemieux Oct 2, 2025
5378324
update getregistryindex argument to use var type to find index
glemieux Oct 2, 2025
5c105d0
All key array to the registry type
glemieux Oct 2, 2025
2744f45
Revert "update getregistryindex argument to use var type to find index"
glemieux Oct 2, 2025
8d07565
update key/index get functions to use the registry array
glemieux Oct 2, 2025
2852c4f
minor typo fix
glemieux Oct 2, 2025
e441373
add update frequency array to the registry type
glemieux Oct 2, 2025
ce3ed03
add update frequency to the initialization
glemieux Oct 2, 2025
c17e209
unset the allocatable registry variable arrays
glemieux Oct 2, 2025
a6fe6a0
comment updates for registry initialization
glemieux Oct 2, 2025
16e669c
minor typo correctoin
glemieux Oct 2, 2025
e62091a
reorganize the interfact registry initialization
glemieux Oct 2, 2025
5e51c14
simplify the registry index filter name
glemieux Oct 2, 2025
baafded
change index filter in the initialization
glemieux Oct 2, 2025
4b0f8cf
remove unset for character array
glemieux Oct 2, 2025
35e954b
correct update call to reference itself as an input
glemieux Oct 2, 2025
841c8ce
add missing call statement
glemieux Oct 2, 2025
6babece
add procedure statement for initialize BCs to site type
glemieux Oct 2, 2025
f4a1afb
add get column function procedure statement to the registry type
glemieux Oct 2, 2025
a8bfeea
add get site and get fates patch index functions to registry type
glemieux Oct 2, 2025
cfd1294
remove duplicate argument definition
glemieux Oct 2, 2025
648b92b
minor comment update
glemieux Oct 2, 2025
98801e3
move interface registry type filter unset after allocation
glemieux Oct 6, 2025
17ab7cb
move get index before registration call
glemieux Oct 6, 2025
e11a656
add more registry get functions
glemieux Oct 6, 2025
26f8afa
define registry get functions
glemieux Oct 6, 2025
f4df817
update setsubgrid indices to have all optional arguments
glemieux Oct 6, 2025
fba9cf0
update arguments to include fates patches and sites
glemieux Oct 6, 2025
dd54e3e
update interface registry initialization to set hlm patches indices a…
glemieux Oct 6, 2025
daced1b
add fates site initialization procedure
glemieux Oct 6, 2025
99c4c4e
minor comment update
glemieux Oct 7, 2025
1bdd664
add site allocation commented out for later implementation
glemieux Oct 7, 2025
3056548
add unset integer use statement
glemieux Oct 7, 2025
e16504a
fix missing call statements
glemieux Oct 7, 2025
6c05c9c
rename initialize interface registry argument
glemieux Oct 7, 2025
e6a807d
add fates site initialization to procedure statement
glemieux Oct 7, 2025
e3eb283
comment update
glemieux Oct 7, 2025
7c44889
remove the site-bound bc intialize wrapper
glemieux Oct 7, 2025
8357727
avoid allocating a bc if it's already been allocated
glemieux Oct 7, 2025
a95354c
add nlevdecomp_full to the boundary conditions
glemieux Oct 7, 2025
fbd04a2
pass in the bc for the specific patch
glemieux Oct 7, 2025
cbbe3ad
uncomment fates site initialization
glemieux Oct 7, 2025
830f043
minor comment correction
glemieux Oct 8, 2025
cd04b36
add accumulate option to the registry and update procedure
glemieux Oct 8, 2025
ca3f580
move interface registry parameters to its own module
glemieux Oct 8, 2025
6948907
add timestep to the update frequency option for the variables
glemieux Oct 8, 2025
8786bc5
register the boundary conditions assocaited with the litter carbon
glemieux Oct 8, 2025
356c66b
allow the interface variable update to be scaled
glemieux Oct 8, 2025
8dd0500
add interface update procedure specific to the litter fluxes
glemieux Oct 9, 2025
efdae7a
add timestep update to the registry procedures
glemieux Oct 9, 2025
ad1d635
add litter flux carbon filter to the registry
glemieux Oct 10, 2025
ba0d9f0
move initialization of boundary conditions to be a site-bound procedure
glemieux Oct 11, 2025
ee17f6b
add local variable to improve legibility and maintainability
glemieux Oct 11, 2025
67e4515
add local pointers to simplify further
glemieux Oct 11, 2025
3525225
move fluxintolitterpools calculations inside the patch loop
glemieux Oct 15, 2025
cc6acbc
remove the area fraction from the patch-level calculations
glemieux Oct 15, 2025
7daf5a7
remove bcs from the argument as these are now site-level arrays
glemieux Oct 15, 2025
de54e89
add nitrogen and phosphorous interface definitions
glemieux Oct 15, 2025
82b2426
set procedure calls to PascalCase
glemieux Oct 15, 2025
8cc3757
define and register more variables for the litter flux update
glemieux Oct 15, 2025
a7236c6
make interface registry key array private
glemieux Oct 15, 2025
17e2d94
correct update call in litter flux subroutine
glemieux Oct 15, 2025
7acb7ba
update fluxintolitterpool call
glemieux Oct 15, 2025
0de9053
simplify registry call arguments using pointer association
glemieux Oct 15, 2025
2a857cc
add max rooting depth to interface registry
glemieux Oct 15, 2025
5af91a6
register max thaw and calculate max rooting depth based on max thaw
glemieux Oct 16, 2025
9b94bbb
rename interface registry instance for clarity
glemieux Oct 16, 2025
b14bb0a
rename the interface registry type
glemieux Oct 16, 2025
ce9cda9
rename registry definition in the interface type
glemieux Oct 16, 2025
d14176a
add private array to hold the registry index associated with a given …
glemieux Oct 16, 2025
bec6e58
update the site initialization to store the registry associated with …
glemieux Oct 16, 2025
a61494e
Update the boundary condition initialization to utilize the site leve…
glemieux Oct 16, 2025
190da63
minor typo
glemieux Oct 16, 2025
f65b891
typo
glemieux Oct 16, 2025
7666724
Add totalling to the soil bg flux refactor
glemieux Oct 16, 2025
f2886ec
correct litter flux all variable to be a scalar
glemieux Oct 16, 2025
b8b9404
Add N and P litter update call
glemieux Oct 16, 2025
ec8e896
fix accumulate check
glemieux Oct 19, 2025
d115d66
make registry update parameters public now that they have been moved …
glemieux Oct 19, 2025
c7cf513
update get interface registry variable and index names to provide dis…
glemieux Oct 19, 2025
1f0353e
correct procedure type for site type setter and getter
glemieux Oct 19, 2025
d615c44
fix typo for setter call
glemieux Oct 19, 2025
f9686db
move allocate registry index array into its own site loop
glemieux Oct 19, 2025
bde252b
add cnp mode check for bc registration
glemieux Oct 19, 2025
89dfa22
correct missing line continuations
glemieux Oct 19, 2025
b41578f
add missing local definitions in the updateinterfacevariables procedure
glemieux Oct 19, 2025
08d8e19
add missing local definitions
glemieux Oct 19, 2025
1da6921
add updatelitterfluxes to the interface type contains section
glemieux Oct 19, 2025
e006c50
use all fates interface parameters for the bc initialization
glemieux Oct 19, 2025
e6e3604
correct local pointer dimension to be scalar
glemieux Oct 19, 2025
ba28867
make surface_prof allocatable
glemieux Oct 19, 2025
1c1620d
move MIMICS section inside patch loop
glemieux Oct 19, 2025
a6528ac
make the bc_in shorthand an associate statement instead of a pointer
glemieux Oct 19, 2025
6ebb14b
add missing nan usage
glemieux Oct 19, 2025
6f07228
move cnp flex mode use statement to the top of the module
glemieux Oct 19, 2025
0abbe1a
add bc_in initialization type bound proc
glemieux Oct 19, 2025
f55a67b
add bc_out init type bound proc
glemieux Oct 19, 2025
c517869
correct num of litter fluxes name
glemieux Oct 19, 2025
bfdffe4
change litter flux counter to be for all flux types, not just carbon
glemieux Oct 19, 2025
c9824eb
add model timestep variable counter
glemieux Oct 19, 2025
015179b
add C and P variable definitions
glemieux Oct 19, 2025
f3511ab
add missing end if
glemieux Oct 19, 2025
08b30e0
add missing line continuations
glemieux Oct 19, 2025
a2eb3f6
add bc initialization calls
glemieux Oct 19, 2025
543f33f
correct thaw parameter name
glemieux Oct 19, 2025
4578968
remove site-type bound BC initi procedure
glemieux Oct 19, 2025
ce0ce62
move nlevsoil registration earlier and allocate decomp_id using it
glemieux Oct 20, 2025
f97adb5
move nlevsoil registration earlier - delete old location
glemieux Oct 20, 2025
959ada6
remove decomp_id and calculate during initialization in the update pr…
glemieux Oct 20, 2025
18e21d2
removing decomp_id and max rooting depth as registered interface vari…
glemieux Oct 20, 2025
03bb72d
whitespace
glemieux Oct 20, 2025
070ff13
add init update frequency to soil level, decomp variables
glemieux Oct 20, 2025
0c1e317
remove decomp id and add decomp
glemieux Oct 20, 2025
e29f95d
reorder definition calls
glemieux Oct 20, 2025
dccda5d
add rank write statment to comparison procedure
glemieux Oct 21, 2025
f5697c8
remove defunct bc init call
glemieux Oct 21, 2025
d07ec46
add max thaw depth interface definition
glemieux Oct 21, 2025
6ebdb1d
add interface variable dimension initialization procedure and support…
glemieux Oct 21, 2025
4907c1b
correct initialization_local usage
glemieux Oct 22, 2025
536dfe3
set default value for update interface variable optional argument
glemieux Oct 24, 2025
8c1f4b8
unset scalar bc variables during initialization
glemieux Oct 24, 2025
79e324c
white space fix
glemieux Oct 24, 2025
b87e1a7
add checkbounds to interface var type
glemieux Oct 24, 2025
45b9d23
call check bounds
glemieux Oct 24, 2025
fc2eb6d
add check interface variables call for all registries after fates reg…
glemieux Oct 24, 2025
8dafc66
add check interface variables type bound wrapper to interface type
glemieux Oct 24, 2025
e5231bd
correct rank check
glemieux Oct 24, 2025
cb06f41
fix write statements
glemieux Oct 24, 2025
922e109
add dump procedure for diagnostics
glemieux Oct 27, 2025
61de071
add boundary condition filter to registry
glemieux Oct 27, 2025
7998d43
add bc_dir to interface variable metadata
glemieux Oct 27, 2025
04c4fc7
add dump procedure statement
glemieux Oct 27, 2025
888e5b6
add fates patch active status flag for registry
glemieux Oct 27, 2025
99660bb
move the check status out of the initialization
glemieux Oct 27, 2025
218eb04
white space
glemieux Oct 27, 2025
d4bea15
correct typo in argument definition
glemieux Oct 27, 2025
d61c091
whitespace
glemieux Oct 27, 2025
5690505
more whitespace
glemieux Oct 27, 2025
756fb77
adjust order of key update and frequency in interface variable defini…
glemieux Oct 27, 2025
af49ac2
correct associate statement missing line continuation
glemieux Oct 27, 2025
4848053
remove unnecessary bc_in dir argument in call
glemieux Oct 27, 2025
f8aea1d
add missing endrun
glemieux Oct 27, 2025
4d47737
correct assignment statement for bc_in/out counter
glemieux Oct 27, 2025
8af8bec
correct default bc counter update
glemieux Oct 27, 2025
ab1572d
remove defunct local pointers
glemieux Oct 27, 2025
e1ff73b
adding temporary diagnostics
glemieux Oct 30, 2025
f9aa65c
Revert "adding temporary diagnostics"
glemieux Oct 30, 2025
3b20dbf
remove defunct patch type components
glemieux Oct 31, 2025
47d8bf5
fix exact restart issue
glemieux Nov 5, 2025
f2004c1
fix typo
glemieux Nov 5, 2025
dce62fa
add nitrogen and phosphorus to filter size accumulation
glemieux Nov 10, 2025
b2526d2
add checks to avoid nocomp bareground patch
glemieux Nov 10, 2025
623a009
add count check
glemieux Nov 10, 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
3 changes: 1 addition & 2 deletions biogeochem/EDCanopyStructureMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -777,7 +777,7 @@ end subroutine canopy_spread

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

subroutine canopy_summarization( nsites, sites, bc_in )
subroutine canopy_summarization( nsites, sites )

! ----------------------------------------------------------------------------------
! Much of this routine was once ed_clm_link minus all the IO and history stuff
Expand All @@ -793,7 +793,6 @@ subroutine canopy_summarization( nsites, sites, bc_in )
! !ARGUMENTS
integer , intent(in) :: nsites
type(ed_site_type) , intent(inout), target :: sites(nsites)
type(bc_in_type) , intent(in) :: bc_in(nsites)
!
! !LOCAL VARIABLES:
type (fates_patch_type) , pointer :: currentPatch
Expand Down
2 changes: 1 addition & 1 deletion biogeochem/EDPhysiologyMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ subroutine PreDisturbanceLitterFluxes( currentSite, currentPatch, bc_in )
!------------------------------------------------------------------------------------

! Calculate the fragmentation rates
call fragmentation_scaler(currentPatch, bc_in)
call fragmentation_scaler(currentPatch, currentSite%bc_in(currentPatch%patchno))

do el = 1, num_elements

Expand Down
12 changes: 6 additions & 6 deletions biogeochem/FatesPatchMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ module FatesPatchMod
type (fates_patch_type), pointer :: older => null() ! pointer to next older patch
type (fates_patch_type), pointer :: younger => null() ! pointer to next younger patch
type (fates_cohort_vec_type), pointer :: co_scr(:) ! Scratch vector of cohort properties

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

! INDICES
Expand Down Expand Up @@ -296,7 +296,7 @@ subroutine Init(this, num_swb, num_levsoil)
allocate(this%sabs_dif(num_swb))
allocate(this%fragmentation_scaler(num_levsoil))
allocate(this%co_scr(max_cohort_per_patch))

! initialize all values to nan
call this%NanValues()

Expand Down Expand Up @@ -534,7 +534,7 @@ subroutine NanValues(this)
this%scorch_ht(:) = nan
this%tfc_ros = nan
this%frac_burnt = nan

end subroutine NanValues

!===========================================================================
Expand Down Expand Up @@ -732,11 +732,11 @@ subroutine Create(this, age, area, land_use_label, nocomp_pft, num_swb, num_pft,
integer, intent(in) :: num_levsoil ! number of soil layers
integer, intent(in) :: current_tod ! time of day [seconds past 0Z]
integer, intent(in) :: regeneration_model ! regeneration model version

! initialize patch
! sets all values to nan, then some values to zero
call this%Init(num_swb, num_levsoil)

! initialize running means for patch
call this%InitRunningMeans(current_tod, regeneration_model, num_pft)

Expand Down Expand Up @@ -1341,6 +1341,6 @@ subroutine CheckVars(this, var_aliases, return_code)

end subroutine CheckVars

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

end module FatesPatchMod
Loading