microclimaforNMR | R Documentation |
Extract NCEP data and run microclima for use with NicheMapR
microclimaforNMR(
lat,
long,
dstart,
dfinish,
l,
x,
coastal = TRUE,
hourlydata = NA,
dailyprecip = NA,
dem = NA,
demmeso = dem,
albr = 0.15,
resolution = 100,
zmin = 0,
slope = NA,
aspect = NA,
horizon = NA,
svf = NA,
difani = TRUE,
windthresh = 4.5,
emthresh = 0.78,
reanalysis2 = FALSE,
steps = 8,
use.raster = TRUE,
plot.progress = TRUE,
tidyr = FALSE,
weather.elev = "ncep",
cad.effects = TRUE
)
lat |
the latitude (in decimal degrees) of the location for point data are required. |
long |
the longitude (in decimal degrees) of the location for point data are required. |
dstart |
start date as character of time period required in format DD/MM/YYYY (UTC timezones assumed) |
dfinish |
end date as character of time period required in format DD/MM/YYYY (UTC timezones assumed) |
l |
a single numeric value of the leaf area index for location (see details). |
x |
a single numeric value representing the ratio of vertical to horizontal projections of leaf foliage for the location (see details). |
coastal |
an optional logical value indicating whether to calculate coastal effects using |
hourlydata |
an optional data frame of ourly weather and radiation data as returned
by function |
dailyprecip |
an optional data frame of ourly weather and radiation data as returned
by function |
dem |
an optional SpatRaster object of elevations covering the location for which point data are required. If not provided, one is downloaded from the registry of Open Data on AWS. Used to calculate coastal, wind and radiation effects |
demmeso |
an optional SpatRaster object of elevations covering the location for which point data are required. Used to calculate elevation and cold air drainage effects. |
albr |
albedo of ground surface from which radiation is reflected (see details) |
resolution |
the resolution (in metres) of the dem used for downscaling (see details). |
zmin |
assumed sea-level height. Values below this are set to zmin (see details). |
slope |
an optional slope value for the location in decimal degrees. If not specified, then the slope is calculated from the retrieved dem. |
aspect |
an optional aspect value for the location in decimal degrees. If not specified, then the slope is calculated from the retrieved dem. |
windthresh |
an optional threshold wind value (m /s) above which cold air drainage is assumed not to occur |
emthresh |
an optional threshold emissivity value above which cold air drainage is assumed not to occur |
reanalysis2 |
Logical. Should data be obtained from the Reanalysis II dataset (default) or from Reanalysis I (data prior to 1979). |
steps |
an optional integer. Coastal effects are calculated in specified directions upwind. Steps defines the total number of directions used. If the default 8 is specified, coastal effects are calculated at 45º intervals. |
use.raster |
an optional logical value indicating whether to mask the output values by |
plot.progress |
logical value indicating whether to produce plots to track progress. |
tidyr |
logical value indicating whether to download 30m resolution digital elevation data. |
weather.elev |
optional value indicating the elevation of values in |
cad.effects |
optional logical indicating whether to calaculate cold air drainage effects (TRUE = Yes, slower. FALSE = No, quicker) |
The package NicheMapR
(Kearney & Porter 2016), includes a suite of
programs for mechanistic modelling of heat and mass exchange and provides a
time-series of hourly estimates of above- and below‐ground conditions. It has the
significant advantage over microclima
in that it works entirely from first
principles does not require measurements of temperature for calibration, but does
not explicitly model elevation and cold-air drainage effects. The slope, aspect
and canopy effects must be specified by the user, and their effect on radiation
are more simplistically modelled than by microclima
.
a list with the following objects:
(1) hourlydata: a data frame of hourly climate data from NCEP,
as returned by hourlyNCEP()
.
(2) hourlyradwind: A data frame with seven columns:
(i) swrad
: total downward shortwave radiation as a funcion of slope, aspect and
canopy shading (MJ m-2 hr-1)
as returned by shortwaveveg()
.(ii) skyviewfact
: a topographic sky view correction factor
as returned by skyviewveg()
. (iii) canopyfact
a canopy shading factor weighted by the ratio of direct to diffuse radiation.
(iv) whselt
: a ground level wind shelter coefficient as returned by
windcoef()
. (v) windspeed
: wind speed (m /s) at 2 m, corrected for topographic
sheltering. (vi) slope
: the slope (decimal degrees) of the location specified
by lat
and long
. Either the same as that input, or determined from dem
.
(vii) aspect
: the aspect (decimal degrees) of the location specified by lat
and
long
. Either the same as that input, or determined from dem
.
(3) tref
: a dataframe with five columns (i) tref
the reference temperature, derived from
NCEP data. (ii) elev
the elevation of the location. (iii) elevncep
: the mean elevation
of the 2.5º grid cell corresponding to that from which NCEP data were derived. (iv)
telev
the expected difference in temperature due to elevation, calculated by
applying lapserate()
. (v) tcad
the expected difference in temperature due to cold
air drainage effects, determined using pcad()
and cadconditions()
.
(4) dailyprecip
a vector of daily rainfalls derived from NCEP.
(5) acoast
an array of temperatures that account for coastal effects for each
pixel of dem
and each hour of hourlydata.
(6) basins
a SpatRaster object of basins used for calculating cold air drainage.
(7) flowacc
a SpatRaster object of accumulated flow.
Kearney MR, Porter WP (2016) NicheMapR – an R package for biophysical modelling: the microclimate model. Ecography 40: 664-674.
Function get_dem()
for retrieving digital elevation data and
hourlyNCEP()
for retrieving and processing hourly data from NCEP and
coastalNCEP()
for retrieving and processing coastal effects.
mnr <- microclimaforNMR(50, -5.2, '15/01/2015', '15/02/2015', 1, 1, coastal = FALSE)
head(mnr$hourlydata)
head(mnr$hourlyradwind)
head(mnr$tref)
head(mnr$dailyprecip)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.