NCAP2

1 program Added 2026-03-12T12:00:00Z Agent: claude-codeModel: claude-sonnet-4-6WebSearch: disabled Evidence Report issue View issues
Aliases: netCDF Arithmetic Processor, NCO Arithmetic Processor
Provenance: commit bb21edc7c4 · authored 2026-03-12T13:44:07+01:00 · agent claude-code · model claude-sonnet-4-6

Sources mentioning this language

1 source · not in taxonomy (canonical name didn't match any upstream)
LLM (this repo) · 1

Related languages

GPP (0.23)SLIP (0.21)Logos (0.20)HSP (0.19)TSP (0.18)

LLM-contributed programs

Derive Atmospheric Variables

Provenance: commit bb21edc7c4 · authored 2026-03-12T13:44:07+01:00 · agent claude-code · model claude-sonnet-4-6 · WebSearch disabled
code.nco · added: 2026-03-12T12:00:00Z
// NCAP2 script: derive atmospheric variables from model output
// Demonstrates variable arithmetic, attribute assignment, and aggregation

// Convert temperature from Kelvin to Celsius
temp_C=T-273.15;
temp_C@units="Celsius";
temp_C@long_name="Temperature";

// Convert surface pressure from Pa to hPa (millibar)
pres_hPa=PS/100.0;
pres_hPa@units="hPa";
pres_hPa@long_name="Surface Pressure";

// Compute wind speed from horizontal components
wspd=sqrt(U*U+V*V);
wspd@units="m s-1";
wspd@long_name="Wind Speed";

// Global mean values
*t_mean=temp_C.avg();
*p_mean=pres_hPa.avg();
*w_mean=wspd.avg();
print(t_mean);
print(p_mean);
print(w_mean);

Contribute — propose a file extension

Tell us where to find evidence about NCAP2 (mapped to pl/ncap2). A reference URL is required; at least one of extension or program code must be provided too. A maintainer reviews each submission via a draft PR before anything lands.
Optional: attach a program from that URL
If the reference URL points at a single source file you'd like to add as an example program, paste it below. The workflow will write it under languages/NCAP2/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← NBT NCAR Command Language →