NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.
To learn about what's going on, see About the Archive Site.
Thanks Jim and Ted! I defined "chk_ncid" in 3 use nc_adj_module I'll try it explicitly tomorrow. Hongyan On Thu, Mar 18, 2010 at 9:43 AM, Ted Mansell <Ted.Mansell@xxxxxxxx> wrote: > You have implicit typing, so it thinks that "chk_ncid" is a real number. > chk_ncid needs to be typed as an integer. (It's always a good idea to set > "implicit none" to enforce typing -- and it can help avoid bugs with > accidental misspellings. > > -- Ted > > > On Mar 17, 2010, at 6:41 PM, H.Dang wrote: > > Hi~, >> >> I got the following error message when closing a netCDF file that I >> create: >> >> PGF90-S-0188-Argument number 1 to nf90_close: type mismatch >> (nc_close_chk.f90: 8) >> 0 inform, 0 warnings, 1 severes, 0 fatal for nc_close_chk >> make: *** [nc_close_chk.o] Error 2 >> >> Following is the code with line number: >> >> 1 subroutine nc_close_chk(chk_ncid) >> 2 use netcdf >> 3 use nc_adj_module >> > > implicit none > > 4 >> 5 integer chk_cls_sts >> > integer chk_ncid > >> 6 >> 7 ! call nc_check( nf90_close(chk_ncid) ) >> 8 chk_cls_sts = nf90_close(chk_ncid) >> 9 >> 10 end subroutine nc_close_chk >> >> Could you please show me the cause of the mistake? Thank you! >> >> -- >> Cordially, >> Hongyan >> 鸿雁 >> _______________________________________________ >> netcdfgroup mailing list >> netcdfgroup@xxxxxxxxxxxxxxxx >> For list information or to unsubscribe, visit: >> http://www.unidata.ucar.edu/mailing_lists/ >> > > -- Cordially, Hongyan 鸿雁
netcdfgroup
archives: