Data Resources: PSD netCDF Support Routines: Reading netCDF data in Fortran Code


There has been some small documentation change. Basically, we are discouraging use of "call netopen" and instead you should try to use the standard ncopn and ncvid calls (or version 3 of the calls).

This document for version 1.3 of the netopen package supersedes all previous versions (see Cathy Smith in rm. 1D-106, phone: 497-6263, or e-mail cathy.smith@noaa.gov for any questions).

Please use -lnetopen to link the most recent version (1.3) of the library.

Jump to Changes, Using the New Version, Missing Values, Examples, Troubleshooting, Datasets, Variables and Levels, or Netopen Data Dictionary Info.


Latest changes 05/09/2003 by CAS

The changes to netopen should allow all COARDS compatible files to be read via gridread and similar routines. In addition, you should be able to read all netCDF files that are COARDS compatible except for the time. In those cases, gridread and similar routines will return -99,-99,-99,-99 for year, month,day and hour. Routines like timeindex or dayread that rely on time will NOT work for those files.

Note on common gridread user error concerning netopen versus gridread

The routine netopen will open a file. The command gridread will read from it. For files which contain multiple years (e.g. NCEP monthly means), it does not matter which year you specify in the netopen as you are simply opening up the one file. To read multiple years of data, you must change what is in gridread. If a dataset consists of multiple files with one for each year, then netopen will open a different file when you use a different year. Gridread will read the file corresponding to the fileid in gridread and opened in netopen.

Changes from Version 1.2 to Version 1.3

Past users of these routines should note some changes to the capabilities as well as additions in functionality. These changes were needed to provide the following additional capabilities:
  • Provide capability to open and read Gaussian grid files
  • Provide capability to open and read spectral coefficient files
  • Floating point equality checks have been improved to include a tolerance
  • Added ability for users to create their own data dictionary file and access it through an environment variable
  • Fixed netlink bug which disallowed the use of multiple variables in conjunction with created net links has been fixed
  • Further cleanup and bug removal of the netopen subroutine
  • Fix a number of other bugs
Notes on changes:

The addition of the gridtype parameter to the netopen call and elimination of the second variable parameter, calls to netopen will change fairly significantly as you will see by following the link above. (Note: to read covariance variables in the cddb dataset, you must now concatenate the two variable names with a separating underbar e.g. vwnd_vort) Further, the specread subroutine has been added to allow users to read spectral coefficient files.

If you'd like there is detailed information available.

The following allows you to learn about old version of and changes to netopen:


Using the Version 1.3 Netopen routines

For those already familiar with netopen skip to linking commands, netop_init, netopen,varopen, gridread(x), dayread(x), specread, timeindex,headread, netlink

Alternatively, if you do not plan on making any changes to the subroutines, you can link with the library netopen1.3 in the same directory, by including:

   -lnetopen -lnetcdf -ludunits -luduerr
at the end of your compile and load command.

X The gridread, gridreadx, dayread, and dayreadx subroutines are set up to read rectangular or Gaussian gridded data of up to 360x360 points and return an array starting at the South pole and proceding North regardless of how the data is stored in the actual netCDF file. The specread subroutine is capable of reading up to 4032 spectral coefficients (truncation of 124). Further, since dynamic allocation is not standard in Fortran 77, it is important that you pass in an array variable which is dimensioned according to the size of the grid (or vector of spectral coefficients) in the netCDF file. (Note: you can determine this by using the cdcncdump -c command on the file). If you pass an array that is too small the software will crash, and if it is too large the indexing will be wrong.

This software can be used to read grid sizes larger than 360x360 by changing the maxlat and maxlon parameters to the appropriate grid size. Additionally, by changing the maxnumvalues parameter the spectral coefficient truncation size readable can be increased.

Basic steps to reading a netCDF file in fortran code:

  1. Put the following at the top of your program (starting in column 7 or greater):
          include '/usr/local/include/netcdf.inc'
    
  2. Call the netopen initialization routine netop_init with an empty argument list.
  3. Open one or more files. Also, retrieve identifying variable IDs for each variable in each file.
  4. If looping, find start and stop time index.
  5. Read in a grid (looping through data, if desired).
There's not much to it. The subroutines keep track of locations of files, indices, and the unpacking operation.

