gtool5 Fortran 90/95 Library 1.0.0-rc5
日本語
Loading...
Searching...
No Matches
gtvardelattr.f90 File Reference

Delete attribute. More...

Go to the source code of this file.

Functions/Subroutines

subroutine gtvardelattr (var, name, err)

Detailed Description

Delete attribute.

Author
Eizi TOYODA, Yasuhiro MORIKAWA

This subroutine is provided as gtdata_generic#Del_Attr through gtdata_generic.

Definition in file gtvardelattr.f90.

Function/Subroutine Documentation

◆ gtvardelattr()

subroutine gtvardelattr ( type(gt_variable), intent(inout) var,
character(len = *), intent(in) name,
logical, intent(out), optional err )

Delete variable attribute

Deletes attribute name from variable var. If an error occurs during deletion, outputs a message and terminates the program. If err is provided, returns .true. in that argument and program does not terminate.

Parameters
[in,out]varVariable handle
[in]nameAttribute name to delete
[out]errError flag (optional)

Definition at line 47 of file gtvardelattr.f90.

48 use gtdata_types, only: gt_variable
49 use gtdata_internal_map, only: var_class, vtb_class_netcdf
53 implicit none
54 type(GT_VARIABLE), intent(inout):: var
55 character(len = *), intent(in):: name
56 logical, intent(out), optional:: err
57 integer:: class, cid
58continue
59 call var_class(var, class, cid)
60 if (class == vtb_class_netcdf) then
61 call del_attr(gd_nc_variable(cid), name, err)
62 else
63 call storeerror(gt_ebadvar, 'GTVarDelAttr', err)
64 endif
Error handling module.
Definition dc_error.f90:454
subroutine, public storeerror(number, where, err, cause_c, cause_i)
Definition dc_error.f90:891
integer, parameter, public gt_ebadvar
Definition dc_error.f90:518
subroutine, public var_class(var, class, cid)

References dc_error::gt_ebadvar, dc_error::storeerror(), and gtdata_internal_map::var_class().

Here is the call graph for this function: