1 |
C $Header: /u/gcmpack/MITgcm/pkg/atm_compon_interf/cpl_export_my_data.F,v 1.6 2013/09/24 23:13:54 jmc Exp $ |
2 |
C $Name: $ |
3 |
|
4 |
#include "CPP_OPTIONS.h" |
5 |
|
6 |
CBOP |
7 |
C !ROUTINE: CPL_EXPORT_MY_DATA |
8 |
C !INTERFACE: |
9 |
SUBROUTINE CPL_EXPORT_MY_DATA( |
10 |
I myTime, myIter, myThid ) |
11 |
|
12 |
C !DESCRIPTION: \bv |
13 |
C *==========================================================* |
14 |
C | SUBROUTINE CPL_EXPORT_MY_DATA |
15 |
C | o Routine for controlling export of coupling data to |
16 |
C | coupler layer. |
17 |
C *==========================================================* |
18 |
C | This version talks to the MIT Coupler. It uses the MIT |
19 |
C | Coupler "checkpoint1" library calls. |
20 |
C *==========================================================* |
21 |
C \ev |
22 |
|
23 |
C !USES: |
24 |
IMPLICIT NONE |
25 |
|
26 |
C == Global variables == |
27 |
#include "SIZE.h" |
28 |
#include "EEPARAMS.h" |
29 |
#include "CPL_PARAMS.h" |
30 |
#include "ATMCPL.h" |
31 |
#include "ATMIDS.h" |
32 |
|
33 |
C !INPUT/OUTPUT PARAMETERS: |
34 |
C == Routine arguments == |
35 |
C myTime :: Current time in simulation. |
36 |
C myIter :: Current timestep number. |
37 |
C myThid :: Thread number for this instance of the routine. |
38 |
_RL myTime |
39 |
INTEGER myIter |
40 |
INTEGER myThid |
41 |
CEOP |
42 |
|
43 |
#ifdef COMPONENT_MODULE |
44 |
C !LOCAL VARIABLES: |
45 |
C == Local variables == |
46 |
C msgBuf :: Informational/error message buffer |
47 |
CHARACTER*(MAX_LEN_MBUF) msgBuf |
48 |
|
49 |
C Send data to coupling layer. Note MIT Coupler checkpoint1 |
50 |
C does not allow asynchronous posting of data, so ordering |
51 |
C has to be consistent with coupling layer ordering. |
52 |
IF ( MOD(myIter,cplSendFrq_iter).EQ.0 ) THEN |
53 |
_BEGIN_MASTER( myThid ) |
54 |
IF ( debugMode .OR. countPrtExp.LT.maxNumberPrint ) THEN |
55 |
c WRITE(0,'(A,I5,A,I10)') ' Exporting (pid=', myProcId, |
56 |
c & ' ) atmospheric fluxes at iter.', myIter |
57 |
WRITE(msgBuf,'(A,I10)') |
58 |
& ' Exporting atmospheric fluxes at iter.', myIter |
59 |
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
60 |
& SQUEEZE_RIGHT, myThid ) |
61 |
countPrtExp = countPrtExp + 1 |
62 |
ENDIF |
63 |
_END_MASTER( myThid ) |
64 |
|
65 |
C- export Sea-Level pressure: |
66 |
CALL ATM_EXPORT_FLD( atmSLPrName, |
67 |
U atmSLPr, atmSLPrTime, myThid ) |
68 |
C- export Net surface heat flux: |
69 |
CALL ATM_EXPORT_FLD( atmHeatFluxName, |
70 |
U heatFlux, HeatFluxTime, myThid ) |
71 |
C- export Net Short-Wave surface heat flux: |
72 |
CALL ATM_EXPORT_FLD( atmQshortWaveName, |
73 |
U qShortWave, qShortWaveTime, myThid ) |
74 |
C- export surface wind stress, Zonal & Meridional components: |
75 |
CALL ATM_EXPORT_FLD( atmTauXName, |
76 |
U tauX, tauXTime, myThid ) |
77 |
CALL ATM_EXPORT_FLD( atmTauYName, |
78 |
U tauY, tauYTime, myThid ) |
79 |
C- export Net fresh water flux (Evap - Precip): |
80 |
CALL ATM_EXPORT_FLD( atmEvMPrName, |
81 |
U EvMPrFlux, EvMPrTime, myThid ) |
82 |
C- export Run Off fresh water flux: |
83 |
CALL ATM_EXPORT_FLD( atmRunOffName, |
84 |
U RunOffFlux, RunOffTime, myThid ) |
85 |
C- export Energy flux associated with Run Off: |
86 |
CALL ATM_EXPORT_FLD( atmROEnFxName, |
87 |
U RunOffEnFx, ROEnFxTime, myThid ) |
88 |
C- export Salt flux (related to sea-ice melting/freezing): |
89 |
CALL ATM_EXPORT_FLD( atmSaltFxName, |
90 |
U iceSaltFlx, saltFxTime, myThid ) |
91 |
C- export Sea-Ice Mass: |
92 |
CALL ATM_EXPORT_FLD( atmSeaIceName, |
93 |
U seaIceMass, seaIceTime, myThid ) |
94 |
|
95 |
IF ( atmCpl_exchange_DIC ) THEN |
96 |
C- export atmospheric CO2: |
97 |
CALL ATM_EXPORT_FLD( atmAirCO2Name, |
98 |
U airCO2, airCO2Time, myThid ) |
99 |
|
100 |
C- export surface wind speed: |
101 |
CALL ATM_EXPORT_FLD( atmWSpdName, |
102 |
U sWSpeed, sWSpeedTime, myThid ) |
103 |
|
104 |
C- export seaice fraction: |
105 |
CALL ATM_EXPORT_FLD( atmFIceName, |
106 |
U fracIce, fracIceTime, myThid ) |
107 |
ENDIF |
108 |
|
109 |
ENDIF |
110 |
|
111 |
#endif /* COMPONENT_MODULE */ |
112 |
|
113 |
RETURN |
114 |
END |