/[MITgcm]/MITgcm/adjoint/makefile
ViewVC logotype

Contents of /MITgcm/adjoint/makefile

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


Revision 1.30 - (show annotations) (download)
Fri Jul 18 21:12:04 2003 UTC (18 years, 11 months ago) by heimbach
Branch: MAIN
CVS Tags: branchpoint-genmake2, checkpoint51e_post, checkpoint51f_pre, checkpoint51f_post, checkpoint51d_post
Branch point for: branch-genmake2
Changes since 1.29: +12 -0 lines
Merging from ecco-branch:
Use cluster local disks for purely local I/O
vs. globally visible disks needed for ctrl stuff.

1 SHELL = /bin/tcsh
2 RM = rm -f
3 LOC = $(PWD)
4 TAMC = tamc
5 ###TAMC = /data43/ralf/tamc/tamc
6 TAF = taf
7 ###TAF = ~fastopt/bin/taf
8 DEST = .
9 SOURCE_CODE = ../bin
10 ADJOINT_SCRIPT = ../adjoint
11 BASE = ..
12 PKG = $(BASE)/pkg
13 #
14 ADTAMCFLAGS = -reverse -admark ad -i4 -r4
15 ADTAFFLAGS = -reverse -admark ad -i4 -r4 \
16 -l taf_ad.log -flow taf_ad_flow.log -nonew_arg
17 FTLTAMCFLAGS = -forward -ftlmark g_ -i4 -r4
18 FTLTAFFLAGS = -forward -ftlmark g_ -i4 -r4 \
19 -l taf_ftl.log -flow taf_ftl_flow.log -nonew_arg
20 SVDTAMCFLAGS = -reverse -forward -pure -i4 -r4
21 SVDTAFFLAGS = -reverse -forward -pure -i4 -r4 \
22 -flow taf_flow.log -nonew_arg
23 #
24 # further useful options: -warn_step -flow taf_flow.log
25 # NB: the svd option recommended in the TAMC manual doesn't work.
26
27 DIFF_FLAGS = -toplevel the_main_loop \
28 -input ' xx_theta_dummy \
29 xx_salt_dummy \
30 xx_tr1_dummy \
31 xx_hflux_dummy \
32 xx_sflux_dummy \
33 xx_tauu_dummy \
34 xx_tauv_dummy \
35 xx_sst_dummy \
36 xx_sss_dummy \
37 xx_diffkr_dummy \
38 xx_kapgm_dummy \
39 xx_efluxy_dummy \
40 xx_efluxp_dummy' \
41 -output 'fc'
42 #
43 # -output 'objf_vector'
44 # -output 'fc'
45
46 ADTAMCFLAG = $(ADTAMCFLAGS) $(DIFF_FLAGS)
47 ADTAFFLAG = $(ADTAFFLAGS) $(DIFF_FLAGS)
48
49 FTLTAMCFLAG = $(FTLTAMCFLAGS) $(DIFF_FLAGS)
50 FTLTAFFLAG = $(FTLTAFFLAGS) $(DIFF_FLAGS)
51
52 SVDTAMCFLAG = $(SVDTAMCFLAGS) $(DIFF_FLAGS)
53 SVDTAFFLAG = $(SVDTAFFLAGS) $(DIFF_FLAGS)
54
55 # Source files for the MITgcmUV
56 SRC_MODEL = \
57 $(PKG)/autodiff/read_write.flow \
58 $(PKG)/autodiff/read_write_fld.flow \
59 $(PKG)/autodiff/read_write_rec.flow \
60 $(PKG)/autodiff/diags.flow \
61 $(PKG)/autodiff/cg2d.flow \
62 $(PKG)/autodiff/debug.flow \
63 $(PKG)/autodiff/do_the_model_io.flow \
64 $(PKG)/autodiff/dummy_in_stepping.flow \
65 $(PKG)/autodiff/eesupp.flow \
66 $(PKG)/autodiff/active_file.flow \
67 $(PKG)/autodiff/active_file_loc.flow \
68 $(PKG)/autodiff/write_state.flow \
69 $(PKG)/autodiff/ecco_check_exp.flow \
70 $(PKG)/autodiff/exch_ad.flow \
71 $(PKG)/autodiff/exch_z_ad.flow \
72 $(PKG)/autodiff/exch_uv_ad.flow \
73 $(PKG)/autodiff/global_sum_ad.flow \
74 $(PKG)/autodiff/global_max_ad.flow \
75 $(PKG)/autodiff/initialisation.flow \
76 $(PKG)/autodiff/mdsio.flow \
77 $(PKG)/autodiff/monitor.flow \
78 $(PKG)/autodiff/checkpoint.flow \
79 $(PKG)/autodiff/print_message.flow \
80 $(PKG)/autodiff/open_copy_data_file.flow\
81 $(PKG)/autodiff/timeave.flow \
82 \
83 $(SOURCE_CODE)/adams_bashforth2.f \
84 $(SOURCE_CODE)/calc_buoyancy.f \
85 $(SOURCE_CODE)/calc_common_factors.f \
86 $(SOURCE_CODE)/calc_diffusivity.f \
87 $(SOURCE_CODE)/calc_div_ghat.f \
88 $(SOURCE_CODE)/calc_grad_phi_hyd.f \
89 $(SOURCE_CODE)/calc_grad_phi_surf.f \
90 $(SOURCE_CODE)/calc_gs.f \
91 $(SOURCE_CODE)/calc_gt.f \
92 $(SOURCE_CODE)/calc_gtr1.f \
93 $(SOURCE_CODE)/calc_ivdc.f \
94 $(SOURCE_CODE)/calc_phi_hyd.f \
95 $(SOURCE_CODE)/calc_viscosity.f \
96 $(SOURCE_CODE)/comm_stats.f \
97 $(SOURCE_CODE)/convect.f \
98 $(SOURCE_CODE)/convective_adjustment.f \
99 $(SOURCE_CODE)/convective_adjustment_ini.f \
100 $(SOURCE_CODE)/convective_weights.f \
101 $(SOURCE_CODE)/convectively_mixtracer.f \
102 $(SOURCE_CODE)/correction_step.f \
103 $(SOURCE_CODE)/cycle_tracer.f \
104 $(SOURCE_CODE)/diags_phi_hyd.f \
105 $(SOURCE_CODE)/diags_phi_rlow.f \
106 $(SOURCE_CODE)/different_multiple.f \
107 $(SOURCE_CODE)/do_fields_blocking_exchanges.f \
108 $(SOURCE_CODE)/do_stagger_fields_exchanges.f \
109 $(SOURCE_CODE)/dynamics.f \
110 $(SOURCE_CODE)/external_fields_load.f \
111 $(SOURCE_CODE)/external_forcing.f \
112 $(SOURCE_CODE)/external_forcing_surf.f \
113 $(SOURCE_CODE)/find_alpha.f \
114 $(SOURCE_CODE)/find_rho.f \
115 $(SOURCE_CODE)/forward_step.f \
116 $(SOURCE_CODE)/freeze.f \
117 \
118 $(SOURCE_CODE)/gad_advection.f \
119 $(SOURCE_CODE)/gad_biharm_x.f \
120 $(SOURCE_CODE)/gad_biharm_y.f \
121 $(SOURCE_CODE)/gad_c2_adv_r.f \
122 $(SOURCE_CODE)/gad_c2_adv_x.f \
123 $(SOURCE_CODE)/gad_c2_adv_y.f \
124 $(SOURCE_CODE)/gad_c4_adv_r.f \
125 $(SOURCE_CODE)/gad_c4_adv_x.f \
126 $(SOURCE_CODE)/gad_c4_adv_y.f \
127 $(SOURCE_CODE)/gad_calc_rhs.f \
128 $(SOURCE_CODE)/gad_del2.f \
129 $(SOURCE_CODE)/gad_diff_r.f \
130 $(SOURCE_CODE)/gad_diff_x.f \
131 $(SOURCE_CODE)/gad_diff_y.f \
132 $(SOURCE_CODE)/gad_dst3_adv_x.f \
133 $(SOURCE_CODE)/gad_dst3_adv_y.f \
134 $(SOURCE_CODE)/gad_dst3_adv_r.f \
135 $(SOURCE_CODE)/gad_dst3fl_adv_x.f \
136 $(SOURCE_CODE)/gad_dst3fl_adv_y.f \
137 $(SOURCE_CODE)/gad_dst3fl_adv_r.f \
138 $(SOURCE_CODE)/gad_fluxlimit_adv_r.f \
139 $(SOURCE_CODE)/gad_fluxlimit_adv_x.f \
140 $(SOURCE_CODE)/gad_fluxlimit_adv_y.f \
141 $(SOURCE_CODE)/gad_grad_x.f \
142 $(SOURCE_CODE)/gad_grad_y.f \
143 $(SOURCE_CODE)/gad_u3_adv_r.f \
144 $(SOURCE_CODE)/gad_u3_adv_x.f \
145 $(SOURCE_CODE)/gad_u3_adv_y.f \
146 \
147 $(SOURCE_CODE)/grad_sigma.f \
148 $(SOURCE_CODE)/impldiff.f \
149 $(SOURCE_CODE)/ini_autodiff.f \
150 $(SOURCE_CODE)/ini_cartesian_grid.f \
151 $(SOURCE_CODE)/ini_cg2d.f \
152 $(SOURCE_CODE)/ini_communication_patterns.f \
153 $(SOURCE_CODE)/ini_cori.f \
154 $(SOURCE_CODE)/ini_curvilinear_grid.f \
155 $(SOURCE_CODE)/ini_depths.f \
156 $(SOURCE_CODE)/ini_fields.f \
157 $(SOURCE_CODE)/ini_forcing.f \
158 $(SOURCE_CODE)/ini_grid.f \
159 $(SOURCE_CODE)/ini_linear_phisurf.f \
160 $(SOURCE_CODE)/ini_masks_etc.f \
161 $(SOURCE_CODE)/ini_mixing.f \
162 $(SOURCE_CODE)/ini_p_ground.f \
163 $(SOURCE_CODE)/ini_pressure.f \
164 $(SOURCE_CODE)/ini_pnh.f \
165 $(SOURCE_CODE)/ini_psurf.f \
166 $(SOURCE_CODE)/ini_salt.f \
167 $(SOURCE_CODE)/ini_spherical_polar_grid.f \
168 $(SOURCE_CODE)/ini_theta.f \
169 $(SOURCE_CODE)/ini_tr1.f \
170 $(SOURCE_CODE)/ini_dynvars.f \
171 $(SOURCE_CODE)/ini_vel.f \
172 $(SOURCE_CODE)/ini_vertical_grid.f \
173 $(SOURCE_CODE)/initialise_varia.f \
174 $(SOURCE_CODE)/integrate_for_w.f \
175 $(SOURCE_CODE)/integr_continuity.f \
176 $(SOURCE_CODE)/modeldata_example.f \
177 \
178 $(SOURCE_CODE)/mom_fluxform.f \
179 $(SOURCE_CODE)/mom_hdissip.f \
180 $(SOURCE_CODE)/mom_vecinv.f \
181 $(SOURCE_CODE)/mom_calc_hfacz.f \
182 $(SOURCE_CODE)/mom_calc_ke.f \
183 $(SOURCE_CODE)/mom_calc_rtrans.f \
184 $(SOURCE_CODE)/mom_calc_strain.f \
185 $(SOURCE_CODE)/mom_calc_tension.f \
186 $(SOURCE_CODE)/mom_cdscheme.f \
187 $(SOURCE_CODE)/mom_u_adv_uu.f \
188 $(SOURCE_CODE)/mom_u_adv_vu.f \
189 $(SOURCE_CODE)/mom_u_adv_wu.f \
190 $(SOURCE_CODE)/mom_u_bottomdrag.f \
191 $(SOURCE_CODE)/mom_u_coriolis.f \
192 $(SOURCE_CODE)/mom_u_coriolis_nh.f \
193 $(SOURCE_CODE)/mom_u_del2u.f \
194 $(SOURCE_CODE)/mom_u_metric_nh.f \
195 $(SOURCE_CODE)/mom_u_metric_sphere.f \
196 $(SOURCE_CODE)/mom_u_rviscflux.f \
197 $(SOURCE_CODE)/mom_u_sidedrag.f \
198 $(SOURCE_CODE)/mom_u_xviscflux.f \
199 $(SOURCE_CODE)/mom_u_yviscflux.f \
200 $(SOURCE_CODE)/mom_v_adv_uv.f \
201 $(SOURCE_CODE)/mom_v_adv_vv.f \
202 $(SOURCE_CODE)/mom_v_adv_wv.f \
203 $(SOURCE_CODE)/mom_v_bottomdrag.f \
204 $(SOURCE_CODE)/mom_v_coriolis.f \
205 $(SOURCE_CODE)/mom_v_del2v.f \
206 $(SOURCE_CODE)/mom_v_metric_nh.f \
207 $(SOURCE_CODE)/mom_v_metric_sphere.f \
208 $(SOURCE_CODE)/mom_v_rviscflux.f \
209 $(SOURCE_CODE)/mom_v_sidedrag.f \
210 $(SOURCE_CODE)/mom_v_xviscflux.f \
211 $(SOURCE_CODE)/mom_v_yviscflux.f \
212 $(SOURCE_CODE)/mom_vi_calc_absvort3.f \
213 $(SOURCE_CODE)/mom_vi_calc_hdiv.f \
214 $(SOURCE_CODE)/mom_vi_calc_ke.f \
215 $(SOURCE_CODE)/mom_vi_calc_relvort3.f \
216 $(SOURCE_CODE)/mom_vi_coriolis.f \
217 $(SOURCE_CODE)/mom_vi_del2uv.f \
218 $(SOURCE_CODE)/mom_vi_hdissip.f \
219 $(SOURCE_CODE)/mom_vi_u_coriolis.f \
220 $(SOURCE_CODE)/mom_vi_u_grad_ke.f \
221 $(SOURCE_CODE)/mom_vi_u_vertshear.f \
222 $(SOURCE_CODE)/mom_vi_v_coriolis.f \
223 $(SOURCE_CODE)/mom_vi_v_grad_ke.f \
224 $(SOURCE_CODE)/mom_vi_v_vertshear.f \
225 \
226 $(SOURCE_CODE)/packages_init_variables.f \
227 $(SOURCE_CODE)/plot_field.f \
228 $(SOURCE_CODE)/pressure_for_eos.f \
229 $(SOURCE_CODE)/quasihydrostaticterms.f \
230 $(SOURCE_CODE)/solve_for_pressure.f \
231 $(SOURCE_CODE)/state_summary.f \
232 $(SOURCE_CODE)/timestep.f \
233 $(SOURCE_CODE)/the_correction_step.f \
234 $(SOURCE_CODE)/the_main_loop.f \
235 $(SOURCE_CODE)/thermodynamics.f \
236 $(SOURCE_CODE)/timestep_tracer.f \
237 $(SOURCE_CODE)/update_etah.f \
238 $(SOURCE_CODE)/swfrac.f \
239 \
240 $(SOURCE_CODE)/gmredi_calc_diff.f \
241 $(SOURCE_CODE)/gmredi_calc_psi_b.f \
242 $(SOURCE_CODE)/gmredi_calc_tensor.f \
243 $(SOURCE_CODE)/gmredi_calc_uvflow.f \
244 $(SOURCE_CODE)/gmredi_calc_wflow.f \
245 $(SOURCE_CODE)/gmredi_diags.f \
246 $(SOURCE_CODE)/gmredi_init.f \
247 $(SOURCE_CODE)/gmredi_rtransport.f \
248 $(SOURCE_CODE)/gmredi_slope_limit.f \
249 $(SOURCE_CODE)/gmredi_slope_psi.f \
250 $(SOURCE_CODE)/gmredi_xtransport.f \
251 $(SOURCE_CODE)/gmredi_ytransport.f \
252 \
253 $(SOURCE_CODE)/ctrl_init_variables.f \
254 $(SOURCE_CODE)/ctrl_map_ini.f \
255 $(SOURCE_CODE)/ctrl_map_forcing.f \
256 \
257 $(SOURCE_CODE)/cost_final.f \
258 $(SOURCE_CODE)/cost_initvaria.f \
259 $(SOURCE_CODE)/cost_tile.f \
260 $(SOURCE_CODE)/cost_test.f \
261 $(SOURCE_CODE)/cost_tracer.f \
262 $(SOURCE_CODE)/cost_atlantic_heat.f \
263 $(SOURCE_CODE)/cost_vector.f \
264 \
265
266 # $(PKG)/autodiff/ptracers.flow \
267 # $(SOURCE_CODE)/ptracers_advection.f \
268 # $(SOURCE_CODE)/ptracers_convect.f \
269 # $(SOURCE_CODE)/ptracers_cycle.f \
270 # $(SOURCE_CODE)/ptracers_fields_blocking_exchanges.f\
271 # $(SOURCE_CODE)/ptracers_forcing.f \
272 # $(SOURCE_CODE)/ptracers_impldiff.f \
273 # $(SOURCE_CODE)/ptracers_init.f \
274 # $(SOURCE_CODE)/ptracers_integrate.f \
275
276
277 # $(SOURCE_CODE)/kpp_calc.f \
278 # $(SOURCE_CODE)/kpp_calc_diff.f \
279 # $(SOURCE_CODE)/kpp_calc_visc.f \
280 # $(SOURCE_CODE)/kpp_do_diags.f \
281 # $(SOURCE_CODE)/kpp_init.f \
282 # $(SOURCE_CODE)/kpp_open_diags.f \
283 # $(SOURCE_CODE)/kpp_routines.f \
284 # $(SOURCE_CODE)/kpp_transport_s.f \
285 # $(SOURCE_CODE)/kpp_transport_t.f \
286 # \
287 # $(SOURCE_CODE)/shap_filt_apply_ts.f \
288 # $(SOURCE_CODE)/shap_filt_apply_uv.f \
289 # $(SOURCE_CODE)/shap_filt_tracer_s1.f \
290 # $(SOURCE_CODE)/shap_filt_tracer_s2.f \
291 # $(SOURCE_CODE)/shap_filt_tracer_s2g.f \
292 # $(SOURCE_CODE)/shap_filt_tracer_s4.f \
293 # $(SOURCE_CODE)/shap_filt_uv_s1.f \
294 # $(SOURCE_CODE)/shap_filt_uv_s2.f \
295 # $(SOURCE_CODE)/shap_filt_uv_s2g.f \
296 # $(SOURCE_CODE)/shap_filt_uv_s2c.f \
297 # $(SOURCE_CODE)/shap_filt_uv_s4.f \
298
299 # \
300 # $(SOURCE_CODE)/ini_ep.f \
301 # $(SOURCE_CODE)/calc_ep_forcing.f \
302 # $(SOURCE_CODE)/cost_entropy.f \
303 # $(SOURCE_CODE)/cost_t_misfit.f \
304 # $(SOURCE_CODE)/cost_eflux_regul.f \
305 # \
306
307
308 #--------------------------------------------------------
309 # rules
310 #--------------------------------------------------------
311
312 small_f:
313 cd $(SOURCE_CODE); $(MAKE) depend; $(MAKE) small_f
314
315 allcode:
316 cd $(DEST) ; cat $(SRC_MODEL) >! tamc_code.f
317
318 admodeltamc:
319 cd $(DEST) ; $(TAMC) $(ADTAMCFLAG) tamc_code.f \
320 >! tamc_code_ad.prot
321
322 admodeltaf:
323 cd $(DEST) ; $(TAF) $(ADTAFFLAG) tamc_code.f
324
325 ftlmodeltamc:
326 cd $(DEST) ; $(TAMC) $(FTLTAMCFLAG) tamc_code.f \
327 >! tamc_code_ftl.prot
328
329 ftlmodeltaf:
330 cd $(DEST) ; $(TAF) $(FTLTAFFLAG) tamc_code.f
331
332 svdmodeltaf:
333 cd $(DEST) ; $(TAF) $(SVDTAFFLAG) tamc_code.f
334
335 adchange:
336 cp $(PKG)/autodiff/adjoint_model.F_template \
337 $(PKG)/autodiff/adjoint_model.F ; \
338 ${ADJOINT_SCRIPT}/adjoint_sed.com \
339 >! tamc_code_sed_ad.f ; \
340 cp $(PKG)/autodiff/adjoint_model.F \
341 $(PKG)/autodiff/adjoint_model.F_old ; \
342 cat tamc_code_sed_ad.f >> $(PKG)/autodiff/adjoint_model.F
343
344 ftlchange:
345 cp $(PKG)/autodiff/tangentlinear_model.F_template \
346 $(PKG)/autodiff/tangentlinear_model.F ; \
347 cp $(PKG)/autodiff/tangentlinear_model.F \
348 $(PKG)/autodiff/tangentlinear_model.F_old ; \
349 cat tamc_code_ftl.f >> $(PKG)/autodiff/tangentlinear_model.F
350
351 bothchange: adchange ftlchange
352
353 adrestore:
354 cp $(PKG)/autodiff/adjoint_model.F_template \
355 $(PKG)/autodiff/adjoint_model.F
356
357 ftlrestore:
358 cp $(PKG)/autodiff/tangentlinear_model.F_template \
359 $(PKG)/autodiff/tangentlinear_model.F
360
361 bothrestore: adrestore ftlrestore
362
363 adtamc: adrestore ftlrestore small_f allcode admodeltamc
364
365 adtaf: adrestore ftlrestore small_f allcode admodeltaf
366
367 ftltamc: adrestore ftlrestore small_f allcode ftlmodeltamc
368
369 ftltaf: adrestore ftlrestore small_f allcode ftlmodeltaf
370
371 bothtaf: bothrestore small_f allcode admodeltaf ftlmodeltaf
372
373 svdtaf: adrestore ftlrestore small_f allcode svdmodeltaf
374

  ViewVC Help
Powered by ViewVC 1.1.22