Releases: zyf0717/HeatStressR
Releases · zyf0717/HeatStressR
Release list
HeatStressR 2.3.0
HeatStressR 2.3.0 improves maintainability, parallel execution, aggregate API ergonomics, and scientific preprocessing transparency.
Highlights
- Centralizes Liljegren forcing, status, dewpoint-policy, and humidity preprocessing across local and PSOCK execution paths.
- Replaces
foreach/doParallelbackend manipulation with cross-platform baseparallel::parLapply()PSOCK workers and removes both package dependencies. - Makes
heat_indices(tas, hurs)select the five indices supported without wind while preserving the existing seven-index default when wind is supplied. - Adds row-level
wind_clamped,radiation_clamped,radiation_zeroed_below_horizon, anddewpoint_adjusteddiagnostics. - Preserves legacy public argument order, output structure, NA alignment, dewpoint semantics, and established numerical tolerances.
Validation
The merged release commit passed the complete R CMD check matrix on Linux, Windows, and macOS, including R 4.1, release, oldrel, and devel.
This release is currently available on GitHub only and has not been submitted to CRAN.
Full changelog: v2.2.1...v2.3.0
HeatStressR 2.2.1 — First CRAN Release
- Examples completing within five seconds are now unwrapped and run as
ordinary examples. - Remaining executable long-running examples now use
\donttest{}instead of
\dontrun{}.
Available on CRAN: HeatStressR 2.2.1
HeatStressR 2.2.0
Added
heat_indices()calculates multiple requested non-Liljegren indices from
aligned observations, reusing shared validation and vapour-pressure work.
wbgt.Bernardis available as an explicit opt-in when dew point is supplied.- Reproducible benchmarks cover optimized non-Liljegren paths across cool,
mixed, and hot inputs from 1 through 1,000,000 rows.
Changed
wbgt.Bernard()uses a vectorized, bracketed bisection solver in place of
onestats::optimize()call per valid row. Its public arguments and
preprocessing behavior are unchanged.hi()evaluates the Rothfusz polynomial only for rows where it applies.
It now returns degrees Celsius, matching its Celsius input and the rest of
the package. To reproduce a previous Fahrenheit result, use
hi(tas, hurs) * 1.8 + 32.- Shared vapour-pressure work and small vector-allocation improvements reduce
repeated computation in closed-form indices. Existing exported function
names, formal arguments, positional calling conventions, and legacy
unequal-length behavior oftashurs2vap.pres()anddewp2hurs()are
retained.
End-to-End Parallel Liljegren WBGT
- Multi-worker
wbgt.Liljegren()execution now uses a temporary
foreach/doParallelPSOCK backend. Each worker calculates solar geometry
and completes its WBGT shard end-to-end; the caller's existingforeach
backend is restored after the call. - Parallel benchmark runners now compare a fixed total row count across worker
counts. The worker sweep acceptsLILJEGREN_PARALLEL_ROWS(default
1,000,000) rather than increasing rows per worker. - Reduced the benchmark suite to the maintained three-way pre-fork comparison
and fixed-workload internal-worker sweep, with refreshed result records.
Vectorized Liljegren Solver with Timestamp-Aware Solar Geometry
wbgt.Liljegren()now defaults toengine = "batch"; select
engine = "scalar"for the prior reference execution path. Batch retains
automatic scalar fallback for unresolved rows.wbgt.Liljegren()andcalZenith()now acceptsolar_time = "timestamp"
or"date_noon". The inheritedhourargument remains a compatibility
alias.- Removed the fork-only
gmt_offsetoption. Supply timezone-aware timestamps
or convert local observations to UTC before calculating solar geometry. - Removed the fork-only
averaging_periodoption. HeatStressR evaluates the
supplied timestamp as an instantaneous observation; callers align
interval-mean or accumulated data before calculation. wbgt.Liljegren()now acceptsdirect_fraction, the direct share of total
supplied shortwave radiation. It may be one value or a row-aligned vector
and defaults to 0.8.
Parallel batch calls optimization
- Parallel batch calls with
diagnostics = FALSEnow return compact worker
summaries rather than row-level solver metadata. Final values and aggregate
numerical-failure warnings are unchanged, while PSOCK result transfer is
substantially reduced. - Liljegren performance runners now time the public default
diagnostics = FALSE; residual, fallback, and worker-parity validation is
performed separately outside timed sections. - Documented how to choose external
foreachparallelism versus in-package
workers, including the requirement to avoid nested worker pools. - Updated documentation generation to roxygen2 8.0.0 and bound affected
roxygen blocks to their exported public functions.
Vectorized Solar Geometry: Timestamp-Term Caching for Faster Multi-Location WBGT
2.1.3 — 2026-07-22
wbgt.Liljegren()now caches timestamp-only solar-time terms and reuses
them across coordinate pairs, reducing repeated solar-geometry work while
retaining aligned vector results.- Refreshed the Liljegren coordinate benchmarks, including isolated
fixed/grouped/unique coordinate workloads and timestamp-cache E2E results. - The unique-coordinate Liljegren E2E benchmark now uses the full 129,024-row
fixture, matching the fixed- and grouped-coordinate workloads. Recorded
results and reproduction commands have been updated accordingly.
Vectorize Liljegren coordinates
wbgt.Liljegren() now accepts scalar or row-aligned lon and lat. Solar geometry is computed once per distinct coordinate pair before either scalar or batch heat-balance solving begins.
Fixed broken relative links during CRAN packaging
v2.1.1 chore: fixed relative links, update version and NEWS for 2.1.1 release
HeatStressR 2.1.0 — Multi-core support; prep for CRAN
Added
wbgt.Liljegren()batch execution accepts an explicitworkerscount.
Values above one use cross-platform PSOCK workers while retaining output,
warning, and diagnostic ordering. Worker count is user-selected within the
currently permitted worker limit; it is not automatically reduced based on
workload size except that it is capped at the number of input rows.- New internal parallel execution layer (
R/wbgt-parallel.R) providing
max_liljegren_workers(),validate_workers(),split_liljegren_chunks(),
solve_liljegren_batch_raw_chunk(), andsolve_liljegren_parallel(). - Benchmark harnesses for multicore performance evaluation:
benchmarks/benchmark-liljegren-workers-1-to-6x87600.R(sweeping worker
counts with configurableROWS_PER_WORKER) and
benchmarks/benchmark-liljegren-parallel.R(annual workload
profiling). Results recorded on Apple M2 Max. DESCRIPTIONnow listsparallelas an explicit import.
CRAN preparation
- Standardised licence metadata and package authorship.
- Added package and Liljegren-model citations.
- Added runnable Liljegren examples and expanded installed documentation.
- Clarified that HeatStressR is an R implementation of the Liljegren method,
not a claim of improvement over the original Liljegren program. - Made worker-limit detection respect CRAN check core limits.
- Added CRAN submission notes and related regression tests.
Changed
wbgt.Liljegren()withengine = "batch"automatically falls back to
multi-worker PSOCK parallel execution whenworkers > 1, splitting rows
across chunks and combining results with preserved diagnostic attributes.- Worker count validation enforces finite integer input and caps at the
currently permitted worker count; no workload-size heuristic is applied
beyond the row-count cap.
Fixed
- Batch worker count is now capped at the detected logical CPU limit to
prevent oversubscription on multi-socket or hyperthreaded systems.