/[MITgcm]/MITgcm/pkg/smooth/smooth_init2d.F
ViewVC logotype

Contents of /MITgcm/pkg/smooth/smooth_init2d.F

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


Revision 1.2 - (show annotations) (download)
Wed Oct 20 19:22:11 2010 UTC (13 years, 6 months ago) by gforget
Branch: MAIN
CVS Tags: checkpoint64y, checkpoint64x, checkpoint64z, checkpoint64q, checkpoint64p, checkpoint64s, checkpoint64r, checkpoint64u, checkpoint64t, checkpoint64w, checkpoint64v, checkpoint64i, checkpoint64h, checkpoint64k, checkpoint64j, checkpoint64m, checkpoint64l, checkpoint64o, checkpoint64n, checkpoint64a, checkpoint64c, checkpoint64b, checkpoint64e, checkpoint64d, checkpoint64g, checkpoint64f, checkpoint63p, checkpoint63q, checkpoint63r, checkpoint63s, checkpoint63l, checkpoint63m, checkpoint63n, checkpoint63o, checkpoint63h, checkpoint63i, checkpoint63j, checkpoint63k, checkpoint63d, checkpoint63e, checkpoint63f, checkpoint63g, checkpoint63a, checkpoint63b, checkpoint63c, checkpoint64, checkpoint65, checkpoint63, checkpoint65h, checkpoint65i, checkpoint65b, checkpoint65c, checkpoint65a, checkpoint65f, checkpoint65g, checkpoint65d, checkpoint65e, checkpoint62o, checkpoint62n, checkpoint62m, checkpoint62s, checkpoint62r, checkpoint62q, checkpoint62p, checkpoint62w, checkpoint62v, checkpoint62u, checkpoint62t, checkpoint62z, checkpoint62y, checkpoint62x
Changes since 1.1: +3 -3 lines
fix print statement.

1 C $Header: /u/gcmpack/MITgcm/pkg/smooth/smooth_init2d.F,v 1.1 2010/02/15 23:46:04 gforget Exp $
2 C $Name: $
3
4 #include "SMOOTH_OPTIONS.h"
5
6 subroutine smooth_init2D (smoothOpNb, mythid )
7
8 C *==========================================================*
9 C | SUBROUTINE smooth_init2D
10 C | o Routine that initializes one 2D smoothing/correlation operator
11 C | by computing/writing the corresponding diffusion operator
12 C *==========================================================*
13
14 cgf the choices of smooth2Dtype and smooth2Dsize need comments...
15
16 IMPLICIT NONE
17 #include "SIZE.h"
18 #include "EEPARAMS.h"
19 #include "PARAMS.h"
20 #include "GRID.h"
21 #include "SMOOTH.h"
22
23 integer i,j,k, bi, bj
24 integer itlo,ithi
25 integer jtlo,jthi
26 integer myThid
27 character*( 80) fnamegeneric
28 integer smoothOpNb
29
30 jtlo = mybylo(mythid)
31 jthi = mybyhi(mythid)
32 itlo = mybxlo(mythid)
33 ithi = mybxhi(mythid)
34
35
36 smooth2DtotTime=smooth2Dnbt(smoothOpNb)*smooth2DdelTime
37
38 if ((smooth2Dtype(smoothOpNb).NE.0).AND.
39 & (smooth2Dsize(smoothOpNb).EQ.2)) then
40 write(fnamegeneric(1:80),'(1a,i3.3)')
41 & 'smooth2Dscales',smoothOpNb
42 CALL READ_REC_3D_RL(fnamegeneric,smoothprec,
43 & 1, smooth2D_Lx,1,1,mythid)
44 CALL READ_REC_3D_RL(fnamegeneric,smoothprec,
45 & 1, smooth2D_Ly,2,1,mythid)
46 _EXCH_XY_RL ( smooth2D_Lx, myThid )
47 _EXCH_XY_RL ( smooth2D_Ly, myThid )
48 else
49 DO bj=myByLo(myThid),myByHi(myThid)
50 DO bi=myBxLo(myThid),myBxHi(myThid)
51 DO j=1-OLy,sNy+OLy
52 DO i=1-OLx,sNx+OLx
53 smooth2D_Lx(i,j,bi,bj)=smooth2D_Lx0(smoothOpNb)
54 smooth2D_Ly(i,j,bi,bj)=smooth2D_Ly0(smoothOpNb)
55 ENDDO
56 ENDDO
57 ENDDO
58 ENDDO
59 endif
60
61 DO bj=myByLo(myThid),myByHi(myThid)
62 DO bi=myBxLo(myThid),myBxHi(myThid)
63 DO j=1-OLy,sNy+OLy
64 DO i=1-OLx,sNx+OLx
65 smooth2D_Kux(i,j,bi,bj)=smooth2D_Lx(i,j,bi,bj)*
66 & smooth2D_Lx(i,j,bi,bj)/smooth2DtotTime/2
67 smooth2D_Kvy(i,j,bi,bj)=smooth2D_Ly(i,j,bi,bj)*
68 & smooth2D_Ly(i,j,bi,bj)/smooth2DtotTime/2
69 ENDDO
70 ENDDO
71 ENDDO
72 ENDDO
73
74 _EXCH_XY_RL ( smooth2D_Kux , myThid )
75 _EXCH_XY_RL ( smooth2D_Kvy , myThid )
76
77 WRITE(standardMessageUnit,'(A,I4,2f12.0)')
78 & 'smooth 2D default parameters: ',
79 & smooth2Dnbt(smoothOpNb),
80 & smooth2D_Lx0(smoothOpNb),smooth2D_Ly0(smoothOpNb)
81
82 c write diffusion operator to file
83 write(fnamegeneric(1:80),'(1a,i3.3)')
84 & 'smooth2Doperator',smoothOpNb
85 CALL WRITE_REC_3D_RL(fnamegeneric,smoothprec,
86 & 1,smooth2D_Kux,1,1,mythid)
87 CALL WRITE_REC_3D_RL(fnamegeneric,smoothprec,
88 & 1,smooth2D_Kvy,2,1,mythid)
89
90 end

  ViewVC Help
Powered by ViewVC 1.1.22