da_generic_typedefs.inc

References to this file elsewhere.
1    ! generic vector type
2    type generic_vector_type
3       real, pointer :: ptr(:)
4    end type generic_vector_type
5 
6    ! Generic residual type contains lists of vectors and scalars.  
7    ! Implementation notes:   
8    !  - Vector values are always assumed to be stored by reference in
9    !    self%values(1:UBOUND(self%values,1))%ptr.  The size of each vector
10    !    is the same.  These pointers are used to reference arrays that 
11    !    will be deallocated elsewhere, they are not deallocated by 
12    !    destructor residual_generic_free().  When 
13    !    UBOUND(self%values,1)==0, there are no vector values.
14    !  - Scalars are copied into and out of self%values(0)%ptr.  This pointer
15    !    is be allocated and deallocated by this class.  When
16    !    LBOUND(self%values,1)==1, there are no scalar values.  The
17    !    duplication of scalars is unavoidable without changing
18    !    implementations of the specific residual_*_type classes.
19    !  - It would be better to store references to model_loc_type and
20    !    info_type objects here rather than copying proc_domain and
21    !    obs_global_index.  Make this change later when there is
22    !    time to modify other objects to also store references(there should 
23    !    be only one object responsible for each model_loc_type and info_type
24    !    object, but in Fortran90 this must be implemented as a pointer).
25    type residual_generic_type
26       logical                             :: proc_domain
27       integer                             :: obs_global_index
28       type(generic_vector_type), pointer :: values(:) ! vectors & scalars
29    end type residual_generic_type
30 
31    ! template for allocating memory
32    type residual_template_type
33       integer                             :: lbnd  ! lower bound
34       integer                             :: ubnd  ! upper bound
35    end type residual_template_type
36 
37    ! single-obs generic y_type
38    type y_facade_type
39       integer                               :: num_obs
40       integer                               :: num_obs_glo
41       type(residual_generic_type), pointer :: obs(:)
42    end type y_facade_type
43 
44