/[MITgcm]/MITgcm_contrib/dgoldberg/streamice/streamice_upd_ffrac_uncoupled.F
ViewVC logotype

Contents of /MITgcm_contrib/dgoldberg/streamice/streamice_upd_ffrac_uncoupled.F

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


Revision 1.8 - (show annotations) (download)
Wed Aug 27 19:29:14 2014 UTC (10 years, 10 months ago) by dgoldberg
Branch: MAIN
CVS Tags: HEAD
Changes since 1.7: +1 -1 lines
Error occurred while calculating annotation data.
updating contrib streamice repo with latest files, and separated out convergence checks; and parameterised maximum iteration counts and interface w shelfice for coupling

1 C $Header: /u/gcmpack/MITgcm/pkg/streamice/streamice_upd_ffrac_uncoupled.F,v 1.1 2013/06/12 21:30:22 dgoldberg Exp $
2 C $Name: $
3
4
5 C this needs changes
6
7 #include "STREAMICE_OPTIONS.h"
8
9 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
10 CBOP 0
11 SUBROUTINE STREAMICE_UPD_FFRAC_UNCOUPLED ( myThid )
12
13 C !DESCRIPTION:
14 C Initialize STREAMICE variables and constants.
15
16 C !USES:
17 IMPLICIT NONE
18 #include "SIZE.h"
19 #include "EEPARAMS.h"
20 #include "PARAMS.h"
21 #include "STREAMICE.h"
22 #include "GRID.h"
23
24 C !INPUT PARAMETERS:
25 INTEGER myThid
26 CEOP
27
28 #ifdef ALLOW_STREAMICE
29
30 INTEGER bi, bj, i, j
31 _RL OD, rhoi, rhow, delta, r, h, hf, i_r
32 #ifdef STREAMICE_SMOOTH_FLOATATION
33 _RL ETA_GL_STREAMICE
34 external ETA_GL_STREAMICE
35 _RL PHI_GL_STREAMICE
36 external PHI_GL_STREAMICE
37 #endif
38
39 rhoi = streamice_density
40 rhow = streamice_density_ocean_avg
41 r=rhoi/rhow
42 i_r = 1/r
43 delta=1-r
44
45
46 #ifdef STREAMICE_SMOOTH_FLOATATION
47
48 DO bj = myByLo(myThid), myByHi(myThid)
49 DO bi = myBxLo(myThid), myBxHi(myThid)
50 DO j=1-Oly,sNy+Oly
51 DO i=1-Olx,sNx+Olx
52
53 if (STREAMICE_hmask(i,j,bi,bj).eq.1.0 .or.
54 & STREAMICE_hmask(i,j,bi,bj).eq.2.0) THEN
55
56 h = H_streamice(i,j,bi,bj)
57
58 # ifdef USE_ALT_RLOW
59 hf = -1.0 * i_r * R_low_si (i,j,bi,bj)
60 # else
61 hf = -1.0 * i_r * R_low (i,j,bi,bj)
62 # endif
63
64 surf_el_streamice(i,j,bi,bj) =
65 & ETA_GL_STREAMICE (
66 & h-hf,
67 & delta,
68 & 1. _d 0,
69 & delta*hf,
70 & streamice_smooth_gl_width)
71
72 base_el_streamice(i,j,bi,bj) =
73 & surf_el_streamice(i,j,bi,bj) - h
74
75 float_frac_streamice(i,j,bi,bj) =
76 & PHI_GL_STREAMICE (
77 & h-hf,
78 & streamice_smooth_gl_width)
79
80 ENDIF
81
82 ENDDO
83 ENDDO
84 ENDDO
85 ENDDO
86
87 #else
88
89 DO bj = myByLo(myThid), myByHi(myThid)
90 DO bi = myBxLo(myThid), myBxHi(myThid)
91 DO j=1-Oly,sNy+Oly
92 DO i=1-Olx,sNx+Olx
93 # ifdef USE_ALT_RLOW
94 OD = -1.0 * R_low_si (i,j,bi,bj) -
95 & H_streamice(i,j,bi,bj) * rhoi/rhow
96 # else
97 OD = -1.0 * R_low (i,j,bi,bj) -
98 & H_streamice(i,j,bi,bj) * rhoi/rhow
99 # endif
100
101
102 IF (OD .ge. 0. _d 0) THEN
103
104 c ice thickness does not take up whole ocean column -> floating
105 float_frac_streamice(i,j,bi,bj) = 0.0
106 # ifdef USE_ALT_RLOW
107 base_el_streamice(i,j,bi,bj) = R_low_si(i,j,bi,bj)+OD
108 # else
109 base_el_streamice(i,j,bi,bj) = R_low(i,j,bi,bj)+OD
110 # endif
111 surf_el_streamice(i,j,bi,bj) =
112 & (1-rhoi/rhow)*H_streamice(i,j,bi,bj)
113 ELSE
114
115
116 float_frac_streamice(i,j,bi,bj) = 1.0
117 # ifdef USE_ALT_RLOW
118 base_el_streamice(i,j,bi,bj) = R_low_si(i,j,bi,bj)
119 surf_el_streamice(i,j,bi,bj) = R_low_si(i,j,bi,bj)
120 # else
121 base_el_streamice(i,j,bi,bj) = R_low(i,j,bi,bj)
122 surf_el_streamice(i,j,bi,bj) = R_low(i,j,bi,bj)
123 # endif
124 & + H_streamice(i,j,bi,bj)
125 ENDIF
126 ENDDO
127 ENDDO
128 ENDDO
129 ENDDO
130
131 #endif
132
133 _EXCH_XY_RL(float_frac_streamice, myThid )
134 _EXCH_XY_RL(base_el_streamice, myThid )
135 _EXCH_XY_RL(surf_el_streamice, myThid )
136
137
138
139
140 #endif /* ALLOW_STREAMICE */
141
142 RETURN
143 END

  ViewVC Help
Powered by ViewVC 1.1.22