Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The NCO command, ncclimo (formerly climo_nco.sh) will generate and regrid all climatology files (NB: from model or measurement monthly input files).  The primary documentation is here. This presentation, given at the Albuquerque workshop on 20151104, conveys much of the information presented below, and some newer information, in a more graphical format. Currently (2016042220161202) the major difference between the commands is that ncclimo fully implements the CF climatology-bounds and climatological statistics (for cell_methods) conventions and extended climatologies, whereas climo_nco.sh does not.

...

Use ncclimo if possible. It requires and comes with NCO version 4.6.0 and later.  Its predecessor climo_nco.sh (which is deprecated) requires NCO version 4.5.2 or later. The newest versions of NCO are installed on rhea/titan.ccs.ornl.gov at ORNL, pileus.ornl.gov (CADES at ORNL), cooley/mira.alcf.anl.gov at ANL, cori/edison.nersc.gov (NERSC), aims4.llnl.gov (LLNL), roger.ncsa.illinois.edu (NCSA), and yellowstone.ucar.edu (NCAR). The ncclimo and ncremap scripts are hard-coded to find the latest versions automatically, and do not require any module or path changes. To use other (besides the ncclimo and ncremap scripts) NCO executables from the command-line or from your own scripts may require loading modules. This is site-specific and not under my (CZ's) control. At OLCF, for example, "module load gcc" helps to run NCO from the command-line or scripts. For other machines check that the default NCO is recent enough (try "module load nco", then "ncks --version") or use developers' executables/libraries (in ~zender/[bin,lib] on all machines). Follow these directions (on  on the NCO homepage ) to install on your own machines/directories. It can be as easy as "apt-get install nco", "dnf install nco", or "conda install nco-c conda-forge nco", or you can build/install from scratch with "configure;make install". 

The older version of ncclimo is climo_nco.sh which is distributed separately from NCO, and therefore cannot be as tightly coupled to new NCO features. The two are still nearly interchangeable so all documented features (except where indicated otherwise) apply to both.  You can obtain the deprecated script at https://github.com/ACME-Climate/PreAndPostProcessingScripts/blob/master/generate_climatologies/climo_nco.sh or check-out the entire PreAndPostProcessingScripts Git repo (a better option for keeping up-to-date with changes to this script) with "git clone https://github.com/ACME-Climate/PreAndPostProcessingScripts.git ". Sometimes this works better: "git clone git@github.com:ACME-Climate/PreAndPostProcessingScripts.git". Here's the ACME Git Tutorial. If you have permissions problems, try this: https://help.github.com/articles/generating-ssh-keys/.

Using ncclimo:

Basic:

The basic way to use ncclimo is to bring up a terminal window and simply type:

ncclimo         -s start_yr -e end_yr -c run_id -i drc_in -o drc_out # CAM

...

The extended native and regridded climatologies are produced with virtually the same command (only the input and output directories differ). No mapping file or regridding option is necessary to produce an extended climatology from two input regridded climatologies. ncclimo need not know or care whether the input climos are native-grid or are already regridded. So long as the regridded climatologies are already available, it make sense to use them rather than to perform a second regridding. While ncclimo can generate and regrid an extended climatology from native-grid inputs in one command, doing so involves more command-line options and it is generally simpler to follow the above procedure. Ask me if you would like help customizing ncclimo for other such workflows. Producing extended climatologies via the binary method consumes much less memory than producing normal or incremental climatologies. The binary method simply computes weighted averages of each input variable. Hence the maximum RAM required is approximately only three times the size of the largest input variable. This is trivial compared to the total input file size, hence the extended climos may be computed with background parallelism, which is the default in ncclimo. Hence the The '-p mpi' option is never necessary for producing extended climos using the binary method. As you might imagine, the combination of low memory overhead and re-use of previously regridded climos means that producing extended regridded climos via the binary method is extremely fast compared to computing normal climos. Binary climos (regridded or not) require only about 1 minute on Edison.

...