Unidata - To provide the data services, tools, and cyberinfrastructure leadership that advance Earth system science, enhance educational opportunities, and broaden participation. Unidata
         
  advanced  
 

Portability question

Hi Folks,

  I have a question regarding the portability of FORTRAN application programs
which rely on netcdf. Suppose I have a CDL which defines a given
variable as SHORT, say

.....................
variables:

    short var[dim]

.....................

Now, on my SGI I use 'ncgen' to create the corresponding FORTRAN code
and get

    integer*2 var(1)

which makes sense since the NC_SHORT data type takes 2 bytes. Now,
when I use 'ncgen' on the Cray C90 under unicos, I get the following:

    integer var(1)

My problem is that I'd like to have the same FORTRAN code to work on
both Cray and workstation. It appears that I'd have to have different
FORTRAN codes for each hardware, which somewhat defeats one of the
purposes of netCDF: portability.

   My questions:

   1. Am I missing something?
   2. Is there any way around short of using #IFDEFS?

   Any help greatly appreciated.

      Arlindo.

-- 

   *----------------------------------------------------------------------*
   |                                                                      |
   |             ^|^                ARLINDO MORAES DA SILVA, JR.          |
   |              |                 Data Assimilation Office, Code 910.3  |
   |             _|_                NASA/Goddard Space Flight Center      |
   |      @  ___|___|__             Greenbelt, MD 20771                   |
   |     _|_|__________|_______/                                          |
   |    \  o o o o o o o  /         Office: (301) 805-7959                |
   |     \_______________/             FAX: (301) 805-7960                |
   |  ^^^^^^^^^^^^^^^^^^^^^^^^                                            |
   | E-mail: dasilva@xxxxxxxxxxxxx    Home: (301) 754-1121                |
   |                                                                      |
   *----------------------------------------------------------------------*
                                  


 
 
  Contact Us     Site Map     Search     Terms and Conditions     Privacy Policy     Participation Policy
 
National Science Foundation (NSF) UCAR Community Programs   Unidata is a member of the UCAR Community Programs, is managed by the University Corporation for Atmospheric Research, and is sponsored by the National Science Foundation.
P.O. Box 3000     Boulder, CO 80307-3000 USA     Tel: 303-497-8643     Fax: 303-497-8690