/[MITgcm]/MITgcm_contrib/gael/pkg/smooth/smooth_correl3D.F
ViewVC logotype

Contents of /MITgcm_contrib/gael/pkg/smooth/smooth_correl3D.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (show annotations) (download)
Fri Oct 16 03:36:34 2009 UTC (15 years, 9 months ago) by gforget
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +13 -13 lines
bring pkg/smooth up to date

1 #include "CPP_OPTIONS.h"
2
3 subroutine smooth_correl3D (
4 U fld_in,smoothOpNb,mythid)
5
6
7 IMPLICIT NONE
8 #include "SIZE.h"
9 #include "EEPARAMS.h"
10 #include "GRID.h"
11 #include "PARAMS.h"
12 c#include "tamc.h"
13 #include "smooth.h"
14
15
16 _RL fld_in(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nR,nSx,nSy)
17 integer smoothOpNb
18 integer nbt_in
19 character*( 80) fnamegeneric
20 integer i,j,k,bi,bj
21 integer itlo,ithi
22 integer jtlo,jthi
23 integer myThid
24
25
26 jtlo = mybylo(mythid)
27 jthi = mybyhi(mythid)
28 itlo = mybxlo(mythid)
29 ithi = mybxhi(mythid)
30
31
32 smoothOpNbCur=smoothOpNb
33 nbt_in=wc01_nbt(smoothOpNbCur)/2
34
35 cgf tmp: set the diffkh to 0
36 cgf later: have an index for the operator number
37 cfg and do not forget common block parts (nbt...)
38
39 c write(fnamegeneric(1:80),'(1a)')
40 c & 'wc01_3Doperator'
41 write(fnamegeneric(1:80),'(1a,i3.3)')
42 & 'wc01_3Doperator',smoothOpNbCur
43 call mdsreadfield(fnamegeneric,64,'RL',nR,wc01_Kwx,
44 & 1,mythid)
45 call mdsreadfield(fnamegeneric,64,'RL',nR,wc01_Kwy,
46 & 2,mythid)
47 call mdsreadfield(fnamegeneric,64,'RL',nR,wc01_Kwz,
48 & 3,mythid)
49 call mdsreadfield(fnamegeneric,64,'RL',nR,wc01_Kux,
50 & 4,mythid)
51 call mdsreadfield(fnamegeneric,64,'RL',nR,wc01_Kvy,
52 & 5,mythid)
53 call mdsreadfield(fnamegeneric,64,'RL',nR,wc01_Kuz,
54 & 6,mythid)
55 call mdsreadfield(fnamegeneric,64,'RL',nR,wc01_Kvz,
56 & 7,mythid)
57 call mdsreadfield(fnamegeneric,64,'RL',nR,wc01_Kuy,
58 & 8,mythid)
59 call mdsreadfield(fnamegeneric,64,'RL',nR,wc01_Kvx,
60 & 9,mythid)
61 call mdsreadfield(fnamegeneric,64,'RL',nR,kappaRwc01,
62 & 10,mythid)
63 _EXCH_XYZ_RL ( wc01_Kwx, myThid )
64 _EXCH_XYZ_RL ( wc01_Kwy, myThid )
65 _EXCH_XYZ_RL ( wc01_Kwz, myThid )
66 _EXCH_XYZ_RL ( wc01_Kux, myThid )
67 _EXCH_XYZ_RL ( wc01_Kvy, myThid )
68 _EXCH_XYZ_RL ( wc01_Kuz, myThid )
69 _EXCH_XYZ_RL ( wc01_Kvz, myThid )
70 _EXCH_XYZ_RL ( wc01_Kuy, myThid )
71 _EXCH_XYZ_RL ( wc01_Kvx, myThid )
72 _EXCH_XYZ_RL ( kappaRwc01, myThid )
73
74 c write(fnamegeneric(1:80),'(1a)')
75 c & 'wc01_filternorm'
76 write(fnamegeneric(1:80),'(1a,i3.3)')
77 & 'wc01_3Dfilternorm',smoothOpNbCur
78 call mdsreadfield(fnamegeneric,64,'RL',nR,normFilterwc01,
79 & 1,mythid)
80 _EXCH_XYZ_RL ( normFilterwc01, myThid )
81
82
83 DO bj=jtlo,jthi
84 DO bi=itlo,ithi
85 DO k=1,Nr
86 DO j=1,sNy
87 DO i=1,sNx
88 c division by ~sqrt(volume):
89 fld_in(i,j,k,bi,bj)=fld_in(i,j,k,bi,bj)
90 & *sqrt(recip_rA(i,j,bi,bj)*recip_drF(k))
91 ENDDO
92 ENDDO
93 ENDDO
94 ENDDO
95 ENDDO
96
97 _EXCH_XYZ_RL ( fld_in , myThid )
98
99 call smooth_diff3D(fld_in,nbt_in,mythid)
100
101
102 do bj = jtlo,jthi
103 do bi = itlo,ithi
104 DO j = 1,sNy
105 DO i = 1,sNx
106 DO k = 1,nR
107 c division by ~sqrt(var(filter)):
108 fld_in(i,j,k,bi,bj)=fld_in(i,j,k,bi,bj)
109 & *normFilterwc01(i,j,k,bi,bj)
110 ENDDO
111 ENDDO
112 ENDDO
113 ENDDO
114 ENDDO
115
116 _EXCH_XYZ_RL ( fld_in , myThid )
117
118 end

  ViewVC Help
Powered by ViewVC 1.1.22