1 |
jmc |
1.2 |
C $Header: /u/gcmpack/MITgcm/pkg/aim_compon_interf/atm_store_taux.F,v 1.1 2003/12/15 02:44:48 jmc Exp $ |
2 |
|
|
C $Name: $ |
3 |
jmc |
1.1 |
|
4 |
|
|
#include "AIM_OPTIONS.h" |
5 |
|
|
|
6 |
|
|
CStartOfInterface |
7 |
|
|
SUBROUTINE ATM_STORE_TAUX( bi,bj, |
8 |
jmc |
1.2 |
I myTime, |
9 |
|
|
I myIter, |
10 |
jmc |
1.1 |
I myThid ) |
11 |
|
|
C /==========================================================\ |
12 |
|
|
C | SUBROUTINE ATM_STORE_TAUX | |
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 |
jmc |
1.2 |
c #include "AIM_FFIELDS.h" |
29 |
|
|
#ifdef ALLOW_THSICE |
30 |
|
|
# include "THSICE_PARAMS.h" |
31 |
|
|
# include "THSICE_VARS.h" |
32 |
|
|
#endif |
33 |
jmc |
1.1 |
C == Global variables for coupling interface == |
34 |
|
|
#include "ATMCPL.h" |
35 |
|
|
|
36 |
|
|
|
37 |
|
|
C == Routine arguments == |
38 |
jmc |
1.2 |
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 |
jmc |
1.1 |
INTEGER bi, bj |
43 |
jmc |
1.2 |
_RL myTime |
44 |
|
|
INTEGER myIter |
45 |
jmc |
1.1 |
INTEGER myThid |
46 |
|
|
CEndOfInterface |
47 |
|
|
|
48 |
jmc |
1.2 |
#ifdef COMPONENT_MODULE |
49 |
jmc |
1.1 |
C == Local variables == |
50 |
jmc |
1.2 |
C i,j,k - Loop counters |
51 |
|
|
INTEGER i,j,k |
52 |
jmc |
1.1 |
_RL uStr_tmp |
53 |
|
|
_RL cplTimeFraction |
54 |
|
|
|
55 |
|
|
C o Accumulate zonal 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 |
jmc |
1.2 |
cplTimeFraction = 1. _d 0 / DFLOAT(cplSendFrq_iter) |
59 |
|
|
k = 1 |
60 |
|
|
tauXTime(bi,bj) = tauXTime(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-1,j,bi,bj)*aim_landFr(i,j,bi,bj) .NE. 1. ) THEN |
67 |
|
|
IF ( hFacW(i,j,k,bi,bj) .NE. 0. ) THEN |
68 |
|
|
uStr_tmp = |
69 |
|
|
& ( aim_drag(i-1,j,bi,bj) |
70 |
|
|
& *(1. _d 0 - iceMask(i-1,j,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 * uVel(i,j,k,bi,bj) |
74 |
|
|
tauX(i,j,bi,bj) = tauX(i,j,bi,bj) |
75 |
|
|
& + uStr_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-1,j,bi,bj)*aim_landFr(i,j,bi,bj) .NE. 1. ) THEN |
86 |
|
|
IF ( hFacW(i,j,k,bi,bj) .NE. 0. ) THEN |
87 |
jmc |
1.1 |
uStr_tmp = |
88 |
|
|
& ( aim_drag(i-1,j,bi,bj)+aim_drag(i,j,bi,bj) ) |
89 |
jmc |
1.2 |
& * 0.5 _d 0 * uVel(i,j,k,bi,bj) |
90 |
|
|
tauX(i,j,bi,bj) = tauX(i,j,bi,bj) |
91 |
|
|
& + uStr_tmp*cplTimeFraction |
92 |
jmc |
1.1 |
ENDIF |
93 |
|
|
ENDDO |
94 |
jmc |
1.2 |
ENDDO |
95 |
|
|
ENDIF |
96 |
|
|
|
97 |
|
|
#endif /* COMPONENT_MODULE */ |
98 |
jmc |
1.1 |
|
99 |
|
|
RETURN |
100 |
|
|
END |