Releases: mrke/NicheMapR
NicheMapR v3.3.2
This version fixes two issues.
The first is an issue common to micro_ncep and micro_era5 that emerged since v3.2.1 where, for certain time zones, the process of daily rain allocation to midnight resulted in a wrong-sized rainhr vector causing the runs to fail.
The second issue was that for endoR, a bug was preventing dorsal and ventral differences in fur/feathers from being used and instead the mean was being used.
NicheMapR v3.3.1 Now including leaf temperature calculations, snakey DEB models, torpor and hair raising effects
Leaf temperature
Changes have been made to allow leaf temperature calculations via the ectotherm and ectoR_devel functions. This will be described fully in forthcoming paper but a new vignette 'Leaf Temperature Tutorial' gives a practical overview. The main changes are that evaporation can include contributions from stomata via vectors of hourly stomatal conductance, used if new argument ‘leaf = 1’. The evaporation routines of ectotherm and ectoR_devel now incorporate an equation for parallel conductance of cuticle and stomata, allowing adaxial (facing towards the stem/up) and abaxial (facing away from the stem/down) (Campbell and Norman (1998)'s equation 14.1).
With the ectotherm function, leaf thermoregulatory behaviour can be invoked by setting ‘leaf = 2’, in which case stomata are progressively opened to the value specified by arguments ‘g_vs_ad_max’ and ‘g_vs_ab_max’ to avoid the upper temperature limit specified via the ‘CT_max’ parameter.
DEB starvation and fixed prey size
This release includes updates on starvation options in DEB models. These options are driven by the argument ‘starvemode’, which determines how reproduction buffer is used during starvation: 0 means it is not used, 1 means it is used before structure is mobilised and 2 means it is used to maximise reserve density.
For the ectotherm model, code has been added to handle organisms that feed on prey of a fixed size (e.g., snakes) via DEB theory. Specifically, by setting the new argument ‘foodmode’ to 1, the input food vector X is treated as an absolute input to the stomach (in joules) to simulate single-sized prey items for gape-limited predators. Intake is capped to multiples of prey size up to the max energy capacity of the stomach (the default setting foodmode = 0 assumes X is food density in J/cm2, as before). As part of this change, the food (and water) input vector for running the DEB model in the ectotherm function is now hourly rather than daily.
Maturity at oviposition in DEB models
A new parameter E_Ho (maturity at oviposition) and associated code has been added to the DEB model in the ectotherm model which determines when oviposition happens, thereby allowing a continuum from full oviparity to full ovoviviparity. Placental viviparity is not yet implemented.
Piloerection, torpor and an additional thermoregulatory mode in the endotherm function endoR
Cold birds and mammals fluff their feathers/fur, a response known as ptiloerection in birds and piloerection in mammals. This can be simulated with endoR via the new parameters PZFUR, ZFURD_MAX and ZFURV_MAX (even though these are called ‘fur’ they are relevant for feathers too). The PZFUR (value between 0 and 1) is the fraction by which the fur depth decreases as piloerection becomes unnecessary. The PZFUR parameter makes piloerection happen if its value is greater than zero, resulting in the animal starting with ZFURD at ZFURD_MAX (and same for ZFURV). As the animal becomes warm, the depth of the fur is reduced by PZFUR * LHAIRD. The value of ZFURD_MAX can not, of course, be larger than the length of the hairs, LHAIRD. The ‘treg’ output dataframe now includes Z_FUR_D and Z_FUR_V outputs, showing how fur depth changed during the simulation.
Two new thermoregulatory modes, set via TREGMODE = 0 and TREGMODE = 2 have been introduced to the endoR function. TREGMODE = 0 invokes a torpor response. Rather than the model solving for the metabolic rate that balances the heat budget, it instead continues to reduce core temperature to balance the heat budget until either the environment won’t permit body temperature to go any lower or until the value of core temperature reaches the lower limit, specified by the new parameter TC_MIN. As the core temperature drops, metabolic rate drops as a function of the Q10 parameter. If the environment becomes sufficiently cold, metabolic rate will rise to defend this TC_MIN.
TREGMODE = 2 results in core temperature rising simultaneously with panting. In TREGMODE = 0 all responses happen in series, and core temperature rose to the maximum first before panting commenced. However, often TREGMODE = 2 leads to more realistic responses, especially for birds. You can make your own bespoke response for your organism by modifying endoR_devel.
Convective enhancement factor
A convective enhancement factor has been added to the ectotherm and endotherm models, ‘conv_enhance’. It can account for enhanced turbulent convection in outdoor conditions compared to what is measured in wind tunnels (see Kolowski & Mitchell 1976 https://doi.org/10.1115/1.3450614 and Mitchell 1976 https://doi.org/10.1016/S0006-3495(76)85711-6). Default value is 1, i.e. no effect, but Kolowski & Mitchell recommend 1.4.
Other changes, fixes and improvements
Microclimate model
- added code to properly handle leap years in micro_ncep and micro_era5 when working with terraclimate climate change scenarios
- a new parameter ‘moiststep’ allows user control over how fine a timestep the infiltration model in the microclimate model runs (default is 360).
- slight tweak to how the 'warm' argument is treated so that hourly offset values can be sent to micro_era5
- clearsky option now included in micro_era5 and micro_ncep
- fixed issue where rainhourly was not set to 1 after distributing at midnight if save = 2; also altered midnight distribution of rainfall so that 1/3 falls at midnight and 1/3 on the hour either side, to reduce the chance that the integration fails
- fixed issue in microclimate model where reference height was not being used as air node 1 (so was always assuming reference height was 2m), and also correcting an issue where air node 3 was not able to be below 0.5 cm
- added functionality to micro_usa and micro_aust to output diffuse radiation fractions via microclima-based internal calcs
Ectotherm models
- a change was made to the ectotherm model to avoid 'burrowing' when the minimum soil node/depth (argument ‘mindepth’) option is set to the surface (‘mindepth = 0’). Burrowing can still occur to escape thermal extremes if the value of ‘maxdepth’ is greater than 0
- added dynamic heat production for onelump_var and twolump, and added the option for fluid to be water option for transient heat budgets (so diving turtles can be simulated)
- prevent egg exchanging water when retained in mother (DEB model on, viviparous = 1, E_H < E_Ho)
- fixed error found in calculations of geometry for a cylinder in GEOM_ecto and GEOM.f
- made ectoR_devel compute solar with body remaining oriented to track sun if postur = 1 but not otherwise (consistent with the live = 1 setting of the ectotherm model)
- added a new possible value for argument 'LIVE' in the ectotherm model, 'LIVE=2', which acts the same as when 'LIVE=1' but doesn't do postural adjustments to maximise/minimise solar gain
- added extra step in ellipsoid calcs in GEOM_ecto.R to ensure AL is the shortest dimension
- added option to orient shapes (plate, cylinder, ellipsoid) by 90 degrees (e.g., to put a cylinder upright on its circular edge) as far as silhouette areas go, via new input argument 'orient', and also to allow exposure to the different silhouette areas while tracking the sun or not
Dynamic energy budget models
- an error was corrected in DEB models where digestion efficiency wasn't being taken into account when checking how much energy in the food could be used for assimilation
- an issue was fixed in the ectotherm DEB model to make the variable clutch size with length option (‘clutch_ab’ input argument) work properly and a new input argument ‘maxclutch’ was included to put a cap on this relationship
- fixed p_T calculation in R DEB models to account for changing step size
General
- added 'get_pressure' function to package which computes pressure from elevation
- allowing characteristic dimension for ellipsoids to be based on second semi-major axis if this is smaller than the cube root of volume
What's Changed
- Small edit to help with stack issues by @TraciPopejoy in #21
- handle infinite rain as well as NA rain by @goldingn in #24
New Contributors
- @TraciPopejoy made their first contribution in #21
- @goldingn made their first contribution in #24
Full Changelog: 3.2.1...v3.3.1
NicheMapR v3.2.1 - Now including a modularised version of the ectotherm model, improved dew and frost calculations, links to terraclimate historical and future scenarios, and functions for computing liquid water exchange with soil for ectotherms and their eggs
This release includes some substantial additions and improvements:
A modularised ectotherm model - ectoR_devel
The ectotherm heat budget calculations have been modularised in a series of new functions used by the master function 'ectoR_devel' which is similar in usage and approach to endoR_devel. It doesn't include any behaviour, the transient heat budget calculations, or the Dynamic Energy Budget models etc. of the 'ectotherm' function, just the heat budget and associated evaporative water exchange from respiration and the skin. It is fully in R based on R conversions of the relevant Fortran code from 'ectotherm'. It will be useful for learning and teaching the model, testing its behaviour, and for the development of customised behavoiural routines and integrations with metabolic theory.
Here is the full list of new functions that ectoR_devel uses:
GEOM_ecto (calculates biophyiscally relevant surfaces, volumes and dimensions)
SOLAR_ecto (calculates incoming solar)
RADIN_ecto (calculates incoming long-wave radiation)
RADOUT_ecto (calculates outgoing long-wave radiation)
CONV_ecto (calculates convective exchange and heat/mass transfer coefficients)
COND_ecto (calculates conductive heat exchange - very simply)
SEVAP_ecto (calculates cutaneous evaporative heat and water loss)
MET_ecto (calculates metabolic heat via allometry)
RESP_ecto (calculates respiratory heat and water exchange)
WATERPROP (calculates thermal properties of water)
FUN_ecto (computes the full heat budget for a given body temperature, used with a guessing algorithm (e.g. uniroot in R) to find a body temperature that balances the heat budget)
Improved calculations of dew and frost
This release also includes updated code in the microclimate model for computing dew and frost, where the amount in mm forming per hour is now calculated rather than presence/absence, using the formulation of Garratt and Segal (1988).
New capability for computing liquid and gaseous water exchange, and modelling egg development
This release includes new functionality for predicting heat and water exchange of developing eggs and water exchange in general. A major aspect of this is a new R function 'egg_water' which is incorporated into the ectotherm model as 'DGET_PSI.f', which computes simultaneous exchange of water as liquid (driven by water potential gradients) and gas (driven by vapour density gradients). The vapour exchange calculation has been expanded by allowing specification of the water potential of the organism, which can allow uptake of water vapour under high humidity when the solutes of the body reduce the vapour density at the surface of the organism to below that of the surrounding air. To allow egg temperature to be predicted in the soil, the microclimate model now produces outputs for bulk thermal conductivity. Bulk specific heat capacity and bulk density are also provided as outputs. The DEB model calculations have been expanded to improve heat production calculations (see below) which are important for egg water exchange, and the water budget has been more tightly linked to the DEB stoichiometric calculations. Full details are provided in Kearney and Enriquez-Urzelai (2022).
Connections to terraclimate
The release also includes the micro_terra function to connect to the terraclimate monthly climate database at ~4km res across the globe from 1958 to present (Abatzoglou et al. 2018). A function called 'get_terra' has been added which retrieves the required data via opendap or locally. The terraclimate data set includes climate change scenarios of +2 and +4 deg C. Code has been added to the 'micro_ncep' and 'micro_era5' functions to apply these terraclimate climate change scenarios to their predictions.
The 'micro_era5' function, integrating the powerful ERA5 historical weather data set, was added to the package prior to the last release but has been formally described and tested the recent paper in Methods in Ecology and Evolution, found here.
Other changes, fixes and improvements
The following issues were also addressed:
Microclimate model
- added code to 'micro_era5' to ensure rain falls at midnight irrespective of where midnight falls relative to UTM-based input data
Endotherm model
- fixed an error that crept in after the 'PANT_MULT' variable was changed to being an actual multiplier, which was causing panting metabolic costs to be subtracted rather than added
- passing zenith angle into the 'GEOM' function for silhouette area calculations
- removing redundant (and incorrectly functioning) 'TIMACT' because all multipliers on metabolic rate for activity etc. should be applied to 'QBASAL'
- ensured decimal points for all whole numbers throughout Fortran code - this was causing incorrect output after the transition to R v4.2 (compiler behaviour is mysterious)
Ectotherm model
- changed the calculation of the convection coefficient (and mass transfer coefficient) in the ectotherm model from summing the free and forced values to weighting them via a combined Nusselt number using Bird, Stewart and Lightfoot's (2002, p. 445) mixed convection formula. This was also changed in the transient heat exchange functions 'onelump', 'onelump_var' and 'twolump'. This would have slightly overestimated the total convection under mixed or free convection conditions
- added user specification of the soil and sky emissivity to the ectotherm model, these previously being assigned values of 1 by default
- related to the previous change, the emissivity environment (sky and ground) is set to 1 if the organism is below ground
- removed limitations on the minimum body temperature (previously there for stability purposes), including the limit of 0 deg C for the live = 0 scenario
- allowing hourly varying air pressure to be given to the ectotherm model
- allowing vapour pressure at the skin/egg surface to be driven by body water potential and hence to have potentially lower than saturation vapour pressure (and thus permitting water uptake as vapour when the integument is highly permeable and environmental humidity high)
DEB model heat production
- in all DEB functions, including those in the ectotherm model, heat production calculations are updated so that they are based on enthalpies rather than Gibbs energies, using an empirical relation between stoichiometry and enthalpy, to be described in a future paper led by Marko Jusup
- fixed an issue in how the reproduction and batch buffers were drained during starvation in the DEB models, which was preventing them from being fully depleted
R version of 'gads' (global aerosol database)
- adding the R function gads and thus the option to run GADS outside of the microclimate model because the Fortran version crashes on some OSX system due to an inexplicable segfault when the data tables are read
- also fixing issues in the original gads.f that led to erroneous results or crashes at some sites
References
Abatzoglou, J. T., Dobrowski, S. Z., Parks, S. A., & Hegewisch, K. C. (2018). TerraClimate, a high-resolution global dataset of monthly climate and climatic water balance from 1958–2015. Scientific Data, 5(1), 170191. https://doi.org/10.1038/sdata.2017.191
Bird, R. B., Stewart, W. E., & Lightfoot, E. N. (2002). Transport Phenomena (2nd ed.). Wiley and Sons.
Garratt, J. R., & Segal, M. (1988). On the contribution of atmospheric moisture to dew formation. Boundary-Layer Meteorology, 45(3), 209–236. https://doi.org/10.1007/BF01066671
Kearney, M. R., & Enriquez‐Urzelai, U. (in press). A general framework for jointly modelling thermal and hydric constraints on developing eggs. Methods in Ecology and Evolution.
Klinges, D. H., Duffy, J. P., Kearney, M. R., & Maclean, I. M. D. (2022). mcera5: Driving microclimate models with ERA5 global gridded climate data. Methods in Ecology and Evolution https://doi.org/10.1111/2041-210X.13877
NicheMapR v3.1.0 - Now including an official release of the endotherm model
This is the official release of the endotherm model of NicheMapR, timed with the publication of the accompanying software note in Ecography:
Kearney M. R., Briscoe N. J., Mathewson, P. D. & Porter W. P. (2019) NicheMapR - an R package for biophysical modelling: the endotherm model. Ecography 43: 1-11. doi: 10.1111/ecog.05550
It includes major corrections to the equations for conduction from the previously released version, with the vignette describing all the equations in the model updated accordingly along with some other minor corrections.
It also rectifies an error that crept in to version 3 of NicheMapR's ectotherm model, whereby the egg batch buffer in the DEB model was filling faster than it should have been.
NicheMapR v3.0.0
This is a major update on the NicheMapR package, being an official release of the transient heat budget models (i.e. accounting for mass-related heating lag) in the form of the functions 'onelump', 'onelump_var', 'twolump' and the 'trans_behav' alogorithm. It also includes a fully open source version of the endotherm model. The release is timed with a forthcoming paper in Methods in Ecology and Evolution on the transient thermoregulation model.
Ectotherm and DEB model updates
The 'onelump' transient heat budget algorithm has been incorporated into the ectotherm function and is run when the parameter 'transient' is set to '1' (but it does not incorporate behaviour at present). The ectotherm function also now includes the 'powers' from the DEB model, i.e. energy flows for food intake, assimilation, mobilisation, maintenance, growth, reproduction/maturation, egg batch buffer, maturity maintenance, and dissipation (p_A, p_C, p_M, p_G, p_R, p_B, p_J, p_D, respectively). This can be useful for analysing the energy budget. The DEB parameter F_m (maximum food encounter rate) was previously an input but really it should have been p_Xm (maximum food energy intake rate), which has now been corrected.
Endotherm model
An issue with the longwave heat loss calculation was resolved in this version and a new vignette providing a full derivation and explanation of the model has been added. Also, some code causing a preemptive increase in core temperature for high air temperatures relative to body temperature was removed from the standard behavioural algorithm. The model is now fully open source and the endoR_devel function runs much faster than before as a result of all the code being in the NicheMapR dynamic link library.
NicheMapR v2.0.0 - Now including an official release of the ectotherm model
This is a major update on the NicheMapR package, being an official release of the ectotherm model and associated Dynamic Energy Budget model scripts as well as introducing some major improvements to the microclimate model and including a beta version of the endotherm model. The release is timed with two publications on the package as indicated below. There is now also a website for the package:
The Fortran code is now open source (except for aspects of the endotherm model, for the time being) and the whole package has been set up to compile the underlying Fortran code for the microclimate and ectotherm models on installation from github.
Microclimate model updates:
- The micro_ncep function is now included, which integrates with the recently released microclima package https://github.com/ilyamaclean/microclima, as well as the RNCEP package https://CRAN.R-project.org/package=RNCEP and elevatr package https://CRAN.R-project.org/package=elevatr to allow estimates of historical microclimates anywhere in the world, as described in this paper:
Kearney M. R., Gillingham P. K., Bramer I., Duffy J. P. & Maclean I. M. D. (2019) A method for computing hourly, historical, terrain-corrected microclimate anywhere on Earth. Methods in Ecology and Evolution.
-
The micro_usa function is finalised, which connects to the gridMET ~4km USA climatology (see Kearney, M. R. (2019). microclimUS: hourly estimates of historical microclimates for the United States of America with example applications. Ecology, 0(ja), e02829. doi:10.1002/ecy.2829).
-
The RnetCDF package is now used in place of ncdf4, which has the big bonus of allowing opendap connectivity on all platforms (ncdf4 wouldn't do this for Windows, although this has recently been rectified by pmjherman https://github.com/pmjherman/r-ncdf4-build-opendap-windows). This means you can set 'opendap =1' in micro_aust and micro_usa and you can web-query the weather grids of AWAP and gridMET, respectively.
-
All the microclimate functions (micro_global, micro_ncep, micro_aust, micro_usa, micro_nz, micro_uk) are set to use the SoilGrids database as an option for extracting textural and bulk density data from which hydraulic properties are derived (set 'soilgrids = 1').
-
An additional approach to computing the vertical air temperature profile has been added (in collaboration with Paul Mathewson), based on equations in Campbell, G. S., & Norman, J. M. (1998). Environmental Biophysics. New York: Springer. It can be invoked by making tne new parameter ZH greater than zero and explained further in the relevant help files and vignettes.
-
The global climate data set (global.climate.zip) is now provided as part of the release and the get.global.climate downloads it from here.
Ectotherm model
- Although a beta version of the ectotherm model has been part of the package since its inception, it is now officially released with Fortran source included. The model is described in this software note:
Kearney M. R. & Porter W. P. (2019) NicheMapR - an R package for biophysical modelling: the ectotherm and Dynamic Energy Budget models. Ecography. doi 10.1111/ecog.04680
-
Compared to the earlier versions, the release version has some revisions to the naming of parameters for improved consistency, especially in regard to the Dynamic Energy Budget (DEB) model terminology. There is also improved and updated documentation including a revision of the vignette 'ectotherm model tutorial' and a new 'DEB model tutorial'. The DEB model functionality is also described in the software note mentioned above.
-
The DEB functionality has been improved by including the DOPRI5 integrator to do the integration through time (before a simple Euler method was used, and this option is still available), and the DEB models that can be run now include the standard model as before, but also the abj, abp and hex models (see http://www.debtheory.org/wiki/index.php?title=Typified_models). There are now also DEB R scripts for running the std, abj and abp DEB models independent of the ectotherm model. Code has been included to allow DEB model parameters to be passed directly from the DEB parameter database (now >2000 species), as explained in the 'DEB model tutorial' vignette.
Endotherm model
There is now a working beta version of the general endotherm model developed by Porter and colleagues over many years. This version is explained in two vignettes now included in the package and will be undergoing a number of updates over the next few months before being finalised. These updates will largely be cosmetic and the overall algorithm will remain unchanged. A software note will be produced explaining the model in detail.
NicheMapR Microclimate Model Release v1.1.4
This is a rather substantial revision of the microclimate model. The major aspects of this release include:
-
Fully open source code for the microclimate model under a GPLv3 license.
-
A Linux binary release (!), with thanks to Rafael Schouten for assistance with this.
-
Functionality to query the SoilGrid database for soil moisture related properties. You'll need to install GSIF and I've had trouble getting this to work on OSX and Ubuntu. See: http://gsif.isric.org/doku.php/wiki:tutorial_soilgrids - if you can get the "REST service for SoilGrids" example going on this page it will work in the microclimate functions. If not you'll have to specify the soil moisture property vectors (PE, KS, BB, BD) manually.
-
A replacement of all references to 'Julian days' with 'Day of Year' (DOY), since technically the former is the number elapsed days since noon on Monday, January 1, 4713 BC (thanks to Tim McVicar for pointing this problem out).
-
Some substantial revamps to the snow algorithm after extensive testing, including:
- snow density functions now based on days since snow, rather than DOY, and I have kept the original option for a linear function but also added capacity to include the four-parameter exponential function of Sturm et al. 2010 which includes snow depth as a factor too;
- a new output column in metout/shadmet for snow density so that snow water equivalent can be easily computed;
- fixed an issue with the way the model captures the phase transition between water and ice in both the snow pack and in the soil, that became apparent when running the model in very cold USA environments - it had a very large impact on soil temperatures, especially their tendency to stabilise near zero degrees C under the snow pack;
- added heat of fusion to the soil/snow heat budget for when snow is refreezing;
- the model cannot stably handle snow depths below 2 cm, so added code to save small snow falls until they can make it up to the 2 cm minimum threshold;
- fixed an issue with relative humidity in the shade at local height not being set properly and possibly exceeding 100%;
- ensured hourly rainfall forcing data was being used correctly for snow, making sure the melt factor was applied per hour at 1/24th the intensity;
- infiltration of water into soil under snow now only happens when snow temperature greater than zero (before it was erroneously happening whenever snow was present);
- made output for soil surface temperature always equal to that of the soil (not the snow skin, as was the case in the previous releases;
- included both shaded and unshaded snow pack temperature profiles in the output.
- Some features to avoid excessive message output from the Fortran program and to kill the simulations if they are getting stuck in an endless loop:
- added the argument 'message' to suppress integrator messages when it is forced to restart the integration;
- added argument 'fail' which specifies the upper limit for integrator restarts before quitting to stop situations where there can be endless loops - if the model failed there will be zeros in all rows of the output files from where the problem occurred.
-
Some new functions are also included for running the microclimate model via daily forcing data from the NZ NIWA data set, the UK CHESS data set and the USA gridMET data set. The latter two can use opendaps to directly query the online data. Also, there's an opendap connection to the Australian AWAP/AGCD data from 1990-2015. Note that these opendap connections require the 'ncdf4' package which, for Windows, doesn't support opendaps. But, you can install from the compilation at https://github.com/pmjherman/r-ncdf4-build-opendap-windows and it should work. The examples for micro_usa and micro_aust should run fully from opendap connections to the respective weather data sets (with micro_aust assuming constant wind speed as there is as yet no opendap connection to daily wind grids).
-
Changed all real variables in the Fortran code to double precision to reduce integrator error occurrence.
NicheMapR Microclimate Model
This new release includes a couple of corrections and some additional features.
One correction is to the soil moisture algorithm. The value in Campbell's program 11.1 for VP (saturation vapour density) is fixed at the value for 20 degrees C and this was copied into the microclimate model code. However, it should vary with temperature and this correction has now been made (using the WETAIR function internal to the microclimate model). It will affect near surface (<5 cm) soil moisture calculations in particular.
The other correction relates to the emissivity value for the substrate, SLE (soil long wave emissivity) which had been erroneously hardwired at a value of 0.9 in the Fortran code but was meant to be accessible to the user to change. This is now fixed (most substrates have an emissivity between 0.9 and 0.95).
The additional features are to make the following parameters from the soil moisture model available to the user to alter: root radius, resistance per unit length of root and leaf, critical leaf water potential for stomatal closure, stability parameter for stomatal closure equation, maximum allowable mass balance error for soil moisture, maximum iterations for mass balance of soil moisture.
Also, the wavelength-specific solar radiation can now be outputted if required, with the option to undertake a more intensive calculation of the UV wavelengths if desired.
Finally, the model output now includes the snow temperature profiles in the sun and the shade (sunsnow and shadsnow) as well as plant outputs from Campbell's Program 11.1 (transpiration rate, leaf and root water potentials in the output matrices plant and shadplant).
NicheMapR Microclimate Model
This version now has scope to include hourly zenith angles to account for cases where the starting hour is not midnight (in which case you must pre-compute the zenith angles and provide them as input rather than having them be computed automatically via the solar radiation routines). There are also some minor typographical corrections to the "Microclimate Model Theory and Equations" vignette.
NicheMapR Microclimate Model
This version has a minor update to the way downward IR from cloud is computed (previously assumed cloud base temperature was the same as screen temperature but now using screen temperature - 2 deg C on advice of Warren Porter). It also fixes an issue that prevented the SCAN example dataset from being incorporated into the package.