/[MITgcm]/MITgcm_contrib/dgoldberg/streamice/streamice_readparms.F
ViewVC logotype

Contents of /MITgcm_contrib/dgoldberg/streamice/streamice_readparms.F

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


Revision 1.1 - (show annotations) (download)
Thu Mar 29 15:59:21 2012 UTC (13 years, 3 months ago) by heimbach
Branch: MAIN
Initial check-in of Dan Goldberg's streamice package

1 C $Header: /u/gcmpack/MITgcm/pkg/streamice/streamice_readparms.F,v 1.4 2009/12/27 23:40:03 dng Exp $
2 C $Name: $
3
4
5 C this needs changes
6
7 #include "STREAMICE_OPTIONS.h"
8
9 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
10 CBOP 0
11 SUBROUTINE STREAMICE_READPARMS( myThid )
12
13 C !DESCRIPTION:
14 C Initialize STREAMICE variables and constants.
15
16 C !USES:
17 IMPLICIT NONE
18 #include "SIZE.h"
19 #include "EEPARAMS.h"
20 #include "PARAMS.h"
21 #include "STREAMICE.h"
22 #include "STREAMICE_BDRY.h"
23
24 C !INPUT PARAMETERS:
25 INTEGER myThid
26 CEOP
27
28 #ifdef ALLOW_STREAMICE
29
30 C !LOCAL VARIABLES:
31 C msgBuf :: Informational/error message buffer
32 C iUnit :: Work variable for IO unit number
33 CHARACTER*(MAX_LEN_MBUF) msgBuf
34 INTEGER iUnit
35
36 NAMELIST /STREAMICE_PARM01/
37 & streamice_density, streamice_density_ocean_avg,
38 & A_glen_isothermal, n_glen, eps_glen_min,
39 & C_basal_fric_const, n_basal_friction,
40 & streamice_vel_update,streamice_cg_tol,streamice_nonlin_tol,
41 & streamice_max_cg_iter, streamice_max_nl_iter,
42 & STREAMICE_GL_regularize,
43 & STREAMICEthickInit,
44 & STREAMICEthickFile,
45 & STREAMICEcalveMaskFile,
46 & STREAMICEison,
47 & STREAMICE_dump_mdsio, STREAMICE_tave_mdsio,
48 & STREAMICE_dump_mnc, STREAMICE_tave_mnc,
49 & STREAMICE_GL_regularize, STREAMICE_move_front,
50 & STREAMICE_calve_to_mask,
51 & STREAMICE_construct_matrix,
52 & STREAMICE_lower_cg_tol,
53 & streamice_CFL_factor
54
55 NAMELIST /STREAMICE_PARM02/
56 & shelf_max_draft,
57 & shelf_min_draft,
58 & shelf_edge_pos,
59 & shelf_slope_scale,
60 & shelf_flat_width,
61 & flow_dir
62
63 NAMELIST /STREAMICE_PARM03/
64 & min_x_noflow_NORTH, max_x_noflow_NORTH,
65 & min_x_noflow_SOUTH, max_x_noflow_SOUTH,
66 & min_y_noflow_WEST, max_y_noflow_WEST,
67 & min_y_noflow_EAST, max_y_noflow_EAST,
68 & min_x_noStress_NORTH, max_x_noStress_NORTH,
69 & min_x_noStress_SOUTH, max_x_noStress_SOUTH,
70 & min_y_noStress_WEST, max_y_noStress_WEST,
71 & min_y_noStress_EAST, max_y_noStress_EAST,
72 & min_x_FluxBdry_NORTH, max_x_FluxBdry_NORTH,
73 & min_x_FluxBdry_SOUTH, max_x_FluxBdry_SOUTH,
74 & min_y_FluxBdry_WEST, max_y_FluxBdry_WEST,
75 & min_y_FluxBdry_EAST, max_y_FluxBdry_EAST,
76 & min_x_Dirich_NORTH, max_x_Dirich_NORTH,
77 & min_x_Dirich_SOUTH, max_x_Dirich_SOUTH,
78 & min_y_Dirich_WEST, max_y_Dirich_WEST,
79 & min_y_Dirich_EAST, max_y_Dirich_EAST,
80 & min_x_CFBC_NORTH, max_x_CFBC_NORTH,
81 & min_x_CFBC_SOUTH, max_x_CFBC_SOUTH,
82 & min_y_CFBC_WEST, max_y_CFBC_WEST,
83 & min_y_CFBC_EAST, max_y_CFBC_EAST,
84 & flux_bdry_val_SOUTH, flux_bdry_val_NORTH,
85 & flux_bdry_val_WEST, flux_bdry_val_EAST
86
87 _BEGIN_MASTER(myThid)
88
89 C-- Default values for STREAMICE
90
91 streamice_density = 917.
92 streamice_density_ocean_avg = 1024.
93 A_glen_isothermal = 9.461e-18 ! Pa (-1/3) a
94 n_glen = 3.
95 eps_glen_min = 1.0e-12
96 C_basal_fric_const = 31.71 ! Pa (m/a)-1n
97 n_basal_friction = 1.
98 streamice_vel_update = 169200. ! seconds
99 streamice_cg_tol = 1e-6
100 streamice_nonlin_tol = 1e-6
101 streamice_max_cg_iter = 2000
102 streamice_max_nl_iter = 100
103 streamice_n_sub_regularize = 4
104 streamice_CFL_factor = .5
105
106 STREAMICEthickInit = 'FILE'
107 STREAMICEthickFile = ' '
108 STREAMICEcalveMaskFile = ' '
109
110 STREAMICEison = .TRUE.
111 STREAMICE_tave_mdsio = .TRUE.
112 STREAMICE_dump_mdsio = .TRUE.
113 STREAMICE_dump_mnc = .FALSE.
114 STREAMICE_tave_mnc = .FALSE.
115 STREAMICE_GL_regularize = .FALSE.
116 STREAMICE_move_front = .FALSE.
117 STREAMICE_calve_to_mask = .FALSE.
118 STREAMICE_construct_matrix = .TRUE.
119 STREAMICE_lower_cg_tol = .FALSE.
120
121 min_x_noflow_NORTH = 0.
122 max_x_noflow_NORTH = 0.
123 min_x_noflow_SOUTH = 0.
124 max_x_noflow_SOUTH = 0.
125 min_y_noflow_WEST = 0.
126 max_y_noflow_WEST = 0.
127 min_y_noflow_EAST = 0.
128 max_y_noflow_EAST = 0.
129 min_x_noStress_NORTH = 0.
130 max_x_noStress_NORTH = 0.
131 min_x_noStress_SOUTH = 0.
132 max_x_noStress_SOUTH = 0.
133 min_y_noStress_WEST = 0.
134 max_y_noStress_WEST = 0.
135 min_y_noStress_EAST = 0.
136 max_y_noStress_EAST = 0.
137 min_x_FluxBdry_NORTH = 0.
138 max_x_FluxBdry_NORTH = 0.
139 min_x_FluxBdry_SOUTH = 0.
140 max_x_FluxBdry_SOUTH = 0.
141 min_y_FluxBdry_WEST = 0.
142 max_y_FluxBdry_WEST = 0.
143 min_y_FluxBdry_EAST = 0.
144 max_y_FluxBdry_EAST = 0.
145 min_x_Dirich_NORTH = 0.
146 max_x_Dirich_NORTH = 0.
147 min_x_Dirich_SOUTH = 0.
148 max_x_Dirich_SOUTH = 0.
149 min_y_Dirich_WEST = 0.
150 max_y_Dirich_WEST = 0.
151 min_y_Dirich_EAST = 0.
152 max_y_Dirich_EAST = 0.
153 min_y_CFBC_WEST = 0.
154 max_y_CFBC_WEST = 0.
155 min_y_CFBC_EAST = 0.
156 max_y_CFBC_EAST = 0.
157 flux_bdry_val_SOUTH = 0.
158 flux_bdry_val_NORTH = 0.
159 flux_bdry_val_WEST = 0.
160 flux_bdry_val_EAST = 0.
161
162
163 WRITE(msgBuf,'(A)') 'STREAMICE_READPARMS: opening data.streamice'
164 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
165 & SQUEEZE_RIGHT , 1)
166 CALL OPEN_COPY_DATA_FILE(
167 I 'data.streamice', 'STREAMICE_READPARMS',
168 O iUnit,
169 I myThid )
170
171 C Read parameters from open data file
172 READ(UNIT=iUnit,NML=STREAMICE_PARM01)
173 WRITE(msgBuf,'(A)')
174 & 'STREAMICE_READPARMS: read first param block'
175 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
176 & SQUEEZE_RIGHT , 1)
177 READ(UNIT=iUnit,NML=STREAMICE_PARM02)
178
179 IF (TRIM(STREAMICEthickInit) .eq. "PARAM") THEN
180 WRITE(msgBuf,'(A)')
181 & 'STREAMICE_READPARMS: read second param block'
182 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
183 & SQUEEZE_RIGHT , 1)
184 READ(UNIT=iUnit,NML=STREAMICE_PARM03)
185 ENDIF
186
187 WRITE(msgBuf,'(A)')
188 & 'STREAMICE_READPARMS: read third param block'
189 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
190 & SQUEEZE_RIGHT , 1)
191 C Close the open data file
192 CLOSE(iUnit)
193
194 streamice_nstep_velocity = NINT (streamice_vel_update / deltaT)
195
196 C- Set Output type flags :
197
198 #ifdef ALLOW_MNC
199 IF (useMNC) THEN
200 IF ( .NOT.outputTypesInclusive
201 & .AND. STREAMICE_tave_mnc ) STREAMICE_tave_mdsio = .FALSE.
202 IF ( .NOT.outputTypesInclusive
203 & .AND. STREAMICE_dump_mnc ) STREAMICE_dump_mdsio = .FALSE.
204 ENDIF
205 #endif
206
207 _END_MASTER(myThid)
208
209 C-- Everyone else must wait for the parameters to be loaded
210 _BARRIER
211
212 #endif /* ALLOW_STREAMICE */
213
214 RETURN
215 END

  ViewVC Help
Powered by ViewVC 1.1.22