/[MITgcm]/MITgcm/model/src/add_walls2masks.F
ViewVC logotype

Contents of /MITgcm/model/src/add_walls2masks.F

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


Revision 1.1 - (show annotations) (download)
Sat Feb 8 17:20:06 2014 UTC (10 years, 3 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint64y, checkpoint64x, checkpoint64z, checkpoint64u, checkpoint64w, checkpoint64v, checkpoint66g, checkpoint66f, checkpoint66e, checkpoint66d, checkpoint66c, checkpoint66b, checkpoint66a, checkpoint66o, checkpoint66n, checkpoint66m, checkpoint66l, checkpoint66k, checkpoint66j, checkpoint66i, checkpoint66h, checkpoint65z, checkpoint65x, checkpoint65y, checkpoint65r, checkpoint65s, checkpoint65p, checkpoint65q, checkpoint65v, checkpoint65w, checkpoint65t, checkpoint65u, checkpoint65j, checkpoint65k, checkpoint65h, checkpoint65i, checkpoint65n, checkpoint65o, checkpoint65l, checkpoint65m, checkpoint65b, checkpoint65c, checkpoint65a, checkpoint65f, checkpoint65g, checkpoint65d, checkpoint65e, checkpoint65, HEAD
- isolate in new S/R ADD_WALLS2MASKS the part dealing with additional
  thin-wall ; enable to specify them from 2-D input files.
- always make sure that rSurfW >= rLowW and rSurfS >= rLowS

1 C $Header: /u/gcmpack/MITgcm/model/src/ini_masks_etc.F,v 1.52 2012/06/17 02:21:58 jmc Exp $
2 C $Name: $
3
4 c#include "PACKAGES_CONFIG.h"
5 #include "CPP_OPTIONS.h"
6
7 CBOP
8 C !ROUTINE: ADD_WALLS2MASKS
9 C !INTERFACE:
10 SUBROUTINE ADD_WALLS2MASKS( myThid )
11 C !DESCRIPTION: \bv
12 C *==========================================================*
13 C | SUBROUTINE ADD_WALLS2MASKS
14 C | o Apply additional closing of Western and Southern edges
15 C | grid-cell open-water factor
16 C *==========================================================*
17 C | Reset to zero hFacW and/or hFacS grid factors at some
18 C | specific locations. In particular, allow to prevent fluid
19 C | transport (at any detph) between 2 adjacent vertical
20 C | column by adding a "thin wall" between the 2.
21 C *==========================================================*
22 C \ev
23
24 C !USES:
25 IMPLICIT NONE
26 C === Global variables ===
27 #include "SIZE.h"
28 #include "EEPARAMS.h"
29 #include "PARAMS.h"
30 #include "GRID.h"
31 c#include "SURFACE.h"
32
33 C !INPUT/OUTPUT PARAMETERS:
34 C == Routine arguments ==
35 C myThid :: my Thread Id number
36 INTEGER myThid
37
38 C !LOCAL VARIABLES:
39 C == Local variables ==
40 C bi,bj :: tile indices
41 C i,j,k :: Loop counters
42 C tmpfld :: Temporary array used to load file in
43 _RS tmpFldW(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
44 _RS tmpFldS(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
45 INTEGER bi, bj
46 INTEGER i, j, k
47 CEOP
48
49 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
50
51 IF ( addWwallFile.NE.' ' .OR. addSwallFile.NE.' ' ) THEN
52
53 C-- Load files "addWwallFile" and/or "addSwallFile":
54 DO bj=myByLo(myThid), myByHi(myThid)
55 DO bi=myBxLo(myThid), myBxHi(myThid)
56 DO j=1-OLy,sNy+OLy
57 DO i=1-OLx,sNx+OLx
58 tmpFldW(i,j,bi,bj) = zeroRS
59 tmpFldS(i,j,bi,bj) = zeroRS
60 ENDDO
61 ENDDO
62 ENDDO
63 ENDDO
64 IF ( addWwallFile.NE.' ' ) THEN
65 CALL READ_FLD_XY_RS( addWwallFile, ' ', tmpFldW, 0, myThid )
66 ENDIF
67 IF ( addSwallFile.NE.' ' ) THEN
68 CALL READ_FLD_XY_RS( addSwallFile, ' ', tmpFldS, 0, myThid )
69 ENDIF
70 CALL EXCH_UV_XY_RS( tmpFldW, tmpFldS, .FALSE., myThid )
71
72 ENDIF
73
74 IF ( selectSigmaCoord.EQ.0 ) THEN
75 C--- r-coordinate with partial-cell or full cell mask
76
77 C-- The following block allows thin walls representation of non-periodic
78 C boundaries such as happen on the lat-lon grid at the N/S poles.
79 C We should really supply a flag for doing this.
80 c IF ( closedBoundaryAtPoles ) THEN
81 DO bj=myByLo(myThid), myByHi(myThid)
82 DO bi=myBxLo(myThid), myBxHi(myThid)
83 DO j=1-OLy,sNy+OLy
84 DO i=1-OLx,sNx+OLx
85 IF ( dyG(i,j,bi,bj).EQ.zeroRS ) THEN
86 DO k=1,Nr
87 hFacW(i,j,k,bi,bj) = zeroRS
88 ENDDO
89 rLowW (i,j,bi,bj) = rF(1)
90 rSurfW(i,j,bi,bj) = rF(1)
91 ENDIF
92 IF ( dxG(i,j,bi,bj).EQ.zeroRS ) THEN
93 DO k=1,Nr
94 hFacS(i,j,k,bi,bj) = zeroRS
95 ENDDO
96 rLowS (i,j,bi,bj) = rF(1)
97 rSurfS(i,j,bi,bj) = rF(1)
98 ENDIF
99 ENDDO
100 ENDDO
101 ENDDO
102 ENDDO
103 c ENDIF
104
105 C-- Addtional closing of Western and Southern grid-cell edges
106 C as provided in files: "addWwallFile" or "addSwallFile"
107 IF ( addWwallFile.NE.' ' .OR. addSwallFile.NE.' ' ) THEN
108 DO bj=myByLo(myThid), myByHi(myThid)
109 DO bi=myBxLo(myThid), myBxHi(myThid)
110 DO j=1-OLy,sNy+OLy
111 DO i=1-OLx,sNx+OLx
112 IF ( tmpFldW(i,j,bi,bj).EQ.oneRS ) THEN
113 DO k=1,Nr
114 hFacW(i,j,k,bi,bj) = zeroRS
115 ENDDO
116 rLowW (i,j,bi,bj) = rF(1)
117 rSurfW(i,j,bi,bj) = rF(1)
118 ENDIF
119 IF ( tmpFldS(i,j,bi,bj).EQ.oneRS ) THEN
120 DO k=1,Nr
121 hFacS(i,j,k,bi,bj) = zeroRS
122 ENDDO
123 rLowS (i,j,bi,bj) = rF(1)
124 rSurfS(i,j,bi,bj) = rF(1)
125 ENDIF
126 ENDDO
127 ENDDO
128 ENDDO
129 ENDDO
130 ENDIF
131
132 ELSE
133 #ifndef DISABLE_SIGMA_CODE
134 C--- Sigma and Hybrid-Sigma set-up:
135 #endif /* DISABLE_SIGMA_CODE */
136 ENDIF
137
138 RETURN
139 END

  ViewVC Help
Powered by ViewVC 1.1.22