[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

960502: Netcdf precision problems..



Swathi,

>Date: Thu, 2 May 96 16:37:54 IST 
>From: address@hidden (P S Swathi)
>Organization: . 
>To: address@hidden
>Subject: Netcdf precision problems.. 
>Keywords: 199605021111.AA26625, convex, compilation, float, real

In the above message you wrote:

> I have a slightly different problem. As I may have told you earlier,
> I am running GFDL's Modular Ocean Model on the Convex. 
> (At GFDL they run it on a Cray). Ron Pacanowski
> has written some nice modules which directly output several
> diagnostics in netcdf which can be visalised directly with
> ferret, NCAR Graphics or anyother netcdf visualisation
> utility. This has saved me a major headache of reformatting data
> for graphics utilities.
> 
> Convex's default precision is 4 byte reals and integers. Because
> of roundoff errors I run MOM with a compiler option which
> makes all intgers and reals 8 bytes. This way I dont have
> to make changes within the code. Now here's the problem. When
> I try to link MOM executable with netcdf & udunits which were
> created with Convex default precision I run into trouble. It cant
> even do NCCRE. Is there anyway I can reinstall netcdf and udunits
> on the Convex with 64 bit integers and reals? When I looked into
> the C-compiler on Convex I couldnt find anything that would to automatic
> 32 bit to 64 bit conversion like the fortran compiler does.
> Could you suggest a way out for me? Thanks

I don't think you'll have a problem with the UDUNITS library (but I
don't know for certain).

As to the netCDF package, I suggest that you rebuild the FORTRAN/C
interface in the fortran/ subdirectory with the C preprocessor macro
FORTRAN_HAS_NO_FLOAT defined.  To test this change, you'll have to
recompile and relink the test program in the fortran/ subdirectory --
using the 64-bit real FORTRAN compiler option.  Try the following:

    1.  Go to the fortran/ directory.

    2.  Edit the Makefile:

            A.  Add `-DFORTRAN_HAS_NO_FLOAT' to the CPPFLAGS macro.

            B.  Add the 64-bit real option to the FFLAGS macro.

    3.  Execute the command `make clean'.

    4.  Execute the cmmand `make'.

    5.  Execute the command `make test'.

NB: The above assumes that a `make all' has already been done
on the netCDF package (i.e. the netCDF library exists as
../libsrc/libnetcdf.a).

--------
Steve Emmerson   <address@hidden>