1 |
c $Header: /u/gcmpack/development/heimbach/ecco_env/pkg/exf/exfa_mapfields.F,v 1.1 2001/02/02 19:43:48 heimbach Exp $ |
2 |
|
3 |
#include "EXF_CPPOPTIONS.h" |
4 |
|
5 |
|
6 |
subroutine exfa_MapFields( |
7 |
I mythid |
8 |
& ) |
9 |
|
10 |
c ================================================================== |
11 |
c SUBROUTINE exfa_MapFields |
12 |
c ================================================================== |
13 |
c |
14 |
c o Map the external forcing anomaly fields on the ocean model arrays. |
15 |
c |
16 |
c The units have to be such that the individual forcing record has |
17 |
c units equal to [quantity/s]. See the header file *FFIELDS.h* of |
18 |
c the MITgcmuv. |
19 |
c |
20 |
c Required units such that no scaling has to be applied: |
21 |
c |
22 |
c heat flux: input file W/m^2 |
23 |
c salt flux: input file m/s |
24 |
c zonal wind stress: input file N/m^2 |
25 |
c merid. wind stress: input file N/m^2 |
26 |
c |
27 |
c To allow for such unit conversions this routine contains scaling |
28 |
c factors scal_quantity. |
29 |
c |
30 |
c started: Ralf.Giering@FastOpt.de 25-Mai-2000 |
31 |
c |
32 |
c ================================================================== |
33 |
c SUBROUTINE exfa_MapFields |
34 |
c ================================================================== |
35 |
|
36 |
implicit none |
37 |
|
38 |
c == global variables == |
39 |
|
40 |
#include "EEPARAMS.h" |
41 |
#include "SIZE.h" |
42 |
#include "FFIELDS.h" |
43 |
#include "exfa_fields.h" |
44 |
|
45 |
c == routine arguments == |
46 |
|
47 |
c mythid - thread number for this instance of the routine. |
48 |
|
49 |
integer mythid |
50 |
|
51 |
c == local variables == |
52 |
|
53 |
integer bi,bj |
54 |
integer i,j |
55 |
integer jtlo |
56 |
integer jthi |
57 |
integer itlo |
58 |
integer ithi |
59 |
integer jmin |
60 |
integer jmax |
61 |
integer imin |
62 |
integer imax |
63 |
_RL scal_hfl |
64 |
_RL scal_sfl |
65 |
_RL scal_ust |
66 |
_RL scal_vst |
67 |
|
68 |
c == end of interface == |
69 |
|
70 |
jtlo = mybylo(mythid) |
71 |
jthi = mybyhi(mythid) |
72 |
itlo = mybxlo(mythid) |
73 |
ithi = mybxhi(mythid) |
74 |
|
75 |
jmin = 1-oly |
76 |
jmax = sny+oly |
77 |
imin = 1-olx |
78 |
imax = snx+olx |
79 |
|
80 |
scal_hfl = 1. _d 0 |
81 |
scal_sfl = 1. _d 0 |
82 |
scal_ust = 1. _d 0 |
83 |
scal_vst = 1. _d 0 |
84 |
|
85 |
do bj = jtlo,jthi |
86 |
do bi = itlo,ithi |
87 |
do j = jmin,jmax |
88 |
do i = imin,imax |
89 |
|
90 |
c Heat flux. |
91 |
qnet(i,j,bi,bj) = |
92 |
& qnet(i,j,bi,bj) + scal_hfl * hfluxa(i,j,bi,bj) |
93 |
|
94 |
c Salt flux. |
95 |
empmr(i,j,bi,bj) = |
96 |
& empmr(i,j,bi,bj) + scal_sfl * sfluxa(i,j,bi,bj) |
97 |
|
98 |
c Zonal wind stress. |
99 |
fu(i,j,bi,bj) = |
100 |
& fu(i,j,bi,bj) + scal_ust * ustressa(i,j,bi,bj) |
101 |
|
102 |
c Meridional wind stress. |
103 |
fv(i,j,bi,bj) = |
104 |
& fv(i,j,bi,bj) + scal_vst * vstressa(i,j,bi,bj) |
105 |
|
106 |
enddo |
107 |
enddo |
108 |
enddo |
109 |
enddo |
110 |
|
111 |
c Update the tile edges. |
112 |
|
113 |
_EXCH_XY_R4( qnet, mythid ) |
114 |
_EXCH_XY_R4( empmr, mythid ) |
115 |
_EXCH_XY_R4( fu, mythid ) |
116 |
_EXCH_XY_R4( fv, mythid ) |
117 |
|
118 |
end |