Module an_generic

module an_generic

        ! Uses
    use an_types, only: an_variable

        ! Interfaces
    public interface open
    public interface search_dim
    public interface create
    public interface ANVarDel
    public interface close
    public interface toString
    public interface inquire
    public interface attr_rewind
    public interface attr_next
    public interface get_attr
    public interface put_attr
    public interface del_attr
    public interface copy_attr
    public interface get
    public interface put
    public interface var_search
    public interface ANVarSync
    public interface ANXTypeName

end module an_generic

Description of Interfaces

open

public interface open
    recursive subroutine ANVarOpen (var, url, writable, err)
        type (AN_VARIABLE), intent(out) :: var
        character (len=*), intent(in) :: url
        logical, optional, intent(in) :: writable
        logical, optional, intent(out) :: err
    end subroutine ANVarOpen
    subroutine ANVarOpenByDimOrd (var, src_var, dimord, err)
        type (AN_VARIABLE), intent(out) :: var
        type (AN_VARIABLE), intent(in) :: src_var
        integer, intent(in) :: dimord
        logical, optional, intent(out) :: err
    end subroutine ANVarOpenByDimOrd
end interface open

search_dim

public interface search_dim
    integer function an_search_dim (var, dimname)
        type (an_variable), intent(in) :: var
        character (len=*), intent(in) :: dimname
    end function an_search_dim
end interface search_dim

create

public interface create
    subroutine ANVarCreate (var, url, xtype, dims, overwrite, err)
        type (AN_VARIABLE), intent(out) :: var
        character (len=*), intent(in) :: url
        character (len=*), intent(in) :: xtype
        type (AN_VARIABLE), intent(in), dimension (:) :: dims
        logical, optional, intent(in) :: overwrite
        logical, optional, intent(out) :: err
    end subroutine ANVarCreate
    subroutine ANVarCreateD (var, url, xtype, length, overwrite, err)
        type (AN_VARIABLE), intent(out) :: var
        character (len=*), intent(in) :: url
        character (len=*), intent(in) :: xtype
        integer, intent(in) :: length
        logical, optional, intent(in) :: overwrite
        logical, optional, intent(out) :: err
    end subroutine ANVarCreateD
end interface create

ANVarDel

public interface ANVarDel
    subroutine ANVarDel (varname, hint, stat)
        character (len=*), intent(in) :: varname
        character (len=*), intent(in) :: hint
        integer, intent(out) :: stat
    end subroutine ANVarDel
end interface ANVarDel

close

public interface close
    subroutine ANVarClose (var, err)
        type (AN_VARIABLE), intent(in) :: var
        logical, optional, intent(out) :: err
    end subroutine ANVarClose
end interface close

toString

public interface toString
    function ANVarToString (var) result (result)
        type (AN_VARIABLE), intent(in) :: var
        character (len=string) :: result
    end function ANVarToString
end interface toString

inquire

public interface inquire
    subroutine ANVarInquire (var, ndims, dimlen, growable, name, url, xtype)
        type (an_variable), intent(in) :: var
        integer, optional, intent(out) :: ndims
        integer, optional, intent(out) :: dimlen
        logical, optional, intent(out) :: growable
        character (len=*), optional, intent(out) :: name
        character (len=*), optional, intent(out) :: url
        character (len=*), optional, intent(out) :: xtype
    end subroutine ANVarInquire
    subroutine ANVarInquireIA (var, dimlen)
        type (AN_VARIABLE), intent(in) :: var
        integer, intent(out), dimension (:) :: dimlen
    end subroutine ANVarInquireIA
    subroutine ANAttrInquire (var, attrname, xtype)
        type (AN_VARIABLE), intent(in) :: var
        character (len=*), intent(in) :: attrname
        character (len=*), optional, intent(out) :: xtype
    end subroutine ANAttrInquire
end interface inquire

attr_rewind

public interface attr_rewind
    subroutine ANVarAttrRewind (var)
        type (AN_VARIABLE), intent(in) :: var
    end subroutine ANVarAttrRewind
end interface attr_rewind

attr_next

public interface attr_next
    subroutine ANVarAttrNext (var, name, end)
        type (AN_VARIABLE), intent(in) :: var
        character (len=*), intent(out) :: name
        logical, optional, intent(out) :: end
    end subroutine ANVarAttrNext
end interface attr_next

get_attr

public interface get_attr
    subroutine ANAttrGetChar (var, name, value, default, stat)
        type (AN_VARIABLE), intent(in) :: var
        character (len=*), intent(in) :: name
        character (len=*), intent(out) :: value
        character (len=*), intent(in) :: default
        integer, intent(out) :: stat
    end subroutine ANAttrGetChar
    subroutine ANVarGetAttrLogical (var, name, value, default)
        type (AN_VARIABLE), intent(in) :: var
        character (len=*), intent(in) :: name
        logical, intent(out) :: value
        logical, optional, intent(in) :: default
    end subroutine ANVarGetAttrLogical
    subroutine AnAttrGetReal (var, name, value, stat, default)
        type (AN_VARIABLE), intent(in) :: var
        character (len=*), intent(in) :: name
        real, intent(out), dimension (:) :: value
        integer, intent(out) :: stat
        real, optional, intent(in) :: default
    end subroutine AnAttrGetReal
    subroutine AnAttrGetDouble (var, name, value, stat, default)
        type (AN_VARIABLE), intent(in) :: var
        character (len=*), intent(in) :: name
        double precision, intent(out), dimension (:) :: value
        integer, intent(out) :: stat
        double precision, optional, intent(in) :: default
    end subroutine AnAttrGetDouble
    subroutine AnAttrGetInt (var, name, value, stat, default)
        type (AN_VARIABLE), intent(in) :: var
        character (len=*), intent(in) :: name
        integer, intent(out), dimension (:) :: value
        integer, intent(out) :: stat
        integer, optional, intent(in) :: default
    end subroutine AnAttrGetInt
