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

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

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


Revision 1.1 - (show annotations) (download)
Mon May 14 22:08:41 2001 UTC (23 years ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint40pre1, checkpoint43a-release1mods, release1-branch_tutorials, ecco-branch-mod1, ecco-branch-mod3, release1_beta1, checkpoint40pre7, release1-branch-end, checkpoint44b_pre, checkpoint43, checkpoint41, checkpoint44, checkpoint40pre2, checkpoint40pre5, checkpoint40pre6, checkpoint40pre9, checkpoint40pre8, release1_b1, chkpt44a_post, checkpoint40pre4, checkpoint40pre3, ecco-branch-mod2, checkpoint42, chkpt44a_pre, checkpoint40, release1-branch_branchpoint, checkpoint39
Branch point for: ecco-branch, release1, release1_coupled, release1-branch
Added external forcing package.
Not presently supported by mitgcm, i.e. disabled by default.

1 #include "EXF_CPPOPTIONS.h"
2
3 subroutine exf_set_lwflux(
4 O lwflux
5 I , mycurrenttime
6 I , mycurrentiter
7 I , mythid
8 & )
9
10 c ==================================================================
11 c SUBROUTINE exf_set_lwflux
12 c ==================================================================
13 c
14 c o set external forcing lwflux
15 c
16 c started: Ralf.Giering@FastOpt.de 25-Mai-2000
17
18 c ==================================================================
19 c SUBROUTINE exf_set_lwflux
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
30 #include "exf_param.h"
31 #include "exf_constants.h"
32
33 common /exfl_lwflux_r/ lwflux0, lwflux1
34 _RL lwflux0(1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
35 _RL lwflux1(1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
36
37 c == routine arguments ==
38
39 _RL lwflux(1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
40 _RL mycurrenttime
41 integer mycurrentiter
42 integer mythid
43
44 c == local variables ==
45
46 logical first, changed
47 integer count0, count1
48 _RL fac
49
50 integer bi, bj
51 integer i, j
52
53 c == end of interface ==
54
55 c get record numbers and interpolation factor for lwflux
56 call exf_GetFFieldRec(
57 I lwfluxstartdate, lwfluxperiod
58 O , fac, first, changed
59 O , count0, count1
60 I , mycurrenttime, mycurrentiter, mythid
61 & )
62
63 #ifndef ALLOW_AUTODIFF_TAMC
64 if ( first ) then
65 #endif
66 call mdsreadfield( lwfluxfile, exf_iprec, exf_yftype, 1
67 & , lwflux1, count0, mythid
68 & )
69 if (exf_yftype .eq. 'RL') then
70 call exf_filter_rl( lwflux1, lwfluxmask, mythid )
71 else
72 call exf_filter_rs( lwflux1, lwfluxmask, mythid )
73 end if
74 #ifndef ALLOW_AUTODIFF_TAMC
75 endif
76 #endif
77
78 #ifndef ALLOW_AUTODIFF_TAMC
79 if (( first ) .or. ( changed )) then
80 #endif
81 call exf_SwapFFields( lwflux0, lwflux1, mythid )
82
83 call mdsreadfield( lwfluxfile, exf_iprec, exf_yftype, 1
84 & , lwflux1, count1, mythid
85 & )
86 if (exf_yftype .eq. 'RL') then
87 call exf_filter_rl( lwflux1, lwfluxmask, mythid )
88 else
89 call exf_filter_rs( lwflux1, lwfluxmask, mythid )
90 end if
91 #ifndef ALLOW_AUTODIFF_TAMC
92 endif
93 #endif
94
95 c Loop over tiles.
96 do bj = mybylo(mythid),mybyhi(mythid)
97 do bi = mybxlo(mythid),mybxhi(mythid)
98 do j = 1,sny
99 do i = 1,snx
100
101 c Interpolate linearly onto the current time.
102
103 lwflux(i,j,bi,bj) = fac *lwflux0(i,j,bi,bj)+
104 & (exf_one - fac) *lwflux1(i,j,bi,bj)
105
106 enddo
107 enddo
108 enddo
109 enddo
110
111 end
112
113
114
115 subroutine exf_init_lwflux(
116 I mythid
117 & )
118
119 c ==================================================================
120 c SUBROUTINE exf_init_lwflux
121 c ==================================================================
122 c
123 c o
124 c
125 c started: Ralf.Giering@FastOpt.de 25-Mai-2000
126 c
127 c ==================================================================
128 c SUBROUTINE exf_init_lwflux
129 c ==================================================================
130
131 implicit none
132
133 c == global variables ==
134
135 #include "EEPARAMS.h"
136 #include "SIZE.h"
137
138 #include "exf_param.h"
139
140 common /exfl_lwflux_r/ lwflux0, lwflux1
141 _RL lwflux0(1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
142 _RL lwflux1(1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
143
144 c == routine arguments ==
145
146 integer mythid
147
148 c == local variables ==
149
150 integer bi, bj
151 integer i, j
152
153 c == end of interface ==
154
155 do bj = mybylo(mythid), mybyhi(mythid)
156 do bi = mybxlo(mythid), mybxhi(mythid)
157 do j = 1, sny
158 do i = 1, snx
159 lwflux0(i,j,bi,bj) = 0. _d 0
160 lwflux1(i,j,bi,bj) = 0. _d 0
161 enddo
162 enddo
163 enddo
164 enddo
165
166 end

  ViewVC Help
Powered by ViewVC 1.1.22