Convert netCDF type ID to type name string .
More...
Go to the source code of this file.
Convert netCDF type ID to type name string
.
- Author
- GFD Dennou Club
- Copyright
- Copyright (C) GFD Dennou Club, 2000-2026. All rights reserved.
License is BSD-2-Clause. See COPYRIGHT in detail
Definition in file gdncxtypename.f90.
◆ gdncxtypename()
| subroutine gdncxtypename |
( |
integer, intent(in) | ixtype, |
|
|
character(*), intent(out) | xtype ) |
Get netCDF type name from type ID
Converts a netCDF type identifier to its string representation.
- Parameters
-
| [in] | ixtype | netCDF type identifier |
| [out] | xtype | Type name string |
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