1 |
gforget |
1.3 |
C $Header: /u/gcmpack/MITgcm/pkg/smooth/smooth3d.F,v 1.2 2011/05/20 18:41:08 gforget Exp $ |
2 |
gforget |
1.1 |
C $Name: $ |
3 |
|
|
|
4 |
|
|
#include "SMOOTH_OPTIONS.h" |
5 |
|
|
|
6 |
|
|
subroutine smooth3D ( |
7 |
|
|
U fld_in,smoothOpNb,mythid) |
8 |
|
|
|
9 |
|
|
C *==========================================================* |
10 |
|
|
C | SUBROUTINE smooth3D |
11 |
|
|
C | o Routine that applies 3D 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 |
|
|
|
23 |
|
|
_RL fld_in(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nR,nSx,nSy) |
24 |
|
|
integer smoothOpNb |
25 |
|
|
integer nbt_in |
26 |
|
|
character*( 80) fnamegeneric |
27 |
|
|
integer i,j,k,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 |
|
|
|
38 |
|
|
c read smoothing [i.e diffusion] operator: |
39 |
|
|
write(fnamegeneric(1:80),'(1a,i3.3)') |
40 |
|
|
& 'smooth3Doperator',smoothOpNb |
41 |
|
|
CALL READ_REC_3D_RL(fnamegeneric,smoothprec, |
42 |
|
|
& Nr,smooth3D_Kwx,1, 1, myThid ) |
43 |
|
|
CALL READ_REC_3D_RL(fnamegeneric,smoothprec, |
44 |
|
|
& Nr,smooth3D_Kwy,2, 1, myThid ) |
45 |
|
|
CALL READ_REC_3D_RL(fnamegeneric,smoothprec, |
46 |
|
|
& Nr,smooth3D_Kwz,3, 1, myThid ) |
47 |
|
|
CALL READ_REC_3D_RL(fnamegeneric,smoothprec, |
48 |
|
|
& Nr,smooth3D_Kux,4, 1, myThid ) |
49 |
|
|
CALL READ_REC_3D_RL(fnamegeneric,smoothprec, |
50 |
|
|
& Nr,smooth3D_Kvy,5, 1, myThid ) |
51 |
|
|
CALL READ_REC_3D_RL(fnamegeneric,smoothprec, |
52 |
|
|
& Nr,smooth3D_Kuz,6, 1, myThid ) |
53 |
|
|
CALL READ_REC_3D_RL(fnamegeneric,smoothprec, |
54 |
|
|
& Nr,smooth3D_Kvz,7, 1, myThid ) |
55 |
|
|
CALL READ_REC_3D_RL(fnamegeneric,smoothprec, |
56 |
|
|
& Nr,smooth3D_Kuy,8, 1, myThid ) |
57 |
|
|
CALL READ_REC_3D_RL(fnamegeneric,smoothprec, |
58 |
|
|
& Nr,smooth3D_Kvx,9, 1, myThid ) |
59 |
|
|
CALL READ_REC_3D_RL(fnamegeneric,smoothprec, |
60 |
|
|
& Nr,smooth3D_kappaR,10, 1, myThid ) |
61 |
gforget |
1.3 |
CALL EXCH_XYZ_RL ( smooth3D_Kwx, myThid ) |
62 |
|
|
CALL EXCH_XYZ_RL ( smooth3D_Kwy, myThid ) |
63 |
|
|
CALL EXCH_XYZ_RL ( smooth3D_Kwz, myThid ) |
64 |
|
|
CALL EXCH_XYZ_RL ( smooth3D_Kux, myThid ) |
65 |
|
|
CALL EXCH_XYZ_RL ( smooth3D_Kvy, myThid ) |
66 |
|
|
CALL EXCH_XYZ_RL ( smooth3D_Kuz, myThid ) |
67 |
|
|
CALL EXCH_XYZ_RL ( smooth3D_Kvz, myThid ) |
68 |
|
|
CALL EXCH_XYZ_RL ( smooth3D_Kuy, myThid ) |
69 |
|
|
CALL EXCH_XYZ_RL ( smooth3D_Kvx, myThid ) |
70 |
|
|
CALL EXCH_XYZ_RL ( smooth3D_kappaR, myThid ) |
71 |
gforget |
1.1 |
|
72 |
|
|
c do the smoothing: |
73 |
gforget |
1.2 |
nbt_in=smooth3Dnbt(smoothOpNb) |
74 |
gforget |
1.1 |
call smooth_diff3D(fld_in,nbt_in,mythid) |
75 |
|
|
|
76 |
|
|
end |