1 |
dfer |
1.2 |
C $Header: /u/gcmpack/MITgcm/pkg/aim_compon_interf/atm_store_airco2.F,v 1.1 2007/06/18 21:28:52 jmc Exp $ |
2 |
jmc |
1.1 |
C $Name: $ |
3 |
|
|
|
4 |
|
|
#include "PACKAGES_CONFIG.h" |
5 |
|
|
#include "CPP_OPTIONS.h" |
6 |
dfer |
1.2 |
#ifdef ALLOW_AIM |
7 |
|
|
# include "AIM_OPTIONS.h" |
8 |
|
|
#endif |
9 |
jmc |
1.1 |
|
10 |
|
|
CBOP |
11 |
|
|
C !ROUTINE: ATM_STORE_AIRCO2 |
12 |
|
|
C !INTERFACE: |
13 |
|
|
SUBROUTINE ATM_STORE_AIRCO2( bi,bj, |
14 |
|
|
I myTime, myIter, myThid ) |
15 |
|
|
|
16 |
|
|
C !DESCRIPTION: \bv |
17 |
|
|
C *==========================================================* |
18 |
|
|
C | SUBROUTINE ATM_STORE_AIRCO2 |
19 |
|
|
C | o Routine for saving atmos. CO2 concentration from ??? pkg |
20 |
|
|
C | for export to coupling layer. |
21 |
|
|
C *==========================================================* |
22 |
|
|
C | This version interfaces to the ??? package. |
23 |
|
|
C *==========================================================* |
24 |
|
|
C \ev |
25 |
|
|
|
26 |
|
|
C !USES: |
27 |
|
|
IMPLICIT NONE |
28 |
|
|
|
29 |
|
|
C == Global variables == |
30 |
dfer |
1.2 |
#ifdef ALLOW_AIM |
31 |
|
|
# include "AIM_SIZE.h" |
32 |
|
|
#else |
33 |
|
|
# include "SIZE.h" |
34 |
|
|
#endif |
35 |
jmc |
1.1 |
|
36 |
|
|
#include "EEPARAMS.h" |
37 |
|
|
#include "PARAMS.h" |
38 |
|
|
#include "CPL_PARAMS.h" |
39 |
dfer |
1.2 |
#ifdef ALLOW_AIM |
40 |
|
|
#include "AIM_CO2.h" |
41 |
|
|
#endif |
42 |
jmc |
1.1 |
C == Global variables for coupling interface == |
43 |
|
|
#include "ATMCPL.h" |
44 |
|
|
|
45 |
|
|
C !INPUT/OUTPUT PARAMETERS: |
46 |
|
|
C == Routine arguments == |
47 |
|
|
C bi,bj :: Tile indices |
48 |
|
|
C myTime :: Current model time |
49 |
|
|
C myIter :: Current timestep number |
50 |
|
|
C myThid :: my Thread Id number |
51 |
|
|
INTEGER bi, bj |
52 |
|
|
_RL myTime |
53 |
|
|
INTEGER myIter |
54 |
|
|
INTEGER myThid |
55 |
|
|
CEOP |
56 |
|
|
|
57 |
|
|
#ifdef ALLOW_AIM |
58 |
dfer |
1.2 |
#ifdef ALLOW_AIM_CO2 |
59 |
jmc |
1.1 |
C == Local variables == |
60 |
|
|
C i,j :: Loop counters |
61 |
|
|
INTEGER i,j, ij |
62 |
|
|
_RL cplTimeFraction |
63 |
|
|
|
64 |
dfer |
1.2 |
C o Accumulate atmospheric CO2 from Aim pkg that will be exported |
65 |
|
|
C to the coupling layer. |
66 |
jmc |
1.1 |
cplTimeFraction = 1. _d 0 / DFLOAT(cplSendFrq_iter) |
67 |
|
|
airCO2Time(bi,bj) = airCO2Time(bi,bj) + cplTimeFraction |
68 |
|
|
DO j=1,sNy |
69 |
|
|
DO i=1,sNx |
70 |
|
|
ij = i + (j-1)*sNx |
71 |
|
|
airCO2(i,j,bi,bj) = airCO2(i,j,bi,bj) |
72 |
dfer |
1.2 |
& + aim_CO2(ij,myThid)*cplTimeFraction |
73 |
jmc |
1.1 |
ENDDO |
74 |
|
|
ENDDO |
75 |
|
|
|
76 |
dfer |
1.2 |
#endif |
77 |
jmc |
1.1 |
#endif /* ALLOW_AIM */ |
78 |
|
|
|
79 |
|
|
RETURN |
80 |
|
|
END |