Version 5.2.8 of the netCDF Operators (NCO) has been released. NCO is an Open Source package that consists of a dozen standalone, command-line programs that take netCDF files as input, then operate (e.g., derive new data, average, print, hyperslab, manipulate metadata) and output the results to screen or files in text, binary, or netCDF formats.
The NCO project is coordinated by Professor Charlie Zender of the Department of Earth System Science, University of California, Irvine. More information about the project, along with binary and source downloads, are available on the SourceForge project page.
From the release message:
Version 5.2.8 mostly contains features and fixes for regridding and climatology generation. Climatologies now allow the choice between two statistics (sums and means) to output as regional/global timeseries. The regridder fixes corner case behavior when the sub-gridscale (SGS) fraction is a missing value (as in ELM/CLM). Many improvements to the robustness and helpfulness of WARNINGs and ERRORs are included. Upgrades are encouraged for everyone who uses the regridder on ELM/CLM/CTSM datasets.
New Features
-
ncclimo
has two new options to control global/regional timeseries:--rgn_stt=avg|sum
and--sum_scl=sum_scl
. These options allow the user to choose which statistic, sums or averages, to output with global/regional timeseries for all variables. The option--rgn_stt=avg
is identical to the current timeseries output by the--rgn_avg
switch (which will be deprecated eventually). When invoked with--rgn_stt=sum
the averaged field is multiplied by the sum of the area variable. For fields that are area-intensive (e.g., fluxes per unit area) this results in the total net flux over the area. However, the field must employ the same area units as the Area variable for this to be true. For example, fields given in m-2 would need to employ an Area variable in m2. Unfortunately, many people love non-SI units so that is rarely the case! For example, ELM and CLM archive Area in km2, so a scale factor of one million is needed to correct the sum for many variables. EAM and CAM use sr-1 for Area so it needs a different scale factor. That is whyncclimo
accepts a second new option--sum_scl=sum_scl
. This scale factor multiplies the integrated field value, and allows the user to generate timeseries in the desired units for any field. The whole procedure is model and variable-specific and we are open to suggestions to make it more useful. Example usage is:# Timeseries of global GPP in grams/s for ELM/CLM: ncclimo -P elm --split --rgn_stt=sum --sum_scl=1.0e6 -v GPP ... # Timeseries of global GPP in GT C/yr for ELM/CLM: ncclimo -P elm --split --rgn_stt=sum --sum_scl=1.0e6*3600*24*365/1.0e12 -v GPP ... # Timeseries of global column vapor in kg for EAM/CAM: ncclimo -P eam --split --rgn_stt=sum --sum_scl=6.37122e6^2 -v TMQ ...
http://nco.sf.net/nco.html#ncclimo
http://nco.sf.net/nco.html#rgn_stt
http://nco.sf.net/nco.html#sum_scl
Additional details are available in the ChangeLog.