/[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.3 by jmc, Thu Nov 12 01:01:57 2015 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 66  C     i,j    :: Loop counters Line 65  C     i,j    :: Loop counters
65  C--   Put fields from the ocean component in Mixed-layer arrays:  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  C-    fill in hOceMxL with Mixed-layer Depth from the ocean component
68        IF ( useImportMxlD ) THEN         IF ( useImportMxlD ) THEN
69          DO j=1,sNy          DO j=1,sNy
70           DO i=1,sNx           DO i=1,sNx
71            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 76  C-    fill in hOceMxL with Mixed-layer D
76         ENDIF         ENDIF
77    
78  C-    fill in tOceMxL with Sea-Surface Temp. from the ocean component  C-    fill in tOceMxL with Sea-Surface Temp. from the ocean component
79        IF ( useImportSST ) THEN         IF ( useImportSST ) THEN
80          DO j=1,sNy          DO j=1,sNy
81           DO i=1,sNx           DO i=1,sNx
82            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 87  C-    fill in tOceMxL with Sea-Surface T
87         ENDIF         ENDIF
88    
89  C-    fill in sOceMxL with Sea-Surf Salinity from the ocean component  C-    fill in sOceMxL with Sea-Surf Salinity from the ocean component
90        IF ( useImportSSS ) THEN         IF ( useImportSSS ) THEN
91          DO j=1,sNy          DO j=1,sNy
92           DO i=1,sNx           DO i=1,sNx
93            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 98  C-    fill in sOceMxL with Sea-Surf Sali
98         ENDIF         ENDIF
99    
100  C-    fill in v2ocMxL with surf. velocity^2  from the ocean component  C-    fill in v2ocMxL with surf. velocity^2  from the ocean component
101        IF ( useImportVsq ) THEN         IF ( useImportVsq ) THEN
102          DO j=1,sNy          DO j=1,sNy
103           DO i=1,sNx           DO i=1,sNx
104            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 108  C-    fill in v2ocMxL with surf. velocit
108          ENDDO          ENDDO
109         ENDIF         ENDIF
110    
111        ELSE        ELSEIF ( useAtm_Phys ) THEN
112  #else  #else
113        IF (.TRUE.) THEN        IF ( useAtm_Phys ) THEN
114  #endif /* ALLOW_THSICE */  #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         IF ( useImportSST ) THEN
129          DO j=1,sNy          DO j=1,sNy
# Line 120  C-    fill in v2ocMxL with surf. velocit Line 131  C-    fill in v2ocMxL with surf. velocit
131            IF ( land_frc(i,j,bi,bj) .LT. 1. ) THEN            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  C--   take SST from the ocean compon where Sea-Ice fraction is zero
134             IF ( aimSIfrc(i,j).EQ.0. ) THEN             IF ( atmSIfrc(i,j).EQ.0. ) THEN
135              aimTsoce(i,j) = SSTocn(i,j,bi,bj)+celsius2K              atmSST(i,j) = SSTocn(i,j,bi,bj)+celsius2K
136             ELSEIF ( SSTocn(i,j,bi,bj).GE. -1. _d 0)  THEN             ELSEIF ( SSTocn(i,j,bi,bj).GE. -1. _d 0)  THEN
137  C--   take SST from the ocean compon if clearly warmer than freezing  C--   take SST from the ocean compon if clearly warmer than freezing
138  C       then reset sea-ice fraction  C       then reset sea-ice fraction
139              aimTsoce(i,j) = SSTocn(i,j,bi,bj)+celsius2K              atmSST(i,j) = SSTocn(i,j,bi,bj)+celsius2K
140              aimSIfrc(i,j) = 0.              atmSIfrc(i,j) = 0.
141             ENDIF             ENDIF
142    
143            ENDIF            ENDIF

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

  ViewVC Help
Powered by ViewVC 1.1.22