# module NumRu::GPhys::GrADS_IO

helps read/write GrADS-formatted data

## Module functions

#### `is_a_GrADS?(filename)`

  test whether the file is a GrADS control file.

  ARGUMENTS

  - filename (String): filename to test.

  RETURN VALUE

  - true/false

#### `open(file, varname)`

  GPhys constructor from GrADS.

  ARGUMENTS

  - file (GrADS_Gridded or String): file to read. If string, it must be the name (path) of a GrADS control file.
  - varname (String): name of the varible in the file, for which a GPhys object is constructed.

  RETURN VALUE

  - a GPhys

  EXAMPLE

  - Suppose that you have a file T.jan.ctl in the currentdirectly, and it contains a variable "T". The following creates a GPhys object representing the variable in the file.

        require "numru/gphys"
        include GPhys
        temp = GPhys::GrADS_IO.open("T.jan.ctl","T")

#### `write(file, gphys, name=nil)`

  writes a GPhys object into a GrADS file. -- !!only 4D data is supported!!

#### `var_names(file)`

  ARGUMENTS

  - file (GrADS_Gridded or String): if string, it must be the name (path) of a GrADS control file.

  RETURN VALUE

  - names of variables (Array): this return the names of variables which the file has.

#### `var_names_except_coordinates(file)`

  same as var_names