1 |
C $Header: /u/gcmpack/MITgcm/pkg/bling/tracer_min_val.F,v 1.1 2016/05/19 20:29:27 mmazloff Exp $ |
2 |
C $Name: $ |
3 |
|
4 |
#include "BLING_OPTIONS.h" |
5 |
|
6 |
CBOP |
7 |
subroutine BLING_MIN_VAL( |
8 |
I PTR, min_val, bi, bj ) |
9 |
|
10 |
C ================================================================= |
11 |
C | subroutine bling_min_val |
12 |
C | o replaces tracer values that are too small or negative |
13 |
C | (in a separate routine so can be hidden from adjoint) |
14 |
C ================================================================= |
15 |
|
16 |
implicit none |
17 |
|
18 |
C === Global variables === |
19 |
#include "SIZE.h" |
20 |
#include "GRID.h" |
21 |
|
22 |
C === Routine arguments === |
23 |
INTEGER bi, bj |
24 |
C === Input === |
25 |
_RL PTR(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
26 |
_RL min_val |
27 |
CEOP |
28 |
|
29 |
C == Local variables == |
30 |
INTEGER i,j,k |
31 |
|
32 |
DO k=1,Nr |
33 |
DO i=1,sNx |
34 |
DO j=1,sNy |
35 |
PTR(i,j,k) = max( min_val*maskC(i,j,k,bi,bj), PTR(i,j,k) ) |
36 |
ENDDO |
37 |
ENDDO |
38 |
ENDDO |
39 |
|
40 |
RETURN |
41 |
END |