This release fixes the NASA POWER requests for sf
objects and several indices. Some results change. Check the items under
CHANGES IN RESULTS before comparing with analyses run on earlier
versions.
rainfall() computes SDII as the rain in wet days (>=
1 mm) divided by the number of wet days, as in Aguilar et al. (2005).
Earlier versions divided the total rain, including days below 1 mm, by
the number of wet days, which overestimated SDII.temperature() returns DTR (diurnal temperature range)
as a decimal number. Earlier versions truncated it to an integer when
timeseries = FALSE.crop_sensitive() reports hts_*,
hse_* and lethal_* as the proportion of days
with data. Earlier versions divided by all days, including days with
missing data. The documentation now says proportion (0 to 1) instead of
percentage.crop_sensitive() assigns cdi_mean to the
daily mean temperature and cdi_max to the daily maximum
temperature (#19, #20). The two were swapped before.array methods of GDD(),
ETo() and late_frost() include the last day of
the data when neither span nor last.day is
given. Earlier versions dropped it.temperature(),
GDD(), ETo(), crop_sensitive()
and late_frost() for sf objects, failed
before. Values are matched to dates and grid cells by name, so a
parameter whose name is part of another (for example T2M
and T2M_MAX) is no longer mixed up. Missing values coded as
-999 are returned as NA.rainfall() for sf objects uses
“PRECTOTCORR” by default. The previous default, “PRECTOT”, is no longer
offered by NASA POWER.sf objects are read with ‘sf’ by
namespace, so ‘sf’ no longer needs to be attached. Polygon centroids are
computed on the geometry only; other columns of the object were mixed
into the coordinates before.GDD() with equation = "c" stops with a
clear message when tbase_max is missing. The documentation
of equation “c” now says that tmax is capped at
tbase_max.rainfall() and temperature() with
timeseries = TRUE stop with a clear message when
intervals is missing or longer than the series.cumrain() and cumdrought() return a vector
of the same length as the input when it has a single value..st_span() requests NASA POWER data up to the last day
actually needed when sites have different start dates and spans.GDD(), of the hse and hse_ms
indices, and of the *.threshold arguments. The Overview
vignette passes tbase to late_frost() (it
passed base, which was ignored). The README example uses
the right dates column.R CMD check (they were excluded in
.Rbuildignore), with new known-answer tests that do not
need the internet.AGENTS.md, a guide for AI agents working on the
package.temperature.data.frame() and
ETo.data.frame() in requesting data from nasapower as the
API cannot handle more than one parameter (TMAX, TMIN)GDD()GDD() and
late_frost()crop_sensitive() to compute crop sensitive
indices.late_frost() to compute late spring
frost.get_timeseries()data.from in get_timeseries()last.day, optional to
span, when indices are retrieved with focus on time series
analysisstats::hclust()print() method for objects that inherits
the class ‘clima_df’pars, mainly for temperature(),
GDD() and ETo(). Details in the function
documentationtemperature() indices provided. Details in the
function documentationGDD() applies two equations adjustments for
cold zones and one for warm zones with the argument
equation. Details in the function documentationGDD() now allows to return the raw daily gdd
or number of days to reach the accumulated gdd (the default in previous
versions) using the argument return.asGDD() arguments. Previous versions used
GDD(object, day.one = NULL, degree.days = NULL, base = 10, span = 150, ...).
From now on GDD() default behaviour is
GDD(object, ..., base = 10), with additional arguments are
passed through ... in each defined method. The function
return by default the accumulated degree-days across the series.modis() and
chirp()R to >= v3.5.0