Go to the source code of this file.
◆ internal_build_dimids()
subroutine vtable_add::internal_build_dimids |
( |
type(gd_nc_variable_entry), intent(inout) |
ent, |
|
|
integer, intent(out) |
stat |
|
) |
| |
|
private |
Definition at line 114 of file gtdata_netcdf_internal.f90.
Referenced by gtdata_netcdf_internal::vtable_add().
117 integer,
intent(out):: stat
119 if (ent%varid > 0)
then 120 stat = nf90_inquire_variable(ent%fileid, ent%varid, ndims = ndims)
121 if (stat /= nf90_noerr)
return 122 if ((ent%dimid > 0) .and. (ndims /= 1))
goto 100
128 allocate(ent%dimids(ndims), stat=stat)
133 stat = nf90_inquire_variable(ent%fileid, ent%varid, dimids = ent%dimids)
134 if (stat /= nf90_noerr)
return 135 if ((ent%dimid > 0) .and. (ent%dimids(1) /= ent%dimid))
then 136 deallocate(ent%dimids)
140 allocate(ent%dimids(1), stat=stat)
145 ent%dimids(1) = ent%dimid
152 allocate(ent%dimids(1))
153 ent%dimids(1) = ent%dimid