/[MITgcm]/MITgcm/pkg/exf/exf_set_uv.F
ViewVC logotype

Diff of /MITgcm/pkg/exf/exf_set_uv.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.13 by heimbach, Tue Jun 6 14:55:53 2006 UTC revision 1.14 by dimitri, Fri Jun 30 12:05:42 2006 UTC
# Line 94  c     == local variables == Line 94  c     == local variables ==
94        _RL     tmp_u (1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)        _RL     tmp_u (1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
95        _RL     tmp_v (1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)        _RL     tmp_v (1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
96        integer count0, count1, offset        integer count0, count1, offset
97          parameter(offset=0)
98        integer i, j, bi, bj        integer i, j, bi, bj
99        integer   il, interp_method        integer   il, interp_method
       parameter(interp_method=2)  
100        integer year0, year1        integer year0, year1
101    
102  c     == external ==  c     == external ==
# Line 154  C     Complete filenames with YR or _YEA Line 154  C     Complete filenames with YR or _YEA
154                vvecfile0 = vvecfile                vvecfile0 = vvecfile
155              endif              endif
156  c     scalar interpolation to (xC,yC) locations  c     scalar interpolation to (xC,yC) locations
157                interp_method=12
158              call exf_interp( uvecfile0, exf_iprec              call exf_interp( uvecfile0, exf_iprec
159       &          , tmp_u, count0, xC, yC       &          , tmp_u, count0, xC, yC
160       &          , uvec_lon0,uvec_lon_inc       &          , uvec_lon0,uvec_lon_inc
161       &          , uvec_lat0,uvec_lat_inc       &          , uvec_lat0,uvec_lat_inc
162       &          , uvec_nlon,uvec_nlat,interp_method,mythid       &          , uvec_nlon,uvec_nlat,interp_method,mythid
163       &          )       &          )
164                interp_method=22
165              call exf_interp( vvecfile0, exf_iprec              call exf_interp( vvecfile0, exf_iprec
166       &          , tmp_v, count0, xC, yC       &          , tmp_v, count0, xC, yC
167       &          , vvec_lon0,vvec_lon_inc       &          , vvec_lon0,vvec_lon_inc
# Line 171  c     vector rotation Line 173  c     vector rotation
173                do bi = mybxlo(mythid),mybxhi(mythid)                do bi = mybxlo(mythid),mybxhi(mythid)
174                  do j = 1,sny                  do j = 1,sny
175                    do i = 1,snx                    do i = 1,snx
176  C     if yc is within dyc of North Pole then find direction from adjacent values  Cdm   if yc is within dyc of North Pole then find direction from adjacent values
177                      offset=0  Cdm                 offset=0
178                      if ( yC(i,j,bi,bj) .gt.  Cdm                 if ( yC(i,j,bi,bj) .gt.
179       &                  (90-dyC(i,j,bi,bj)*8.9946e-06) )  Cdm  &                  (90-dyC(i,j,bi,bj)*8.9946e-06) )
180       &                  offset=2  Cdm  &                  offset=2
181                      x1=xG(i-offset,j-offset,bi,bj)                      x1=xG(i-offset,j-offset,bi,bj)
182                      x2=xG(i-offset+1,j-offset,bi,bj)                      x2=xG(i-offset+1,j-offset,bi,bj)
183                      x3=xG(i-offset,j-offset+1,bi,bj)                      x3=xG(i-offset,j-offset+1,bi,bj)
# Line 256  C     Complete filenames with YR or _YEA Line 258  C     Complete filenames with YR or _YEA
258                vvecfile1 = vvecfile                vvecfile1 = vvecfile
259              endif              endif
260  c     scalar interpolation to (xC,yC) locations  c     scalar interpolation to (xC,yC) locations
261                interp_method=12
262              call exf_interp( uvecfile1, exf_iprec              call exf_interp( uvecfile1, exf_iprec
263       &          , tmp_u, count1, xC, yC       &          , tmp_u, count1, xC, yC
264       &          , uvec_lon0,uvec_lon_inc       &          , uvec_lon0,uvec_lon_inc
265       &          , uvec_lat0,uvec_lat_inc       &          , uvec_lat0,uvec_lat_inc
266       &          , uvec_nlon,uvec_nlat,interp_method,mythid       &          , uvec_nlon,uvec_nlat,interp_method,mythid
267       &          )       &          )
268                interp_method=22
269              call exf_interp( vvecfile1, exf_iprec              call exf_interp( vvecfile1, exf_iprec
270       &          , tmp_v, count1, xC, yC       &          , tmp_v, count1, xC, yC
271       &          , vvec_lon0,vvec_lon_inc       &          , vvec_lon0,vvec_lon_inc
# Line 273  c     vector rotation Line 277  c     vector rotation
277                do bi = mybxlo(mythid),mybxhi(mythid)                do bi = mybxlo(mythid),mybxhi(mythid)
278                  do j = 1,sny                  do j = 1,sny
279                    do i = 1,snx                    do i = 1,snx
280  C     if yc is within dyc of North Pole then find direction from adjacent values  Cdm   if yc is within dyc of North Pole then find direction from adjacent values
281                      offset=0  Cdm                 offset=0
282                      if ( yC(i,j,bi,bj) .gt.  Cdm                 if ( yC(i,j,bi,bj) .gt.
283       &                  (90-dyC(i,j,bi,bj)*8.9946e-06) )  Cdm  &                  (90-dyC(i,j,bi,bj)*8.9946e-06) )
284       &                  offset=2  Cdm  &                  offset=2
285                      x1=xG(i-offset,j-offset,bi,bj)                      x1=xG(i-offset,j-offset,bi,bj)
286                      x2=xG(i-offset+1,j-offset,bi,bj)                      x2=xG(i-offset+1,j-offset,bi,bj)
287                      x3=xG(i-offset,j-offset+1,bi,bj)                      x3=xG(i-offset,j-offset+1,bi,bj)
# Line 343  c     Interpolate linearly onto the curr Line 347  c     Interpolate linearly onto the curr
347        ELSE        ELSE
348  c     IF ( .NOT. useCubedSphereExchange )  c     IF ( .NOT. useCubedSphereExchange )
349    
350           interp_method=12
351          call exf_set_gen(          call exf_set_gen(
352       &      uvecfile, uvecstartdate, uvecperiod,       &      uvecfile, uvecstartdate, uvecperiod,
353       I      uvecstartdate1, uvecstartdate2,       I      uvecstartdate1, uvecstartdate2,
# Line 352  c     IF ( .NOT. useCubedSphereExchange Line 357  c     IF ( .NOT. useCubedSphereExchange
357       &      uvec_lon0, uvec_lon_inc, uvec_lat0, uvec_lat_inc,       &      uvec_lon0, uvec_lon_inc, uvec_lat0, uvec_lat_inc,
358       &      uvec_nlon, uvec_nlat, xC, yC, interp_method,       &      uvec_nlon, uvec_nlat, xC, yC, interp_method,
359       &      mycurrenttime, mycurrentiter, mythid )       &      mycurrenttime, mycurrentiter, mythid )
360            interp_method=22
361          call exf_set_gen(          call exf_set_gen(
362       &      vvecfile, vvecstartdate, vvecperiod,       &      vvecfile, vvecstartdate, vvecperiod,
363       I      vvecstartdate1, vvecstartdate2,       I      vvecstartdate1, vvecstartdate2,

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.14

  ViewVC Help
Powered by ViewVC 1.1.22