Subversion Repositories lagranto.wrf

Rev

Rev 2 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2 Rev 11
Line 41... Line 41...
41
      character*80                           vars_out(100) ! Variable names
41
      character*80                           vars_out(100) ! Variable names
42
  
42
  
43
      real                                   time_inp(500) ! Times of input trajectory
43
      real                                   time_inp(500) ! Times of input trajectory
44
      real                                   time_out(500) ! Times of output trajectory
44
      real                                   time_out(500) ! Times of output trajectory
45
      integer                                refdate(6)    ! Reference date
45
      integer                                refdate(6)    ! Reference date
-
 
46
      integer                                ind_time(500) ! Index for time selection
46
 
47
 
47
c     Auxiliary variables
48
c     Auxiliary variables
48
      integer                                inpmode
49
      integer                                inpmode
49
      integer                                outmode
50
      integer                                outmode
50
      integer                                stat
51
      integer                                stat
Line 253... Line 254...
253
 
254
 
254
      enddo
255
      enddo
255
 
256
 
256
c     Get the indices of the selected times
257
c     Get the indices of the selected times
257
      do i=1,ntim_out
258
      do i=1,ntim_out
258
         ind(i) = 0
259
         ind_time(i) = 0
259
      enddo
260
      enddo
260
      do i=1,ntim_out
261
      do i=1,ntim_out
261
         do j=1,ntim_inp
262
         do j=1,ntim_inp
262
            if ( abs(time_out(i)-time_inp(j)).lt.eps) ind(i) = j
263
            if ( abs(time_out(i)-time_inp(j)).lt.eps) ind_time(i) = j
263
         enddo
264
         enddo
264
      enddo
265
      enddo
265
      do i=1,ntim_out
266
      do i=1,ntim_out
266
         if ( ind(i).eq.0) then
267
         if ( ind_time(i).eq.0) then
267
            print*,' Invalid time ',time_out(i)
268
            print*,' Invalid time ',time_out(i)
268
            stop
269
            stop
269
         endif
270
         endif
270
      enddo
271
      enddo
271
      
272
      
Line 279... Line 280...
279
 
280
 
280
c     Copy the selected times to the output trajectory
281
c     Copy the selected times to the output trajectory
281
      do i=1,ntra_out
282
      do i=1,ntra_out
282
         do j=1,ntim_out
283
         do j=1,ntim_out
283
            do k=1,ncol_out
284
            do k=1,ncol_out
284
               tra_out(i,j,k) = tra_inp(i,ind(j),k)
285
               tra_out(i,j,k) = tra_inp(i,ind_time(j),k)
285
            enddo
286
            enddo
286
         enddo
287
         enddo
287
      enddo
288
      enddo
288
 
289
 
289
c     Copy meta information
290
c     Copy meta information