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 |
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) = |
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)) |
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.)+ |
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. |
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)) |
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) |
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) = |
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)) |
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) |
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. |
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)) |
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) |