SuOraiste
Programmer
- Sep 23, 2011
- 5
Hi
I'm trying to read a netcdf but keep encountereing the same error, segmentation fault!
My code follows the netcdf manual. Here is it:
PROGRAM nc
USE netcdf
IMPLICIT NONE
INTEGER :: stat,id
stat=nf90_open(path="TestNetcdf2.nc",mode=nf90_write,ncid=id)
stat=nf90_close(id)
END PROGRAM nc
Then I start it with a shellscript with the following code
gfortran -ffixed-line-length-none -Wall -o netcdf.x netcdf.f $I $L -lnetcdff
./netcdf.x
The $I, $L being variables to the netcdf include and lib directories respectively.
Does anyone can help me why this doesn't work?
Thanks
I'm trying to read a netcdf but keep encountereing the same error, segmentation fault!
My code follows the netcdf manual. Here is it:
PROGRAM nc
USE netcdf
IMPLICIT NONE
INTEGER :: stat,id
stat=nf90_open(path="TestNetcdf2.nc",mode=nf90_write,ncid=id)
stat=nf90_close(id)
END PROGRAM nc
Then I start it with a shellscript with the following code
gfortran -ffixed-line-length-none -Wall -o netcdf.x netcdf.f $I $L -lnetcdff
./netcdf.x
The $I, $L being variables to the netcdf include and lib directories respectively.
Does anyone can help me why this doesn't work?
Thanks