/[MITgcm]/MITgcm_contrib/gael/pkg/smooth2/smooth_init3D.F
ViewVC logotype

Diff of /MITgcm_contrib/gael/pkg/smooth2/smooth_init3D.F

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

revision 1.1 by gforget, Sun Oct 25 21:24:04 2009 UTC revision 1.3 by gforget, Mon Feb 15 23:14:47 2010 UTC
# Line 13  C     *================================= Line 13  C     *=================================
13    
14  cgf the choices of smooth3Dtype and smooth3Dsize need comments...  cgf the choices of smooth3Dtype and smooth3Dsize need comments...
15  cgf  cgf
16  cgf smooth3DtypeH=      1) HORIZONTAL ALONG GRID AXIS  cgf smooth3DtypeH= 1) HORIZONTAL ALONG GRID AXIS
17  cgf                                     2-3) GMREDI TYPES  cgf              2-3) GMREDI TYPES
18  cgf                                     4) HORIZONTAL BUT WITH ROTATED AXIS  cgf                4) HORIZONTAL BUT WITH ROTATED AXIS
19  cgf for now I focus on the simpler smooth3DtypeH=1 case  cgf for now I focus on the simpler smooth3DtypeH=1 case
20    
21    
# Line 58  c vertical smoothing: Line 58  c vertical smoothing:
58        if (smooth3DsizeZ(smoothOpNb).EQ.3) then        if (smooth3DsizeZ(smoothOpNb).EQ.3) then
59        write(fnamegeneric(1:80),'(1a,i3.3)')        write(fnamegeneric(1:80),'(1a,i3.3)')
60       &    'smooth3DscalesZ',smoothOpNb       &    'smooth3DscalesZ',smoothOpNb
61        call mdsreadfield(fnamegeneric,smoothprec,'RL',nR,        CALL READ_REC_3D_RL(fnamegeneric,smoothprec,
62       & smooth3D_Lz,1,mythid)       &           Nr, smooth3D_Lz,1,1,mythid)
63        _EXCH_XYZ_RL( smooth3D_Lz, mythid )        _EXCH_XYZ_RL( smooth3D_Lz, mythid )
64        else        else
65        DO bj=jtlo,jthi        DO bj=jtlo,jthi
# Line 92  c avoid excessive vertical smoothing: Line 92  c avoid excessive vertical smoothing:
92        if (smooth3DsizeZ(smoothOpNb).NE.3) then        if (smooth3DsizeZ(smoothOpNb).NE.3) then
93        DO bj=jtlo,jthi        DO bj=jtlo,jthi
94         DO bi=itlo,ithi         DO bi=itlo,ithi
95          DO k=1,Nr          DO k=1,Nr
96           DO j=1-OLy,sNy+OLy           DO j=1-OLy,sNy+OLy
97            DO i=1-OLx,sNx+OLx            DO i=1-OLx,sNx+OLx
98    
99         smooth3D_KzMax=drC(k)         smooth3D_KzMax=drC(k)
100         smooth3D_KzMax=smooth3D_KzMax*smooth3D_KzMax/smooth3DtotTime/2         smooth3D_KzMax=smooth3D_KzMax*smooth3D_KzMax/smooth3DtotTime/2
101         if (smooth3D_kappaR(i,j,k,bi,bj).GT.smooth3D_KzMax) then         if (smooth3D_kappaR(i,j,k,bi,bj).GT.smooth3D_KzMax) then
102         smooth3D_kappaR(i,j,k,bi,bj)=smooth3D_KzMax         smooth3D_kappaR(i,j,k,bi,bj)=smooth3D_KzMax
103         endif         endif
104            ENDDO            ENDDO
105           ENDDO           ENDDO
# Line 116  c hoizontal smoothing: Line 116  c hoizontal smoothing:
116        if (smooth3DsizeH(smoothOpNb).EQ.3) then        if (smooth3DsizeH(smoothOpNb).EQ.3) then
117        write(fnamegeneric(1:80),'(1a,i3.3)')        write(fnamegeneric(1:80),'(1a,i3.3)')
118       &    'smooth3DscalesH',smoothOpNb       &    'smooth3DscalesH',smoothOpNb
119        call mdsreadfield(fnamegeneric,smoothprec,'RL',nR,        CALL READ_REC_3D_RL(fnamegeneric,smoothprec,
120       & smooth3D_Lx,1,mythid)       &           Nr, smooth3D_Lx,1,1,mythid)
121        call mdsreadfield(fnamegeneric,smoothprec,'RL',nR,        CALL READ_REC_3D_RL(fnamegeneric,smoothprec,
122       & smooth3D_Ly,2,mythid)       &           Nr, smooth3D_Ly,2,1,mythid)
123        _EXCH_XYZ_RL( smooth3D_Lx, mythid )        _EXCH_XYZ_RL( smooth3D_Lx, mythid )
124        _EXCH_XYZ_RL( smooth3D_Ly, mythid )        _EXCH_XYZ_RL( smooth3D_Ly, mythid )
125        else        else
# Line 178  c write diffusion operator to file Line 178  c write diffusion operator to file
178        write(fnamegeneric(1:80),'(1a,i3.3)')        write(fnamegeneric(1:80),'(1a,i3.3)')
179       &    'smooth3Doperator',smoothOpNb       &    'smooth3Doperator',smoothOpNb
180    
181        call mdswritefield(fnamegeneric,smoothprec,.false.,'RL',        CALL WRITE_REC_3D_RL(fnamegeneric,smoothprec,
182       & nR,smooth3D_Kwx,1,1,mythid)       &           Nr,smooth3D_Kwx,1,1,mythid)
183        call mdswritefield(fnamegeneric,smoothprec,.false.,'RL',        CALL WRITE_REC_3D_RL(fnamegeneric,smoothprec,
184       & nR,smooth3D_Kwy,2,1,mythid)       &           Nr,smooth3D_Kwy,2,1,mythid)
185        call mdswritefield(fnamegeneric,smoothprec,.false.,'RL',        CALL WRITE_REC_3D_RL(fnamegeneric,smoothprec,
186       & nR,smooth3D_Kwz,3,1,mythid)       &           Nr,smooth3D_Kwz,3,1,mythid)
187        call mdswritefield(fnamegeneric,smoothprec,.false.,'RL',        CALL WRITE_REC_3D_RL(fnamegeneric,smoothprec,
188       & nR,smooth3D_Kux,4,1,mythid)       &           Nr,smooth3D_Kux,4,1,mythid)
189        call mdswritefield(fnamegeneric,smoothprec,.false.,'RL',        CALL WRITE_REC_3D_RL(fnamegeneric,smoothprec,
190       & nR,smooth3D_Kvy,5,1,mythid)       &           Nr,smooth3D_Kvy,5,1,mythid)
191        call mdswritefield(fnamegeneric,smoothprec,.false.,'RL',        CALL WRITE_REC_3D_RL(fnamegeneric,smoothprec,
192       & nR,smooth3D_Kuz,6,1,mythid)       &           Nr,smooth3D_Kuz,6,1,mythid)
193        call mdswritefield(fnamegeneric,smoothprec,.false.,'RL',        CALL WRITE_REC_3D_RL(fnamegeneric,smoothprec,
194       & nR,smooth3D_Kvz,7,1,mythid)       &           Nr,smooth3D_Kvz,7,1,mythid)
195        call mdswritefield(fnamegeneric,smoothprec,.false.,'RL',        CALL WRITE_REC_3D_RL(fnamegeneric,smoothprec,
196       & nR,smooth3D_Kuy,8,1,mythid)       &           Nr,smooth3D_Kuy,8,1,mythid)
197        call mdswritefield(fnamegeneric,smoothprec,.false.,'RL',        CALL WRITE_REC_3D_RL(fnamegeneric,smoothprec,
198       & nR,smooth3D_Kvx,9,1,mythid)       &           Nr,smooth3D_Kvx,9,1,mythid)
199        call mdswritefield(fnamegeneric,smoothprec,.false.,'RL',        CALL WRITE_REC_3D_RL(fnamegeneric,smoothprec,
200       & nR,smooth3D_kappaR,10,1,mythid)       &           Nr,smooth3D_kappaR,10,1,mythid)
201    
202    
203        END        END

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.3

  ViewVC Help
Powered by ViewVC 1.1.22