gtool5 Fortran 90/95 ライブラリ 1.0.0-rc5
English
Loading...
Searching...
No Matches
Functions/Subroutines
gdncxtypename.f90 File Reference

netCDF 型 ID を型名文字列に変換 More...

Go to the source code of this file.

Functions/Subroutines

subroutine gdncxtypename (ixtype, xtype)
 

Detailed Description

netCDF 型 ID を型名文字列に変換

Author
GFD Dennou Club

Definition in file gdncxtypename.f90.

Function/Subroutine Documentation

◆ gdncxtypename()

subroutine gdncxtypename ( integer, intent(in)  ixtype,
character(*), intent(out)  xtype 
)

型 ID から netCDF 型名を取得

netCDF 型識別子を文字列表現に変換します。

Parameters
[in]ixtypenetCDF 型識別子
[out]xtype型名文字列

Definition at line 32 of file gdncxtypename.f90.

33 use netcdf, only: &
34 & nf90_byte, &
35 & nf90_char, &
36 & nf90_short, &
37 & nf90_int, &
38 & nf90_float, &
39 & nf90_double
40 implicit none
41 integer, intent(in):: ixtype
42 character(*), intent(out):: xtype
43 select case(ixtype)
44 case(0)
45 xtype = "error"
46 case(nf90_char)
47 xtype = "char"
48 case(nf90_byte)
49 xtype = "byte"
50 case(nf90_short)
51 xtype = "short"
52 case(nf90_int)
53 xtype = "int"
54 case(nf90_float)
55 xtype = "float"
56 case(nf90_double)
57 xtype = "double"
58 case default
59 xtype = ""
60 end select