Module gr_file

module gr_file

        ! Uses
    use dc_string, only: VSTRING

        ! Types
    public type GR_ATTR_ENTRY
    public type GR_FILE_ENTRY

        ! Variables
    type (GR_FILE_ENTRY), public, save, pointer :: file_table_head
    logical, public, save :: file_table_used = .FALSE.

        ! Subroutines and functions
    public subroutine GRFileName (fileid, result)
    public subroutine parse_ctl_file (grfile, filename, writable, mystat)
    public subroutine GRFileOpen (fileid, filename, writable, overwrite, stat, err)

end module gr_file

Description of Types

GR_ATTR_ENTRY

public type GR_ATTR_ENTRY
    character (len=8) :: var
    character (len=72) :: attr
    type (VSTRING) :: value
    type (GR_ATTR_ENTRY), pointer :: next
end type GR_ATTR_ENTRY

GR_FILE_ENTRY

public type GR_FILE_ENTRY
    integer :: id
    integer :: count
    logical :: writable
    type (VSTRING) :: ctlfile
    type (VSTRING) :: dsetfile
    type (GR_FILE_ENTRY), pointer :: next
    type (VSTRING) :: title
    real :: undef
    real, pointer, dimension (:) :: lon
    real, pointer, dimension (:) :: lat
    real, pointer, dimension (:) :: lev
    character (len=16) :: time_origin
    character (len=2) :: time_unit
    integer :: time_step
    integer :: time_count
    integer :: nvars
    character (len=8), pointer, dimension (:) :: varname
    type (VSTRING), pointer, dimension (:) :: vardesc
    integer, pointer, dimension (:) :: levels
    type (GR_ATTR_ENTRY), pointer :: attr_table
end type GR_FILE_ENTRY

Description of Variables

file_table_head

type (GR_FILE_ENTRY), public, save, pointer :: file_table_head

file_table_used

logical, public, save :: file_table_used = .FALSE.

Description of Subroutines and Functions

GRFileName

public subroutine GRFileName (fileid, result)
    integer, intent(in) :: fileid
    type (VSTRING), intent(out) :: result
    ! Calls: StoreError
end subroutine GRFileName

parse_ctl_file

public subroutine parse_ctl_file (grfile, filename, writable, mystat)
    type (GR_FILE_ENTRY), intent(out) :: grfile
    character (len=*), intent(in) :: filename
    logical, intent(in) :: writable
    integer, intent(out) :: mystat
end subroutine parse_ctl_file

GRFileOpen

public subroutine GRFileOpen (fileid, filename, writable, overwrite, stat, err)
    integer, intent(out) :: fileid
    character (len=*), intent(in) :: filename
    logical, optional, intent(in) :: writable
    logical, optional, intent(in) :: overwrite
    integer, optional, intent(out) :: stat
    logical, optional, intent(out) :: err
    ! Calls: StoreError, parse_ctl_file
end subroutine GRFileOpen