Subversion Repositories lagranto.wrf

Rev

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

Rev 20 Rev 21
Line 497... Line 497...
497
            call input_var_wrf(fid,varname,f3t1,nx,ny,nz)	        ! field to trace
497
            call input_var_wrf(fid,varname,f3t1,nx,ny,nz)	        ! field to trace
498
 
498
 
499
	        varname='geopot'					                    ! geopot.height
499
	        varname='geopot'					                    ! geopot.height
500
	        call input_var_wrf(fid,varname,p3t1,nx,ny,nz)
500
	        call input_var_wrf(fid,varname,p3t1,nx,ny,nz)
501
 
501
 
502
	        varname='geopots'					                    ! geopot.height
502
	        varname='geopots'					                    ! surface geopot.height 
503
	        call input_var_wrf(fid,varname,spt1,nx,ny,1)
503
	        call input_var_wrf(fid,varname,spt1,nx,ny,1)
504
 
504
 
505
            call input_close(fid)
505
            call input_close(fid)
506
 
506
 
507
            iloaded1 = itime1
507
            iloaded1 = itime1
Line 511... Line 511...
511
         ! Loop over all trajectories
511
         ! Loop over all trajectories
512
         do k=1,ntra
512
         do k=1,ntra
513
 
513
 
514
            ! Set the horizontal position where to interpolate to
514
            ! Set the horizontal position where to interpolate to
515
            x0       = traint(k,j,2)                          ! Longitude
515
            x0       = traint(k,j,2)                          ! Longitude
-
 
516
            y0       = traint(k,j,3)
516
            y0       = traint(k,j,3)                          ! Latitude
517
                                   ! Latitude
-
 
518
            ! Set the relative time
-
 
519
            call hhmm2frac(traint(k,j,1),tfrac)
-
 
520
            reltpos0 = fbflag * (tfrac-time0)/timeinc
517
 
521
 
518
            ! Set the vertical position where to interpolate to: 
522
            ! Set the vertical position where to interpolate to: 
519
            if ( nz.gt.1 ) then
523
            if ( nz.gt.1 ) then
520
               p0 = traint(k,j,4)                            ! Pressure (3D tracing)
524
               p0 = traint(k,j,4)                            ! Pressure (3D tracing)
521
            else
525
            else
Line 570... Line 574...
570
 
574
 
571
            ! ------------------------ NORMAL mode -------------------------------
575
            ! ------------------------ NORMAL mode -------------------------------
572
            else 
576
            else 
573
 
577
 
574
               f0 = int_index4(f3t0,f3t1,nx,ny,nz,xind,yind,pind,reltpos0,mdv)
578
               f0 = int_index4(f3t0,f3t1,nx,ny,nz,xind,yind,pind,reltpos0,mdv)
575
 
579
               
576
            endif
580
            endif
577
 
581
 
578
            ! Save the new field
582
            ! Save the new field
579
            if ( abs(f0-mdv).gt.eps) then
583
            if ( abs(f0-mdv).gt.eps) then
580
               traint(k,j,ncol+i) = f0
584
               traint(k,j,ncol+i) = f0
Line 587... Line 591...
587
      enddo ! end loop over all times
591
      enddo ! end loop over all times
588
 
592
 
589
      ! Exit point for loop over all tracing variables
593
      ! Exit point for loop over all tracing variables
590
 110   continue
594
 110   continue
591
 
595
 
592
  enddo ! end loop over all tracing varoables
596
  enddo ! end loop over all tracing variables
593
 
597
 
594
  ! --------------------------------------------------------------------
598
  ! --------------------------------------------------------------------
595
  ! Write output to output trajectory file
599
  ! Write output to output trajectory file
596
  ! --------------------------------------------------------------------
600
  ! --------------------------------------------------------------------
597
 
601