1 |
jmc |
1.2 |
C $Header: /u/gcmpack/MITgcm/pkg/aim_compon_interf/atm_store_runoff.F,v 1.1 2003/12/15 02:44:48 jmc Exp $ |
2 |
|
|
C $Name: $ |
3 |
jmc |
1.1 |
|
4 |
jmc |
1.2 |
#include "PACKAGES_CONFIG.h" |
5 |
|
|
#include "CPP_OPTIONS.h" |
6 |
jmc |
1.1 |
|
7 |
|
|
CStartOfInterface |
8 |
|
|
SUBROUTINE ATM_STORE_RUNOFF( bi,bj, |
9 |
jmc |
1.2 |
I myTime, |
10 |
|
|
I myIter, |
11 |
jmc |
1.1 |
I myThid ) |
12 |
|
|
C /==========================================================\ |
13 |
|
|
C | SUBROUTINE ATM_STORE_RUNOFF | |
14 |
|
|
C | o Routine for saving atmos. RunOff from land bucket | |
15 |
|
|
C | for export to coupling layer. | |
16 |
|
|
C |==========================================================| |
17 |
|
|
C | This version interfaces to the LAND package. | |
18 |
|
|
C \==========================================================/ |
19 |
|
|
IMPLICIT NONE |
20 |
|
|
|
21 |
|
|
C == Global variables == |
22 |
jmc |
1.2 |
#ifdef ALLOW_LAND |
23 |
jmc |
1.1 |
#include "LAND_SIZE.h" |
24 |
jmc |
1.2 |
#else |
25 |
|
|
#include "SIZE.h" |
26 |
|
|
#endif |
27 |
jmc |
1.1 |
|
28 |
|
|
#include "EEPARAMS.h" |
29 |
|
|
#include "PARAMS.h" |
30 |
jmc |
1.2 |
#include "CPL_PARAMS.h" |
31 |
|
|
|
32 |
|
|
#ifdef ALLOW_LAND |
33 |
jmc |
1.1 |
c #include "LAND_PARAMS.h" |
34 |
|
|
#include "LAND_VARS.h" |
35 |
jmc |
1.2 |
#endif |
36 |
jmc |
1.1 |
C == Global variables for coupling interface == |
37 |
|
|
#include "ATMCPL.h" |
38 |
|
|
|
39 |
|
|
|
40 |
|
|
C == Routine arguments == |
41 |
jmc |
1.2 |
C bi,bj - Tile index |
42 |
|
|
C myThid - Thread number for this instance of the routine |
43 |
|
|
C myIter - Current timestep number |
44 |
|
|
C myTime - Current model time |
45 |
jmc |
1.1 |
INTEGER bi, bj |
46 |
jmc |
1.2 |
_RL myTime |
47 |
|
|
INTEGER myIter |
48 |
jmc |
1.1 |
INTEGER myThid |
49 |
|
|
CEndOfInterface |
50 |
|
|
|
51 |
|
|
#ifdef ALLOW_LAND |
52 |
|
|
C == Local variables == |
53 |
|
|
C I,J,K,II - Loop counters |
54 |
|
|
C conv_precip :: conversion factor for precip: from g.m-2.s-1 to m/s |
55 |
|
|
INTEGER I,J,K |
56 |
|
|
_RL cplTimeFraction |
57 |
|
|
|
58 |
|
|
C o Accumulate RunOff from land bucket that will be exported to the |
59 |
|
|
C coupling layer. RunOff is per surface unit, in m/s. |
60 |
jmc |
1.2 |
cplTimeFraction = 1. _d 0 / DFLOAT(cplSendFrq_iter) |
61 |
|
|
RunOffTime(bi,bj) = RunOffTime(bi,bj) + cplTimeFraction |
62 |
|
|
DO J=1,sNy |
63 |
jmc |
1.1 |
DO I=1,sNx |
64 |
|
|
RunOffFlux(I,J,bi,bj) = RunOffFlux(I,J,bi,bj) |
65 |
|
|
& + land_runOff(I,J,bi,bj)*cplTimeFraction |
66 |
|
|
ENDDO |
67 |
jmc |
1.2 |
ENDDO |
68 |
jmc |
1.1 |
|
69 |
|
|
#endif /* ALLOW_LAND */ |
70 |
|
|
|
71 |
|
|
RETURN |
72 |
|
|
END |