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

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

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

revision 1.1 by jmc, Fri May 21 19:59:38 2004 UTC revision 1.4 by jmc, Wed Jan 6 00:48:36 2016 UTC
# Line 1  Line 1 
1  C $Header$  C $Header$
2  C $Name$  C $Name$
3    
4  #include "PACKAGES_CONFIG.h"  #include "ATM_CPL_OPTIONS.h"
 #include "CPP_OPTIONS.h"  
5    
6  CBOP  CBOP
7  C     !ROUTINE: ATM_APPLY_IMPORT  C     !ROUTINE: ATM_APPLY_IMPORT
8  C     !INTERFACE:  C     !INTERFACE:
9        SUBROUTINE ATM_APPLY_IMPORT(        SUBROUTINE ATM_APPLY_IMPORT(
10       I               land_frc,       I               land_frc,
11       U               aimTsoce, aimSIfrc,       U               atmSST, atmSIfrc,
12       I               myTime, myIter, bi, bj, myThid )       I               myTime, myIter, bi, bj, myThid )
13    
14  C     !DESCRIPTION: \bv  C     !DESCRIPTION: \bv
15  C     *================================================================*  C     *================================================================*
16  C     | S/R ATM_APPLY_IMPORT  C     | S/R ATM_APPLY_IMPORT
17  C     | o Apply imported coupling data to AIM surface BC over ocean  C     | o Apply imported coupling data to ATM surface BC over ocean
18  C     *================================================================*  C     *================================================================*
19  C     | Note: when using sea-ice, fill in Mixed layer fields instead  C     | Note: when using sea-ice, fill in Mixed layer fields instead
20  C     |      to be used later as Atmos. + Sea-Ice surface oceanic BC.  C     |      to be used later as SST by Atmos. + Sea-Ice
21  C     *================================================================*  C     *================================================================*
22  C     \ev  C     \ev
23    
# Line 41  C-- Coupled to the Ocean : Line 40  C-- Coupled to the Ocean :
40  C     !INPUT/OUTPUT PARAMETERS:  C     !INPUT/OUTPUT PARAMETERS:
41  C     == Routine arguments ==  C     == Routine arguments ==
42  C     land_frc :: land fraction [0-1]  C     land_frc :: land fraction [0-1]
43  C     aimTsoce :: sea surface temp [K], used in AIM  C     atmSST   :: sea surface temp [K], used in ATM component
44  C     aimSIfrc :: sea-ice fraction [0-1]  C     atmSIfrc :: sea-ice fraction [0-1], used in ATM component
45  C     myTime   :: Current time of simulation ( s )  C     myTime   :: Current time of simulation ( s )
46  C     myIter   :: Current iteration number in simulation  C     myIter   :: Current iteration number in simulation
47  C     bi,bj    :: Tile index  C     bi,bj    :: Tile index
48  C     myThid   :: Number of this instance of the routine  C     myThid   :: Number of this instance of the routine
49        _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)
50        _RL  aimTsoce(sNx,sNy)        _RL  atmSST  (sNx,sNy)
51        _RL  aimSIfrc(sNx,sNy)        _RL  atmSIfrc(sNx,sNy)
52        _RL myTime        _RL myTime
53        INTEGER myIter, bi, bj, myThid        INTEGER myIter, bi, bj, myThid
54  CEOP  CEOP
# Line 62  C     i,j    :: Loop counters Line 61  C     i,j    :: Loop counters
61        INTEGER i,j        INTEGER i,j
62    
63  #ifdef ALLOW_THSICE  #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        IF ( useThSIce ) THEN
83  C--   Put fields from the ocean component in Mixed-layer arrays:  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  C-    fill in hOceMxL with Mixed-layer Depth from the ocean component
86        IF ( useImportMxlD ) THEN         IF ( useImportMxlD ) THEN
87          DO j=1,sNy          DO j=1,sNy
88           DO i=1,sNx           DO i=1,sNx
89            IF ( land_frc(i,j,bi,bj) .LT. 1. ) THEN            IF ( land_frc(i,j,bi,bj) .LT. 1. ) THEN
# Line 77  C-    fill in hOceMxL with Mixed-layer D Line 94  C-    fill in hOceMxL with Mixed-layer D
94         ENDIF         ENDIF
95    
96  C-    fill in tOceMxL with Sea-Surface Temp. from the ocean component  C-    fill in tOceMxL with Sea-Surface Temp. from the ocean component
97        IF ( useImportSST ) THEN         IF ( useImportSST ) THEN
98          DO j=1,sNy          DO j=1,sNy
99           DO i=1,sNx           DO i=1,sNx
100            IF ( land_frc(i,j,bi,bj) .LT. 1. ) THEN            IF ( land_frc(i,j,bi,bj) .LT. 1. ) THEN
# Line 88  C-    fill in tOceMxL with Sea-Surface T Line 105  C-    fill in tOceMxL with Sea-Surface T
105         ENDIF         ENDIF
106    
107  C-    fill in sOceMxL with Sea-Surf Salinity from the ocean component  C-    fill in sOceMxL with Sea-Surf Salinity from the ocean component
108        IF ( useImportSSS ) THEN         IF ( useImportSSS ) THEN
109          DO j=1,sNy          DO j=1,sNy
110           DO i=1,sNx           DO i=1,sNx
111            IF ( land_frc(i,j,bi,bj) .LT. 1. ) THEN            IF ( land_frc(i,j,bi,bj) .LT. 1. ) THEN
# Line 99  C-    fill in sOceMxL with Sea-Surf Sali Line 116  C-    fill in sOceMxL with Sea-Surf Sali
116         ENDIF         ENDIF
117    
118  C-    fill in v2ocMxL with surf. velocity^2  from the ocean component  C-    fill in v2ocMxL with surf. velocity^2  from the ocean component
119        IF ( useImportVsq ) THEN         IF ( useImportVsq ) THEN
120          DO j=1,sNy          DO j=1,sNy
121           DO i=1,sNx           DO i=1,sNx
122            IF ( land_frc(i,j,bi,bj) .LT. 1. ) THEN            IF ( land_frc(i,j,bi,bj) .LT. 1. ) THEN
# Line 109  C-    fill in v2ocMxL with surf. velocit Line 126  C-    fill in v2ocMxL with surf. velocit
126          ENDDO          ENDDO
127         ENDIF         ENDIF
128    
129        ELSE        ELSEIF ( useAtm_Phys ) THEN
130  #else  #else /* ALLOW_THSICE */
131        IF (.TRUE.) THEN        IF ( useAtm_Phys ) THEN
132  #endif /* ALLOW_THSICE */  #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         IF ( useImportSST ) THEN
147          DO j=1,sNy          DO j=1,sNy
# Line 120  C-    fill in v2ocMxL with surf. velocit Line 149  C-    fill in v2ocMxL with surf. velocit
149            IF ( land_frc(i,j,bi,bj) .LT. 1. ) THEN            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  C--   take SST from the ocean compon where Sea-Ice fraction is zero
152             IF ( aimSIfrc(i,j).EQ.0. ) THEN             IF ( atmSIfrc(i,j).EQ.0. ) THEN
153              aimTsoce(i,j) = SSTocn(i,j,bi,bj)+celsius2K              atmSST(i,j) = SSTocn(i,j,bi,bj)+celsius2K
154             ELSEIF ( SSTocn(i,j,bi,bj).GE. -1. _d 0)  THEN             ELSEIF ( SSTocn(i,j,bi,bj).GE. -1. _d 0)  THEN
155  C--   take SST from the ocean compon if clearly warmer than freezing  C--   take SST from the ocean compon if clearly warmer than freezing
156  C       then reset sea-ice fraction  C       then reset sea-ice fraction
157              aimTsoce(i,j) = SSTocn(i,j,bi,bj)+celsius2K              atmSST(i,j) = SSTocn(i,j,bi,bj)+celsius2K
158              aimSIfrc(i,j) = 0.              atmSIfrc(i,j) = 0.
159             ENDIF             ENDIF
160    
161            ENDIF            ENDIF

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.4

  ViewVC Help
Powered by ViewVC 1.1.22