Go to the source code of this file.
◆ gtvarclose()
subroutine gtvarclose |
( |
type(gt_variable), intent(in), target |
var, |
|
|
logical, intent(out), optional |
err |
|
) |
| |
Definition at line 14 of file gtvarclose.f90.
References dc_error::dc_noerr, dc_error::gt_ebadvar, gtdata_internal_map::map_lookup(), gtdata_internal_map::maptabdelete(), dc_error::storeerror(), gtdata_internal_vartable::vartabledelete(), and gtdata_internal_vartable::vartablelookup().
31 use dc_trace
, only: beginsub, endsub, dbgmessage
33 type(gt_variable),
intent(in),
target:: var
34 logical,
intent(out),
optional:: err
35 integer:: vid,
class, cid
36 logical:: action, myerr
38 call beginsub(
'gtvarclose', fmt=
'var=%d', i=(/var%mapid/))
43 if (vid == 0)
goto 999
47 if (.not. action)
then 48 call dbgmessage(
'refcount decrement only, no close internal var')
50 else if (
class == vtb_class_netcdf)
then 55 call endsub(
'GTVarClose',
'badvar')
59 call endsub(
'gtvarclose')
60 if (
present(err)) err = myerr
subroutine, public vartabledelete(vid, action, err)
subroutine, public maptabdelete(var, err)
subroutine, public storeerror(number, where, err, cause_c, cause_i)
integer, parameter, public gt_ebadvar
integer, parameter, public dc_noerr
subroutine, public vartablelookup(vid, class, cid)
subroutine, public map_lookup(var, vid, map, ndims)