/[MITgcm]/MITgcm/pkg/atm2d/put_ocnvars.F
ViewVC logotype

Annotation of /MITgcm/pkg/atm2d/put_ocnvars.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.5 - (hide annotations) (download)
Tue Apr 28 18:33:36 2009 UTC (15 years, 1 month ago) by jmc
Branch: MAIN
CVS Tags: checkpoint62, checkpoint62c, checkpoint62b, checkpoint62a, checkpoint62f, checkpoint62e, checkpoint62d, checkpoint61n, checkpoint61o, checkpoint61m, checkpoint61v, checkpoint61w, checkpoint61t, checkpoint61u, checkpoint61r, checkpoint61s, checkpoint61p, checkpoint61q, checkpoint61z, checkpoint61x, checkpoint61y
Changes since 1.4: +9 -9 lines
fix wrong type of EXCH for AtmospCO2 & wind (from DIC_VARS.h)
+ change macros (EXCH & GLOBAL_SUM/MAX) sufix _R4/_R8 to _RS/_RL
  when applied to _RS/_RL variable.

1 jmc 1.5 C $Header: /u/gcmpack/MITgcm/pkg/atm2d/put_ocnvars.F,v 1.4 2007/10/08 23:48:28 jmc Exp $
2 jmc 1.4 C $Name: $
3    
4 jscott 1.1 #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 jscott 1.3 #include "PARAMS.h"
20 jscott 1.2 #include "THSICE_VARS.h"
21 jscott 1.1 #include "ATM2D_VARS.h"
22    
23     #ifdef ATM2D_MPI_ON
24     # include "OCNSIZE.h"
25     # include "OCNVARS.h"
26 jscott 1.2 # include "OCNIDS.h"
27 jscott 1.1 #else
28     # include "FFIELDS.h"
29     # include "SURFACE.h"
30 jscott 1.2 # ifdef ALLOW_DIC
31     # include "DIC_ABIOTIC.h"
32     # endif
33 jscott 1.1 #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 jscott 1.2 #ifdef ATM2D_MPI_ON
51    
52 jscott 1.1 C OCNVARS common set from ATM2D common
53 jmc 1.4 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 jscott 1.3 C convert FW to MITGCM units kg/m2/s for passing
59 jmc 1.4 FWFlux_ocn(i,j)= (pass_precip(i,j) + pass_evap(i,j)
60 jscott 1.3 & + pass_runoff(i,j)) * rhoConstFresh
61 jscott 1.1 SaltFlx_ocn(i,j) = sFluxFromIce(i,j)
62 jscott 1.2 # 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 jscott 1.1
71     #else
72     C FFIELDS.h common block set from ATM2D common
73    
74 jmc 1.4 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 jscott 1.3 & + pass_runoff(i,j)) * rhoConstFresh
81 jscott 1.1 saltFlux(i,j,1,1)= sFluxFromIce(i,j)
82    
83     CALL EXCH_UV_XY_RS(fu,fv,.TRUE.,myThid)
84 jmc 1.5 _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 jscott 1.1
89     # ifdef ATMOSPHERIC_LOADING
90 jscott 1.2 sIceLoad(i,j,1,1) = pass_sIceLoad(i,j)
91 jmc 1.5 _EXCH_XY_RS(pLoad, myThid )
92     _EXCH_XY_RS( sIceLoad, myThid )
93 jscott 1.2 C phi0surf(i,j,1,1) = pass_slp(i,j)*recip_rhoConst
94 jscott 1.1 C & + gravity*seaIceMass(i,j,1,1)*recip_rhoConst
95     # endif /* ATMOSPHERIC_LOADING */
96    
97 jscott 1.2 # ifdef ALLOW_DIC
98     C icemask should be imported in DIC code
99 jmc 1.4 AtmospCO2(i,j,1,1)= pass_pCO2(i,j)
100 jscott 1.2 wind(i,j,1,1)= pass_wspeed(i,j)
101 jmc 1.5 _EXCH_XY_RL(AtmospCO2 , myThid )
102     _EXCH_XY_RL(wind , myThid )
103 jscott 1.2 # endif /* ALLOW_DIC */
104    
105     #endif /* ATM2D_MPI_ON */
106 jscott 1.1
107     ENDDO
108     ENDDO
109    
110     RETURN
111     END
112    

  ViewVC Help
Powered by ViewVC 1.1.22