Google Answers Logo
View Question
 
Q: fortran code which generate anather code to read netcdf ( No Answer,   2 Comments )
Question  
Subject: fortran code which generate anather code to read netcdf
Category: Science
Asked by: takayanamba-ga
List Price: $2.00
Posted: 15 Jan 2005 01:24 PST
Expires: 14 Feb 2005 01:24 PST
Question ID: 457567
I am looking for the fortran code which generate another code to read netcdf
data. I used to have it but I lost it. The name is readnetcdf.f(?)
generatenetcdf.f(?). I am not sure.
Answer  
There is no answer at this time.

Comments  
Subject: Re: fortran code which generate anather code to read netcdf
From: drimagine-ga on 15 Jan 2005 11:40 PST
 
cdf2fortran, a NetCDF functionality that you may answer your question
is cdf2fortran.  A program with will  open a netCDF file and generate
a fortran program to read the data.

see URL http://www-c4.ucsd.edu/~cids/software/

Man page for cdf2fortran follows.

Usage

 cdf2fortran inputFilePath (optional)outpuFilePath 

inputFilePath   -  The full path to the netCDF file for which you wish
to create a fortran routine to read the data. The netcdf filename
should end with the .cdf extension.

outpuFilePath  -  The full path to the file to which you wish to write
the resultant fortran code. If you do not provide an outputFilePath
the result will be written to the file readnet.f.

This program will ask the user for the name of a netcdf file to read.
It will open that file and using the proper netCDF calls, get info on
the variables and their dimensions. It then generates a FORTRAN
program that can be used to actually read the netCDF file and fill the
variables with data. This program can be used to read ANY netCDF file.
The user only has to write fortran statements to print the data or
pass to another program. Once you have generated a program, you may
use it to read any file of that data type; i.e., the program is
general until the powers to be change variable attributes.



Prerequisites  --  This program cannot be compiled without the netCDF
library. The source code for the netCDF library can be obtained via
anonymous ftp to ftp.unidata.ucar.edu. The necessary files are located
in the /pub/netcdf directory.

The program also requires the inclusion of the file netcdf.inc
provided with the netcdf library release. This file contains required
constants, etc... The path to the directory containing this file must
be set in the Makefile provided with this release. Modify the COM_INCS
line to reflect the include file location on your system.



Example  --  Assuming you have met all of the prerequisites, and that
you modified the compile.sh script to reflect the correct library
locations on your system and to reflect the proper compiler flags for
your system.


your_machine 1 > make 
your_machine 2 > cdf2fortran /path_to_data_file/data_file.cdf

The resulting fortran code will be placed in the file readnet.f You
may add code to manipulate the data to readnet.f.
Subject: Re: fortran code which generate anather code to read netcdf
From: spookysr-ga on 25 Jan 2005 19:43 PST
 
http://ecco.jpl.nasa.gov/~btang/tools/

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy