forked from altMITgcm/MITgcm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
smooth3d.F
76 lines (65 loc) · 2.54 KB
/
smooth3d.F
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
C $Header: /u/gcmpack/MITgcm/pkg/smooth/smooth3d.F,v 1.2 2011/05/20 18:41:08 gforget Exp $
C $Name: $
#include "SMOOTH_OPTIONS.h"
subroutine smooth3D (
U fld_in,smoothOpNb,mythid)
C *==========================================================*
C | SUBROUTINE smooth3D
C | o Routine that applies 3D spatial smoothing
C *==========================================================*
IMPLICIT NONE
#include "SIZE.h"
#include "EEPARAMS.h"
#include "GRID.h"
#include "PARAMS.h"
c#include "tamc.h"
#include "SMOOTH.h"
_RL fld_in(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nR,nSx,nSy)
integer smoothOpNb
integer nbt_in
character*( 80) fnamegeneric
integer i,j,k,bi,bj
integer itlo,ithi
integer jtlo,jthi
integer myThid
jtlo = mybylo(mythid)
jthi = mybyhi(mythid)
itlo = mybxlo(mythid)
ithi = mybxhi(mythid)
c read smoothing [i.e diffusion] operator:
write(fnamegeneric(1:80),'(1a,i3.3)')
& 'smooth3Doperator',smoothOpNb
CALL READ_REC_3D_RL(fnamegeneric,smoothprec,
& Nr,smooth3D_Kwx,1, 1, myThid )
CALL READ_REC_3D_RL(fnamegeneric,smoothprec,
& Nr,smooth3D_Kwy,2, 1, myThid )
CALL READ_REC_3D_RL(fnamegeneric,smoothprec,
& Nr,smooth3D_Kwz,3, 1, myThid )
CALL READ_REC_3D_RL(fnamegeneric,smoothprec,
& Nr,smooth3D_Kux,4, 1, myThid )
CALL READ_REC_3D_RL(fnamegeneric,smoothprec,
& Nr,smooth3D_Kvy,5, 1, myThid )
CALL READ_REC_3D_RL(fnamegeneric,smoothprec,
& Nr,smooth3D_Kuz,6, 1, myThid )
CALL READ_REC_3D_RL(fnamegeneric,smoothprec,
& Nr,smooth3D_Kvz,7, 1, myThid )
CALL READ_REC_3D_RL(fnamegeneric,smoothprec,
& Nr,smooth3D_Kuy,8, 1, myThid )
CALL READ_REC_3D_RL(fnamegeneric,smoothprec,
& Nr,smooth3D_Kvx,9, 1, myThid )
CALL READ_REC_3D_RL(fnamegeneric,smoothprec,
& Nr,smooth3D_kappaR,10, 1, myThid )
_EXCH_XYZ_RL ( smooth3D_Kwx, myThid )
_EXCH_XYZ_RL ( smooth3D_Kwy, myThid )
_EXCH_XYZ_RL ( smooth3D_Kwz, myThid )
_EXCH_XYZ_RL ( smooth3D_Kux, myThid )
_EXCH_XYZ_RL ( smooth3D_Kvy, myThid )
_EXCH_XYZ_RL ( smooth3D_Kuz, myThid )
_EXCH_XYZ_RL ( smooth3D_Kvz, myThid )
_EXCH_XYZ_RL ( smooth3D_Kuy, myThid )
_EXCH_XYZ_RL ( smooth3D_Kvx, myThid )
_EXCH_XYZ_RL ( smooth3D_kappaR, myThid )
c do the smoothing:
nbt_in=smooth3Dnbt(smoothOpNb)
call smooth_diff3D(fld_in,nbt_in,mythid)
end