/[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.3 - (show annotations) (download) (as text)
Tue Jan 15 17:34:49 2008 UTC (17 years, 6 months ago) by cnh
Branch: MAIN
Changes since 1.2: +1 -0 lines
File MIME type: application/x-tex
Added label bits

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/tutorial\_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 \label{sect:eg-offline-cfc}
673
674 \noindent The last example demonstrated simple advection of a passive
675 tracer using the offline form of the MITgcm. Now we present a more
676 complicated example in which the model is used to explore
677 contamination of the global ocean through surface exposure to CFC's
678 during the last century. In invoking packages gchem, gmredi and cfc it
679 provides a starting point and template for more complicated offline
680 modeling, involving as it does surface forcing through wind and ice
681 fields, more sophisticated mixing and a time-varying forcing funtion.
682
683 \vspace{0.5cm}
684
685 \noindent The model configuration for this experiment resides under
686 the directory {\it verification/cfc\_offline}. The experiment files
687
688 \begin{itemize}
689 \item {\it input/data}
690 \item {\it input/data.gchem}
691 \item {\it input/data.gmredi}
692 \item {\it input/data.off}
693 \item {\it input/data.pkg}
694 \item {\it input/data.ptracers}
695 \item {\it input/eedata}
696 \item {\it code/GCHEM\_OPTIONS.h}
697 \item {\it code/GMREDI\_OPTIONS.h}
698 \item {\it input/packages.conf}
699 \item {\it code/PTRACERS\_SIZE.h}
700 \item {\it code/SIZE.h}.
701 \end{itemize}
702
703 \noindent contain all the code customisations and parameter settings
704 required.
705
706 \noindent The full list of other files required becomes:
707
708 \begin{verbatim}
709 cfc1112.atm data.ptracers
710 data depth_g77.bin pickup.0004269600.data
711 data.gchem eedata
712 data.gmredi ice.bin pickup_ptracers.0004269600.data
713 data.off data.pkg tren_speed.bin
714 \end{verbatim}
715
716 \noindent and
717
718 \begin{verbatim}
719 input_off/:
720 Convtave.0004248060.data GM_Kwz-T.0004248060.data uVeltave.0004248060.data
721 Convtave.0004248060.meta GM_Kwz-T.0004248060.meta uVeltave.0004248060.meta
722 Convtave.0004248720.data GM_Kwz-T.0004248720.data uVeltave.0004248720.data
723 Convtave.0004248720.meta GM_Kwz-T.0004248720.meta uVeltave.0004248720.meta
724 GM_Kwx-T.0004248060.data Stave.0004248060.data vVeltave.0004248060.data
725 GM_Kwx-T.0004248060.meta Stave.0004248060.meta vVeltave.0004248060.meta
726 GM_Kwx-T.0004248720.data Stave.0004248720.data vVeltave.0004248720.data
727 GM_Kwx-T.0004248720.meta Stave.0004248720.meta vVeltave.0004248720.meta
728 GM_Kwy-T.0004248060.data Ttave.0004248060.data wVeltave.0004248060.data
729 GM_Kwy-T.0004248060.meta Ttave.0004248060.meta wVeltave.0004248060.meta
730 GM_Kwy-T.0004248720.data Ttave.0004248720.data wVeltave.0004248720.data
731 GM_Kwy-T.0004248720.meta Ttave.0004248720.meta wVeltave.0004248720.meta
732 \end{verbatim}
733
734
735 \subsubsection{File {\it input/data}}
736 \label{www:tutorials}
737
738 \noindent A single line must be added (under PARM01, between lines 6
739 and 7) in file {\it input/data} from the previous example
740
741 \begin{verbatim}
742 &PARM01
743 implicitDiffusion=.TRUE.,
744 &
745 \end{verbatim}
746
747 \noindent When package GMREDI is used, the flag implicitDiffusion must
748 be assigned the value .TRUE. For information about MITgcm package
749 GMREDI see...
750
751 \vspace{0.5cm}
752 \noindent In this example the starting timestep nIter0 is set to
753 4269600 requiring model access to pickup files with the timetag
754 0004269600. The model will run for 4 timesteps (nTimeSteps = 4). In
755 this case the frequencies with which permanent and rolling checkpoints
756 (pChkptFreq and chkptFreq) have been set is sufficiently long to
757 ensure that only one from the last timestep will be written. This is
758 also true of the values that have been assigned to the frequency with
759 which dumps are written (dumpFreq) and time averaging (taveFreq) is
760 performed however since the model always dumps the state of the model
761 when it stops without error a dump will be written with timetag
762 0004269604 upon completion.
763
764
765 \subsubsection{File {\it input/data.off}}
766 \label{www:tutorials}
767
768 \noindent File {\it input/data.off}, reproduced in full below,
769 specifies the prefixes and locations of additional input files
770 required to run the offline model. Note that {\it input/input\_off}
771 contains only as many offline files as are required to successfully
772 run for 4 timesteps. Where the GMREDI scheme was used in the forward
773 run, as here, package GMREDI must again be invoked when running
774 offline. In this example tracer is specified as having beeen
775 introduced with a non-zero starttime, at timestep 4248000.
776
777 \begin {verbatim}
778 1 &OFFLINE_PARM01
779 2 UvelFile= '../input/input_off/uVeltave',
780 3 VvelFile= '../input/input_off/vVeltave',
781 4 WvelFile= '../input/input_off/wVeltave',
782 5 GMwxFile= '../input/input_off/GM_Kwx-T',
783 6 GMwyFile= '../input/input_off/GM_Kwy-T',
784 7 GMwzFile= '../input/input_off/GM_Kwz-T',
785 8 ConvFile= '../input/input_off/Convtave',
786 9 &end
787
788 10 &OFFLINE_PARM02
789 11 offlineIter0=4248000,
790 12 deltaToffline=43200.,
791 13 offlineForcingPeriod=2592000.,
792 14 offlineForcingCycle=31104000.,
793 15 &end
794 \end{verbatim}
795
796 \subsubsection{File {\it input/data.pkg}}
797 \label{www:tutorials}
798
799 \noindent File {\it input/data.pkg}, reproduced completely below,
800 specifies which MITgcm packages ({\it ~/MITgcm/pkg}) are to be used.
801 It now invokes additional packages {\it pkg/gmredi} and {pkg/gchem}.
802
803 \begin {verbatim}
804 1 # Packages
805 2 &PACKAGES
806 3 useGMRedi=.TRUE.,
807 4 usePTRACERS=.TRUE.,
808 5 useGCHEM=.TRUE.,
809 6 &
810
811 \end{verbatim}
812
813
814 \subsubsection{File {\it input/data.ptracers}}
815 \label{www:tutorials}
816
817 \noindent File {\it input/data.ptracers}, reproduced completely below,
818 specifies parameters associated with the CFC11 and CFC12 tracer fields
819 advected in this example.
820
821
822 \begin{itemize}
823 \item Line 3
824 \begin {verbatim}
825 PTRACERS_Iter0= 4248000,
826 \end{verbatim}
827 \end{itemize}
828
829 \noindent In this example the tracers were introduced at iteration
830 4248000.
831
832 \begin{itemize}
833 \item Lines 7 and 14
834 \begin {verbatim}
835 PTRACERS_diffKh(n)=0.E3,
836 \end{verbatim}
837 \end{itemize}
838
839 \noindent Since package GMREDI is being used, regular horizontal
840 diffusion is set to zero.
841
842 \begin{itemize}
843 \item Lines 9,10 and 16,17
844 \begin {verbatim}
845 PTRACERS_useGMRedi(n)=.TRUE. ,
846 PTRACERS_useKPP(n)=.FALSE. ,
847 \end{verbatim}
848 \end{itemize}
849
850 \noindent Setting flag PTRACERS\_useGMRedi(n) to .TRUE. identifies
851 that package GMREDI is to be used. Setting flag PTRACERS\_useKPP(n) to
852 .FALSE. explicitly turns off KPP mixing.
853
854 \begin{itemize}
855 \item Lines 11 and 18
856 \begin {verbatim}
857 PTRACERS_initialFile(n)=' ',
858 \end{verbatim}
859 \end{itemize}
860
861 \noindent Since this is a `pickup' run the initial tracer files
862 PTRACERS\_initialFile(1) and PTRACERS\_initialFile(2) aree not needed.
863 The model will obtain the tracer state from
864 pickup\_ptracers.0004269600.data
865
866 \begin {verbatim}
867 1 &PTRACERS_PARM01
868 2 PTRACERS_numInUse=2,
869 3 PTRACERS_Iter0= 4248000,
870 4 #
871 5 # tracer 1 - CFC11
872 6 PTRACERS_advScheme(1)=77,
873 7 PTRACERS_diffKh(1)=0.E3,
874 8 PTRACERS_diffKr(1)=5.E-5,
875 9 PTRACERS_useGMRedi(1)=.TRUE. ,
876 10 PTRACERS_useKPP(1)=.FALSE. ,
877 11 PTRACERS_initialFile(1)=' ',
878 12 # tracer 2 - CFC12
879 13 PTRACERS_advScheme(2)=77,
880 14 PTRACERS_diffKh(2)=0.E3,
881 15 PTRACERS_diffKr(2)=5.E-5,
882 16 PTRACERS_useGMRedi(2)=.TRUE. ,
883 17 PTRACERS_useKPP(2)=.FALSE. ,
884 18 PTRACERS_initialFile(2)=' ',
885 19 &
886 \end{verbatim}
887
888
889 \subsubsection{File {\it input/data.gchem}}
890 \label{www:tutorials}
891
892 \noindent File {\it input/data.gchem}, reproduced completely below,
893 names the forcing files needed in package GCHEM.
894
895 \begin{itemize}
896 \item Line 3
897 \begin {verbatim}
898 iceFile='ice.bin',
899 \end{verbatim}
900 \end{itemize}
901
902 \noindent File {\it input/ice.bin} contains 12, monthly surface ice
903 fields.
904
905 \begin{itemize}
906 \item Line 3
907 \begin {verbatim}
908 iceFile='tren_speed.bin',
909 \end{verbatim}
910 \end{itemize}
911
912 \noindent File {\it input/tren\_speed.bin} contains 12, monthly
913 surface wind fields.
914
915 \begin {verbatim}
916 1 &GCHEM_PARM01
917 2 iceFile='fice.bin',
918 3 windFile='tren_speed.bin',
919 4 &
920 \end{verbatim}
921
922 \noindent Package GCHEM is described in detail in section ??
923
924 \subsubsection{File {\it input/data.gmredi}}
925 \label{www:tutorials}
926
927 \noindent File {\it input/data.gmredi}, reproduced completely below,
928 provides the parameters required for package GMREDI.
929
930 \begin {verbatim}
931 1 &GM_PARM01
932 2 GM_background_K = 1.e+3,
933 3 GM_taper_scheme = 'gkw91',
934 4 GM_maxSlope = 1.e-2,
935 5 GM_Kmin_horiz = 100.,
936 6 GM_Scrit = 4.e-3,
937 7 GM_Sd = 1.e-3,
938 8 &
939 \end{verbatim}
940
941 \noindent Package GMREDI is described in detail in section ??
942
943 \subsubsection{File {\it input/cfc1112.atm}}
944 \label{www:tutorials}
945
946 \noindent File {\it input/cfc1112.atm} is a text file containing the
947 CFC source functions over the northern and southern hemispheres
948 annually from 1931 through 1998.
949
950 \subsubsection{File {\it code/packages.conf}}
951 \label{www:tutorials}
952
953 \noindent In this example {\it code/packages.conf} additionally
954 invokes components gchem, cfc and rmredi:
955
956 \begin {verbatim}
957 ptracers
958 generic_advdiff
959 mdsio
960 mom_fluxform
961 mom_vecinv
962 timeave
963 rw
964 monitor
965 offline
966 gchem
967 cfc
968 gmredi
969 \end{verbatim}
970
971 \subsubsection{File {\it code/GCHEM\_OPTIONS.h}}
972 \label{www:tutorials}
973
974 \noindent File {\it code/GCHEM\_OPTIONS.h}, specifies options for
975 package GCHEM. In this case defining the flag ALLOW\_CFC to activate
976 the cfc code.
977
978 \subsubsection{File {\it code/GMREDI\_OPTIONS.h}}
979 \label{www:tutorials}
980
981 \noindent File {\it code/GCHEM\_OPTIONS.h}, specifies options for
982 package GMREDI.
983
984 \subsubsection{File {\it code/PTRACERS\_SIZE.h}}
985 \label{www:tutorials}
986
987 \noindent File {\it code/PTRACERS\_SIZE.h} is unchanged from the
988 simpler example.
989
990 \subsubsection{File {\it code/SIZE.h}}
991 \label{www:tutorials}
992
993 \noindent File {\it code/SIZE.h} is unchanged from the simpler
994 example.
995
996
997 \subsubsection{Running the Experiment}
998 \label{www:tutorials}
999
1000 The model is run as before and produces the files the model generates
1001 describing the grid (prefixed Depth, DXC, DXG, hFacC, hFacS and hFacW)
1002 as well as 2, single precision, binary files
1003 PTRACER01.0004269600-0004269604.001.001.data and
1004 PTRACER02.0004269600-0004269604.001.001.data and their 2 corresponding
1005 meta files as well as a single pickup file,
1006 pickup\_ptracers.ckptA.001.001.data and its corresponding meta file
1007 pickup\_ptracers.ckptA.001.001.meta from which you could run the model
1008 on.
1009
1010 %% \end{document}
1011
1012
1013

  ViewVC Help
Powered by ViewVC 1.1.22