I want to convert some data files which are in '.cdf' format to usual
ASCII format for processing purpose.
Can any body help me how to do it through fortran 90/95.
Thanks in advance.
Praveen.
Perhaps if had any clue as to what ".cdf format" were...
--
> Fortran_follower wrote:
> >
> > I want to convert some data files which are in '.cdf' format to usual
> > ASCII format for processing purpose.
> > Can any body help me how to do it through fortran 90/95.
>
> Perhaps if had any clue as to what ".cdf format" were...
That one is common enough for me to recognize. (Well, ok, I'll allow as
how I could be wrong, but I'm guessing not.) Presumably it is the Common
Data Format. I don't use it myself, but have run across it before. I
took a fairly close look once long ago when I was evaluating whether to
use it for something; that might be why it came to my mind so quickly
from just the 3 letters.
Not having a citation handly, I googled CDF to find one to list here. It
wasn't the top hit (some California Dept of Forestry site), but the
presumably relevant CDF home page was on the first page of google hits.
See
which also has what is presumably an answer for the OP. Fairly prominent
on that page is an link for "Conversion of non-CDF files to CDF and vice
versa." That link points to item 26 in the FAQ. The CDFexport tool
mentioned there seems likely to fit the bill. That tool probably isn't
written in f95, but then the presumed usage is as a standalone utility
so the implementation language should not matter. If the OP has reasons
for really wanting to do it in F90/F95 instead of just using the
separate conversion utility, then he would need to read up on the API
(Applications Programming Interface, a common enough acronym, but as
we've already had one acronym asked about, I'll pre-empt the question
just in case someone else might not get this one). Information on the
API is bound to also be available via the above-cited page, but I didn't
go looking ebcause that doesn't seem likely to be the best approach
forwhat I understand to be the problem.
--
Richard Maine | Good judgment comes from experience;
email: last name at domain . net | experience comes from bad judgment.
domain: summertriangle | -- Mark Twain
Is the file a netCDF file?
Usually, these have .nc extension.
If it's netCDF, then there is a wealth of Fortran 90/95 routines
available for extracting the data.
If you're not sure, Google ncdump, download ncdump.exe, and run that
on your file.
If it's a netCDF file, ncdump will list what's in there.
http://www.unidata.ucar.edu/software/netcdf/docs/netcdf-f90/
Dear dpb & Richard Maine, TideMan & rusi_pathan,
I am really sorry to create such a confusion among you.
'.cdf', I mean 'Common Data Format'
To be frank, I am not sure whether those are netCDF or not.
My file extension is '.cdf' only not '.nc'
Thank you very much for your replies.
Praveen.
Dear dpb,
I mean '.cdf' here, 'Common Data Format', which I cant see what is in
there...!!
Thank you.
Praveen.