/[MITgcm]/MITgcm/pkg/gmredi/gmredi_readparms.F
ViewVC logotype

Contents of /MITgcm/pkg/gmredi/gmredi_readparms.F

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


Revision 1.2 - (show annotations) (download)
Mon Jan 29 20:07:39 2001 UTC (23 years, 5 months ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint34
Changes since 1.1: +1 -1 lines
Corrected array dimensions.
Temporary scalars introduced to avoid storing by TAMC.

1 C $Header: /u/ralf/cvs/ecco_env/pkg/gmredi/gmredi_readparms.F,v 1.3 2000/11/14 17:21:41 heimbach Exp $
2
3 #include "GMREDI_OPTIONS.h"
4
5 SUBROUTINE GMREDI_READPARMS( myThid )
6 C /==========================================================\
7 C | SUBROUTINE GMREDI_READPARMS |
8 C | o Routine to initialize GM/Redi variables and constants. |
9 C |==========================================================|
10 C | Initialize GM/Redi parameters, read in data.gmredi |
11 C \==========================================================/
12 IMPLICIT NONE
13
14 C === Global variables ===
15 #include "SIZE.h"
16 #include "EEPARAMS.h"
17 #include "PARAMS.h"
18 #include "GRID.h"
19 #include "GMREDI.h"
20 #include "GMREDI_DIAGS.h"
21
22 C === Routine arguments ===
23 C myThid - Number of this instance of KPP_INIT
24 INTEGER myThid
25
26 #ifdef ALLOW_GMREDI
27
28 C-- GM/Redi parameter
29 NAMELIST /GM_PARM01/
30 & GM_background_K,
31 & GM_taper_scheme,
32 & GM_maxSlope,
33 #ifdef GM_VISBECK_VARIABLE_K
34 & GM_Visbeck_alpha,
35 & GM_Visbeck_length,
36 & GM_Visbeck_depth,
37 & GM_Visbeck_maxval_K,
38 #endif
39 & GM_Scrit,
40 & GM_Sd
41 c & GM_dumpFreq,
42 c & GM_taveFreq
43
44 C === Local variables ===
45 C msgBuf - Informational/error meesage buffer
46 C iUnit - Work variable for IO unit number
47 CHARACTER*(MAX_LEN_MBUF) msgBuf
48 INTEGER iUnit
49
50 C-- GMREDI_READPARMS has been called so we know that
51 C the package is active.
52 GMRediIsOn=.TRUE.
53
54
55 _BEGIN_MASTER(myThid)
56
57 WRITE(msgBuf,'(A)') ' GM_INIT: opening data.gmredi'
58 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
59 & SQUEEZE_RIGHT , 1)
60
61
62 CALL OPEN_COPY_DATA_FILE(
63 I 'data.gmredi', 'GM_INIT',
64 O iUnit,
65 I myThid )
66
67 C-- Default values GM/Redi
68 GM_background_K = 0.
69 GM_maxslope = 1.0D-2
70 GM_taper_scheme = ' '
71 GM_Scrit = 0.004
72 GM_Sd = 0.001
73
74 C-- Default values GM/Redi I/O control
75 c GM_dumpFreq = -1.
76 c GM_taveFreq = -1.
77
78 #ifdef GM_VISBECK_VARIABLE_K
79 C-- Default values Visbeck
80 GM_Visbeck_alpha = 0.
81 GM_Visbeck_length = 200.D3
82 GM_Visbeck_depth = 1000.D0
83 GM_Visbeck_maxval_K = 2500.D0
84 #endif
85
86
87 C-- Read parameters from open data file
88 READ(UNIT=iUnit,NML=GM_PARM01)
89
90 C Some constants
91 GM_rMaxSlope=0.
92 if (GM_maxSlope.ne.0.) GM_rMaxSlope=1. / GM_maxSlope
93
94 C Unspecified I/O control parameters default to model pars
95 c if (GM_dumpFreq.EQ.-1.) GM_dumpFreq=dumpFreq
96 c if (GM_taveFreq.EQ.-1.) GM_taveFreq=taveFreq
97
98 #ifndef GM_VISBECK_VARIABLE_K
99 C Make sure we are not trying to use something that is unavailable
100 IF (GM_Visbeck_alpha .NE. 0.) THEN
101 WRITE(msgBuf,'(A)')
102 & ' GM_INIT: Visbeck variables used in data.gmredi'
103 CALL PRINT_ERROR( msgBuf, 1 )
104 WRITE(msgBuf,'(A)')
105 & ' GM_INIT: without #define GM_VISBECK_VARIABLE_K'
106 CALL PRINT_ERROR( msgBuf, 1 )
107 STOP 'ABNORMAL END: S/R GM_INIT'
108 ENDIF
109 #endif
110
111 WRITE(msgBuf,'(A)') ' GM_INIT: finished reading data.gmredi'
112 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
113 & SQUEEZE_RIGHT , 1)
114
115 C-- Close the open data file
116 CLOSE(iUnit)
117 _END_MASTER(myThid)
118
119 C-- Everyone else must wait for the parameters to be loaded
120 _BARRIER
121
122
123 #endif /* ALLOW_GMREDI */
124
125 return
126 end

  ViewVC Help
Powered by ViewVC 1.1.22