NEWS
LandR 1.2.0.9002
LANDISDisp() spiral seed dispersal loop ported to C++ via Rcpp
(~3.5–5.7× faster end-to-end depending on input size; ~5× on landscape-scale
fixtures of 9 M cells). Memory use also drops dramatically: the
per-cell-by-species source matrix is replaced with a per-pixelGroup
species bitmask. Bit-identical to the previous R implementation under a
fixed seed — guarded by 196 seed-locked / parity expectations (209 with
LANDR_SLOW_TESTS=1). Default behaviour is unchanged for callers; the new
path is on by default and can be opted out with
LANDISDisp(..., useCpp = FALSE) or
options(LandR.LANDISDisp.useCpp = FALSE). Rcpp (>= 1.0.10) added to
Imports and LinkingTo; digest added to Suggests (used by the
golden-output hash manifest in tests);
- drop support for R 4.2 due to changes in dependency packages;
- remove deprecated package
crayon in favour of cli instead;
- remove deprecated package
qs in favour of qs2 instead;
- move
ggpubr to Suggests;
- add
arrow to Suggests;
- SCANFI and 2020 now default data source and year for stand age and biomass functions;
dropTerm now can deal with random effects better (#105);
prepRawBiomassMap - needed overwrite = TRUE for cases where download was corrupt;
prepRawBiomassMap needs httr2 package as remote site is failing with download.file;
- add functions to visualize vegetation type transitions;
- use
writeTo instead of filename2 in prepInputs() and related calls, following changes in reproducible;
- remove
rasterRead() to use version from reproducible;
columnsForPixelGroups is now a function (i.e., use columnsForPixelGroups() for consistent pixelGroup definitions);
- new function
cohortDefinitionCols() to ensure consistent cohort definitions;
- new function
lccMapGenerator() to calculate landcover classes from cohortData and pixelGroupMap;
- don't delete
CA_forest_VLCE2 raster in prepInputs_NTEMS_LCC_FAO() (#110);
minRelativeB defaults updated based on discussion surrounding over-representation of shade tolerant species establishing and generating unreasonably high levels of understory cohorts;
- add new
prepInputs_NTEMS_DominantSpecies function for importing dominant species layers from NTEMS website;
- add new
speciesPresentFromNTEMS function to import dominant species layer from NTEMS and create factor raster to be hosted on Google drive;
- update
speciesInStudyArea function to create dataSource parameter to direct function to download KNN or NTEMS factor raster from google drive and create associated species list;
- update
prepRawBiomassMap function to allow for incorporation of NTEMS or SCANFI biomass;
- update
prepInputsStandAgeMap function to allow for incorporation of SCANFI age map;
- add
loadSCANFISpeciesLayers and prepSpeciesLayers_SCANFI functions for loading SCANFI species data from Google drive;
- add
adjustAgeToLongevity to adjust initial cohort ages based on longevity for each species;
- add
studyAreaEco function to extend studyArea to ecological boundaries;
studyAreaEco allows studyArea = NULL, uses type = "ecozone" by default;
- update documentation and citations for
prepSpeciesLayers_* functions;
- corrected some BC forestry tree species entries;
- standardized
sppEquivalencies_CA naming convention for provincial forestry columns with <province>_forestry ;
- remove undifferentiated tree species variants from provincial forestry columns in
sppEquivalencies_CA;
plotVTM now does not use Plot internally (with #140);
- several minor updates to
loadSCANFISpeciesLayers, prepSpeciesLayers_SCANFI to address more edge cases;
prepSpeciesLayers_SCANFI updates to improve join sppEquiv so "multiple - to - one" can be used;
- add
plot_raster_stats and calc_raster_counts for generating summaries of numeric rasters in Canada;
- minor bug fixes to
prepInputsFireYear pertaining to file structure of NFDB data;
- improved transition plots, use
arrow datasets to minimize memory use (important for large study areas);
LandR 1.1.5
- use INT2U instead of INT1U when writing rasters in
.overlay() to avoid warning with larger values;
LandR 1.1.4
- fix bug in
vegTypeMapGenerator() when mixedType = 1;
- allow
mixedType = 0 in vegTypeMapGenerator();
LandR 1.1.3
LandR 1.1.2
- delete NTEMS file (24 GB) after use in
prepInputs_NTEMS_LCC_FAO();
- update Quebec PSP column in
speciesEquivalencies_CA;
LandR 1.1.1
- more conversion from
raster to terra throughout;
- remove
gdalUtilities dependency;
- fix bug in
prepInputLCC: orig argument no longer accepted by terra::compareGeom;
- fix bug in
calcSeverityB: output table was missing the proportion of B killed;
- new functions used to estimate maximum biomass (
maxB) and species establishment probabilities (SEP);
- new function to update the
speciesEcoregion table (brought over from Biomass_speciesParameters module), using estimated inflationFactor and mANPPproportion to adjust maxB and maxANPP, respectively;
- new functions to simulate disturbances -
FireDisturbance and FireDisturbancePM pulled from;
Biomass_regeneration and Biomass_regenerationPM modules, respectively;
overlayLCCs() now works correctly with terra (#99);
- fixed partial argument match warnings (#100);
- new function
standAgeMapGenerator() to produce standAgeMap from cohortData;
- new functions
prepInputs_NTEMS_Nonforest() and prepInputs_NTEMS_LCC_FAO();
- add new assertions:
assertSpeciesTable() and assertSpeciesTableRaw();
LandR 1.1.0
- move LandWeb-specific functions to
LandWebUtils package (#86)
Colors -- new function to help with terra migration.
prepInputsFireYear can now handle rasterToMatch that is a SpatRaster
- drop support for R < 4.2 due to change in dependency package
MuMIn (Sept 2022)
- new functions to download a set of default biogeoclimatic variables used across
several modules, and subset data layers from different time periods according to
a year. These functions may only be here temporarily.
- new
raster/terra utility and plotting functions
- new functions related to producing default permafrost input data for modules.
These functions may only be here temporarily.
LandR 1.0.9
- new function:
nonForestedPixels used to detect pixels without species cover or a non-forested land-cover class;
- new function:
prepRawBiomassMap used to create rawBiomassMap;
- new function:
prepRasterToMatch used to create RasterToMatch and RasterToMatchLarge;
LandR 1.0.8
- drop support for R 3.6
prepInputsStandAgeMapcan now accept firePerimeters layer, avoiding inner download if layer is present;
- new assertion (
assertSppVectors) to check that species match between vectors (e.g. tables, colours and species list vector);
- new function
sppHarmonize that deals with the 3 potential ways for a user to input the sim$sppEquiv, P(sim)$sppEquivCol, and sim$sppNameVector;
- update Eliot's email address;
- new functions:
speciesInStudyArea and `species;
- remove undeclared dependency package
Require;
- age imputation in
makeAndCleanInitialCohortData can now be turned off;
- fix bug in
LANDISDisp(): skip dispersal when src or rcv data.tables are empty;
- initial cohort biomass (calculated in
.initiateNewCohorts) can now be a fixed integer or, as before, calculated using the LANDIS-II Biomass Succession Extension v3.2.1 approach (Scheller & Miranda 2015);
- fix bug in
prepInputsFireYear();
- drop single-level factor terms in
statsModel;
LandR 1.0.7
- Several changes to accommodate the tracking and optional removal of pixels;
data suffered data imputation in
Biomass_borealDataPrep;
assertColumns gives better message for which columns are incorrect/missing;
minRelativeBDefaults is now a function so they are more easily accessible ;
statsModel was pulling along with it all the data, 5x. Now it does not. The Caching of this should be fast and small now.
LandR 1.0.5
- Support for refitting
modelBiomass (see Biomass_boreaDataPrep) with scaled data or different optimizer;
- Changes to
loadkNNSpeciesLayers and prepSpeciesLayers_KNN prevent issues when default URL is down, or working offline (but layers are present locally);
- Several changes to accommodate LCC 2010 dataset;
- New columns to
sppEquivalenciesCA (PSP, BC_Forestry and FuelClass);
- Lowered values of dummy
rawBiomassMap;
- passing
fireURL = NULL to prepStandAgeMap() bypasses age imputation;
LandR 1.0.4
- New assertion for validation data;
- New function
sppEquivCheck;
loadKNNSpeciesLayers can accept a sppEquiv table with one column
- Improved documentation for
speciesEquivalencies_CA data;
LandR 1.0.3
- new function to calculate fire severity as biomass loss;
- bug fixes and improvements to to
speciesTableUpdate;
LandR 1.0.2
- Fixes and further speed improvements to seed dispersal functions and general code cleaning;
LandR 1.0.1
- Complete rewrite of
LANDISDisp now (back to) native R. It is about 15x faster than the Rcpp implementation, and much simpler, with about 30% of the number of lines of code. It was inspired by the "spiral" approach as was used in the Rcpp in the pre-1.0.0 version of LandR, but much more efficiently as it is now correctly identifies every pixel outward from a centre pixel using raster::focalWeight, with the maximum of the seeddispersal_max across all species. RAM use appears under control, even for large problems (tested on 50M pixel Raster with 8M potential Source pixels and 500,000 Receiving pixels, with a peak additional RAM of 3 GB during LANDISDisp);
LANDISDisp now accommodates sub-cellSize dispersal distances, using the original Ward Dispersal equation. Previously, the sub-pixel dispersal was treated as if it was starting from the centre of the pixel. So, if less than a full pixel, then very little horizontal transfer. This has the effect that there will be a large increase in horizontal transfer for the species that have small seeddistance_max (i.e., less than cell size);
- add new function
prepSpeciesLayers_ONFRI;
Bugfixes
LANDISDisp did not correctly handle speciesCode when it is a factor. This is a common possibility. It now handles these correctly.
LandR 0.0.5
- new function
updateSpeciesTable (moved from LandWebUtils) to allow user to update species parameters by passing a named list.
LandR 0.0.4
assignLightProb now allows interpolating germination probability between species shade tolerance levels for any given stand shade value. This allows for for decimal values in species shade tolerance traits and greater fine tuning of shade-related germination probabilities.
LandR 0.0.3
- rounding of age classes and biomass now occurs only inside
makeCohortDataFiles, as it is the last thing to do before making cohortData
- rounding of age and biomass has been taken out of 3 other functions --
.createCohortData, makeAndCleanInitialCohortData , and a hard coded bit in Biomass_borealDataPrep
- updated source for kNN databases (now using v1, instead of v0) - this involved changes in the URLs and how the data is downloaded;
statsModel function has a new argument to improve caching with reproducible::Cache (i.e. not used internally);
- function arguments that where previously called
time, are now called currentTime - these changes are matched in LandR Biomass modules
- minor code clean-ups/bugfixes and improved clarity
LandR 0.0.2
- Bug fixes in imports (DESCRIPTION)
- new function
overlayLCCs which will help with overlaying more than one land cover classification raster.
- major revisions to
convertUnwantedLCC to accommodate more cases and eliminate redundant arguments.
prepInputsLCC() now works with "LCC10"