/[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.32 - (show annotations) (download)
Fri Oct 10 22:52:01 2003 UTC (18 years, 8 months ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint51k_post, checkpoint51j_post, checkpoint51n_pre, checkpoint51r_post, checkpoint51o_pre, checkpoint51l_pre, checkpoint51l_post, checkpoint51o_post, checkpoint51q_post, checkpoint51t_post, checkpoint51p_post, checkpoint51n_post, checkpoint51m_post, checkpoint51s_post
Branch point for: branch-nonh, tg2-branch, checkpoint51n_branch
Changes since 1.31: +25 -18 lines
move pkg-specific flow directives from pkg/autodiff
to corresponding pkg

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

  ViewVC Help
Powered by ViewVC 1.1.22