/[MITgcm]/MITgcm/pkg/atm_compon_interf/atm_apply_import.F
ViewVC logotype

Contents of /MITgcm/pkg/atm_compon_interf/atm_apply_import.F

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


Revision 1.4 - (show annotations) (download)
Wed Jan 6 00:48:36 2016 UTC (8 years, 4 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint66g, checkpoint66f, checkpoint66e, checkpoint66d, checkpoint66c, checkpoint66b, checkpoint66a, checkpoint66o, checkpoint66n, checkpoint66m, checkpoint66l, checkpoint66k, checkpoint66j, checkpoint66i, checkpoint66h, checkpoint65z, checkpoint65x, checkpoint65y, checkpoint65s, checkpoint65v, checkpoint65w, checkpoint65t, checkpoint65u, HEAD
Changes since 1.3: +20 -2 lines
- add 2-way thSIce vars exchange to allow to use seaice dynamics in OCN

1 C $Header: /u/gcmpack/MITgcm/pkg/atm_compon_interf/atm_apply_import.F,v 1.3 2015/11/12 01:01:57 jmc Exp $
2 C $Name: $
3
4 #include "ATM_CPL_OPTIONS.h"
5
6 CBOP
7 C !ROUTINE: ATM_APPLY_IMPORT
8 C !INTERFACE:
9 SUBROUTINE ATM_APPLY_IMPORT(
10 I land_frc,
11 U atmSST, atmSIfrc,
12 I myTime, myIter, bi, bj, myThid )
13
14 C !DESCRIPTION: \bv
15 C *================================================================*
16 C | S/R ATM_APPLY_IMPORT
17 C | o Apply imported coupling data to ATM surface BC over ocean
18 C *================================================================*
19 C | Note: when using sea-ice, fill in Mixed layer fields instead
20 C | to be used later as SST by Atmos. + Sea-Ice
21 C *================================================================*
22 C \ev
23
24 C !USES:
25 IMPLICIT NONE
26
27 C == Global variables ===
28 #include "SIZE.h"
29 #include "EEPARAMS.h"
30 #include "PARAMS.h"
31 #include "CPL_PARAMS.h"
32
33 #ifdef ALLOW_THSICE
34 # include "THSICE_VARS.h"
35 #endif
36
37 C-- Coupled to the Ocean :
38 #include "ATMCPL.h"
39
40 C !INPUT/OUTPUT PARAMETERS:
41 C == Routine arguments ==
42 C land_frc :: land fraction [0-1]
43 C atmSST :: sea surface temp [K], used in ATM component
44 C atmSIfrc :: sea-ice fraction [0-1], used in ATM component
45 C myTime :: Current time of simulation ( s )
46 C myIter :: Current iteration number in simulation
47 C bi,bj :: Tile index
48 C myThid :: Number of this instance of the routine
49 _RS land_frc(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
50 _RL atmSST (sNx,sNy)
51 _RL atmSIfrc(sNx,sNy)
52 _RL myTime
53 INTEGER myIter, bi, bj, myThid
54 CEOP
55
56 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
57
58 #ifdef COMPONENT_MODULE
59 C == Local variables ==
60 C i,j :: Loop counters
61 INTEGER i,j
62
63 #ifdef ALLOW_THSICE
64 IF ( useImportThSIce .AND. useThSIce ) THEN
65 IF ( MOD(myIter,cplSendFrq_iter).EQ.0 ) THEN
66 C-- Put thSIce imported fields from the ocean component in thSIce common block
67 DO j=1,sNy
68 DO i=1,sNx
69 iceMask (i,j,bi,bj) = sIceFrac_cpl (i,j,bi,bj)
70 iceHeight (i,j,bi,bj) = sIceThick_cpl(i,j,bi,bj)
71 snowHeight(i,j,bi,bj) = sIceSnowH_cpl(i,j,bi,bj)
72 Qice1 (i,j,bi,bj) = sIceQ1_cpl (i,j,bi,bj)
73 Qice2 (i,j,bi,bj) = sIceQ2_cpl (i,j,bi,bj)
74 ENDDO
75 ENDDO
76 ENDIF
77 C-- end if useImportThSIce & useThSIce
78 ENDIF
79 #endif /* ALLOW_THSICE */
80
81 #ifdef ALLOW_THSICE
82 IF ( useThSIce ) THEN
83 C-- Put fields from the ocean component in Mixed-layer arrays:
84
85 C- fill in hOceMxL with Mixed-layer Depth from the ocean component
86 IF ( useImportMxlD ) THEN
87 DO j=1,sNy
88 DO i=1,sNx
89 IF ( land_frc(i,j,bi,bj) .LT. 1. ) THEN
90 hOceMxL(i,j,bi,bj) = ocMxlD(i,j,bi,bj)
91 ENDIF
92 ENDDO
93 ENDDO
94 ENDIF
95
96 C- fill in tOceMxL with Sea-Surface Temp. from the ocean component
97 IF ( useImportSST ) THEN
98 DO j=1,sNy
99 DO i=1,sNx
100 IF ( land_frc(i,j,bi,bj) .LT. 1. ) THEN
101 tOceMxL(i,j,bi,bj) = SSTocn(i,j,bi,bj)
102 ENDIF
103 ENDDO
104 ENDDO
105 ENDIF
106
107 C- fill in sOceMxL with Sea-Surf Salinity from the ocean component
108 IF ( useImportSSS ) THEN
109 DO j=1,sNy
110 DO i=1,sNx
111 IF ( land_frc(i,j,bi,bj) .LT. 1. ) THEN
112 sOceMxL(i,j,bi,bj) = SSSocn(i,j,bi,bj)
113 ENDIF
114 ENDDO
115 ENDDO
116 ENDIF
117
118 C- fill in v2ocMxL with surf. velocity^2 from the ocean component
119 IF ( useImportVsq ) THEN
120 DO j=1,sNy
121 DO i=1,sNx
122 IF ( land_frc(i,j,bi,bj) .LT. 1. ) THEN
123 v2ocMxL(i,j,bi,bj) = vSqocn(i,j,bi,bj)
124 ENDIF
125 ENDDO
126 ENDDO
127 ENDIF
128
129 ELSEIF ( useAtm_Phys ) THEN
130 #else /* ALLOW_THSICE */
131 IF ( useAtm_Phys ) THEN
132 #endif /* ALLOW_THSICE */
133 C-- supply imported fields to Atm_Phys pkg:
134
135 IF ( useImportSST ) THEN
136 DO j=1,sNy
137 DO i=1,sNx
138 atmSST(i,j) = SSTocn(i,j,bi,bj)+celsius2K
139 ENDDO
140 ENDDO
141 ENDIF
142
143 ELSE
144 C-- supply imported fields to AIM (Phys) pkg:
145
146 IF ( useImportSST ) THEN
147 DO j=1,sNy
148 DO i=1,sNx
149 IF ( land_frc(i,j,bi,bj) .LT. 1. ) THEN
150
151 C-- take SST from the ocean compon where Sea-Ice fraction is zero
152 IF ( atmSIfrc(i,j).EQ.0. ) THEN
153 atmSST(i,j) = SSTocn(i,j,bi,bj)+celsius2K
154 ELSEIF ( SSTocn(i,j,bi,bj).GE. -1. _d 0) THEN
155 C-- take SST from the ocean compon if clearly warmer than freezing
156 C then reset sea-ice fraction
157 atmSST(i,j) = SSTocn(i,j,bi,bj)+celsius2K
158 atmSIfrc(i,j) = 0.
159 ENDIF
160
161 ENDIF
162 ENDDO
163 ENDDO
164 ENDIF
165
166 C-- if useThSIce / else / endif
167 ENDIF
168
169 #endif /* COMPONENT_MODULE */
170
171 RETURN
172 END

  ViewVC Help
Powered by ViewVC 1.1.22