46 use netcdf,
only: nf90_max_name, nf90_noerr, nf90_einval, nf90_enotvar, &
47 & nf90_inquire_dimension, nf90_inq_varid
52 integer,
intent(in):: dimord
53 logical,
intent(out),
optional:: err
56 character(len = NF90_MAX_NAME):: dimname
60 if (stat /= nf90_noerr)
goto 999
72 if (.not.
associated(src_ent%dimids))
then
75 else if (dimord >
size(src_ent%dimids))
then
82 ent%fileid = src_ent%fileid
83 ent%dimid = src_ent%dimids(dimord)
84 stat = nf90_inquire_dimension(ent%fileid, ent%dimid, name = dimname)
85 if (stat /= nf90_noerr)
goto 999
86 stat = nf90_inq_varid(ent%fileid, dimname, ent%varid)
87 if (stat == nf90_enotvar)
then
91 else if (stat /= nf90_noerr)
then
99 if (stat /= nf90_noerr)
then
105 call storeerror(stat,
'GDNcVarOpenByDimOrd', err, cause_i=dimord)