Open rgknox opened 2 years ago
Proposed name of namelist switch:
fates_history_density_level = integer
1 - fastest, no high frequency (sub-daily) history writing, only variables that are updated daily 2 - typical, include high frequency history output (sub-daily), but no large arrays such as those with leaf-layer 3 - slowest, include history output that is written at high frequency and those variables with large arrays
We could also in the future extend this. For instance, if we want no multi-dimensional arrays in the daily dynamics history output (ie faster than fastest), then we could use code zero.
Below is a list of some large arrays (that use nlevleaf) on the patch structure, and a description of how the memory is used. Note that the first 6 arrays are calculated in one location and used in another location, which demands a genuine need to remember the values. But the other 16 really don't need to be remembered. One or two we just don't use, a couple can be recreated from other arrays on demand, and most of them are used in history diagnostics. If we move the calls to update history diagnostic arrays to the location where these arrays are defined, then we don't need to have these arrays on the patch structure.
Also, we can avoid the memory and computation costs of reading/writing these large arrays if we add in a namelist switch that defines if we want leaf-layer output included in history. The majority of users do not need such high density output.
Also, the allocations that we do need could save space by using dynamic allocations that use "numpft" instead of "maxpft". maxpft is always 16, but many users have only 1 pft. Our global tests only use 12.