/[MITgcm]/MITgcm_contrib/shelfice_remeshing/CLEAN/code/shelfice_thermodynamics.F
ViewVC logotype

Diff of /MITgcm_contrib/shelfice_remeshing/CLEAN/code/shelfice_thermodynamics.F

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

revision 1.2 by dgoldberg, Mon Dec 7 22:05:50 2015 UTC revision 1.3 by dgoldberg, Mon Jan 18 10:36:41 2016 UTC
# Line 103  C     drKp1, recip_drLoc Line 103  C     drKp1, recip_drLoc
103        _RL drKp1, drKp2, recip_drLoc        _RL drKp1, drKp2, recip_drLoc
104        _RL recip_latentHeat        _RL recip_latentHeat
105        _RL tmpFac        _RL tmpFac
106        _RL SHICEHAF        _RL massMin, mass, mass_eff, DELZ
107        _RL SHC,SHW,SHA        _RL SHA,FACTOR1,FACTOR2,FACTOR3
108          _RL GMSL,ETACOUNT
109  #ifdef SHI_ALLOW_GAMMAFRICT  #ifdef SHI_ALLOW_GAMMAFRICT
110        _RL shiPr, shiSc, shiLo, recip_shiKarman, shiTwoThirds        _RL shiPr, shiSc, shiLo, recip_shiKarman, shiTwoThirds
111        _RL gammaTmoleT, gammaTmoleS, gammaTurb, gammaTurbConst        _RL gammaTmoleT, gammaTmoleS, gammaTurb, gammaTurbConst
# Line 729  C     endif (not) useISOMIPTD Line 730  C     endif (not) useISOMIPTD
730    
731  C--  Calculate new loading anomaly (in case the ice-shelf mass was updated)  C--  Calculate new loading anomaly (in case the ice-shelf mass was updated)
732  #ifndef ALLOW_AUTODIFF  #ifndef ALLOW_AUTODIFF
733  c     IF ( SHELFICEloadAnomalyFile .EQ. ' ' ) THEN  
734    c       DO bj = myByLo(myThid), myByHi(myThid)
735    c        DO bi = myBxLo(myThid), myBxHi(myThid)
736    c         DO j = 1-OLy, sNy+OLy
737    c          DO i = 1-OLx, sNx+OLx
738    c           IF (R_shelfice(i,j,bi,bj) .LT. 0) THEN  
739    c             ETACOUNT=ETACOUNT+1
740    c             GMSL=GMSL+etaN(i,j,bi,bj)
741    c           ENDIF
742    c          ENDDO
743    c         ENDDO
744    c        ENDDO
745    c       ENDDO
746    c           GMSL=GMSL/ETACOUNT
747    c
748    c       DO bj = myByLo(myThid), myByHi(myThid)
749    c        DO bi = myBxLo(myThid), myBxHi(myThid)
750    c         DO j = 1-OLy, sNy+OLy
751    c          DO i = 1-OLx, sNx+OLx
752    c         IF (shelficeMass(i,j,bi,bj).GT. 1030*(990+GMSL)) THEN
753    c             shelficeMass(i,j,bi,bj) = 1030*(990+GMSL)
754    c         ENDIF
755    c
756    c           shelficeLoadAnomaly(i,j,bi,bj) = gravity
757    c     &      *( shelficeMass(i,j,bi,bj) + rhoConst*Ro_surf(i,j,bi,bj) )
758    c
759    c          ENDDO
760    c         ENDDO
761    c        ENDDO
762    c       ENDDO
763    c      ENDIF
764    
765    
766         DO bj = myByLo(myThid), myByHi(myThid)         DO bj = myByLo(myThid), myByHi(myThid)
767          DO bi = myBxLo(myThid), myBxHi(myThid)          DO bi = myBxLo(myThid), myBxHi(myThid)
768           DO j = 1-OLy, sNy+OLy           DO j = 1-OLy, sNy+OLy
769            DO i = 1-OLx, sNx+OLx            DO i = 1-OLx, sNx+OLx
770  c           shelficeLoadAnomaly(i,j,bi,bj) = gravity             shelficeLoadAnomaly(i,j,bi,bj) = gravity
771  c     &      *( shelficeMass(i,j,bi,bj) + rhoConst*Ro_surf(i,j,bi,bj) )       &      *( shelficeMass(i,j,bi,bj) + rhoConst*Ro_surf(i,j,bi,bj) )
772  #ifdef ALLOW_STREAMICE  #ifdef ALLOW_STREAMICE
 c       IF ( R_shelfice(i,j,bi,bj) .EQ. R_grounding(i,j,bi,bj)  ) THEN  
       
           
          SHICEHAF=(H_streamice(i,j,bi,bj)+R_low(i,j,bi,bj))  
      &         *(streamice_density_ocean_avg/streamice_density)  
     
        SHC=0.1  
        SHW=5  
        SHA=SHC/SQRT(1+(shelficeLoadAnomaly(i,j,bi,bj)*  
      &        shelficeLoadAnomaly(i,j,bi,bj)))  
773    
774            shelficeLoadAnomaly(i,j,bi,bj)=((1-SHA)/2)*tanh(SHW/2+8*            delZ = drF(kLowC(i,j,bi,bj))
775       &      SHICEHAF/SHW)+((1+SHA)/2)            massMin = -1*streamice_density_ocean_avg
776         &         *(R_low(i,j,bi,bj)+hfacMin*delZ)
777              mass = shelficemass(i,j,bi,bj)
778    
779              SHA=massMin/
780         &        SQRT(.01+mass**2)
781    
782              FACTOR1 = (1-sha)/2.
783              FACTOR2 = (1+sha)/2.
784              FACTOR3 = tanh((massMin - mass)*4./delZ)
785    
786              mass_eff=
787         &       (FACTOR1*FACTOR3 + FACTOR2)*mass
788    
789             shelficeLoadAnomaly(i,j,bi,bj) = gravity
790         &      *( mass_eff + rhoConst*Ro_surf(i,j,bi,bj) )
791    
792    
793    
 c            ENDIF  
794  #endif /* ALLOW_STREAMICE */  #endif /* ALLOW_STREAMICE */
795    
796            ENDDO            ENDDO
797           ENDDO           ENDDO
798          ENDDO          ENDDO
799         ENDDO         ENDDO
800  c     ENDIF  
801    
802  #endif /* ndef ALLOW_AUTODIFF */  #endif /* ndef ALLOW_AUTODIFF */
803    
804  #ifdef ALLOW_DIAGNOSTICS  #ifdef ALLOW_DIAGNOSTICS

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

  ViewVC Help
Powered by ViewVC 1.1.22