/[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.4 - (show annotations) (download)
Sun Feb 4 14:38:49 2001 UTC (23 years, 4 months ago) by cnh
Branch: MAIN
CVS Tags: checkpoint40pre3, checkpoint40pre1, checkpoint40pre7, checkpoint40pre6, checkpoint40pre9, checkpoint40pre8, release1_b1, checkpoint43, checkpoint38, checkpoint40pre2, checkpoint40pre4, pre38tag1, c37_adj, pre38-close, checkpoint39, checkpoint37, checkpoint36, checkpoint35, checkpoint40pre5, ecco-branch-mod1, release1_beta1, checkpoint42, checkpoint40, checkpoint41
Branch point for: release1, ecco-branch, pre38, release1_coupled
Changes since 1.3: +2 -1 lines
Made sure each .F and .h file had
the CVS keywords Header and Name at its start.
Most had header but very few currently have Name, so
lots of changes!

1 C $Header: /u/gcmpack/models/MITgcmUV/pkg/gmredi/gmredi_readparms.F,v 1.3 2001/02/02 21:36:29 adcroft Exp $
2 C $Name: $
3
4 #include "GMREDI_OPTIONS.h"
5
6 SUBROUTINE GMREDI_READPARMS( myThid )
7 C /==========================================================\
8 C | SUBROUTINE GMREDI_READPARMS |
9 C | o Routine to initialize GM/Redi variables and constants. |
10 C |==========================================================|
11 C | Initialize GM/Redi parameters, read in data.gmredi |
12 C \==========================================================/
13 IMPLICIT NONE
14
15 C === Global variables ===
16 #include "SIZE.h"
17 #include "EEPARAMS.h"
18 #include "PARAMS.h"
19 #include "GRID.h"
20 #include "GMREDI.h"
21 #include "GMREDI_DIAGS.h"
22
23 C === Routine arguments ===
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_READPARMS: 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_READPARMS',
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_READPARMS: Visbeck variables used in data.gmredi'
103 CALL PRINT_ERROR( msgBuf, 1 )
104 WRITE(msgBuf,'(A)')
105 & ' GM_READPARMS: without #define GM_VISBECK_VARIABLE_K'
106 CALL PRINT_ERROR( msgBuf, 1 )
107 STOP 'ABNORMAL END: S/R GM_READPARMS'
108 ENDIF
109 #endif
110
111 WRITE(msgBuf,'(A)') ' GM_READPARMS: 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