/[MITgcm]/manual/s_examples/cfc_offline/offline_tutorial.tex
ViewVC logotype

Contents of /manual/s_examples/cfc_offline/offline_tutorial.tex

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


Revision 1.1 - (show annotations) (download) (as text)
Sun Oct 2 02:18:16 2005 UTC (19 years, 9 months ago) by edhill
Branch: MAIN
File MIME type: application/x-tex
 o add Helen's offline tutorial

1 % \documentstyle[12pt]{report}
2 % \renewcommand{\baselinestretch}{1}
3 % \textwidth 190mm
4 % \textheight 250mm
5 % \topmargin -20mm
6 % \oddsidemargin -15mm
7 % \begin{document}
8
9 \section[Offline Example]{Offline Experiments}
10 \label{www:tutorials}
11 \label{sect:eg-offline}
12
13 %\begin{center}
14 %{\Large \bf Using MITgcm to Perform Offline Tracer Exeriments}
15 %
16 %\vspace*{4mm}
17 %
18 %\vspace*{3mm}
19 %{\large September 2005}
20 %\end{center}
21
22 This document describes a simple experiment using the offline form of
23 the MITgcm.
24
25 \subsection{Overview}
26 \label{www:tutorials}
27
28 This experiment demonstrates use of the offline form of the MITgcm to
29 study advection of a passive tracer. Time-averaged flow-fields and
30 mixing coefficients, deriving from a prior online run, are re-used
31 leaving only the tracer equation to be integrated.
32
33 Figure \ref{FIG:eg-ofline_config} shows a movie of tracer being
34 advected using the offline package of the MITgcm. In the top panel the
35 frames of the movie show the monthly surface evolution of an initially
36 local source of passive tracer. In the lower panel, the frames of the
37 movie show the changing monthly surface evolution where the initial
38 tracer field had a global distribution.
39
40 \subsection{Time-stepping of tracers}
41 \label{www:tutorials}
42
43 \noindent see section 2.15 through 2.18 for details of available
44 tracer time-stepping schemes and their characteristics.
45
46 \subsection{Code Configuration}
47 \label{www:tutorials}
48 \label{SEC:eg_fourl_code_config}
49
50 \noindent The model configuration for this experiment resides under the
51 directory {\it verification/offline}. The experiment files
52 \begin {itemize}
53 \item {\it input/data}
54 \item {\it input/data.off}
55 \item {\it input/data.pkg}
56 \item {\it input/data.ptracers}
57 \item {\it input/eedata}
58 \item {\it input/packages.conf}
59 \item {\it code/PTRACERS\_SIZE.h}
60 \item {\it code/SIZE.h}.
61 \end {itemize}
62
63 \noindent contain the code customisations and parameter settings
64 required to run the example. In addition the following binary data
65 files are required:
66
67 \begin {itemize}
68 \item {\it input/depth\_g77.bin}
69 \item {\it input/tracer1\_.bin}
70 \item {\it input/tracer2\_.bin}
71 \item {\it input/input\_off/uVeltave.0000000001-12.data}
72 \item {\it input/input\_off/vVeltave.0000000001-12.data}
73 \item {\it input/input\_off/wVeltave.0000000001-12.data}
74 \item {\it input/input\_off/Convtave.0000000001-12.data}
75 \end {itemize}
76
77
78 \subsubsection{File {\it input/data}}
79 \label{www:tutorials}
80
81 \noindent This file, reproduced completely below, specifies the main
82 parameters for the experiment.
83
84 \begin{itemize}
85 \item Line 18, 19
86 \begin {verbatim}
87 nIter0 = 0,
88 nTimeSteps = 720,
89 \end{verbatim}
90 \end{itemize}
91
92 \noindent nIter0 and nTimesteps control the start time and the length
93 of the run (in timesteps). If nIter0 is non-zero the model will
94 require appropriate pickup files to be present in the run directory.
95 Where nIter0 is zero, as here, the model makes a fresh start. In this
96 case the model has been prescribed to run for 720 timesteps or 1 year.
97
98 \begin{itemize}
99 \item Line 20
100 \begin {verbatim}
101 deltaTtracer= 43200.0,
102 \end{verbatim}
103 \end{itemize}
104
105 \noindent deltaTtracer is the tracer timestep in seconds, in this
106 case, 12 hours (43200s = 12 hours). Note that deltatTracer must be
107 specified in {\it input/data} as well as specifying deltaToffline in
108 {\it input/data.off}.
109
110 \begin{itemize}
111 \item Line 21
112 \begin {verbatim}
113 deltaTClock= 43200.0,
114 \end{verbatim}
115 \end{itemize}
116
117 \noindent When using the MITgcm in offline mode deltaTClock (an
118 internal model counter) should be made equal to the value assigned to
119 deltatTtracer.
120
121 \begin{itemize}
122 \item Line 27
123 \begin {verbatim}
124 periodicExternalForcing=.TRUE.,
125 \end{verbatim}
126 \end{itemize}
127
128 \noindent periodicExternalForcing is a flag telling the model whether
129 to cyclically re-use forcing data where there is external forcing (see
130 `A More Complcated Example', below). Where there is no external
131 forcing, as here, but where there is to be cyclic re-use of the
132 offline flow and mixing fields, periodicExternalForcing must be
133 assigned the value .TRUE.
134
135 \begin{itemize}
136 \item Line 28
137 \begin {verbatim}
138 externForcingPeriod=2592000.,
139 \end{verbatim}
140 \end{itemize}
141
142 \noindent externForcingPeriod specifies the period of the external
143 forcing data in seconds. In the absence of external forcing, as in
144 this example, it must be made equal to the value of
145 externForcingPeriod in {\it input/data.off}, in this case, monthly
146 (2592000s = 1 month).
147
148 \begin{itemize}
149 \item Line 29
150 \begin {verbatim}
151 externForcingCycle=31104000.,
152 \end{verbatim}
153 \end{itemize}
154
155 \noindent externForcingCycle specifies the duration of the external
156 forcing data cycle in seconds. In the absence of external forcing, as
157 in this example, it must be made equal to the value of
158 externForcingCycle in {\it input/data.off}, in this case, the cycle is
159 one year(31104000s = 1 year).
160
161 \begin{itemize}
162 \item Line 35
163 \begin {verbatim}
164 usingSphericalPolarGrid=.TRUE.,
165 \end{verbatim}
166 \end{itemize}
167
168 \noindent This line requests that the simulation be performed in a
169 spherical polar coordinate system. It affects the interpretation of
170 grid input parameters and causes the grid generation routines to
171 initialize an internal grid based on spherical polar geometry.
172
173 \begin{itemize}
174 \item Line 36
175 \begin {verbatim}
176 delR= 50., 70., 100., 140., 190.,
177 240., 290., 340., 390., 440.,
178 490., 540., 590., 640., 690.,
179 \end{verbatim}
180 \end{itemize}
181
182 \noindent This line sets the vertical grid spacing between each
183 z-coordinate line in the discrete grid. Here the total model depth is
184 $5200\,{\rm m}$.
185
186 \begin{itemize}
187 \item Line 39
188 \begin {verbatim}
189 phiMin=-90.,
190 \end{verbatim}
191 \end{itemize}
192
193 \noindent This line sets the southern boundary of the modeled domain
194 to $0^{\circ}$ latitude. This value affects both the generation of the
195 locally orthogonal grid that the model uses internally and affects the
196 initialization of the coriolis force. Note - it is not required to
197 set a longitude boundary, since the absolute longitude does not alter
198 the kernel equation discretisation.
199
200 \begin{itemize}
201 \item Line 40
202 \begin {verbatim}
203 dxSpacing=2.8125,
204 \end{verbatim}
205 \end{itemize}
206
207 \noindent This line sets the horizontal grid spacing between each
208 y-coordinate line in the discrete grid to $2.8125^{\circ}$ in
209 longitude.
210
211 \begin{itemize}
212 \item Line 41
213 \begin {verbatim}
214 dySpacing=2.8125,
215 \end{verbatim}
216 \end{itemize}
217
218 \noindent This line sets the vertical grid spacing between each
219 x-coordinate line in the discrete grid to $2.8125^{\circ}$ in
220 latitude.
221
222 \begin{itemize}
223 \item Line 46
224 \begin {verbatim}
225 bathyFile='depth_g77.bin',
226 \end{verbatim}
227 \end{itemize}
228
229 \noindent This line specifies the name of the file, in this case {\it
230 depth\_g77.bin}, from which the domain bathymetry is read. This file
231 contains a two-dimensional ($x,y$) map of (assumed 64-bit) binary
232 numbers giving the depth of the model at each grid cell, ordered with
233 the x coordinate varying fastest. The points are ordered from low
234 coordinate to high coordinate for both axes. The units and orientation
235 of the depths in this file are the same as used in the MITgcm code. In
236 this experiment, a depth of $0m$ indicates land.
237
238
239 \begin {verbatim}
240 1 # ====================
241 2 # | Model parameters |
242 3 # ====================
243 4 #
244 5 # Continuous equation parameters
245 6 &PARM01
246 7 &
247 8 #
248 9 # Elliptic solver parameters
249 10 &PARM02
250 11 cg2dMaxIters=1000,
251 12 cg2dTargetResidual=1.E-13,
252 13 &
253 14 #
254 15
255 16 # Time stepping parameters
256 17 &PARM03
257 18 nIter0 = 0,
258 19 nTimeSteps = 720,
259 20 deltaTtracer= 43200.0,
260 21 deltaTClock = 43200.0,
261 22 pChkptFreq=31104000.,
262 23 chkptFreq= 31104000.,
263 24 dumpFreq= 2592000.,
264 25 taveFreq= 311040000.,
265 26 monitorFreq= 1.,
266 27 periodicExternalForcing=.TRUE.,
267 28 externForcingPeriod=2592000.,
268 29 externForcingCycle=31104000.,
269 30 &
270 31 #
271 32 # Gridding parameters
272 33 &PARM04
273 34 usingCartesianGrid=.FALSE.,
274 35 usingSphericalPolarGrid=.TRUE.,
275 36 delR= 50., 70., 100., 140., 190.,
276 37 240., 290., 340., 390., 440.,
277 38 490., 540., 590., 640., 690.,
278 39 phiMin=-90.,
279 40 dxSpacing=2.8125,
280 41 dySpacing=2.8125,
281 42 &
282 43 #
283 44 # Input datasets
284 45 &PARM05
285 46 bathyFile= 'depth_g77.bin',
286 47 &
287 \end{verbatim}
288
289 \subsubsection{File {\it input/data.off}}
290 \label{www:tutorials}
291
292 \noindent {\it input/data.off} provides the MITgcm offline package
293 with package specific parameters. {\it input/data.off} specifies the
294 location (relative to the run directory) and prefix of files
295 describing the flow field (UvelFile, VvelFile, WvelFile) and the
296 corresponding convective mixing coefficients (ConvFile) which together
297 prescribe the three dimensional, time varying dynamic system within
298 which the offline model will advect the tracer.
299
300 \begin{itemize}
301 \item Lines 2 to 5
302 \begin {verbatim}
303 UvelFile= '../input/input_off/uVeltave',
304 VvelFile= '../input/input_off/vVeltave',
305 WvelFile= '../input/input_off/wVeltave',
306 ConvFile= '../input/input_off/Convtave',
307 \end{verbatim}
308 \end{itemize}
309
310 \noindent In the example the offline data is located in the
311 sub-directory {\it input/input\_off}. In this directory are fields
312 describing the velocity and convective mixing histories of a prior
313 forward integration of the MITgcm required for the offline package and
314 identified in {\it input/data\_off}. Based on the values of {\it
315 deltatToffline}, {\it offlineForcingPeriod} and {\it
316 offlineForcingCycle} specified in {\it input/data.off}, since {\it
317 offlineForcingCycle} corresponds to 12 forcing periods {\it
318 offlineForcingPeriod} and since offlineIter0 is zero, there needs to
319 be 12 uVeltave, 12 vVeltave, 12 wVeltave and 12 Convtave files each
320 having a 10 digit sequence identifier between 0000000001 to
321 0000000012, that is, a total of 48 files.
322
323
324 \begin{itemize}
325 \item Line 9
326 \begin {verbatim}
327 offlineIter0=0,
328 \end{verbatim}
329 \end{itemize}
330
331 \noindent offlineIter0, here specified to be 0 timesteps, corresponds
332 to the timestep at which the tracer model is initialised. Note that
333 offlineIter0 and nIter0 (set in {\it input/data}) need not be the
334 same.
335
336 \begin{itemize}
337 \item Line 10
338 \begin {verbatim}
339 deltaToffline=43200.,
340 \end{verbatim}
341 \end{itemize}
342
343
344 \noindent deltatToffline sets the timestep associated with the offline
345 model data in seconds, here 12 hours (43200s = 12 hours).
346
347 \begin{itemize}
348 \item Line 11
349 \begin {verbatim}
350 offlineForcingPeriod=43200.,
351 \end{verbatim}
352 \end{itemize}
353
354 \noindent offlineForcingPeriod sets the forcing period associated with
355 the offline model data in seconds.
356
357 \begin{itemize}
358 \item Line 12
359 \begin {verbatim}
360 offlineForcingCycle=518400.,
361 \end{verbatim}
362 \end{itemize}
363
364 \noindent offlineForcingCycle sets the forcing cycle length associated
365 with the offline model data in seconds. In this example the offline
366 forcing cycle is 6 days, or 12 offline forcing periods. Together
367 deltatToffline, offlineForcingPeriod and offlineForcingCycle determine
368 the value of the 10 digit sequencing tag the model expects files in
369 {\it input/input\_off} to have.
370
371
372 \begin {verbatim}
373 1 &OFFLINE_PARM01
374 2 UvelFile= 'input_off/uVeltave',
375 3 VvelFile= 'input_off/vVeltave',
376 4 WvelFile= 'input_off/wVeltave',
377 5 ConvFile= 'input_off/Convtave',
378 6 &end
379
380 7 &OFFLINE_PARM02
381 8 offlineIter0=0,
382 9 deltaToffline=43200.,
383 10 offlineForcingPeriod=43200.,
384 11 offlineForcingCycle=518400.,
385 12 &end
386 \end{verbatim}
387
388
389 \subsubsection{File {\it input/data.pkg}}
390 \label{www:tutorials}
391
392 \noindent File {\it input/data.pkg}, reproduced completely below,
393 specifies which MITgcm packages ({\it ~/MITgcm/pkg}) are to be used.
394
395
396 \begin {itemize}
397 \item Line 3
398 \begin {verbatim}
399 usePTRACERS=.TRUE.,
400 \end{verbatim}
401 \end{itemize}
402
403 \noindent usePTRACERS is a flag invoking the ptracers package which is
404 responsible for the advection of the tracer within the model.
405
406 \begin {verbatim}
407 1 # Packages
408 2 &PACKAGES
409 3 usePTRACERS=.TRUE.,
410 4 &
411 \end{verbatim}
412
413 \subsubsection{File {\it input/data.ptracers}}
414 \label{www:tutorials}
415
416 \noindent File {\it input/data.ptracers}, reproduced completely below,
417 provides the MITgcm ptracers package with package specific parameters,
418 prescribing the nature of the the tracer/tracers as well as the
419 variables associated with their advection.
420
421 \begin{itemize}
422 \item Line 2
423 \begin {verbatim}
424 PTRACERS_numInUse=2,
425 \end{verbatim}
426 \end{itemize}
427
428 \noindent PTRACERS\_numInUse tells the model how many separate tracers
429 are to be advected, in this case 2. Note: The value of
430 PTRACERS\_numInUse must agree with the value specified in {\it
431 code/PTRACERS\_SIZE.h} - see {\it code/PTRACERS\_SIZE.h} below.
432
433 \begin{itemize}
434 \item Line 3
435 \begin {verbatim}
436 PTRACERS_Iter0= 0,
437 \end{verbatim}
438 \end{itemize}
439
440 \noindent PTRACERS\_Iter0 specifies the iteration at which the tracer
441 is to be introduced. In this case the tracer is initialised at the
442 start of the simulation. i.e. PTRACERS\_Iter0 = PTRACERS\_nIter0.
443
444 \begin{itemize}
445 \item Lines 5 and 10
446 \begin {verbatim}
447 PTRACERS_advScheme(1)=77,
448 \end{verbatim}
449 \end{itemize}
450
451 \noindent PTRACERS\_advScheme(n) identifies which advection scheme
452 will be used for tracer n, where n is the number of the tracer up to
453 PTRACERS\_numInUse. See section 2.18, 'Comparison of advection
454 schemes', to identify the numerical codes used to specify different
455 advection schemes (e.g. centered 2nd order, 3rd order upwind) as well
456 as details of each.
457
458 \begin{itemize}
459 \item Lines 6 and 11
460 \begin{verbatim}
461 PTRACERS_diffKh(1)=1.E3,
462 \end{verbatim}
463 \end{itemize}
464
465 \noindent PTRACERS\_diffKh(n) is the horizontal diffusion coefficient
466 for tracer n, where n is the number of the tracer up to
467 PTRACERS\_numInUse.
468
469 \begin {itemize}
470 \item Lines 7 and 12
471 \begin{verbatim}
472 PTRACERS_diffKr(1)=5.E-5,
473 \end{verbatim}
474 \end{itemize}
475
476 \noindent PTRACERS\_diffKr(n) is the vertical diffusion coefficient
477 for tracer n, where n is the number of the tracer up to
478 PTRACERS\_numInUse.
479
480 \begin {itemize}
481 \item Lines 8 and 13
482 \begin{verbatim}
483 PTRACERS_initialFile(1)='tracer1.bin',
484 \end{verbatim}
485 \end{itemize}
486
487 \noindent PTRACERS\_initialFile(n) identifies the initial tracer field
488 to be associated with tracer n, where n is the number of the tracer up
489 to PTRACERS\_numInUse. In this example file {\it input/tracer1.bin}
490 contains localised tracer, {\it input/tracer2.bin} contains an
491 arbitrary global distribution. Included Matlab script {\it
492 input/makeinitialtracer.m} provides a template for generating or
493 manipulating initial tracer fields.
494
495 \begin {verbatim}
496 1 &PTRACERS_PARM01
497 2 PTRACERS_numInUse=2,
498 3 PTRACERS_Iter0= 0,
499 4 # tracer 1
500 5 PTRACERS_advScheme(1)=77,
501 6 PTRACERS_diffKh(1)=1.E3,
502 7 PTRACERS_diffKr(1)=5.E-5,
503 8 PTRACERS_initialFile(1)='tracer1.bin',
504 9 # tracer 2
505 10 PTRACERS_advScheme(2)=77,
506 11 PTRACERS_diffKh(2)=1.E3,
507 12 PTRACERS_diffKr(2)=5.E-5,
508 13 PTRACERS_initialFile(2)='tracer2.bin',
509 14 &
510 \end{verbatim}
511
512 \noindent Note {\it input/data.ptracers} requires a set of entries for
513 each tracer.
514
515 \subsubsection{File {\it input/eedata}}
516 \label{www:tutorials}
517 \noindent This file uses standard default values and does not contain
518 customisations for this experiment.
519
520 \noindent The following code changes are required to run this exaperiment.
521
522 \subsubsection{File {\it code/packages.conf}}
523 \label{www:tutorials}
524
525 \noindent This file is used to invoke the model components required
526 for a particuylar implementation of the MITgcm. In this case the {\it
527 code/packages.conf} contains the component names:
528
529 \begin {verbatim}
530 ptracers
531 generic_advdiff
532 mdsio
533 mom_fluxform
534 mom_vecinv
535 timeave
536 rw
537 monitor
538 offline
539 \end{verbatim}
540
541 \subsubsection{File {\it code/PTRACERS\_SIZE.h}}
542 \label{www:tutorials}
543 \begin{itemize}
544 \item Line
545 \begin{verbatim}
546 PARAMETER(PTRACERS_num = 2 )
547 \end{verbatim}
548 \end{itemize}
549
550 \noindent This line sets the parameters PTRACERS\_num (the number of
551 tracers to be integrated) to 2 (in agreement with {\it
552 input/data.ptracers}).
553
554 \subsubsection{File {\it code/SIZE.h}}
555 \label{www:tutorials}
556
557 \noindent Two lines are customized in this file for the current
558 experiment
559
560 \begin{itemize}
561
562 \item Line 39,
563 \begin{verbatim} sNx=128, \end{verbatim} \noindent this line sets
564 the lateral domain extent in grid points for the
565 axis aligned with the x-coordinate.
566
567 \item Line 40,
568 \begin{verbatim} sNy=64, \end{verbatim}
569 \noindent this line sets
570 the lateral domain extent in grid points for the
571 axis aligned with the y-coordinate.
572
573 \item Line 49,
574 \begin{verbatim} Nr=15, \end{verbatim}
575 \noindent this line sets
576 the vertical domain extent in grid points.
577
578 \end{itemize}
579
580
581 \subsection{Running The Example}
582 \label{www:tutorials}
583 \label{SEC:running_the_example}
584
585 \subsubsection{Code Download}
586 \label{www:tutorials}
587
588 In order to run the examples you must first download the code
589 distribution. Instructions for downloading the code can be found in
590 section \ref{sect:obtainingCode}.
591
592 \subsubsection{Experiment Location}
593 \label{www:tutorials}
594
595 This example experiment is located under the release sub-directory
596
597 \vspace{5mm}
598 {\it verification/offline/ }
599
600 \subsubsection{Running the Experiment}
601 \label{www:tutorials}
602
603 To run the experiment
604
605 \begin{enumerate}
606 \item Set the current directory to {\it input/ }
607
608 \begin{verbatim}
609 % cd input
610 \end{verbatim}
611
612 \item Verify that current directory is now correct
613
614 \begin{verbatim}
615 % pwd
616 \end{verbatim}
617
618 You should see a response on the screen ending in {\it
619 verification/offline/input }
620
621 \item Copy the contents of {\it input/} including subdirectory {\it
622 input/input\_off/} to a new directory called {\it run/}
623
624 \item Listing directory {\it run/} you should see:
625
626 \begin {verbatim}
627 data data.pkg depth_g77.bin input_off tracer2.bin
628 data.off data.ptracers eedata tracer1.bin
629 \end{verbatim}
630
631
632 \item Set the current directory to {\it run/ }
633
634
635 \item Run the genmake script to create the experiment {\it Makefile}
636
637 \begin {verbatim}
638 % ../../../tools/genmake2 -mods=../code
639 \end{verbatim}
640
641 \item Create a list of header file dependencies in {\it Makefile}
642
643 \begin {verbatim}
644 % make depend
645 \end{verbatim}
646
647 \item Build the executable file.
648
649 \begin {verbatim}
650 % make
651 \end{verbatim}
652
653 \item Run the {\it mitgcmuv} executable
654
655 \begin {verbatim}
656 % ./mitgcmuv
657 \end{verbatim}
658
659 \end{enumerate}
660
661 Besides the input files and the files the model generates describing
662 the grid (prefixed Depth, DXC, DXG, hFacC, hFacS and hFacW, you should
663 now have 26 single precision binary files
664 PTRACER01.0000000000-0000000720.001.001.data and
665 PTRACER02.0000000000-0000000720.001.001.data and their 26
666 corresponding meta files as well as a single pickup file,
667 pickup\_ptracers.0000000720.001.001.data and its corresponding meta
668 file pickup\_ptracers.0000000720.001.001.meta. To run on simply change
669 nIter0 in file {\it run/data} to 720...
670
671 \subsection{A more complicated example}
672
673 \noindent The last example demonstrated simple advection of a passive
674 tracer using the offline form of the MITgcm. Now we present a more
675 complicated example in which the model is used to explore
676 contamination of the global ocean through surface exposure to CFC's
677 during the last century. In invoking packages gchem, gmredi and cfc it
678 provides a starting point and template for more complicated offline
679 modeling, involving as it does surface forcing through wind and ice
680 fields, more sophisticated mixing and a time-varying forcing funtion.
681
682 \vspace{0.5cm}
683
684 \noindent The model configuration for this experiment resides under
685 the directory {\it verification/cfc\_offline}. The experiment files
686
687 \begin{itemize}
688 \item {\it input/data}
689 \item {\it input/data.gchem}
690 \item {\it input/data.gmredi}
691 \item {\it input/data.off}
692 \item {\it input/data.pkg}
693 \item {\it input/data.ptracers}
694 \item {\it input/eedata}
695 \item {\it code/GCHEM\_OPTIONS.h}
696 \item {\it code/GMREDI\_OPTIONS.h}
697 \item {\it input/packages.conf}
698 \item {\it code/PTRACERS\_SIZE.h}
699 \item {\it code/SIZE.h}.
700 \end{itemize}
701
702 \noindent contain all the code customisations and parameter settings
703 required.
704
705 \noindent The full list of other files required becomes:
706
707 \begin{verbatim}
708 cfc1112.atm data.ptracers
709 data depth_g77.bin pickup.0004269600.data
710 data.gchem eedata
711 data.gmredi ice.bin pickup_ptracers.0004269600.data
712 data.off data.pkg tren_speed.bin
713 \end{verbatim}
714
715 \noindent and
716
717 \begin{verbatim}
718 input_off/:
719 Convtave.0004248060.data GM_Kwz-T.0004248060.data uVeltave.0004248060.data
720 Convtave.0004248060.meta GM_Kwz-T.0004248060.meta uVeltave.0004248060.meta
721 Convtave.0004248720.data GM_Kwz-T.0004248720.data uVeltave.0004248720.data
722 Convtave.0004248720.meta GM_Kwz-T.0004248720.meta uVeltave.0004248720.meta
723 GM_Kwx-T.0004248060.data Stave.0004248060.data vVeltave.0004248060.data
724 GM_Kwx-T.0004248060.meta Stave.0004248060.meta vVeltave.0004248060.meta
725 GM_Kwx-T.0004248720.data Stave.0004248720.data vVeltave.0004248720.data
726 GM_Kwx-T.0004248720.meta Stave.0004248720.meta vVeltave.0004248720.meta
727 GM_Kwy-T.0004248060.data Ttave.0004248060.data wVeltave.0004248060.data
728 GM_Kwy-T.0004248060.meta Ttave.0004248060.meta wVeltave.0004248060.meta
729 GM_Kwy-T.0004248720.data Ttave.0004248720.data wVeltave.0004248720.data
730 GM_Kwy-T.0004248720.meta Ttave.0004248720.meta wVeltave.0004248720.meta
731 \end{verbatim}
732
733
734 \subsubsection{File {\it input/data}}
735 \label{www:tutorials}
736
737 \noindent A single line must be added (under PARM01, between lines 6
738 and 7) in file {\it input/data} from the previous example
739
740 \begin{verbatim}
741 &PARM01
742 implicitDiffusion=.TRUE.,
743 &
744 \end{verbatim}
745
746 \noindent When package GMREDI is used, the flag implicitDiffusion must
747 be assigned the value .TRUE. For information about MITgcm package
748 GMREDI see...
749
750 \vspace{0.5cm}
751 \noindent In this example the starting timestep nIter0 is set to
752 4269600 requiring model access to pickup files with the timetag
753 0004269600. The model will run for 4 timesteps (nTimeSteps = 4). In
754 this case the frequencies with which permanent and rolling checkpoints
755 (pChkptFreq and chkptFreq) have been set is sufficiently long to
756 ensure that only one from the last timestep will be written. This is
757 also true of the values that have been assigned to the frequency with
758 which dumps are written (dumpFreq) and time averaging (taveFreq) is
759 performed however since the model always dumps the state of the model
760 when it stops without error a dump will be written with timetag
761 0004269604 upon completion.
762
763
764 \subsubsection{File {\it input/data.off}}
765 \label{www:tutorials}
766
767 \noindent File {\it input/data.off}, reproduced in full below,
768 specifies the prefixes and locations of additional input files
769 required to run the offline model. Note that {\it input/input\_off}
770 contains only as many offline files as are required to successfully
771 run for 4 timesteps. Where the GMREDI scheme was used in the forward
772 run, as here, package GMREDI must again be invoked when running
773 offline. In this example tracer is specified as having beeen
774 introduced with a non-zero starttime, at timestep 4248000.
775
776 \begin {verbatim}
777 1 &OFFLINE_PARM01
778 2 UvelFile= '../input/input_off/uVeltave',
779 3 VvelFile= '../input/input_off/vVeltave',
780 4 WvelFile= '../input/input_off/wVeltave',
781 5 GMwxFile= '../input/input_off/GM_Kwx-T',
782 6 GMwyFile= '../input/input_off/GM_Kwy-T',
783 7 GMwzFile= '../input/input_off/GM_Kwz-T',
784 8 ConvFile= '../input/input_off/Convtave',
785 9 &end
786
787 10 &OFFLINE_PARM02
788 11 offlineIter0=4248000,
789 12 deltaToffline=43200.,
790 13 offlineForcingPeriod=2592000.,
791 14 offlineForcingCycle=31104000.,
792 15 &end
793 \end{verbatim}
794
795 \subsubsection{File {\it input/data.pkg}}
796 \label{www:tutorials}
797
798 \noindent File {\it input/data.pkg}, reproduced completely below,
799 specifies which MITgcm packages ({\it ~/MITgcm/pkg}) are to be used.
800 It now invokes additional packages {\it pkg/gmredi} and {pkg/gchem}.
801
802 \begin {verbatim}
803 1 # Packages
804 2 &PACKAGES
805 3 useGMRedi=.TRUE.,
806 4 usePTRACERS=.TRUE.,
807 5 useGCHEM=.TRUE.,
808 6 &
809
810 \end{verbatim}
811
812
813 \subsubsection{File {\it input/data.ptracers}}
814 \label{www:tutorials}
815
816 \noindent File {\it input/data.ptracers}, reproduced completely below,
817 specifies parameters associated with the CFC11 and CFC12 tracer fields
818 advected in this example.
819
820
821 \begin{itemize}
822 \item Line 3
823 \begin {verbatim}
824 PTRACERS_Iter0= 4248000,
825 \end{verbatim}
826 \end{itemize}
827
828 \noindent In this example the tracers were introduced at iteration
829 4248000.
830
831 \begin{itemize}
832 \item Lines 7 and 14
833 \begin {verbatim}
834 PTRACERS_diffKh(n)=0.E3,
835 \end{verbatim}
836 \end{itemize}
837
838 \noindent Since package GMREDI is being used, regular horizontal
839 diffusion is set to zero.
840
841 \begin{itemize}
842 \item Lines 9,10 and 16,17
843 \begin {verbatim}
844 PTRACERS_useGMRedi(n)=.TRUE. ,
845 PTRACERS_useKPP(n)=.FALSE. ,
846 \end{verbatim}
847 \end{itemize}
848
849 \noindent Setting flag PTRACERS\_useGMRedi(n) to .TRUE. identifies
850 that package GMREDI is to be used. Setting flag PTRACERS\_useKPP(n) to
851 .FALSE. explicitly turns off KPP mixing.
852
853 \begin{itemize}
854 \item Lines 11 and 18
855 \begin {verbatim}
856 PTRACERS_initialFile(n)=' ',
857 \end{verbatim}
858 \end{itemize}
859
860 \noindent Since this is a `pickup' run the initial tracer files
861 PTRACERS\_initialFile(1) and PTRACERS\_initialFile(2) aree not needed.
862 The model will obtain the tracer state from
863 pickup\_ptracers.0004269600.data
864
865 \begin {verbatim}
866 1 &PTRACERS_PARM01
867 2 PTRACERS_numInUse=2,
868 3 PTRACERS_Iter0= 4248000,
869 4 #
870 5 # tracer 1 - CFC11
871 6 PTRACERS_advScheme(1)=77,
872 7 PTRACERS_diffKh(1)=0.E3,
873 8 PTRACERS_diffKr(1)=5.E-5,
874 9 PTRACERS_useGMRedi(1)=.TRUE. ,
875 10 PTRACERS_useKPP(1)=.FALSE. ,
876 11 PTRACERS_initialFile(1)=' ',
877 12 # tracer 2 - CFC12
878 13 PTRACERS_advScheme(2)=77,
879 14 PTRACERS_diffKh(2)=0.E3,
880 15 PTRACERS_diffKr(2)=5.E-5,
881 16 PTRACERS_useGMRedi(2)=.TRUE. ,
882 17 PTRACERS_useKPP(2)=.FALSE. ,
883 18 PTRACERS_initialFile(2)=' ',
884 19 &
885 \end{verbatim}
886
887
888 \subsubsection{File {\it input/data.gchem}}
889 \label{www:tutorials}
890
891 \noindent File {\it input/data.gchem}, reproduced completely below,
892 names the forcing files needed in package GCHEM.
893
894 \begin{itemize}
895 \item Line 3
896 \begin {verbatim}
897 iceFile='ice.bin',
898 \end{verbatim}
899 \end{itemize}
900
901 \noindent File {\it input/ice.bin} contains 12, monthly surface ice
902 fields.
903
904 \begin{itemize}
905 \item Line 3
906 \begin {verbatim}
907 iceFile='tren_speed.bin',
908 \end{verbatim}
909 \end{itemize}
910
911 \noindent File {\it input/tren\_speed.bin} contains 12, monthly
912 surface wind fields.
913
914 \begin {verbatim}
915 1 &GCHEM_PARM01
916 2 iceFile='fice.bin',
917 3 windFile='tren_speed.bin',
918 4 &
919 \end{verbatim}
920
921 \noindent Package GCHEM is described in detail in section ??
922
923 \subsubsection{File {\it input/data.gmredi}}
924 \label{www:tutorials}
925
926 \noindent File {\it input/data.gmredi}, reproduced completely below,
927 provides the parameters required for package GMREDI.
928
929 \begin {verbatim}
930 1 &GM_PARM01
931 2 GM_background_K = 1.e+3,
932 3 GM_taper_scheme = 'gkw91',
933 4 GM_maxSlope = 1.e-2,
934 5 GM_Kmin_horiz = 100.,
935 6 GM_Scrit = 4.e-3,
936 7 GM_Sd = 1.e-3,
937 8 &
938 \end{verbatim}
939
940 \noindent Package GMREDI is described in detail in section ??
941
942 \subsubsection{File {\it input/cfc1112.atm}}
943 \label{www:tutorials}
944
945 \noindent File {\it input/cfc1112.atm} is a text file containing the
946 CFC source functions over the northern and southern hemispheres
947 annually from 1931 through 1998.
948
949 \subsubsection{File {\it code/packages.conf}}
950 \label{www:tutorials}
951
952 \noindent In this example {\it code/packages.conf} additionally
953 invokes components gchem, cfc and rmredi:
954
955 \begin {verbatim}
956 ptracers
957 generic_advdiff
958 mdsio
959 mom_fluxform
960 mom_vecinv
961 timeave
962 rw
963 monitor
964 offline
965 gchem
966 cfc
967 gmredi
968 \end{verbatim}
969
970 \subsubsection{File {\it code/GCHEM\_OPTIONS.h}}
971 \label{www:tutorials}
972
973 \noindent File {\it code/GCHEM\_OPTIONS.h}, specifies options for
974 package GCHEM. In this case defining the flag ALLOW\_CFC to activate
975 the cfc code.
976
977 \subsubsection{File {\it code/GMREDI\_OPTIONS.h}}
978 \label{www:tutorials}
979
980 \noindent File {\it code/GCHEM\_OPTIONS.h}, specifies options for
981 package GMREDI.
982
983 \subsubsection{File {\it code/PTRACERS\_SIZE.h}}
984 \label{www:tutorials}
985
986 \noindent File {\it code/PTRACERS\_SIZE.h} is unchanged from the
987 simpler example.
988
989 \subsubsection{File {\it code/SIZE.h}}
990 \label{www:tutorials}
991
992 \noindent File {\it code/SIZE.h} is unchanged from the simpler
993 example.
994
995
996 \subsubsection{Running the Experiment}
997 \label{www:tutorials}
998
999 The model is run as before and produces the files the model generates
1000 describing the grid (prefixed Depth, DXC, DXG, hFacC, hFacS and hFacW)
1001 as well as 2, single precision, binary files
1002 PTRACER01.0004269600-0004269604.001.001.data and
1003 PTRACER02.0004269600-0004269604.001.001.data and their 2 corresponding
1004 meta files as well as a single pickup file,
1005 pickup\_ptracers.ckptA.001.001.data and its corresponding meta file
1006 pickup\_ptracers.ckptA.001.001.meta from which you could run the model
1007 on.
1008
1009 %% \end{document}
1010
1011
1012

  ViewVC Help
Powered by ViewVC 1.1.22