Back to home page

MITgcm

 
 

    


File indexing completed on 2023-09-21 05:10:46 UTC

view on githubraw file Latest commit 96b00645 on 2023-09-20 15:15:14 UTC
5ca83cd8f7 Dani*0001 #include "CPP_OPTIONS.h"
                0002 
                0003       _RL FUNCTION PHI_GL_STREAMICE (X, W)
                0004 
96b006450c dngo*0005 c      This function returns a "smoothed indicator function"
                0006 c      that is zero when x<0, 1 when x>w, and continuously diff.
5ca83cd8f7 Dani*0007 
96b006450c dngo*0008        _RL X, W
5ca83cd8f7 Dani*0009        _RL TMP1, PI
                0010 
00b5b1a045 Dani*0011        IF (X.le.0.0) THEN
5ca83cd8f7 Dani*0012          PHI_GL_STREAMICE = 0.0
96b006450c dngo*0013        ELSEIF(X.gt.W) THEN
5ca83cd8f7 Dani*0014          PHI_GL_STREAMICE = 1.0
                0015        ELSE
                0016          PI = 3.14159265358979323844D0
96b006450c dngo*0017          TMP1 = COS (PI*X/W)
5ca83cd8f7 Dani*0018          PHI_GL_STREAMICE = 0.5 * (1-TMP1)
                0019        ENDIF
                0020 
                0021        RETURN
96b006450c dngo*0022        END