/[MITgcm]/MITgcm/pkg/streamice/phi_gl_streamice.F
ViewVC logotype

Annotation of /MITgcm/pkg/streamice/phi_gl_streamice.F

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


Revision 1.2 - (hide annotations) (download)
Fri Jun 21 19:35:44 2013 UTC (10 years, 11 months ago) by dgoldberg
Branch: MAIN
CVS Tags: checkpoint64y, checkpoint64x, checkpoint64z, checkpoint64o, checkpoint64q, checkpoint64p, checkpoint64s, checkpoint64r, checkpoint64u, checkpoint64t, checkpoint64w, checkpoint64v, checkpoint66g, checkpoint66f, checkpoint66e, checkpoint66d, checkpoint66c, checkpoint66b, checkpoint66a, checkpoint64n, 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, checkpoint64k, checkpoint65, checkpoint64j, checkpoint64m, checkpoint64l, HEAD
Changes since 1.1: +6 -3 lines
fix FP exception

1 dgoldberg 1.2 C $Header: /u/gcmpack/MITgcm/pkg/streamice/eta_gl_streamice.F,v 1.2 2013/06/21 18:38:45 dgoldberg Exp $
2     C $Name: $
3    
4 dgoldberg 1.1 #include "CPP_OPTIONS.h"
5    
6     _RL FUNCTION PHI_GL_STREAMICE (X, W)
7    
8     ! This function returns a "smoothed indicator function"
9     ! that is zero when x<0, 1 when x>w/2, and continuously diff.
10    
11     _RL X, W
12     _RL TMP1, PI
13    
14 dgoldberg 1.2 IF (X.le.0.0) THEN
15 dgoldberg 1.1 PHI_GL_STREAMICE = 0.0
16 dgoldberg 1.2 ELSEIF(X.gt.0.5*W) THEN
17 dgoldberg 1.1 PHI_GL_STREAMICE = 1.0
18     ELSE
19     PI = 3.14159265358979323844D0
20     TMP1 = COS (2*PI*X/W)
21     PHI_GL_STREAMICE = 0.5 * (1-TMP1)
22     ENDIF
23    
24     RETURN
25 dgoldberg 1.2 END

  ViewVC Help
Powered by ViewVC 1.1.22