/[MITgcm]/MITgcm/pkg/ggl90/ggl90_check.F
ViewVC logotype

Contents of /MITgcm/pkg/ggl90/ggl90_check.F

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


Revision 1.5 - (show annotations) (download)
Sat Nov 14 16:22:23 2009 UTC (14 years, 5 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint64y, checkpoint64x, checkpoint64z, checkpoint64q, checkpoint64p, checkpoint64s, checkpoint64r, checkpoint64u, checkpoint64t, checkpoint64w, checkpoint64v, checkpoint64i, checkpoint64h, checkpoint64k, checkpoint64j, checkpoint64m, checkpoint64l, checkpoint64o, checkpoint64n, checkpoint64a, checkpoint64c, checkpoint64b, checkpoint64e, checkpoint64d, checkpoint64g, checkpoint64f, checkpoint63p, checkpoint63q, checkpoint63r, checkpoint63s, checkpoint63l, checkpoint63m, checkpoint63n, checkpoint63o, checkpoint63h, checkpoint63i, checkpoint63j, checkpoint63k, checkpoint63d, checkpoint63e, checkpoint63f, checkpoint63g, checkpoint63a, checkpoint63b, checkpoint63c, checkpoint64, checkpoint65, checkpoint62, checkpoint63, checkpoint66d, checkpoint66c, checkpoint66b, checkpoint66a, checkpoint65z, checkpoint65x, checkpoint65y, checkpoint65r, checkpoint65s, checkpoint65p, checkpoint65q, checkpoint65v, checkpoint65w, checkpoint65t, checkpoint65u, checkpoint65j, checkpoint65k, checkpoint65h, checkpoint65i, checkpoint65n, checkpoint65o, checkpoint65l, checkpoint65m, checkpoint65b, checkpoint65c, checkpoint65a, checkpoint65f, checkpoint65g, checkpoint65d, checkpoint65e, checkpoint62c, checkpoint62b, checkpoint62a, checkpoint62g, checkpoint62f, checkpoint62e, checkpoint62d, checkpoint62k, checkpoint62j, checkpoint62i, checkpoint62h, checkpoint62o, checkpoint62n, checkpoint62m, checkpoint62l, checkpoint62s, checkpoint62r, checkpoint62q, checkpoint62p, checkpoint62w, checkpoint62v, checkpoint62u, checkpoint62t, checkpoint62z, checkpoint62y, checkpoint62x, checkpoint61z, checkpoint61y
Changes since 1.4: +23 -23 lines
- call PRINT_MESSAGE and PRINT_ERROR with argument myThid
- cut string that extend on 2 lines

1 C $Header: /u/gcmpack/MITgcm/pkg/ggl90/ggl90_check.F,v 1.4 2009/11/14 14:27:56 dfer Exp $
2 C $Name: $
3 #include "GGL90_OPTIONS.h"
4
5 SUBROUTINE GGL90_CHECK( myThid )
6 C *==========================================================*
7 C | SUBROUTINE GGL90_CHECK |
8 C | o Validate basic package setup and inter-package |
9 C | dependencies. |
10 C *==========================================================*
11 IMPLICIT NONE
12
13 C === Global variables ===
14 #include "SIZE.h"
15 #include "EEPARAMS.h"
16 #include "PARAMS.h"
17 #include "GGL90.h"
18
19 C === Routine arguments ===
20 C myThid - Number of this instance of GGL90_CHECK
21 INTEGER myThid
22
23 #ifdef ALLOW_GGL90
24
25 C === Local variables ===
26 C msgBuf - Informational/error meesage buffer
27 CHARACTER*(MAX_LEN_MBUF) msgBuf
28
29 WRITE(msgBuf,'(A)') 'GGL90_CHECK: #define ALLOW_GGL90'
30 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
31 & SQUEEZE_RIGHT, myThid )
32
33 C So far, GGL90 works only with oceanic z-coordinates
34 IF ( buoyancyRelation .NE. 'OCEANIC' ) THEN
35 WRITE(msgBuf,'(A)')
36 & 'GGL90 works only with buoyancyRelation = ''OCEANIC'''
37 CALL PRINT_ERROR( msgBuf, myThid )
38 STOP 'ABNORMAL END: S/R GGL90_CHECK'
39 ENDIF
40
41 C convective adjustment might be needed even with ggl90
42 IF ( cAdjFreq.NE.0. .OR. ivdc_kappa.NE.0. ) THEN
43 WRITE(msgBuf,'(A)')
44 & 'GGL90_CHECK: Some form of convection has been enabled'
45 CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
46 & SQUEEZE_RIGHT, myThid )
47 ENDIF
48
49 #ifdef ALLOW_GGL90_HORIZDIFF
50 #ifdef ALLOW_GGL90_SMOOTH
51 IF ( GGL90diffTKEh .NE. 0. _d 0 ) THEN
52 WRITE(msgBuf,'(A)')
53 & 'Horizontal diffusion of TKE and smoothing are both on'
54 CALL PRINT_ERROR( msgBuf, myThid )
55 STOP 'ABNORMAL END: S/R GGL90_CHECK'
56 ENDIF
57 #endif
58 #else
59 IF ( GGL90diffTKEh .NE. 0. _d 0 ) THEN
60 WRITE(msgBuf,'(2A)')
61 & 'Define ALLOW_GGL90_HORIZDIFF in GGL90_OPTIONS.h',
62 & ' to get diffusion of TKE'
63 CALL PRINT_ERROR( msgBuf, myThid )
64 STOP 'ABNORMAL END: S/R GGL90_CHECK'
65 ENDIF
66 #endif
67
68 IF ( useKPP ) THEN
69 WRITE(msgBuf,'(A)')
70 & 'GGL90 and KPP cannot be turned on at the same time'
71 CALL PRINT_ERROR( msgBuf, myThid )
72 STOP 'ABNORMAL END: S/R GGL90_CHECK'
73 ENDIF
74
75 IF ( usePP81 ) THEN
76 WRITE(msgBuf,'(A)')
77 & 'GGL90 and PP81 cannot be turned on at the same time'
78 CALL PRINT_ERROR( msgBuf, myThid )
79 STOP 'ABNORMAL END: S/R GGL90_CHECK'
80 ENDIF
81
82 IF ( useMY82 ) THEN
83 WRITE(msgBuf,'(A)')
84 & 'GGL90 and MY82 cannot be turned on at the same time'
85 CALL PRINT_ERROR( msgBuf, myThid )
86 STOP 'ABNORMAL END: S/R GGL90_CHECK'
87 ENDIF
88
89 C GGL90 needs implicit vertical diffusion and viscosity
90 IF (.NOT.implicitDiffusion ) THEN
91 WRITE(msgBuf,'(A)')
92 & 'GGL90 needs implicitDiffusion to be enabled'
93 CALL PRINT_ERROR( msgBuf, myThid )
94 STOP 'ABNORMAL END: S/R GGL90_CHECK'
95 ENDIF
96 IF (.NOT.implicitViscosity) THEN
97 WRITE(msgBuf,'(A)')
98 & 'GGL90 needs implicitViscosity to be enabled'
99 CALL PRINT_ERROR( msgBuf, myThid )
100 STOP 'ABNORMAL END: S/R GGL90_CHECK'
101 ENDIF
102
103 #endif /* ALLOW_GGL90 */
104
105 RETURN
106 END

  ViewVC Help
Powered by ViewVC 1.1.22