Hi everyone!
Now I am using MATLAB for reading '*.nc' file but it is too slow. So I want to use fortran or C. I read several scripts about reading netcdf file with fortran and C but still don't know how to read. Does anyone know how to do it? Any suggestion will be helpful for me.
Thanks.
JW
netcdf file reading with FORTRAN
- m.hadfield
- Posts: 521
- Joined: Tue Jul 01, 2003 4:12 am
- Location: NIWA
Re: netcdf file reading with FORTRAN
Before abandoing Matlab, you might be better off looking critically at the way you are reading the netCDF data. Are you making many retrievals of small chunks of data? Are you reading files over a network link and could you make a copy on your hard disk instead? What do you mean by "too slow"?dhtjtks wrote:Now I am using MATLAB for reading '*.nc' file but it is too slow. So I want to use fortran or C. I read several scripts about reading netcdf file with fortran and C but still don't know how to read. Does anyone know how to do it? Any suggestion will be helpful for me.
Re: netcdf file reading with FORTRAN
m.hadfield wrote:Before abandoing Matlab, you might be better off looking critically at the way you are reading the netCDF data. Are you making many retrievals of small chunks of data? Are you reading files over a network link and could you make a copy on your hard disk instead? What do you mean by "too slow"?dhtjtks wrote:Now I am using MATLAB for reading '*.nc' file but it is too slow. So I want to use fortran or C. I read several scripts about reading netcdf file with fortran and C but still don't know how to read. Does anyone know how to do it? Any suggestion will be helpful for me.
After simulating ROMS, I download history file from unix computer to my desktop. After downloading, I use MATLAB to read history file and to generate TECPLOT file to see the result. Sometimes I use MATLAB to see the result but usually I use TECPLOT to see the result. Then I need a lot of for loop and it makes MATLAB slow. I think if I can use fortran or C to read netcdf file it will not take too long. That's why I want to use fortran or C.
JW
-
- Posts: 64
- Joined: Mon Oct 17, 2005 2:02 am
- Location: Institute of Oceanology,Chinese Academy of Sciences
Re: netcdf file reading with FORTRAN
there are manuals for Fortran and C to read and write NETCDF on the Unidata website.
http://www.unidata.ucar.edu/software/netcdf/docs/
http://www.unidata.ucar.edu/software/netcdf/docs/