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

Contents of /MITgcm/pkg/atm2d/get_ocnvars.F

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


Revision 1.3 - (show annotations) (download)
Mon Oct 8 23:48:28 2007 UTC (16 years, 7 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint60, checkpoint61, checkpoint62, checkpoint59q, checkpoint59p, checkpoint59r, checkpoint59m, checkpoint59l, checkpoint59o, checkpoint59n, checkpoint59i, checkpoint59k, checkpoint59j, checkpoint62c, checkpoint62b, checkpoint62a, checkpoint62f, checkpoint62e, checkpoint62d, checkpoint61f, checkpoint61g, checkpoint61d, checkpoint61e, checkpoint61b, checkpoint61c, checkpoint61a, checkpoint61n, checkpoint61o, checkpoint61l, checkpoint61m, checkpoint61j, checkpoint61k, checkpoint61h, checkpoint61i, checkpoint61v, checkpoint61w, checkpoint61t, checkpoint61u, checkpoint61r, checkpoint61s, checkpoint61p, checkpoint61q, checkpoint61z, checkpoint61x, checkpoint61y
Changes since 1.2: +13 -10 lines
add missing cvs $Header:$ or $Name:$

1 C $Header: $
2 C $Name: $
3
4 #include "ctrparam.h"
5 #include "ATM2D_OPTIONS.h"
6
7 C !INTERFACE:
8 SUBROUTINE GET_OCNVARS( myTime, myIter, myThid )
9 C *==========================================================*
10 C | Gets the ocean data from either the ocean common block, |
11 C | or, in MPI mode, from the passed common block. This data |
12 C | is used by the atmosphere and sea ice models. |
13 C *==========================================================*
14 IMPLICIT NONE
15
16 C === Global Atmosphere Variables ===
17 #include "ATMSIZE.h"
18 #include "SIZE.h"
19 #include "EEPARAMS.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 "PARAMS.h"
29 # include "GRID.h"
30 # include "SURFACE.h"
31 # include "DYNVARS.h"
32 # ifdef ALLOW_DIC
33 # include "DIC_ABIOTIC.h"
34 # endif
35 #endif
36
37 C !INPUT/OUTPUT PARAMETERS:
38 C === Routine arguments ===
39 C myTime - current simulation time (ocean model time)
40 C myIter - iteration number (ocean model)
41 C myThid - Thread no. that called this routine.
42 _RL myTime
43 INTEGER myIter
44 INTEGER myThid
45
46 C LOCAL VARIABLES:
47 INTEGER i,j
48
49
50 #ifdef ATM2D_MPI_ON
51 C presuming ocnsize.h same as size.h
52 DO j=1,sNy
53 DO i=1,sNx
54 sstFromOcn(i,j)= SST_ocn(i,j)
55 sssFromOcn(i,j)= SSS_ocn(i,j)
56 mlDepth(i,j) = OcMxlD_ocn(i,j)
57 IF ( ocnCpl_exchange_DIC ) oFluxCO2(i,j) = fluxCO2_ocn(i,j)
58 C IF ( ocnCpl_exchange_DIC )
59 C & print *,'ofluxCO2:',i,j,fluxCO2_ocn(i,j)
60
61 C Put in seaice common block
62 tOceMxl(i,j,1,1)= SST_ocn(i,j)
63 sOceMxl(i,j,1,1)= SSS_ocn(i,j)
64 hOceMxl(i,j,1,1) = OcMxlD_ocn(i,j)
65 v2ocMxL(i,j,1,1) = vSq_ocn(i,j)
66 ENDDO
67 ENDDO
68
69 #else
70 DO j=1,sNy
71 DO i=1,sNx
72 sstFromOcn(i,j) = theta(i,j,1,1,1)
73 sssFromOcn(i,j) = salt (i,j,1,1,1)
74 ENDDO
75 ENDDO
76
77 # ifdef NONLIN_FRSURF
78 Cjrs ask J-M about next lines
79 IF ( nonlinFreeSurf.GT.0 .AND.
80 & (staggerTimeStep .OR. .NOT.cpl_earlyExpImpCall ) ) THEN
81 IF ( select_rStar.GT.0 ) THEN
82 DO j=1,sNy
83 DO i=1,sNx
84 mlDepth(i,j) =
85 & h0FacC(i,j,1,1,1)*rStarFacC(i,j,1,1)*drF(1)
86 ENDDO
87 ENDDO
88 ELSE
89 DO j=1,sNy
90 DO i=1,sNx
91 mlDepth(i,j) = hFac_surfC(i,j,1,1)*drF(1)
92 ENDDO
93 ENDDO
94 ENDIF
95 ELSE
96 # else /* NONLIN_FRSURF */
97 IF (.TRUE.) THEN
98 # endif /* NONLIN_FRSURF */
99 DO j=1,sNy
100 DO i=1,sNx
101 mlDepth(i,j) = hFacC(i,j,1,1,1)*drF(1)
102 ENDDO
103 ENDDO
104 ENDIF
105
106 DO j=1,sNy
107 DO i=1,sNx
108 v2ocMxL(i,j,1,1) =
109 & ( uVel(i , j,1,1,1)*uVel(i , j,1,1,1)
110 & + uVel(i+1,j,1,1,1)*uVel(i+1,j,1,1,1)
111 & + vVel(i,j+1,1,1,1)*vVel(i,j+1,1,1,1)
112 & + vVel(i,j , 1,1,1)*vVel(i,j , 1,1,1)
113 & )*0.5 _d 0
114 ENDDO
115 ENDDO
116
117 DO j=1,sNy
118 DO i=1,sNx
119
120 # ifdef ALLOW_DIC
121 oFluxCO2(i,j) = fluxCO2(i,j,1,1)
122 # endif
123
124 C Put in seaice common block
125 tOceMxl(i,j,1,1)= sstFromOcn(i,j)
126 sOceMxl(i,j,1,1)= sssFromOcn(i,j)
127 hOceMxl(i,j,1,1) = mlDepth(i,j)
128 ENDDO
129 ENDDO
130
131 #endif
132
133 RETURN
134 END
135

  ViewVC Help
Powered by ViewVC 1.1.22