/[MITgcm]/MITgcm/pkg/ecco/cost_obcs_ageos.F
ViewVC logotype

Diff of /MITgcm/pkg/ecco/cost_obcs_ageos.F

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

revision 1.7 by jmc, Fri Aug 10 19:45:26 2012 UTC revision 1.8 by jmc, Tue Sep 18 20:16:34 2012 UTC
# Line 48  c     == routine arguments == Line 48  c     == routine arguments ==
48    
49  c     == local variables ==  c     == local variables ==
50    
       _RS        one_rs  
       parameter( one_rs = 1. )  
   
51        integer bi,bj        integer bi,bj
52        integer i,j,k        integer i,j,k
53        integer itlo,ithi        integer itlo,ithi
# Line 217  cgg     Minor problem : grad T,S needs o Line 214  cgg     Minor problem : grad T,S needs o
214  cgg    Make a mask for the velocity shear comparison.  cgg    Make a mask for the velocity shear comparison.
215              do k = 1,nr-1              do k = 1,nr-1
216                do i = imin, imax                do i = imin, imax
217                  j = ob_jn(i,bi,bj)                  j = OB_Jn(i,bi,bj)
218  cgg    All these points need to be wet.  cgg    All these points need to be wet.
219                  if (j .eq. 0) then                  if ( j.eq.OB_indexNone ) then
220                    maskxzageos(i,k,bi,bj) = 0.                    maskxzageos(i,k,bi,bj) = 0.
221                  else                  else
222                    maskxzageos(i,k,bi,bj) =                    maskxzageos(i,k,bi,bj) =
# Line 246  C-- jmc: both calls below are wrong if m Line 243  C-- jmc: both calls below are wrong if m
243    
244  cgg   Compute centered difference horizontal gradient on bdy.  cgg   Compute centered difference horizontal gradient on bdy.
245                do i = imin, imax                do i = imin, imax
246                  j = ob_jn(i,bi,bj)                  j = OB_Jn(i,bi,bj)
247                    if ( j.eq.OB_indexNone ) j = 1
248                    xzgrdrho(i,k,bi,bj) =                    xzgrdrho(i,k,bi,bj) =
249       &            (rholoc(i-1,j+jp1,bi,bj)-rholoc(i+1,j+jp1,bi,bj))       &            (rholoc(i-1,j+jp1,bi,bj)-rholoc(i+1,j+jp1,bi,bj))
250       &            /(2.*dxc(i,j+jp1,bi,bj))       &            /(2.*dxc(i,j+jp1,bi,bj))
# Line 258  cgg         Above level 4 needs not be g Line 256  cgg         Above level 4 needs not be g
256  cgg         Please get rid of the "4" ASAP. Ridiculous.  cgg         Please get rid of the "4" ASAP. Ridiculous.
257              do k = 4,Nr-1              do k = 4,Nr-1
258                do i = imin,imax                do i = imin,imax
259                  j = ob_jn(i,bi,bj)                  j = OB_Jn(i,bi,bj)
260                    if ( j.eq.OB_indexNone ) j = 1
261                    xzdvel1(i,k,bi,bj) = vbar(i,j+jp1,k  ,bi,bj)                    xzdvel1(i,k,bi,bj) = vbar(i,j+jp1,k  ,bi,bj)
262       &                               - vbar(i,j+jp1,k+1,bi,bj)       &                               - vbar(i,j+jp1,k+1,bi,bj)
263                   xzdvel2(i,k,bi,bj)=((xzgrdrho(i,k,bi,bj)*delz(k)/2.)+                   xzdvel2(i,k,bi,bj)=((xzgrdrho(i,k,bi,bj)*delz(k)/2.)+
# Line 284  c--         End of loop over layers. Line 283  c--         End of loop over layers.
283  cgg    Make a mask for the velocity shear comparison.  cgg    Make a mask for the velocity shear comparison.
284              do k = 1,nr-1              do k = 1,nr-1
285                do i = imin, imax                do i = imin, imax
286                  j = ob_js(i,bi,bj)                  j = OB_Js(i,bi,bj)
287                  if (j .eq. 0) then                  if ( j.eq.OB_indexNone ) then
288                    maskxzageos(i,k,bi,bj) = 0.                    maskxzageos(i,k,bi,bj) = 0.
289                  else                  else
290  cgg    All these points need to be wet.  cgg    All these points need to be wet.
# Line 314  C-- jmc: both calls below are wrong if m Line 313  C-- jmc: both calls below are wrong if m
313    
314  cgg   Compute centered difference horizontal gradient on bdy.  cgg   Compute centered difference horizontal gradient on bdy.
315                 do i = imin, imax                 do i = imin, imax
316                   j = ob_js(i,bi,bj)                   j = OB_Js(i,bi,bj)
317                     if ( j.eq.OB_indexNone ) j = 1
318                   xzgrdrho(i,k,bi,bj) =                   xzgrdrho(i,k,bi,bj) =
319       &            (rholoc(i-1,j+jp1,bi,bj)-rholoc(i+1,j+jp1,bi,bj))       &            (rholoc(i-1,j+jp1,bi,bj)-rholoc(i+1,j+jp1,bi,bj))
320       &            /(2.*dxc(i,j+jp1,bi,bj))       &            /(2.*dxc(i,j+jp1,bi,bj))
# Line 324  cgg   Compute centered difference horizo Line 324  cgg   Compute centered difference horizo
324  cgg         Compute vertical shear from geostrophy/thermal wind.  cgg         Compute vertical shear from geostrophy/thermal wind.
325               do k = 4,Nr-1               do k = 4,Nr-1
326                 do i = imin,imax                 do i = imin,imax
327                   j = ob_js(i,bi,bj)                   j = OB_Js(i,bi,bj)
328                     if ( j.eq.OB_indexNone ) j = 1
329  cgg         Retrieve the model vertical shear.  cgg         Retrieve the model vertical shear.
330                   xzdvel1(i,k,bi,bj) = vbar(i,j+jp1,k  ,bi,bj)                   xzdvel1(i,k,bi,bj) = vbar(i,j+jp1,k  ,bi,bj)
331       &                               - vbar(i,j+jp1,k+1,bi,bj)       &                               - vbar(i,j+jp1,k+1,bi,bj)
# Line 351  c--         End of loop over layers. Line 352  c--         End of loop over layers.
352  cgg    Make a mask for the velocity shear comparison.  cgg    Make a mask for the velocity shear comparison.
353              do k = 1,nr-1              do k = 1,nr-1
354                do j = jmin, jmax                do j = jmin, jmax
355                  i = ob_iw(j,bi,bj)                  i = OB_Iw(j,bi,bj)
356  cgg    All these points need to be wet.  cgg    All these points need to be wet.
357                  if (i.eq. 0) then                  if ( i.eq.OB_indexNone ) then
358                    maskyzageos(j,k,bi,bj) = 0.                    maskyzageos(j,k,bi,bj) = 0.
359                  else                  else
360                    maskyzageos(j,k,bi,bj) =                    maskyzageos(j,k,bi,bj) =
# Line 379  cgg    All these points need to be wet. Line 380  cgg    All these points need to be wet.
380    
381  cgg   Compute centered difference horizontal gradient on bdy.  cgg   Compute centered difference horizontal gradient on bdy.
382                do j = jmin, jmax                do j = jmin, jmax
383                  i = ob_iw(j,bi,bj)                  i = OB_Iw(j,bi,bj)
384                    if ( i.eq.OB_indexNone ) i = 1
385  cgg             Negative sign due to geostrophy.  cgg             Negative sign due to geostrophy.
386                  yzgrdrho(j,k,bi,bj) =                  yzgrdrho(j,k,bi,bj) =
387       &            (rholoc(i+ip1,j+1,bi,bj)-rholoc(i+ip1,j-1,bi,bj))       &            (rholoc(i+ip1,j+1,bi,bj)-rholoc(i+ip1,j-1,bi,bj))
# Line 390  cgg             Negative sign due to geo Line 392  cgg             Negative sign due to geo
392  cgg         Compute vertical shear from geostrophy/thermal wind.  cgg         Compute vertical shear from geostrophy/thermal wind.
393              do k = 4,Nr-1              do k = 4,Nr-1
394                do j = jmin,jmax                do j = jmin,jmax
395                  i = ob_iw(j,bi,bj)                  i = OB_Iw(j,bi,bj)
396                    if ( i.eq.OB_indexNone ) i = 1
397  cgg         Retrieve the model vertical shear.  cgg         Retrieve the model vertical shear.
398                  yzdvel1(j,k,bi,bj) = ubar(i+ip1,j,k  ,bi,bj)                  yzdvel1(j,k,bi,bj) = ubar(i+ip1,j,k  ,bi,bj)
399       &                               - ubar(i+ip1,j,k+1,bi,bj)       &                               - ubar(i+ip1,j,k+1,bi,bj)
# Line 416  c--         End of loop over layers. Line 419  c--         End of loop over layers.
419  cgg    Make a mask for the velocity shear comparison.  cgg    Make a mask for the velocity shear comparison.
420              do k = 1,nr-1              do k = 1,nr-1
421                do j = jmin, jmax                do j = jmin, jmax
422                  i = ob_ie(j,bi,bj)                  i = OB_Ie(j,bi,bj)
423                  if (i.eq.0) then                  if ( i.eq.OB_indexNone ) then
424                    maskyzageos(j,k,bi,bj) =0.                    maskyzageos(j,k,bi,bj) =0.
425                  else                  else
426  cgg    All these points need to be wet.  cgg    All these points need to be wet.
# Line 444  cgg    All these points need to be wet. Line 447  cgg    All these points need to be wet.
447    
448  cgg   Compute centered difference horizontal gradient on bdy.  cgg   Compute centered difference horizontal gradient on bdy.
449                do j = jmin, jmax                do j = jmin, jmax
450                  i = ob_ie(j,bi,bj)                  i = OB_Ie(j,bi,bj)
451                    if ( i.eq.OB_indexNone ) i = 1
452  cgg             Negative sign due to geostrophy.  cgg             Negative sign due to geostrophy.
453                  yzgrdrho(j,k,bi,bj) =                  yzgrdrho(j,k,bi,bj) =
454       &            (rholoc(i+ip1,,j+1,bi,bj)-rholoc(i+ip1,j-1,bi,bj))       &            (rholoc(i+ip1,,j+1,bi,bj)-rholoc(i+ip1,j-1,bi,bj))
# Line 455  cgg             Negative sign due to geo Line 459  cgg             Negative sign due to geo
459  cgg         Compute vertical shear from geostrophy/thermal wind.  cgg         Compute vertical shear from geostrophy/thermal wind.
460              do k = 4,Nr-1              do k = 4,Nr-1
461                do j = jmin,jmax                do j = jmin,jmax
462                  i = ob_ie(j,bi,bj)                  i = OB_Ie(j,bi,bj)
463                    if ( i.eq.OB_indexNone ) i = 1
464  cgg         Retrieve the model vertical shear.  cgg         Retrieve the model vertical shear.
465                  yzdvel1(j,k,bi,bj) = ubar(i+ip1,j,k  ,bi,bj)                  yzdvel1(j,k,bi,bj) = ubar(i+ip1,j,k  ,bi,bj)
466       &                             - ubar(i+ip1,j,k+1,bi,bj)       &                             - ubar(i+ip1,j,k+1,bi,bj)

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

  ViewVC Help
Powered by ViewVC 1.1.22