Climpact: R, improved R and Python

Climpact computes the ET-SCI climate-extremes indices used in WMO workshops. I rebuilt its station, gridded and quality-control workflow in Python and compared every output, and every runtime, with the original R version.

Original R (Climpact v3.4.4) Improved R Python

Same results as R identical outputs

Batch of 24 stations seconds

Gridded data, 88 indices seconds

With 8 cores the original script took longer (231 s): the whole grid fits in one block, so only one core works.

One station seconds

Installation seconds · works?

Memory and download size

Charts drawn in the browser · TXx, Sydney °C · dashed line: Sen's slope

—of compressed index data per station, instead of—of charts and PDFs

National network of 500 stations minutes, linear projection from the measured batch

How it was done

I reproduced Climpact's workflow in Python on top of maintained open-source scientific libraries. Then I ran both versions on the same inputs: Climpact's public sample station (Sydney, 1936–2015), 24 synthetic test stations derived from that sample, and Climpact's gridded NetCDF sample. Every output file was compared value by value with the R results. Matching R exactly took some careful work on the statistical details. Run times are medians of three runs of the complete process, up to the last file written, on one Apple M4 computer with 10 cores; the R installations were timed once, the Python one (with charting) is the median of three. "Improved R" keeps the original calculations and only changes how the work is run and installed. This benchmark uses only Climpact's public sample data.

The same comparison on two real Ecuadorian stations, Quito and Portoviejo, gave identical results: see the results with Ecuadorian data.