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

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

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


Revision 1.3 - (show annotations) (download)
Tue Nov 12 20:34:41 2002 UTC (21 years, 6 months ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint46n_post, checkpoint47e_post, checkpoint47c_post, checkpoint48e_post, checkpoint48b_post, checkpoint48c_pre, checkpoint47d_pre, checkpoint47a_post, checkpoint48d_pre, checkpoint47i_post, checkpoint47d_post, checkpoint48d_post, checkpoint47g_post, checkpoint48a_post, checkpoint47j_post, branch-exfmods-tag, checkpoint48c_post, checkpoint47b_post, checkpoint47f_post, checkpoint47, checkpoint48, checkpoint47h_post
Branch point for: branch-exfmods-curt
Changes since 1.2: +17 -135 lines
Merging from release1_p8:
o exf:
  updated external forcing package
  - bug fixes carried over from ecco-branch
    (missing OBCS_OPTIONS.h in two routines)
  - enable easy to use "no forcing".
  - added exf I/O for atmospheric loading
  - added exf I/O for runoff data
  - transfered scaling between exf <-> MITgcm to exf namelist
  - removing old exfa stuff

1 #include "EXF_CPPOPTIONS.h"
2
3 subroutine exf_set_obcs_xz (
4 & obcs_fld_xz, obcs_xz_0, obcs_xz_1
5 I , obcs_file, obcsmask
6 I , fac, first, changed, count0, count1
7 I , mycurrenttime, mycurrentiter, mythid
8 & )
9
10 c ==================================================================
11 c SUBROUTINE exf_set_obcs_xz
12 c ==================================================================
13 c
14 c o set open boundary conditions
15 c
16 c started: heimbach@mit.edu 01-May-2001
17
18 c ==================================================================
19 c SUBROUTINE exf_set_obcs_xz
20 c ==================================================================
21
22 implicit none
23
24 c == global variables ==
25
26 #include "EEPARAMS.h"
27 #include "SIZE.h"
28 #include "GRID.h"
29 #include "exf_param.h"
30 #include "exf_constants.h"
31
32 c == routine arguments ==
33
34 _RL obcs_fld_xz(1-olx:snx+olx,Nr,nsx,nsy)
35 _RL obcs_xz_0(1-olx:snx+olx,Nr,nsx,nsy)
36 _RL obcs_xz_1(1-olx:snx+olx,Nr,nsx,nsy)
37
38 character*(128) obcs_file
39 character*1 obcsmask
40 logical first, changed
41 integer count0, count1
42 _RL fac
43 _RL mycurrenttime
44 integer mycurrentiter
45 integer mythid
46
47 #ifdef ALLOW_OBCS
48
49 c == local variables ==
50
51 integer bi, bj
52 integer i, k
53
54 c == end of interface ==
55
56 if ( first ) then
57 if ( obcs_file .NE. ' ' )
58 & call mdsreadfieldxz( obcs_file, exf_iprec, exf_yftype, Nr
59 & , obcs_xz_1, count0, mythid
60 & )
61 endif
62
63 if (( first ) .or. ( changed )) then
64 call exf_swapffields_xz( obcs_xz_0, obcs_xz_1, mythid )
65
66 if ( obcs_file .NE. ' ' )
67 & call mdsreadfieldxz( obcs_file, exf_iprec, exf_yftype, Nr
68 & , obcs_xz_1, count1, mythid
69 & )
70 endif
71
72 do bj = mybylo(mythid),mybyhi(mythid)
73 do bi = mybxlo(mythid),mybxhi(mythid)
74 do k = 1,Nr
75 do i = 1,snx
76 obcs_fld_xz(i,k,bi,bj) =
77 & fac *obcs_xz_0(i,k,bi,bj) +
78 & (exf_one - fac) *obcs_xz_1(i,k,bi,bj)
79 enddo
80 enddo
81 enddo
82 enddo
83
84 #endif
85
86 end
87
88 subroutine exf_set_obcs_yz (
89 & obcs_fld_yz, obcs_yz_0, obcs_yz_1
90 I , obcs_file, obcsmask
91 I , fac, first, changed, count0, count1
92 I , mycurrenttime, mycurrentiter, mythid
93 & )
94
95 c ==================================================================
96 c SUBROUTINE exf_set_obcs_yz
97 c ==================================================================
98 c
99 c o set open boundary conditions
100 c
101 c started: heimbach@mit.edu 01-May-2001
102
103 c ==================================================================
104 c SUBROUTINE exf_set_obcs_yz
105 c ==================================================================
106
107 implicit none
108
109 c == global variables ==
110
111 #include "EEPARAMS.h"
112 #include "SIZE.h"
113 #include "GRID.h"
114 #include "exf_param.h"
115 #include "exf_constants.h"
116
117 c == routine arguments ==
118
119 _RL obcs_fld_yz(1-oly:sny+oly,Nr,nsx,nsy)
120 _RL obcs_yz_0(1-oly:sny+oly,Nr,nsx,nsy)
121 _RL obcs_yz_1(1-oly:sny+oly,Nr,nsx,nsy)
122 character*(MAX_LEN_FNAM) obcs_file
123 character*1 obcsmask
124 logical first, changed
125 integer count0, count1
126 _RL fac
127 _RL mycurrenttime
128 integer mycurrentiter
129 integer mythid
130
131 #ifdef ALLOW_OBCS
132
133 c == local variables ==
134
135 integer bi, bj
136 integer j, k
137
138 c == end of interface ==
139
140 if ( first ) then
141 if ( obcs_file .NE. ' ' )
142 & call mdsreadfieldyz( obcs_file, exf_iprec, exf_yftype, Nr
143 & , obcs_yz_1, count0, mythid
144 & )
145 endif
146
147 if (( first ) .or. ( changed )) then
148 call exf_swapffields_yz( obcs_yz_0, obcs_yz_1, mythid )
149
150 if ( obcs_file .NE. ' ' )
151 & call mdsreadfieldyz( obcs_file, exf_iprec, exf_yftype, Nr
152 & , obcs_yz_1, count1, mythid
153 & )
154 endif
155
156 do bj = mybylo(mythid),mybyhi(mythid)
157 do bi = mybxlo(mythid),mybxhi(mythid)
158 do k = 1,Nr
159 do j = 1,sny
160 obcs_fld_yz(j,k,bi,bj) =
161 & fac *obcs_yz_0(j,k,bi,bj) +
162 & (exf_one - fac) *obcs_yz_1(j,k,bi,bj)
163 enddo
164 enddo
165 enddo
166 enddo
167
168 #endif
169
170 end

  ViewVC Help
Powered by ViewVC 1.1.22