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

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

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


Revision 1.6 - (hide annotations) (download)
Tue Sep 18 17:06:48 2012 UTC (12 years, 10 months ago) by dgoldberg
Branch: MAIN
Changes since 1.5: +28 -4 lines
changes for periodic boundary conds and hybrid stress balance

1 dgoldberg 1.6 C $Header: /u/gcmpack/MITgcm_contrib/dgoldberg/streamice/streamice_readparms.F,v 1.5 2012/07/30 19:04:55 dgoldberg Exp $
2 heimbach 1.1 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 dgoldberg 1.5 & streamice_nonlin_tol_fp,
42 heimbach 1.1 & streamice_max_cg_iter, streamice_max_nl_iter,
43     & STREAMICE_GL_regularize,
44     & STREAMICEthickInit,
45 dgoldberg 1.6 & STREAMICEsigcoordInit,
46     & STREAMICEsigcoordFile,
47 heimbach 1.1 & STREAMICEthickFile,
48     & STREAMICEcalveMaskFile,
49     & STREAMICEison,
50     & STREAMICE_dump_mdsio, STREAMICE_tave_mdsio,
51     & STREAMICE_dump_mnc, STREAMICE_tave_mnc,
52     & STREAMICE_GL_regularize, STREAMICE_move_front,
53     & STREAMICE_calve_to_mask,
54 dgoldberg 1.6 & STREAMICE_diagnostic_only,
55 dgoldberg 1.2 ! & STREAMICE_construct_matrix,
56 heimbach 1.1 & STREAMICE_lower_cg_tol,
57 heimbach 1.4 & streamice_CFL_factor,
58 dgoldberg 1.6 & streamice_adjDump,
59     ! & STREAMICE_hybrid_stress,
60     & streamice_bg_surf_slope_x, streamice_bg_surf_slope_y,
61     & streamice_kx_b_init, streamice_ky_b_init,
62     & STREAMICEbasalTracConfig,
63     & STREAMICEbasalTracFile,
64     & STREAMICEvelOptimFile
65    
66 heimbach 1.1
67     NAMELIST /STREAMICE_PARM02/
68     & shelf_max_draft,
69     & shelf_min_draft,
70     & shelf_edge_pos,
71     & shelf_slope_scale,
72     & shelf_flat_width,
73     & flow_dir
74    
75     NAMELIST /STREAMICE_PARM03/
76     & min_x_noflow_NORTH, max_x_noflow_NORTH,
77     & min_x_noflow_SOUTH, max_x_noflow_SOUTH,
78     & min_y_noflow_WEST, max_y_noflow_WEST,
79     & min_y_noflow_EAST, max_y_noflow_EAST,
80     & min_x_noStress_NORTH, max_x_noStress_NORTH,
81     & min_x_noStress_SOUTH, max_x_noStress_SOUTH,
82     & min_y_noStress_WEST, max_y_noStress_WEST,
83     & min_y_noStress_EAST, max_y_noStress_EAST,
84     & min_x_FluxBdry_NORTH, max_x_FluxBdry_NORTH,
85     & min_x_FluxBdry_SOUTH, max_x_FluxBdry_SOUTH,
86     & min_y_FluxBdry_WEST, max_y_FluxBdry_WEST,
87     & min_y_FluxBdry_EAST, max_y_FluxBdry_EAST,
88     & min_x_Dirich_NORTH, max_x_Dirich_NORTH,
89     & min_x_Dirich_SOUTH, max_x_Dirich_SOUTH,
90     & min_y_Dirich_WEST, max_y_Dirich_WEST,
91     & min_y_Dirich_EAST, max_y_Dirich_EAST,
92     & min_x_CFBC_NORTH, max_x_CFBC_NORTH,
93     & min_x_CFBC_SOUTH, max_x_CFBC_SOUTH,
94     & min_y_CFBC_WEST, max_y_CFBC_WEST,
95     & min_y_CFBC_EAST, max_y_CFBC_EAST,
96     & flux_bdry_val_SOUTH, flux_bdry_val_NORTH,
97 dgoldberg 1.6 & flux_bdry_val_WEST, flux_bdry_val_EAST,
98     & STREAMICE_NS_periodic, STREAMICE_EW_periodic
99 heimbach 1.1
100     _BEGIN_MASTER(myThid)
101    
102     C-- Default values for STREAMICE
103    
104     streamice_density = 917.
105     streamice_density_ocean_avg = 1024.
106     A_glen_isothermal = 9.461e-18 ! Pa (-1/3) a
107     n_glen = 3.
108     eps_glen_min = 1.0e-12
109     C_basal_fric_const = 31.71 ! Pa (m/a)-1n
110     n_basal_friction = 1.
111     streamice_vel_update = 169200. ! seconds
112     streamice_cg_tol = 1e-6
113     streamice_nonlin_tol = 1e-6
114 dgoldberg 1.5 streamice_nonlin_tol_fp = 1.e-14
115 heimbach 1.1 streamice_max_cg_iter = 2000
116     streamice_max_nl_iter = 100
117     streamice_n_sub_regularize = 4
118     streamice_CFL_factor = .5
119 heimbach 1.4 streamice_adjDump = 0.
120 dgoldberg 1.6 streamice_bg_surf_slope_x = .0
121     streamice_bg_surf_slope_y = 0.
122     streamice_kx_b_init = 1.
123     streamice_ky_b_init = 1.
124    
125 heimbach 1.1 STREAMICEthickInit = 'FILE'
126     STREAMICEthickFile = ' '
127     STREAMICEcalveMaskFile = ' '
128 dgoldberg 1.6 STREAMICEsigcoordInit = 'UNIFORM'
129     STREAMICEsigcoordFile = ' '
130     STREAMICEbasalTracConfig = 'UNIFORM'
131     STREAMICEbasalTracFile = ' '
132     STREAMICEvelOptimFile = ''
133 heimbach 1.1
134     STREAMICEison = .TRUE.
135     STREAMICE_tave_mdsio = .TRUE.
136     STREAMICE_dump_mdsio = .TRUE.
137     STREAMICE_dump_mnc = .FALSE.
138     STREAMICE_tave_mnc = .FALSE.
139     STREAMICE_GL_regularize = .FALSE.
140     STREAMICE_move_front = .FALSE.
141     STREAMICE_calve_to_mask = .FALSE.
142 dgoldberg 1.2 ! STREAMICE_construct_matrix = .TRUE.
143 heimbach 1.1 STREAMICE_lower_cg_tol = .FALSE.
144 dgoldberg 1.6 STREAMICE_diagnostic_only = .FALSE.
145     ! STREAMICE_hybrid_stress= .FALSE.
146 heimbach 1.1
147     min_x_noflow_NORTH = 0.
148     max_x_noflow_NORTH = 0.
149     min_x_noflow_SOUTH = 0.
150     max_x_noflow_SOUTH = 0.
151     min_y_noflow_WEST = 0.
152     max_y_noflow_WEST = 0.
153     min_y_noflow_EAST = 0.
154     max_y_noflow_EAST = 0.
155     min_x_noStress_NORTH = 0.
156     max_x_noStress_NORTH = 0.
157     min_x_noStress_SOUTH = 0.
158     max_x_noStress_SOUTH = 0.
159     min_y_noStress_WEST = 0.
160     max_y_noStress_WEST = 0.
161     min_y_noStress_EAST = 0.
162     max_y_noStress_EAST = 0.
163     min_x_FluxBdry_NORTH = 0.
164     max_x_FluxBdry_NORTH = 0.
165     min_x_FluxBdry_SOUTH = 0.
166     max_x_FluxBdry_SOUTH = 0.
167     min_y_FluxBdry_WEST = 0.
168     max_y_FluxBdry_WEST = 0.
169     min_y_FluxBdry_EAST = 0.
170     max_y_FluxBdry_EAST = 0.
171     min_x_Dirich_NORTH = 0.
172     max_x_Dirich_NORTH = 0.
173     min_x_Dirich_SOUTH = 0.
174     max_x_Dirich_SOUTH = 0.
175     min_y_Dirich_WEST = 0.
176     max_y_Dirich_WEST = 0.
177     min_y_Dirich_EAST = 0.
178     max_y_Dirich_EAST = 0.
179     min_y_CFBC_WEST = 0.
180     max_y_CFBC_WEST = 0.
181     min_y_CFBC_EAST = 0.
182     max_y_CFBC_EAST = 0.
183     flux_bdry_val_SOUTH = 0.
184     flux_bdry_val_NORTH = 0.
185     flux_bdry_val_WEST = 0.
186     flux_bdry_val_EAST = 0.
187    
188 dgoldberg 1.6 STREAMICE_NS_periodic = .FALSE.
189     STREAMICE_EW_periodic = .FALSE.
190 heimbach 1.1
191     WRITE(msgBuf,'(A)') 'STREAMICE_READPARMS: opening data.streamice'
192     CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
193     & SQUEEZE_RIGHT , 1)
194     CALL OPEN_COPY_DATA_FILE(
195     I 'data.streamice', 'STREAMICE_READPARMS',
196     O iUnit,
197     I myThid )
198    
199     C Read parameters from open data file
200     READ(UNIT=iUnit,NML=STREAMICE_PARM01)
201     WRITE(msgBuf,'(A)')
202     & 'STREAMICE_READPARMS: read first param block'
203     CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
204     & SQUEEZE_RIGHT , 1)
205    
206     IF (TRIM(STREAMICEthickInit) .eq. "PARAM") THEN
207 dgoldberg 1.3 READ(UNIT=iUnit,NML=STREAMICE_PARM02)
208 heimbach 1.1 WRITE(msgBuf,'(A)')
209     & 'STREAMICE_READPARMS: read second param block'
210     CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
211     & SQUEEZE_RIGHT , 1)
212     ENDIF
213    
214 dgoldberg 1.3 READ(UNIT=iUnit,NML=STREAMICE_PARM03)
215 heimbach 1.1 WRITE(msgBuf,'(A)')
216     & 'STREAMICE_READPARMS: read third param block'
217     CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
218     & SQUEEZE_RIGHT , 1)
219     C Close the open data file
220     CLOSE(iUnit)
221    
222     streamice_nstep_velocity = NINT (streamice_vel_update / deltaT)
223    
224     C- Set Output type flags :
225    
226     #ifdef ALLOW_MNC
227     IF (useMNC) THEN
228     IF ( .NOT.outputTypesInclusive
229     & .AND. STREAMICE_tave_mnc ) STREAMICE_tave_mdsio = .FALSE.
230     IF ( .NOT.outputTypesInclusive
231     & .AND. STREAMICE_dump_mnc ) STREAMICE_dump_mdsio = .FALSE.
232     ENDIF
233     #endif
234    
235     _END_MASTER(myThid)
236    
237     C-- Everyone else must wait for the parameters to be loaded
238     _BARRIER
239    
240     #endif /* ALLOW_STREAMICE */
241    
242     RETURN
243     END

  ViewVC Help
Powered by ViewVC 1.1.22