/[MITgcm]/MITgcm/pkg/aim_v23/aim_aim2land.F
ViewVC logotype

Diff of /MITgcm/pkg/aim_v23/aim_aim2land.F

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

revision 1.1 by jmc, Thu Jun 12 17:59:05 2003 UTC revision 1.2 by jmc, Thu Mar 11 14:33:19 2004 UTC
# Line 29  C-- size for MITgcm & Physics package : Line 29  C-- size for MITgcm & Physics package :
29  #include "EEPARAMS.h"  #include "EEPARAMS.h"
30  #include "PARAMS.h"  #include "PARAMS.h"
31    
32    C-- Physics package
33    #include "AIM_PARAMS.h"
34  #include "com_physcon.h"  #include "com_physcon.h"
35  #include "com_physvar.h"  #include "com_physvar.h"
36    
# Line 53  CEOP Line 55  CEOP
55  #ifdef ALLOW_AIM  #ifdef ALLOW_AIM
56  #ifdef ALLOW_LAND  #ifdef ALLOW_LAND
57  C     == Local variables ==  C     == Local variables ==
58  C     i,j,k        :: loop counters  C     i,j,k,I2     :: loop counters
59  C     I2,Katm      :: loop counters  C     conv_precip  :: conversion factor for precip: from g/m2/s to kg/m2/s
 C     conv_precip  :: conversion factor for precip: from g.m-2.s-1 to m/s  
60        _RL conv_precip        _RL conv_precip
61        INTEGER i,j,k        INTEGER i,j,k,I2
       INTEGER I2  
62    
63  C--   Physics tendency term  C--   Initialisation :
64          IF ( .NOT.land_impl_grT ) THEN
65           DO j=1,sNy
66            DO i=1,sNx
67             land_Pr_m_Ev(i,j,bi,bj) = 0. _d 0
68            ENDDO
69           ENDDO
70          ENDIF
71    
72    C--   Atmospheric Physics Fluxes
73    
74  c     IF ( useLand ) THEN  c     IF ( useLand ) THEN
75    
76  C      from g/(m^2.s) to m/s :  C      from g/m2/s to kg/m2/s :
77         conv_Precip = 1. _d -3 / rhoConstFresh         conv_Precip = 1. _d -3
78    
79         DO j=1,sNy         DO j=1,sNy
80          DO i=1,sNx          DO i=1,sNx
81           I2 = i+(j-1)*sNx           I2 = i+(j-1)*sNx
82    
 C-    total surface downward heat flux :  
          land_HeatFLx(i,j,bi,bj) =  
      &                         SSR(I2,myThid)  
      &                       - SLR(I2,myThid)  
      &                       - SHF(I2,1,myThid)  
      &                       - EVAP(I2,1,myThid)*ALHC  
   
83  C-    total Precip minus Evap surface flux :  C-    total Precip minus Evap surface flux :
84  C        convert from g.m-2.s-1 to m/s  C        convert from g.m-2.s-1 to kg/m2/s
85           land_Pr_m_Ev(i,j,bi,bj) =           land_Pr_m_Ev(i,j,bi,bj) = land_Pr_m_Ev(i,j,bi,bj)
86       &         conv_precip*(   PRECNV(I2,myThid)       &       + conv_precip*(   PRECNV(I2,myThid)
87       &                       + PRECLS(I2,myThid)       &                       + PRECLS(I2,myThid)
88       &                       - EVAP(I2,1,myThid)       &                       - EVAP(I2,1,myThid)
89       &                     )       &                     )
# Line 89  C        convert from g.m-2.s-1 to m/s Line 91  C        convert from g.m-2.s-1 to m/s
91          ENDDO          ENDDO
92         ENDDO         ENDDO
93    
94          IF ( aim_energPrecip ) THEN
95    C-     Compute energy flux related to Precip. (snow, T_rain)
96    C      Evap of snow: add Latent Heat of freezing
97           DO j=1,sNy
98            DO i=1,sNx
99             I2 = i+(j-1)*sNx
100             land_EnWFlux(i,j,bi,bj) =
101         &      ( PRECNV(I2,myThid)+PRECLS(I2,myThid) )
102         &                            * EnPrec(I2,myThid)
103         &      - EVAP(I2,1,myThid)*MIN(EnPrec(I2,myThid),0. _d 0)
104            ENDDO
105           ENDDO
106          ENDIF
107    
108    
109          IF (land_calc_grT .AND. .NOT.land_impl_grT ) THEN
110           k = 0
111           IF (aim_splitSIOsFx) k = 1
112           DO j=1,sNy
113            DO i=1,sNx
114             I2 = i+(j-1)*sNx
115    
116    C-    total surface downward heat flux :
117             land_HeatFLx(i,j,bi,bj) =
118         &                         SSR(I2,k,myThid)
119         &                       - SLR(I2,k,myThid)
120         &                       - SHF(I2,1,myThid)
121         &                       - EVAP(I2,1,myThid)*ALHC
122            ENDDO
123           ENDDO
124    
125           IF ( aim_energPrecip ) THEN
126    C-     Evap of snow: substract Latent Heat of freezing from heatFlux
127            DO j=1,sNy
128             DO i=1,sNx
129              I2 = i+(j-1)*sNx
130              IF ( EnPrec(I2,myThid) .LT. 0. )
131         &     land_HeatFLx(i,j,bi,bj) = land_HeatFLx(i,j,bi,bj)
132         &                       - EVAP(I2,1,myThid)*ALHF
133             ENDDO
134            ENDDO
135           ENDIF
136    
137    C--   to compute ground temperature explicitely: end
138          ENDIF
139    
140  C- end (if useLand)  C- end (if useLand)
141  c     ENDIF  c     ENDIF
142    

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

  ViewVC Help
Powered by ViewVC 1.1.22