/[MITgcm]/MITgcm/model/src/external_forcing.F
ViewVC logotype

Diff of /MITgcm/model/src/external_forcing.F

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

revision 1.53 by gforget, Fri May 30 02:45:43 2008 UTC revision 1.54 by jmc, Sun Aug 24 21:46:19 2008 UTC
# Line 287  C--   Forcing term Line 287  C--   Forcing term
287       &                      myTime, myThid )       &                      myTime, myThid )
288  #endif /* ALLOW_FIZHI */  #endif /* ALLOW_FIZHI */
289    
290    #ifdef ALLOW_ADDFLUID
291          IF ( selectAddFluid.NE.0 .AND. temp_EvPrRn.NE.UNSET_RL ) THEN
292    C-    for now, use same fluid properties as for E-P-R
293           IF ( ( selectAddFluid.GE.1 .AND. nonlinFreeSurf.GT.0 )
294         &      .OR. convertFW2Salt.EQ.-1. _d 0 ) THEN
295             DO j=1,sNy
296              DO i=1,sNx
297                gT(i,j,kLev,bi,bj) = gT(i,j,kLev,bi,bj)
298         &        + addMass(i,j,kLev,bi,bj)*mass2rUnit
299         &          *( temp_EvPrRn - theta(i,j,kLev,bi,bj) )
300         &          *recip_rA(i,j,bi,bj)
301         &          *recip_drF(kLev)*_recip_hFacC(i,j,kLev,bi,bj)
302    C    &          *recip_deepFac2C(kLev)*recip_rhoFacC(kLev)
303              ENDDO
304             ENDDO
305           ELSE
306             DO j=1,sNy
307              DO i=1,sNx
308                gT(i,j,kLev,bi,bj) = gT(i,j,kLev,bi,bj)
309         &        + addMass(i,j,kLev,bi,bj)*mass2rUnit
310         &          *( temp_EvPrRn - tRef(kLev) )
311         &          *recip_rA(i,j,bi,bj)
312         &          *recip_drF(kLev)*_recip_hFacC(i,j,kLev,bi,bj)
313    C    &          *recip_deepFac2C(kLev)*recip_rhoFacC(kLev)
314              ENDDO
315             ENDDO
316           ENDIF
317          ENDIF
318    #endif /* ALLOW_ADDFLUID */
319    
320  C     Add heat in top-layer  C     Add heat in top-layer
321        IF ( kLev .EQ. kSurface ) THEN        IF ( kLev .EQ. kSurface ) THEN
322         DO j=1,sNy         DO j=1,sNy
# Line 298  C     Add heat in top-layer Line 328  C     Add heat in top-layer
328         ENDDO         ENDDO
329        ENDIF        ENDIF
330    
 cph#ifndef ALLOW_AUTODIFF_TAMC  
 cph I didnt put this ifndef here.  
331        IF (linFSConserveTr) THEN        IF (linFSConserveTr) THEN
332         DO j=1,sNy         DO j=1,sNy
333          DO i=1,sNx          DO i=1,sNx
# Line 310  cph I didnt put this ifndef here. Line 338  cph I didnt put this ifndef here.
338          ENDDO          ENDDO
339         ENDDO         ENDDO
340        ENDIF        ENDIF
 cph#endif /* ndfef ALLOW_AUTODIFF_TAMC */  
341    
342  #ifdef ALLOW_SHELFICE  #ifdef ALLOW_SHELFICE
343        IF ( useShelfIce )        IF ( useShelfIce )
# Line 439  C--   Forcing term Line 466  C--   Forcing term
466       &                      myTime, myThid )       &                      myTime, myThid )
467  #endif /* ALLOW_FIZHI */  #endif /* ALLOW_FIZHI */
468    
469    #ifdef ALLOW_ADDFLUID
470          IF ( selectAddFluid.NE.0 .AND. salt_EvPrRn.NE.UNSET_RL ) THEN
471    C-    for now, use same fluid properties as for E-P-R
472           IF ( ( selectAddFluid.GE.1 .AND. nonlinFreeSurf.GT.0 )
473         &      .OR. convertFW2Salt.EQ.-1. _d 0 ) THEN
474             DO j=1,sNy
475              DO i=1,sNx
476                gS(i,j,kLev,bi,bj) = gS(i,j,kLev,bi,bj)
477         &        + addMass(i,j,kLev,bi,bj)*mass2rUnit
478         &          *( salt_EvPrRn - salt(i,j,kLev,bi,bj) )
479         &          *recip_rA(i,j,bi,bj)
480         &          *recip_drF(kLev)*_recip_hFacC(i,j,kLev,bi,bj)
481    C    &          *recip_deepFac2C(kLev)*recip_rhoFacC(kLev)
482              ENDDO
483             ENDDO
484           ELSE
485             DO j=1,sNy
486              DO i=1,sNx
487                gS(i,j,kLev,bi,bj) = gS(i,j,kLev,bi,bj)
488         &        + addMass(i,j,kLev,bi,bj)*mass2rUnit
489         &          *( salt_EvPrRn - sRef(kLev) )
490         &          *recip_rA(i,j,bi,bj)
491         &          *recip_drF(kLev)*_recip_hFacC(i,j,kLev,bi,bj)
492    C    &          *recip_deepFac2C(kLev)*recip_rhoFacC(kLev)
493              ENDDO
494             ENDDO
495           ENDIF
496          ENDIF
497    #endif /* ALLOW_ADDFLUID */
498    
499  C     Add fresh-water in top-layer  C     Add fresh-water in top-layer
500        IF ( kLev .EQ. kSurface ) THEN        IF ( kLev .EQ. kSurface ) THEN
501         DO j=1,sNy         DO j=1,sNy
# Line 450  C     Add fresh-water in top-layer Line 507  C     Add fresh-water in top-layer
507         ENDDO         ENDDO
508        ENDIF        ENDIF
509    
 cph#ifndef ALLOW_AUTODIFF_TAMC  
 cph I didnt put this ifndef here.  
510        IF (linFSConserveTr) THEN        IF (linFSConserveTr) THEN
511         DO j=1,sNy         DO j=1,sNy
512          DO i=1,sNx          DO i=1,sNx
# Line 462  cph I didnt put this ifndef here. Line 517  cph I didnt put this ifndef here.
517          ENDDO          ENDDO
518         ENDDO         ENDDO
519        ENDIF        ENDIF
 cph#endif /* ndfef ALLOW_AUTODIFF_TAMC */  
520    
521  #ifdef ALLOW_SHELFICE  #ifdef ALLOW_SHELFICE
522        IF ( useShelfIce )        IF ( useShelfIce )

Legend:
Removed from v.1.53  
changed lines
  Added in v.1.54

  ViewVC Help
Powered by ViewVC 1.1.22