/[MITgcm]/MITgcm/pkg/exf/exf_mapfields.F
ViewVC logotype

Diff of /MITgcm/pkg/exf/exf_mapfields.F

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

revision 1.26 by jmc, Thu Jan 10 22:59:24 2013 UTC revision 1.27 by jmc, Thu Apr 4 16:30:50 2013 UTC
# Line 56  C     == global variables == Line 56  C     == global variables ==
56  #include "PARAMS.h"  #include "PARAMS.h"
57  #include "FFIELDS.h"  #include "FFIELDS.h"
58  #include "GRID.h"  #include "GRID.h"
59    #include "DYNVARS.h"
60    
61  #include "EXF_PARAM.h"  #include "EXF_PARAM.h"
62  #include "EXF_CONSTANTS.h"  #include "EXF_CONSTANTS.h"
# Line 134  C     Salt flux. Line 135  C     Salt flux.
135             ENDDO             ENDDO
136            ENDIF            ENDIF
137    
138    #ifdef ALLOW_ATM_TEMP
139    C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
140              IF ( temp_EvPrRn .NE. UNSET_RL ) THEN
141    C--   Account for energy content of Precip + RunOff & Evap. Assumes:
142    C     1) Rain has same temp as Air
143    C     2) Snow has no heat capacity (consistent with seaice & thsice pkgs)
144    C     3) No distinction between sea-water Cp and fresh-water Cp
145    C     4) Run-Off comes at the temp of surface water (with same Cp)
146    C     5) Evap is released to the Atmos @ surf-temp (=SST); should be using
147    C        the water-vapor heat capacity here and consistently in Bulk-Formulae;
148    C        Could also be put directly into Latent Heat flux.
149               IF ( snowPrecipFile .NE. ' ' ) THEN
150    C--   Melt snow (if provided) into the ocean and account for rain-temp
151                DO j = 1, sNy
152                 DO i = 1, sNx
153                  Qnet(i,j,bi,bj) = Qnet(i,j,bi,bj)
154         &              + flami*snowPrecip(i,j,bi,bj)*rhoConstFresh
155         &              - HeatCapacity_Cp
156         &               *( atemp(i,j,bi,bj) - cen2kel - temp_EvPrRn )
157         &               *( precip(i,j,bi,bj)- snowPrecip(i,j,bi,bj) )
158         &               *rhoConstFresh
159                 ENDDO
160                ENDDO
161               ELSE
162    C--   Make snow (according to Air Temp) and melt it in the ocean
163    C     note: here we just use the same criteria as over seaice but would be
164    C           better to consider a higher altitude air temp, e.g., 850.mb
165                DO j = 1, sNy
166                 DO i = 1, sNx
167                  IF ( atemp(i,j,bi,bj).LT.cen2kel ) THEN
168                   Qnet(i,j,bi,bj) = Qnet(i,j,bi,bj)
169         &              + flami*precip(i,j,bi,bj)*rhoConstFresh
170                  ELSE
171    C--   Account for rain-temp
172                   Qnet(i,j,bi,bj) = Qnet(i,j,bi,bj)
173         &              - HeatCapacity_Cp
174         &               *( atemp(i,j,bi,bj) - cen2kel - temp_EvPrRn )
175         &               *precip(i,j,bi,bj)*rhoConstFresh
176                  ENDIF
177                 ENDDO
178                ENDDO
179               ENDIF
180    #ifdef ALLOW_RUNOFF
181    C--   Account for energy content of RunOff:
182               DO j = 1, sNy
183                DO i = 1, sNx
184                  Qnet(i,j,bi,bj) = Qnet(i,j,bi,bj)
185         &              - HeatCapacity_Cp
186         &               *( theta(i,j,ks,bi,bj) - temp_EvPrRn )
187         &               *runoff(i,j,bi,bj)*rhoConstFresh
188                ENDDO
189               ENDDO
190    #endif
191    C--   Account for energy content of Evap:
192               DO j = 1, sNy
193                DO i = 1, sNx
194                  Qnet(i,j,bi,bj) = Qnet(i,j,bi,bj)
195         &              + HeatCapacity_Cp
196         &               *( theta(i,j,ks,bi,bj) - temp_EvPrRn )
197         &               *evap(i,j,bi,bj)*rhoConstFresh
198                  Qnet(i,j,bi,bj) = Qnet(i,j,bi,bj)*maskC(i,j,ks,bi,bj)
199                ENDDO
200               ENDDO
201              ENDIF
202    C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
203    #endif /* ALLOW_ATM_TEMP */
204    
205  #ifdef ALLOW_AUTODIFF_TAMC  #ifdef ALLOW_AUTODIFF_TAMC
206  CADJ STORE ustress(:,:,bi,bj) = comlev1_bibj, key=ikey, byte=isbyte  CADJ STORE ustress(:,:,bi,bj) = comlev1_bibj, key=ikey, byte=isbyte
207  #endif  #endif

Legend:
Removed from v.1.26  
changed lines
  Added in v.1.27

  ViewVC Help
Powered by ViewVC 1.1.22