/[MITgcm]/MITgcm/pkg/obcs/obcs_apply_hsnow.F
ViewVC logotype

Contents of /MITgcm/pkg/obcs/obcs_apply_hsnow.F

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


Revision 1.1 - (show annotations) (download)
Tue Oct 23 08:25:28 2007 UTC (16 years, 6 months ago) by dimitri
Branch: MAIN
CVS Tags: checkpoint59m, checkpoint59l, checkpoint59k, checkpoint59j
added open boundary conditions capability for seaice HSNOW and HSALT
(code contributed by Michael Schodlok)

1 C $Header: $
2 C $Name: $
3
4 #include "OBCS_OPTIONS.h"
5
6 SUBROUTINE OBCS_APPLY_HSNOW( bi, bj,
7 O snFld,
8 I myThid )
9 C /==========================================================\
10 C | S/R OBCS_APPLY_HSNOW |
11 C \==========================================================/
12 IMPLICIT NONE
13 C == Global variables ==
14 #include "SIZE.h"
15 #include "EEPARAMS.h"
16 #include "PARAMS.h"
17 #include "GRID.h"
18 #include "OBCS.h"
19
20 C == Routine Arguments ==
21 INTEGER bi,bj
22 _RL snFld(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
23 INTEGER myThid
24
25 #if (defined (ALLOW_OBCS) && defined (ALLOW_SEAICE))
26
27 C == Local variables ==
28 INTEGER I,J,I_obc,J_obc,K
29 _RL obc_mask
30
31 K = 1
32
33 C Set model variables to OB values on North/South Boundaries
34 #ifdef ALLOW_OBCS_NORTH
35 DO I=1-Olx,sNx+Olx
36 C Northern boundary
37 J_obc = OB_Jn(I,bi,bj)
38 IF (J_obc.NE.0) THEN
39 obc_mask = _maskS(I,J_obc,K,bi,bj)
40 DO J = J_obc, J_obc+Oly
41 snFld(I,J)=OBNsn(I,bi,bj)*obc_mask
42 ENDDO
43 ENDIF
44 ENDDO
45 #endif
46 #ifdef ALLOW_OBCS_SOUTH
47 DO I=1-Olx,sNx+Olx
48 C Southern boundary
49 J_obc = OB_Js(I,bi,bj)
50 IF (J_obc.NE.0) THEN
51 obc_mask = _maskS(I,J_obc+1,K,bi,bj)
52 DO J = J_obc-Oly, J_obc
53 snFld(I,J)=OBSsn(I,bi,bj)*obc_mask
54 ENDDO
55 ENDIF
56 ENDDO
57 #endif
58
59 C Set model variables to OB values on East/West Boundaries
60 #ifdef ALLOW_OBCS_EAST
61 DO J=1-Oly,sNy+Oly
62 C Eastern boundary
63 I_obc = OB_Ie(J,bi,bj)
64 IF (I_obc.NE.0) THEN
65 obc_mask = _maskW(I_obc,J,K,bi,bj)
66 DO I = I_obc, I_obc+Olx
67 snFld(I,J)=OBEsn(J,bi,bj)*obc_mask
68 ENDDO
69 ENDIF
70 ENDDO
71 #endif
72 #ifdef ALLOW_OBCS_WEST
73 DO J=1-Oly,sNy+Oly
74 C Western boundary
75 I_obc=OB_Iw(J,bi,bj)
76 IF (I_obc.NE.0) THEN
77 obc_mask = _maskW(I_obc+1,J,K,bi,bj)
78 DO I = I_obc-Olx, I_obc
79 snFld(I,J)=OBWsn(J,bi,bj) * obc_mask
80 ENDDO
81 ENDIF
82 ENDDO
83 #endif
84
85 #endif /* defined (ALLOW_OBCS) && defined (ALLOW_SEAICE) */
86
87 RETURN
88 END

  ViewVC Help
Powered by ViewVC 1.1.22