updated top-level README and version_decl for V4.5 (#1847)
[WRF.git] / var / da / da_radiance / da_crtm_sensor_descriptor.inc
blobbef9819bec2fb513525ee503ab84edd04eb704e2
1 #ifdef CRTM
2 subroutine da_crtm_sensor_descriptor(nsensor,sensor_descriptor)
4  integer,        intent(in)  :: nsensor
5  character(len=80), intent(inout) :: sensor_descriptor(nsensor)
7  integer :: i,platform_id,satellite_id,sensor_id
8  character (len=80) :: crtm_sat, crtm_sensor
10    if (trace_use) call da_trace_entry("da_crtm_sensor_descriptor")  
12   do i=1,nsensor
13      
14      platform_id  = rtminit_platform(i)
15      satellite_id = rtminit_satid(i)
16      sensor_id    = rtminit_sensor(i)
18      if (trim(crtm_platform_name(platform_id)) == 'eos') then
19         if (satellite_id == 2) crtm_sat='aqua'
20         if (satellite_id == 1) crtm_sat='terra'
21      else if (trim(crtm_platform_name(platform_id)) == 'metop') then
22         if (satellite_id == 1) crtm_sat='metop-b'
23         if (satellite_id == 2) crtm_sat='metop-a'
24         if (satellite_id == 3) crtm_sat='metop-c'
25      else if (trim(crtm_platform_name(platform_id)) == 'tiros') then
26         if (satellite_id == 0) crtm_sat='tirosn'
27      else if (trim(crtm_platform_name(platform_id)) == 'fy3') then
28         if (satellite_id == 1) crtm_sat='fy3a'
29         if (satellite_id == 2) crtm_sat='fy3b'
30      else if (trim(crtm_platform_name(platform_id)) == 'npp') then
31         if (satellite_id == 0) crtm_sat='npp'
32      else if (trim(crtm_platform_name(platform_id)) == 'msg') then
33         if (satellite_id == 1) crtm_sat='m08'
34         if (satellite_id == 2) crtm_sat='m09'
35         if (satellite_id == 3) crtm_sat='m10'
36         if (satellite_id == 4) crtm_sat='m11'
37      else if (trim(crtm_platform_name(platform_id)) == 'gcom-w') then
38         if (satellite_id == 1) crtm_sat='gcom-w1'
39      else
40         write(crtm_sat, '(a,i2.2)')  &
41              trim( crtm_platform_name(platform_id) ),satellite_id
42      end if
44      if ( trim(crtm_sensor_name(sensor_id)) == 'airs' ) then
45         crtm_sensor='airs281'
46      elseif ( trim(crtm_sensor_name(sensor_id)) == 'iasi' ) then
47         crtm_sensor='iasi616'           
48      elseif ( trim(crtm_sensor_name(sensor_id)) == 'hirs' ) then
49         if (satellite_id <= 14) crtm_sensor='hirs2'
50         if (satellite_id >= 15 .and. satellite_id <= 17) crtm_sensor='hirs3'
51         if (satellite_id == 18 .or. satellite_id == 19) crtm_sensor='hirs4'
52      elseif ( trim(crtm_sensor_name(sensor_id)) == 'avhrr' ) then
53         if (satellite_id <= 14) crtm_sensor='avhrr2'
54         if (satellite_id >= 15 .and. satellite_id <= 17) crtm_sensor='avhrr3'
55         if (satellite_id == 18 .or. satellite_id == 19) crtm_sensor='avhrr4'
56      else
57         crtm_sensor=crtm_sensor_name(sensor_id)
58      end if
60      sensor_descriptor(i)=trim(crtm_sensor)//'_'//trim(crtm_sat)
62   end do
64    if (trace_use) call da_trace_exit("da_crtm_sensor_descriptor")  
66 end subroutine da_crtm_sensor_descriptor
67 #endif