7 |
CBOP |
CBOP |
8 |
C !ROUTINE: ATM_APPLY_IMPORT |
C !ROUTINE: ATM_APPLY_IMPORT |
9 |
C !INTERFACE: |
C !INTERFACE: |
10 |
SUBROUTINE ATM_APPLY_IMPORT( |
SUBROUTINE ATM_APPLY_IMPORT( |
11 |
I land_frc, |
I land_frc, |
12 |
U aimTsoce, aimSIfrc, |
U atmSST, atmSIfrc, |
13 |
I myTime, myIter, bi, bj, myThid ) |
I myTime, myIter, bi, bj, myThid ) |
14 |
|
|
15 |
C !DESCRIPTION: \bv |
C !DESCRIPTION: \bv |
16 |
C *================================================================* |
C *================================================================* |
17 |
C | S/R ATM_APPLY_IMPORT |
C | S/R ATM_APPLY_IMPORT |
18 |
C | o Apply imported coupling data to AIM surface BC over ocean |
C | o Apply imported coupling data to ATM surface BC over ocean |
19 |
C *================================================================* |
C *================================================================* |
20 |
C | Note: when using sea-ice, fill in Mixed layer fields instead |
C | Note: when using sea-ice, fill in Mixed layer fields instead |
21 |
C | to be used later as Atmos. + Sea-Ice surface oceanic BC. |
C | to be used later as SST by Atmos. + Sea-Ice |
22 |
C *================================================================* |
C *================================================================* |
23 |
C \ev |
C \ev |
24 |
|
|
41 |
C !INPUT/OUTPUT PARAMETERS: |
C !INPUT/OUTPUT PARAMETERS: |
42 |
C == Routine arguments == |
C == Routine arguments == |
43 |
C land_frc :: land fraction [0-1] |
C land_frc :: land fraction [0-1] |
44 |
C aimTsoce :: sea surface temp [K], used in AIM |
C atmSST :: sea surface temp [K], used in ATM component |
45 |
C aimSIfrc :: sea-ice fraction [0-1] |
C atmSIfrc :: sea-ice fraction [0-1], used in ATM component |
46 |
C myTime :: Current time of simulation ( s ) |
C myTime :: Current time of simulation ( s ) |
47 |
C myIter :: Current iteration number in simulation |
C myIter :: Current iteration number in simulation |
48 |
C bi,bj :: Tile index |
C bi,bj :: Tile index |
49 |
C myThid :: Number of this instance of the routine |
C myThid :: Number of this instance of the routine |
50 |
_RS land_frc(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
_RS land_frc(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
51 |
_RL aimTsoce(sNx,sNy) |
_RL atmSST (sNx,sNy) |
52 |
_RL aimSIfrc(sNx,sNy) |
_RL atmSIfrc(sNx,sNy) |
53 |
_RL myTime |
_RL myTime |
54 |
INTEGER myIter, bi, bj, myThid |
INTEGER myIter, bi, bj, myThid |
55 |
CEOP |
CEOP |
66 |
C-- Put fields from the ocean component in Mixed-layer arrays: |
C-- Put fields from the ocean component in Mixed-layer arrays: |
67 |
|
|
68 |
C- fill in hOceMxL with Mixed-layer Depth from the ocean component |
C- fill in hOceMxL with Mixed-layer Depth from the ocean component |
69 |
IF ( useImportMxlD ) THEN |
IF ( useImportMxlD ) THEN |
70 |
DO j=1,sNy |
DO j=1,sNy |
71 |
DO i=1,sNx |
DO i=1,sNx |
72 |
IF ( land_frc(i,j,bi,bj) .LT. 1. ) THEN |
IF ( land_frc(i,j,bi,bj) .LT. 1. ) THEN |
77 |
ENDIF |
ENDIF |
78 |
|
|
79 |
C- fill in tOceMxL with Sea-Surface Temp. from the ocean component |
C- fill in tOceMxL with Sea-Surface Temp. from the ocean component |
80 |
IF ( useImportSST ) THEN |
IF ( useImportSST ) THEN |
81 |
DO j=1,sNy |
DO j=1,sNy |
82 |
DO i=1,sNx |
DO i=1,sNx |
83 |
IF ( land_frc(i,j,bi,bj) .LT. 1. ) THEN |
IF ( land_frc(i,j,bi,bj) .LT. 1. ) THEN |
88 |
ENDIF |
ENDIF |
89 |
|
|
90 |
C- fill in sOceMxL with Sea-Surf Salinity from the ocean component |
C- fill in sOceMxL with Sea-Surf Salinity from the ocean component |
91 |
IF ( useImportSSS ) THEN |
IF ( useImportSSS ) THEN |
92 |
DO j=1,sNy |
DO j=1,sNy |
93 |
DO i=1,sNx |
DO i=1,sNx |
94 |
IF ( land_frc(i,j,bi,bj) .LT. 1. ) THEN |
IF ( land_frc(i,j,bi,bj) .LT. 1. ) THEN |
99 |
ENDIF |
ENDIF |
100 |
|
|
101 |
C- fill in v2ocMxL with surf. velocity^2 from the ocean component |
C- fill in v2ocMxL with surf. velocity^2 from the ocean component |
102 |
IF ( useImportVsq ) THEN |
IF ( useImportVsq ) THEN |
103 |
DO j=1,sNy |
DO j=1,sNy |
104 |
DO i=1,sNx |
DO i=1,sNx |
105 |
IF ( land_frc(i,j,bi,bj) .LT. 1. ) THEN |
IF ( land_frc(i,j,bi,bj) .LT. 1. ) THEN |
109 |
ENDDO |
ENDDO |
110 |
ENDIF |
ENDIF |
111 |
|
|
112 |
ELSE |
ELSEIF ( useAtm_Phys ) THEN |
113 |
#else |
#else |
114 |
IF (.TRUE.) THEN |
IF ( useAtm_Phys ) THEN |
115 |
#endif /* ALLOW_THSICE */ |
#endif /* ALLOW_THSICE */ |
116 |
|
C-- supply imported fields to Atm_Phys pkg: |
117 |
|
|
118 |
|
IF ( useImportSST ) THEN |
119 |
|
DO j=1,sNy |
120 |
|
DO i=1,sNx |
121 |
|
atmSST(i,j) = SSTocn(i,j,bi,bj)+celsius2K |
122 |
|
ENDDO |
123 |
|
ENDDO |
124 |
|
ENDIF |
125 |
|
|
126 |
|
ELSE |
127 |
|
C-- supply imported fields to AIM (Phys) pkg: |
128 |
|
|
129 |
IF ( useImportSST ) THEN |
IF ( useImportSST ) THEN |
130 |
DO j=1,sNy |
DO j=1,sNy |
132 |
IF ( land_frc(i,j,bi,bj) .LT. 1. ) THEN |
IF ( land_frc(i,j,bi,bj) .LT. 1. ) THEN |
133 |
|
|
134 |
C-- take SST from the ocean compon where Sea-Ice fraction is zero |
C-- take SST from the ocean compon where Sea-Ice fraction is zero |
135 |
IF ( aimSIfrc(i,j).EQ.0. ) THEN |
IF ( atmSIfrc(i,j).EQ.0. ) THEN |
136 |
aimTsoce(i,j) = SSTocn(i,j,bi,bj)+celsius2K |
atmSST(i,j) = SSTocn(i,j,bi,bj)+celsius2K |
137 |
ELSEIF ( SSTocn(i,j,bi,bj).GE. -1. _d 0) THEN |
ELSEIF ( SSTocn(i,j,bi,bj).GE. -1. _d 0) THEN |
138 |
C-- take SST from the ocean compon if clearly warmer than freezing |
C-- take SST from the ocean compon if clearly warmer than freezing |
139 |
C then reset sea-ice fraction |
C then reset sea-ice fraction |
140 |
aimTsoce(i,j) = SSTocn(i,j,bi,bj)+celsius2K |
atmSST(i,j) = SSTocn(i,j,bi,bj)+celsius2K |
141 |
aimSIfrc(i,j) = 0. |
atmSIfrc(i,j) = 0. |
142 |
ENDIF |
ENDIF |
143 |
|
|
144 |
ENDIF |
ENDIF |