/[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.3 - (show annotations) (download)
Fri Feb 2 21:36:29 2001 UTC (23 years, 5 months ago) by adcroft
Branch: MAIN
Changes since 1.2: +7 -8 lines
Merged changes from branch "branch-atmos-merge" into MAIN (checkpoint34)
 - substantial modifications to algorithm sequence (dynamics.F)
 - packaged OBCS, Shapiro filter, Zonal filter, Atmospheric Physics

1 C $Header: /u/gcmpack/models/MITgcmUV/pkg/gmredi/gmredi_readparms.F,v 1.2 2001/01/29 20:07:39 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 INTEGER myThid
24
25 #ifdef ALLOW_GMREDI
26
27 C-- GM/Redi parameter
28 NAMELIST /GM_PARM01/
29 & GM_background_K,
30 & GM_taper_scheme,
31 & GM_maxSlope,
32 #ifdef GM_VISBECK_VARIABLE_K
33 & GM_Visbeck_alpha,
34 & GM_Visbeck_length,
35 & GM_Visbeck_depth,
36 & GM_Visbeck_maxval_K,
37 #endif
38 & GM_Scrit,
39 & GM_Sd
40 c & GM_dumpFreq,
41 c & GM_taveFreq
42
43 C === Local variables ===
44 C msgBuf - Informational/error meesage buffer
45 C iUnit - Work variable for IO unit number
46 CHARACTER*(MAX_LEN_MBUF) msgBuf
47 INTEGER iUnit
48
49 C-- GMREDI_READPARMS has been called so we know that
50 C the package is active.
51 GMRediIsOn=.TRUE.
52
53
54 _BEGIN_MASTER(myThid)
55
56 WRITE(msgBuf,'(A)') ' GM_READPARMS: opening data.gmredi'
57 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
58 & SQUEEZE_RIGHT , 1)
59
60
61 CALL OPEN_COPY_DATA_FILE(
62 I 'data.gmredi', 'GM_READPARMS',
63 O iUnit,
64 I myThid )
65
66 C-- Default values GM/Redi
67 GM_background_K = 0.
68 GM_maxslope = 1.0D-2
69 GM_taper_scheme = ' '
70 GM_Scrit = 0.004
71 GM_Sd = 0.001
72
73 C-- Default values GM/Redi I/O control
74 c GM_dumpFreq = -1.
75 c GM_taveFreq = -1.
76
77 #ifdef GM_VISBECK_VARIABLE_K
78 C-- Default values Visbeck
79 GM_Visbeck_alpha = 0.
80 GM_Visbeck_length = 200.D3
81 GM_Visbeck_depth = 1000.D0
82 GM_Visbeck_maxval_K = 2500.D0
83 #endif
84
85
86 C-- Read parameters from open data file
87 READ(UNIT=iUnit,NML=GM_PARM01)
88
89 C Some constants
90 GM_rMaxSlope=0.
91 if (GM_maxSlope.ne.0.) GM_rMaxSlope=1. / GM_maxSlope
92
93 C Unspecified I/O control parameters default to model pars
94 c if (GM_dumpFreq.EQ.-1.) GM_dumpFreq=dumpFreq
95 c if (GM_taveFreq.EQ.-1.) GM_taveFreq=taveFreq
96
97 #ifndef GM_VISBECK_VARIABLE_K
98 C Make sure we are not trying to use something that is unavailable
99 IF (GM_Visbeck_alpha .NE. 0.) THEN
100 WRITE(msgBuf,'(A)')
101 & ' GM_READPARMS: Visbeck variables used in data.gmredi'
102 CALL PRINT_ERROR( msgBuf, 1 )
103 WRITE(msgBuf,'(A)')
104 & ' GM_READPARMS: without #define GM_VISBECK_VARIABLE_K'
105 CALL PRINT_ERROR( msgBuf, 1 )
106 STOP 'ABNORMAL END: S/R GM_READPARMS'
107 ENDIF
108 #endif
109
110 WRITE(msgBuf,'(A)') ' GM_READPARMS: finished reading data.gmredi'
111 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
112 & SQUEEZE_RIGHT , 1)
113
114 C-- Close the open data file
115 CLOSE(iUnit)
116 _END_MASTER(myThid)
117
118 C-- Everyone else must wait for the parameters to be loaded
119 _BARRIER
120
121
122 #endif /* ALLOW_GMREDI */
123
124 return
125 end

  ViewVC Help
Powered by ViewVC 1.1.22