/[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.9 - (show annotations) (download)
Wed Nov 12 03:58:48 2003 UTC (20 years, 7 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint52l_pre, hrcube4, hrcube5, checkpoint57b_post, checkpoint52d_pre, checkpoint56b_post, checkpoint52j_pre, checkpoint54d_post, checkpoint54e_post, checkpoint52l_post, checkpoint52k_post, checkpoint55, checkpoint54, checkpoint57, checkpoint56, checkpoint53, checkpoint52f_post, checkpoint54f_post, checkpoint55i_post, checkpoint52i_pre, hrcube_1, hrcube_2, hrcube_3, checkpoint55c_post, checkpoint52e_pre, checkpoint52e_post, checkpoint53d_post, checkpoint57a_post, checkpoint52b_pre, checkpoint54b_post, checkpoint52m_post, checkpoint55g_post, checkpoint52b_post, checkpoint52c_post, checkpoint52f_pre, checkpoint55d_post, checkpoint54a_pre, checkpoint53c_post, checkpoint55d_pre, checkpoint55j_post, checkpoint54a_post, checkpoint55h_post, checkpoint55b_post, checkpoint53a_post, checkpoint55f_post, checkpoint52d_post, checkpoint53g_post, checkpoint52a_pre, checkpoint52i_post, checkpoint52h_pre, checkpoint56a_post, checkpoint53f_post, checkpoint52j_post, branch-netcdf, checkpoint52n_post, checkpoint53b_pre, checkpoint56c_post, checkpoint57a_pre, checkpoint55a_post, checkpoint53b_post, checkpoint52a_post, checkpoint53d_pre, checkpoint55e_post, checkpoint54c_post
Branch point for: netcdf-sm0
Changes since 1.8: +8 -50 lines
- check parameters and options: moved from gmredi_readparms to gmredi_check
- stop if Olx,Oly are too small.

1 C $Header: /u/gcmpack/MITgcm/pkg/gmredi/gmredi_readparms.F,v 1.8 2003/01/13 19:02:45 jmc 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 C GM_Small_Number :: epsilon used in computing the slope
30 C GM_slopeSqCutoff :: slope^2 cut-off value
31 NAMELIST /GM_PARM01/
32 & GM_AdvForm, GM_AdvSeparate,
33 & GM_isopycK,
34 & GM_background_K,
35 & GM_taper_scheme,
36 & GM_maxSlope,
37 & GM_Kmin_horiz,
38 & GM_Small_Number, GM_slopeSqCutoff,
39 & GM_Visbeck_alpha,
40 & GM_Visbeck_length,
41 & GM_Visbeck_depth,
42 & GM_Visbeck_maxval_K,
43 & GM_Scrit,
44 & GM_Sd
45 c & GM_dumpFreq,
46 c & GM_taveFreq
47
48 C === Local variables ===
49 C msgBuf - Informational/error meesage buffer
50 C iUnit - Work variable for IO unit number
51 CHARACTER*(MAX_LEN_MBUF) msgBuf
52 INTEGER iUnit
53
54 C-- GMREDI_READPARMS has been called so we know that
55 C the package is active.
56 GMRediIsOn=.TRUE.
57
58
59 _BEGIN_MASTER(myThid)
60
61 WRITE(msgBuf,'(A)') ' GM_READPARMS: opening data.gmredi'
62 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
63 & SQUEEZE_RIGHT , 1)
64
65
66 CALL OPEN_COPY_DATA_FILE(
67 I 'data.gmredi', 'GM_READPARMS',
68 O iUnit,
69 I myThid )
70
71 C-- Default values GM/Redi
72 GM_AdvForm = .FALSE.
73 GM_AdvSeparate = .FALSE.
74 GM_isopycK = -999.
75 GM_background_K = 0.
76 GM_maxslope = 1.0D-2
77 GM_Kmin_horiz = 0.
78 GM_Small_Number = 1. _d -12
79 GM_slopeSqCutoff = 1. _d +48
80 GM_taper_scheme = ' '
81 GM_Scrit = 0.004
82 GM_Sd = 0.001
83
84 C-- Default values GM/Redi I/O control
85 c GM_dumpFreq = -1.
86 c GM_taveFreq = -1.
87
88 C-- Default values Visbeck
89 GM_Visbeck_alpha = 0.
90 GM_Visbeck_length = 200.D3
91 GM_Visbeck_depth = 1000.D0
92 GM_Visbeck_maxval_K = 2500.D0
93
94 C-- Read parameters from open data file
95 READ(UNIT=iUnit,NML=GM_PARM01)
96
97 WRITE(msgBuf,'(A)') ' GM_READPARMS: finished reading data.gmredi'
98 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
99 & SQUEEZE_RIGHT , 1)
100
101 C-- Close the open data file
102 CLOSE(iUnit)
103
104 C Default value for GM_isopycK is equal to GM_background_K :
105 IF (GM_isopycK.EQ.-999.) GM_isopycK = GM_background_K
106
107 C Some constants
108 GM_rMaxSlope=0.
109 if (GM_maxSlope.ne.0.) GM_rMaxSlope=1. / GM_maxSlope
110
111 IF (GM_AdvForm) THEN
112 GM_skewflx = 0.
113 GM_advect = 1.
114 GM_ExtraDiag = GM_Visbeck_alpha.NE.0. .OR. GM_isopycK.NE.0.
115 ELSE
116 GM_skewflx = 1.
117 GM_advect = 0.
118 GM_ExtraDiag = GM_isopycK.NE.GM_background_K
119 ENDIF
120
121 _END_MASTER(myThid)
122
123 C-- Everyone else must wait for the parameters to be loaded
124 _BARRIER
125
126 #endif /* ALLOW_GMREDI */
127
128 RETURN
129 END

  ViewVC Help
Powered by ViewVC 1.1.22