Skip to content

NicheMapR Microclimate Model Release v1.1.4

Compare
Choose a tag to compare
@mrke mrke released this 08 Jun 11:38
· 890 commits to master since this release

This is a rather substantial revision of the microclimate model. The major aspects of this release include:

  1. Fully open source code for the microclimate model under a GPLv3 license.

  2. A Linux binary release (!), with thanks to Rafael Schouten for assistance with this.

  3. 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.

  4. 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).

  5. 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.
  1. 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.
  1. 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).

  2. Changed all real variables in the Fortran code to double precision to reduce integrator error occurrence.