gtool5 Fortran 90/95 ライブラリ 1.0.0-rc5
English
Loading...
Searching...
No Matches
gdncvartostring.f90
Go to the documentation of this file.
1!> @file gdncvartostring.f90
2!>
3!> @author GFD Dennou Club
4!> @copyright Copyright (C) GFD Dennou Club, 2000-2026. All rights reserved. <br/>
5!> License is BSD-2-Clause. See [COPYRIGHT](@ref COPYRIGHT) in detail
6!>
7!> @en
8!> @brief Convert netCDF variable to string representation
9!> @enden
10!>
11!> @ja
12!> @brief netCDF 変数を文字列表現に変換
13!> @endja
14!>
15
16!>
17!> @en
18!> @brief Convert variable handle to string
19!>
20!> Returns a string representation of the variable for debugging.
21!> @enden
22!>
23!> @ja
24!> @brief 変数ハンドルを文字列に変換
25!>
26!> デバッグ用に変数の文字列表現を返します。
27!> @endja
28!>
29!> @param[in] var @en Variable handle @enden @ja 変数ハンドル @endja
30!> @return @en String representation of the variable @enden
31!> @ja 変数の文字列表現 @endja
32!>
33function gdncvartostring(var) result(result)
34 use dc_types, only: string
35 use dc_string, only: cprintf
36 use gtdata_netcdf_internal, only: gd_nc_variable_entry, vtable_lookup
38 implicit none
39 character(string):: result
40 type(gd_nc_variable), intent(in):: var
41 type(gd_nc_variable_entry):: ent
42continue
43 if (vtable_lookup(var, ent) /= 0) then
44 result = cprintf("GD_NC_VARIABLE(bad id %d)", i=(/var%id/))
45 else
46 result = cprintf("GD_NC_VARIABLE(file=%d, var=%d, dim=%d)", &
47 & i=(/ent%fileid, ent%varid, ent%dimid/))
48 endif
49end function gdncvartostring
character(string) function gdncvartostring(var)
文字型変数の操作
Definition dc_string.f90:83
種別型パラメタを提供します。
Definition dc_types.f90:55
integer, parameter, public string
文字列を保持する 文字型変数の種別型パラメタ
Definition dc_types.f90:137
integer function, public vtable_lookup(var, entry)