19 subroutine select_channels(channelinfo,nchannels,channels)
21 use crtm_channelinfo_define
, only: crtm_channelinfo_type
24 type(crtm_channelinfo_type
),
intent(inout) :: channelinfo
25 integer,
intent(in) :: nchannels,channels(nchannels)
27 integer :: temp(nchannels)
29 if(nchannels>channelinfo%n_channels)
then
30 write(6,*)
'ERROR*** tried to use more channels than sensor has'
31 write(6,*)
' ',nchannels,
' > ',channelinfo%n_channels
35 check:
do i=1,nchannels
36 if(channels(i)<1 .or. channels(i)>channelinfo%n_channels)
then
37 write(6,*)
'ERROR*** invalid channel id: ',channels(i)
38 write(6,*)
' in SELECT_CHANNELS at index ',i
41 temp(i)=channelinfo%Channel_Index(channels(i))
44 channelinfo%n_channels=nchannels
45 channelinfo%Channel_Index(1:nchannels)=temp
47 end subroutine select_channels
49 subroutine select_channels_l(channelinfo,nchannels,channels,L,igot)
54 use crtm_channelinfo_define
, only: crtm_channelinfo_type
57 type(crtm_channelinfo_type
),
intent(inout) :: channelinfo
58 integer,
intent(in) :: nchannels,channels(nchannels)
60 integer :: temp(nchannels)
61 integer :: l(nchannels)
64 if(nchannels>channelinfo%n_channels)
then
65 write(6,*)
'ERROR*** tried to use more channels than sensor has'
66 write(6,*)
' ',nchannels,
' > ',channelinfo%n_channels
72 if(channels(i)<1 .or. channels(i)>channelinfo%n_channels)
then
73 write(6,*)
'ERROR*** invalid channel id: ',channels(i)
74 write(6,*)
' in SELECT_CHANNELS at index ',i
79 temp(k)=channelinfo%Channel_Index(channels(i))
82 channelinfo%Process_Channel(channels(i))=.false.
95 end subroutine select_channels_l