| C1 |
Current stable line is GRASS 8.5 (8.5.0) |
CITED 2026-11-27 |
https://grass.osgeo.org/download/ |
| C2 |
Windows: OSGeo4W v2 installer (current); standalone installer is legacy v8.4.2; conda-forge provides Windows 64-bit (conda install -c conda-forge grass) |
CITED 2026-11-27 |
https://grass.osgeo.org/download/ |
| C3 |
“On Windows, there is no system Python and GRASS needs to use its own Python. Jupyter needs to be installed into that Python.” |
CITED 2026-11-27 |
https://grass.osgeo.org/grass-stable/manuals/libpython/grass.jupyter.html |
| C4 |
grass.jupyter added in 8.2; gj.init(path, ...); Map, InteractiveMap, TimeSeriesMap and SeriesMap (last two experimental) |
CITED 2026-11-27 |
same |
| C5 |
Python path discovery: subprocess.run(["grass", "--config", "python_path"], ...) then sys.path.append(...) |
CITED 2026-11-27 |
https://grass.osgeo.org/download/ (Conda section) |
| C6 |
gs.create_project(path, name=None, *, crs=None, epsg=None, ..., overwrite=False) |
CITED 2026-11-27 |
https://grass.osgeo.org/grass-stable/manuals/libpython/grass.script.html ; example in grass_projects.html |
| C7 |
“Project used to be called location”; location is deprecated terminology |
CITED 2026-11-27 |
https://grass.osgeo.org/grass-stable/manuals/grass_projects.html |
| C8 |
grass.tools API “is experimental in version 8.5 and expected to be stable in version 8.6” |
CITED 2026-11-27 |
https://grass.osgeo.org/grass-stable/manuals/r.in.gdal.html |
| C9 |
r.in.gdal -r: limit import to the current region |
CITED 2026-11-27 |
same |
| C10 |
t.rast.accumulate: cyclic accumulations of an STRDS; t.rast.accdetect: detects accumulation patterns in its output |
CITED 2026-11-27 |
t.rast.accumulate.html, t.rast.accdetect.html |
| C11 |
r.series methods: average, count, median, mode, minimum, min_raster, maximum, max_raster, stddev, range, sum, variance, diversity, slope, offset, detcoeff, tvalue, quart1, quart3, perc90, quantile, skewness, kurtosis (no rank-of-target method) |
CITED 2026-11-27 |
https://grass.osgeo.org/grass-stable/manuals/r.series.html |
| C12 |
t.rast.import.netcdf is an addon (not core): imports CF NetCDF as STRDS; NetCDF over HTTP unsupported on Windows |
CITED 2026-11-27 |
https://grass.osgeo.org/grass-stable/manuals/addons/t.rast.import.netcdf.html |
| C14 |
conda-forge grass 8.5.0 has win-64 builds for Python 3.10, 3.11, 3.12, 3.13 and 3.14 |
MEASURED 2026-11-27 |
https://api.anaconda.org/package/conda-forge/grass/files, filtered subdir == win-64, grouped by version and python depends |
| C15 |
In climate (grass 8.5.0 py314h1fbbb69_1), grass_gis.dll imports libomp140.x86_64.dll, which no installed package provides and which is absent from this machine. Every GRASS module exits 0xC0000135 (DLL not found); gs.create_project returns without raising but creates no PERMANENT mapset, and grass.bat -c fails. The feedstock declares no OpenMP run dependency |
MEASURED 2026-11-27 |
objdump -p on g.proj.exe and its DLLs; find over miniforge3, System32, Visual Studio dirs; conda-meta depends; GRASS Popen return code 3221225781 |
| C16 |
Microsoft: /openmp:llvm “isn’t available for production code, since the required libomp DLLs aren’t redistributable”; LLVM OpenMP files sit only under debug_nonredist |
CITED 2026-11-27 |
https://learn.microsoft.com/en-us/cpp/build/reference/openmp-enable-openmp-2-0-support ; https://learn.microsoft.com/en-us/visualstudio/releases/2022/redistribution |
| C17 |
With conda-forge llvm-openmp’s libomp.dll copied as libomp140.x86_64.dll onto PATH, GRASS works from the climate Python: create_project, gj.init, g.region, r.mapcalc via ParallelModuleQueue, r.univar, RasterRow, t.create/t.register |
MEASURED 2026-11-27 |
scratchpad verify_grass.py with a process-local shim folder |
| C18 |
A non-activated climate Python needs <env>\Library\bin prepended to PATH (and GDAL_DATA/PROJ_DATA set) or GRASS modules fail to load DLLs; the shell’s PATH otherwise finds base miniforge’s Libraryfirst |
MEASURED 2026-11-27 |
create_project fails without the prepend even with the OpenMP DLL present (test T1) |
| C19 |
grass.pygrass.gis / grass.pygrass.raster cannot be imported before gj.init (“Could not load grass_gis”), even with C17 and C18 in place; they import fine after init |
MEASURED 2026-11-27 |
test T3 vs full run |
| C20 |
The climate env’s GDAL (libgdal-core 3.12.3) has no netCDF driver (gdal.GetDriverByName('netCDF') is None), so r.in.gdal cannot open AgERA5 NetCDF. conda-forge has libgdal-netcdf 3.12.3 for win-64 |
MEASURED 2026-11-27 |
osgeo.gdal check; https://api.anaconda.org/package/conda-forge/libgdal-netcdf/files |
| C21 |
Installing grass changed rasterio 1.5.2 to 1.5.0 and rioxarray 0.24.0 to 0.23.0 in climate |
MEASURED 2026-11-27 |
import versions before and after install |
| C22 |
GRASS’s Windows ctypes loader registers every PATH folder with os.add_dll_directory (grass/lib/ctypes_loader.py, WindowsLibraryLoader). With base miniforge (C:\Users\<you>\miniforge3, ...\Library\bin) on PATH, temporal modules (child Python processes, e.g. t.create) fail “Could not load grass_raster”; removing only those two entries fixes it, removing Git/mingw entries does not |
MEASURED 2026-11-27 |
source read; PATH bisection runs NOBASE (ALL OK) vs NOMINGW (fail) |
| C23 |
Applied fix 2026-11-27: libomp140.x86_64.dll = byte-identical copy of the env’s libomp.dll in climate\Library\bin (remove the file to undo). With it plus the C18/C22 PATH handling, verify_grass.py passes from the user’s full PATH: project creation, gj.init, region, ParallelModuleQueue, RasterRow, t.create/t.register; grass.bat -c also works (warns “Concurrent mapset locking is not supported on Windows”) |
MEASURED 2026-11-27 |
cmp of the two DLLs; temp/verify_grass.py output “ALL OK” |
| C24 |
After libgdal-netcdf 3.12.3 install, the netCDF driver is still absent in a non-activated climate Python until GDAL_DRIVER_PATH=<env>\Library\lib\gdalplugins is set (the env’s gdal-activate.bat sets it on activation). Plugin dir holds gdal_netCDF.dll, gdal_HDF5.dll, gdal_HDF4.dll. The install also moved netCDF4 1.7.5 to 1.7.4 |
MEASURED 2026-11-27 |
gdal.GetDriverByName('netCDF') before/after; etc/conda/activate.d/gdal-activate.bat; import versions |
| C25 |
One day (2015-07-01, band 182) of Temperature_Air_2m_Max_24h imported with r.in.gdal -r into the NTT region (n -7.95, s -11.15, w 118.85, e 125.25, res 0.1 = 32 x 64): 1.4-2.4 s; map extent 33 x 65 (s -11.25, e 125.35); within the region 1,113 valid and 935 null cells, min 294.7135 K, max 304.8040 K, mean 300.3022 K. Identical to xarray at the same 2,048 cell centres: max abs diff 0.0, null pattern equal. File coordinate step is 0.0999999999999943 |
MEASURED 2026-11-27 |
temp/verify_grass.py (GRASS RasterRow vs xarray.sel(..., method="nearest", tolerance=0.01)) |
| C26 |
On-the-fly resampling to the region is always nearest neighbour; other methods need r.resamp.* first |
CITED 2026-11-27 (by claims-auditor fetch) |
https://grass.osgeo.org/grass-stable/manuals/rasterintro.html |
| C27 |
conda-forge grass 8.5.0 exists for linux-64, osx-64, osx-arm64 and win-64 |
MEASURED 2026-11-27 |
anaconda API files list, subdirs for version 8.5.0 |
| C28 |
g.mapset -c writes a .gislock that a gj.init session never removes (on Linux/macOS a second kernel would be refused); grass.grassdb.create.create_mapset + gj.init(project/mapset) leaves no lock (verified on Windows: no .gislock in a fresh mapset) |
CITED + MEASURED 2026-11-27 |
grass-api-reviewer reading grass/jupyter/setup.py, g.mapset/main.c; fresh pg.start test |
| C29 |
Chapter 1 executed end to end (archive path, RUN_DOWNLOAD False): 34 s and 37 s in two runs; one-day import 1.4 s and 1.2 s; mapset ch01 0.50 MB; t.info -g returns start_time wrapped in single quotes |
MEASURED 2026-11-27 |
temp/runs/ch01_executed.ipynb |
| C30 |
Chapter 1 executed end to end on the CDS download path (archive disabled, RUN_DOWNLOAD True): 112 s including 62 s download; import 0.6 s; all checkpoint asserts passed; downloads folder 0.06 MB |
MEASURED 2026-11-27 |
temp/runs/ch01_dl_executed.ipynb |
| C31 |
31 r.in.gdal -r imports into the NTT region, this machine (os.cpu_count() 80): from the 2015 global yearly file, serial 38.9 and 40.1 s, ParallelModuleQueue nprocs 4 13.7 s, 8 9.7 and 9.9 s, 80 6.3 s; from 31 daily CDS files, serial 15.6 s, nprocs 8 6.4 s |
MEASURED 2026-11-27 |
scratchpad probe_ch02.py, probe2_ch02.py |
| C32 |
pygrass Module rejects comma-joined multiple values (method="maximum,max_raster" raises ValueError listing allowed values); pass Python lists (method=["maximum", "max_raster"]) |
MEASURED 2026-11-27 |
probe_ch02.py traceback |
| C33 |
r.support map=... units=K semantic_label=tmax sets both; r.info -e returns them. 31 calls in a queue of 8: 5.8 and 6.0 s |
MEASURED 2026-11-27 |
probe_ch02.py; r.support manual (local 8.5 docs) |
| C34 |
t.register file= with name|start|end lines registers daily intervals (31 maps, granularity ‘1 day’, end 2015-02-01). With timestamps in the file, increment and -i are not supported (manual). t.rast.list format= accepts plain, csv, json |
MEASURED + CITED 2026-11-27 |
probe_ch02.py; https://grass.osgeo.org/grass-stable/manuals/t.register.html |
| C35 |
t.rast.mapcalc takes inputs= (synopsis; the manual example writes input=), expression without a left-hand side, output, basename, nprocs; output maps are named basename_01, _02, … 31 maps: nprocs 8 17.4-18.9 s, nprocs 16 13.9 s Padding follows the map count: _01 for 31 maps, _001 for 365 (Chapter 2 run). |
MEASURED + CITED 2026-11-27 |
probe_ch02.py, probe2_ch02.py; t.rast.mapcalc manual |
| C36 |
t.rast.series method=max_raster gives the 0-based position of the maximum in the series (31-day test: values 4 to 28); equal to numpy.argmax over the same stack on every land cell |
MEASURED 2026-11-27 |
probe_ch02.py (numpy null handling corrected in probe2) |
| C37 |
grass.script.array.array(map) with the default null=None returns null cells as 0 (935 nulls became zeros on tmax 2015-01-01 NTT); null="nan" returns NaN; .write(name, null=np.nan) writes NaN back as null (1,113 valid, 935 null). Each read runs r.out.bin: 31 reads 19.5 s |
MEASURED 2026-11-27 |
probe2_ch02.py; grass/script/array.py |
| C38 |
A mask built with r.mapcalc from x() and y() over the Sumba edges, applied with r.mask raster=, gives the same r.univar result as zooming the region to Sumba (196 cells, mean 301.0761 K on 2015-01-01). r.mask writes a reclass map MASK; r.mask.status format=json reports it; GRASS_MASK can name another map |
MEASURED + CITED 2026-11-27 |
probe_ch02.py; r.mask, r.mask.status manuals |
| C39 |
At res=0.2 on the NTT edges (16 x 32) every value GRASS reads is one of the 0.1 values (nearest neighbour); r.resamp.stats method=average gives different values (the probe’s share-of-cells figure counted nulls read as 0, C37, so it is not used) |
MEASURED 2026-11-27 |
probe_ch02.py |
| C40 |
gj.Map with d_rast + d_legend, saved to PNG: 47 s the first time in a fresh setup, then 1.1 s per map |
MEASURED 2026-11-27 |
probe_ch02.py, probe2_ch02.py |
| C41 |
pygrass RasterRow reads in the region the process had when it first read a raster: after g.region res=0.2 (a subprocess) Region().rows is 16 but RasterRow still returns 32 x 64. Calling Region().set_raster_region() before opening the map makes it read 16 x 32 |
MEASURED 2026-11-27 |
scratchpad probe4.py, probe5.py |
| C42 |
ParallelModuleQueue.wait(): a failing plain Module raises CalledModuleError; a failing MultiModule(sync=False) made wait() hang (cell timeout 240 s, Jupyter on Windows). In a plain script on Windows, MultiModule(sync=False) without a __main__ guard fails in multiprocessing spawn |
MEASURED 2026-11-27 |
probe5.py; nbconvert run of a two-cell probe notebook |
| C43 |
Windows: t.rast.series over the 365 daily Tmax maps (default file_limit 1000) failed: G__open(read): Unable to open ... cellhd/tmax_20150221: Too many open files (the 52nd map). With file_limit=100 it warns “activating -z flag of r.series” and succeeds in 87.5 s (average, maximum, max_raster) |
MEASURED 2026-11-27 |
temp/runs/ch02_dl.log; scratchpad probe6.py; t.rast.series.py reads file_limit |
| C44 |
Chapter 2 executed end to end on the download path (data already downloaded, NPROCS 8): 918 s. Slow cells: 730 imports 145 s + 730 r.support 132 s; t.create + t.register file= for 2 x 365 maps 178 s; t.rast.mapcalc 365 maps + 365 r.support 212 s; t.rast.series (file_limit 40) 89 s. Serial vs parallel on 31 daily files: 14.5 s vs 6.1 s. Mapset ch02 9.6 MB, downloads 42.1 MB This run went onto an existing ch02 mapset (761 overwrite warnings, 4 STRDS re-created in temp/runs/ch02_dl.log), so register time includes unregistering the previous maps. |
MEASURED 2026-11-27 |
temp/runs/ch02_dl_executed.ipynb cell timings (nbclient metadata) |
| C45 |
r.in.gdal leaves map units empty (r.info -e units “none” right after import of an AgERA5 daily file) |
MEASURED 2026-11-27 |
probe3.py, probe8.py |
| C46 |
x() and y() in r.mapcalc return the cell centre: on the one-cell region n -7.95 s -8.05 w 118.85 e 118.95 they give 118.9 and -8.0 |
MEASURED 2026-11-27 |
probe8.py |
| C47 |
Odd-factor coarsening: region n -7.95 s -10.95 w 118.85 e 125.15 at res 0.3 (10 x 21): each value GRASS reads on the fly equals the 0.1 cell at the centre of the 3 x 3 block (all cells, null pattern equal); r.resamp.stats method=average values coincide with a 0.1 value in 0.7% of valid cells; valid cells 126 (on the fly) vs 147 (average, nulls ignored). Raster introduction: resampling takes “the value of the raster cell in which that point falls”; a centre on a cell edge is decided by rounding, and even-factor downsampling “gives an ill-defined result” |
MEASURED + CITED 2026-11-27 |
probe8.py; https://grass.osgeo.org/grass-stable/manuals/rasterintro.html |
| C48 |
Run order does not explain the parallel gain: 31 daily-file imports, parallel first 6.3 s then serial 14.0 s; serial first 13.9 s then parallel 6.2 s (nprocs 8). 31 x g.version: serial 3.9 s, queue of 8 2.5 s |
MEASURED 2026-11-27 |
probe8.py |
| C49 |
ParallelModuleQueue.put() starts each module at once and, when nprocs are running, calls wait() itself, which waits for the whole batch; a module with a non-zero exit raises CalledModuleError from that wait() (so from put() or the final wait()) |
CITED 2026-11-27 |
grass/pygrass/modules/interface/module.py (8.5.0, climate env), ParallelModuleQueue.put, .wait, Module.wait |
| C50 |
Mapsets: each has its own computational region; tools write only to the current mapset; the search path always includes the current mapset first and PERMANENT; temporal databases are mapset specific |
CITED 2026-11-27 (via claims-auditor fetch) |
https://grass.osgeo.org/grass-stable/manuals/grass_projects.html ; https://grass.osgeo.org/grass-stable/manuals/temporalintro.html |
| C51 |
r.series: -z does not keep files open (avoids the open-files limit set by the operating system); max_raster numbering starts at 0 |
CITED 2026-11-27 (via claims-auditor fetch) |
https://grass.osgeo.org/grass-stable/manuals/r.series.html |
| C52 |
Chapter 2 executed on the local-archive path (yearly files, band = day of year, same ch02 mapset re-used): 1017 s, all checks passed; 31 days serial 36.7 s vs 8 at a time 9.4 s (3.9x); 730 imports 219 s + labels 133 s; 365/365 maps; same 11 Tmin > Tmax cell-days as the download path; mapset 9.9 MB |
MEASURED 2026-11-27 |
temp/runs/ch02_executed.ipynb |
| C53 |
t.register file=: bare map names cost about 220 ms/map (one g.findfile subprocess per map, grass/temporal/abstract_map_dataset.py); fully qualified name@mapset about 52 ms/map (120 maps, Windows). Manual: “registering maps with fully qualified map name is slightly faster” |
MEASURED + CITED 2026-11-27 (grass-api-reviewer, scratch probe/treg.py) |
t.register manual; temporal source |
| C54 |
t.rast.mapcalc copies the semantic label and the STRDS semantic type from its first input: daily means from tmax_2015 were registered with label tmax and the output STRDS (and its monthly aggregate) got semantic type max; r.support afterwards changes only the map files, not the temporal DB |
MEASURED + CITED 2026-11-27 (grass-api-reviewer, copy of ch02 tgis DB; grass/temporal/mapcalc.py) |
|
| C55 |
pygrass Info(name, mapset) setters .units and .semantic_label write through Rast_write_units / Rast_write_semantic_label in-process: 120 maps in 0.35 s, against about 0.19 s per map for r.support in a queue of 8 (C33). mapset must be given |
MEASURED + CITED 2026-11-27 (grass-api-reviewer probe/units.py; grass/pygrass/raster/abstract.py) |
|
| C56 |
r.mapcalc: FCELL minus a decimal literal (fc - 273.15) writes DCELL; float(fc - 273.15) writes FCELL |
MEASURED 2026-11-27 (grass-api-reviewer probe/units.py) |
|
| C57 |
pygrass RasterRow returns -2147483648 (not NaN) for null cells of a CELL (integer) map when converted to float64 |
MEASURED 2026-11-27 (grass-api-reviewer probe/units.py) |
|
| C58 |
Overwriting a registered map with r.mapcalc --o leaves the temporal DB metadata stale (t.rast.list max unchanged) until t.support -m |
MEASURED 2026-11-27 (grass-api-reviewer probe/rerun.py) |
|
| C59 |
r.mask -r with no mask present exits 1 (“No existing mask to remove”) |
MEASURED 2026-11-27 (grass-api-reviewer scratch probe) |
|
| C60 |
t.create --overwrite unregisters every map of the old STRDS: 5.3 s for 120 maps (scratch), 6-11 s per 365 maps in the Chapter 2 run |
MEASURED 2026-11-27 (grass-api-reviewer probe/treg.py) |
|
| C61 |
Revised Chapter 2 (qualified t.register, Info units, float(), file_limit 40 + nprocs on t.rast.series) from an empty ch02 mapset, download path, data on disk, NPROCS 8: 540 s, all checks passed. Cells: 730 imports 144 s; units and labels for 730 maps 1.9 s; t.create + t.register 15 s per 365 maps (42 s cell); t.rast.mapcalc + units + t.support 153 s; t.rast.aggregate 42 s; t.rast.series 33 s; 12 garray reads 7.1 s; serial vs parallel 14.6 vs 6.2 s; all derived maps FCELL; temporal DB labels tmean, semantic type mean after t.support -m; mapset 9.1 MB |
MEASURED 2026-11-27 |
temp/runs/ch02_dl_executed.ipynb |
| C62 |
Archive import of single days, r.in.gdal -r band=N per Module in a ParallelModuleQueue: 31 bands 9.7 s at nprocs 8; 64 bands 19.8 s (nprocs 8), 15.8 s (16), 13.1 s (32). One r.in.gdal -r with a list of bands: 31 bands 23.1 s, all 365 bands 273.4 s (0.75 s per band, serial) |
MEASURED 2026-11-27 |
scratchpad probe_ch03a.py, probe_ch03b.py, probe_ch03c.py (probe mapset deleted afterwards) |
| C63 |
Cutting the NTT block (nearest-centre sel, 366 days, tmax 2016) out of the archive file with xarray and writing it as a small NetCDF: 4.8 s; one r.in.gdal -r of that file (all bands): 7.1 s, 366 maps name.1..name.366, each 32 x 64 FCELL with the NTT extent exactly; day 100 identical to a direct archive import (max abs diff 0, 1,113 cells) |
MEASURED 2026-11-27 |
scratchpad probe_ch03a.py, probe_ch03b.py, probe_ch03c.py (probe mapset deleted afterwards) |
| C64 |
One g.rename raster= call with a list of old,new pairs renames many maps: 31 pairs 0.5 s, 366 pairs 1.6 s |
MEASURED 2026-11-27 |
scratchpad probe_ch03a.py, probe_ch03b.py, probe_ch03c.py (probe mapset deleted afterwards) |
| C65 |
t.register file= with 366 qualified name@mapset lines into a new STRDS: 9.0 s (about 25 ms per map). A multi-band r.in.gdal also writes an imagery group (group/, CURGROUP) in the mapset. Probe mapset with about 1,050 small FCELL maps: 10,564 files, 19 MB |
MEASURED 2026-11-27 |
scratchpad probe_ch03a.py, probe_ch03b.py, probe_ch03c.py (probe mapset deleted afterwards) |
| C66 |
Stacking the 365 daily CDS files of Tmax 2015 NTT (Chapter 2 download) with xarray open_dataset + load + concat(dim='time'): 11.8 s; result (365, 32, 64), values and null pattern identical to the archive cut (max abs diff 0.0). concat also stacks the crs variable along time unless excluded |
MEASURED 2026-11-27 |
in-session script on E:/temp/pgca/downloads/ch02/tmax_2015_ntt |
| C67 |
grass.script.create_environment(gisdbase, project, mapset) returns a GISRC file and an env dict; pygrass Module(..., env_=env) runs a tool in that mapset without switching. Rast_write_units (behind pygrass Info.units) writes only to the current mapset of the process |
CITED 2026-11-27 |
Library/lib/grass85/etc/python/grass/script/core.py line 2252; pygrass/modules/interface/module.py env_; C API docs for Rast_write_units: VERIFY |
| C68 |
gj.init(...).switch_mapset('probe_b') in one process: tools run as subprocesses follow (g.mapset -p, r.mapcalc output land in probe_b; search path becomes probe_b, PERMANENT), but in-process pygrass does not: Mapset().name stays probe_a and Info('b','probe_b').units = ... raises GrassError “Map not found in current mapset”. RasterRow('a', mapset='probe_a') still reads after the switch. Review probe: Info(n, start_mapset) setters still succeed after the switch and write to the start mapset, and RasterRow(..., mode='w') creates the map in the start mapset (invisible to g.list in the new one); getters read by explicit mapset and need neither |
MEASURED 2026-11-27 |
scratchpad probe_ch03d.py (probe mapsets deleted) |
| C69 |
t.rast.list / t.rast.univar on tmax_2015@ch02 from another mapset fail (“You have no permission to access mapset , or mapset has no temporal database”) until g.mapsets operation=add mapset=ch02 puts it on the search path |
MEASURED 2026-11-27 |
scratchpad probe_ch03e.py, probe_ch03f.py (probe mapset deleted) |
| C70 |
Read cost on 365 NTT maps (32 x 64): pygrass RasterRow in-process 14.9 s (41 ms per map); t.rast.univar nprocs=8 28.7 s (79 ms per map); t.rast.list columns=name,start_time,min,max 4.7 s, min and max per map come from the temporal database |
MEASURED 2026-11-27 |
scratchpad probe_ch03e.py, probe_ch03f.py (probe mapset deleted) |
| C71 |
The temporal database stores map min and max rounded to six decimals (SQLite rows written with %f, grass/temporal/core.py lines 1452-1457; r.info -r 0.1238336 vs t.rast.list 0.123834): comparing them with float32 file values at rtol=1e-6 alone flagged 48 of 731 ws10 maps (daily minima near 0.17 m s-1); all temperature, radiation and ET maps matched |
MEASURED 2026-11-27 |
temp/runs/ch03_diag.ipynb section 8 |
| C72 |
Chapter 3 teaching run, final code (2015-2016, 6 variables, archive path, empty mapsets, NPROCS 8): 453 s, all checks passed. 31 single-day imports 0.31-0.32 s per map; stage 3.7-4.1 s + import 7.0-7.7 s per variable-year; stage all 12: 15 s; import 31 s, rename 11-12 s, units and labels 10 s for 4,386 maps; section 3 estimate for prepare + import 131 s vs actual 46 s (import runs 8 at a time); t.create + t.register with restart checks 209-214 s (about 35 s per 731 maps); each t.rast.list / t.info call about 5 s; checkpoint 68 s; mapset agera5 57,022 files, 33 MB (13 files per map); staged 16.7 MB; ws10 exactly 0 on 3 land cell-days; Tmin > Tmax 168 of 813,603 land cell-days (0.021%), Tdew > Tmax 5 (0.001%) |
MEASURED 2026-11-27; the published teaching notebook prints stage 14 s, import 32 s |
temp/runs/ch03_teach_executed.ipynb (and the earlier teaching runs in this session) |
| C73 |
grass.jupyter.init() sets os.environ['GRASS_OVERWRITE'] = '1' for the process and every child tool, so overwrite= arguments are moot; documented opt-out: set it to '0' after gj.init(). Probe: under it, t.create with no overwrite argument replaced an existing STRDS and unregistered all its maps (number_of_maps 2 -> None); g.rename without --o overwrote an existing map |
MEASURED + CITED 2026-11-27 |
grass/jupyter/setup.py line 38, grass/jupyter/__init__.py lines 52-59 (8.5.0); grass-api-reviewer probes scratchpad/probe/p1.py-p4.py (throwaway project, deleted) |
| C74 |
t.register commits map rows in chunks of 100, then registers each map, then updates the STRDS summary (update_from_registered_maps) at the end: an interrupt before the end leaves number_of_maps, extent and min/max stale; t.support -u rebuilds them, t.support -m refreshes map metadata from the raster files |
CITED 2026-11-27 |
grass/temporal/register.py lines 305-440; scripts/t.support.py |
| C75 |
STRDS semantic type (min, max, sum, mean) is descriptive: t.rast.aggregate uses its own method= (default average) and copies the input’s semantic type to the output |
CITED 2026-11-27 |
scripts/t.create.py lines 42-48; scripts/t.rast.aggregate.py lines 123, 203-226 |
| C76 |
Multi-band r.in.gdal writes group/<output>/REF and a CURGROUP file in the mapset root; g.remove type=group removes the group directory but leaves CURGROUP. g.rename of different maps in parallel in one mapset is safe (touches only that map’s element files); its overwrite path deletes the target’s element files first |
MEASURED + CITED 2026-11-27 |
r.in.gdal/main.c lines 772-858, lib/manage/do_rename.c (8.5.0); grass-api-reviewer probes scratchpad/probe/p1.py-p4.py (throwaway project, deleted) |
| C77 |
Chapter 3 teaching run on the CDS download path (archive off, all 12 zips on disk, empty mapsets agera5_cds/ch03_cds, NPROCS 8): 538 s, all checks passed. 31 single-day imports from daily files 0.21 s per map (est. 6.1 h full); stack + import 10.9 s + 7.2 s per variable-year (est. 1.4 h full, 4 times less); staging all 12 from daily files 102 s; import 30 s, rename 12 s, labels 9 s; register 206 s; same flags as the archive path (Tmin > Tmax 168, Tdew > Tmax 5 cell-days, identical largest cases), so A23 holds for the CDS files too. An earlier run of the pre-review code on this path failed with ZeroDivisionError: reused Chapter 2 zips were never unzipped (fixed: section 2 unzips every zip it uses) |
MEASURED 2026-11-27 |
temp/runs/ch03_dl_executed.ipynb |
| C78 |
Chapter 3 full run (1979-2025, 6 variables, archive path, empty mapsets, NPROCS 8, Windows 11, 80 logical CPUs): 3,626 s, all checks passed. Section 3 sample: 0.32 s per single-day map (est. 9.2 h), 3.8 + 7.3 s per variable-year (est. 0.9 h, 11 times less). Stage 282 files 336 s (391.8 MB); import 721 s; rename 262 s; units and labels 229 s; t.create + t.register 1,610 s (about 15.6 ms per map; 265-305 s per 17,167 maps); estimate for prepare + import 3,133 s vs actual 1,057 s; QC numpy pass 15 s; RasterRow sample of 282 maps 12.8 s; checkpoint 326 s (incl. 206,004 Info reads and rglob over the mapset). Mapset agera5: 1,339,030 files, 771 MB |
MEASURED 2026-11-28 |
temp/runs/ch03_full_executed.ipynb |
| C79 |
GRASS manual statements used in Chapter 3: a new mapset starts from the default region stored in PERMANENT (grass_projects); a temporal database is created when a temporal command is first invoked, and other mapsets’ datasets are readable while they are on the search path (temporalintro); “For parsing the outputs, always use the JSON output” and the search path is saved in the current mapset (g.mapsets); grass.jupyter enables overwrite by default, opt-out by setting GRASS_OVERWRITE to “0” after gj.init() |
CITED 2026-11-28 (claims-auditor fetch) |
grass_projects.html, temporalintro.html, g.mapsets.html, libpython/grass.jupyter.html |
| C80 |
np.isclose(a, b, rtol, atol) accepts when abs(a - b) <= atol + rtol * abs(b) (a sum): np.isclose(1.0, 1.0 + 1.9e-6, rtol=1e-6, atol=1e-6) is True |
MEASURED 2026-11-28 (claims-auditor, numpy 2.5.4) |
|
| C81 |
r.mapcalc 8.5 on the 32 x 64 NTT region, one ETos expression: nprocs=0 (default, 80 logical CPUs) 1.07-1.14 s per call, nprocs=1 0.23-0.25 s (g.region alone 0.22 s). g.gisenv set=NPROCS=1 makes later r.mapcalc calls without nprocs take 0.24 s |
MEASURED 2026-11-28 |
scratchpad probe_threads.py; temp/proto/probe_ch04_grass.py |
| C82 |
Daily ASCE ETos for 2015 (365 maps) from the agera5 mapset, NPROCS 8: per-day r.mapcalc (nprocs=1) 79.5 s; r.mapcalc with 10 days of expressions per process (nprocs=1) 14.0 s (8 days: 17.0 s); t.rast.mapcalc (start_doy(), method=equal) 147.5 s incl. registration; one r.mapcalc with 365 expressions failed “Too many open files” (30 days per process also failed); with default nprocs=0 the 8-day chunks took 69.1 s and per-day 133.9 s. All three routes match numpy to 2.5e-05 mm d-1 on 2015-07-15, nulls identical |
MEASURED 2026-11-28 |
temp/proto/probe_ch04_grass.py |
| C83 |
t.rast.list format=csv quotes every field ("c_001","2015-01-01 00:00:00"); strip quotes or use format=json |
MEASURED 2026-11-28 |
probe_threads.py output |
| C84 |
r.mapcalc trigonometric functions take and return degrees: “Sine of x (x is in degrees)”, “Inverse cosine of x (result is in degrees)”; y() is “Current y-coordinate of moving window” (cell centre: C46) |
CITED 2026-11-28 (grass-api-reviewer, local 8.5 docs) |
https://grass.osgeo.org/grass-stable/manuals/r.mapcalc.html |
| C85 |
Chapter 4 teaching run, NPROCS 8, Windows 11: 292 s total; 731 ETos days computed in 29 s (39 ms per day, 10-day r.mapcalc files, nprocs=1), labels 2 s, t.create + t.register 39 s; reading 1,462 maps with raster2numpy 26 s (about 18 ms per map); 20 step maps in 11.2 s; GRASS vs numpy on 2015-07-15 max 4.4e-06 mm d-1; mapset ch04 19,421 files, 44 MB |
MEASURED 2026-11-28 |
temp/runs/ch04_teach_executed.ipynb |
| C90 |
Chapter 4 full run (1979-2025, empty ch04, NPROCS 8, Windows 11): 1,089 s, all checks passed. ETos 17,167 days computed in 461 s (27 ms per day), labels 35 s, t.create + t.register 264 s (15 ms per map), comparison read of 34,334 maps 158 s (5 ms per map), checkpoint 67 s; mapset ch04 232,942 files, 176 MB (FCELL). Revised teaching run: 173 s, ch04 19,274 files, 35 MB; GRASS vs numpy (float64) 9.5e-11 mm d-1; one expression vs step maps 2.4e-07 |
MEASURED 2026-11-28 |
temp/runs/ch04_full_executed.ipynb, ch04_teach_executed.ipynb |
| C91 |
raster2numpy on a CELL (integer) map returns -2147483648 for null, not NaN (FCELL nulls are NaN); np.isfinite does not catch it |
MEASURED 2026-11-28 |
probe05 rank maps, scratchpad sea.py |
| C92 |
Chapter 5 probe on etos@ch04 (17,167 days), NPROCS 8: t.rast.aggregate granularity=1 months method=sum nprocs=8 file_limit=40: 564 maps in 106.5 s (sea stays null). One r.mapcalc per map: 1,674 window sums (k = 3, 6, 12) 321.8 s; 1,680 rank maps (30 comparisons each, 1991-2025 targets) 358.8 s; GRASS ranks equal numpy on every land cell for 4 checked targets. numpy: read 564 monthly maps 2.4 s, all window sums and ranks 4.7 s |
MEASURED 2026-11-28 |
temp/proto/probe_ch05_grass.py, .log.json |
| C93 |
EDDI User Guide v1.0 (pdftotext): “aggregate it over the selected time window”, climatology “1980-present”, “rank-based non-parametric probabilities”, ASCE variant (p15); categories from percentiles (p16). No plotting-position formula or constants in the guide. Hobbins 2016 PDF (NOAA IR noaa/14551, 10.92 MB) and the Hobbins NLDAS webinar slides exceed the 10 MB fetch limit; AMS returns 403 |
CITED 2026-11-28 |
https://psl.noaa.gov/eddi/pdf/EDDI_UserGuide_v1.0.pdf ; https://repository.library.noaa.gov/view/noaa/14551 |
| C94 |
Chapter 5 first run (etos 1979-2025, baseline 1991-2020, NPROCS 8): 347 s, all checks passed. t.rast.aggregate 564 months 115 s; Dec 2015 monthly = sum of daily maps (max diff 0.0); 564 monthly maps read and 4 timescales of window means 2.5 s; r.mapcalc window vs numpy 2.4e-07 mm/day; Dec 2015 3-month rank GRASS = numpy on all land cells (ranks 19-30, n 30), EDDI max diff 8.8e-08, land mean +1.09; ranks/probabilities all timescales 0.9 s; writing + registering 2,238 EDDI maps 175 s; mapset ch05 36,205 files, 18 MB. Category breaks in EDDI (A&S approximation): 0.524, 0.841, 1.282, 1.645, 2.054. Share of land at ED1 or drier, 2015, 3-month: Oct 46%, Nov 90%, Dec 81%; 1-month Oct-Nov 67%. Whole-record baseline (n 47) changes the Dec 2015 3-month category on 215 of 1,113 land cells (19%); mean EDDI +1.04 vs +1.09. pgca.eddi.inverse_normal within 4.5e-4 of scipy norm.ppf over p 0.001-0.999 (tests/test_eddi.py) |
MEASURED 2026-11-28 |
temp/runs/ch05_executed.ipynb |
| C95 |
Chapter 5 final run (frozen, after the description fix; empty ch05, NPROCS 8, Windows 11): 458 s, all checks passed (monthly totals 150 s, write + register 223 s, checkpoint 55 s); a restart run without clearing skipped finished work in 220 s. Earlier run with identical results: 407 s. Monthly totals 120 s; 564 maps read + 4 timescales 2.7 s, 46 MB arrays; Dec 2015 3-month: ranks 19-30 of 30 on all land cells, no ties, GRASS = numpy ranks, EDDI diff 4.7e-07, land mean +1.09; window mean ETos 5.12 vs baseline median 4.90 mm/day (+4.5%), 1-month 4.62 vs 4.47 (+3.4%). Write + register 2,238 maps 208 s; checkpoint 52 s; ch05 36,770 files, 18 MB. Dec 2015 category counts (land cells): 1-month none 573, ED0 327, ED1 195, ED2 18; 3-month none 37, ED0 172, ED1 621, ED2 242, ED3 41; 6-month 241/290/368/199/15; 12-month 207/289/389/190/38. Share ED1+ (%), 3-month: Oct-Nov 2014 93.4, 93.9; Sep 2015 11.9, Nov 90.1, Dec 81; Jan 2016 1/3/6-month 99.6/100.0/99.6; 1-month Feb 2016 0.1, Apr 68.2; 12-month Jan-Aug 2016 73.8-95.2, Sep 56.2. Whole-record baseline: 215 of 1,113 cells change category, mean EDDI +1.04 vs +1.09, range -2.20 to +2.19 |
MEASURED 2026-11-28 |
temp/runs/ch05_executed.ipynb, E:/temp/pgca/outputs/ch05/share_ed1_2014_2016.csv |
| C96 |
WMO: the new 30-year baseline 1991-2020 “should be adopted globally” (claims-auditor fetch). NOAA CPC ONI (oni.ascii.txt, read with curl 2026-11-28): OND 2014 0.70, NDJ 2014 0.80; SON 2015 2.28, OND 2015 2.45, NDJ 2015 2.59, DJF 2016 2.50, MAM 2016 1.11, MJJ 2016 0.09 ; peaks in the record: NDJ 1982 2.12, NDJ 1997 2.37, NDJ 2015 2.59, NDJ 2018 1.05 (DJF 2019 0.99), NDJ 2023 1.99. Event definition (threshold, duration) not read: CPC pages did not answer automated requests (VERIFY) |
CITED 2026-11-28 |
https://wmo.int/media/news/updated-30-year-reference-period-reflects-changing-climate ; https://www.cpc.ncep.noaa.gov/data/indices/oni.ascii.txt |
| C97 |
t.rast.aggregate 8.5.0: nprocs = number of r.series processes in parallel; file_limit is the threshold above which r.series runs with -z (inputs not kept open), not a cap (temporal/aggregation.py lines 269, 372-382); title and description are copied from the input (t.rast.aggregate.py lines 203-210); no units set on outputs; r.series called without -n, so null days are skipped. r.recode on FCELL with integer targets gives CELL; bounds inclusive, the last rule wins at a shared bound (value on a break goes to the upper class) |
CITED 2026-11-28 (grass-api-reviewer) |
GRASS 8.5 source |
| C98 |
On this install (conda-forge GRASS 8.5.0, Windows) the SQLite and DBF attribute DB drivers (the two tested of dbf, ogr, pg, sqlite) fail: db.execute, v.import and the GRASS launcher (grass.bat ... --exec db.execute) all report “dbmi: db_open_database() not implemented” for sqlite and dbf; the driver executables (driver/db/.exe, 23-38 KB) link grass_dbstubs.dll; GISBASE/bin is on PATH. Cause (2026-11-29): grass_dbmidriver.dll calls the driver through 32 exported pointer variables (db_driver_) initialised to grass_dbstubs.dll; db/drivers/CMakeLists.txt compiles the drivers with -DDB_DRIVER_C=1 on MSVC, so each driver defines its own copies and init_dbdriver() never reaches the DLL’s (sqlite.exe imports none of the pointers, objdump). Present on GRASS main; no GRASS or feedstock issue found, so it was reported as OSGeo/grass#8291 (2026-11-29; the dbf problems of C106 as #8292). Second cause: lib/db/dbmi_driver/driver.c sets binary stdin/stdout only under MINGW32, so with MSVC the pipe is text mode and tables whose protocol data hold 0x0A hang. Local fix MEASURED 2026-11-29: sqlite.exe rebuilt with Strawberry gcc 13.2 (UCRT) with dllimport pointers and _setmode in main (temp/upstream/build-db-driver.sh sqlite); db.execute, db.select, db.describe, v.in.ogr with attributes, v.to.db and v.rast.stats then work. Third MSVC cause (dbf): lib/gis/rename.c removes an existing target only under MINGW32, so G_rename_file falls back to a text-mode G_copy_file that truncates at 0x1A (3-byte .dbf after the 2nd INSERT). dbf also rebuilt (build-db-driver.sh dbf, with C106 patches); ogr and pg not rebuilt; a conda reinstall undoes it; readers still need the workaround: v.in.ogr -t (no attribute table) then v.to.rast use=cat. Draft report temp/upstream/grass-dbmi-msvc-issue.md |
MEASURED 2026-11-28 |
scratchpad dbcheck.py, dbf_test.py; temp/proto/probe_ch06_grass.py |
| C99 |
Chapter 6 probe (NTT region, NPROCS 8): v.in.ogr -tr of a national ADM2 shapefile 2.8 s, 801 areas in region; v.to.rast use=cat 0.5 s, 23 zones with land cell centres; t.rast.univar zones= on 24 eddi_03m maps 8.0 s (columns id, semantic_label, start, end, zone, mean, min, max, …); r.out.gdal format=COG createopt=COMPRESS=DEFLATE 0.7 s, 64 x 32 on the AgERA5 grid (origin 118.85, -7.95, 0.1), LAYOUT=COG; r.out.gdal of a 24-map imagery group to netCDF 1.5 s, but GDAL sees 0 bands (one variable per map, no time axis). t.rast.export formats: GTiff, AAIGrid, pack, in a tar archive with a time list |
MEASURED 2026-11-28 |
temp/proto/probe_ch06_grass.py; t.rast.export manual |
| C100 |
NOAA CPC: ONI = “3 month running mean of ERSST.v6 SST anomalies in the Nino 3.4 region (5N-5S, 120-170W)”, centred 30-year base periods updated every 5 years; episodes when “the threshold is met for a minimum of 5 consecutive overlapping seasons”, threshold +/-0.5 C. RONI (relative ONI, 1991-2020 base, tropical mean 20N-20S SST anomaly subtracted, variance rescaled) “is used for official monitoring and prediction” of ENSO (NWS PNS 26-05); same +0.5 C, 5-season rule; table 1950-2026 on the page. No strength categories on these pages. The data file oni.ascii.txt read earlier (C96) is not identified as v6. RONI El Nino episodes 1979-2025 (parsed with pgca.enso): 1979-80 (peak 0.7), 1982-83 (2.4), 1986-88 (1.5), 1991-92 (2.1), 1993 (1.1), 1994-95 (1.3), 1997-98 (2.3), 2002-03 (1.3), 2004-05 (0.7), 2006-07 (0.9), 2009-10 (1.5), 2014-16 (2.3, NDJ 2015), 2018-19 (0.8), 2023-24 (1.4); 2026 AMJ-ASO ongoing RONI page verbatim: “3 month running mean of ERSST.v6 SST anomalies in the Nino 3.4 region (5N-5S, 120-170W) with average tropical mean (20N-20S) SST anomalies subtracted. The difference is then adjusted so the variance equals the original Nino 3.4 index.” Its text says warm is “greater than 0.5”, but its table colours 0.5 as warm; the rule >= 0.5 for >= 5 seasons reproduces the roni-warm cells with 0 mismatches 1950-2025 (claims-auditor); with a strict > the 1979-80 episode drops out (13 since 1979). Official-use statement is on the ONI v6 page, citing NWS PIS 26-05. 7 of the 14 episodes have tied peaks (first used): 1982-83, 1991-92, 1997-98, 2004-05, 2006-07, 2018-19, 2023-24 |
CITED 2026-11-28 (web-fetch) and MEASURED (parse) |
https://www.cpc.ncep.noaa.gov/products/analysis_monitoring/enso/oni/v6/ ; https://www.cpc.ncep.noaa.gov/products/analysis_monitoring/enso/roni/ |
| C101 |
v.to.rast (8.5 manual): “A grid cell belongs to the area where the grid cell center falls into.” Chapter 6: v.in.ogr -t key=zone gives categories equal to the zone column without an attribute table (grass-api-reviewer: dbln 0 bytes, 192 areas, none without category). NTT (geoBoundaries ADM2 with interior point in ADM1 “East Nusa Tenggara”): 22 districts; land cells of the rectangle 1,113: 389 in NTT districts, 12 in other Indonesian districts (118.9-119.1 E), 712 in no Indonesian district (Timor-Leste and sea-centre cells, not separated); Kota Kupang 1 cell, Sabu Raijua 2 |
CITED and MEASURED 2026-11-28 |
v.to.rast manual; temp/runs/ch06_executed.ipynb |
| C102 |
grass.jupyter TimeSeriesMap (8.5 source): docstring “experimental and under development”; show() is an ipywidgets slider, save() writes a GIF; renders frames in parallel with NPROCS. d_legend without raster= uses the dataset range (codes missing); use= values outside the given raster’s own range are a fatal error unless range= widens it (capped at the colour-table range, with a warning per frame); range= without raster= raises a duplicate-keyword TypeError (grass-api-reviewer). r.category map= without cats= lists only values present in the raster; cats=1-N reads the label file for every number. v.in.ogr -r imports whole features overlapping the region. r.out.gdal COG of an FCELL map without -c: GDAL “Unable to export color table” and a .tif.aux.xml palette side file. g.proj -w and v.what -g deprecated in 8.5 (use format=wkt / format=shell) |
CITED 2026-11-28 (grass-api-reviewer) |
GRASS 8.5 source and manuals |
| C103 |
t.rast.univar zones= in 8.5: the “cells” column repeats the non-null count (univar_statistics.py about lines 97-98); use non_null_cells. In Chapter 6 non_null_cells per district equals the numpy count of land cells in that zone |
CITED and MEASURED 2026-11-28 |
grass-api-reviewer; temp/runs/ch06_executed.ipynb |
| C104 |
Chapter 6 final run (empty ch06, NPROCS 8, Windows 11): 140 s, all checks passed. EDDI read 1,121 maps 15 s; 13 GIF frames 16 s with NPROCS 8 during the render, legend with all 11 categories and district outlines (206 kB; 28-29 s serial in earlier runs); t.rast.univar 12,364 rows 30 s, Dec 2015 vs numpy 2.1e-07; COG 64 x 32, no colour table, max diff 0; NetCDF 562 x 32 x 64, 1.1 MB, max diff 0, GDAL 562 bands; tar 53 files (24 .tif, 24 .color, 5 .txt), 0.2 MB; manifest: commit 0bed0c8a06 with 10 uncommitted changes, GRASS 8.5.0, GDAL 3.12.3; mapset ch06 209 files, 1.2 MB; outputs 2 MB |
MEASURED 2026-11-28 |
temp/runs/ch06_executed.ipynb |
| C105 |
Plain Python scripts (not notebooks) that use grass.temporal (or anything else that starts multiprocessing helpers) must put all code under if __name__ == "__main__":. On Windows the helpers start with “spawn” and re-run the script’s top level; the re-run fails with python.exe: can’t open file ‘…info.py’. This, not the mapset, explained the 2026-11-28 failures in ch05/ch06; with the guard t.info and pgca.tgis.summary work in both |
MEASURED 2026-11-29 |
temp/proto/tinfo_check.py |
| C106 |
dbf driver problems that are not Windows-specific (read from the 8.5.0 source; seen on Windows only): (1) since the shapelib 1.6.0 sync (GRASS PR #4395, 2024-09-29) DBFGetFieldInfo() reads N fields of width >= 10 as FTDouble; 8.4.0 and 8.4.2 still have a local patch against this; the driver writes integers with width 11, so cat reads back as DOUBLE PRECISION and v.db.addtable fails ‘wrong type’. (2) the sqlp parser has no double-quoted identifiers, but v.in.ogr quotes columns since PR #3605 (2024) and v.db.addcolumn quotes them; open issue #5687 covers the GUI symptom. (3) v.db.addcolumn (8.4.0 and 8.5.0) wraps SQL in BEGIN/END TRANSACTION, which sqlp cannot parse. Local patches for all three in temp/upstream/build-db-driver.sh; afterwards v.in.ogr with table, v.db.addtable, v.db.update, v.to.db, v.rast.stats, v.db.select match the sqlite results |
MEASURED 2026-11-29 (Windows) + source reading; PR number in (1) corrected 2026-12-04 (was #7279) |
temp/upstream/grass-dbf-issue-ready.md; https://github.com/OSGeo/grass/pull/4395 |
| C107 |
Preview retrofit (house rule ‘Look before moving on’): preview cells added as NEW code cells; outputs of unchanged cells kept from the clean runs, preview outputs from restart runs on the same mapsets (temp/runs/merge_hybrid.py, cell metadata pgca.outputs_from). Previews per chapter / added time: Ch1 4 / 4.2 s (full new run, checkpoint 37 s), Ch2 9 / 14.6 s (restart 597 s), Ch3 6 / 14.3 s (restart, run_full, 1,000 s), Ch4 8 / 19.1 s (restart, run_full, 1,755 s while other chapters ran), Ch5 8 / 10.6 s (restart 222 s), Ch6 7 / 5.7 s (restart 178 s). All six: 0 errors. grass.script.array.array(name, null='nan') on a CELL map returns int32 with nulls as -2147483648 (not NaN); pass dtype=float64 |
MEASURED 2026-11-29 |
temp/runs/ch0N_prev_executed.ipynb, ch0N_frozen.ipynb |
| C108 |
AgERA5 precipitation (local archive, 2015 file): variable Precipitation_Flux, units mm d-1, long_name “Total precipitation (00-00LT)”, cell_methods Sum 00-00LT, float32, fill -9999, chunks (31, 200, 400); archive has 1979-2026 (48 files) |
MEASURED 2026-11-29 |
method-critic + temp/proto/probe_ch07.py |
| C109 |
Ch 7 numpy prototype (method-critic, 1,113 rectangle land cells, seasons 1991-92 to 2020-21, from 1 Aug): driest climatological dasarian Aug-1..Sep-3 in 1,065 cells, Jul-3 in 48; BMKG onset in the first dasarian 9 of 33,390 cell-seasons; onset after 31 Jan: 646 (BMKG) / 495 (200 mm cumulative); no onset 2.3% (bulletin rule) vs 18.0% (strict three x 50 mm), the two rules differ in 46.3%; median onset Dec-1 dasarian (bulletin) vs Dec-3 (strict); 200 mm rule median of cell medians day 135 after 1 Aug; setting days < 1 mm to 0 leaves BMKG onset unchanged in 97.6% and delays 200 mm onset in 84.8% (median +2 d, p90 +6 d); Aug-Oct 52-53% of cell-days 0 < P < 1 mm. Seasons 1979-80..2024-25: 17 El Nino by episode overlapping Aug-Jan, 15 by SON (16 La Nina, 15 neither). GHCN-D in the box: Kupang and Waingapu 0 years with >= 330 valid days |
MEASURED 2026-11-29 (rectangle prototype; superseded for the 389 NTT cells by C112) |
temp/proto/ch07_numpy/ |
| C110 |
r.series.accumulate method=mean (8.5 source main.c): value = mean of the non-null inputs in the granule, no - lower, no clamp at 0, added to the base map; so one daily map per 1-day granule gives a running sum and negative values carry through. limits is required and checked (upper > lower) even for mean. t.rast.accumulate: a null cell adds nothing; a granule without an input map gets no output map (the next continues from the last total); two maps in one granule add their MEAN; outputs inherit the input’s title, description and semantic type. t.rast.accdetect: occurrence = days since cycle start where acc > min and acc < max (strict), all-null maps dropped unless -n; indicator 3 marks the last day inside the range (next map null), so a never-falling total gives only 1 and 2. Both scripts continue before advancing the cycle start, so a cycle without maps loops forever, silently with quiet (source, grass-api-reviewer 2026-11-29; not seen in a run). t.rast.aggregate.ds uses g.copy when an interval holds exactly one input map (temporal/aggregation.py), which gives read-only maps on this build (C111). t.rast.accumulate runs one r.series.accumulate per granule, serially, without -f, so its maps are DCELL (installed script about lines 430-455). t.rast.aggregate.ds also copies the input’s title, description and semantic type (sp.get_initial_values(), script about lines 179-188). pygrass Module needs limits=(lo, hi) and range=(lo, hi) as tuples |
CITED (source, 8.5 branch) + MEASURED (tuple) 2026-11-29 |
https://github.com/OSGeo/grass/blob/releasebranch_8_5/raster/r.series.accumulate/main.c ; installed t.rast.accumulate.py, t.rast.accdetect.py |
| C111 |
On this Windows build, maps made with g.copy are read-only files (-r–r–r–), maps made with r.mapcalc are not; a later overwrite of a g.copy map then fails (g.copy ‘Unable to copy’) or crashes r.mapcalc (exit 3221226505, 0xC0000409). Avoid g.copy for maps that may be overwritten |
MEASURED 2026-11-29 |
temp/proto/probe_ch07.py first runs, mapset ch07probe |
| C112 |
Chapter 7 clean run (empty ch07, teaching seasons 2015-16 and 2016-17, full record in numpy, Windows 11, NPROCS 8): 993 s, all checks passed; staging 54 s first run from archive (2 s once staged), 24.5 MB for 47 years; import + register 1,096 maps 49 s; dasarian sampler 42 s + t.rast.aggregate.ds 32 s (108 intervals); t.rast.accumulate 731 days 299 s; t.rast.accdetect 395 s (561 occurrence maps, first 2015-11-27; indicator values 1 and 2 only); mapset 37,272 files, 19 MB. GRASS = numpy: dasarian 0 mm difference, accumulation <= 0.0024 mm after a season, r.mapcalc BMKG onset 1113/1113, accdetect onset 1113/1113. NTT (389 cells), 1991-2020: driest dasarian Aug 318, Sep 47, Jul 24 cells; BMKG bulletin rule no onset 0.7%, median 21 Nov; strict rule 7.8%, 1 Dec; forms differ 40.0%; cumulative 200 mm median 3 Dec (100/150/250 mm: 18 Nov, 26 Nov, 8 Dec); same dasarian 34.2%, cumulative later 57.7%; season medians correlate 0.84; 0 < P < 1 mm on 35.0% of cell-days; El Nino (SON) 15, La Nina 16, neutral 15; El Nino vs others +20 d (BMKG, p 0.0004) and +18.5 d (cumulative, p 0.0006); vs neutral +10 d (p 0.24) and +12 d (p 0.03) |
MEASURED 2026-11-29 |
temp/runs/ch07_frozen.ipynb |
| C113 |
Chapter 7 memory (tracemalloc, temp/proto/mem_ch07.py): the 47-year record P is 141 MB (float32); onset.dasarian_sums adds a peak of 339 MB (float64 copy); the light-rain check (P1 + its dasarian sums) adds 507 MB on top of P. Chapter 7 extra prints (restart run): the 24 July-driest NTT cells are driest in Jul-III, 1-10 Aug mean 1.9 mm (max 3.2); no cell-season without onset at 100-250 mm in all 46 seasons (17,894 NTT cell-seasons); agreement one apart 41.9%, two+ apart 23.2%, cumulative later 57.7%; Aug-Jan grouping moves 1992-93 (episode starts Jan 1993) and 2014-15 (episode 2014-16 starts Nov 2014) |
MEASURED 2026-11-29 |
temp/proto/mem_ch07.py, temp/runs/ch07_frozen.ipynb |
| C114 |
r.in.gdal flags (8.5 manual): -k “Keep band numbers instead of using band color names”; -r “Limit import to the current region” |
CITED 2026-11-29 |
https://grass.osgeo.org/grass-stable/manuals/r.in.gdal.html |
| C115 |
Districts to zones at 0.1 degree, NTT (22 districts, ntt_districts.gpkg), AgERA5 land = cells with EDDI Dec 2015 (1,113): v.to.rast cell-centre rule 389 land cells; rasterio all_touched=True 608 (+219; 109 land cells touched by more than one district; Kota Kupang 1 -> 6, Sabu Raijua 2 -> 13, Sumba Timur 57 -> 82). GRASS route (v.to.rast on a finer grid in a temporary region, then r.resamp.stats method=mode back to 0.1 degree): finer by 10, 20, 50, 100 gives 581, 597, 603, 605 land cells, 1.3-1.9 s each; at 10, every cell with count > 0 has a zone, 5 land cells change district against the centre rule, 195 zoned land cells are less than half inside a district. r.resamp.stats output (mode, count) is DCELL; int() makes CELL |
MEASURED 2026-11-30 |
temp/proto/zones/alltouched.py, probe_zones.py (mapset scratch_zones; finer-grid loop run inline) |
| C116 |
Chapter 4 clean run with both references (empty ch04, run_full true, NPROCS 8, Windows 11, 2026-11-30): chapter 2,898 s (nbconvert 2,914 s), all checks passed, preview figures included. ETos 17,167 days computed in 1,016 s (59 ms per day), labels 40 s, registered 260 s; comparison read of 34,334 maps 727 s; ETrs computed 362 s, labels 40 s, registered 245 s (cell 652 s); etrs 17,167 maps, min -0.16, max 12.12 mm/day; etos unchanged (min -0.12, max 8.42, largest yearly RMSE vs et0 0.045). Teaching years over land: mean ETrs 5.32, ETos 4.56 mm/day, ratio 1.166; 15 Jul 2015 ETrs/ETos per cell 1.074-1.489 (mean 1.311). Mapset ch04 446,627 files, 317 MB. Teaching-years run in a fresh mapset (same build, run_full false): 209 s, ch04 19,291 files, 35 MB, etrs 0.29-10.88 mm/day. Same work as C90 ran 2.2x slower for ETos and 4.6x for the read: run-to-run variation on the same machine, cause not identified |
MEASURED 2026-11-30 |
en/04-reference-et.ipynb, temp/runs/ch04_teach2_executed.ipynb, temp/runs/rerun_4_to_7.log |
| C117 |
Chapter 5 on etrs (empty ch05, NPROCS 8, Windows 11, 2026-11-30): 402 s, all checks passed, figures included (monthly totals 100 s, write + register 2,238 EDDI maps 216 s, checkpoint 54 s); mapset ch05 36,780 files, 18 MB. Dec 2015 3-month: ranks 11-30 of 30, no ties, GRASS = numpy ranks, EDDI diff 4.7e-07, land mean +1.04, map min -0.38; window mean ETrs 5.82 vs baseline median 5.56 mm/day (+4.7%), 1-month 5.23 vs 5.03 (+4.0%). Category counts Dec 2015 (1/3/6/12 months): none 491/182/327/422, ED0 371/160/214/209, ED1 212/382/220/227, ED2 31/303/208/184, ED3 2/86/69/49. Share at ED1+ (3-month): Sep 2015 12.8%, Nov 2015 74.4%, Jan 2016 95.8% (1-month 82.1%, 6-month 74.1%); Oct 2014 83.6%, Nov 2014 73.4%; 1-month Feb 2016 0.1%, Apr 2016 45.1%; 12-month Jan-May 2016 41.9-63.9%, Sep 2016 12.4%. Whole record baseline: 227 of 1,113 cells change category (20%), mean EDDI +0.99 vs +1.04. eddi repo check (same file as A41, which records et0_product: ETrs): 194 cells, identical on 39%, mean diff -2.41, largest 43.3 percentile points (13 ranks), medians 96.7 here vs 93.3 repo; with this series’ ETos the same file agreed on 78% (A41). The repo’s process_climate_data loads temp/idn_cli_agera5_sumba_full_1981_2024.nc if it exists (compute_eddi.py lines 787-793) and writes the crop metadata from the current setting (lines 874-885), so the output can carry the tall-crop label over a saved ET0 of another crop; whether it did is not checked |
MEASURED 2026-11-30 |
en/05-eddi.ipynb; ../eddi/notebook/compute_eddi.py |
| C118 |
Chapter 6 with all-touched zones (FINE 50, empty ch06, NPROCS 8, Windows 11, 2026-11-30): 159 s, all checks passed, figures included (EDDI read 31 s, 13 GIF frames 15 s, t.rast.univar 24 s); mapset ch06 266 files, 1.6 MB; outputs about 2 MB. NTT land cells 603 (221 less than half inside a district); land cells per district: Kota Kupang 2, Sumba Barat 11, Sabu Raijua 13, … Sumba Timur 78; other Indonesian districts 25 cells (118.9-119.3 E), no Indonesian district 485. 3-month ED1+ share over baseline months 20.0%. Episodes (14): Spearman peak RONI vs largest 3-month share +0.10 (p 0.75), none at 100%; largest shares 38.6 (1979-80) to 99.7 (2023-24), 7 episodes at 94% or more; same-length windows reaching it 2.6% (2023-24) to 79.3% (1991-92); months inside windows with half or more at ED1+ 23.2% vs 8.7% outside, mean share 25.8% vs 12.5%; 1997-98 3-month share 71% in Mar 1998. District means at RONI peaks (21 districts with 5+ cells): 2006-07 all 21 at ED1+ (1.11-1.87); 1982-83 20 (Sabu Raijua 0.55); 2023-24 12 (Timor Tengah Utara, Belu, Alor 1.70-1.76; Sumba districts -0.21 to 0.76; Sikka, Ngada, Manggarai Timur, Rote Ndao, Manggarai 0.49-0.83); 2018-19 and 1986-88 none (2018-19 -0.14 to 0.68) |
MEASURED 2026-11-30 |
en/06-analysis-and-communication.ipynb, E:/temp/pgca/outputs/ch06/district_eddi_at_peaks.csv |
| C119 |
Chapter 7 with the all-touched NTT mask (603 cells; empty ch07, teaching seasons, NPROCS 8, Windows 11, 2026-11-30): 1,036 s, all checks passed (staging 3 s, import 52 s, sampler cell 43 s + dasarian aggregation 34 s, t.rast.accumulate 309 s, t.rast.accdetect 407 s); mapset 37,272 files, 19 MB. NTT 1991-2020 monthly means: Aug 12, Sep 18, Jul 22; Jan 284, Feb 269, Dec 256 mm. Driest dasarian: Aug 489, Sep 82, Jul 32 cells (Jul cells: 1-10 Aug mean 1.6 mm, max 3.2). BMKG bulletin rule: no onset 1.1%, median 21 Nov; strict rule 11.3%, 1 Dec; differ 42.4%. NTT mean onset day 143 (2015-16) vs 103 (2016-17); median map day 81 to 218. Cumulative thresholds 100/150/200/250 mm: median 21 Nov/30 Nov/6 Dec/12 Dec; no onset 0 of 18,090 (1991-2020). Rules: same dasarian 33.8%, one apart 41.2%, two+ 24.0%, cumulative later 56.7%, no onset by one or both 1.1%. Season medians: BMKG day 61-153, cumulative 69-156, correlation 0.87. Light rain: 36.3% of cell-days 0-1 mm; BMKG unchanged 97.6%, cumulative later 84.2%, median +2 d, p90 +5 d. Dry spell 10+ d within 30 d of onset: 0.6% BMKG, 0.9% cumulative. El Nino (15) vs all others: BMKG +15.0 d (p 0.0142 / 0.0141), cumulative +19.5 d (p 0.0006 / 0.0003); vs neutral: BMKG +10.0 (p 0.453 / 0.462), cumulative +12.5 (p 0.0058 / 0.0069); Aug-Jan grouping BMKG +20.0 d, p 0.003; La Nina medians -10 / -15 d |
MEASURED 2026-11-30 |
en/07-rainy-season-onset.ipynb |
| C86 |
Thread and process options: r.mapcalc nprocs default 0 (“use OpenMP default”); the standard option G_OPT_M_NPROCS reads g.gisenv NPROCS as its default (lib/gis/parser_standard_options.c, 8.5, lines 788-799), stored in the session GISRC only. t.rast.mapcalc nprocs is “Number of r.mapcalc processes to run in parallel” (default 1) and runs each r.mapcalc with nprocs=1 hard-coded (grass/temporal/mapcalc.py line 421). grass.jupyter reads NPROCS for its core count (jupyter/utils.py line 440) |
CITED 2026-11-28 (grass-api-reviewer, claims-auditor) |
manuals r.mapcalc, t.rast.mapcalc, g.gisenv; GRASS 8.5 source |
| C87 |
r.resamp.stats -w: “weighted according to the proportion of the source cell which lies inside the output cell”; r.resample is nearest neighbour (cell centre, C47). r.in.gdal -r on the Copernicus VRT kept 3 arc-second cells and left the region unchanged (measured) |
CITED 2026-11-28; MEASURED (Ch 4 cell output) |
manuals r.resamp.stats, r.resample |
| C88 |
t.list ... separator="|" fails on Windows (“The syntax of the command is incorrect”); separator="pipe" works; one t.list for 6 datasets with columns name,start_time,end_time took 5.4 s; t.list has no format option in 8.5.0 |
MEASURED 2026-11-28 |
scratchpad tlist.py |
| C89 |
r.mapcalc output of {fcell} - 273.15 is DCELL: etos_20150715 9,898 bytes vs tmax_20150715 5,039 (f_format type: double); float(...) makes FCELL |
MEASURED 2026-11-28 (grass-api-reviewer) |
ch04/cell_misc/etos_20150715/f_format |
| C13 |
pygrass: Module(..., run_=False) defers execution; finish_=False runs in background, then wait() and returncode; ParallelModuleQueue launches modules in parallel; RasterRow row read / sequential write, RasterRowIO cached read, RasterSegment random read/write; reading and writing the same map at once is not supported. Manual examples use Python 2 syntax |
CITED 2026-11-27 |
https://grass.osgeo.org/grass-stable/manuals/libpython/pygrass_index.html and pygrass_modules / pygrass_raster / pygrass_gis pages |