!$Id$ module sensor_mod enum , bind(C) enumerator :: ETsensor_invalid = 0 enumerator :: ETsensor_avhrr =1 enumerator :: ETsensor_aqua enumerator :: ETsensor_terra enumerator :: ETsensor_seviri enumerator :: ETsensor_goes_first =5 enumerator :: ETsensor_goes_mop =5 enumerator :: ETsensor_goes_il =6 enumerator :: ETsensor_goes_last =6 enumerator :: ETsensor_viirs enumerator :: ETsensor_mtsat enumerator :: ETsensor_aqua_mac enumerator :: ETsensor_iff_viirs enumerator :: ETsensor_iff_aqua end enum enum, bind(C) enumerator :: ETresolu_invalid = 0 enumerator :: ETresolu_1km enumerator :: ETresolu_5km end enum type sensor_type character (len=20) :: sensor_name character (len=100) :: instr_const_file character ( len =100) :: algo_const_file character ( len = 100 ) :: ancil_dir integer :: wmo_id integer :: ETsensor integer :: ET_modis_resolu contains procedure :: populate => populate_sensor_type end type sensor_type contains subroutine populate_sensor_type ( this , file , path ) use area_file_mod class ( sensor_type) :: this character (len =* ) , intent(in) :: file character (len =* ) , intent(in) :: path integer :: sat_id_num ! - initialize this % sensor_name = 'not_set' this % ETsensor = ETsensor_invalid ! - MODIS if ( index ( file , 'MYD' ) .or. index( file , 'IFF_aqua') ) then this % sensor_name = 'MODIS : AQUA' this % wmo_id = 784 this % instr_const_file = 'modis_aqua_instr.dat' this % algo_const_file = 'modis_aqua_algo.dat' this % ETsensor = ETsensor_aqua if (index( file , 'IFF_aqua')) this % ETsensor = ETsensor_iff_aqua end if if ( index ( file , 'MOD' )) then this % sensor_name = 'MODIS : TERRA' this % wmo_id = 783 this % instr_const_file = 'modis_terra_instr.dat' this % algo_const_file = 'modis_terra_algo.dat' this % ETsensor = ETsensor_terra end if if ( index ( file , 'MAC02' )) then this % sensor_name = 'MODIS : AQUA' this % wmo_id = 783 this % instr_const_file = 'modis_aqua_instr.dat' this % algo_const_file = 'modis_aqua_algo.dat' this % ETsensor = ETsensor_aqua end if if ( index ( file , 'D02SSH') ) then this % ET_modis_resolu = ETresolu_5km end if if ( index ( file , 'D021KM') ) then this % ET_modis_resolu = ETresolu_1km end if if ( this % ETsensor /= ETsensor_invalid ) return ! - VIIRS if ( index ( file , 'GMTCO') .or. index( file , 'IFF_npp') ) then this % sensor_name = 'VIIRS' this % wmo_id = 224 this % instr_const_file = 'viirs_npp_instr.dat' this % algo_const_file = 'viirs_npp_algo.dat' this % ETsensor = ETsensor_viirs if (index( file , 'IFF_npp')) this % ETsensor = ETsensor_iff_viirs end if if ( this % ETsensor /= ETsensor_invalid ) return ! area files if ( is_area_file ( trim(path)//file , sat_id_num ) ) then this % wmo_id = 999 select case (sat_id_num ) case(51:53) this%ETsensor = ETsensor_seviri case(84,85) this%ETsensor = ETsensor_mtsat case(37,38) this%ETsensor = ETsensor_fy2 case(250) this%ETsensor = ETsensor_coms case (71,73,75,77,79,181,183,185) this%ETsensor = ETsensor_goes_sounder case (70,72,74,76) this%ETsensor = ETsensor_goes_il case ( 78, 180,182,184) this%ETsensor = ETsensor_goes_mop end select end if end subroutine populate_sensor_type end module sensor_mod