1 |
C $Header: /u/gcmpack/MITgcm/pkg/atm2d/put_ocnvars.F,v 1.4 2007/10/08 23:48:28 jmc Exp $ |
2 |
C $Name: $ |
3 |
|
4 |
#include "ctrparam.h" |
5 |
#include "ATM2D_OPTIONS.h" |
6 |
|
7 |
C !INTERFACE: |
8 |
SUBROUTINE PUT_OCNVARS( myTime, myIter, myThid ) |
9 |
C *==========================================================* |
10 |
C | Put fluxes for the ocean where needed: MPI mode, into | |
11 |
c | common block for passing; single-proc, into FFIELDS.h | |
12 |
C *==========================================================* |
13 |
IMPLICIT NONE |
14 |
|
15 |
C === Global Atmosphere Variables === |
16 |
#include "ATMSIZE.h" |
17 |
#include "SIZE.h" |
18 |
#include "EEPARAMS.h" |
19 |
#include "PARAMS.h" |
20 |
#include "THSICE_VARS.h" |
21 |
#include "ATM2D_VARS.h" |
22 |
|
23 |
#ifdef ATM2D_MPI_ON |
24 |
# include "OCNSIZE.h" |
25 |
# include "OCNVARS.h" |
26 |
# include "OCNIDS.h" |
27 |
#else |
28 |
# include "FFIELDS.h" |
29 |
# include "SURFACE.h" |
30 |
# ifdef ALLOW_DIC |
31 |
# include "DIC_ABIOTIC.h" |
32 |
# endif |
33 |
#endif |
34 |
|
35 |
C !INPUT/OUTPUT PARAMETERS: |
36 |
C === Routine arguments === |
37 |
C myTime - current simulation time (ocean model time) |
38 |
C myIter - iteration number (ocean model) |
39 |
C myThid - Thread no. that called this routine. |
40 |
_RL myTime |
41 |
INTEGER myIter |
42 |
INTEGER myThid |
43 |
|
44 |
C LOCAL VARIABLES: |
45 |
INTEGER i,j |
46 |
|
47 |
DO j=1,sNy |
48 |
DO i=1,sNx |
49 |
|
50 |
#ifdef ATM2D_MPI_ON |
51 |
|
52 |
C OCNVARS common set from ATM2D common |
53 |
atmSLPr_ocn(i,j)= pass_slp(i,j) |
54 |
HeatFlux_ocn(i,j)= pass_qnet(i,j) |
55 |
qShortWave_ocn(i,j)= pass_solarnet(i,j) |
56 |
TauX_ocn(i,j)= pass_fu(i,j) |
57 |
TauY_ocn(i,j)= pass_fv(i,j) |
58 |
C convert FW to MITGCM units kg/m2/s for passing |
59 |
FWFlux_ocn(i,j)= (pass_precip(i,j) + pass_evap(i,j) |
60 |
& + pass_runoff(i,j)) * rhoConstFresh |
61 |
SaltFlx_ocn(i,j) = sFluxFromIce(i,j) |
62 |
# ifdef ATMOSPHERIC_LOADING |
63 |
sIceMass_ocn(i,j) = pass_sIceLoad(i,j) |
64 |
# endif /* ATMOSPHERIC_LOADING */ |
65 |
IF ( ocnCpl_exchange_DIC ) THEN |
66 |
aCO2_ocn(i,j) = pass_pCO2(i,j) |
67 |
wSpeed_ocn(i,j) = pass_wspeed(i,j) |
68 |
sIceFrac_ocn(i,j) = iceMask(i,j,1,1) |
69 |
ENDIF |
70 |
|
71 |
#else |
72 |
C FFIELDS.h common block set from ATM2D common |
73 |
|
74 |
pLoad(i,j,1,1)= pass_slp(i,j) |
75 |
Qnet(i,j,1,1)= pass_qnet(i,j) |
76 |
Qsw(i,j,1,1)= pass_solarnet(i,j) |
77 |
fu(i,j,1,1)= pass_fu(i,j) |
78 |
fv(i,j,1,1)= pass_fv(i,j) |
79 |
EmPmR(i,j,1,1)= (pass_precip(i,j) + pass_evap(i,j) |
80 |
& + pass_runoff(i,j)) * rhoConstFresh |
81 |
saltFlux(i,j,1,1)= sFluxFromIce(i,j) |
82 |
|
83 |
CALL EXCH_UV_XY_RS(fu,fv,.TRUE.,myThid) |
84 |
_EXCH_XY_RS(EmPmR, myThid ) !for NL Free surf? |
85 |
_EXCH_XY_RS(saltFlux, myThid ) |
86 |
_EXCH_XY_RS(Qnet, myThid ) |
87 |
_EXCH_XY_RS(Qsw, myThid ) |
88 |
|
89 |
# ifdef ATMOSPHERIC_LOADING |
90 |
sIceLoad(i,j,1,1) = pass_sIceLoad(i,j) |
91 |
_EXCH_XY_RS(pLoad, myThid ) |
92 |
_EXCH_XY_RS( sIceLoad, myThid ) |
93 |
C phi0surf(i,j,1,1) = pass_slp(i,j)*recip_rhoConst |
94 |
C & + gravity*seaIceMass(i,j,1,1)*recip_rhoConst |
95 |
# endif /* ATMOSPHERIC_LOADING */ |
96 |
|
97 |
# ifdef ALLOW_DIC |
98 |
C icemask should be imported in DIC code |
99 |
AtmospCO2(i,j,1,1)= pass_pCO2(i,j) |
100 |
wind(i,j,1,1)= pass_wspeed(i,j) |
101 |
_EXCH_XY_RL(AtmospCO2 , myThid ) |
102 |
_EXCH_XY_RL(wind , myThid ) |
103 |
# endif /* ALLOW_DIC */ |
104 |
|
105 |
#endif /* ATM2D_MPI_ON */ |
106 |
|
107 |
ENDDO |
108 |
ENDDO |
109 |
|
110 |
RETURN |
111 |
END |
112 |
|