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

Annotation of /MITgcm_contrib/gael/pkg/smooth/smooth_correl2D.F

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


Revision 1.1 - (hide annotations) (download)
Tue Jun 19 18:23:18 2007 UTC (18 years, 1 month ago) by gforget
Branch: MAIN
pkg/smooth preliminary version

1 gforget 1.1 #include "CPP_OPTIONS.h"
2    
3     subroutine smooth_correl2D (
4     U fld_in,mask_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     _RL mask_in(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nR,nSx,nSy)
16     _RL fld_in(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
17     integer smoothOpNb
18     integer nbt_in
19     character*( 80) fnamegeneric
20     integer i,j,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_2D_nbt(smoothOpNbCur)/2
34    
35     cgf later: have an index for the operator number
36     cfg and do not forget common block parts (nbt...)
37    
38     c write(fnamegeneric(1:80),'(1a)')
39     C & 'wc01_2Doperator'
40     write(fnamegeneric(1:80),'(1a,i3.3)')
41     & 'wc01_2Doperator',smoothOpNbCur
42     call mdsreadfield(fnamegeneric,64,'RL',1,
43     & diffKhwc01_2D_x,1,mythid)
44     call mdsreadfield(fnamegeneric,64,'RL',1,
45     & diffKhwc01_2D_y,2,mythid)
46     _EXCH_XY_R8 ( diffKhwc01_2D_x, myThid )
47     _EXCH_XY_R8 ( diffKhwc01_2D_y, myThid )
48    
49    
50     c write(fnamegeneric(1:80),'(1a)')
51     c & 'wc01_2D_filternorm'
52     write(fnamegeneric(1:80),'(1a,i3.3)')
53     & 'wc01_2Dfilternorm',smoothOpNbCur
54     call mdsreadfield(fnamegeneric,64,'RL',1,
55     & normFilterwc01_2D,1,mythid)
56     _EXCH_XY_R8 ( normFilterwc01_2D, myThid )
57    
58    
59     DO bj = jtlo,jthi
60     DO bi = itlo,ithi
61     DO j = 1,sNy
62     DO i = 1,sNx
63     c division by ~sqrt(volume):
64     fld_in(i,j,bi,bj)=fld_in(i,j,bi,bj)
65     & *sqrt(recip_rA(i,j,bi,bj))
66     ENDDO
67     ENDDO
68     ENDDO
69     ENDDO
70    
71    
72     call smooth_diff2D(fld_in,mask_in,nbt_in,mythid)
73    
74    
75     do bj = jtlo,jthi
76     do bi = itlo,ithi
77     DO j = 1,sNy
78     DO i = 1,sNx
79     c division by ~sqrt(var(filter)):
80     fld_in(i,j,bi,bj)=fld_in(i,j,bi,bj)
81     & *normFilterwc01_2D(i,j,bi,bj)
82     ENDDO
83     ENDDO
84     ENDDO
85     ENDDO
86    
87     _EXCH_XY_R8 ( fld_in , myThid )
88    
89     end

  ViewVC Help
Powered by ViewVC 1.1.22