The specific routines that accomplish the above are as follows:

  1. Call the initialization routine.

    call netop_init() - Note: you need only call this routine once in your program

  2. Locating and opening files and returning variable IDs for each variable.

    There are two ways to obtain file and variable id for each file. The first and one I would suggest is to use the following:

    inet=ncvid("filepath/name",0,ierr)
    ivar=ncvid(inet,"variable",ierr2)

    The filepathname should be the full name and might be something like /Datasets/cmap/enh/precip.mon.mean.nc". ierr and ierr2 are integers which can hold the return error code. variable is the netCDF variable such as "sst" or "hgt". You will use inet for the file id and ivar for the variable id for a particaular file.

    Or, you can use netopen which should find the file based on the parameters. As files are now stored in logical directory structures, I would suggest not using this but generally, it should work. call netopen(nyear,dataset,gridtype,cvar1,statistic,flevel,netid,ivarid)

    nyear     = year of file you want (integer) 4 digit.
    	    Applies to NCEP once daily data and 
    	    NCEP/NCAR Reanalysis data.
    dataset   = dataset name (e.g. 'nmc') - character variable 
    	    (See Datasets below)
    gridtype  = type of grid you wish to read one of the set {'rect', 'gaus',
                or 'spec'} for rectangular, and Gaussian grids, and spectral 
                coefficients respectively.
    cvar1     = input name of variable you wish, e.g., 'hgt', 'uwnd', 
    	    'vwnd', 'slp', etc.  (See Variables below).  cvar1 must 
    	    be a character!
    statistic = whether data is mean, nobs, stddev, etc.  Currently 
                only needed for COADS and similar datasets . 
    	    Statistic is a character variable.
    flevel    = floating point pressure, sigma, theta, etc, (see 
    	    Variables and Levels 
    	    for information needed for some datasets).
                (For example, 850.0 when requesting the ECMWF 850 mb 
                air temperature). 
                Use 0.0 for a multi-level file like the NCEP/NCAR Reanalysis
                pressure level data.  Use 2000.0 for the surface and
                use 3000.0 for the NCEP/NCAR Reanalysis tropopause data.
    netid     = returned file ID (must be integer)!
    ivarid    = returned variable ID (must be integer!)
    
    Datasets currently supported in netopen are listed at the end of this document. In some cases, not all parameters are needed to identify a file. If a character parameter is not needed, input a null character '' (i.e. 2 single quotes). The returned variable ID and fileID are needed to refer to a particular variable. Note: this subroutine will output the full pathname of the file found based on the input parameters. If you are unsure about the contents of the file you can see its metadata by using cdcncdump -c on the file to see its metadata.

  3. To read more than one variable in a file do not call netopen more than once. Instead, call the netCDF variable ID subroutine for the other variable(s) or, call the following:

    call varopen(netid,var,ivar2)

    netid = input file ID as returned from netopen (must be integer)
    var   = input name of variable as in cvar1 above (character)
    ivar2 = returned ID for that variable (must be integer)
    
  4. Read the data.

    To read a (previously opened) file and retrieve a rectangular or Gaussian grid (depending on the file that was opened) for one time period, you can use either gridread or gridreadx. The grid returned will be ordered South to North regardless of the order of data in the netCDF file. These routines have identical interfaces except that gridreadx returns an extra longitude vector in the grid (a copy of the longitude vector in column 1 is placed in the last column e.g. 145x73 for 2.5 degree data). Here is the details of calling gridread:

    call gridread(iadd,itime,x,flevel,netid,ivarid,ny,nm,nd,nh)

    iadd   = integer- indicates whether subr. will automatically advance 
    	 time step
    itime  = input time index for that file -integer
             itime is 1-based.  The first time step in the file is itime = 1.
    x      = returned real*4 array, S-N dimensioned according to netCDF 
    	 file info. You MUST dimension this array correctly!
    flevel = input floating point level (e.g. 850.0) or 0.0 if no
    	 level.
    netid  = input integer file ID (gotten from netopen)
    ivarid = input integer variable ID (gotten from netopen)
    ny     = returned integer year (2 digits if 1901 - 1999, 4 otherwise)
    nm     = returned integer month
    nd     = returned integer day
    nh     = returned integer hour
    
    If you wish to have the subroutine increment the time index for you automatically, set iadd=1 for gridread. The subroutine will automatically advance the time increment for you at the START of the subroutine. So, be sure to set itime to 1 less than the first time index if you use that option.

    To read more than one netCDF data variable or level at a time using the same time index program variable, you should set iadd=0 for the calls to retrieve the additional variables or levels. Time index values are specific to a dataset. So if you are reading one dataset that starts on Jan 1, 1985 and another dataset that starts on Dec 1 1984, the time index value for the same time will NOT be the same. Therefore it is advisable to use a different program variable for each of the datasets.

    gridread and gridreadx will advance to the next file if the read extends beyond the last record of the current file. (Like netread2 in the previous version). To read more than one data variable at the same time, set iadd=0 for the other data variables. Alternatively, use a separate time index variable for each data variable.

    All functions in this library return grids from South to North regardless of how the data is stored in the netCDF file.

  5. Read spectral coefficient data.

    To read a (previously opened) file and retrieve a vector of spectral coefficients for one time period, you can use either specread. This routine has an identical interface to that of the gridread routine. The differences are that when calling netopen you must specify a spectral coefficient type of "grid", and you must pass the routine the correctly sized complex vector in which it returns the values. Here is a description of the use of specread:

    call specread(iadd,itime,x,flevel,netid,ivarid,ny,nm,nd,nh)

    iadd   = integer- indicates whether subroutine will automatically advance 
    	 time step
    itime  = input time index for that file -integer
    x      = returned complex array dimensioned according to the number of
             spectral coefficients in the file. You MUST dimension this 
             array correctly!
    flevel = input floating point level (e.g. 0.995 sigma) or 0.0 if no
    	 level.  Surface is 2000.0 
    netid  = input integer file ID (gotten from netopen)
    ivarid = input integer variable ID (gotten from netopen)
    ny     = returned integer year (2 digits if 1901 - 1999, 4 otherwise)
    nm     = returned integer month
    nd     = returned integer day
    nh     = returned integer hour
    
    If you wish to have the subroutine increment the time index for you automatically, set iadd=1 for gridread. The subroutine will automatically advance the time increment for you at the START of the subroutine. So, be sure to set itime to 1 less than the first time index if you use that option.

    To read more than one netCDF data variable or level at a time using the same time index program variable, you should set iadd=0 for the calls to retrieve the additional variables or levels. Time index values are specific to a dataset. So if you are reading one dataset that starts on Jan 1, 1985 and another dataset that starts on Dec 1 1984, the time index value for the same time will NOT be the same. Therefore it is advisable to use a different program variable for each of the datasets.

    gridread and gridreadx will advance to the next file if the read extends beyond the last record of the current file.


    To find a time index associated with a certain file and date, you can call:

    call timeindex(netid,ny,nm,nd,nh,index)

    netid = file ID- integer
    ny    = year (4 digit default or 2 digit for 1901-1999) -integer
    nm    = month (1-12) -integer
    nd    = day -integer
    nh    = hour (0-24) -integer
    index = returned time index -integer
    

    To read a grid for a particular time, one can use:

    call dayread(iadd,itime,x,flevel,netid,ivarid,ny,nm,nd,nh)

    Where ny,nm,nd and nh are specified (iadd and itime are ignored on input, itime is returned). Or if you would like an extra longitude vector (like gridreadx) call dayreadx which has the same parameter list as dayread. The grid returned will be ordered South to North regardless of the order of the data in the netCDF file.


    Some of the data (the NCEP once daily, EC and NCEP twice daily) contain a variable that indicates whether the field was interpolated. To read this field, use:

    call varopen(netid,"head",headvarid)

    call headread(iadd,itime,nhead,flevel,netid,headvarid,ny,nm,nd,nh)

    which has the same parameters as netread2 with the exception that nhead is a single integer. nhead will take on one of four values indicating the following interpolation information for the grid represented:

    	0) no interpolation
    	1) both hemispheres interpolated
    	2) just NH
    	3) just SH
    


    In addition to the built in capability of "linking" NCEP and NCEP/NCAR Reanalysis files by using the auto-increment feature of gridread and gridreadx you can also generate such links for other datasets. To link together two datasets in this way use:

    call netlink(dataset1, dataset2)

    dataset1 = Character - the dataset to link from (e.g. 'coads1')
    dataset2 = Character - the dataset to link to (e.g. 'coadsen')
    

    Then use the automatic increment feature of gridread(x) and when the record beyond the last record in dataset 1 is read, the same variable and statistic (if existent) will be opened in dataset 2 and the netid and variable ids will be set properly.

    Currently the following datasets are linkable in this manner:

    	coads   coads1a
    	coads   coadsen
    	coads   coadsin
    	reynwk1 reynwk2
    

