/[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.1 - (show annotations) (download)
Tue Feb 19 19:13:46 2013 UTC (12 years, 5 months ago) by dgoldberg
Branch: MAIN
for smoothing surface dependence on floatation condition

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 IF (X<-1.0*W/2.0) THEN
19 ETA_GL_STREAMICE_PRIME = M1
20 ELSEIF(X>W/2.0) THEN
21 ETA_GL_STREAMICE_PRIME = M2
22 ELSE
23 PI = 3.14159265358979323844D0
24 TMP1 = SIN (PI*X/W)
25 ETA_GL_STREAMICE_PRIME =
26 & M1/2 * (1+TMP1) +
27 & M2/2 * (1-TMP1)
28 ENDIF
29
30 RETURN
31 END

  ViewVC Help
Powered by ViewVC 1.1.22