/[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.3 - (show annotations) (download)
Thu Nov 12 01:01:57 2015 UTC (8 years, 6 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint65r, checkpoint65q
Changes since 1.2: +2 -3 lines
add ATM_CPL_OPTIONS.h in component pkg and include it in all pkg source files

1 C $Header: /u/gcmpack/MITgcm/pkg/atm_compon_interf/atm_apply_import.F,v 1.2 2013/09/24 19:28:34 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 ( useThSIce ) THEN
65 C-- Put fields from the ocean component in Mixed-layer arrays:
66
67 C- fill in hOceMxL with Mixed-layer Depth from the ocean component
68 IF ( useImportMxlD ) THEN
69 DO j=1,sNy
70 DO i=1,sNx
71 IF ( land_frc(i,j,bi,bj) .LT. 1. ) THEN
72 hOceMxL(i,j,bi,bj) = ocMxlD(i,j,bi,bj)
73 ENDIF
74 ENDDO
75 ENDDO
76 ENDIF
77
78 C- fill in tOceMxL with Sea-Surface Temp. from the ocean component
79 IF ( useImportSST ) THEN
80 DO j=1,sNy
81 DO i=1,sNx
82 IF ( land_frc(i,j,bi,bj) .LT. 1. ) THEN
83 tOceMxL(i,j,bi,bj) = SSTocn(i,j,bi,bj)
84 ENDIF
85 ENDDO
86 ENDDO
87 ENDIF
88
89 C- fill in sOceMxL with Sea-Surf Salinity from the ocean component
90 IF ( useImportSSS ) THEN
91 DO j=1,sNy
92 DO i=1,sNx
93 IF ( land_frc(i,j,bi,bj) .LT. 1. ) THEN
94 sOceMxL(i,j,bi,bj) = SSSocn(i,j,bi,bj)
95 ENDIF
96 ENDDO
97 ENDDO
98 ENDIF
99
100 C- fill in v2ocMxL with surf. velocity^2 from the ocean component
101 IF ( useImportVsq ) THEN
102 DO j=1,sNy
103 DO i=1,sNx
104 IF ( land_frc(i,j,bi,bj) .LT. 1. ) THEN
105 v2ocMxL(i,j,bi,bj) = vSqocn(i,j,bi,bj)
106 ENDIF
107 ENDDO
108 ENDDO
109 ENDIF
110
111 ELSEIF ( useAtm_Phys ) THEN
112 #else
113 IF ( useAtm_Phys ) THEN
114 #endif /* ALLOW_THSICE */
115 C-- supply imported fields to Atm_Phys pkg:
116
117 IF ( useImportSST ) THEN
118 DO j=1,sNy
119 DO i=1,sNx
120 atmSST(i,j) = SSTocn(i,j,bi,bj)+celsius2K
121 ENDDO
122 ENDDO
123 ENDIF
124
125 ELSE
126 C-- supply imported fields to AIM (Phys) pkg:
127
128 IF ( useImportSST ) THEN
129 DO j=1,sNy
130 DO i=1,sNx
131 IF ( land_frc(i,j,bi,bj) .LT. 1. ) THEN
132
133 C-- take SST from the ocean compon where Sea-Ice fraction is zero
134 IF ( atmSIfrc(i,j).EQ.0. ) THEN
135 atmSST(i,j) = SSTocn(i,j,bi,bj)+celsius2K
136 ELSEIF ( SSTocn(i,j,bi,bj).GE. -1. _d 0) THEN
137 C-- take SST from the ocean compon if clearly warmer than freezing
138 C then reset sea-ice fraction
139 atmSST(i,j) = SSTocn(i,j,bi,bj)+celsius2K
140 atmSIfrc(i,j) = 0.
141 ENDIF
142
143 ENDIF
144 ENDDO
145 ENDDO
146 ENDIF
147
148 C-- if useThSIce / else / endif
149 ENDIF
150
151 #endif /* COMPONENT_MODULE */
152
153 RETURN
154 END

  ViewVC Help
Powered by ViewVC 1.1.22