Missing Values:

Whenever any of the netopen routines encounters a value in the netCDF file which has been defined as missing, it will replace that value with the value 1e30.

Examples:

Let's say you wanted to read 3 years (1985 - 1987) of NCEP u and v winds at 200mb. Your program could look something like this:

      real u(144,73)
      real v(144,73)

      call netop_init()

      do iyear=1985,1987
         call netopen(iyear,'nmc','rect','uwnd','',200.0,netidu,ivaridu)
         call netopen(iyear,'nmc','rect','vwnd','',200.0,netidv,ivaridv)
         do  iday=1,365
            call gridread(0,iday,u,200.0,netidu,ivaridu,ny,nm,nd,nh)
            call gridread(0,iday,v,200.0,netidv,ivaridv,ny,nm,nd,nh)

C           User functionality with this timestep u and v winds at 200mb.

         enddo
      enddo
If you wished your program to resemble the sequential type read that you may have used in previous programs, (where you needed the extra longitude vector for IDL or something like that) your code could look something like this:

      real u(144,73)
      real v(144,73)

      call netop_init()

      call netopen(1985,'nmc','rect','uwnd','',200.0,netidu,ivaridu)
      call netopen(1985,'nmc','rect','vwnd','',200.0,netidv,ivaridv)
100   call gridreadx(1,iday,u,200.0,netidu,ivaridu,ny,nm,nd,nh)
      call gridreadx(0,iday,v,200.0,netidv,ivaridv,ny,nm,nd,nh)

