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)
Related languages
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
// 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);