NCGEN3(1) UNIDATA UTILITIES NCGEN3(1) (NAME) ncgen3 - netCDF C Fortran CDL (SYNOPSIS) ncgen3 [-b] [-c] [-f] [-k kind_of_file] [-x] [-n] [-o netcdf_filename] input_file (DESCRIPTION) ncgen3 netCDF C Fortran netCDF . ncgen3 netCDF CDL ( network Common Data form Language) . ncgen3 CDL CDL . netCDF C C netCDF netCDF Fortran Fortran netCDF netCDF . ncgen3 ncdump netCDF . netCDF ncdump CDL netCDF CDL ncgen3 netCDF CDL . (OPTIONS) -b netCDF (). -o netCDF ( netcdf ) `.nc' . . -c C netCDF netCDF . C . -f Fortran netCDF netCDF . Fortran . -o netcdf_file netCDF . "-b" . ( netCDF seek .) -k kind_of_file -k2 -k "64-bit offset" ( ) . ("classic") netCDF . (NetCDF-4 netCDF "netCDF-4" "netCDF-4 classic model" .) : -v -k -k ncdump . -x (fill values) . netCDF . (EXAMPLES) CDL `foo.cdl': ncgen3 foo.cdl netCDF `x.nc' CDL `foo.cdl': ncgen3 -o x.nc foo.cdl C netCDF netCDF `x.nc' CDL `foo.cdl': ncgen3 -c -o x.nc foo.cdl CDL (CDL Syntax Summary) CDL netCDF (lat lon time) (Z t p rh lat lon time) (units long_name valid_range _FillValue) . CDL (bold) . ( CDL .) netcdf foo { // an example netCDF specification in CDL dimensions: lat = 10, lon = 5, time = unlimited ; variables: long lat(lat), lon(lon), time(time); float Z(time,lat,lon), t(time,lat,lon); double p(time,lat,lon); long rh(time,lat,lon); // variable attributes lat:long_name = "latitude"; lat:units = "degrees_north"; lon:long_name = "longitude"; lon:units = "degrees_east"; time:units = "seconds since 1992-1-1 00:00:00"; Z:units = "geopotential meters"; Z:valid_range = 0., 5000.; p:_FillValue = -9999.; rh:_FillValue = -1; data: lat = 0, 10, 20, 30, 40, 50, 60, 70, 80, 90; lon = -140, -118, -96, -84, -52; } CDL . . () `//' . CDL : dimensions variables data dimensions: variables: data . (variable declarations) (attribute assignments) . dimension netCDF netCDF . netCDF . netCDF unlimited ( ). variable . . (attributes) ( ). variable CDL . . . attribute netCDF netCDF netCDF . (units) . . "units" "celsius" . . ( ) . CDL `:' . `:' (global) netCDF . CDL . . . . CDL `_' `_' `-' . data CDL netCDF . : ( ) . . ` ' (fill value) `_FillValue' (override) . (coercion) . `_' ..SS " (Primitive Data Types)" char byte short long int ( long) float IEEE ( ) real ( float) double IEEE ( ) byte unsigned CDL C . CDL . . . ncgen3 byte C char BYTE . Short -32768 32767 . ncgen3 short C short INTEGER*2 . Long -2147483648 2147483647 . ncgen3 long C long INTEGER . int integer long CDL . long C int . Float -3.4+38 3.4+38 . IEEE . ncgen3 float C float REAL . real float CDL . Double -1.7+308 1.7+308 . IEEE . ncgen3 double C double DOUBLE PRECISION . CDL (CDL Constants) netCDF . C short float longs doubles . byte (escape sequence) . 'a' // `a` ASCII '\0' // '\n' // ASCII '\33' // ASCII ( ) '\x2b' // ASCII ( 2b) '\377' // = ASCII . . C . "a" // `a` ASCII "Two\nlines\n" // "a bell:\007" // ASCII netCDF "a" NULL . C ncdump . NULL : byte . NetCDF CDL . short . short `s' `S' . short `0' `0x' . : -2s // -2 short 0123s // (octal) 0x7ffs // (hexadecimal) Long . long `l' `L' . long `0' `0x' . long : -2 1234567890L 0123 // (octal) 0x7ff // (hexadecimal) float . float C `f' `F' . float : -2.0f 3.14159265358979f // 1.f double . double C . `d' `D' . double : -2.0 3.141592653589793 1.0e-20 1.d ncgen3 -c -f (continuation statements) . CDL netCDF netCDF netCDF . NetCDF CDL . Printed: 0-0-0 $Date: 2009/09/24 18:19:10 $ NCGEN3(1)