end interface get_attr

put_attr

public interface put_attr
    subroutine ANVarPutAttrReal (var, name, value, err)
        type (AN_VARIABLE), intent(in) :: var
        character (len=*), intent(in) :: name
        real, intent(in), dimension (:) :: value
        logical, optional, intent(out) :: err
    end subroutine ANVarPutAttrReal
    subroutine ANVarPutAttrDouble (var, name, value, err)
        type (AN_VARIABLE), intent(in) :: var
        character (len=*), intent(in) :: name
        double precision, intent(in), dimension (:) :: value
        logical, optional, intent(out) :: err
    end subroutine ANVarPutAttrDouble
    subroutine ANVarPutAttrInt (var, name, value, err)
        type (AN_VARIABLE), intent(in) :: var
        character (len=*), intent(in) :: name
        integer, intent(in), dimension (:) :: value
        logical, optional, intent(out) :: err
    end subroutine ANVarPutAttrInt
    subroutine ANVarPutAttrLogical (var, name, value, err)
        type (AN_VARIABLE), intent(in) :: var
        character (len=*), intent(in) :: name
        logical, intent(in) :: value
        logical, optional, intent(out) :: err
    end subroutine ANVarPutAttrLogical
    subroutine ANVarPutAttrChar (var, name, value, xtype, err)
        type (AN_VARIABLE), intent(in) :: var
        character (len=*), intent(in) :: name
        character (len=*), intent(in) :: value
        character (len=*), optional, intent(in) :: xtype
        logical, optional, intent(out) :: err
    end subroutine ANVarPutAttrChar
end interface put_attr

del_attr

public interface del_attr
    subroutine ANVarDelAttr (var, name, err)
        type (AN_VARIABLE), intent(in) :: var
        character (len=*), intent(in) :: name
        logical, optional, intent(out) :: err
    end subroutine ANVarDelAttr
end interface del_attr

copy_attr

public interface copy_attr
    subroutine ANVarAttrCopy (to, attrname, from, stat)
        type (AN_VARIABLE), intent(in) :: to
        character (len=*), intent(in) :: attrname
        type (AN_VARIABLE), intent(in) :: from
        integer, intent(out) :: stat
    end subroutine ANVarAttrCopy
end interface copy_attr

get

public interface get
    subroutine anvargetreal (var, start, count, stride, imap, siz, value, iostat)
        type (AN_VARIABLE), intent(in) :: var
        integer, intent(in), dimension (:) :: start
        integer, intent(in), dimension (:) :: count
        integer, intent(in), dimension (:) :: stride
        integer, intent(in), dimension (:) :: imap
        integer, intent(in) :: siz
        real, intent(out), dimension (siz) :: value
        integer, intent(out) :: iostat
    end subroutine anvargetreal
    subroutine anvargetdouble (var, start, count, stride, imap, siz, value, iostat)
        type (AN_VARIABLE), intent(in) :: var
        integer, intent(in), dimension (:) :: start
        integer, intent(in), dimension (:) :: count
        integer, intent(in), dimension (:) :: stride
        integer, intent(in), dimension (:) :: imap
        integer, intent(in) :: siz
        double precision, intent(out), dimension (siz) :: value
        integer, intent(out) :: iostat
    end subroutine anvargetdouble
end interface get

put

public interface put
    subroutine anvarputreal (var, start, count, stride, imap, siz, value, iostat)
        type (AN_VARIABLE), intent(in) :: var
        integer, intent(in), dimension (:) :: start
        integer, intent(in), dimension (:) :: count
        integer, intent(in), dimension (:) :: stride
        integer, intent(in), dimension (:) :: imap
        integer, intent(in) :: siz
        real, intent(in), dimension (siz) :: value
        integer, intent(out) :: iostat
    end subroutine anvarputreal
    subroutine anvarputdouble (var, start, count, stride, imap, siz, value, iostat)
        type (AN_VARIABLE), intent(in) :: var
        integer, intent(in), dimension (:) :: start
        integer, intent(in), dimension (:) :: count
        integer, intent(in), dimension (:) :: stride
        integer, intent(in), dimension (:) :: imap
        integer, intent(in) :: siz
        double precision, intent(in), dimension (siz) :: value
        integer, intent(out) :: iostat
    end subroutine anvarputdouble
end interface put

var_search

public interface var_search
    subroutine ANVarSearchInit (iter, urlBase)
        type (AN_VARIABLE_SEARCH), intent(out) :: iter
        character (len=*), intent(in) :: urlBase
    end subroutine ANVarSearchInit
    subroutine ANVarSearchNext (iter, url, end)
        type (AN_VARIABLE_SEARCH), intent(inout) :: iter
        character (len=*), intent(out) :: url
        logical, intent(out) :: end
    end subroutine ANVarSearchNext
end interface var_search

ANVarSync

public interface ANVarSync
    subroutine ANVarSync (var, stat)
        type (AN_VARIABLE), optional, intent(in) :: var
        integer, optional, intent(out) :: stat
    end subroutine ANVarSync
end interface ANVarSync

ANXTypeName

public interface ANXTypeName
    subroutine ANXTypeName (ixtype, xtype)
        integer, intent(in) :: ixtype
        character (len=*), intent(out) :: xtype
    end subroutine ANXTypeName
end interface ANXTypeName