/[MITgcm]/MITgcm/pkg/streamice/streamice_get_fp_err_oad.F
ViewVC logotype

Contents of /MITgcm/pkg/streamice/streamice_get_fp_err_oad.F

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


Revision 1.3 - (show annotations) (download)
Fri Mar 18 19:18:29 2016 UTC (8 years, 1 month ago) by dgoldberg
Branch: MAIN
CVS Tags: checkpoint66g, checkpoint66f, checkpoint66e, checkpoint66d, checkpoint66c, checkpoint66b, checkpoint66a, checkpoint66o, checkpoint66n, checkpoint66m, checkpoint66l, checkpoint66k, checkpoint66j, checkpoint66i, checkpoint66h, checkpoint65z, checkpoint65x, checkpoint65y, checkpoint65v, checkpoint65w, HEAD
Changes since 1.2: +13 -1 lines
allow for differing error norms in nonlinear iteration

1 C $Header: /u/gcmpack/MITgcm/pkg/streamice/streamice_get_fp_err_oad.F,v 1.2 2015/03/25 17:36:42 dgoldberg Exp $
2 C $Name: $
3
4 #include "STREAMICE_OPTIONS.h"
5
6 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
7
8 CBOP
9 SUBROUTINE STREAMICE_GET_FP_ERR_OAD ( err_max, myThid )
10 C /============================================================\
11 C | SUBROUTINE |
12 C | o |
13 C |============================================================|
14 C | |
15 C \============================================================/
16 IMPLICIT NONE
17
18 C === Global variables ===
19 #include "SIZE.h"
20 #include "EEPARAMS.h"
21 #include "PARAMS.h"
22 #include "STREAMICE.h"
23 #include "STREAMICE_CG.h"
24
25
26 C !INPUT/OUTPUT ARGUMENTS
27 _RL err_max
28 INTEGER myThid
29
30 #ifdef ALLOW_STREAMICE
31 #if (defined (ALLOW_STREAMICE_OAD_FP))
32 INTEGER conv_flag, i, j, bi, bj
33
34 INTEGER ikey_nl
35 _RL err_tempu, err_tempv
36 _RL max_vel, tempu, tempv, err_lastchange, cgtol
37 CHARACTER*(MAX_LEN_MBUF) msgBuf
38 _RL err_sum, conj_norm
39 _RL err_sum_tile (nSx,nSy)
40
41 err_max = 0. _d 0
42 err_sum = 0. _d 0
43 conj_norm = 0. _d 0
44
45 DO bj = myByLo(myThid), myByHi(myThid)
46 DO bi = myBxLo(myThid), myBxHi(myThid)
47 err_sum_tile(bi,bj) = 0. _d 0
48 ENDDO
49 ENDDO
50
51
52
53 DO bj = myByLo(myThid), myByHi(myThid)
54 DO bi = myBxLo(myThid), myBxHi(myThid)
55 DO j=1,sNy
56 DO i=1,sNx
57 err_tempu = 0. _d 0
58 err_tempv = 0. _d 0
59 IF (STREAMICE_umask(i,j,bi,bj).eq.1) THEN
60 err_tempu =
61 & ABS (U_streamice(i,j,bi,bj)-u_new_SI(i,j,bi,bj))
62 ENDIF
63 IF (STREAMICE_vmask(i,j,bi,bj).eq.1) THEN
64 err_tempv = MAX( err_tempu,
65 & ABS (V_streamice(i,j,bi,bj)-v_new_SI(i,j,bi,bj)))
66 ENDIF
67 IF (err_tempv .ge. err_max) err_max = err_tempv
68 ENDDO
69 ENDDO
70 ENDDO
71 ENDDO
72
73 CALL GLOBAL_MAX_R8 (err_max, myThid)
74
75 #endif
76 #endif
77 RETURN
78 END

  ViewVC Help
Powered by ViewVC 1.1.22