Here is a sample fortran file for making netcdf files:
write_cdf.f

1. Save this file as write_cdf.f

2. To compile this program on our linux boxes, first make sure your pgf77 works.

3. COMPILING AND LINKING: Then type

      pgf77 -o my_exe  file.f  -lnetcdf -lodb

or,  if you have libnetcdf.a and libodb.a in your own lib directory:

      pgf77 -o my_exe file.f -L/home/yourname/lib -lnetcdf -lodb

4. RUNNING:  Now you can run the program:

      my_exe -h

      to get a brief usage description, or

     my_exe

      to run the model with all the default variable names, which will create a netcdf file with the default name of odb.nc

5. VIEWING: To look at the beautiful file you have just created, type

ncdump odb.nc  | less

    or

ncview odb.nc

   Or, to the truly adventurous, read the file into matlab:

         >> ncload('odb.nc')
         >> whos
          >>contourf(X,Y,VARXY)

    or plot the data using ingrid:

          ingrid < my.ing

    where my.ing is the following file:

                 \begin{ingrid}
                 PS
                  (odb.nc)readCDF  .VARXY
                  X Y COLOR
                  \end{ingrid}

Send e-mail questions to naomi@ldeo.columbia.edu .