1 |
C $Header: /u/gcmpack/MITgcm/pkg/aim_compon_interf/atm_store_tauy.F,v 1.1 2003/12/15 02:44:48 jmc Exp $ |
2 |
C $Name: $ |
3 |
|
4 |
#include "AIM_OPTIONS.h" |
5 |
|
6 |
CStartOfInterface |
7 |
SUBROUTINE ATM_STORE_TAUY( bi,bj, |
8 |
I myTime, |
9 |
I myIter, |
10 |
I myThid ) |
11 |
C /==========================================================\ |
12 |
C | SUBROUTINE ATM_STORE_TAUY | |
13 |
C | o Routine for saving atmos. lower boundary momentum flux | |
14 |
C | for export to coupling layer. | |
15 |
C |==========================================================| |
16 |
C | This version interfaces to the MITgcm AIMPHYS package. | |
17 |
C \==========================================================/ |
18 |
IMPLICIT NONE |
19 |
|
20 |
C == Global variables == |
21 |
#include "AIM_SIZE.h" |
22 |
#include "EEPARAMS.h" |
23 |
#include "PARAMS.h" |
24 |
#include "CPL_PARAMS.h" |
25 |
#include "GRID.h" |
26 |
#include "DYNVARS.h" |
27 |
#include "AIM2DYN.h" |
28 |
c #include "AIM_FFIELDS.h" |
29 |
#ifdef ALLOW_THSICE |
30 |
# include "THSICE_PARAMS.h" |
31 |
# include "THSICE_VARS.h" |
32 |
#endif |
33 |
C == Global variables for coupling interface == |
34 |
#include "ATMCPL.h" |
35 |
|
36 |
|
37 |
C == Routine arguments == |
38 |
C bi,bj - Tile index |
39 |
C myThid - Thread number for this instance of the routine |
40 |
C myIter - Current timestep number |
41 |
C myTime - Current model time |
42 |
INTEGER bi, bj |
43 |
_RL myTime |
44 |
INTEGER myIter |
45 |
INTEGER myThid |
46 |
CEndOfInterface |
47 |
|
48 |
#ifdef COMPONENT_MODULE |
49 |
C == Local variables == |
50 |
C i,j,k - Loop counters |
51 |
INTEGER i,j,k |
52 |
_RL vStr_tmp |
53 |
_RL cplTimeFraction |
54 |
|
55 |
C o Accumulate meridional momentum flux that will be exported to the |
56 |
C coupling layer. Momentum flux is in N/m^2 with same sign as the |
57 |
C wind. Momentum flux is in COMMON /FLUXES/, com_physvar.h. |
58 |
cplTimeFraction = 1. _d 0 / DFLOAT(cplSendFrq_iter) |
59 |
k = 1 |
60 |
tauYTime(bi,bj) = tauYTime(bi,bj) + cplTimeFraction |
61 |
#ifdef ALLOW_THSICE |
62 |
IF ( useThSIce .AND. stressReduction.GT. 0. _d 0 ) THEN |
63 |
C-- Reduce wind stress applied to ocean where sea-ice is present |
64 |
DO j=1,sNy |
65 |
DO i=1,sNx |
66 |
c IF ( aim_landFr(i,j-1,bi,bj)*aim_landFr(i,j,bi,bj) .NE. 1. ) THEN |
67 |
IF ( hFacS(i,j,k,bi,bj) .NE. 0. ) THEN |
68 |
vStr_tmp = |
69 |
& ( aim_drag(i,j-1,bi,bj) |
70 |
& *(1. _d 0 - iceMask(i,j-1,bi,bj)*stressReduction) |
71 |
& + aim_drag(i, j ,bi,bj) |
72 |
& *(1. _d 0 - iceMask(i, j ,bi,bj)*stressReduction) |
73 |
& )* 0.5 _d 0 * vVel(i,j,k,bi,bj) |
74 |
tauY(i,j,bi,bj) = tauY(i,j,bi,bj) |
75 |
& + vStr_tmp*cplTimeFraction |
76 |
ENDIF |
77 |
ENDDO |
78 |
ENDDO |
79 |
ELSE |
80 |
#else /*ALLOW_THSICE*/ |
81 |
IF (.TRUE.) THEN |
82 |
#endif /*ALLOW_THSICE*/ |
83 |
DO j=1,sNy |
84 |
DO i=1,sNx |
85 |
c IF ( aim_landFr(i,j-1,bi,bj)*aim_landFr(i,j,bi,bj) .NE. 1. ) THEN |
86 |
IF ( hFacS(i,j,k,bi,bj) .NE. 0. ) THEN |
87 |
vStr_tmp = |
88 |
& ( aim_drag(i,j-1,bi,bj)+aim_drag(i,j,bi,bj) ) |
89 |
& * 0.5 _d 0 * vVel(i,j,k,bi,bj) |
90 |
tauY(i,j,bi,bj) = tauY(i,j,bi,bj) |
91 |
& + vStr_tmp*cplTimeFraction |
92 |
ENDIF |
93 |
ENDDO |
94 |
ENDDO |
95 |
ENDIF |
96 |
|
97 |
#endif /* COMPONENT_MODULE */ |
98 |
|
99 |
RETURN |
100 |
END |