| 1 |
C $Header: /u/gcmpack/MITgcm/pkg/smooth/smooth2d.F,v 1.2 2011/05/20 18:41:08 gforget Exp $ |
| 2 |
C $Name: $ |
| 3 |
|
| 4 |
#include "SMOOTH_OPTIONS.h" |
| 5 |
|
| 6 |
subroutine smooth2D ( |
| 7 |
U fld_in,mask_in,smoothOpNb,mythid) |
| 8 |
|
| 9 |
C *==========================================================* |
| 10 |
C | SUBROUTINE smooth2D |
| 11 |
C | o Routine that applies 2D spatial smoothing |
| 12 |
C *==========================================================* |
| 13 |
|
| 14 |
IMPLICIT NONE |
| 15 |
#include "SIZE.h" |
| 16 |
#include "EEPARAMS.h" |
| 17 |
#include "GRID.h" |
| 18 |
#include "PARAMS.h" |
| 19 |
c#include "tamc.h" |
| 20 |
#include "SMOOTH.h" |
| 21 |
|
| 22 |
_RL mask_in(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nR,nSx,nSy) |
| 23 |
_RL fld_in(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
| 24 |
integer smoothOpNb |
| 25 |
integer nbt_in |
| 26 |
character*( 80) fnamegeneric |
| 27 |
integer i,j,bi,bj |
| 28 |
integer itlo,ithi |
| 29 |
integer jtlo,jthi |
| 30 |
integer myThid |
| 31 |
|
| 32 |
jtlo = mybylo(mythid) |
| 33 |
jthi = mybyhi(mythid) |
| 34 |
itlo = mybxlo(mythid) |
| 35 |
ithi = mybxhi(mythid) |
| 36 |
|
| 37 |
c read smoothing [i.e diffusion] operator: |
| 38 |
write(fnamegeneric(1:80),'(1a,i3.3)') |
| 39 |
& 'smooth2Doperator',smoothOpNb |
| 40 |
CALL READ_REC_3D_RL(fnamegeneric,smoothprec, |
| 41 |
& 1, smooth2D_Kux,1,1,mythid) |
| 42 |
CALL READ_REC_3D_RL(fnamegeneric,smoothprec, |
| 43 |
& 1, smooth2D_Kvy,2,1,mythid) |
| 44 |
CALL EXCH_XY_RL ( smooth2D_Kux, myThid ) |
| 45 |
CALL EXCH_XY_RL ( smooth2D_Kvy, myThid ) |
| 46 |
|
| 47 |
c do the smoothing: |
| 48 |
nbt_in=smooth2Dnbt(smoothOpNb) |
| 49 |
call smooth_diff2D(fld_in,mask_in,nbt_in,mythid) |
| 50 |
|
| 51 |
end |