C	 ...
C        ...process u,v any way you wish...
C	 ...

      if((ny.eq.87).and.(nm.eq.12).and.(nd.eq.31))iend=1
      if(iend.ne.1)goto 100
To open the coads sst, monthly mean data and read Jan 1975-Feb 1976:
      real sst(180,90)     ! Array will be returned S-N

      call netop_init()

      call netopen(0,'coads','rect','sst','mean',0.0,netid,ivarid)
      call timeindex(netid,1975,1,0,0,itime1)
      call timeindex(netid,1976,2,0,0,itime2)
      do it=itime1,itime2
          call gridread(0,it,sst,0.0,netid,ivarid,ny,nm,nd,nh)
      enddo
To read NCEP/NCAR Reanalysis heights at 50mb through all of 1986:
      real x(144,73)

      call netop_init()

      call netopen(86,'nmcrean','rect','hgt','',0.0,net2,ivar2)

      it1 = 0

      do it = 1,1500

         call gridread(1,it1,x,50.0,net2,ivar2,ny1,nm1,nd1,nh1)

         if (ny1.ne.1986) then

C            User functionality with this timestep 50mb height

         endif
      enddo
Reading NCEP/NCAR Reanalysis surface Gaussian air temperatures (note: this set of calls will read all of the 86 data - 1460 timesteps, and into the 1987 data - remaining 40 timesteps).

      real x(192,94)

      call netop_init()

      call netopen(1986,'nmcrean','gaus','air','',2000.0,net2,ivar2)

      it1 = 0

      do it = 1,1500    

         call gridread(1,it1,x,2000.0,net2,ivar2,ny1,nm1,nd1,nh1)

C        User functionality with this timestep surface air temperature
C        Gaussian grid.

      enddo
And finally, for reading a spectral coefficient file from NCEP/NCAR Reanalysis looking at the specific humidity variable at 0.995 sigma.
      complex x(2016)

      call netop_init()

      call netopen(1986,'nmcrean','spec','shum','',0.0,net2,ivar2)

      it1 = 0

      do it = 1,1460

         specread(1,it1,x,0.995,net2,ivar2,ny1,nm1,nd1,nh1)

C        User functionality with this timestep specific humidity spectral 
C        coefficients at 0.995 sigma

      enddo
A sample working program is in ~crdc/netopen/read/example.f

Possible source of problems:

