Subversion Repositories lagranto.ecmwf

Rev

Rev 21 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 21 Rev 23
Line 134... Line 134...
134
     >        0.,pollon,pollat,varl,sp,nz,ak,bk,stagz,timecheck)
134
     >        0.,pollon,pollat,varl,sp,nz,ak,bk,stagz,timecheck)
135
    
135
    
136
c     Load Variable    
136
c     Load Variable    
137
      call input_wind (cdfid,varnam,field,0.,stagz,mdv,
137
      call input_wind (cdfid,varnam,field,0.,stagz,mdv,
138
     >                 xmin,xmax,ymin,ymax,dx,dy,nx,ny,nz,timecheck)
138
     >                 xmin,xmax,ymin,ymax,dx,dy,nx,ny,nz,timecheck)
139
     
139
 
140
c     In case of isentropic level, read temperature
140
c     In case of isentropic level, read temperature
141
      if (mode.eq.'T') then
141
      if (mode.eq.'T') then
142
            tvar="T"
142
            tvar="T"
143
            do i=1,nvars
143
            do i=1,nvars
144
              if (vnam(i).eq."THETA") tvar="THETA"
144
              if (vnam(i).eq."THETA") tvar="THETA"
Line 178... Line 178...
178
      endif
178
      endif
179
 
179
 
180
C     Determine minimum and maximum
180
C     Determine minimum and maximum
181
      do i=1,nx
181
      do i=1,nx
182
        do j=1,ny
182
        do j=1,ny
-
 
183
 
183
            if ((varf(i,j).ne.mdv).and.(varf(i,j).lt.min)) then
184
            if ((varf(i,j).ne.mdv).and.(varf(i,j).lt.min)) then
184
               min     = varf(i,j)
185
               min     = varf(i,j)
185
               minindx = i
186
               minindx = i
186
               minindy = j
187
               minindy = j
-
 
188
            endif
187
            elseif ((varf(i,j).ne.mdv).and.(varf(i,j).gt.max)) then
189
            if ((varf(i,j).ne.mdv).and.(varf(i,j).gt.max)) then
188
               max     = varf(i,j)
190
               max     = varf(i,j)
189
               maxindx = i
191
               maxindx = i
190
               maxindy = j
192
               maxindy = j
191
          endif
193
          endif
192
        enddo
194
        enddo
193
      enddo
195
      enddo
194
      lonmin = xmin + real(minindx-1) * dx
196
      lonmin = xmin + real(minindx-1) * dx
195
      latmin = ymin + real(minindy-1) * dy
197
      latmin = ymin + real(minindy-1) * dy
196
      lonmax = xmin + real(maxindx-1) * dx
198
      lonmax = xmin + real(maxindx-1) * dx
197
      latmax = ymin + real(maxindy-1) * dy
199
      latmax = ymin + real(maxindy-1) * dy
198
 
200
 
199
c     Rotate position to true longitude/latitude 
201
c     Rotate position to true longitude/latitude 
200
      if ((pollon.ne.0.).or.(pollat.ne.90.)) then
202
      if ((pollon.ne.0.).or.(pollat.ne.90.)) then
201
        xphys=lmstolm(latmin,lonmin,pollat,pollon)
203
        xphys=lmstolm(latmin,lonmin,pollat,pollon)
202
        yphys=phstoph(latmin,lonmin,pollat,pollon)
204
        yphys=phstoph(latmin,lonmin,pollat,pollon)
203
        lonmin=xphys
205
        lonmin=xphys