1 subroutine da_read_obs_ssmi_info (iunit, ob, xb, xbx)
3 !---------------------------------------------------------------------------
4 ! Purpose: Read the header of a SSMI GTS observation file
5 !---------------------------------------------------------------------------
9 integer, intent (in) :: iunit
10 type (xb_type), intent (in) :: xb
11 type (xbx_type),intent (in) :: xbx ! Header & non-gridded vars.
12 type (iv_type), intent (out) :: ob
15 integer :: iost, i, ii
16 character (LEN = 120) :: char_ned
19 integer :: nssmis,nothers
20 integer :: ixc, jxc, iproj, idd, maxnes
21 integer :: nestix(10) , nestjx(10) , numnc(10) , nesti(10) , nestj(10)
22 real :: phic , xlonc , &
23 truelat1_3dv, truelat2_3dv, &
24 local_ts0 , local_ps0 , local_tlp , ptop
27 logical :: check_wrong, check_subdomain
29 if (trace_use) call da_trace_entry("da_read_obs_ssmi_info")
36 if (use_ssmiretrievalobs .or. use_ssmitbobs .or. use_ssmt1obs .or. use_ssmt2obs) then
39 ACCESS = 'SEQUENTIAL', &
44 call da_warning(__FILE__,__LINE__, (/"Cannot open SSMI file"/))
45 use_ssmiretrievalobs = .false.
46 use_ssmitbobs = .false.
47 use_ssmt1obs = .false.
48 use_ssmt2obs = .false.
64 read (unit = iunit, fmt = '(a)', iostat = iost) char_ned
66 use_ssmiretrievalobs = .false.
67 use_ssmitbobs = .false.
68 use_ssmt1obs = .false.
69 use_ssmt2obs = .false.
70 call da_error(__FILE__,__LINE__, (/"Cannot read SSMI file"/))
73 ! 2.3 read NUMBER OF REPORTS
74 ! ---------------------
78 select case (char_ned (I+1:I+5))
79 ! Number of observations
81 if (use_ssmiretrievalobs) &
82 read (char_ned (I+9:I+14),'(I6)', iostat = iost) &
84 if (use_ssmitbobs) then
85 read (char_ned (I+9:I+14),'(I6)', iostat = iost) ob%nlocal(ssmi_tb)
88 read (char_ned (I+9:I+14),'(I6)', iostat = iost) nothers
90 ! Geographic area and reference atmosphere definition
93 read (char_ned (I+8:I+15),'(F8.0)', iostat = iost) ob % missing
95 read (char_ned (I+8:I+14),'(F7.2)', iostat = iost) phic
97 read (char_ned (I+8:I+14),'(F7.2)', iostat = iost) xlonc
99 read (char_ned (I+8:I+14),'(F7.2)', iostat = iost) truelat1_3dv
101 read (char_ned (I+8:I+14),'(F7.2)', iostat = iost) truelat2_3dv
103 read (char_ned (I+8:I+14),'(F7.2)', iostat = iost) local_ts0
105 read (char_ned (I+8:I+14),'(F7.2)', iostat = iost) local_tlp
107 read (char_ned (I+8:I+14),'(F7.0)', iostat = iost) ptop
109 read (char_ned (I+8:I+14),'(F7.0)', iostat = iost) local_ps0
111 read (char_ned (I+8:I+14),'(I7)', iostat = iost) ixc
113 read (char_ned (I+8:I+14),'(I7)', iostat = iost) jxc
115 read (char_ned (I+8:I+14),'(I7)', iostat = iost) iproj
117 read (char_ned (I+8:I+14),'(I7)', iostat = iost) idd
119 read (char_ned (I+8:I+14),'(I7)', iostat = iost) maxnes
120 case default ; read (char_ned (I+9:I+14),'(I6)', iostat = iost) nssmis
124 read (unit = iunit, fmt = '(A)', iostat = iost) char_ned
127 use_ssmiretrievalobs = .false.
128 use_ssmitbobs = .false.
129 use_ssmt1obs = .false.
130 use_ssmt2obs = .false.
131 call da_warning(__FILE__,__LINE__, &
132 (/"Cannot read SSMI file"/))
135 if (char_ned(1:6) == 'NESTIX') exit
139 select case (char_ned (1:6))
140 ! Model domains definition
143 call da_read_obs_ssmi_integer_array(nestix, maxnes, 8, 9)
145 call da_read_obs_ssmi_integer_array(nestjx, maxnes, 8, 9)
147 call da_read_obs_ssmi_integer_array(numnc , maxnes, 8, 9)
149 call da_read_obs_ssmi_real_array (dis , maxnes, 8, 9)
151 call da_read_obs_ssmi_integer_array(nesti , maxnes, 8, 9)
153 call da_read_obs_ssmi_integer_array(nestj , maxnes, 8, 9)
156 read (unit = iunit, fmt = '(A)', iostat = iost) char_ned
157 if (char_ned(1:6) == 'INFO ') exit
160 read (unit = iunit, fmt = '(A)', iostat = iost) char_ned
162 if (trace_use) call da_trace_exit("da_read_obs_ssmi_info")
166 #include "da_read_obs_ssmi_integer_array.inc"
167 #include "da_read_obs_ssmi_real_array.inc"
169 end subroutine da_read_obs_ssmi_info