# Software

Software tools to increase access to and display of data have been developed, and a substantial service activity within CGD has been devoted to outreach and teaching of data processing software, in particular the NCAR Command Language (NCL). NCL is the primary tool used to create the Community Data Sets previously described, and so it can readily access these data and transform them to common grid resolutions. NCL provides scientists with a robust, supported software tool for file handling, computations, and high quality graphics. An overarching goal of the NCL developers within SCD and collaborating members of CGD is to ensure that NCL can address the evolving and diverse needs of the modeling and observational communities. Some examples include:

- Functions which use spherical harmonics to enable highly accurate regridding and derivations from basic quantities;
- Interpolation functions including from hybrid coordinates to pressure coordinates; and
- Special graphical templates that facilitate the creation of figures with consistent style.

## General netCDF

netCDF operators (NCO): A suite of operators designed to efficiently process netCDF data. Functionality includes concatenation, extraction, attribute modification, and averaging. In addition to the user's manual on the main NCO web site, there is a NCO user's manual that focuses on some of the most common applications within CGD.

You can also find toos specifically designed to process netCDF files on the UNIDATA website.

## CCSM Data

ccm2nc: An operator which efficiently converts files in CCM History Tape (CCMHT) format to netCDF following the CSM netCDF conventions. This tool can handle CCMHT files written with Cray or IEEE. Brian Eaton is the creator and point of contact for this executable. There is an AIX version of the executable for use on blackforest. The path is: /fs/cgd/csm/bin/AIX/ccm2nc

Install notes: This code requires that the version 3 netCDF libraries be installed on your system. Then download, uncompress and "tar -xf" the hUtils-1.x.tar.Z distribution code. Sample Makefiles are included in the distribution. Modify the Makefile most appropriate for your system to reflect the location of your system libraries. Then run "make" to build the ccm2nc executable.

## Other Software

#### Dave Stepaniak's Software

These scripts were created by Dave Stepaniak, a member of NCAR's Scientific Computing Division.

- Fortran 90 subroutine
`CYCLOSTATIONARY_WD`: This subroutine computes cyclostationary EOFs (CSEOFs), their principal component time series, and the percent variance explained by each CSEOF. Portions of the code are proto- typed after Dr. Kwang-Yul Kim 's (Florida State University) `cseofx.f' for cyclostationary analysis. (The _WD indicates that the dependencies`WEIGHT`and`INTEGR`are included in this subroutine. On the other hand, one must link the LAPACK library, as`SSYEV`is also a dependency and is used to compute the eigenvalues and eigenvectors of a real symmetric matrix – in this case the covariance matrix.) It is noted that the qualitative and quantitative characteristics of the ends of the output PC time series (say the first and last year of monthly mean data for example)*depend on the temporal length of the input time series*– this cannot be emphasized enough. The reason is that a localized window (approximately, a Morlet mother wavelet function to render a localized Fourier transform within the `nested period') is applied to the data – at the end points of the input time series, only half of the window is being applied,*no matter how one selects or preconditions the end portions of the data*. Hence it is best to ignore a segment of length equal to the nested period at the beginning and end of the output PC time series. - An
`f90 makefile`for middlepark / winterpark. (Still useful in modified form for dataproc.) - C shell script
`rc2lm`for transferring files from middlepark / winterpark to local (CGD) machines by remote copy. (Severely outdated, but may still be useful for some applications in modified form.) - Fortran 90 subroutine
`native_4byte_real`: For converting a 32 bit, 4 byte, REAL from big Endian to little Endian, or conversely from little Endian to big Endian. - C function
`sysdate`: Returns the system date as a null terminated character string. - Fortran 90 FUNCTION
`V_INT_PRESS`for performing vertical integration of data archived on pressure levels. - Fortran 90 SUBROUTINE
`eof_scalar`for computing Empirical Orthogonal Functions (EOFs) of stationary scalar data fields. [Fortran 90 routines for computing complex EOFs of 2D vector fields, and extended EOFs (EEOFs) of scalar data fields, have also been written and tested and are made available upon request.] - Fortran 90 SUBROUTINE
`CCMP_ZM_MPSI`for computing a zonal mean meridional stream function based on the CCM processor definition of MPSI. - Fortran 90 SUBROUTINE
`ccm2_hydro_mat`for computing the CCM2 hydrostatic matrix**H**. An example of the use of**H**is f90 matrix-based calculations of Z2. [Z2 (a CCM Processor Code-Defined Derived Field) is the geopotential height based on the CCM2 hydrostatic formulation.] - Fortran 90 SUBROUTINE
`CCM2_Z2_sigma`for computing Z2, geopotential height based on the CCM2 hydrostatic formulation, on sigma levels. - Fortran 90 MODULE
`mod_reorder_dims`which is a generic subroutine INTERFACE and set of MODULE PROCEDURES for reordering the dimensions of multidimensional arrays of rank 2, 3, 4, and 5. - Fortran 90 SUBROUTINE
`UNBIASED_CORRELATION`for computing cross- and autocorrelations of time series. The time series may have gaps in their data. - IDL script
`RFH_NCURVE.idl`generates a relative frequency histogram for a given discrete (or nearly continuous) and presumably random variable (perhaps such as surface temperature anomalies), and overlays a normal curve with the same standard deviation as the variable and same area as its histogram.