! $Id$ module prd_mod type prd_r4_type character ( len =5) :: acronym character (len =50) :: name character ( len =100) :: longname integer :: elements, lines real , dimension ( :,:), allocatable :: data end type prd_r4_type type et_prd_type integer :: FIRST = 0 integer :: COD = 0 integer :: REF = 1 integer :: LAST = 1 end type et_prd_type type et_geo_type integer :: FIRST = 0 integer :: LAT = 0 integer :: LON = 1 integer :: LAST = 1 end type et_geo_type type prd_main_type type ( prd_r4_type ) , allocatable :: cld(:) type ( prd_r4_type ) , allocatable :: geo(:) type (et_prd_type ) :: et_prd contains procedure::populate_attributes procedure :: deallocate_data end type prd_main_type contains subroutine populate_attributes ( self , elements, lines ) class (prd_main_type) :: self integer, intent(in) :: elements,lines allocate ( self % cld (2) , self%geo(2)) do i = 1 , 2 allocate ( self % cld (i) % data (elements, lines ) ) end do do i = 1 , 2 allocate ( self % geo (i) % data (elements, lines ) ) end do self % cld (1) % acronym ='COD' self % cld (1) % name ='cld_opd_dcomp' self % cld (1) % longname ='Cloud Optical Thickness' self % cld (2) % acronym ='REF' self % cld (2) % name ='cld_reff_dcomp' self % cld (2) % longname ='Cloud Effective Radius' self % geo (1) % acronym ='LAT' self % geo (1) % name ='latitude' self % geo (1) % longname ='Cloud Optical Thickness' self % geo (2) % acronym ='LON' self % geo (2) % name ='longitude' self % geo (2) % longname ='Cloud Effective Radius' end subroutine populate_attributes subroutine deallocate_data ( self) class ( prd_main_type):: self deallocate ( self % cld ) deallocate ( self % geo ) end subroutine deallocate_data end module prd_mod