Previous Next Contents

5. Output Format

Each modeling group must provide their output in the standard OCMIP-2 format. Model output that does not follow these formatting conventions cannot be included for analysis during OCMIP-2. Model groups must use the standard routines that we have developed specifically for writing output in standard form for OCMIP-2.

5.1 Spatial information

Some of the models participating in OCMIP-2 are Irregular, which means that one 1-D array in latitude and one 1-D array in longitude are insufficient to describe the position of all grid points. Models with an irregular grid require a 2-D array in latitude and a 2-D array in longitude to describe the horizontal positioning of grid points. During OCMIP-2, regularly spaced models (those for which 1-D arrays in latitude and longitude are sufficient), will still write their output in the same irregular format. This will allow consistency between models for analysis, although at the price of somewhat larger output files.

Following the GDT conventions, all OCMIP-2 models will provide latitude and longitude information at the center of each tracer grid box and on all four corners (lower left, lower right, upper left and upper right) that are associated with each tracer grid point. Here is an example of a 2-D array in longitude and its corresponding boundary array (both with indices at their maximum values):



Analogous arrays are needed for latitude.

5.2 Output routines

For Early Output and Late Output each modeling group must use the three routines listed in the following table. Input to these routines consists of your model's output and characteristics. The first routine write_nc_MaskAreaBathy.f must be called only once (for the 1st output year--1940). The second routine write_nc_CFC_year.f must be called for every output year (see previous section Output type and frequency). The third routine write_nc_SurfTS_year.f must also be called for every output year for online models, but only once (the first output year) for offline models.

Routine                        Input                Units              Comments

write_nc_MaskAreaBathy.f     Tracer Mask          Land=0/Ocean=1         (1)
                             Surface Area         m^2
                             Bathymetry           m

write_nc_CFC_year.f          Conc. of CFC-11      mol/m^3                   
                             Conc. of CFC-12      mol/m^3
                             Mean Flux of CFC-11  mol/(m^2*s) 
                             Mean Flux of CFC-12  mol/(m^2*s)
                             Cum. Flux of CFC-11  mol/m^2
                             Cum. Flux of CFC-12  mol/m^2

write_nc_SurfTS_year.f       Sea Surf. Temp.      degrees C              (2)
                             Sea Surf. Salinity   psu                   
(1) Also includes other input arguments, as necessary to define 
    position of grid boxes (latitude, longitude, and depth specifications)
(2) For online models,  monthly SST and SSS should be saved each year
    for which other output is written (with write_nc_CFC_year.f); 
    for offline models, monthly SST and SSS may be saved for just one year,
    since there is no year-to-year variation.

Please send e-mail now ( concerning whether you have an offline or online model.


  1. Longitudes must be expressed in degrees as eastward positive (e.g., 120W is to be expressed as -120; 120E is to be expressed as +120).
  2. Latitudes must be expressed in degrees as northward positive. (e.g., 90S is to be expressed as -90; 90N is to be expressed as +90).
  3. Depth must be expressed in meters as positive downward (e.g., the depth of 1000 m is to be expressed as 1000).
  4. For irregular model grids which must be stored as a 1-D vector instead of a 2-D array (e.g., model AWI), you must set jmt=1, and not imt=1.
  5. You must provide model output on a grid without overlapping boxes. For example, if for longitudes of your model then you must only provide model output for values from i=2 to i=imt-1. Future reference to i during OCMIP-2 analysis will thus be shifted by one, relative to that used in your model.

5.3 Downloading the output routines

The output routines for your model class can be found in or, in the HTML version of this document, by clicking on the three links below, while holding down the Shift key.

Routines for writing out results for Transport Output and Equilibrium Output will be made available soon.

You will also need to transfer the subroutine handle_errors.f to properly deal with errors while you are writing your netCDF files.

5.4 Compiling the output routines

Here is a an example of how you would compile one of the output routines:

f77 -c -O -L/usr/local/lib -lnetcdf -I/usr/local/include \

Because we have made these routines F77 compatible, you may need a function len_trim.f (from F90), which we also provide and which returns the length of a character string (after neglecting trailing blanks).

5.5 Using the output routines

These routines write out your model results following the naming and output conventions (netCDF, COARDS, GDT) chosen for OCMIP-2. The output filename is constructed automatically within each routine from three of the arguments: the tracer name, the year, and the standard model code used during OCMIP-2 to identify your group.

For example, after compiling and linking the OCMIP-2 output routines, we add the following code to the IPSL routines to store output in standard OCMIP-2 form

        call write_nc_CFC_year("IPSL","NGL46_SI",
     &  imt, jmt, kmt,
     &  1985, 60*60*24*365, 1200,
     &  CFC11, CFC12,
     &  MF_CFC11, MF_CFC12,
     &  CF_CFC11, CF_CFC12) 

By line, the arguments include

  1. the OCMIP-2 model code AND your own model version indicator (in GDT 1.2 terminology, these 2 variables refer to the institution and production, respectively);
  2. dimensions;
  3. the year, the number of seconds per year (in your model), and the number of timesteps per year;
  4. the 12 monthly means for the 3-D tracer arrays for CFC-11 and CFC-12;
  5. the 12 monthly means for the 2-D air-sea flux for CFC-11 and CFC-12; and
  6. the end-of-year 2-D cumulative flux (from t=0) for CFC-11 and CFC-12.

All arguments are input. The only output is the final netCDF file, (""), which contains the information for analyzing the IPSL results for 1985. This file along with all others from the 3 routines above should be transferred to IPSL. Filenames should NOT be changed. At IPSL, files will subsequently be (1) tested for consistency, (2) included in the OCMIP-2 data base, and (3) processed for base analysis.

5.6 Need more details?

See for additional information about the format netCDF and other conventions (COARDS, GDT) chosen for storing OCMIP-2 model output.

If you have other questions, please contact, or

Previous Next Contents