Back to home page

darwin3

 
 

    


File indexing completed on 2024-12-17 18:39:00 UTC

view on githubraw file Latest commit add29e06 on 2018-01-31 20:35:05 UTC
5ca83cd8f7 Dani*0001 #include "CPP_OPTIONS.h"
                0002 
                0003       _RL FUNCTION ETA_GL_STREAMICE_PRIME (X, M1, M2, Y0, W)
                0004 
                0005 !      This function returns the derivative of ETA_GL_STREAMICE
                0006 !      w.r.t. its first argument
                0007 
                0008 
                0009 !     X: input variable
                0010 !     M1: slope of y where x<0
                0011 !     M2: slope of y where x>0
                0012 !     Y0: value of y at 0
                0013 !     W: width of smoothing
                0014 
                0015        _RL X, M1, M2, Y0, W
                0016        _RL TMP1, PI
                0017 
                0018 
08ccc3afe7 Dani*0019        IF (X.le.-0.5*W) THEN
5ca83cd8f7 Dani*0020          ETA_GL_STREAMICE_PRIME = M1
08ccc3afe7 Dani*0021        ELSEIF(X.gt.0.5*W) THEN
5ca83cd8f7 Dani*0022          ETA_GL_STREAMICE_PRIME = M2
                0023        ELSE
                0024          PI = 3.14159265358979323844D0
                0025          TMP1 = SIN (PI*X/W)
                0026          ETA_GL_STREAMICE_PRIME = 
08ccc3afe7 Dani*0027      &     0.5*M1 * (1-TMP1) + 
                0028      &     0.5*M2 * (1+TMP1)
5ca83cd8f7 Dani*0029        ENDIF
                0030 
                0031        RETURN
                0032        END