Skip to content

Releases: zyf0717/HeatStressR

HeatStressR 2.3.0

Choose a tag to compare

@zyf0717 zyf0717 released this 08 Aug 09:50
7ce5da4

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/doParallel backend manipulation with cross-platform base parallel::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, and dewpoint_adjusted diagnostics.
  • 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

Choose a tag to compare

@zyf0717 zyf0717 released this 31 Jul 00:53
dd68f07
  • 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

Choose a tag to compare

@zyf0717 zyf0717 released this 27 Jul 03:20
4fe741f

Added

  • heat_indices() calculates multiple requested non-Liljegren indices from
    aligned observations, reusing shared validation and vapour-pressure work.
    wbgt.Bernard is 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
    one stats::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 of tashurs2vap.pres() and dewp2hurs() are
    retained.

End-to-End Parallel Liljegren WBGT

Choose a tag to compare

@zyf0717 zyf0717 released this 23 Jul 07:38
  • Multi-worker wbgt.Liljegren() execution now uses a temporary
    foreach/doParallel PSOCK backend. Each worker calculates solar geometry
    and completes its WBGT shard end-to-end; the caller's existing foreach
    backend is restored after the call.
  • Parallel benchmark runners now compare a fixed total row count across worker
    counts. The worker sweep accepts LILJEGREN_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

Choose a tag to compare

@zyf0717 zyf0717 released this 23 Jul 05:11
eba041b
  • wbgt.Liljegren() now defaults to engine = "batch"; select
    engine = "scalar" for the prior reference execution path. Batch retains
    automatic scalar fallback for unresolved rows.
  • wbgt.Liljegren() and calZenith() now accept solar_time = "timestamp"
    or "date_noon". The inherited hour argument remains a compatibility
    alias.
  • Removed the fork-only gmt_offset option. Supply timezone-aware timestamps
    or convert local observations to UTC before calculating solar geometry.
  • Removed the fork-only averaging_period option. HeatStressR evaluates the
    supplied timestamp as an instantaneous observation; callers align
    interval-mean or accumulated data before calculation.
  • wbgt.Liljegren() now accepts direct_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

Choose a tag to compare

@zyf0717 zyf0717 released this 22 Jul 05:36
1ea072a
  • Parallel batch calls with diagnostics = FALSE now 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 foreach parallelism 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

Choose a tag to compare

@zyf0717 zyf0717 released this 22 Jul 04:33
ab3b229

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

Choose a tag to compare

@zyf0717 zyf0717 released this 22 Jul 02:12

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

Choose a tag to compare

@zyf0717 zyf0717 released this 21 Jul 11:26
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

Choose a tag to compare

@zyf0717 zyf0717 released this 21 Jul 09:50
f77b979

Added

  • wbgt.Liljegren() batch execution accepts an explicit workers count.
    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(), and solve_liljegren_parallel().
  • Benchmark harnesses for multicore performance evaluation:
    benchmarks/benchmark-liljegren-workers-1-to-6x87600.R (sweeping worker
    counts with configurable ROWS_PER_WORKER) and
    benchmarks/benchmark-liljegren-parallel.R (annual workload
    profiling). Results recorded on Apple M2 Max.
  • DESCRIPTION now lists parallel as 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() with engine = "batch" automatically falls back to
    multi-worker PSOCK parallel execution when workers > 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.