/[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.9 - (hide annotations) (download)
Mon Dec 10 02:34:45 2012 UTC (12 years, 7 months ago) by dgoldberg
Branch: MAIN
Changes since 1.8: +6 -4 lines
various updates, mostly adding ifdefs to include statements

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

  ViewVC Help
Powered by ViewVC 1.1.22