1 |
C $Header: /u/gcmpack/MITgcm/pkg/aim_compon_interf/atm_store_qshortwave.F,v 1.2 2004/04/18 15:38:45 jmc Exp $ |
2 |
C $Name: $ |
3 |
|
4 |
#include "CPP_OPTIONS.h" |
5 |
|
6 |
CStartOfInterface |
7 |
SUBROUTINE ATM_STORE_QSHORTWAVE(bi,bj, |
8 |
I myTime, |
9 |
I myIter, |
10 |
I myThid ) |
11 |
C /==========================================================\ |
12 |
C | SUBROUTINE ATM_STORE_QSHORTWAVE | |
13 |
C | o Routine for saving atmos. lower bdy shortwave heat flux| |
14 |
C | 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 "SIZE.h" |
22 |
#include "EEPARAMS.h" |
23 |
#include "PARAMS.h" |
24 |
#include "CPL_PARAMS.h" |
25 |
C == Global variables (main model) |
26 |
#include "FFIELDS.h" |
27 |
C == Global variables for coupling interface == |
28 |
#include "ATMCPL.h" |
29 |
|
30 |
|
31 |
C == Routine arguments == |
32 |
C bi,bj - Tile index |
33 |
C myThid - Thread number for this instance of the routine |
34 |
C myIter - Current timestep number |
35 |
C myTime - Current model time |
36 |
INTEGER bi, bj |
37 |
_RL myTime |
38 |
INTEGER myIter |
39 |
INTEGER myThid |
40 |
CEndOfInterface |
41 |
|
42 |
#ifdef COMPONENT_MODULE |
43 |
C == Local variables == |
44 |
C i,j - Loop counters |
45 |
INTEGER i,j |
46 |
_RL cplTimeFraction |
47 |
|
48 |
C o Accumulate heat flux that will be exported to the coupling layer. |
49 |
C +ve into atmos., W/m2. |
50 |
|
51 |
cplTimeFraction = 1. _d 0 / DFLOAT(cplSendFrq_iter) |
52 |
qShortWaveTime(bi,bj) = qShortWaveTime(bi,bj) + cplTimeFraction |
53 |
DO j=1,sNy |
54 |
DO i=1,sNx |
55 |
qShortWave(i,j,bi,bj) = qShortWave(i,j,bi,bj) |
56 |
& + Qsw(i,j,bi,bj)*cplTimeFraction |
57 |
ENDDO |
58 |
ENDDO |
59 |
|
60 |
#endif /* COMPONENT_MODULE */ |
61 |
|
62 |
RETURN |
63 |
END |