29 character(len=*),
intent(in) :: nc_fname
30 integer(I4B),
intent(in) :: iout
39 call nf_verify(nf90_open(nc_fname, nf90_nowrite, ncid), nc_fname)
45 integer(I4B),
intent(in) :: ncid
46 character(len=*),
intent(in) :: nc_fname
50 call nf_verify(nf90_close(ncid), nc_fname)
56 integer(I4B),
intent(in) :: res
57 character(len=*),
intent(in) :: nc_fname
59 character(len=LINELENGTH) :: errstr
63 if (res /= nf90_noerr)
then
67 errstr =
'Not a netcdf id'
69 errstr =
'Invalid Argument'
71 errstr =
'Write to read only'
73 errstr =
'Operation not allowed in data mode'
75 errstr =
'Operation not allowed in define mode'
76 case (nf90_einvalcoords)
77 errstr =
'Index exceeds dimension bound'
78 case (nf90_enameinuse)
79 errstr =
'String match to name in use'
81 errstr =
'Attribute not found'
83 errstr =
'Not a netcdf data type'
85 errstr =
'Invalid dimension id or name'
87 errstr =
'Variable not found'
89 errstr =
'Not a netcdf file'
91 errstr =
'Attempt to convert between text & numbers'
93 errstr =
'Edge+start exceeds dimension bound'
95 errstr =
'Illegal stride'
97 errstr =
'Attribute or variable name contains illegal characters'
99 errstr =
'Bad chunksize.'
104 if (errstr /=
'')
then
105 write (
errmsg,
'(a,a,a,i0,a)')
'NetCDF library error [error="', &
106 trim(errstr),
'", exit code=', res,
'].'
108 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