source: (shapiro.f90) [ c_92_rp1 release ]

Subroutines | Functions | Parameters | Variables |

Function:

there are 3 elements to a Shapiro filter: 1: compute fluxes between boxes 2: compute increments that the flux divergence would generate 3: compute new values as old + increment

By breaking this down, we can compute fluxes as "bolus" velocities (if we are smoothing the mass field) and then use these velocities to advect temperature and salinity

SHAP_FLUX_2D returns a semi-ghosted flux. SHAP_INC_2D returns an ughosted increment, with an optional flux SHAP_2D returns a field, with optional fluxes and increments Shapiro returns a 2-D field, with optional fluxes in x and y

This routine expects the Field, Weight, Mask and Increment data to be from the NEWS_Grid core region only. The fluxes are returned with one extra row and column.

Examples:

Without weighting -- all give the same New_Field (assume that all dimensions are equal, i1,i2,j1,j2 incidate that part of the arrays that are in the core) real, dimension(:,:) :: Field, Inc, New_Field, U, V integer, dimension(:,:) :: Mask

call Shap_flux( news, 8, bcNO_SLIP,bcNO_SLIP,& Field, Mask,& U, V )forall ( i=i1:i2, j=j1:j2 ) New_Field(i,j) = Field(i,j) + U(i-1,j) - U(i,j) & + V(i,j-1) - V(i,j) end forall

inc = Shap_inc( news, 8, bcNO_SLIP, bcNO_SLIP,& Field, Mask ) New_Field = Field + Inc

New_Field = Shapiro( g, 8, bcNO_SLIP,bcNO_SLIP Field, Mask )

It is often common to not aply the full strength of the filter, perhaps only 10%. This can be done by

inc = Shap_inc( g, 8, bcNO_SLIP, Field, Mask ) New_Field = Field + Inc * 0.10 or call Shap_flux( g, 8, bcNO_SLIP, Field, Mask, U, V ) U = 0.10 * U V = 0.10 * V forall ( i=i1:i2, j=j1:j2 ) New_Field(i,j) = Field(i,j) + U(i-1,j) - U(i,j) & + V(i,j-1) - V(i,j) end forall

There are two versions of the Shapiro routines: Those that rely on the user to provide exact alignment with the NEWS grid object, and a general version which does the appropriate arithmetic. In either case, the results are not ghosted, cover the PE core region. For the fluxes, one extra column (row) is added for U (V)

Functions | Parameters | Variables | Use |

Poseidon Ocean Model (Release: c_92_rp1 ) Documentation automation by Paul Schopf's DocFort Perl scripts.