/[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.4 - (hide annotations) (download) (as text)
Tue Jan 15 20:16:44 2008 UTC (17 years, 6 months ago) by jmc
Branch: MAIN
Changes since 1.3: +6 -0 lines
File MIME type: application/x-tex
add directory name

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

  ViewVC Help
Powered by ViewVC 1.1.22