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

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

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


Revision 1.2 - (show annotations) (download)
Thu Mar 7 15:10:00 2013 UTC (12 years, 4 months ago) by dgoldberg
Branch: MAIN
Changes since 1.1: +4 -3 lines
bug fix

1 #include "CPP_OPTIONS.h"
2
3 _RL FUNCTION ETA_GL_STREAMICE_PRIME (X, M1, M2, Y0, W)
4
5 ! This function returns the derivative of ETA_GL_STREAMICE
6 ! w.r.t. its first argument
7
8
9 ! X: input variable
10 ! M1: slope of y where x<0
11 ! M2: slope of y where x>0
12 ! Y0: value of y at 0
13 ! W: width of smoothing
14
15 _RL X, M1, M2, Y0, W
16 _RL TMP1, PI
17
18
19 IF (X<-1.0*W/2.0) THEN
20 ETA_GL_STREAMICE_PRIME = M1
21 ELSEIF(X>W/2.0) THEN
22 ETA_GL_STREAMICE_PRIME = M2
23 ELSE
24 PI = 3.14159265358979323844D0
25 TMP1 = SIN (PI*X/W)
26 ETA_GL_STREAMICE_PRIME =
27 & M1/2 * (1-TMP1) +
28 & M2/2 * (1+TMP1)
29 ENDIF
30
31 RETURN
32 END

  ViewVC Help
Powered by ViewVC 1.1.22