Be notified of new releases
Create your free GitHub account today to subscribe to this repository for new releases and build software alongside 28 million developers.Sign up
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.
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).
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.
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.
This updated version of the microclimate model includes the capacity to use hourly weather data as input, in addition to the original daily min/max approach. The ectotherm model also has an updated and fully operational version of the holometabolus insect Dynamic Energy Budget model and a new option (warmsig) for activity to dependent on a warming signal if animal is in burrow.
This is the first release of the NicheMapR biophysical modelling system, specifically releasing the microclimate model component (the ectotherm model is also in this release together with some other functions but they are not fully documented nor finalised). This release is to be described formally as a software note currently in review. It includes a binary compiled for PC (i386 and x64) and OSX.