29 character(len=*),
intent(in) :: nc_fname
30 integer(I4B),
intent(in) :: iout
35 call nf_verify(nf90_open(nc_fname, nf90_nowrite, ncid), nc_fname)
41 integer(I4B),
intent(in) :: ncid
42 character(len=*),
intent(in) :: nc_fname
44 call nf_verify(nf90_close(ncid), nc_fname)
50 integer(I4B),
intent(in) :: res
51 character(len=*),
intent(in) :: nc_fname
52 character(len=LINELENGTH) :: errstr
56 if (res /= nf90_noerr)
then
60 errstr =
'Not a netcdf id'
62 errstr =
'Invalid Argument'
64 errstr =
'Write to read only'
66 errstr =
'Operation not allowed in data mode'
68 errstr =
'Operation not allowed in define mode'
69 case (nf90_einvalcoords)
70 errstr =
'Index exceeds dimension bound'
71 case (nf90_enameinuse)
72 errstr =
'String match to name in use'
74 errstr =
'Attribute not found'
76 errstr =
'Not a netcdf data type'
78 errstr =
'Invalid dimension id or name'
80 errstr =
'Variable not found'
82 errstr =
'Not a netcdf file'
84 errstr =
'Attempt to convert between text & numbers'
86 errstr =
'Edge+start exceeds dimension bound'
88 errstr =
'Illegal stride'
90 errstr =
'Attribute or variable name contains illegal characters'
92 errstr =
'Bad chunksize.'
97 if (errstr /=
'')
then
98 write (
errmsg,
'(a,a,a,i0,a)')
'NetCDF library error [error="', &
99 trim(errstr),
'", exit code=', res,
'].'
101 write (
errmsg,
'(a,i0,a)')
'NetCDF library error [exit code=', &
This module contains simulation constants.
integer(i4b), parameter linelength
maximum length of a standard line
This module defines variable data types.
This module contains the NetCDFCommonModule.
integer(i4b), parameter, public netcdf_attr_strlen
integer(i4b), parameter, public netcdf_max_dim
subroutine, public nc_fclose(ncid, nc_fname)
Close netcdf file.
subroutine, public nf_verify(res, nc_fname)
error check a netcdf-fortran interface call
integer(i4b) function, public nc_fopen(nc_fname, iout)
Open netcdf file.
This module contains simulation methods.
subroutine, public store_error(msg, terminate)
Store an error message.
subroutine, public store_error_filename(filename, terminate)
Store the erroring file name.
This module contains simulation variables.
character(len=maxcharlen) errmsg
error message string