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

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

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


Revision 1.1 - (show annotations) (download)
Tue Feb 19 19:14:12 2013 UTC (12 years, 5 months ago) by dgoldberg
Branch: MAIN
for smoothing basal stress across floatation condition

1 #include "CPP_OPTIONS.h"
2
3 _RL FUNCTION PHI_GL_STREAMICE (X, W)
4
5 ! This function returns a "smoothed indicator function"
6 ! that is zero when x<0, 1 when x>w/2, and continuously diff.
7
8 _RL X, W
9 _RL TMP1, PI
10
11 IF (X<0.0) THEN
12 PHI_GL_STREAMICE = 0.0
13 ELSEIF(X>W/2.0) THEN
14 PHI_GL_STREAMICE = 1.0
15 ELSE
16 PI = 3.14159265358979323844D0
17 TMP1 = COS (2*PI*X/W)
18 PHI_GL_STREAMICE = 0.5 * (1-TMP1)
19 ENDIF
20
21 RETURN
22 END

  ViewVC Help
Powered by ViewVC 1.1.22