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

Annotation of /MITgcm_contrib/dgoldberg/streamice/slope_limiter.F

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


Revision 1.4 - (hide annotations) (download)
Wed Aug 27 19:29:12 2014 UTC (10 years, 10 months ago) by dgoldberg
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +4 -1 lines
updating contrib streamice repo with latest files, and separated out convergence checks; and parameterised maximum iteration counts and interface w shelfice for coupling

1 dgoldberg 1.4 C $Header: /u/gcmpack/MITgcm/pkg/streamice/slope_limiter.F,v 1.2 2013/06/21 20:49:50 jmc Exp $
2     C $Name: $
3    
4 heimbach 1.1 #include "CPP_OPTIONS.h"
5    
6 dgoldberg 1.3 ! _RL FUNCTION SLOPE_LIMITER (num, denom)
7    
8     _RL FUNCTION SLOPE_LIMITER (Cr)
9    
10     ! _RL num, denom
11 heimbach 1.1 ! _RL SLOPE_LIMITER
12 dgoldberg 1.3 ! _RL r
13     _RL Cr
14 heimbach 1.1
15     ! used for flux limiting in advective subroutines
16     ! Van Leer limiter (source: Wikipedia!)
17    
18 dgoldberg 1.3 ! if (denom .eq. 0.0) then
19     ! SLOPE_LIMITER = 0.0
20     ! elseif (num*denom .le. 0.0) then
21     ! SLOPE_LIMITER = 0.0
22     ! else
23     ! r = num/denom
24     ! SLOPE_LIMITER = (r+abs(r))/(1+abs(r))
25     ! endif
26    
27     SLOPE_LIMITER = max(0.D0,max(min(1.D0,2.D0*Cr),
28     & min(2.D0,Cr)))
29    
30 heimbach 1.1
31     RETURN
32 dgoldberg 1.4 END

  ViewVC Help
Powered by ViewVC 1.1.22