- To: "H.Dang" <danghy@xxxxxxxxx>
- Subject: Re: [netcdfgroup] error when closing a file
- From: Ted Mansell <Ted.Mansell@xxxxxxxx>
- Date: Wed, 17 Mar 2010 20:43:55 -0500
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/
- Follow-Ups:
- Re: [netcdfgroup] error when closing a file
- From: H.Dang
- Re: [netcdfgroup] error when closing a file
- References:
- [netcdfgroup] error when closing a file
- From: H.Dang
- [netcdfgroup] error when closing a file