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

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

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


Revision 1.3 - (show annotations) (download)
Tue Jun 7 22:26:37 2011 UTC (12 years, 11 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint64y, checkpoint64x, checkpoint64z, checkpoint64q, checkpoint64p, checkpoint64s, checkpoint64r, checkpoint64u, checkpoint64t, checkpoint64w, checkpoint64v, checkpoint64i, checkpoint64h, checkpoint64k, checkpoint64j, checkpoint64m, checkpoint64l, checkpoint64o, checkpoint64n, checkpoint64a, checkpoint64c, checkpoint64b, checkpoint64e, checkpoint64d, checkpoint64g, checkpoint64f, checkpoint63p, checkpoint63q, checkpoint63r, checkpoint63s, checkpoint63l, checkpoint63m, checkpoint63n, checkpoint63o, checkpoint63h, checkpoint63i, checkpoint63j, checkpoint63k, checkpoint63d, checkpoint63e, checkpoint63f, checkpoint63g, checkpoint63a, checkpoint63b, checkpoint63c, checkpoint64, checkpoint65, checkpoint63, checkpoint66g, checkpoint66f, checkpoint66e, checkpoint66d, checkpoint66c, checkpoint66b, checkpoint66a, checkpoint66o, checkpoint66n, checkpoint66m, checkpoint66l, checkpoint66k, checkpoint66j, checkpoint66i, checkpoint66h, checkpoint65z, checkpoint65x, checkpoint65y, checkpoint65r, checkpoint65s, checkpoint65p, checkpoint65q, checkpoint65v, checkpoint65w, checkpoint65t, checkpoint65u, checkpoint65j, checkpoint65k, checkpoint65h, checkpoint65i, checkpoint65n, checkpoint65o, checkpoint65l, checkpoint65m, checkpoint65b, checkpoint65c, checkpoint65a, checkpoint65f, checkpoint65g, checkpoint65d, checkpoint65e, checkpoint62z, HEAD
Changes since 1.2: +2 -2 lines
refine debugLevel criteria when printing messages

1 C $Header: /u/gcmpack/MITgcm/pkg/thsice/thsice_diffusion.F,v 1.2 2010/01/03 21:09:28 jmc Exp $
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
55 #ifdef ALLOW_THSICE
56 C !LOCAL VARIABLES: ====================================================
57 C === Local variables ===
58 C i,j, :: Loop counters
59 C iceFld :: sea-ice + snow mass density
60 C msgBuf :: Informational/error message buffer
61 INTEGER i, j
62 c CHARACTER*(MAX_LEN_MBUF) msgBuf
63 _RL iceFld(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
64 _RL tmpFld, hIceEpsil
65 LOGICAL dBugFlag
66 c#include "THSICE_DEBUG.h"
67 CEOP
68
69 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
70
71 dBugFlag = debugLevel.GE.debLevC
72 hIceEpsil = 1. _d -10
73
74 IF ( thSIce_diffK .GT. 0. ) THEN
75 DO j=1-OLy,sNy+OLy
76 DO i=1-OLx,sNx+OLx
77 iceFld(i,j) = ( rhos*snowHeight(i,j,bi,bj)
78 & +rhoi*iceHeight(i,j,bi,bj) )
79 c *iceMask(i,j,bi,bj)
80 ENDDO
81 ENDDO
82
83 DO j=1-OLy,sNy+OLy
84 DO i=1-OLx+1,sNx+OLx
85 tmpFld = MAX( iceFld(i-1,j),iceFld(i,j) )
86 & * maskOc(i-1,j)*maskOc(i,j)
87 IF ( tmpFld.GT.hIceEpsil )
88 & uIce(i,j) = uIce(i,j)
89 & + thSIce_diffK*( iceFld(i-1,j)-iceFld(i,j) )
90 & *recip_dxC(i,j,bi,bj)/tmpFld
91 ENDDO
92 ENDDO
93
94 DO j=1-OLy+1,sNy+OLy
95 DO i=1-OLx,sNx+OLx
96 tmpFld = MAX( iceFld(i,j-1),iceFld(i,j) )
97 & *maskOc(i,j-1)*maskOc(i,j)
98 IF ( tmpFld.GT.hIceEpsil )
99 & vIce(i,j) = vIce(i,j)
100 & + thSIce_diffK*( iceFld(i,j-1)-iceFld(i,j) )
101 & *recip_dyC(i,j,bi,bj)/tmpFld
102 ENDDO
103 ENDDO
104
105 ENDIF
106
107 #endif /* ALLOW_THSICE */
108
109 RETURN
110 END

  ViewVC Help
Powered by ViewVC 1.1.22