/[MITgcm]/MITgcm/pkg/exf/exf_filter_rl.F
ViewVC logotype

Contents of /MITgcm/pkg/exf/exf_filter_rl.F

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


Revision 1.10 - (show annotations) (download)
Tue Jan 3 17:49:46 2012 UTC (12 years, 4 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint65z, checkpoint65x, checkpoint65y, checkpoint65r, checkpoint65s, checkpoint65p, checkpoint65q, checkpoint65v, checkpoint65w, checkpoint65t, checkpoint65u, checkpoint65j, checkpoint65k, checkpoint65h, checkpoint65i, checkpoint65n, checkpoint65l, checkpoint65m, checkpoint65b, checkpoint65c, checkpoint65a, checkpoint65f, checkpoint65g, checkpoint65d, checkpoint65e, checkpoint64, checkpoint65, checkpoint66g, checkpoint66f, checkpoint66e, checkpoint66d, checkpoint66c, checkpoint66b, checkpoint66a, checkpoint66o, checkpoint66n, checkpoint66m, checkpoint66l, checkpoint66k, checkpoint66j, checkpoint66i, checkpoint66h, checkpoint63p, checkpoint63q, checkpoint63r, checkpoint63s, checkpoint63l, checkpoint63m, checkpoint63n, checkpoint63o, checkpoint63i, checkpoint63j, checkpoint63k, checkpoint65o, 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, HEAD
Changes since 1.9: +76 -97 lines
- remove test .NOT.useSEAICE, replaced by testing masking flag argument "ckind";
- fix masking if using P-coordinates;
- change recognized masking flag from s,u,v to c,w,s since the mask
  to use (maskC,W,S) depends on position on model grid and has little
  to do with scalar/vector difference.

1 C $Header: /u/gcmpack/MITgcm/pkg/exf/exf_filter_rl.F,v 1.9 2007/04/17 23:51:22 heimbach Exp $
2 C $Name: $
3
4 #include "EXF_OPTIONS.h"
5
6 SUBROUTINE EXF_FILTER_RL(
7 U arr,
8 I ckind, myThid )
9
10 C ==================================================================
11 C SUBROUTINE EXF_FILTER_RL
12 C ==================================================================
13 C
14 C o apply mask to input field
15 C
16 C ==================================================================
17 C SUBROUTINE EXF_FILTER_RL
18 C ==================================================================
19
20 IMPLICIT NONE
21
22 C == global variables ==
23 #include "EEPARAMS.h"
24 #include "SIZE.h"
25 #include "PARAMS.h"
26 #include "GRID.h"
27 c#include "EXF_CONSTANTS.h"
28
29 C == routine arguments ==
30 _RL arr(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
31 CHARACTER*1 ckind
32 INTEGER myThid
33
34 C == local variables ==
35 INTEGER bi,bj
36 INTEGER i,j, ks
37
38 C == end of interface ==
39
40 C filter forcing field array
41 IF ( ckind.NE.' ' ) THEN
42
43 ks = 1
44 IF ( usingPCoords ) ks = Nr
45
46 DO bj = myByLo(myThid), myByHi(myThid)
47 DO bi = myBxLo(myThid), myBxHi(myThid)
48
49 C Set undefined values to zero.
50 Crg not necessary and
51 Crg would require additional intermediate results in adjoint
52 crg DO j = 1,sNy
53 crg DO i = 1,sNx
54 crg IF (arr(i,j,bi,bj) .LE. exf_undef) THEN
55 crg arr(i,j,bi,bj) = 0. _d 0
56 crg ENDIF
57 crg ENDDO
58 crg ENDDO
59
60 C Set land points to zero
61 IF ( ckind .EQ. 'c' ) THEN
62 DO j = 1,sNy
63 DO i = 1,sNx
64 IF ( maskC(i,j,ks,bi,bj) .EQ. 0. ) THEN
65 arr(i,j,bi,bj) = 0. _d 0
66 ENDIF
67 ENDDO
68 ENDDO
69 ELSEIF ( ckind .EQ. 'w' ) THEN
70 DO j = 1,sNy
71 DO i = 1,sNx
72 IF ( maskW(i,j,ks,bi,bj) .EQ. 0. ) THEN
73 arr(i,j,bi,bj) = 0. _d 0
74 ENDIF
75 ENDDO
76 ENDDO
77 ELSEIF ( ckind .EQ. 's' ) THEN
78 DO j = 1,sNy
79 DO i = 1,sNx
80 IF ( maskS(i,j,ks,bi,bj) .EQ. 0. ) THEN
81 arr(i,j,bi,bj) = 0. _d 0
82 ENDIF
83 ENDDO
84 ENDDO
85 ENDIF
86
87 ENDDO
88 ENDDO
89 ENDIF
90
91 RETURN
92 END

  ViewVC Help
Powered by ViewVC 1.1.22