ROMS
Loading...
Searching...
No Matches
double_gyre.h
Go to the documentation of this file.
1/*
2** git $id$
3*******************************************************************************
4** copyright(c) 2002-2025 the roms group **
5** licensed under a mit/x style license **
6** see license_roms.md **
7*******************************************************************************
8**
9** options for 4dvar Data assimilation toy.
10**
11** application flag: double_gyre
12** input script: roms_double_gyre.in
13**
14**
15** available driver options: choose only one and activate it in the
16** build.sh script(my_cpp_flags definition)
17**
18** ad_sensitivity adjoint sensitivity
19** aft_eigenmodes adjoint finite time eigenmodes
20** correlation background-error correlation check
21** gradient_check tlm/adm gradient check
22** forcing_sv forcing singular vectors
23** ft_eigenmodes finite time eigenmodes
24** i4dvar incremental, strong constraint 4d-var
25** nlm_driver nonlinear basic state trajectory
26** opt_perturbation optimal perturbations
27** picard_test picard iterations tes
28** rbl4dvar strong/weak constraint rbl4d-var
29** r4dvar strong/weak constraint r4d-var
30** r_symmetry representer matrix symmetry tes
31** sanity_check sanity check
32** so_semi stochastic optimals: semi-norm
33** tlm_check tangent linear model check
34*/
35
36#define SOLVE3D
37
38/*
39**-----------------------------------------------------------------------------
40** nonlinear basic state tracjectory.
41**-----------------------------------------------------------------------------
42*/
43
44#if defined NLM_DRIVER
45# if defined SOLVE3D /* 3D Application */
46# undef UV_C2ADVECTION
47# define UV_ADV
48# define UV_COR
49# define UV_LDRAG
50# define UV_VIS2
51# define MIX_S_UV
52# undef MIX_GEO_UV
53# undef WJ_GRADP
54# define DJ_GRADPS
55# define SPLINES_VDIFF
56# define SPLINES_VVISC
57# define TS_DIF2
58# undef TS_DIF4
59# define MIX_S_TS
60# undef MIX_GEO_TS
61# undef MIX_ISO_TS
62# define NONLIN_EOS
63# define SALINITY
64# define AVERAGES
65# define ANA_GRID
66# undef MY25_MIXING
67# if defined MY25_MIXING
68# undef KANTHA_CLAYSON
69# undef CANUTO_A
70# undef N2S2_HORAVG
71# define RI_SPLINES
72# endif
73# undef ANA_INITIAL
74# define ANA_TCLIMA
75# define ANA_SMFLUX
76# define ANA_STFLUX
77# define ANA_SSFLUX
78# define ANA_BSFLUX
79# define ANA_BTFLUX
80# undef ANA_VMIX
81# undef VERIFICATION
82# define FORWARD_RHS
83# define FORWARD_WRITE
84# define OUT_DOUBLE
85# else /* 2D Application */
86# undef UV_C2ADVECTION
87# define UV_ADV
88# define UV_COR
89# define UV_LDRAG
90# define UV_VIS2
91# define AVERAGES
92# define ANA_GRID
93# undef ANA_INITIAL
94# define ANA_SMFLUX
95# undef FORWARD_RHS
96# undef FORWARD_WRITE
97# undef OUT_DOUBLE
98# endif
99#endif
100
101/*
102**-----------------------------------------------------------------------------
103** picard iteration test.
104**-----------------------------------------------------------------------------
105*/
106
107#if defined PICARD_TEST
108# if defined SOLVE3D /* 3D Application */
109# undef UV_C2ADVECTION
110# define UV_ADV
111# define UV_COR
112# define UV_LDRAG
113# define UV_VIS2
114# define MIX_S_UV
115# undef MIX_GEO_UV
116# undef WJ_GRADP
117# define DJ_GRADPS
118# define SPLINES_VDIFF
119# define SPLINES_VVISC
120# define TS_DIF2
121# undef TS_DIF4
122# undef MIX_S_TS
123# undef MIX_GEO_TS
124# define MIX_ISO_TS
125# define NONLIN_EOS
126# define ANA_GRID
127# undef ANA_INITIAL
128# undef ANA_TCLIMA
129# define ANA_SMFLUX
130# define ANA_STFLUX
131# define ANA_BTFLUX
132# undef ANA_VMIX
133# undef IMPULSE
134# undef FORWARD_RHS
135# define FORWARD_READ
136# define FORWARD_WRITE
137# undef RST_SINGLE
138# define OUT_DOUBLE
139# else /* 2D Application */
140# undef UV_C2ADVECTION
141# define UV_ADV
142# define UV_COR
143# define UV_LDRAG
144# define UV_VIS2
145# undef UV_VIS4
146# define ANA_GRID
147# undef ANA_INITIAL
148# define ANA_SMFLUX
149# undef FORWARD_RHS
150# define FORWARD_READ
151# define FORWARD_WRITE
152# define OUT_DOUBLE
153# endif
154#endif
155
156/*
157**-----------------------------------------------------------------------------
158** generalized stability theory analysis.
159**-----------------------------------------------------------------------------
160*/
161
162#if defined AFT_EIGENMODES || defined FT_EIGENMODES || \
163 defined forcing_sv || defined opt_perturbation || \
164 defined so_semi
165# if defined SOLVE3D /* 3D Application */
166# define UV_ADV
167# define UV_LDRAG
168# define UV_VIS2
169# define MIX_S_UV
170# define UV_COR
171# define TS_DIF2
172# define MIX_S_TS
173# define DJ_GRADPS
174# define NONLIN_EOS
175# define ANA_GRID
176# define ANA_TCLIMA
177# define ANA_GRID
178# define ANA_INITIAL
179# define ANA_SMFLUX
180# define ANA_STFLUX
181# define ANA_BTFLUX
182# define FORWARD_READ
183# else /* 2D Application */
184# define UV_ADV
185# define UV_VIS2
186# define UV_COR
187# define UV_LDRAG
188# define ANA_GRID
189# define ANA_INITIAL
190# define ANA_SMFLUX
191# define FORWARD_READ
192# endif
193#endif
194
195/*
196**-----------------------------------------------------------------------------
197** variational Data assimilation.
198**-----------------------------------------------------------------------------
199*/
200
201#if defined CORRELATION || defined I4DVAR || \
202 defined rbl4dvar || defined r4dvar || \
203 defined r_symmetry || defined tlm_check
204# if defined SOLVE3D /* 3D Application */
205# undef UV_C2ADVECTION
206# undef UV_C4ADVECTION
207# undef UV_SADVECTION
208# define UV_ADV
209# define UV_COR
210# define UV_LDRAG
211# define UV_VIS2
212# define MIX_S_UV
213# undef MIX_GEO_UV
214# undef WJ_GRADP
215# define DJ_GRADPS
216# define SPLINES_VDIFF
217# define SPLINES_VVISC
218# undef TS_FIXED
219# define TS_DIF2
220# define MIX_S_TS
221# undef MIX_GEO_TS
222# undef NONLIN_EOS
223# define SALINITY
224# undef ANA_INITIAL
225# define ANA_GRID
226# define ANA_TCLIMA
227# define ANA_SMFLUX
228# define ANA_STFLUX
229# define ANA_SSFLUX
230# define ANA_BTFLUX
231# define ANA_BSFLUX
232# define FORWARD_WRITE
233# define FORWARD_READ
234# undef FULL_GRID
235# define OUT_DOUBLE
236# define VCONVOLUTION
237# define IMPLICIT_VCONV
238# ifdef R4DVAR
239# define RPM_RELAXATION
240# endif
241# else /* 2D Application */
242# undef UV_C2ADVECTION
243# define UV_ADV
244# define UV_LDRAG
245# define UV_VIS2
246# undef UV_VIS4
247# define UV_COR
248# undef AVERAGES
249# define ANA_GRID
250# undef ANA_INITIAL
251# define ANA_SMFLUX
252# define FORWARD_WRITE
253# define FORWARD_READ
254# define OUT_DOUBLE
255# endif
256#endif
257
258/*
259**-----------------------------------------------------------------------------
260** sanity check.
261**-----------------------------------------------------------------------------
262*/
263
264#if defined SANITY_CHECK
265# if defined SOLVE3D /* 3D Application */
266# undef UV_C2ADVECTION
267# define UV_C4ADVECTION
268# undef UV_SADVECTION
269# define UV_ADV
270# define UV_COR
271# define UV_LDRAG
272# undef UV_QDRAG
273# undef UV_VIS2
274# define UV_VIS4
275# undef MIX_S_UV
276# define MIX_GEO_UV
277# define WJ_GRADP
278# undef DJ_GRADPS
279# define SPLINES_VDIFF
280# define SPLINES_VVISC
281# define TS_DIF2
282# undef TS_DIF4
283# define MIX_S_TS
284# undef MIX_GEO_TS
285# undef MIX_ISO_TS
286# define NONLIN_EOS
287# define ANA_INITIAL
288# define ANA_GRID
289# define ANA_TCLIMA
290# define ANA_SMFLUX
291# define ANA_STFLUX
292# define ANA_BTFLUX
293# define ANA_PERTURB
294# define SANITY_CHECK
295# define FORWARD_READ
296# undef OUT_DOUBLE
297# else /* 2D Application */
298# define UV_ADV
299# define UV_VIS2
300# undef UV_VIS4
301# define UV_COR
302# define UV_LDRAG
303# define ANA_GRID
304# define ANA_INITIAL
305# define ANA_SMFLUX
306# define ANA_PERTURB
307# define FORWARD_READ
308# endif
309#endif
310
311/*
312**-----------------------------------------------------------------------------
313** 3d double-gyre adjoint sensitivity.
314**-----------------------------------------------------------------------------
315*/
316
317#if defined AD_SENSITIVITY
318# if defined SOLVE3D /* 3D Application */
319# undef UV_C2ADVECTION
320# undef UV_C4ADVECTION
321# undef UV_SADVECTION
322# define UV_ADV
323# define UV_COR
324# define UV_LDRAG
325# define UV_VIS2
326# define MIX_S_UV
327# undef MIX_GEO_UV
328# undef WJ_GRADP
329# undef DJ_GRADPS
330# define SPLINES_VDIFF
331# define SPLINES_VVISC
332# define TS_DIF2
333# define MIX_S_TS
334# undef MIX_GEO_TS
335# define NONLIN_EOS
336# define AVERAGES
337# undef ANA_INITIAL
338# define ANA_GRID
339# define ANA_TCLIMA
340# define ANA_SMFLUX
341# define ANA_STFLUX
342# define ANA_BTFLUX
343# define ANA_SCOPE
344# define AD_SENSITIVITY
345# define FORWARD_READ
346# define OUT_DOUBLE
347# endif
348#endif