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

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

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


Revision 1.6 - (hide annotations) (download) (as text)
Tue Jan 27 16:26:44 2009 UTC (16 years, 5 months ago) by jmc
Branch: MAIN
Changes since 1.5: +4 -3 lines
File MIME type: application/x-tex
rename thetaMin,phiMin -> xgOrigin,ygOrigin

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

  ViewVC Help
Powered by ViewVC 1.1.22