22 use netcdf,
only: nf90_max_name, nf90_noerr, nf90_einval, nf90_enotvar, &
23 & nf90_inquire_dimension, nf90_inq_varid
28 integer,
intent(in):: dimord
29 logical,
intent(out),
optional:: err
32 character(len = NF90_MAX_NAME):: dimname
36 if (stat /= nf90_noerr)
goto 999
48 if (.not.
associated(src_ent%dimids))
then
51 else if (dimord >
size(src_ent%dimids))
then
58 ent%fileid = src_ent%fileid
59 ent%dimid = src_ent%dimids(dimord)
60 stat = nf90_inquire_dimension(ent%fileid, ent%dimid, name = dimname)
61 if (stat /= nf90_noerr)
goto 999
62 stat = nf90_inq_varid(ent%fileid, dimname, ent%varid)
63 if (stat == nf90_enotvar)
then
67 else if (stat /= nf90_noerr)
then
75 if (stat /= nf90_noerr)
then
81 call storeerror(stat,
'GDNcVarOpenByDimOrd', err, cause_i=dimord)