/[MITgcm]/MITgcm/pkg/thsice/thsice_diffusion.F
ViewVC logotype

Annotation of /MITgcm/pkg/thsice/thsice_diffusion.F

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


Revision 1.1 - (hide annotations) (download)
Wed Apr 4 02:40:42 2007 UTC (17 years, 1 month ago) by jmc
Branch: MAIN
CVS Tags: checkpoint60, checkpoint61, checkpoint62, checkpoint59q, checkpoint59p, checkpoint59r, checkpoint59e, checkpoint59d, checkpoint59g, checkpoint59f, checkpoint59a, checkpoint59c, checkpoint59b, checkpoint59m, checkpoint59l, checkpoint59o, checkpoint59n, checkpoint59i, checkpoint59h, checkpoint59k, checkpoint59j, checkpoint59, checkpoint58y_post, checkpoint61f, checkpoint61g, checkpoint61d, checkpoint61e, checkpoint61b, checkpoint61c, checkpoint61a, checkpoint61n, checkpoint61o, checkpoint61l, checkpoint61m, checkpoint61j, checkpoint61k, checkpoint61h, checkpoint61i, checkpoint61v, checkpoint61w, checkpoint61t, checkpoint61u, checkpoint61r, checkpoint61s, checkpoint61p, checkpoint61q, checkpoint61z, checkpoint61x, checkpoint61y
code to advect pkg/thSIce fields (testing is in progress).

1 jmc 1.1 C $Header: $
2     C $Name: $
3    
4     #include "THSICE_OPTIONS.h"
5    
6     CBOP
7     C !ROUTINE: THSICE_DIFFUSION
8    
9     C !INTERFACE: ==========================================================
10     SUBROUTINE THSICE_DIFFUSION(
11     I maskOc,
12     U uIce, vIce,
13     I bi, bj, myTime, myIter, myThid )
14    
15     C !DESCRIPTION: \bv
16     C *===========================================================*
17     C | SUBROUTINE THSICE_DIFFUSION
18     C | o Account for total (ice+snow) thickness diffusion by
19     C | modifying ice-velocity:
20     C | If no velocity in the first place, and if using 1rst Order
21     C | upwind adv.scheme, this is equivalent to a diffusion of
22     C | ice+snow thichness.
23     C *===========================================================*
24     C \ev
25    
26     C !USES: ===============================================================
27     IMPLICIT NONE
28    
29     C === Global variables ===
30    
31     #include "SIZE.h"
32     #include "EEPARAMS.h"
33     #include "PARAMS.h"
34     #include "GRID.h"
35     #include "THSICE_SIZE.h"
36     #include "THSICE_PARAMS.h"
37     #include "THSICE_VARS.h"
38    
39     C !INPUT PARAMETERS: ===================================================
40     C === Routine arguments ===
41     C maskOc :: ocean surface mask (0=land ; 1=ocean)
42     C uIce/vIce :: current ice velocity on C-grid [m/s]
43     C bi,bj :: Tile indices
44     C myTime :: Current time in simulation (s)
45     C myIter :: Current iteration number
46     C myThid :: My Thread Id number
47     _RS maskOc(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
48     _RL uIce (1-OLx:sNx+OLx,1-OLy:sNy+OLy)
49     _RL vIce (1-OLx:sNx+OLx,1-OLy:sNy+OLy)
50     INTEGER bi,bj
51     _RL myTime
52     INTEGER myIter
53     INTEGER myThid
54     CEndOfInterface
55    
56     #ifdef ALLOW_THSICE
57     C !LOCAL VARIABLES: ====================================================
58     C === Local variables ===
59     C i,j, :: Loop counters
60     C iceFld :: sea-ice + snow mass density
61     C msgBuf :: Informational/error meesage buffer
62     INTEGER i, j
63     CHARACTER*(MAX_LEN_MBUF) msgBuf
64     _RL iceFld(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
65     _RL tmpFld, hIceEpsil
66     LOGICAL dBugFlag
67     c#include "THSICE_DEBUG.h"
68     CEOP
69    
70     C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
71    
72     dBugFlag = debugLevel.GE.debLevB
73     hIceEpsil = 1. _d -10
74    
75     IF ( thSIce_diffK .GT. 0. ) THEN
76     DO j=1-OLy,sNy+OLy
77     DO i=1-OLx,sNx+OLx
78     iceFld(i,j) = ( rhos*snowHeight(i,j,bi,bj)
79     & +rhoi*iceHeight(i,j,bi,bj) )
80     c *iceMask(i,j,bi,bj)
81     ENDDO
82     ENDDO
83    
84     DO j=1-OLy,sNy+OLy
85     DO i=1-OLx+1,sNx+OLx
86     tmpFld = MAX( iceFld(i-1,j),iceFld(i,j) )
87     & * maskOc(i-1,j)*maskOc(i,j)
88     IF ( tmpFld.GT.hIceEpsil )
89     & uIce(i,j) = uIce(i,j)
90     & + thSIce_diffK*( iceFld(i-1,j)-iceFld(i,j) )
91     & *recip_dxC(i,j,bi,bj)/tmpFld
92     ENDDO
93     ENDDO
94    
95     DO j=1-OLy+1,sNy+OLy
96     DO i=1-OLx,sNx+OLx
97     tmpFld = MAX( iceFld(i,j-1),iceFld(i,j) )
98     & *maskOc(i,j-1)*maskOc(i,j)
99     IF ( tmpFld.GT.hIceEpsil )
100     & vIce(i,j) = vIce(i,j)
101     & + thSIce_diffK*( iceFld(i,j-1)-iceFld(i,j) )
102     & *recip_dyC(i,j,bi,bj)/tmpFld
103     ENDDO
104     ENDDO
105    
106     ENDIF
107    
108     #endif /* ALLOW_THSICE */
109    
110     RETURN
111     END

  ViewVC Help
Powered by ViewVC 1.1.22