If you run into any problems when you run your netCDF reading program, see if any of the below might apply. If not, I will be happy to look at your code. If you discover any bugs or non-robustness of any of the subroutines or if you have any suggestions, please bring them to my attention A.S.A.P..

  1. If you run into problems because your code has too many files open, you can use the NCCLOS command to close any files that you are finished with. The syntax is CALL NCCLOS(nc_fileid, RCODE).
  2. Make sure that the size of the grid or vector (spectral coefficients) is the same as that in the netCDF file (use cdcncdump -h to learn about the dimensions)
  3. Be sure that all subroutine parameters are the right type (i.e. integer,real, character, etc). NetCDF is very picky about such things. Especially the new floating point level value!
  4. Don't ask for data that does not exist. For example, there are no relative humidities above 300mb and you can't get slp at 1000mb for the NCEP data. Also, make sure you have spelled all dataset and variable names correctly (see below).
  5. Make sure that you are using the appropriate variable IDs and file IDs.
  6. If you choose to have the subroutine keep track of the time index, don't have it advanced for other data variables you wish to read at the same time (unless you use different names for the time index variable).

Datasets Available

The data descriptions have more detailed descriptions of what is in a particular dataset (e.g. dates, variable names, levels, statistics), references for that dataset and caveats on the use of the data. We also provide a summary of PSD datasets. ASCII versions of the dataset descriptions are in the README files located in the ~ftp/Datasets subdirectories.

nmc
Once daily NCEP dataset D84-S93 many variables, yearly files
nmc2d
Twice daily NCEP selected fields and levels
nmcrean
Four times daily NCEP/NCAR Reanalysis dataset many variables many levels
nmcltm
NCEP 1985-92 monthly means (12 months), many variables
nmcmm
NCEP monthly means for 500z and 700T (~46-92) (Note NH only)
msu
MSU air temperature channel 2/3 and channel 3/4.
ecmwf
Monthly means of twice daily ecmwf data
ecmwf0
ECMWF monthly means 0Z
ecmwf12
ECMWF monthly means 12Z
olr
OLR and filtered OLR
nmcreal
NCEP realtime marine monthly means and nobs of various parameters(2x2)
coads
COADS monthly means, nobs and ltm's of various parameters (2x2)
coads1a
COADS standard data(2x2)
coadsen
COADS enhanced data(2x2)
coadsin
COADS interim data(2x2)
doe
DOE Gridded Surface Precipitation and Temperature Anomalies
shipobs
Monterey realtime marine monthly means and nobs of various parameters (2x2)
reynwk1
Reynolds SST data (1x1) weekly means that start on Thursdays 1981 - 1989.
reynwk2
Reynolds SST data (1x1) weekly means that start on Sundays 1990 - present.
reynmn
Reynolds SST data (1x1) monthly means.
rreyn
Reconstructed Reynolds SST data (1x1) monthly and long term means
leetmaa
Leetmaa Pacific Ocean Analysis Data monthly (statistic=mean) and weekly means (statistic=wkmn).
gisst
Global sea-Ice Sea Surface Temperature (1x1) monthly means

Variable and Level Names

Levels in netopen are needed when files in the datasets are divided by levels. This applies to the nmc2d, nmcltm, and cddb datasets. Levels are needed in the gridread(x) and dayread(x) commands when a particular file is divided into different levels. This applies to the nmc, nmcrean, nmcp, and nmcmm. Levels should be specified as floating point values (1000.0, 850.0, 200.0, etc.).

There are several "special" levels in the netopen call. The NCEP/NCAR and ECMWF surface is represented as 2000.0 The NCEP/NCAR Reanalysis tropopause level is represented as 3000.0. Use 0.0 as the level for the NCEP/NCAR Reanalysis pressure level data and the NCEP (Leetmaa) Ocean data and other data sets with multi-level files.

