Hello, ier contains an error code; it should be NC_NOERR, or 0, if the file was opened successfully. If the file was opened successfully, we would expect the ncid to be non-zero. It appears that there was an error opening the file. The netCDF API returns negative values for errors, and has no error defined for a value of `2`, so it appears that this is a filesystem error. Are you certain you have permission to read the file, and that the file exists? -Ward > Hello support > > I am new to netcdf. > I am trying to read netcdf file from fortran. > > The meaning of nf_open function is confused. > I use "ier = nf_open(trim(ifile), nf_nowrite, ncid)" to open a netcdf file. > Print out ier, ncid, I got > ################################### > ier ncid nf_noerr > 2 0 0 > So which value does nf_open function return? > If nf_open read netcdf file correctly, ncid=0? > > Why ier, ncid here are different? What does ier, ncid mean? > > Thank you. > > Tao > > -- > ****************************************************** > Tao Lu (M. Eng) > Laboratory of River Engineering and Hydrology, > Dept. of Civil and Environmental Engineering, > Graduate School of Science and Engineering, > Chuo University > > 1-13-27,Kasuga,Bunkyo-ku,Tokyo > 112-8551, Japan > TEL: 03-3817-1805; Phone: 070-2188-7509 > Email1: address@hidden <address@hidden> > Email2: address@hidden <address@hidden> > ***************************************************** > > Ticket Details =================== Ticket ID: XET-647811 Department: Support netCDF Priority: Normal Status: Closed =================== NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.
NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.