| 1 | 
C $Header: /u/gcmpack/MITgcm/pkg/shelfice/shelfice_u_drag.F,v 1.10 2013/03/29 19:32:51 heimbach Exp $ | 
| 2 | 
C $Name:  $ | 
| 3 | 
 | 
| 4 | 
#include "SHELFICE_OPTIONS.h" | 
| 5 | 
 | 
| 6 | 
CBOP | 
| 7 | 
C !ROUTINE: SHELFICE_U_DRAG | 
| 8 | 
 | 
| 9 | 
C !INTERFACE: ========================================================== | 
| 10 | 
      SUBROUTINE SHELFICE_STEP_ICEMASS( | 
| 11 | 
     I                        myTime, myIter, myThid ) | 
| 12 | 
 | 
| 13 | 
!        myTime, myIter, myThid | 
| 14 | 
      | 
| 15 | 
C !DESCRIPTION: | 
| 16 | 
C Serves as a "stub" for ice dynamics | 
| 17 | 
C will later be used to  | 
| 18 | 
 | 
| 19 | 
C !USES: =============================================================== | 
| 20 | 
      IMPLICIT NONE | 
| 21 | 
#include "SIZE.h" | 
| 22 | 
#include "EEPARAMS.h" | 
| 23 | 
#include "PARAMS.h" | 
| 24 | 
#include "GRID.h" | 
| 25 | 
#include "SHELFICE.h" | 
| 26 | 
!#include "STREAMICE.h" | 
| 27 | 
 | 
| 28 | 
C     !INPUT/OUTPUT PARAMETERS: | 
| 29 | 
C     === Routine arguments === | 
| 30 | 
C     myIter :: iteration counter for this thread | 
| 31 | 
C     myTime :: time counter for this thread | 
| 32 | 
C     myThid :: thread number for this instance of the routine. | 
| 33 | 
      _RL  myTime | 
| 34 | 
      INTEGER myIter | 
| 35 | 
      INTEGER myThid | 
| 36 | 
CEOP | 
| 37 | 
       | 
| 38 | 
       | 
| 39 | 
 | 
| 40 | 
#ifdef ALLOW_SHELFICE | 
| 41 | 
C !LOCAL VARIABLES : ==================================================== | 
| 42 | 
C  i,j                  :: loop indices | 
| 43 | 
      INTEGER bi,bj,k,i,j | 
| 44 | 
 | 
| 45 | 
      print *, "STEP MASS 1", shelficemass(25,25,1,1) | 
| 46 | 
 | 
| 47 | 
      IF (SHELFICEallowThinIceMass) then | 
| 48 | 
       DO bj = myByLo(myThid), myByHi(myThid) | 
| 49 | 
        DO bi = myBxLo(myThid), myBxHi(myThid) | 
| 50 | 
         DO j=1,sNy | 
| 51 | 
          DO i=1,sNx | 
| 52 | 
 | 
| 53 | 
           shelficeMass(i,j,bi,bj) = shelficeMass(i,j,bi,bj) + | 
| 54 | 
     &      shelfIceFreshWaterFlux(I,J,bi,bj) * deltaT | 
| 55 | 
 | 
| 56 | 
           shelficeMass(i,j,bi,bj) = shelficeMass(i,j,bi,bj) + | 
| 57 | 
     &      shelficeMassDynamics(I,J,bi,bj) * 910. * deltaT | 
| 58 | 
!          FOR NOW THE DENSITY OF ICE IS HARDCODED | 
| 59 | 
!          SHOULD USE PARAM FOR ICE DENSITY FROM STREAMICE | 
| 60 | 
!          -- but this is just a placeholder for streamice anyway           | 
| 61 | 
 | 
| 62 | 
          ENDDO | 
| 63 | 
         ENDDO | 
| 64 | 
        ENDDO | 
| 65 | 
       ENDDO | 
| 66 | 
      ENDIF | 
| 67 | 
      | 
| 68 | 
      _EXCH_XY_RS(shelficeMass, myThid )       | 
| 69 | 
 | 
| 70 | 
      print *, "STEP MASS 2",shelficemass(25,25,1,1) | 
| 71 | 
 | 
| 72 | 
#ifdef ALLOW_DIAGNOSTICS | 
| 73 | 
      IF (useDiagnostics) THEN | 
| 74 | 
        CALL DIAGNOSTICS_FILL(shelficemass,'SHI_mass',0,1,0,1,1, | 
| 75 | 
     &      myThid) | 
| 76 | 
      ENDIF | 
| 77 | 
#endif /* ALLOW_DIAGNOSTICS */ | 
| 78 | 
#endif /* ALLOW_SHELFICE */ | 
| 79 | 
 | 
| 80 | 
      RETURN | 
| 81 | 
      END |