When referring to variable names, the following are applicable in netopen - Note that not all datasets have all variables (in fact as you'll note below some datasets use different variable names for the same physical variable) so you should check the PSD Data Directory Dataset List for the variable(s)/dataset(s) in which you are interested. These are sorted by netopen variable id for those variables that are in more than one dataset.

    
'air'      air temperature
'albdo'    albedo
'cfnlf'    cloud forcing net longwave flux
'cfnsf'    cloud forcing net solar flux
'cldc'     cloudiness
'cprat'    convective precipitation rate
'csdlf'    clear sky downward longwave flux
'csdsf'    clear sky downward solar flux
'csusf'    clear sky upward solar flux
'dlwrf'    downward longwave radiation flux
'dswrf'    downward solar radiation flux
'dewpt'    surface dew point temp
'div'      divergence
'evap'     evaporation at surface
'hflx'     heat flux at surf
'hgt'      geopotential height
'gflux'    ground heat flux
'icec'     ice concentration
'lflx'     latent heat flux
'lftx'     lifting index
'lftx4'    best lifted index
'lhtfl'    latent heat net flux
'nbdsf'    near IR beam downward solar flux
'nddsf'    near IR diffuse downward solar flux
'nlwrs'    net longwave radiation flux
'nswrs'    net shortwave radiation flux
'olr'      olr
'olrp'     filtered olr
'omega'    omega (dp/dt)
'otemp'    ocean temperature
'pevpr'    potential evaporation rate
'prate'    precipitation rate
'pres'     pressure
'pr_wtr'   precipitable water
'runof'    water runoff
'qsminq'   sat sp hum at sst minus sp hum monthly mean at surface 
'rhum'     relative humidity
'salt'     salinity
'sfcr'     surface roughness
'sflx'     sensible heat flux
'shtfl'    sensible heat net flux
'shum'     specific humidity
'slp'      sea level pressure
'smina'    sea-air temp difference
'soilw'    volumetric soil moisture
'sst'      sea surface temperature
'swfx'     short wave heat flux
'taux'     E-W Stress
'tauy'     N-S Stress
'tmax'     maximum temperature
'tmin'     minimum temperature
'tmp'      temperature below ground level
'trpp'     tropopause pressure
'trpt'     tropopause temperature
'uairt'    sensible heat transfer eastward parameter              
'ucur'     U of ocean current
'uflx'     momentum flux u-component
'ugwd'     zonal gravity wave stress
'ulwrf'    upward longwave radiation flux
'upwnd'    filtered u
'uspeh'    latent heat transfer eastward parameter                
'ustr'     u wind stress
'uswrf'    upward solar radiation flux
'uwnd'     u wind
'vair'     virtual temperature
'vairt'    sensible heat transfer northward parameter              
'vbdsf'    visible beam downward solar flux
'vcur'     V of ocean current
'vddsf'    visible diffuse downward solar flux
'vflx'     momentum flux, v-component
'vgwd'     meridional gravity wave stress
'vort'     vorticity
'vpwnd'    filtered v
'vspeh'    latent heat transfer northward parameter               
'vstr'     vwind stress
'vwnd'     v wind
'weasd'    water equivalent of accumulated snow depth
'wspd'     wind speed

precipitation            'precip'  (DOE dataset)
prec                     'prec'    (GFDLR dataset)
surface potential temp.  'pottmp'  (NCEP/NCAR Reanalysis dataset)
surface potential temp.  'srfpt'   (NCEP Daily Global Analyses dataset)
surface pressure         'pres'    (NCEP/NCAR Reanalysis dataset)
surface pressure         'srfp'    (NCEP Daily Global Analyses dataset)
surface pres variation   'ps'      (Leetmaa dataset)
land sea mask            'mask'    (Leetmaa dataset)
land sea mask		 'land'    (NCEP/NCAR Reanalysis Surface Gaussian grids)


Netopen Data Dictionary

In order for netopen to be able to access the Datasets supported by the PSD data management group, a data dictionary is used. This amounts to a file which contains keys used to search on when a user calls the netopen subroutine. The current version of the file can be found in /home/crdc/netopen/read/lnftools/list.net.files.1.3

The format of this file is that each row represents one file supported by the data management group and each column is one of the keys found in the netopen call as follows:


nmcrean     1986 rect hgt                      9999 xxxx        /Datasets/nmc.reanalysis/pressure/hgt.86.nc     
^                                              ^
Dataset: NCEP/NCAR Reanalysis                        Level: Multiple
            ^                                       ^
             Year: 1986                             Statistic: None
                 ^                                              ^
                  Grid Type: Rectangular                        File path and name
                       ^
                      Variable: Geopotential Height
As of netopen version 1.3, you have the capability to create your own netopen data dictionary file, and access it using the library and an Environment Variable. If you have netCDF files which adhere to the PSD standards, then you can create a data dictionary file of the form shown above (note:due to the columnar nature of the file, it is recommended that you take a copy of the original and eliminate all but one line and then use that line as your template for creating new lines). Once you've created your data dictionary, you can access it by setting the environment variable NET_DD_PATH to that file as shown:

setenv NET_DD_PATH {yourfilename}

Then in your netopen call simply match up the parameters to the keys in this file, and you should be able to access your file.