diff --git a/docs/nightly/fix/reconcile-info/ESMC_crefdoc.pdf b/docs/nightly/fix/reconcile-info/ESMC_crefdoc.pdf new file mode 100644 index 000000000..00d6c537d Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMC_crefdoc.pdf differ diff --git a/docs/nightly/fix/reconcile-info/ESMC_crefdoc/ESMC_crefdoc.css b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/ESMC_crefdoc.css new file mode 100644 index 000000000..c24e7c803 --- /dev/null +++ b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/ESMC_crefdoc.css @@ -0,0 +1,38 @@ +/* Century Schoolbook font is very similar to Computer Modern Math: cmmi */ +.MATH { font-family: "Century Schoolbook", serif; } +.MATH I { font-family: "Century Schoolbook", serif; font-style: italic } +.BOLDMATH { font-family: "Century Schoolbook", serif; font-weight: bold } + +/* implement both fixed-size and relative sizes */ +SMALL.XTINY { font-size : xx-small } +SMALL.TINY { font-size : x-small } +SMALL.SCRIPTSIZE { font-size : smaller } +SMALL.FOOTNOTESIZE { font-size : small } +SMALL.SMALL { } +BIG.LARGE { } +BIG.XLARGE { font-size : large } +BIG.XXLARGE { font-size : x-large } +BIG.HUGE { font-size : larger } +BIG.XHUGE { font-size : xx-large } + +/* heading styles */ +H1 { } +H2 { } +H3 { } +H4 { } +H5 { } + +/* mathematics styles */ +DIV.displaymath { } /* math displays */ +TD.eqno { } /* equation-number cells */ + + +/* document-specific styles come next */ +SPAN.bf { } +DIV.center { } +DIV.em { } +SPAN.it { } +DIV.navigation { } +PRE.preform { } +SPAN.tt { } +SPAN.arabic { } diff --git a/docs/nightly/fix/reconcile-info/ESMC_crefdoc/ESMC_crefdoc.html b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/ESMC_crefdoc.html new file mode 100644 index 000000000..5ec7d321f --- /dev/null +++ b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/ESMC_crefdoc.html @@ -0,0 +1,557 @@ + + + + + +ESMC_crefdoc + + + + + + + + + + + + + + + + + + + +

+ +

+

+Earth System Modeling Framework +
+
+
+
+ESMF Reference Manual for C   +
+
+
+
+Version 8.8.0 beta snapshot +
+
+
+
+
+ESMF Joint Specification Team: V. Balaji, Byron Boville, Samson Cheung, Tom Clune, Nancy Collins, Tony Craig, Carlos Cruz, Arlindo da Silva, Cecelia DeLuca, Rosalinda de Fainchtein, Rocky Dunlap, Brian Eaton, Steve Goldhaber, Bob Hallberg, Tom Henderson, Chris Hill, Mark Iredell, Joseph Jacob, Rob Jacob, Phil Jones, Brian Kauffman, Erik Kluzek, Ben Koziol, Jay Larson, Peggy Li, Fei Liu, John Michalakes, Raffaele Montuoro, Sylvia Murphy, David Neckels, Ryan O Kuinghttons, Bob Oehmke, Chuck Panaccione, Daniel Rosen, Jim Rosinski, Mathew Rothstein, Bill Sacks, Kathy Saint, Will Sawyer, Earl Schwab, Shepard Smithline, Walter Spector, Don Stark, Max Suarez, Spencer Swift, Gerhard Theurich, Atanas Trayanov, Silverio Vasquez, Jon Wolfe, Weiyu Yang, Mike Young, Leonid Zaslavsky +
+
+
+
+December 3, 2024 +
+
+
+ +
+ +

+ +

+ + +

+
+
+
+
+
+
+
+
+
+
+
+
+
+

+Acknowledgements + +
+ +

+The ESMF software is based on the contributions of a broad community. +Below are the software packages that are included in ESMF or strongly +influenced our design. We'd like to express our gratitude to the +developers of these codes for access to their software as well as their +ideas and advice. + +

+ +

+ +

+ + + + + + + + +
+esmf_support@ucar.edu +
+ + diff --git a/docs/nightly/fix/reconcile-info/ESMC_crefdoc/WARNINGS b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/WARNINGS new file mode 100644 index 000000000..289ead171 --- /dev/null +++ b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/WARNINGS @@ -0,0 +1,8 @@ + +ESMC_crefdoc.tex is newer than ESMC_crefdoc.aux: Please rerun latex. + +Substitution of arg to newlabelxx delayed. + +? brace missing for \oldcontentsline + +ESMC_crefdoc.tex is newer than ESMC_crefdoc.bbl: Please rerun latex and bibtex. diff --git a/docs/nightly/fix/reconcile-info/ESMC_crefdoc/contents.png b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/contents.png new file mode 100644 index 000000000..0c752c66c Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/contents.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMC_crefdoc/crossref.png b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/crossref.png new file mode 100644 index 000000000..7314fa7c5 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/crossref.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMC_crefdoc/footnode.html b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/footnode.html new file mode 100644 index 000000000..94f3b72b4 --- /dev/null +++ b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/footnode.html @@ -0,0 +1,63 @@ + + + + + +Footnotes + + + + + + + + + + + + + + + + +
+
... model.1
+
It is not necessary to create +a Coupler Component for each individual data transfer. + +
.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+
+
+
+ + diff --git a/docs/nightly/fix/reconcile-info/ESMC_crefdoc/images.aux b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/images.aux new file mode 100644 index 000000000..c01f471a8 --- /dev/null +++ b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/images.aux @@ -0,0 +1,19 @@ +\relax +\providecommand\hyper@newdestlabel[2]{} +\providecommand\HyperFirstAtBeginDocument{\AtBeginDocument} +\HyperFirstAtBeginDocument{\ifx\hyper@anchor\@undefined +\global\let\oldcontentsline\contentsline +\gdef\contentsline#1#2#3#4{\oldcontentsline{#1}{#2}{#3}} +\global\let\oldnewlabel\newlabel +\gdef\newlabel#1#2{\newlabelxx{#1}#2} +\gdef\newlabelxx#1#2#3#4#5#6{\oldnewlabel{#1}{{#2}{#3}}} +\AtEndDocument{\ifx\hyper@anchor\@undefined +\let\contentsline\oldcontentsline +\let\newlabel\oldnewlabel +\fi} +\fi} +\global\let\hyper@last\relax +\gdef\HyperFirstAtBeginDocument#1{#1} +\providecommand*\HyPL@Entry[1]{} +\HyPL@Entry{0<>} +\babel@aux{english}{} diff --git a/docs/nightly/fix/reconcile-info/ESMC_crefdoc/images.bbl b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/images.bbl new file mode 100644 index 000000000..386e97116 --- /dev/null +++ b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/images.bbl @@ -0,0 +1,22 @@ +\begin{thebibliography}{1} + +\bibitem{ref:SCRIP} +{SCRIP: A Spherical Coordinate Remapping and Interpolation Package}. +\newblock http://oceans11.lanl.gov/trac/SCRIP, last accessed on Dec 4, 2015. +\newblock Los Alamos Software Release LACC 98-45. + +\bibitem{BalajiXGrid} +V.~Balaji, Jeff Anderson, Isaac Held, Michael Winton, Jeff Durachta, Sergey + Malyshev, and Ronald~J. Stouffer. +\newblock The exchange grid: a mechanism for data exchange between earth system + components on independent grids. +\newblock {\em Parallel Computational Fluid Dynamics: Theory and Applications, + Proceedings of the 2005 International Conference on Parallel Computational + Fluid Dynamics}, 2006. + +\bibitem{uml} +J.~Rumbaugh, I.~Jacobson, and G.~Booch. +\newblock {\em The Unified Modeling Language Reference Manual}. +\newblock Addison-Wesley, 1999. + +\end{thebibliography} diff --git a/docs/nightly/fix/reconcile-info/ESMC_crefdoc/images.log b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/images.log new file mode 100644 index 000000000..de6b1c3af --- /dev/null +++ b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/images.log @@ -0,0 +1,488 @@ +This is pdfTeX, Version 3.14159265-2.6-1.40.18 (TeX Live 2017/Debian) (preloaded format=latex 2022.7.28) 3 DEC 2024 17:27 +entering extended mode + restricted \write18 enabled. + %&-line parsing enabled. +**./images.tex +(./images.tex +LaTeX2e <2017-04-15> +Babel <3.18> and hyphenation patterns for 84 language(s) loaded. + +(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls +Document Class: article 2014/09/29 v1.4h Standard LaTeX document class +(/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo +File: size10.clo 2014/09/29 v1.4h Standard LaTeX file (size option) +) +\c@part=\count79 +\c@section=\count80 +\c@subsection=\count81 +\c@subsubsection=\count82 +\c@paragraph=\count83 +\c@subparagraph=\count84 +\c@figure=\count85 +\c@table=\count86 +\abovecaptionskip=\skip41 +\belowcaptionskip=\skip42 +\bibindent=\dimen102 +) (/usr/share/texlive/texmf-dist/tex/latex/base/ifthen.sty +Package: ifthen 2014/09/29 v1.1c Standard LaTeX ifthen package (DPC) +) (/usr/share/texlive/texmf-dist/tex/generic/babel/babel.sty +Package: babel 2018/02/14 3.18 The Babel package +(/usr/share/texlive/texmf-dist/tex/generic/babel/switch.def +File: switch.def 2018/02/14 3.18 Babel switching mechanism +) (/usr/share/texlive/texmf-dist/tex/generic/babel-english/english.ldf +Language: english 2017/06/06 v3.3r English support from the babel system +(/usr/share/texlive/texmf-dist/tex/generic/babel/babel.def +File: babel.def 2018/02/14 3.18 Babel common definitions +\babel@savecnt=\count87 +\U@D=\dimen103 +(/usr/share/texlive/texmf-dist/tex/generic/babel/txtbabel.def) +\bbl@dirlevel=\count88 +) +\l@canadian = a dialect from \language\l@american +\l@australian = a dialect from \language\l@british +\l@newzealand = a dialect from \language\l@british +)) (/usr/share/texmf/tex/latex/html/html.sty +Package: html 1999/07/19 v1.38 hypertext commands for latex2html (nd, hws, rrm) + +\c@lpart=\count89 +\c@lchapter=\count90 +\c@chapter=\count91 +\c@lsection=\count92 +\c@lsubsection=\count93 +\c@lsubsubsection=\count94 +\c@lparagraph=\count95 +\c@lsubparagraph=\count96 +\c@lsubsubparagraph=\count97 +\ptrfile=\write3 +) (/usr/share/texlive/texmf-dist/tex/latex/psnfss/times.sty +Package: times 2005/04/12 PSNFSS-v9.2a (SPQR) +) (/usr/share/texlive/texmf-dist/tex/latex/graphics/graphicx.sty +Package: graphicx 2017/06/01 v1.1a Enhanced LaTeX Graphics (DPC,SPQR) +(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty +Package: keyval 2014/10/28 v1.15 key=value parser (DPC) +\KV@toks@=\toks14 +) (/usr/share/texlive/texmf-dist/tex/latex/graphics/graphics.sty +Package: graphics 2017/06/25 v1.2c Standard LaTeX Graphics (DPC,SPQR) +(/usr/share/texlive/texmf-dist/tex/latex/graphics/trig.sty +Package: trig 2016/01/03 v1.10 sin cos tan (DPC) +) (/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/graphics.cfg +File: graphics.cfg 2016/06/04 v1.11 sample graphics configuration +) +Package graphics Info: Driver file: dvips.def on input line 99. +(/usr/share/texlive/texmf-dist/tex/latex/graphics-def/dvips.def +File: dvips.def 2017/06/20 v3.1d Graphics/color driver for dvips +)) +\Gin@req@height=\dimen104 +\Gin@req@width=\dimen105 +) (/usr/share/texlive/texmf-dist/tex/latex/hyperref/hyperref.sty +Package: hyperref 2018/02/06 v6.86b Hypertext links for LaTeX +(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/hobsub-hyperref.sty +Package: hobsub-hyperref 2016/05/16 v1.14 Bundle oberdiek, subset hyperref (HO) + +(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/hobsub-generic.sty +Package: hobsub-generic 2016/05/16 v1.14 Bundle oberdiek, subset generic (HO) +Package: hobsub 2016/05/16 v1.14 Construct package bundles (HO) +Package: infwarerr 2016/05/16 v1.4 Providing info/warning/error messages (HO) +Package: ltxcmds 2016/05/16 v1.23 LaTeX kernel commands for general use (HO) +Package: ifluatex 2016/05/16 v1.4 Provides the ifluatex switch (HO) +Package ifluatex Info: LuaTeX not detected. +Package: ifvtex 2016/05/16 v1.6 Detect VTeX and its facilities (HO) +Package ifvtex Info: VTeX not detected. +Package: intcalc 2016/05/16 v1.2 Expandable calculations with integers (HO) +Package: ifpdf 2017/03/15 v3.2 Provides the ifpdf switch +Package: etexcmds 2016/05/16 v1.6 Avoid name clashes with e-TeX commands (HO) +Package etexcmds Info: Could not find \expanded. +(etexcmds) That can mean that you are not using pdfTeX 1.50 or +(etexcmds) that some package has redefined \expanded. +(etexcmds) In the latter case, load this package earlier. +Package: kvsetkeys 2016/05/16 v1.17 Key value parser (HO) +Package: kvdefinekeys 2016/05/16 v1.4 Define keys (HO) +Package: pdftexcmds 2018/01/21 v0.26 Utility functions of pdfTeX for LuaTeX (HO +) +Package pdftexcmds Info: LuaTeX not detected. +Package pdftexcmds Info: \pdf@primitive is available. +Package pdftexcmds Info: \pdf@ifprimitive is available. +Package pdftexcmds Info: \pdfdraftmode is ignored in DVI mode. +Package: pdfescape 2016/05/16 v1.14 Implements pdfTeX's escape features (HO) +Package: bigintcalc 2016/05/16 v1.4 Expandable calculations on big integers (HO +) +Package: bitset 2016/05/16 v1.2 Handle bit-vector datatype (HO) +Package: uniquecounter 2016/05/16 v1.3 Provide unlimited unique counter (HO) +) +Package hobsub Info: Skipping package `hobsub' (already loaded). +Package: letltxmacro 2016/05/16 v1.5 Let assignment for LaTeX macros (HO) +Package: hopatch 2016/05/16 v1.3 Wrapper for package hooks (HO) +Package: xcolor-patch 2016/05/16 xcolor patch +Package: atveryend 2016/05/16 v1.9 Hooks at the very end of document (HO) +Package atveryend Info: \enddocument detected (standard20110627). +Package: atbegshi 2016/06/09 v1.18 At begin shipout hook (HO) +Package: refcount 2016/05/16 v3.5 Data extraction from label references (HO) +Package: hycolor 2016/05/16 v1.8 Color options for hyperref/bookmark (HO) +) (/usr/share/texlive/texmf-dist/tex/generic/ifxetex/ifxetex.sty +Package: ifxetex 2010/09/12 v0.6 Provides ifxetex conditional +) (/usr/share/texlive/texmf-dist/tex/latex/oberdiek/auxhook.sty +Package: auxhook 2016/05/16 v1.4 Hooks for auxiliary files (HO) +) (/usr/share/texlive/texmf-dist/tex/latex/oberdiek/kvoptions.sty +Package: kvoptions 2016/05/16 v3.12 Key value format for package options (HO) +) +\@linkdim=\dimen106 +\Hy@linkcounter=\count98 +\Hy@pagecounter=\count99 +(/usr/share/texlive/texmf-dist/tex/latex/hyperref/pd1enc.def +File: pd1enc.def 2018/02/06 v6.86b Hyperref: PDFDocEncoding definition (HO) +) +\Hy@SavedSpaceFactor=\count100 +(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/hyperref.cfg +File: hyperref.cfg 2002/06/06 v1.2 hyperref configuration of TeXLive +) +Package hyperref Info: Hyper figures OFF on input line 4509. +Package hyperref Info: Link nesting OFF on input line 4514. +Package hyperref Info: Hyper index ON on input line 4517. +Package hyperref Info: Plain pages OFF on input line 4524. +Package hyperref Info: Backreferencing OFF on input line 4529. +Package hyperref Info: Implicit mode ON; LaTeX internals redefined. +Package hyperref Info: Bookmarks ON on input line 4762. +\c@Hy@tempcnt=\count101 +(/usr/share/texlive/texmf-dist/tex/latex/url/url.sty +\Urlmuskip=\muskip10 +Package: url 2013/09/16 ver 3.4 Verb mode for urls, etc. +) +LaTeX Info: Redefining \url on input line 5115. +LaTeX Info: Redefining \hyperref on input line 5126. +\XeTeXLinkMargin=\dimen107 +\Fld@menulength=\count102 +\Field@Width=\dimen108 +\Fld@charsize=\dimen109 +Package hyperref Info: Hyper figures OFF on input line 6369. +Package hyperref Info: Link nesting OFF on input line 6374. +Package hyperref Info: Hyper index ON on input line 6377. +Package hyperref Info: backreferencing OFF on input line 6384. +Package hyperref Info: Link coloring OFF on input line 6389. +Package hyperref Info: Link coloring with OCG OFF on input line 6394. +Package hyperref Info: PDF/A mode OFF on input line 6399. +LaTeX Info: Redefining \ref on input line 6439. +LaTeX Info: Redefining \pageref on input line 6443. +\Hy@abspage=\count103 +\c@Item=\count104 +\c@Hfootnote=\count105 +) +Package hyperref Info: Driver (default): hdvips. +(/usr/share/texlive/texmf-dist/tex/latex/hyperref/hdvips.def +File: hdvips.def 2018/02/06 v6.86b Hyperref driver for dvips +(/usr/share/texlive/texmf-dist/tex/latex/hyperref/pdfmark.def +File: pdfmark.def 2018/02/06 v6.86b Hyperref definitions for pdfmark specials +\pdf@docset=\toks15 +\pdf@box=\box26 +\pdf@toks=\toks16 +\pdf@defaulttoks=\toks17 +\HyField@AnnotCount=\count106 +\Fld@listcount=\count107 +\c@bookmark@seq@number=\count108 +(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/rerunfilecheck.sty +Package: rerunfilecheck 2016/05/16 v1.8 Rerun checks for auxiliary files (HO) +Package uniquecounter Info: New unique counter `rerunfilecheck' on input line 2 +82. +) +\Hy@SectionHShift=\skip43 +)) (/usr/share/texlive/texmf-dist/tex/latex/base/fontenc.sty +Package: fontenc 2017/04/05 v2.0i Standard LaTeX package +(/usr/share/texlive/texmf-dist/tex/latex/base/t1enc.def +File: t1enc.def 2017/04/05 v2.0i Standard LaTeX file +LaTeX Font Info: Redeclaring font encoding T1 on input line 48. +)) +\oldparskip=\skip44 +\oldparindent=\skip45 +\oldbaselineskip=\skip46 +(/usr/share/texlive/texmf-dist/tex/latex/xcolor/xcolor.sty +Package: xcolor 2016/05/11 v2.12 LaTeX color extensions (UK) +(/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/color.cfg +File: color.cfg 2016/01/02 v1.6 sample color configuration +) +Package xcolor Info: Driver file: dvips.def on input line 225. +Package xcolor Info: Model `cmy' substituted by `cmy0' on input line 1348. +Package xcolor Info: Model `RGB' extended on input line 1364. +Package xcolor Info: Model `HTML' substituted by `rgb' on input line 1366. +Package xcolor Info: Model `Hsb' substituted by `hsb' on input line 1367. +Package xcolor Info: Model `tHsb' substituted by `hsb' on input line 1368. +Package xcolor Info: Model `HSB' substituted by `hsb' on input line 1369. +Package xcolor Info: Model `Gray' substituted by `gray' on input line 1370. +Package xcolor Info: Model `wave' substituted by `hsb' on input line 1371. +) (/usr/share/texlive/texmf-dist/tex/latex/base/inputenc.sty +Package: inputenc 2015/03/17 v1.2c Input encoding file +\inpenc@prehook=\toks18 +\inpenc@posthook=\toks19 +) +\sizebox=\box27 +\lthtmlwrite=\write4 +(./images.aux) +\openout1 = `images.aux'. + +LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 155. +LaTeX Font Info: ... okay on input line 155. +LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 155. +LaTeX Font Info: ... okay on input line 155. +LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 155. +LaTeX Font Info: ... okay on input line 155. +LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 155. +LaTeX Font Info: ... okay on input line 155. +LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 155. +LaTeX Font Info: ... okay on input line 155. +LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 155. +LaTeX Font Info: ... okay on input line 155. +LaTeX Font Info: Checking defaults for PD1/pdf/m/n on input line 155. +LaTeX Font Info: ... okay on input line 155. +LaTeX Font Info: Try loading font information for T1+ptm on input line 155. +(/usr/share/texlive/texmf-dist/tex/latex/psnfss/t1ptm.fd +File: t1ptm.fd 2001/06/04 font definitions for T1/ptm. +) +\AtBeginShipoutBox=\box28 +Package hyperref Info: Link coloring OFF on input line 155. +(/usr/share/texlive/texmf-dist/tex/latex/hyperref/nameref.sty +Package: nameref 2016/05/21 v2.44 Cross-referencing by name of section +(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/gettitlestring.sty +Package: gettitlestring 2016/05/16 v1.5 Cleanup title references (HO) +) +\c@section@level=\count109 +) +LaTeX Info: Redefining \ref on input line 155. +LaTeX Info: Redefining \pageref on input line 155. +LaTeX Info: Redefining \nameref on input line 155. +\@outlinefile=\write5 +\openout5 = `images.out'. + + +latex2htmlLength hsize=349.0pt + +latex2htmlLength vsize=697.295pt + +latex2htmlLength hoffset=0.0pt + +latex2htmlLength voffset=0.0pt + +latex2htmlLength topmargin=0.0pt + +latex2htmlLength topskip=0.00003pt + +latex2htmlLength headheight=0.0pt + +latex2htmlLength headsep=0.0pt + +latex2htmlLength parskip=0.0pt + +latex2htmlLength oddsidemargin=0.0pt + +latex2htmlLength evensidemargin=0.0pt + +File: ESMF_sandwich.eps Graphic file (type eps) + +Overfull \hbox (33.42874pt too wide) detected at line 191 + [] + [] + +l2hSize :tex2html_wrap253:210.78749pt::0.0pt::349.0pt. +[1 + + + +] +File: ESMF_GEOS5.eps Graphic file (type eps) + +Overfull \hbox (109.91138pt too wide) detected at line 221 + [] + [] + +l2hSize :tex2html_wrap952:279.14096pt::0.0pt::349.0pt. +[2 + + +] +File: ESMF_appunit.eps Graphic file (type eps) + +Overfull \hbox (124.76999pt too wide) detected at line 228 + [] + [] + +l2hSize :tex2html_wrap972:346.29375pt::0.0pt::349.0pt. +[3 + + +] +File: ESMF_serial.eps Graphic file (type eps) + +Overfull \hbox (44.46999pt too wide) detected at line 235 + [] + [] + +l2hSize :tex2html_wrap992:445.665pt::0.0pt::349.0pt. +[4 + + +] +File: ESMF_concurrent.eps Graphic file (type eps) + +Overfull \hbox (44.46999pt too wide) detected at line 241 + [] + [] + +l2hSize :tex2html_wrap998:382.42874pt::0.0pt::349.0pt. +[5 + + +] +File: ESMF_reconcile.eps Graphic file (type eps) + +Overfull \hbox (51.49625pt too wide) detected at line 249 + [] + [] + +l2hSize :tex2html_wrap1018:418.56374pt::0.0pt::349.0pt. +[6 + + +] +File: Comp_obj.eps Graphic file (type eps) + +Overfull \hbox (88.635pt too wide) detected at line 257 + [] + [] + +l2hSize :tex2html_wrap16022:143.53624pt::0.0pt::349.0pt. +[7 + + +] +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <7> on input line 594. +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <5> on input line 594. +l2hSize :tex2html_wrap_inline3733:7.24997pt::7.24997pt::23.83336pt. +[8 + + +] +l2hSize :tex2html_wrap_inline3735:7.24997pt::7.24997pt::16.05556pt. +[9 + + +] +File: GridDecomps.eps Graphic file (type eps) + +Overfull \hbox (109.91138pt too wide) detected at line 732 + [] + [] + +l2hSize :tex2html_wrap5022:140.92552pt::0.0pt::349.0pt. +[10 + + +] +File: LogRectGrids.eps Graphic file (type eps) + +Overfull \hbox (109.91138pt too wide) detected at line 739 + [] + [] + +l2hSize :tex2html_wrap5038:140.92552pt::0.0pt::349.0pt. +[11 + + +] +File: GridStaggerLoc2D.eps Graphic file (type eps) + +Overfull \hbox (3.31624pt too wide) detected at line 754 + [] + [] + +l2hSize :tex2html_wrap5284:216.80998pt::0.0pt::349.0pt. +[12 + + +] +File: GridStaggerLoc3D.eps Graphic file (type eps) + +Overfull \hbox (3.31624pt too wide) detected at line 760 + [] + [] + +l2hSize :tex2html_wrap5296:261.97874pt::0.0pt::349.0pt. +[13 + + +] +l2hSize :tex2html_wrap_inline6225:6.74997pt::0.0pt::5.1563pt. +[14 + + +] +l2hSize :tex2html_wrap_inline6227:8.0pt::8.0pt::527.62456pt. + +Overfull \hbox (181.62457pt too wide) in paragraph at lines 873--874 +[]|[] + [] + +[15 + + +] +l2hSize :tex2html_wrap_inline6229:6.74997pt::0.0pt::6.50238pt. +[16 + + +] +l2hSize :tex2html_wrap_inline6231:8.0pt::8.0pt::109.4784pt. +[17 + + +] +l2hSize :tex2html_wrap_inline6233:6.94444pt::0.0pt::5.7049pt. +[18 + + +] +l2hSize :tex2html_wrap_inline7594:7.24997pt::7.24997pt::51.0555pt. +[19 + + +] +l2hSize :tex2html_wrap_inline8033:8.14003pt::0.0pt::8.97229pt. +[20 + + +] +File: Appendix_uml.eps Graphic file (type eps) + +Overfull \hbox (8.33635pt too wide) detected at line 1568 + [] + [] + +l2hSize :tex2html_wrap10897:480.99883pt::0.0pt::349.0pt. +[21 + + +] +Package atveryend Info: Empty hook `BeforeClearDocument' on input line 1617. +Package atveryend Info: Empty hook `AfterLastShipout' on input line 1617. +(./images.aux) +Package atveryend Info: Empty hook `AtVeryEndDocument' on input line 1617. +Package atveryend Info: Executing hook `AtEndAfterFileList' on input line 1617. + + +Package rerunfilecheck Warning: File `images.out' has changed. +(rerunfilecheck) Rerun to get outlines right +(rerunfilecheck) or use package `bookmark'. + +Package rerunfilecheck Info: Checksums for `images.out': +(rerunfilecheck) Before: +(rerunfilecheck) After: D41D8CD98F00B204E9800998ECF8427E;0. +Package atveryend Info: Empty hook `AtVeryVeryEnd' on input line 1617. + ) +Here is how much of TeX's memory you used: + 6214 strings out of 492983 + 88645 string characters out of 6134922 + 189050 words of memory out of 5000000 + 9744 multiletter control sequences out of 15000+600000 + 6047 words of font info for 16 fonts, out of 8000000 for 9000 + 1141 hyphenation exceptions out of 8191 + 29i,5n,35p,834b,367s stack positions out of 5000i,500n,10000p,200000b,80000s + +Output written on images.dvi (21 pages, 16720 bytes). diff --git a/docs/nightly/fix/reconcile-info/ESMC_crefdoc/images.out b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/images.out new file mode 100644 index 000000000..e69de29bb diff --git a/docs/nightly/fix/reconcile-info/ESMC_crefdoc/images.pl b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/images.pl new file mode 100644 index 000000000..797bffe46 --- /dev/null +++ b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/images.pl @@ -0,0 +1,133 @@ +# LaTeX2HTML 2018 (Released Feb 1, 2018) +# Associate images original text with physical files. + + +$key = q/(n-1)*spatialDim+1;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$(n-1)*spatialDim+1$|; + +$key = q/<0;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$< 0$|; + +$key = q/>=0;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$>= 0$|; + +$key = q/^{14};MSF=1.6;AAT/; +$cached_env_img{$key} = q|$^{14}$|; + +$key = q/d;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$d$|; + +$key = q/e;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$e$|; + +$key = q/includegraphics{Comp_obj};AAT/; +$cached_env_img{$key} = q|\includegraphics{Comp_obj}|; + +$key = q/n;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$n$|; + +$key = q/number_of_nodes_in_element(1)+number_of_nodes_in_element(2)+cdots+number_of_nodes_in_element(e-1)+1;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$number\_of\_nodes\_in\_element(1) + number\_of\_nodes\_in\_element(2) +
+\cdots + number\_of\_nodes\_in\_element(e-1) + 1$|; + +$key = q/scalebox{0.75}{includegraphics{GridStaggerLoc2D}};AAT/; +$cached_env_img{$key} = q|\scalebox{0.75}{\includegraphics{GridStaggerLoc2D}}|; + +$key = q/scalebox{0.8}{includegraphics{Appendix_uml}};AAT/; +$cached_env_img{$key} = q|\scalebox{0.8}{\includegraphics{Appendix_uml}}|; + +$key = q/scalebox{0.9}{includegraphics{ESMF_GEOS5}};AAT/; +$cached_env_img{$key} = q|\scalebox{0.9}{\includegraphics{ESMF_GEOS5}}|; + +$key = q/scalebox{0.9}{includegraphics{GridDecomps}};AAT/; +$cached_env_img{$key} = q|\scalebox{0.9}{\includegraphics{GridDecomps}}|; + +$key = q/scalebox{0.9}{includegraphics{LogRectGrids}};AAT/; +$cached_env_img{$key} = q|\scalebox{0.9}{\includegraphics{LogRectGrids}}|; + +$key = q/scalebox{1.0}{includegraphics{ESMF_appunit}};AAT/; +$cached_env_img{$key} = q|\scalebox{1.0}{\includegraphics{ESMF_appunit}}|; + +$key = q/scalebox{1.0}{includegraphics{ESMF_concurrent}};AAT/; +$cached_env_img{$key} = q|\scalebox{1.0}{\includegraphics{ESMF_concurrent}}|; + +$key = q/scalebox{1.0}{includegraphics{ESMF_reconcile}};AAT/; +$cached_env_img{$key} = q|\scalebox{1.0}{\includegraphics{ESMF_reconcile}}|; + +$key = q/scalebox{1.0}{includegraphics{ESMF_sandwich}};AAT/; +$cached_env_img{$key} = q|\scalebox{1.0}{\includegraphics{ESMF_sandwich}}|; + +$key = q/scalebox{1.0}{includegraphics{ESMF_serial}};AAT/; +$cached_env_img{$key} = q|\scalebox{1.0}{\includegraphics{ESMF_serial}}|; + +$key = q/scalebox{1.0}{includegraphics{GridStaggerLoc3D}};AAT/; +$cached_env_img{$key} = q|\scalebox{1.0}{\includegraphics{GridStaggerLoc3D}}|; + +$key = q/times1times...times1;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$\times 1 \times ... \times 1$|; + +1; + diff --git a/docs/nightly/fix/reconcile-info/ESMC_crefdoc/images.tex b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/images.tex new file mode 100644 index 000000000..7335737ca --- /dev/null +++ b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/images.tex @@ -0,0 +1,1617 @@ +\batchmode + +\documentclass[english]{article} +\RequirePackage{ifthen} + + +\usepackage{babel} +\usepackage{html} +\usepackage{times} +\usepackage{graphicx} +\usepackage{hyperref} +\usepackage[T1]{fontenc}% +\providecommand{\docmttype}{Reference Manual for C}% +\providecommand{\req}[1]{\section{\hspace{.2in}#1}}% +\providecommand{\sreq}[1]{\subsection{\hspace{.2in}#1}}% +\providecommand{\ssreq}[1]{\subsubsection{\hspace{.2in}#1}}% +\providecommand{\mytitle}{ESMF Reference Manual for C~~}% +\providecommand{\myversion}{Version 8.8.0 beta snapshot} + +% +\newenvironment{reqlist}{\begin{list} {} {} \rm \item[]} +{\end{list}} +\setcounter{secnumdepth}{3} +\setcounter{tocdepth}{3}% +\providecommand{\longname}{ESMF }% +\providecommand{\funcname}{ESMF }% +\providecommand{\shortname}{REF}% +\providecommand{\myauthors}{ESMF Joint Specification Team: V. Balaji, Byron Boville, Samson Cheung, Tom Clune, Nancy Collins, Tony Craig, Carlos Cruz, Arlindo da Silva, Cecelia DeLuca, Rosalinda de Fainchtein, Rocky Dunlap, Brian Eaton, Steve Goldhaber, Bob Hallberg, Tom Henderson, Chris Hill, Mark Iredell, Joseph Jacob, Rob Jacob, Phil Jones, Brian Kauffman, Erik Kluzek, Ben Koziol, Jay Larson, Peggy Li, Fei Liu, John Michalakes, Raffaele Montuoro, Sylvia Murphy, David Neckels, Ryan O Kuinghttons, Bob Oehmke, Chuck Panaccione, Daniel Rosen, Jim Rosinski, Mathew Rothstein, Bill Sacks, Kathy Saint, Will Sawyer, Earl Schwab, Shepard Smithline, Walter Spector, Don Stark, Max Suarez, Spencer Swift, Gerhard Theurich, Atanas Trayanov, Silverio Vasquez, Jon Wolfe, Weiyu Yang, Mike Young, Leonid Zaslavsky} + +\setlength{\textwidth}{6.5truein} + +\setlength{\textheight}{8.5truein} + +\setlength{\oddsidemargin}{0in} + +\setlength{\unitlength}{1truecm} + +\newlength{\oldparskip} + +\newlength{\oldparindent} + +\newlength{\oldbaselineskip} + +\setlength{\parskip}{0pt} + +\setlength{\parindent}{0pt} + +\setlength{\baselineskip}{11pt} +\hbadness = 10000 +\vbadness = 10000 + + +\usepackage{xcolor} + +\usepackage[]{inputenc} + + + +\makeatletter + +\makeatletter +\count@=\the\catcode`\_ \catcode`\_=8 +\newenvironment{tex2html_wrap}{}{}% +\catcode`\<=12\catcode`\_=\count@ +\newcommand{\providedcommand}[1]{\expandafter\providecommand\csname #1\endcsname}% +\newcommand{\renewedcommand}[1]{\expandafter\providecommand\csname #1\endcsname{}% + \expandafter\renewcommand\csname #1\endcsname}% +\newcommand{\newedenvironment}[1]{\newenvironment{#1}{}{}\renewenvironment{#1}}% +\let\newedcommand\renewedcommand +\let\renewedenvironment\newedenvironment +\makeatother +\let\mathon=$ +\let\mathoff=$ +\ifx\AtBeginDocument\undefined \newcommand{\AtBeginDocument}[1]{}\fi +\newbox\sizebox +\setlength{\hoffset}{0pt}\setlength{\voffset}{0pt} +\addtolength{\textheight}{\footskip}\setlength{\footskip}{0pt} +\addtolength{\textheight}{\topmargin}\setlength{\topmargin}{0pt} +\addtolength{\textheight}{\headheight}\setlength{\headheight}{0pt} +\addtolength{\textheight}{\headsep}\setlength{\headsep}{0pt} +\setlength{\textwidth}{349pt} +\newwrite\lthtmlwrite +\makeatletter +\let\realnormalsize=\normalsize +\global\topskip=2sp +\def\preveqno{}\let\real@float=\@float \let\realend@float=\end@float +\def\@float{\let\@savefreelist\@freelist\real@float} +\def\liih@math{\ifmmode$\else\bad@math\fi} +\def\end@float{\realend@float\global\let\@freelist\@savefreelist} +\let\real@dbflt=\@dbflt \let\end@dblfloat=\end@float +\let\@largefloatcheck=\relax +\let\if@boxedmulticols=\iftrue +\def\@dbflt{\let\@savefreelist\@freelist\real@dbflt} +\def\adjustnormalsize{\def\normalsize{\mathsurround=0pt \realnormalsize + \parindent=0pt\abovedisplayskip=0pt\belowdisplayskip=0pt}% + \def\phantompar{\csname par\endcsname}\normalsize}% +\def\lthtmltypeout#1{{\let\protect\string \immediate\write\lthtmlwrite{#1}}}% +\newcommand\lthtmlhboxmathA{\adjustnormalsize\setbox\sizebox=\hbox\bgroup\kern.05em }% +\newcommand\lthtmlhboxmathB{\adjustnormalsize\setbox\sizebox=\hbox to\hsize\bgroup\hfill }% +\newcommand\lthtmlvboxmathA{\adjustnormalsize\setbox\sizebox=\vbox\bgroup % + \let\ifinner=\iffalse \let\)\liih@math }% +\newcommand\lthtmlboxmathZ{\@next\next\@currlist{}{\def\next{\voidb@x}}% + \expandafter\box\next\egroup}% +\newcommand\lthtmlmathtype[1]{\gdef\lthtmlmathenv{#1}}% +\newcommand\lthtmllogmath{\dimen0\ht\sizebox \advance\dimen0\dp\sizebox + \ifdim\dimen0>.95\vsize + \lthtmltypeout{% +*** image for \lthtmlmathenv\space is too tall at \the\dimen0, reducing to .95 vsize ***}% + \ht\sizebox.95\vsize \dp\sizebox\z@ \fi + \lthtmltypeout{l2hSize % +:\lthtmlmathenv:\the\ht\sizebox::\the\dp\sizebox::\the\wd\sizebox.\preveqno}}% +\newcommand\lthtmlfigureA[1]{\let\@savefreelist\@freelist + \lthtmlmathtype{#1}\lthtmlvboxmathA}% +\newcommand\lthtmlpictureA{\bgroup\catcode`\_=8 \lthtmlpictureB}% +\newcommand\lthtmlpictureB[1]{\lthtmlmathtype{#1}\egroup + \let\@savefreelist\@freelist \lthtmlhboxmathB}% +\newcommand\lthtmlpictureZ[1]{\hfill\lthtmlfigureZ}% +\newcommand\lthtmlfigureZ{\lthtmlboxmathZ\lthtmllogmath\copy\sizebox + \global\let\@freelist\@savefreelist}% +\newcommand\lthtmldisplayA{\bgroup\catcode`\_=8 \lthtmldisplayAi}% +\newcommand\lthtmldisplayAi[1]{\lthtmlmathtype{#1}\egroup\lthtmlvboxmathA}% +\newcommand\lthtmldisplayB[1]{\edef\preveqno{(\theequation)}% + \lthtmldisplayA{#1}\let\@eqnnum\relax}% +\newcommand\lthtmldisplayZ{\lthtmlboxmathZ\lthtmllogmath\lthtmlsetmath}% +\newcommand\lthtmlinlinemathA{\bgroup\catcode`\_=8 \lthtmlinlinemathB} +\newcommand\lthtmlinlinemathB[1]{\lthtmlmathtype{#1}\egroup\lthtmlhboxmathA + \vrule height1.5ex width0pt }% +\newcommand\lthtmlinlineA{\bgroup\catcode`\_=8 \lthtmlinlineB}% +\newcommand\lthtmlinlineB[1]{\lthtmlmathtype{#1}\egroup\lthtmlhboxmathA}% +\newcommand\lthtmlinlineZ{\egroup\expandafter\ifdim\dp\sizebox>0pt % + \expandafter\centerinlinemath\fi\lthtmllogmath\lthtmlsetinline} +\newcommand\lthtmlinlinemathZ{\egroup\expandafter\ifdim\dp\sizebox>0pt % + \expandafter\centerinlinemath\fi\lthtmllogmath\lthtmlsetmath} +\newcommand\lthtmlindisplaymathZ{\egroup % + \centerinlinemath\lthtmllogmath\lthtmlsetmath} +\def\lthtmlsetinline{\hbox{\vrule width.1em \vtop{\vbox{% + \kern.1em\copy\sizebox}\ifdim\dp\sizebox>0pt\kern.1em\else\kern.3pt\fi + \ifdim\hsize>\wd\sizebox \hrule depth1pt\fi}}} +\def\lthtmlsetmath{\hbox{\vrule width.1em\kern-.05em\vtop{\vbox{% + \kern.1em\kern0.8 pt\hbox{\hglue.17em\copy\sizebox\hglue0.8 pt}}\kern.3pt% + \ifdim\dp\sizebox>0pt\kern.1em\fi \kern0.8 pt% + \ifdim\hsize>\wd\sizebox \hrule depth1pt\fi}}} +\def\centerinlinemath{% + \dimen1=\ifdim\ht\sizebox<\dp\sizebox \dp\sizebox\else\ht\sizebox\fi + \advance\dimen1by.5pt \vrule width0pt height\dimen1 depth\dimen1 + \dp\sizebox=\dimen1\ht\sizebox=\dimen1\relax} + +\def\lthtmlcheckvsize{\ifdim\ht\sizebox<\vsize + \ifdim\wd\sizebox<\hsize\expandafter\hfill\fi \expandafter\vfill + \else\expandafter\vss\fi}% +\providecommand{\selectlanguage}[1]{}% +\makeatletter \tracingstats = 1 + + +\begin{document} +\pagestyle{empty}\thispagestyle{empty}\lthtmltypeout{}% +\lthtmltypeout{latex2htmlLength hsize=\the\hsize}\lthtmltypeout{}% +\lthtmltypeout{latex2htmlLength vsize=\the\vsize}\lthtmltypeout{}% +\lthtmltypeout{latex2htmlLength hoffset=\the\hoffset}\lthtmltypeout{}% +\lthtmltypeout{latex2htmlLength voffset=\the\voffset}\lthtmltypeout{}% +\lthtmltypeout{latex2htmlLength topmargin=\the\topmargin}\lthtmltypeout{}% +\lthtmltypeout{latex2htmlLength topskip=\the\topskip}\lthtmltypeout{}% +\lthtmltypeout{latex2htmlLength headheight=\the\headheight}\lthtmltypeout{}% +\lthtmltypeout{latex2htmlLength headsep=\the\headsep}\lthtmltypeout{}% +\lthtmltypeout{latex2htmlLength parskip=\the\parskip}\lthtmltypeout{}% +\lthtmltypeout{latex2htmlLength oddsidemargin=\the\oddsidemargin}\lthtmltypeout{}% +\makeatletter +\if@twoside\lthtmltypeout{latex2htmlLength evensidemargin=\the\evensidemargin}% +\else\lthtmltypeout{latex2htmlLength evensidemargin=\the\oddsidemargin}\fi% +\lthtmltypeout{}% +\makeatother +\setcounter{page}{1} +\onecolumn + +% !!! IMAGES START HERE !!! + +\setcounter{secnumdepth}{3} +\setcounter{tocdepth}{3} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} +\stepcounter{part} +\stepcounter{section} +\stepcounter{section} +{\newpage\clearpage +\lthtmlpictureA{tex2html_wrap253}% +\scalebox{1.0}{\includegraphics{ESMF_sandwich}}% +\lthtmlpictureZ +\lthtmlcheckvsize\clearpage} + +\stepcounter{section} +\stepcounter{section} +\stepcounter{section} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{section} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{section} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{section} +\stepcounter{part} +\stepcounter{part} +\stepcounter{section} +\stepcounter{subsection} +{\newpage\clearpage +\lthtmlpictureA{tex2html_wrap952}% +\scalebox{0.9}{\includegraphics{ESMF_GEOS5}}% +\lthtmlpictureZ +\lthtmlcheckvsize\clearpage} + +\stepcounter{subsection} +{\newpage\clearpage +\lthtmlpictureA{tex2html_wrap972}% +\scalebox{1.0}{\includegraphics{ESMF_appunit}}% +\lthtmlpictureZ +\lthtmlcheckvsize\clearpage} + +\stepcounter{subsection} +{\newpage\clearpage +\lthtmlpictureA{tex2html_wrap992}% +\scalebox{1.0}{\includegraphics{ESMF_serial}}% +\lthtmlpictureZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlpictureA{tex2html_wrap998}% +\scalebox{1.0}{\includegraphics{ESMF_concurrent}}% +\lthtmlpictureZ +\lthtmlcheckvsize\clearpage} + +\stepcounter{subsection} +\stepcounter{subsection} +{\newpage\clearpage +\lthtmlpictureA{tex2html_wrap1018}% +\scalebox{1.0}{\includegraphics{ESMF_reconcile}}% +\lthtmlpictureZ +\lthtmlcheckvsize\clearpage} + +\stepcounter{subsection} +\stepcounter{subsection} +{\newpage\clearpage +\lthtmlpictureA{tex2html_wrap16022}% +\includegraphics{Comp_obj}% +\lthtmlpictureZ +\lthtmlcheckvsize\clearpage} + +\stepcounter{section} +\stepcounter{subsection} +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{section} +\stepcounter{subsection} +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{section} +\stepcounter{subsection} +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{section} +\stepcounter{subsection} +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{section} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{part} +\stepcounter{section} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{section} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsubsection} +\stepcounter{subsection} +\stepcounter{subsubsection} +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline3733}% +$>= 0$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline3735}% +$< 0$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{section} +\stepcounter{subsection} +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{section} +\stepcounter{subsection} +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{section} +\stepcounter{subsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +{\newpage\clearpage +\lthtmlpictureA{tex2html_wrap5022}% +\scalebox{0.9}{\includegraphics{GridDecomps}}% +\lthtmlpictureZ +\lthtmlcheckvsize\clearpage} + +\stepcounter{subsubsection} +{\newpage\clearpage +\lthtmlpictureA{tex2html_wrap5038}% +\scalebox{0.9}{\includegraphics{LogRectGrids}}% +\lthtmlpictureZ +\lthtmlcheckvsize\clearpage} + +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +{\newpage\clearpage +\lthtmlpictureA{tex2html_wrap5284}% +\scalebox{0.75}{\includegraphics{GridStaggerLoc2D}}% +\lthtmlpictureZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlpictureA{tex2html_wrap5296}% +\scalebox{1.0}{\includegraphics{GridStaggerLoc3D}}% +\lthtmlpictureZ +\lthtmlcheckvsize\clearpage} + +\stepcounter{subsubsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsubsection} +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{section} +\stepcounter{subsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline6225}% +$e$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline6227}% +$number\_of\_nodes\_in\_element(1) + number\_of\_nodes\_in\_element(2) + + \cdots + number\_of\_nodes\_in\_element(e-1) + 1$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +\stepcounter{subsubsection} +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline6229}% +$n$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline6231}% +$(n-1)*spatialDim+1$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline6233}% +$d$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{section} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsubsection} +\stepcounter{subsection} +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{section} +\stepcounter{subsection} +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline7594}% +$ \times 1 \times ... \times 1$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{section} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{part} +\stepcounter{section} +\stepcounter{section} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{section} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsubsection} +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline8033}% +$^{14}$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{section} +\stepcounter{subsection} +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{section} +\stepcounter{subsection} +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{section} +\stepcounter{subsection} +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{section} +\stepcounter{subsection} +\stepcounter{subsubsection} +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{section} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{section} +\stepcounter{subsection} +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{section} +\stepcounter{subsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsection} +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{part} +\stepcounter{part} +\stepcounter{section} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{section} +{\newpage\clearpage +\lthtmlpictureA{tex2html_wrap10897}% +\scalebox{0.8}{\includegraphics{Appendix_uml}}% +\lthtmlpictureZ +\lthtmlcheckvsize\clearpage} + +\stepcounter{section} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} + +\end{document} diff --git a/docs/nightly/fix/reconcile-info/ESMC_crefdoc/img1.png b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/img1.png new file mode 100644 index 000000000..96fe7983d Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/img1.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMC_crefdoc/img10.png b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/img10.png new file mode 100644 index 000000000..bbd7e4980 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/img10.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMC_crefdoc/img11.png b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/img11.png new file mode 100644 index 000000000..dcbb7463c Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/img11.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMC_crefdoc/img12.png b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/img12.png new file mode 100644 index 000000000..4995285c9 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/img12.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMC_crefdoc/img13.png b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/img13.png new file mode 100644 index 000000000..5ced5f938 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/img13.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMC_crefdoc/img14.png b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/img14.png new file mode 100644 index 000000000..1cc88ffcc Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/img14.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMC_crefdoc/img15.png b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/img15.png new file mode 100644 index 000000000..fef60fca2 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/img15.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMC_crefdoc/img16.png b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/img16.png new file mode 100644 index 000000000..03d78b254 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/img16.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMC_crefdoc/img17.png b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/img17.png new file mode 100644 index 000000000..b0075cd30 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/img17.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMC_crefdoc/img18.png b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/img18.png new file mode 100644 index 000000000..2bf79a256 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/img18.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMC_crefdoc/img19.png b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/img19.png new file mode 100644 index 000000000..6334dafff Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/img19.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMC_crefdoc/img2.png b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/img2.png new file mode 100644 index 000000000..d76157394 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/img2.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMC_crefdoc/img20.png b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/img20.png new file mode 100644 index 000000000..b955e3452 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/img20.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMC_crefdoc/img21.png b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/img21.png new file mode 100644 index 000000000..d36c18fbc Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/img21.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMC_crefdoc/img3.png b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/img3.png new file mode 100644 index 000000000..920a300a6 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/img3.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMC_crefdoc/img4.png b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/img4.png new file mode 100644 index 000000000..e11811754 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/img4.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMC_crefdoc/img5.png b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/img5.png new file mode 100644 index 000000000..414a7d65c Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/img5.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMC_crefdoc/img6.png b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/img6.png new file mode 100644 index 000000000..c837d3b2a Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/img6.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMC_crefdoc/img7.png b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/img7.png new file mode 100644 index 000000000..7a76c5385 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/img7.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMC_crefdoc/img8.png b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/img8.png new file mode 100644 index 000000000..e0e2acd72 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/img8.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMC_crefdoc/img9.png b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/img9.png new file mode 100644 index 000000000..510e6ba90 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/img9.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMC_crefdoc/index.html b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/index.html new file mode 100644 index 000000000..5ec7d321f --- /dev/null +++ b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/index.html @@ -0,0 +1,557 @@ + + + + + +ESMC_crefdoc + + + + + + + + + + + + + + + + + + + +

+ +

+

+Earth System Modeling Framework +
+
+
+
+ESMF Reference Manual for C   +
+
+
+
+Version 8.8.0 beta snapshot +
+
+
+
+
+ESMF Joint Specification Team: V. Balaji, Byron Boville, Samson Cheung, Tom Clune, Nancy Collins, Tony Craig, Carlos Cruz, Arlindo da Silva, Cecelia DeLuca, Rosalinda de Fainchtein, Rocky Dunlap, Brian Eaton, Steve Goldhaber, Bob Hallberg, Tom Henderson, Chris Hill, Mark Iredell, Joseph Jacob, Rob Jacob, Phil Jones, Brian Kauffman, Erik Kluzek, Ben Koziol, Jay Larson, Peggy Li, Fei Liu, John Michalakes, Raffaele Montuoro, Sylvia Murphy, David Neckels, Ryan O Kuinghttons, Bob Oehmke, Chuck Panaccione, Daniel Rosen, Jim Rosinski, Mathew Rothstein, Bill Sacks, Kathy Saint, Will Sawyer, Earl Schwab, Shepard Smithline, Walter Spector, Don Stark, Max Suarez, Spencer Swift, Gerhard Theurich, Atanas Trayanov, Silverio Vasquez, Jon Wolfe, Weiyu Yang, Mike Young, Leonid Zaslavsky +
+
+
+
+December 3, 2024 +
+
+
+ +
+ +

+ +

+ + +

+
+
+
+
+
+
+
+
+
+
+
+
+
+

+Acknowledgements + +
+ +

+The ESMF software is based on the contributions of a broad community. +Below are the software packages that are included in ESMF or strongly +influenced our design. We'd like to express our gratitude to the +developers of these codes for access to their software as well as their +ideas and advice. + +

+ +

    +
  • Parallel I/O (PIO) developers at NCAR and DOE Laboratories for their +excellent work on this package and their help in making it work with ESMF + +

    +

  • +
  • The Spherical Coordinate Remapping and Interpolation Package (SCRIP) +from Los Alamos, which informed the design of our regridding functionality + +

    +

  • +
  • The Model Coupling Toolkit (MCT) from Argonne National Laboratory, +on which we based our sparse matrix multiply approach to general +regridding + +

    +

  • +
  • The Inpack configuration attributes package from NASA Goddard, +which was adapted for use in ESMF by members of NASA Global Modeling and +Assimilation group + +

    +

  • +
  • The Flexible Modeling System (FMS) package from GFDL and the +Goddard Earth Modeling System (GEMS) from NASA Goddard, both of which +provided inspiration for the overall ESMF architecture + +

    +

  • +
  • The Common Component Architecture (CCA) effort within the Department +of Energy, from which we drew many ideas about how to design components + +

    +

  • +
  • The Vector Signal Image Processing Library (VSIPL) and its +predecessors, which informed many aspects of our design, and the +radar system software design group at Lincoln Laboratory + +

    +

  • +
  • The Portable, Extensible Toolkit for Scientific Computation (PETSc) +package from Argonne National Laboratories, on which we +based our initial makefile system + +

    +

  • +
  • The Community Climate System Model (CCSM) and Weather Research and +Forecasting (WRF) modeling groups at NCAR, who have provided valuable +feedback on the design and implementation of the framework + +

    +

  • +
+ +

+ + + + + + + + +
+esmf_support@ucar.edu +
+ + diff --git a/docs/nightly/fix/reconcile-info/ESMC_crefdoc/internals.pl b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/internals.pl new file mode 100644 index 000000000..0e3140d9b --- /dev/null +++ b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/internals.pl @@ -0,0 +1,322 @@ +# LaTeX2HTML 2018 (Released Feb 1, 2018) +# Associate internals original text with physical files. + + +$key = q/XGrid:rest/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/appendix_esmf_error_codes/; +$ref_files{$key} = "$dir".q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/cite_BalajiXGrid/; +$ref_files{$key} = "$dir".q|node8.html|; +$noresave{$key} = "$nosave"; + +$key = q/cite_ref:SCRIP/; +$ref_files{$key} = "$dir".q|node8.html|; +$noresave{$key} = "$nosave"; + +$key = q/cite_uml/; +$ref_files{$key} = "$dir".q|node8.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:calkindflag_c/; +$ref_files{$key} = "$dir".q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:ccoordsys/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:cdecompflag/; +$ref_files{$key} = "$dir".q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:cfileformat/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:cgriditem/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:cgridstatus/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:clogkindflag/; +$ref_files{$key} = "$dir".q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:clogmsgflag/; +$ref_files{$key} = "$dir".q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:cmaster/; +$ref_files{$key} = "$dir".q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:cmeshelemtype/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:cmethod/; +$ref_files{$key} = "$dir".q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:cpolekind/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:creduce/; +$ref_files{$key} = "$dir".q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:cregion/; +$ref_files{$key} = "$dir".q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:cstaggerloc/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:ctypekind/; +$ref_files{$key} = "$dir".q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:indexflag/; +$ref_files{$key} = "$dir".q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:mesh:cfileformat/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:unmappedaction/; +$ref_files{$key} = "$dir".q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:GEOS5/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:GridDecomps/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:LogRectGrids/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:TheESMFwich/; +$ref_files{$key} = "$dir".q|node2.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:appunit/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:concurrent/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:gridstaggerloc2d/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:gridstaggerloc3d/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:reconcile/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:serial/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/opt:cextrapmethod/; +$ref_files{$key} = "$dir".q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/opt:cfilemode/; +$ref_files{$key} = "$dir".q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/opt:cregridmethod/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/opt:lineType/; +$ref_files{$key} = "$dir".q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/part:CCLTs/; +$ref_files{$key} = "$dir".q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/part:ESMFOverview/; +$ref_files{$key} = "$dir".q|node2.html|; +$noresave{$key} = "$nosave"; + +$key = q/part:Superstructure/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:Calendar/; +$ref_files{$key} = "$dir".q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:Clock/; +$ref_files{$key} = "$dir".q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:Config/; +$ref_files{$key} = "$dir".q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:CplComp/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:DistGrid/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:GridComp/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:Log/; +$ref_files{$key} = "$dir".q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:Profiling/; +$ref_files{$key} = "$dir".q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:RHandle/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:SciComp/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:ShapeShortcut/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:State/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:Submission/; +$ref_files{$key} = "$dir".q|node2.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:Support/; +$ref_files{$key} = "$dir".q|node2.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:Time/; +$ref_files{$key} = "$dir".q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:TimeInterval/; +$ref_files{$key} = "$dir".q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:Tracing/; +$ref_files{$key} = "$dir".q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:aliases/; +$ref_files{$key} = "$dir".q|node2.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:concurrency/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:coordspec/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:deepshallow/; +$ref_files{$key} = "$dir".q|node2.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:desc:dist/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:hierarchy/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:localcomm/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:mesh:capi:meshaddelements/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:mesh:capi:meshaddnodes/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:mesh:capi:meshcreate/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:mesh:capi:meshcreatefromfile/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:mesh:capi:meshgetcoord/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:mesh:capi:meshgetelemcoord/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:overallimpl/; +$ref_files{$key} = "$dir".q|node2.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:performance/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:scoping/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:spatialclasses/; +$ref_files{$key} = "$dir".q|node2.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:usage:items/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:xgrid:desc/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/subsec:Calendar_options/; +$ref_files{$key} = "$dir".q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/subsec:Time_Instants_and_TimeIntervals/; +$ref_files{$key} = "$dir".q|node6.html|; +$noresave{$key} = "$nosave"; + +1; + diff --git a/docs/nightly/fix/reconcile-info/ESMC_crefdoc/labels.pl b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/labels.pl new file mode 100644 index 000000000..cfdd5df20 --- /dev/null +++ b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/labels.pl @@ -0,0 +1,637 @@ +# LaTeX2HTML 2018 (Released Feb 1, 2018) +# Associate labels original text with physical files. + + +$key = q/XGrid:rest/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/appendix_esmf_error_codes/; +$external_labels{$key} = "$URL/" . q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/cite_BalajiXGrid/; +$external_labels{$key} = "$URL/" . q|node8.html|; +$noresave{$key} = "$nosave"; + +$key = q/cite_ref:SCRIP/; +$external_labels{$key} = "$URL/" . q|node8.html|; +$noresave{$key} = "$nosave"; + +$key = q/cite_uml/; +$external_labels{$key} = "$URL/" . q|node8.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:calkindflag_c/; +$external_labels{$key} = "$URL/" . q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:ccoordsys/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:cdecompflag/; +$external_labels{$key} = "$URL/" . q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:cfileformat/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:cgriditem/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:cgridstatus/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:clogkindflag/; +$external_labels{$key} = "$URL/" . q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:clogmsgflag/; +$external_labels{$key} = "$URL/" . q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:cmaster/; +$external_labels{$key} = "$URL/" . q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:cmeshelemtype/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:cmethod/; +$external_labels{$key} = "$URL/" . q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:cpolekind/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:creduce/; +$external_labels{$key} = "$URL/" . q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:cregion/; +$external_labels{$key} = "$URL/" . q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:cstaggerloc/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:ctypekind/; +$external_labels{$key} = "$URL/" . q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:indexflag/; +$external_labels{$key} = "$URL/" . q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:mesh:cfileformat/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:unmappedaction/; +$external_labels{$key} = "$URL/" . q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:GEOS5/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:GridDecomps/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:LogRectGrids/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:TheESMFwich/; +$external_labels{$key} = "$URL/" . q|node2.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:appunit/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:concurrent/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:gridstaggerloc2d/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:gridstaggerloc3d/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:reconcile/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:serial/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/opt:cextrapmethod/; +$external_labels{$key} = "$URL/" . q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/opt:cfilemode/; +$external_labels{$key} = "$URL/" . q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/opt:cregridmethod/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/opt:lineType/; +$external_labels{$key} = "$URL/" . q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/part:CCLTs/; +$external_labels{$key} = "$URL/" . q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/part:ESMFOverview/; +$external_labels{$key} = "$URL/" . q|node2.html|; +$noresave{$key} = "$nosave"; + +$key = q/part:Superstructure/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:Calendar/; +$external_labels{$key} = "$URL/" . q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:Clock/; +$external_labels{$key} = "$URL/" . q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:Config/; +$external_labels{$key} = "$URL/" . q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:CplComp/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:DistGrid/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:GridComp/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:Log/; +$external_labels{$key} = "$URL/" . q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:Profiling/; +$external_labels{$key} = "$URL/" . q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:RHandle/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:SciComp/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:ShapeShortcut/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:State/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:Submission/; +$external_labels{$key} = "$URL/" . q|node2.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:Support/; +$external_labels{$key} = "$URL/" . q|node2.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:Time/; +$external_labels{$key} = "$URL/" . q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:TimeInterval/; +$external_labels{$key} = "$URL/" . q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:Tracing/; +$external_labels{$key} = "$URL/" . q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:aliases/; +$external_labels{$key} = "$URL/" . q|node2.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:concurrency/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:coordspec/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:deepshallow/; +$external_labels{$key} = "$URL/" . q|node2.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:desc:dist/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:hierarchy/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:localcomm/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:mesh:capi:meshaddelements/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:mesh:capi:meshaddnodes/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:mesh:capi:meshcreate/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:mesh:capi:meshcreatefromfile/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:mesh:capi:meshgetcoord/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:mesh:capi:meshgetelemcoord/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:overallimpl/; +$external_labels{$key} = "$URL/" . q|node2.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:performance/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:scoping/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:spatialclasses/; +$external_labels{$key} = "$URL/" . q|node2.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:usage:items/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:xgrid:desc/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/subsec:Calendar_options/; +$external_labels{$key} = "$URL/" . q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/subsec:Time_Instants_and_TimeIntervals/; +$external_labels{$key} = "$URL/" . q|node6.html|; +$noresave{$key} = "$nosave"; + +1; + + +# LaTeX2HTML 2018 (Released Feb 1, 2018) +# labels from external_latex_labels array. + + +$key = q/XGrid:rest/; +$external_latex_labels{$key} = q|21.2.1|; +$noresave{$key} = "$nosave"; + +$key = q/_/; +$external_latex_labels{$key} = q|<|; +$noresave{$key} = "$nosave"; + +$key = q/appendix_esmf_error_codes/; +$external_latex_labels{$key} = q|36|; +$noresave{$key} = "$nosave"; + +$key = q/const:calkindflag_c/; +$external_latex_labels{$key} = q|26.2.1|; +$noresave{$key} = "$nosave"; + +$key = q/const:ccoordsys/; +$external_latex_labels{$key} = q|19.2.1|; +$noresave{$key} = "$nosave"; + +$key = q/const:cdecompflag/; +$external_latex_labels{$key} = q|34.3|; +$noresave{$key} = "$nosave"; + +$key = q/const:cfileformat/; +$external_latex_labels{$key} = q|19.2.6|; +$noresave{$key} = "$nosave"; + +$key = q/const:cgriditem/; +$external_latex_labels{$key} = q|19.2.2|; +$noresave{$key} = "$nosave"; + +$key = q/const:cgridstatus/; +$external_latex_labels{$key} = q|19.2.3|; +$noresave{$key} = "$nosave"; + +$key = q/const:clogkindflag/; +$external_latex_labels{$key} = q|31.2.1|; +$noresave{$key} = "$nosave"; + +$key = q/const:clogmsgflag/; +$external_latex_labels{$key} = q|31.2.2|; +$noresave{$key} = "$nosave"; + +$key = q/const:cmaster/; +$external_latex_labels{$key} = q|34|; +$noresave{$key} = "$nosave"; + +$key = q/const:cmeshelemtype/; +$external_latex_labels{$key} = q|20.2.1|; +$noresave{$key} = "$nosave"; + +$key = q/const:cmethod/; +$external_latex_labels{$key} = q|34.12|; +$noresave{$key} = "$nosave"; + +$key = q/const:cpolekind/; +$external_latex_labels{$key} = q|19.2.4|; +$noresave{$key} = "$nosave"; + +$key = q/const:creduce/; +$external_latex_labels{$key} = q|34.14|; +$noresave{$key} = "$nosave"; + +$key = q/const:cregion/; +$external_latex_labels{$key} = q|34.15|; +$noresave{$key} = "$nosave"; + +$key = q/const:cstaggerloc/; +$external_latex_labels{$key} = q|19.2.5|; +$noresave{$key} = "$nosave"; + +$key = q/const:ctypekind/; +$external_latex_labels{$key} = q|34.18|; +$noresave{$key} = "$nosave"; + +$key = q/const:indexflag/; +$external_latex_labels{$key} = q|34.7|; +$noresave{$key} = "$nosave"; + +$key = q/const:mesh:cfileformat/; +$external_latex_labels{$key} = q|20.2.2|; +$noresave{$key} = "$nosave"; + +$key = q/const:unmappedaction/; +$external_latex_labels{$key} = q|34.19|; +$noresave{$key} = "$nosave"; + +$key = q/fig:GEOS5/; +$external_latex_labels{$key} = q|2|; +$noresave{$key} = "$nosave"; + +$key = q/fig:GridDecomps/; +$external_latex_labels{$key} = q|7|; +$noresave{$key} = "$nosave"; + +$key = q/fig:LogRectGrids/; +$external_latex_labels{$key} = q|8|; +$noresave{$key} = "$nosave"; + +$key = q/fig:TheESMFwich/; +$external_latex_labels{$key} = q|1|; +$noresave{$key} = "$nosave"; + +$key = q/fig:appunit/; +$external_latex_labels{$key} = q|3|; +$noresave{$key} = "$nosave"; + +$key = q/fig:concurrent/; +$external_latex_labels{$key} = q|5|; +$noresave{$key} = "$nosave"; + +$key = q/fig:gridstaggerloc2d/; +$external_latex_labels{$key} = q|9|; +$noresave{$key} = "$nosave"; + +$key = q/fig:gridstaggerloc3d/; +$external_latex_labels{$key} = q|10|; +$noresave{$key} = "$nosave"; + +$key = q/fig:reconcile/; +$external_latex_labels{$key} = q|6|; +$noresave{$key} = "$nosave"; + +$key = q/fig:serial/; +$external_latex_labels{$key} = q|4|; +$noresave{$key} = "$nosave"; + +$key = q/opt:cextrapmethod/; +$external_latex_labels{$key} = q|34.3|; +$noresave{$key} = "$nosave"; + +$key = q/opt:cfilemode/; +$external_latex_labels{$key} = q|34.4|; +$noresave{$key} = "$nosave"; + +$key = q/opt:cregridmethod/; +$external_latex_labels{$key} = q|16.2.1|; +$noresave{$key} = "$nosave"; + +$key = q/opt:lineType/; +$external_latex_labels{$key} = q|34.8|; +$noresave{$key} = "$nosave"; + +$key = q/part:CCLTs/; +$external_latex_labels{$key} = q|II|; +$noresave{$key} = "$nosave"; + +$key = q/part:ESMFOverview/; +$external_latex_labels{$key} = q|I|; +$noresave{$key} = "$nosave"; + +$key = q/part:Superstructure/; +$external_latex_labels{$key} = q|III|; +$noresave{$key} = "$nosave"; + +$key = q/sec:Calendar/; +$external_latex_labels{$key} = q|26.1|; +$noresave{$key} = "$nosave"; + +$key = q/sec:Clock/; +$external_latex_labels{$key} = q|29.1|; +$noresave{$key} = "$nosave"; + +$key = q/sec:Config/; +$external_latex_labels{$key} = q|30.1|; +$noresave{$key} = "$nosave"; + +$key = q/sec:CplComp/; +$external_latex_labels{$key} = q|12.1|; +$noresave{$key} = "$nosave"; + +$key = q/sec:DistGrid/; +$external_latex_labels{$key} = q|22.1|; +$noresave{$key} = "$nosave"; + +$key = q/sec:GridComp/; +$external_latex_labels{$key} = q|11.1|; +$noresave{$key} = "$nosave"; + +$key = q/sec:Log/; +$external_latex_labels{$key} = q|31.1|; +$noresave{$key} = "$nosave"; + +$key = q/sec:Profiling/; +$external_latex_labels{$key} = q|33.1.1|; +$noresave{$key} = "$nosave"; + +$key = q/sec:RHandle/; +$external_latex_labels{$key} = q|23.1|; +$noresave{$key} = "$nosave"; + +$key = q/sec:SciComp/; +$external_latex_labels{$key} = q|13.1|; +$noresave{$key} = "$nosave"; + +$key = q/sec:ShapeShortcut/; +$external_latex_labels{$key} = q|19.1.3|; +$noresave{$key} = "$nosave"; + +$key = q/sec:State/; +$external_latex_labels{$key} = q|14.1|; +$noresave{$key} = "$nosave"; + +$key = q/sec:Submission/; +$external_latex_labels{$key} = q|4|; +$noresave{$key} = "$nosave"; + +$key = q/sec:Support/; +$external_latex_labels{$key} = q|3|; +$noresave{$key} = "$nosave"; + +$key = q/sec:Time/; +$external_latex_labels{$key} = q|27.1|; +$noresave{$key} = "$nosave"; + +$key = q/sec:TimeInterval/; +$external_latex_labels{$key} = q|28.1|; +$noresave{$key} = "$nosave"; + +$key = q/sec:Tracing/; +$external_latex_labels{$key} = q|33.1.2|; +$noresave{$key} = "$nosave"; + +$key = q/sec:aliases/; +$external_latex_labels{$key} = q|5.3|; +$noresave{$key} = "$nosave"; + +$key = q/sec:concurrency/; +$external_latex_labels{$key} = q|9.3|; +$noresave{$key} = "$nosave"; + +$key = q/sec:coordspec/; +$external_latex_labels{$key} = q|19.1.5|; +$noresave{$key} = "$nosave"; + +$key = q/sec:deepshallow/; +$external_latex_labels{$key} = q|5.2|; +$noresave{$key} = "$nosave"; + +$key = q/sec:desc:dist/; +$external_latex_labels{$key} = q|19.1.4|; +$noresave{$key} = "$nosave"; + +$key = q/sec:hierarchy/; +$external_latex_labels{$key} = q|9.2|; +$noresave{$key} = "$nosave"; + +$key = q/sec:localcomm/; +$external_latex_labels{$key} = q|9.4|; +$noresave{$key} = "$nosave"; + +$key = q/sec:mesh:capi:meshaddelements/; +$external_latex_labels{$key} = q|20.3.3|; +$noresave{$key} = "$nosave"; + +$key = q/sec:mesh:capi:meshaddnodes/; +$external_latex_labels{$key} = q|20.3.4|; +$noresave{$key} = "$nosave"; + +$key = q/sec:mesh:capi:meshcreate/; +$external_latex_labels{$key} = q|20.3.5|; +$noresave{$key} = "$nosave"; + +$key = q/sec:mesh:capi:meshcreatefromfile/; +$external_latex_labels{$key} = q|20.3.6|; +$noresave{$key} = "$nosave"; + +$key = q/sec:mesh:capi:meshgetcoord/; +$external_latex_labels{$key} = q|20.3.7|; +$noresave{$key} = "$nosave"; + +$key = q/sec:mesh:capi:meshgetelemcoord/; +$external_latex_labels{$key} = q|20.3.8|; +$noresave{$key} = "$nosave"; + +$key = q/sec:overallimpl/; +$external_latex_labels{$key} = q|8|; +$noresave{$key} = "$nosave"; + +$key = q/sec:performance/; +$external_latex_labels{$key} = q|9.6|; +$noresave{$key} = "$nosave"; + +$key = q/sec:scoping/; +$external_latex_labels{$key} = q|9.5|; +$noresave{$key} = "$nosave"; + +$key = q/sec:spatialclasses/; +$external_latex_labels{$key} = q|5.6|; +$noresave{$key} = "$nosave"; + +$key = q/sec:usage:items/; +$external_latex_labels{$key} = q|19.1.8|; +$noresave{$key} = "$nosave"; + +$key = q/sec:xgrid:desc/; +$external_latex_labels{$key} = q|21.1|; +$noresave{$key} = "$nosave"; + +$key = q/subsec:Calendar_options/; +$external_latex_labels{$key} = q|26.2|; +$noresave{$key} = "$nosave"; + +$key = q/subsec:Time_Instants_and_TimeIntervals/; +$external_latex_labels{$key} = q|25.3|; +$noresave{$key} = "$nosave"; + +1; + diff --git a/docs/nightly/fix/reconcile-info/ESMC_crefdoc/next.png b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/next.png new file mode 100644 index 000000000..1628652aa Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/next.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMC_crefdoc/next_g.png b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/next_g.png new file mode 100644 index 000000000..3c1c3f569 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/next_g.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMC_crefdoc/node1.html b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/node1.html new file mode 100644 index 000000000..5b17550c8 --- /dev/null +++ b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/node1.html @@ -0,0 +1,828 @@ + + + + + +Contents + + + + + + + + + + + + + + + + + + + + +
+ +

+Contents +

+ + + + + +

+
+esmf_support@ucar.edu +
+ + diff --git a/docs/nightly/fix/reconcile-info/ESMC_crefdoc/node10.html b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/node10.html new file mode 100644 index 000000000..662a92438 --- /dev/null +++ b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/node10.html @@ -0,0 +1,69 @@ + + + + + +About this document ... + + + + + + + + + + + + + + + + + + + +

+About this document ... +

+

+This document was generated using the +LaTeX2HTML translator Version 2018 (Released Feb 1, 2018) +

+Copyright © 1993, 1994, 1995, 1996, +Nikos Drakos, +Computer Based Learning Unit, University of Leeds. +
+Copyright © 1997, 1998, 1999, +Ross Moore, +Mathematics Department, Macquarie University, Sydney. +

+The command line arguments were:
+ latex2html -white -toc_depth 5 -split +1 -show_section_numbers -local_icons -address 'esmf_support@ucar.edu' ESMC_crefdoc.tex +

+The translation was initiated on 2024-12-03 +


+
+esmf_support@ucar.edu +
+ + diff --git a/docs/nightly/fix/reconcile-info/ESMC_crefdoc/node2.html b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/node2.html new file mode 100644 index 000000000..53701a6ad --- /dev/null +++ b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/node2.html @@ -0,0 +1,984 @@ + + + + + +1 ESMF Overview + + + + + + + + + + + + + + + + + + + + + +Subsections + + + +
+ +

+ +
+1 ESMF Overview +

+ + +

+ +

+1 What is the Earth System Modeling Framework? +

+ +

+The Earth System Modeling Framework (ESMF) is a suite of software +tools for developing high-performance, multi-component Earth science +modeling applications. Such applications may include a few or dozens +of components representing atmospheric, oceanic, terrestrial, or +other physical domains, and their constituent processes (dynamical, chemical, +biological, etc.). Often these components are developed by different +groups independently, and must be “coupled” together using software +that transfers and transforms data among the components in order to form +functional simulations. + +

+ESMF supports the development of these complex applications in a number +of ways. It introduces a set of simple, consistent component interfaces +that apply to all types of components, including couplers themselves. These +interfaces expose in an obvious way the inputs and outputs of each component. +It offers a variety of data structures for transferring data between components, +and libraries for regridding, time advancement, and other common modeling +functions. Finally, it provides a growing set of tools for using metadata +to describe components and their input and output fields. This capability +is important because components that are self-describing +can be integrated more easily into automated workflows, model and dataset +distribution and analysis portals, and other emerging “semantically enabled” +computational environments. + +

+ESMF is not a single Earth system model into which all components +must fit, and its distribution doesn't contain any scientific code. +Rather it provides a way of structuring components so that they can be used +in many different user-written applications and contexts with minimal code +modification, and so they can be coupled together in new configurations +with relative ease. The idea is to create many components across a +broad community, and so to encourage new collaborations and combinations. + +

+ESMF offers the flexibility needed by this diverse user base. It is tested +nightly on more than two dozen platform/compiler combinations; can be +run on one processor or thousands; supports shared and distributed memory +programming models and a hybrid model; can run components +sequentially (on all the same processors) or concurrently (on mutually +exclusive processors); and supports single executable or multiple +executable modes. + +

+ESMF's generality and breadth of function can make it daunting for the +novice user. To help users navigate the software, we try to apply +consistent names and behavior throughout and to provide many examples. +The large-scale structure of the software is straightforward. +The utilities and data structures for building modeling components +are called the ESMF infrastructure. The coupling interfaces and +drivers are called the superstructure. User code sits between +these two layers, making calls to the infrastructure +libraries underneath and being scheduled and synchronized by the +superstructure above. The configuration resembles a sandwich, as +shown in Figure 1. + +

+ESMF users may choose to extensively rewrite their codes +to take advantage of the ESMF infrastructure, or they may decide to +simply wrap their components in the ESMF superstructure in order to +utilize framework coupling services. Either way, we encourage users +to contact our +support team +if questions arise about how to best +use the software, or how to structure their application. ESMF is +more than software; it's a group of people dedicated to realizing +the vision of a collaborative model development community that spans +institutional and national bounds. + +

+ +

+2 The ESMF Reference Manual for C +

+ +

+ESMF has a complete set of Fortran interfaces and +some C interfaces. This ESMF Reference Manual is a listing of +ESMF interfaces for C. + +

+Interfaces are grouped by class. A class is comprised of the data and +methods for a specific concept like a physical field. Superstructure classes +are listed first in this Manual, followed by infrastructure +classes. + +

+The major classes in the ESMF superstructure are Components, which +usually represent +large pieces of functionality such as atmosphere and ocean models, +and States, which are the data structures +used to transfer data between Components. There are both data +structures and utilities in the ESMF +infrastructure. Data structures include multi-dimensional Arrays, Fields +that are comprised of an Array and a Grid, and collections of Arrays +and Fields called ArrayBundles and FieldBundles, respectively. +There are utility libraries for data decomposition and communications, +time management, logging and error handling, and application configuration. + +

+

+
+
+ + + +
Figure 1: +Schematic of the ESMF “sandwich” architecture. +The framework consists of two parts, an upper level +superstructure layer and a lower level infrastructure layer. +User code is sandwiched between these two layers.
+\scalebox{1.0}{\includegraphics{ESMF_sandwich}}
+
+
+
+ +

+ +
+3 How to Contact User Support and Find Additional Information +

+The ESMF team can answer questions about the interfaces presented in this +document. For user support, please contact +esmf_support@ucar.edu. + +

+The website, http://www.earthsystemmodeling.org, provide more information of the ESMF project as a whole. +The website includes release notes and known bugs for each version of the +framework, supported platforms, project history, values, and metrics, related projects, +the ESMF management structure, and more. The ESMF User's Guide +contains build and installation instructions, an overview of the ESMF system and a description of +how its classes interrelate (this version of the document corresponds to the last public version of the framework). Also available on the ESMF website is the +ESMF Developer's Guide +that details ESMF procedures and conventions. + +

+ +

+ +
+4 How to Submit Comments, Bug Reports, and Feature Requests +

+ +We welcome input on any aspect of the ESMF project. Send +questions and comments to +esmf_support@ucar.edu. + +

+ + +

+ +

+5 The ESMF Application Programming Interface +

+ +

+The ESMF Application Programming Interface (API) is based on the +object-oriented programming concept of a class. A class is a +software construct that is used for grouping a set of related variables +together with the subroutines and functions that operate on them. We +use classes in ESMF because they help to organize the code, and often +make it easier to maintain and understand. A particular instance +of a class is called an object. For example, Field is an +ESMF class. An actual Field called temperature is an object. +That is about as far as we will go into software engineering +terminology. + +

+The C interface is implemented so that the variables associated +with a class are stored in a C structure. For example, an +ESMC_Field structure stores the data array, grid +information, and metadata associated with a physical field. +The structure for each class is defined in a C header file. +The operations associated with each class are also +defined in the header files. + +

+The header files for ESMF are bundled together and can be accessed with a +single include statement, #include "ESMC.h". By convention, +the C entry points are named using “ESMC” as a prefix. + +

+ +

+5.1 Standard Methods and Interface Rules +

+ +

+ESMF defines a set of standard methods and interface rules that +hold across the entire API. These are: + +

+ +

    +
  • ESMC_<Class>Create() and ESMC_<Class>Destroy(), for +creating and destroying objects of ESMF classes that require internal memory +management (- called ESMF deep classes). The ESMC_<Class>Create() method +allocates memory for the object itself and for internal variables, and +initializes variables where appropriate. It is always written as a +function that returns a derived type instance of the class, i.e. an object. + +

    +

  • +
  • ESMC_<Class>Set() and ESMC_<Class>Get(), for setting and +retrieving a particular item or flag. In general, these methods are overloaded +for all cases where the item can be manipulated as a name/value pair. If +identifying the item requires more than a name, or if the class is of +sufficient complexity that overloading in this way would result in an +overwhelming number of options, we define specific +ESMC_<Class>Set<Something>() and ESMC_<Class>Get<Something>() +interfaces. + +

    +

  • +
  • ESMC_<Class>Add(), ESMC_<Class>AddReplace(), +ESMC_<Class>Remove(), and ESMC_<Class>Replace(), for manipulating +objects of ESMF container classes - such as ESMC_State and +ESMC_FieldBundle. For example, the ESMC_FieldBundleAdd() +method adds another Field to an existing FieldBundle object. + +

    +

  • +
  • ESMC_<Class>Print(), for printing the contents of an object to +standard out. This method is mainly intended for debugging. + +

    +

  • +
  • ESMC_<Class>ReadRestart() and ESMC_<Class>WriteRestart(), +for saving the contents of a class and restoring it exactly. Read +and write restart methods have not yet been implemented for most +ESMF classes, so where necessary the user needs to write restart +values themselves. + +

    +

  • +
  • ESMC_<Class>Validate(), for determining whether a class is +internally consistent. For example, ESMC_FieldValidate() validates +the internal consistency of a Field object. + +

    +

  • +
+ +

+ +

+ +
+5.2 Deep and Shallow Classes +

+ +

+ESMF contains two types of classes. + +

+Deep classes require +ESMC_<Class>Create() and ESMC_<Class>Destroy() calls. +They involve memory allocation, take significant time to set up (due to +memory management) and should not be created in a time-critical portion of code. +Deep objects persist even after the method in which they were created has +returned. Most classes in ESMF, including GridComp, CplComp, State, Fields, FieldBundles, Arrays, ArrayBundles, Grids, and Clocks, fall into this category. + +

+Shallow classes do not possess ESMC_<Class>Create() +and ESMC_<Class>Destroy() calls. They are simply declared +and their values set using an ESMC_<Class>Set() call. +Examples of shallow classes are Time, TimeInterval, and ArraySpec. +Shallow classes do not take long to set up and can be declared and set within +a time-critical code segment. Shallow objects stop existing when execution +goes out of the declaring scope. + +

+An exception to this is when a shallow object, such as a Time, +is stored in a deep object such as a Clock. The deep Clock object then +becomes the declaring scope of the Time object, persisting in memory. +The Time object is deallocated with the ESMC_ClockDestroy() call. + +

+See Section 8, Overall Design and Implementation +Notes, for a brief discussion of deep and shallow classes from +an implementation perspective. For an in-depth look at the design + and inter-language issues related to deep and shallow classes, +see the ESMF Implementation Report. + +

+ +

+ +
+5.3 Aliases +

+ +

+Deep objects, i.e. instances of ESMF deep classes created by the appropriate +ESMC_<Class>Create(), can be used with the standard assignment (=) +operator. + +

+The assignment +

+deep2 = deep1
+
+makes deep2 an alias of deep1, meaning that both variables +reference the same deep allocation in memory. Many aliases of the same deep +object can be created. + +

+All the aliases of a deep object are equivalent. In particular, there is no +distinction between the variable on the left hand side of the actual +ESMC_<Class>Create() call, and any aliases created from it. All actions +taken on any of the aliases of a deep object affect the deep object, and thus +all other aliases. + +

+ +

+5.4 Special Methods +

+ +

+The following are special methods which, in one case, +are required by any application using ESMF, and in the +other case must be called by any application that is using +ESMF Components. + +

+ +

    +
  • ESMC_Initialize() and ESMC_Finalize() are required +methods that must bracket the use of ESMF within an application. +They manage the resources required to run ESMF and shut it down +gracefully. ESMF does not support restarts in the same executable, i.e. +ESMC_Initialize() should not be called after ESMC_Finalize(). +
  • +
  • ESMC_<Type>CompInitialize(), ESMC_<Type>CompRun(), and +ESMC_<Type>CompFinalize() are component methods that are used at the +highest level within ESMF. <Type> may be <Grid>, for +Gridded Components such as oceans or atmospheres, or +<Cpl>, for Coupler Components that are used to connect +them. The content of these methods is not part of the ESMF. +Instead the methods call into associated subroutines within +user code. + +

    +

  • +
+ +

+ +

+5.5 The ESMF Data Hierarchy +

+ +

+The ESMF API is organized around a hierarchy of classes that +contain model data. The operations that are performed +on model data, such as regridding, redistribution, and halo +updates, are methods of these classes. + +

+The main data classes offered by the ESMF C API, in order of increasing complexity, are: + +

    +
  • Array An ESMF Array is a distributed, multi-dimensional +array that can carry information such as its type, kind, rank, and +associated halo widths. It contains a reference to a native language array. +
  • +
  • Field A Field represents a physical scalar or vector field. +It contains a reference to an Array along with grid information and metadata. +
  • +
  • State A State represents the collection of data that a +Component either requires to run (an Import State) or can make +available to other Components (an Export State). +States may contain references to Arrays, ArrayBundles, Fields, +FieldBundles, or other States. +
  • +
  • Component A Component is a piece of software +with a distinct function. ESMF currently recognizes two types +of Components. Components that represent a physical domain +or process, such +as an atmospheric model, are called Gridded Components since they are +usually discretized on an underlying grid. The Components +responsible for regridding and transferring data between Gridded +Components are called Coupler Components. Each Component +is associated with an Import and an Export State. Components +can be nested so that simpler Components are contained within more +complex ones. + +

    +

  • +
+ +

+Underlying these data classes are native language arrays. ESMF Arrays +and Fields can be queried for the C pointer to the actual data. You can +perform communication operations either on the ESMF data objects or +directly on C arrays through the VM class, which serves +as a unifying wrapper for distributed and shared memory communication +libraries. + +

+ +

+ +
+5.6 ESMF Spatial Classes +

+ +

+Like the hierarchy of model data classes, ranging from the +simple to the complex, ESMF is organized around a hierarchy of +classes that represent different spaces associated with a computation. +Each of these spaces can be manipulated, in order to give +the user control over how a computation is executed. For Earth system +models, this hierarchy starts with the address space associated +with the computer and extends to the physical region described by +the application. The main spatial classes in ESMF, from +those closest to the machine to those closest to the application, are: + +

+ +

    +
  • The Virtual Machine, or VM The ESMF VM is an +abstraction of a parallel computing environment that encompasses +both shared and distributed memory, single and multi-core systems. +Its primary purpose is resource allocation and management. Each Component +runs in its own VM, using the resources it defines. The elements of a VM +are Persistent Execution Threads, or PETs, that are +executing in Virtual Address Spaces, or VASs. A simple +case is one in which every PET is associated with a single MPI process. +In this case every PET is executing in its own private VAS. If Components +are nested, the parent Component allocates a subset of its PETs to its +children. The children have some flexibility, subject to the constraints of +the computing environment, to decide how they want to use the +resources associated with the PETs they've received. + +

    +

  • +
  • DELayout A DELayout represents a data decomposition +(we also refer to this as a distribution). Its +basic elements are Decomposition Elements, or DEs. +A DELayout associates a set of DEs with the PETs in a VM. DEs are not +necessarily one-to-one with PETs. For cache blocking, +or user-managed multi-threading, more DEs than PETs may be defined. +Fewer DEs than PETs may also be defined if an application requires it. + +

    +The current ESMF C API does not provide user access to the DELayout class. + +

    +

  • +
  • DistGrid A DistGrid represents the index space +associated with a grid. It is a useful abstraction because +often a full specification of grid coordinates is not necessary +to define data communication patterns. The DistGrid contains +information about the sequence and connectivity of data points, +which is sufficient information for many operations. Arrays +are defined on DistGrids. + +

    +

  • +
  • Array An Array defines how the index space described +in the DistGrid is associated with the VAS of each PET. This association +considers the type, kind and rank of the indexed data. Fields are +defined on Arrays. + +

    +

  • +
  • Grid A Grid is an abstraction for a logically rectangular +region in physical space. It associates a coordinate system, a set of +coordinates, and a topology to a collection of grid cells. Grids in ESMF +are comprised of DistGrids plus additional coordinate information. + +

    +

  • +
  • Mesh A Mesh provides an abstraction for an unstructured +grid. Coordinate information is set in nodes, which represent +vertices or corners. Together the nodes establish the boundaries +of mesh elements or cells. + +

    +

  • +
  • LocStream A LocStream is an abstraction for a set of +unstructured data points without any topological relationship to each +other. + +

    +

  • +
  • Field A Field may contain more dimensions than the +Grid that it is discretized on. For example, for convenience +during integration, a user may want to define a single Field object +that holds snapshots of data at multiple times. Fields also +keep track of the stagger location of a Field data point within its +associated Grid cell. + +

    +

  • +
+ +

+ +

+5.7 ESMF Maps +

+ +

+In order to define how the index spaces of the spatial classes relate +to each other, we require either implicit rules (in which case the +relationship between spaces is defined by default), or special Map arrays +that allow the user to specify the desired association. The form of the +specification is usually that the position of the array element carries +information about the first object, and the value of the array element carries +information about the second object. ESMF includes a distGridToArrayMap, +a gridToFieldMap, a distGridToGridMap, and others. + +

+ +

+5.8 ESMF Specification Classes +

+ +

+It can be useful to make small packets +of descriptive parameters. ESMF has one of these: + +

    +
  • ArraySpec, for storing the specifics, such as type/kind/rank, +of an array. +
  • +
+ +

+ +

+5.9 ESMF Utility Classes +

+ +

+There are a number of utilities in ESMF that can be used independently. +These are: + +

    +
  • Attributes, for storing metadata about Fields, +FieldBundles, States, and other classes. +(Not currently available through the ESMF C API.) +
  • +
  • TimeMgr, for calendar, time, clock and alarm functions. +
  • +
  • LogErr, for logging and error handling. +
  • +
  • Config, for creating resource files that can replace namelists +as a consistent way of setting configuration parameters. +
  • +
+ +

+ +

+6 Integrating ESMF into Applications +

+ +

+Depending on the requirements of the application, the user may +want to begin integrating ESMF in either a top-down or bottom-up +manner. In the top-down approach, tools at the superstructure +level are used to help reorganize and structure the interactions +among large-scale components in the application. It is appropriate +when interoperability is a primary concern; for example, when +several different versions or implementations of components are going +to be swapped in, or a particular component is going to be used +in multiple contexts. Another reason for deciding on a top-down +approach is that the application contains legacy code that for +some reason (e.g., intertwined functions, very large, +highly performance-tuned, resource limitations) there is little +motivation to fully restructure. The superstructure can usually be +incorporated into such applications in a way that is non-intrusive. + +

+In the bottom-up approach, the user selects desired utilities +(data communications, calendar management, performance profiling, +logging and error handling, etc.) from the ESMF infrastructure +and either writes new code using them, introduces them into +existing code, or replaces the functionality in existing code +with them. This makes sense when maximizing code reuse and +minimizing maintenance costs is a goal. There may be a specific +need for functionality or the component writer may be starting +from scratch. The calendar management utility is a popular +place to start. + +

+ +

+6.1 Using the ESMF Superstructure +

+ +

+The following is a typical set of steps involved in adopting +the ESMF superstructure. The first two tasks, which occur +before an ESMF call is ever made, have the potential to be +the most difficult and time-consuming. They are the work +of splitting an application into components and ensuring that +each component has well-defined stages of execution. ESMF +aside, this sort of code structure helps to promote application +clarity and maintainability, and the effort put into it is likely +to be a good investment. + +

+ +

    +
  1. Decide how to organize the application as discrete Gridded +and Coupler Components. This might involve reorganizing code +so that individual components are cleanly separated and their +interactions consist of a minimal number of data exchanges. + +

    +

  2. +
  3. Divide the code for each component into initialize, run, and +finalize methods. These methods can be multi-phase, e.g., +init_1, init_2. + +

    +

  4. +
  5. Pack any data that will be transferred between components +into ESMF Import and Export State data structures. This is done +by first wrapping model data in either ESMF Arrays or Fields. +Arrays are simpler to create and use than Fields, but carry less +information and have a more limited range of operations. +These Arrays and Fields are then added to Import and +Export States. They may be packed into ArrayBundles or +FieldBundles first, for more efficient communications. +Metadata describing the model data can also be added. +At the end of this step, the data to be transferred between +components will be in a compact and largely self-describing +form. + +

    +

  6. +
  7. Pack time information into ESMF time management data +structures. + +

    +

  8. +
  9. Using code templates provided in the ESMF distribution, create +ESMF Gridded and Coupler Components to represent each component +in the user code. + +

    +

  10. +
  11. Write a set services routine that sets ESMF entry +points for each user component's initialize, run, and finalize +methods. + +

    +

  12. +
  13. Run the application using an ESMF Application Driver. + +

    +

  14. +
+ +

+ +

+6.2 Constants +

+ +

+Named constants are used throughout ESMF to specify the values of many +arguments with multiple well defined values in a consistent way. These +constants are defined by a derived type that follows this pattern: + +

+

+ESMF_<CONSTANT_NAME>_Flag
+
+ +

+The values of the constant are then specified by this pattern: + +

+

+ESMF_<CONSTANT_NAME>_<VALUE1>
+ESMF_<CONSTANT_NAME>_<VALUE2>
+ESMF_<CONSTANT_NAME>_<VALUE3>
+...
+
+ +

+A master list of all available constants can be found in section +34. + +

+ +

+7 Overall Rules and Behavior +

+ +

+ +

+7.1 Local and Global Views and Associated Conventions +

+ +

+ESMF data objects such as Fields are distributed over +DEs, with each DE getting a portion of the data. Depending +on the task, a local or global view of the object may be +preferable. In a local view, data indices start with the first +element on the DE and end with the last element on the same DE. +In a global view, there is an assumed or specified order to +the set of DEs over which the object is distributed. Data +indices start with the first element on the first DE, and +continue across all the elements in the sequence of DEs. +The last data index represents the number of elements in the +entire object. The DistGrid provides the mapping between +local and global data indices. + +

+The convention in ESMF is that entities with a global view +have no prefix. Entities with a DE-local (and in some cases, +PET-local) view have the prefix “local.” + +

+Just as data is distributed over DEs, DEs themselves can be +distributed over PETs. This is an advanced feature for users +who would like to create multiple local chunks of data, for +algorithmic or performance reasons. +Local DEs are those DEs that are located on the local PET. +Local DE labeling always starts at 0 and goes to localDeCount-1, +where localDeCount is the number of DEs on the local PET. +Global DE numbers also start at 0 and go to deCount-1. +The DELayout class provides the mapping between local +and global DE numbers. + +

+ +

+7.2 Allocation Rules +

+ +

+The basic rule of allocation and deallocation for the ESMF is: +whoever allocates it is responsible for deallocating it. + +

+ESMF methods that allocate their own space for data will +deallocate that space when the object is destroyed. +Methods which accept a user-allocated buffer, for example +ESMC_FieldCreate() with the ESMF_DATACOPY_REFERENCE flag, +will not deallocate that buffer at the time the object is +destroyed. The user must deallocate the buffer +when all use of it is complete. + +

+Classes such as Fields, FieldBundles, and States may have Arrays, +Fields, Grids and FieldBundles created externally and associated with +them. These associated items are not destroyed along with the rest +of the data object since it is possible for the items to be added +to more than one data object at a time (e.g. the same Grid could +be part of many Fields). It is the user's responsibility to delete +these items when the last use of them is done. + +

+ +

+7.3 Assignment, Equality, Copying and Comparing Objects +

+ +

+The equal sign assignment has not been overloaded in ESMF, thus resulting in +the standard C behavior. This behavior has been documented as the first +entry in the API documentation section for each ESMF class. For deep ESMF +objects the assignment results in setting an alias the the same ESMF object +in memory. For shallow ESMF objects the assignment is essentially a equivalent +to a copy of the object. For deep classes the equality operators have been +overloaded to test for the alias condition as a counter part to the assignment +behavior. This and the not equal operator are documented following the +assignment in the class API documentation sections. + +

+Deep object copies are implemented as a special variant of the +ESMC_<Class>Create() methods. It takes an existing deep object as +one of the required arguments. At this point not all deep classes have +ESMC_<Class>Create() methods that allow object copy. + +

+Due to the complexity of deep classes there are many aspects when comparing two +objects of the same class. ESMF provide ESMC_<Class>Match() methods, +which are functions that return a class specific match flag. At this point not +all deep classes have ESMC_<Class>Match() methods that allow deep object +comparison. + +

+ +

+ +
+8 Overall Design and Implementation Notes +

+ +

+ +

    +
  1. Deep and shallow classes. The deep and shallow classes +described in Section 5.2 differ in how and where they +are allocated within a multi-language implementation environment. We +distinguish between the implementation language, which is the language +a method is written in, and the calling language, which is the language +that the user application is written in. Deep classes are allocated +off the process heap by the implementation language. Shallow classes +are allocated off the stack by the calling language. + +

    +

  2. +
  3. Base class. All ESMF classes are built upon a Base class, +which holds a small set of system-wide capabilities. + +

    +

  4. +
+ + + +
+esmf_support@ucar.edu +
+ + diff --git a/docs/nightly/fix/reconcile-info/ESMC_crefdoc/node3.html b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/node3.html new file mode 100644 index 000000000..86d781f2d --- /dev/null +++ b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/node3.html @@ -0,0 +1,111 @@ + + + + + +2 Command Line Tools + + + + + + + + + + + + + + + + + + + + + +

+ +
+2 Command Line Tools +

+ +

+The main product delivered by ESMF is the ESMF library that allows application +developers to write programs based on the ESMF API. In addition to the +programming library, ESMF distributions come with a small set of command line +tools (CLT) that are of general interest to the community. These CLTs utilize +the ESMF library to implement features such as printing general information +about the ESMF installation, or generating regrid weight files. The provided +ESMF CLTs are intended to be used as standard command line tools. + +

+The bundled ESMF CLTs are built and installed during the usual ESMF +installation process, which is described in detail in the ESMF User's Guide +section "Building and Installing the ESMF". After installation, the +CLTs will be located in the ESMF_APPSDIR directory, which can +be found as a Makefile variable in the esmf.mk file. The esmf.mk +file can be found in the ESMF_INSTALL_LIBDIR directory after a +successful installation. The ESMF User's Guide discusses the esmf.mk +mechanism to access the bundled CLTs in more detail in section +"Using Bundled ESMF Command Line Tools". + +

+The following sections provide in-depth documentation of the bundled ESMF +CLTs. In addition, each tool supports the standard + --help command line argument, providing a brief description of how +to invoke the program. + +

+ +
+esmf_support@ucar.edu +
+ + diff --git a/docs/nightly/fix/reconcile-info/ESMC_crefdoc/node4.html b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/node4.html new file mode 100644 index 000000000..9275f8d86 --- /dev/null +++ b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/node4.html @@ -0,0 +1,2690 @@ + + + + + +3 Superstructure + + + + + + + + + + + + + + + + + + + + + +Subsections + + + +
+ +

+ +
+3 Superstructure +

+ + +

+ +

+9 Overview of Superstructure +

+ +

+ESMF superstructure classes define an architecture for assembling +Earth system applications from modeling components. A component +may be defined in terms of the physical domain that it represents, +such as an atmosphere or sea ice model. It may also be defined in terms +of a computational function, such as a data assimilation system. +Earth system research often requires that such components be coupled +together to create an application. By coupling we mean the data +transformations and, on parallel computing systems, data transfers, +that are necessary to allow data from one component to be utilized by +another. ESMF offers regridding methods and other tools to simplify +the organization and execution of inter-component data exchanges. + +

+In addition to components defined at the level of major physical +domains and computational functions, components may be defined that +represent smaller computational functions within larger components, +such as the transformation of data between the physics and dynamics +in a spectral atmosphere model, +or the creation of nested higher resolution regions +within a coarser grid. The objective is to couple components at varying +scales both flexibly and efficiently. ESMF encourages a hierarchical +application structure, in which large components branch into +smaller sub-components (see Figure 2). ESMF also makes +it easier for the same component to be used in multiple contexts +without changes to its source code. + +

+

+ + + + + + + + + + + + + + + +
+
+Key Features
Modular, component-based architecture.
Hierarchical assembly of components into applications.
Use of components in multiple contexts without modification.
Sequential or concurrent component execution.
Single program, multiple datastream (SPMD) applications for +maximum portability and reconfigurability.
Multiple program, multiple datastream (MPMD) option for +flexibility.
+
+ +

+ +

+9.1 Superstructure Classes +

+ +

+There are a small number of classes in the ESMF superstructure: + +

+ +

    +
  • Component An ESMF component has two parts, one that is +supplied by ESMF and one that is supplied by the user. The +part that is supplied by the framework is an ESMF derived type that +is either a Gridded Component (GridComp) or a Coupler +Component (CplComp). A Gridded Component typically represents +a physical domain in which data is associated with one or more +grids - for example, a sea ice model. A Coupler Component +arranges and executes data transformations and transfers between +one or more Gridded Components. Gridded Components and Coupler +Components have standard methods, which include initialize, run, +and finalize. These methods can be multi-phase. + +

    +The second part of an ESMF Component is user code, such as a +model or data assimilation system. Users set entry points +within their code so that it is callable by the framework. +In practice, setting entry points means that within user code +there are calls to ESMF methods that associate the name of a +Fortran subroutine with a corresponding standard ESMF operation. +For example, a user-written initialization routine called +myOceanInit might be associated with the standard +initialize routine of an ESMF Gridded Component named “myOcean” +that represents an ocean model. + +

    +

  • +
  • State ESMF Components exchange information with other +Components only through States. A State is an ESMF derived +type that can contain Fields, FieldBundles, Arrays, ArrayBundles, +and other States. A Component is associated with two States, an +Import State and an Export State. Its Import State +holds the data that it receives from other Components. +Its Export State contains data that it makes available to +other Components. + +

    +

  • +
+ +

+An ESMF coupled application typically involves a parent Gridded Component, +two or more child Gridded Components and one or more Coupler +Components. + +

+The parent Gridded Component is responsible for creating the child +Gridded Components that are exchanging data, for creating the Coupler, +for creating the necessary Import and Export States, and for +setting up the desired sequencing. The application's “main” routine +calls the parent Gridded Component's initialize, run, and finalize +methods in order to execute the application. For each of these +standard methods, the parent Gridded Component in turn calls the +corresponding methods in the child Gridded Components and the +Coupler Component. For example, consider a simple coupled +ocean/atmosphere simulation. When the initialize method of the +parent Gridded Component is called by the application, it in turn +calls the initialize methods of its child atmosphere and ocean +Gridded Components, and the initialize method of an +ocean-to-atmosphere Coupler Component. Figure 3 +shows this schematically. + +

+

+
+
+ + + +
Figure 2: +ESMF enables applications such as the atmospheric general +circulation model GEOS-5 to be structured hierarchically, and +reconfigured and extended easily. Each box in this diagram is an +ESMF Gridded Component.
+\scalebox{0.9}{\includegraphics{ESMF_GEOS5}}
+
+
+
+ +

+ +

+ +
+9.2 Hierarchical Creation of Components +

+ +

+Components are allocated computational resources in the form of +Persistent Execution Threads, or PETs. A list of a Component's +PETs is contained in a structure called a Virtual Machine, +or VM. The VM also contains information about the topology and +characteristics of the underlying computer. +Components are created hierarchically, with parent Components creating +child Components and allocating some or all of their PETs to each one. +By default ESMF creates a new VM for each child Component, which +allows Components to tailor their VM resources to match their needs. +In some cases, a child may want to share its parent's VM - ESMF +supports this, too. + +

+A Gridded Component may exist across all the PETs in an application. +A Gridded Component may also reside on a subset of PETs in an +application. These PETs may wholly coincide with, be wholly contained +within, or wholly contain another Component. + +

+

+
+
+ + + +
Figure 3: +A call to a standard ESMF initialize (run, finalize) method +by a parent component triggers calls to initialize (run, finalize) +all of its child components.
+\scalebox{1.0}{\includegraphics{ESMF_appunit}}
+
+
+
+ +

+ +

+ +
+9.3 Sequential and Concurrent Execution of Components +

+ +

+When a set of Gridded Components and a Coupler runs in sequence +on the same set of PETs the application is executing in a sequential +mode. When Gridded Components are created and run on mutually exclusive +sets of PETs, and are coupled by a Coupler Component that extends over +the union of these sets, the mode of execution is concurrent. + +

+Figure 4 illustrates a typical configuration for +a simple coupled sequential +application, and Figure 5 shows a possible +configuration for the same application running in a concurrent mode. + +

+Parent Components can select if and when to wait for concurrently +executing child Components, synchronizing only when required. + +

+It is possible for ESMF applications to contain some Component sets +that are executing sequentially and others that are executing concurrently. +We might have, for example, atmosphere and land Components created +on the same subset of PETs, ocean and sea ice Components created on +the remainder of PETs, and a Coupler created across all the PETs in +the application. + +

+

+
+
+ + + +
Figure 4: +Schematic of the run method of a coupled application, with an +“Atmosphere” and an “Ocean” Gridded Component running sequentially with +an “Atm-Ocean Coupler.” The top-level “Hurricane Model” +Gridded Component contains the sequencing information and time +advancement loop. The application driver, Coupler, and all Gridded Components +are distributed over nine PETs.
+\scalebox{1.0}{\includegraphics{ESMF_serial}}
+
+
+
+ +

+

+
+
+ + + +
Figure 5: +Schematic of the run method of a coupled application, with an +“Atmosphere” and an “Ocean” Gridded Component running concurrently with +an “Atm-Ocean Coupler.” The top-level “Hurricane Model” +Gridded Component contains the sequencing information and time +advancement loop. The application driver, Coupler, and top-level “Hurricane +Model” Gridded Component are distributed over nine PETs. The +“Atmosphere” Gridded Component is distributed over three PETs and +the “Ocean” Gridded Component is distributed over six PETs.
+\scalebox{1.0}{\includegraphics{ESMF_concurrent}}
+
+
+
+ +

+ +

+ +
+9.4 Intra-Component Communication +

+ +

+All data transfers within an ESMF application occur within a +component. For example, a Gridded Component may contain halo updates. +Another example is that a Coupler Component may redistribute +data between two Gridded Components. As a result, +the architecture of ESMF does not depend on any particular data +communication mechanism, and new communication schemes can be +introduced without affecting the overall structure of the application. + +

+Since all data communication happens within a component, a Coupler +Component must be created on the union of the PETs of all +the Gridded Components that it couples. + +

+ +

+ +
+9.5 Data Distribution and Scoping in Components +

+ +

+The scope of distributed objects is the VM of the currently +executing Component. For this reason, all +PETs in the current VM must make the same distributed object +creation calls. When a Coupler Component running on a superset +of a Gridded Component's PETs needs to make communication calls +involving objects created by the Gridded Component, +an ESMF-supplied function called ESMF_StateReconcile() creates proxy +objects for those PETs that had no previous information about the +distributed objects. Proxy objects contain no local data but +can be used in communication calls (such as regrid or redistribute) +to describe the remote source for data being moved to the current PET, +or to describe the remote destination for data being moved from the local PET. +Figure 6 is a simple schematic that shows the +sequence of events in a reconcile call. + +

+

+
+
+ + + +
Figure 6: +An ESMF_StateReconcile() call creates proxy +objects for use in subsequent communication calls. The reconcile +call would normally be made during Coupler initialization.
+\scalebox{1.0}{\includegraphics{ESMF_reconcile}}
+
+
+
+ +

+ +

+ +
+9.6 Performance +

+ +

+The ESMF design enables the user to configure ESMF +applications so that data is transferred directly from one component +to another, without requiring that it be copied or sent to a different data +buffer as an interim step. This is likely to be the most efficient way +of performing inter-component coupling. However, if desired, an +application can also be configured so that data from a source component +is sent to a distinct set of Coupler Component PETs for processing +before being sent to its destination. + +

+The ability to overlap computation with communication is essential for +performance. When running with ESMF the user can initiate data +sends during Gridded Component execution, as soon as the data is ready. +Computations can then proceed simultaneously with the data transfer. + +

+ +

+9.7 Object Model +

+ +

+The following is a simplified Unified Modeling Language (UML) diagram showing the relationships among +ESMF superstructure classes. See Appendix A, A Brief Introduction +to UML, for a translation table that lists the symbols in the diagram +and their meaning. + +

+

+\includegraphics{Comp_obj} + +
+ +

+ +

+10 Application Driver and Required ESMF Methods +

+ +

+10.1 Description +

+ +

+Every ESMF application needs a driver code. Typically the driver layer is +implemented as the "main" of the application, although this is not strictly an +ESMF requirement. For most ESMF applications the task of the application driver +will be very generic: Initialize ESMF, create a top-level Component and call its +Initialize, Run and Finalize methods, before destroying the top-level Component +again and calling ESMF Finalize. + +

+ESMF provides a number of different application driver templates in the +$ESMF_DIR/src/Superstructure/AppDriver directory. An appropriate one +can be chosen depending on how the application is to be structured: + +

+

+
Sequential vs. Concurrent Execution
+

+In a sequential execution model, every Component executes +on all PETs, with each Component completing execution before +the next Component begins. This has the appeal of +simplicity of data consumption and production: when a Gridded +Component starts, all required data is available for use, and when +a Gridded Component finishes, all data produced is ready for consumption +by the next Gridded Component. This approach also has +the possibility of less data movement if the grid and +data decomposition is done such that each processor's memory contains +the data needed by the next Component. + +

+In a concurrent execution model, subgroups of PETs run +Gridded Components and multiple Gridded Components are active at the +same time. Data exchange must be coordinated between Gridded +Components so that data deadlock does not occur. This strategy +has the advantage of allowing coupling to other Gridded Components +at any time during the computational process, including not +having to return to the calling level of code before making +data available. + +

+

+
Pairwise vs. Hub and Spoke
+

+Coupler Components are responsible for taking data from one +Gridded Component and putting it into the form expected by another +Gridded Component. This might include regridding, change of units, +averaging, or binning. + +

+Coupler Components can be written for pairwise data exchange: +the Coupler Component takes data from a single Component and transforms +it for use by another single Gridded Component. This simplifies the +structure of the Coupler Component code. + +

+Couplers can also be written using a hub and spoke model where a +single Coupler accepts data from all other Components, can do data +merging or splitting, and formats data for all other Components. + +

+Multiple Couplers, using either of the above two models or some mixture of +these approaches, are also possible. + +

+

+
Implementation Language
+

+The ESMF framework currently has Fortran interfaces for all public functions. +Some functions also have C interfaces, and the number of these is expected to +increase over time. + +

+

+
Number of Executables
+

+The simplest way to run an application +is to run the same executable program on all PETs. Different Components +can still be run on mutually exclusive PETs by using branching +(e.g., if this is PET 1, 2, or 3, run Component A, if it is +PET 4, 5, or 6 run Component B). This is a SPMD model, +Single Program Multiple Data. + +

+The alternative is to start a different executable program on different +PETs. This is a MPMD model, Multiple Program Multiple Data. +There are complications with many job control systems on multiprocessor +machines in getting the different executables started, and getting +inter-process communications established. ESMF currently has some +support for MPMD: different Components can run as separate executables, +but the Coupler that transfers data between the Components must still +run on the union of their PETs. This means that the Coupler Component +must be linked into all of the executables. + +

+

+
+ +

+ +

+10.2 Required ESMF Methods +

+ +

+There are a few methods that every ESMF application must contain. First, +ESMC_Initialize() and ESMC_Finalize() are in complete analogy +to MPI_Init() and MPI_Finalize() known from MPI. All ESMF +programs, serial or parallel, must initialize the ESMF system at the beginning, +and finalize it at the end of execution. The behavior of calling any +ESMF method before ESMC_Initialize(), or after ESMC_Finalize() +is undefined. + +

+Second, every ESMF Component that is accessed by an ESMF application requires +that its set services routine is called through +ESMC_<Grid/Cpl>CompSetServices(). The Component must implement +one public entry point, its set services routine, that can be called +through the ESMC_<Grid/Cpl>CompSetServices() library routine. The +Component set services routine is responsible for setting entry points +for the standard ESMF Component methods Initialize, Run, and Finalize. + +

+Finally, the Component can optionally call ESMC_<Grid/Cpl>CompSetVM() +before calling +ESMC_<Grid/Cpl>CompSetServices(). Similar to +ESMC_<Grid/Cpl>CompSetServices(), the +
+ESMC_<Grid/Cpl>CompSetVM() +call requires a public entry point into the Component. It allows the Component +to adjust certain aspects of its execution environment, i.e. its own VM, before +it is started up. + +

+The following sections discuss the above mentioned aspects in more detail. + +

+ +

+ +

+ +

+10.2.1 ESMC_Initialize - Initialize ESMF +

+ +

+ +

+
+INTERFACE: +

   int ESMC_Initialize(
+     int *rc,        // return code
+     ...);           // optional arguments (see below)
+
RETURN VALUE: +
    Return code; equals ESMF_SUCCESS if there are no errors.
+
+DESCRIPTION: +
+ +

+Initialize the ESMF. This method must be called before + any other ESMF methods are used. The method contains a + barrier before returning, ensuring that all processes + made it successfully through initialization. + +

+Typically ESMC_Initialize() will call MPI_Init() + internally unless MPI has been initialized by the user code before + initializing the framework. If the MPI initialization is left to + ESMC_Initialize() it inherits all of the MPI implementation + dependent limitations of what may or may not be done before + MPI_Init(). For instance, it is unsafe for some MPI implementations, + such as MPICH1, to do I/O before the MPI environment is initialized. Please + consult the documentation of your MPI implementation for details. + +

+Optional arguments are recognised. To indicate the end of the optional + argument list, ESMC_ArgLast must be used. A minimal call to + ESMC_Initialize() would be: +

+      ESMC_Initialize (NULL, ESMC_ArgLast);
+
+ The optional arguments are specified using the ESMC_InitArg macros. + For example, to turn off logging so that no log files would be created, the + ESMC_Initialize() call would be coded as: +
+      ESMC_Initialize (&rc,
+        ESMC_InitArgLogKindFlag(ESMC_LOGKIND_NONE),
+        ESMC_ArgLast);
+
+ Before exiting the application the user must call ESMC_Finalize() + to release resources and clean up the ESMF gracefully. + +

+The arguments are: +

+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + NULL may be passed when the return code is not desired. + +
+
[ESMC_InitArgDefaultCalKind(ARG)]
+
Macro specifying the default calendar kind for the entire + application. Valid values for ARG are documented in section + 26.2.1. + If not specified, defaults to ESMC_CALKIND_NOCALENDAR. + +
+
[ESMC_InitArgDefaultConfigFilename(ARG)]
+
Macro specifying the name of the default configuration file for the + Config class. If not specified, no default file is used. + +
+
[ESMC_InitArgLogFilename(ARG)]
+
Macro specifying the name used as part of the default log file name for + the default log. If not specified, defaults to ESMF_LogFile. + +
+
[ESMC_InitArgLogKindFlag(ARG)]
+
Macro specifying the default Log kind to be used by ESMF Log Manager. + Valid values for ARG are documented in section + 31.2.1. + If not specified, defaults to ESMC_LOGKIND_MULTI. + +
+
ESMC_ArgLast
+
Macro indicating the end of the optional argument list. This must be + provided even when there are no optional arguments. + +
+
+ +

+ +

+ +

+10.2.2 ESMC_FinalizeWithFlag - Finalize the ESMF Framework and specify the type of finalization. +

+ +

+ +

+
+INTERFACE: +

   int ESMC_FinalizeWithFlag(
+     ESMC_End_Flag endFlag); // enumerator for exit action (see below)
+
RETURN VALUE: +
    Return code; equals ESMF_SUCCESS if there are no errors.
+
+DESCRIPTION: +
+ +

+This must be called once on each PET before the application exits to + allow ESMF to flush buffers, close open connections, and release + internal resources cleanly. + +

+The endFlag argument has one of three options: +

+
ESMC_END_NORMAL
+
Finalize normally. + +
+
ESMC_END_KEEPMPI
+
Finalize normally without finalizing MPI. + +
+
ESMC_END_ABORT
+
Abort on finalization. + +
+
+ +

+ +

+ +

+10.2.3 ESMC_Finalize - Finalize the ESMF Framework +

+ +

+ +

+
+INTERFACE: +

   int ESMC_Finalize(void);
+
RETURN VALUE: +
    Return code; equals ESMF_SUCCESS if there are no errors.
+
+DESCRIPTION: +
+ +

+This must be called once on each PET before the application exits to + allow ESMF to flush buffers, close open connections, and release + internal resources cleanly. + + +

+11 GridComp Class +

+ +

+11.1 Description +

+ +

+ +

+In Earth system modeling, the most natural way to think about an ESMF +Gridded Component, or ESMC_GridComp, is as a piece of code +representing a particular physical domain, such as an atmospheric +model or an ocean model. Gridded Components may also represent individual +processes, such as radiation or chemistry. It's up to the application +writer to decide how deeply to “componentize.” + +

+Earth system software components tend to share a number of basic +features. Most ingest and produce a variety of physical fields, refer to +a (possibly noncontiguous) spatial region and a grid that is +partitioned across a set of computational resources, and require +a clock for things like stepping a governing set of PDEs forward in time. +Most can also be divided into distinct initialize, run, and finalize +computational phases. These common characteristics are used +within ESMF to define a Gridded Component data structure that +is tailored for Earth system modeling and yet is still flexible +enough to represent a variety of domains. + +

+A well designed Gridded Component does not store information +internally about how it couples to other Gridded Components. That +allows it to be used in different contexts without changes to source +code. The idea here is to avoid situations in which slightly +different versions of the same model source are maintained for use in +different contexts - standalone vs. coupled versions, for example. +Data is passed in and out of Gridded Components using an ESMF State, +this is described in Section 14.1. + +

+An ESMF Gridded Component has two parts, one which is user-written +and another which is part of the framework. The user-written +part is software that represents a physical domain or performs some +other computational function. It forms the body of the Gridded +Component. It may be a piece of legacy code, or it may be developed +expressly for use with ESMF. It must contain routines with +standard ESMF interfaces that can be called to initialize, run, and +finalize the Gridded Component. These routines can have separate +callable phases, such as distinct first and second initialization steps. + +

+ESMF provides the Gridded Component derived type, +ESMC_GridComp. An ESMC_GridComp must be created +for every portion of the application that will be represented +as a separate component. For example, in a climate model, there may +be Gridded Components representing the land, ocean, sea ice, and +atmosphere. If the application contains an ensemble of identical +Gridded Components, every one has its own associated ESMC_GridComp. +Each Gridded Component has its own name and is allocated +a set of computational resources, in the form of an ESMF Virtual +Machine, or VM. + +

+The user-written part of a Gridded Component is associated with an +ESMC_GridComp derived type through a routine called +ESMC_SetServices(). +This is a routine that the user must write, and declare public. +Inside the SetServices routine the user must call +ESMC_SetEntryPoint() methods that associate a standard ESMF +operation with the name of the corresponding Fortran subroutine +in their user code. + +

+11.2 Class API +

+ +

+ +

+ +

+ +

+11.2.1 ESMC_GridCompCreate - Create a Gridded Component +

+ +

+ +

+
+INTERFACE: +

 ESMC_GridComp ESMC_GridCompCreate(
+   const char *name,                    // in 
+   const char *configFile,              // in
+   ESMC_Clock clock,                    // in
+   int *rc                              // out
+ );
+
RETURN VALUE: +
    Newly created ESMC_GridComp object.
+
+DESCRIPTION: +
+ +

+This interface creates an ESMC_GridComp object. By default, a + separate VM context will be created for each component. This implies + creating a new MPI communicator and allocating additional memory to + manage the VM resources. + +

+The arguments are: +

+
name
+
Name of the newly-created ESMC_GridComp. + +
+
configFile
+
The filename of an ESMC_Config format file. If specified, this file + is opened an ESMC_Config configuration object is created for the + file, and attached to the new component. + +
+
clock
+
Component-specific ESMC_Clock. This clock is available to be queried + and updated by the new ESMC_GridComp as it chooses. This should not + be the parent component clock, which should be maintained and passed down + to the initialize/run/finalize routines separately. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+11.2.2 ESMC_GridCompDestroy - Destroy a Gridded Component +

+ +

+ +

+
+INTERFACE: +

 int ESMC_GridCompDestroy(
+   ESMC_GridComp *comp               // inout
+ );
+
RETURN VALUE: +
    Return code; equals ESMF_SUCCESS if there are no errors.
+
+DESCRIPTION: +
+ +

+Releases all resources associated with this ESMC_GridComp. + +

+The arguments are: +

+
comp
+
Release all resources associated with this ESMC_GridComp and mark + the object as invalid. It is an error to pass this object into any other + routines after being destroyed. + +
+
+ +

+ +

+ +

+11.2.3 ESMC_GridCompFinalize - Finalize a Gridded Component +

+ +

+ +

+
+INTERFACE: +

 int ESMC_GridCompFinalize(
+   ESMC_GridComp comp,           // inout
+   ESMC_State importState,       // inout
+   ESMC_State exportState,       // inout 
+   ESMC_Clock clock,             // in
+   int phase,                    // in
+   int *userRc                   // out
+ );
+
RETURN VALUE: +
    Return code; equals ESMF_SUCCESS if there are no errors.
+
+DESCRIPTION: +
+ +

+Call the associated user finalize code for a GridComp. + +

+The arguments are: +

+
comp
+
ESMC_GridComp to call finalize routine for. + +
+
importState
+
ESMC_State containing import data for coupling. + +
+
exportState
+
ESMC_State containing export data for coupling. + +
+
clock
+
External ESMC_Clock for passing in time information. This is + generally the parent component's clock, and will be treated as read-only + by the child component. The child component can maintain a private clock + for its own internal time computations. + +
+
phase
+
Component providers must document whether each of their routines are + single-phase or multi-phase. Single-phase routines require + only one invocation to complete their work. Multi-phase routines provide + multiple subroutines to accomplish the work, accommodating components + which must complete part of their work, return to the caller and allow + other processing to occur, and then continue the original operation. + For multiple-phase child components, this is the integer phase number to + be invoked. For single-phase child components this argument must be 1. + +
+
[userRc]
+
Return code set by userRoutine before returning. + +
+
+ +

+ +

+ +

+11.2.4 ESMC_GridCompGetInternalState - Get the Internal State of a Gridded Component +

+ +

+ +

+
+INTERFACE: +

 void *ESMC_GridCompGetInternalState(
+   ESMC_GridComp comp,           // in
+   int *rc                       // out
+ );
+
RETURN VALUE: +
    Pointer to private data block that is stored in the internal state.
+
+DESCRIPTION: +
+ +

+Available to be called by an ESMC_GridComp at any time after + ESMC_GridCompSetInternalState has been called. Since init, run, and + finalize must be separate subroutines, data that they need to share in + common can either be global data, or can be allocated in a private data + block and the address of that block can be registered with the framework + and retrieved by this call. When running multiple instantiations of an + ESMC_GridComp, for example during ensemble runs, it may be simpler + to maintain private data specific to each run with private data blocks. A + corresponding ESMC_GridCompSetInternalState call sets the data + pointer to this block, and this call retrieves the data pointer. + +

+Only the last data block set via ESMC_GridCompSetInternalState + will be accessible. + +

+The arguments are: +

+
comp
+
An ESMC_GridComp object. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+11.2.5 ESMC_GridCompInitialize - Initialize a Gridded Component +

+ +

+ +

+
+INTERFACE: +

 int ESMC_GridCompInitialize(
+   ESMC_GridComp comp,           // inout
+   ESMC_State importState,       // inout
+   ESMC_State exportState,       // inout 
+   ESMC_Clock clock,             // in
+   int phase,                    // in
+   int *userRc                   // out
+ );
+
RETURN VALUE: +
    Return code; equals ESMF_SUCCESS if there are no errors.
+
+DESCRIPTION: +
+ +

+Call the associated user initialization code for a GridComp. + +

+The arguments are: +

+
comp
+
ESMC_GridComp to call initialize routine for. + +
+
importState
+
ESMC_State containing import data for coupling. + +
+
exportState
+
ESMC_State containing export data for coupling. + +
+
clock
+
External ESMC_Clock for passing in time information. This is + generally the parent component's clock, and will be treated as read-only + by the child component. The child component can maintain a private clock + for its own internal time computations. + +
+
phase
+
Component providers must document whether each of their routines are + single-phase or multi-phase. Single-phase routines require + only one invocation to complete their work. Multi-phase routines provide + multiple subroutines to accomplish the work, accommodating components + which must complete part of their work, return to the caller and allow + other processing to occur, and then continue the original operation. + For multiple-phase child components, this is the integer phase number to + be invoked. For single-phase child components this argument must be 1. + +
+
[userRc]
+
Return code set by userRoutine before returning. + +
+
+ +

+ +

+ +

+11.2.6 ESMC_GridCompPrint - Print the contents of a GridComp +

+ +

+ +

+
+INTERFACE: +

 int ESMC_GridCompPrint(
+   ESMC_GridComp comp     // in
+ );
+
RETURN VALUE: +
    Return code; equals ESMF_SUCCESS if there are no errors.
+
+DESCRIPTION: +
+ +

+Prints information about an ESMC_GridComp to stdout. + +

+The arguments are: +

+
comp
+
An ESMC_GridComp object. + +
+
+ +

+ +

+ +

+11.2.7 ESMC_GridCompRun - Run a Gridded Component +

+ +

+ +

+
+INTERFACE: +

 int ESMC_GridCompRun(
+   ESMC_GridComp comp,           // inout
+   ESMC_State importState,       // inout
+   ESMC_State exportState,       // inout 
+   ESMC_Clock clock,             // in
+   int phase,                    // in
+   int *userRc                   // out
+ );
+
RETURN VALUE: +
    Return code; equals ESMF_SUCCESS if there are no errors.
+
+DESCRIPTION: +
+ +

+Call the associated user run code for a GridComp. + +

+The arguments are: +

+
comp
+
ESMC_GridComp to call run routine for. + +
+
importState
+
ESMC_State containing import data for coupling. + +
+
exportState
+
ESMC_State containing export data for coupling. + +
+
clock
+
External ESMC_Clock for passing in time information. This is + generally the parent component's clock, and will be treated as read-only + by the child component. The child component can maintain a private clock + for its own internal time computations. + +
+
phase
+
Component providers must document whether each of their routines are + single-phase or multi-phase. Single-phase routines require + only one invocation to complete their work. Multi-phase routines provide + multiple subroutines to accomplish the work, accommodating components + which must complete part of their work, return to the caller and allow + other processing to occur, and then continue the original operation. + For multiple-phase child components, this is the integer phase number to + be invoked. For single-phase child components this argument must be 1. + +
+
[userRc]
+
Return code set by userRoutine before returning. + +
+
+ +

+ +

+ +

+11.2.8 ESMC_GridCompSetEntryPoint - Set user routine as entry point for standard Component method +

+ +

+ +

+
+INTERFACE: +

 int ESMC_GridCompSetEntryPoint(
+   ESMC_GridComp comp,                                               // in
+   enum ESMC_Method method,                                          // in
+   void (*userRoutine)                                               // in
+     (ESMC_GridComp, ESMC_State, ESMC_State, ESMC_Clock *, int *),
+   int phase                                                         // in
+ );
+
RETURN VALUE: +
    Return code; equals ESMF_SUCCESS if there are no errors.
+
+DESCRIPTION: +
+ +

+Registers a user-supplied userRoutine as the entry point for one of + the predefined Component methods. After this call the userRoutine + becomes accessible via the standard Component method API. + +

+The arguments are: +

+
comp
+
An ESMC_GridComp object. + +
+
method
+
One of a set of predefined Component methods + - e.g. ESMF_METHOD_INITIALIZE, ESMF_METHOD_RUN, + ESMF_METHOD_FINALIZE. See section 34.12 + for a complete list of valid method options. + +
+
userRoutine
+
The user-supplied subroutine to be associated for this Component + method. This subroutine does not have to be public. + +
+
phase
+
The phase number for multi-phase methods. + +
+
+ +

+ +

+ +

+11.2.9 ESMC_GridCompSetInternalState - Set the Internal State of a Gridded Component +

+ +

+ +

+
+INTERFACE: +

 int ESMC_GridCompSetInternalState(
+   ESMC_GridComp comp,           // inout
+   void *data                    // in
+ );
+
RETURN VALUE: +
    Return code; equals ESMF_SUCCESS if there are no errors.
+
+DESCRIPTION: +
+ +

+Available to be called by an ESMC_GridComp at any time, but + expected to be most useful when called during the registration process, + or initialization. Since init, run, and finalize must be separate + subroutines, data that they need to share in common can either be global + data, or can be allocated in a private data block and the address of that + block can be registered with the framework and retrieved by subsequent + calls. + When running multiple instantiations of an ESMC_GridComp, + for example during ensemble runs, it may be simpler to maintain private + data specific to each run with private data blocks. A corresponding + ESMC_GridCompGetInternalState call retrieves the data pointer. + +

+Only the last data block set via + ESMC_GridCompSetInternalState will be accessible. + +

+The arguments are: +

+
comp
+
An ESMC_GridComp object. + +
+
data
+
Pointer to private data block to be stored. + +
+
+ +

+ +

+ +

+11.2.10 ESMC_GridCompSetServices - Call user routine to register GridComp methods +

+ +

+ +

+
+INTERFACE: +

 int ESMC_GridCompSetServices(
+   ESMC_GridComp comp,                           // in
+   void (*userRoutine)(ESMC_GridComp, int *),    // in
+   int *userRc                                   // out
+ );
+
RETURN VALUE: +
    Return code; equals ESMF_SUCCESS if there are no errors.
+
+DESCRIPTION: +
+ +

+Call into user provided userRoutine which is responsible for setting + Component's Initialize(), Run() and Finalize() services. + +

+The arguments are: +

+
comp
+
Gridded Component. + +
+
userRoutine
+
Routine to be called. + +
+
userRc
+
Return code set by userRoutine before returning. + +
+
+ +

+The Component writer must supply a subroutine with the exact interface shown + above for the userRoutine argument. + +

+The userRoutine, when called by the framework, must make successive + calls to ESMC_GridCompSetEntryPoint() to preset callback routines for + standard Component Initialize(), Run() and Finalize() methods. + +

+ + +

+12 CplComp Class +

+ +

+12.1 Description +

+ +

+ +

+In a large, multi-component application such as a weather +forecasting or climate prediction system running within ESMF, +physical domains and major system functions are represented +as Gridded Components +(see Section 11.1). A Coupler Component, or +ESMC_CplComp, arranges and executes the data +transformations between the Gridded Components. Ideally, +Coupler Components should contain all the information +about inter-component communication for an application. +This enables the Gridded Components in the application to be +used in multiple contexts; that is, used in different coupled +configurations without changes to their source code. +For example, the same atmosphere might in one case be coupled +to an ocean in a hurricane prediction model, and to a +data assimilation system for numerical weather prediction in +another. A single Coupler Component can couple +two or more Gridded Components. + +

+Like Gridded Components, Coupler Components have two parts, one +that is provided by the user and another that is part of the +framework. The user-written portion of the software is the coupling +code necessary for a particular exchange between Gridded Components. +This portion of the Coupler Component code must be divided into +separately callable initialize, run, and finalize methods. The +interfaces for these methods are prescribed by ESMF. + +

+The term “user-written” is somewhat misleading here, since within +a Coupler Component the user can leverage ESMF infrastructure +software for regridding, redistribution, lower-level communications, +calendar management, and other functions. However, ESMF is unlikely +to offer all the software necessary to customize a data transfer +between Gridded Components. For instance, ESMF does not currently +offer tools for unit tranformations or time averaging operations, +so users must manage those operations themselves. + +

+The second part of a Coupler Component is the ESMC_CplComp +derived type within ESMF. The user must create one of these types +to represent a specific coupling function, such as the regular +transfer of data between a data assimilation system and an +atmospheric model. 1 +

+The user-written part of a Coupler Component is associated with an +ESMC_CplComp derived type through a routine called +ESMC_SetServices(). +This is a routine that the user must write and declare public. +Inside the ESMC_SetServices() routine the user must call +ESMC_SetEntryPoint() methods that associate a standard ESMF +operation with the name of the corresponding Fortran subroutine in +their user code. For example, a user routine called “couplerInit” +might be associated with the standard initialize routine in a +Coupler Component. + +

+12.2 Class API +

+ +

+ +

+ +

+ +

+12.2.1 ESMC_CplCompCreate - Create a Coupler Component +

+ +

+ +

+
+INTERFACE: +

 ESMC_CplComp ESMC_CplCompCreate(
+   const char *name,                   // in
+   const char *configFile,             // in
+   ESMC_Clock clock,                   // in
+   int *rc                             // out
+ );
+
RETURN VALUE: +
    Newly created ESMC_CplComp object.
+
+DESCRIPTION: +
+ +

+This interface creates an ESMC_CplComp object. By default, a + separate VM context will be created for each component. This implies + creating a new MPI communicator and allocating additional memory to + manage the VM resources. + +

+The arguments are: +

+
name
+
Name of the newly-created ESMC_CplComp. + +
+
configFile
+
The filename of an ESMC_Config format file. If specified, this file + is opened an ESMC_Config configuration object is created for the + file, and attached to the new component. + +
+
clock
+
Component-specific ESMC_Clock. This clock is available to be queried + and updated by the new ESMC_CplComp as it chooses. This should not + be the parent component clock, which should be maintained and passed down + to the initialize/run/finalize routines separately. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+12.2.2 ESMC_CplCompDestroy - Destroy a Coupler Component +

+ +

+ +

+
+INTERFACE: +

 int ESMC_CplCompDestroy(
+   ESMC_CplComp *comp              // inout
+ );
+
RETURN VALUE: +
    Return code; equals ESMF_SUCCESS if there are no errors.
+
+DESCRIPTION: +
+ +

+Releases all resources associated with this ESMC_CplComp. + +

+The arguments are: +

+
comp
+
Release all resources associated with this ESMC_CplComp and mark + the object as invalid. It is an error to pass this object into any other + routines after being destroyed. + +
+
+ +

+ +

+ +

+12.2.3 ESMC_CplCompFinalize - Finalize a Coupler Component +

+ +

+ +

+
+INTERFACE: +

 int ESMC_CplCompFinalize(
+   ESMC_CplComp comp,            // inout
+   ESMC_State importState,       // inout
+   ESMC_State exportState,       // inout 
+   ESMC_Clock clock,             // in
+   int phase,                    // in
+   int *userRc                   // out
+ );
+
RETURN VALUE: +
    Return code; equals ESMF_SUCCESS if there are no errors.
+
+DESCRIPTION: +
+ +

+Call the associated user finalize code for a CplComp. + +

+The arguments are: +

+
comp
+
ESMC_CplComp to call finalize routine for. + +
+
importState
+
ESMC_State containing import data for coupling. + +
+
exportState
+
ESMC_State containing export data for coupling. + +
+
clock
+
External ESMC_Clock for passing in time information. This is + generally the parent component's clock, and will be treated as read-only + by the child component. The child component can maintain a private clock + for its own internal time computations. + +
+
phase
+
Component providers must document whether each of their routines are + single-phase or multi-phase. Single-phase routines require + only one invocation to complete their work. Multi-phase routines provide + multiple subroutines to accomplish the work, accommodating components + which must complete part of their work, return to the caller and allow + other processing to occur, and then continue the original operation. + For multiple-phase child components, this is the integer phase number to + be invoked. For single-phase child components this argument must be 1. + +
+
[userRc]
+
Return code set by userRoutine before returning. + +
+
+ +

+ +

+ +

+12.2.4 ESMC_CplCompGetInternalState - Get the internal State of a Coupler Component +

+ +

+ +

+
+INTERFACE: +

 void *ESMC_CplCompGetInternalState(
+   ESMC_CplComp comp,            //in
+   int *rc                       // out
+ );
+
RETURN VALUE: +
    Pointer to private data block that is stored in the internal state.
+
+DESCRIPTION: +
+ +

+Available to be called by an ESMC_CplComp at any time after + ESMC_CplCompSetInternalState has been called. Since init, run, and + finalize must be separate subroutines, data that they need to share in + common can either be global data, or can be allocated in a private data + block and the address of that block can be registered with the framework + and retrieved by this call. When running multiple instantiations of an + ESMC_CplComp, for example during ensemble runs, it may be simpler + to maintain private data specific to each run with private data blocks. A + corresponding ESMC_CplCompSetInternalState call sets the data + pointer to this block, and this call retrieves the data pointer. + +

+Only the last data block set via ESMC_CplCompSetInternalState + will be accessible. + +

+The arguments are: +

+
comp
+
An ESMC_CplComp object. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+12.2.5 ESMC_CplCompInitialize - Initialize a Coupler Component +

+ +

+ +

+
+INTERFACE: +

 int ESMC_CplCompInitialize(
+   ESMC_CplComp comp,            // inout
+   ESMC_State importState,       // inout
+   ESMC_State exportState,       // inout 
+   ESMC_Clock clock,             // in
+   int phase,                    // in
+   int *userRc                   // out
+ );
+
RETURN VALUE: +
    Return code; equals ESMF_SUCCESS if there are no errors.
+
+DESCRIPTION: +
+ +

+Call the associated user initialize code for a CplComp. + +

+The arguments are: +

+
comp
+
ESMC_CplComp to call initialize routine for. + +
+
importState
+
ESMC_State containing import data for coupling. + +
+
exportState
+
ESMC_State containing export data for coupling. + +
+
clock
+
External ESMC_Clock for passing in time information. This is + generally the parent component's clock, and will be treated as read-only + by the child component. The child component can maintain a private clock + for its own internal time computations. + +
+
phase
+
Component providers must document whether each of their routines are + single-phase or multi-phase. Single-phase routines require + only one invocation to complete their work. Multi-phase routines provide + multiple subroutines to accomplish the work, accommodating components + which must complete part of their work, return to the caller and allow + other processing to occur, and then continue the original operation. + For multiple-phase child components, this is the integer phase number to + be invoked. For single-phase child components this argument must be 1. + +
+
[userRc]
+
Return code set by userRoutine before returning. + +
+
+ +

+ +

+ +

+12.2.6 ESMC_CplCompPrint - Print a Coupler Component +

+ +

+ +

+
+INTERFACE: +

 int ESMC_CplCompPrint(
+   ESMC_CplComp comp      // in
+ );
+
RETURN VALUE: +
    Return code; equals ESMF_SUCCESS if there are no errors.
+
+DESCRIPTION: +
+ +

+Prints information about an ESMC_CplComp to stdout. + +

+The arguments are: +

+
comp
+
An ESMC_CplComp object. + +
+
+ +

+ +

+ +

+12.2.7 ESMC_CplCompRun - Run a Coupler Component +

+ +

+ +

+
+INTERFACE: +

 int ESMC_CplCompRun(
+   ESMC_CplComp comp,            // inout
+   ESMC_State importState,       // inout
+   ESMC_State exportState,       // inout 
+   ESMC_Clock clock,             // in
+   int phase,                    // in
+   int *userRc                   // out
+ );
+
RETURN VALUE: +
    Return code; equals ESMF_SUCCESS if there are no errors.
+
+DESCRIPTION: +
+ +

+Call the associated user run code for a CplComp. + +

+The arguments are: +

+
comp
+
ESMC_CplComp to call run routine for. + +
+
importState
+
ESMC_State containing import data for coupling. + +
+
exportState
+
ESMC_State containing export data for coupling. + +
+
clock
+
External ESMC_Clock for passing in time information. This is + generally the parent component's clock, and will be treated as read-only + by the child component. The child component can maintain a private clock + for its own internal time computations. + +
+
phase
+
Component providers must document whether each of their routines are + single-phase or multi-phase. Single-phase routines require + only one invocation to complete their work. Multi-phase routines provide + multiple subroutines to accomplish the work, accommodating components + which must complete part of their work, return to the caller and allow + other processing to occur, and then continue the original operation. + For multiple-phase child components, this is the integer phase number to + be invoked. For single-phase child components this argument must be 1. + +
+
[userRc]
+
Return code set by userRoutine before returning. + +
+
+ +

+ +

+ +

+12.2.8 ESMC_CplCompSetEntryPoint - Set the Entry point of a Coupler Component +

+ +

+ +

+
+INTERFACE: +

 int ESMC_CplCompSetEntryPoint(
+   ESMC_CplComp comp,                                                // in
+   enum ESMC_Method method,                                          // in
+   void (*userRoutine)                                               // in
+     (ESMC_CplComp, ESMC_State, ESMC_State, ESMC_Clock *, int *),
+   int phase                                                         // in
+ );
+
RETURN VALUE: +
    Return code; equals ESMF_SUCCESS if there are no errors.
+
+DESCRIPTION: +
+ +

+Registers a user-supplied userRoutine as the entry point for one of + the predefined Component methods. After this call the userRoutine + becomes accessible via the standard Component method API. + +

+The arguments are: +

+
comp
+
An ESMC_CplComp object. + +
+
method
+
One of a set of predefined Component methods + - e.g. ESMF_METHOD_INITIALIZE, ESMF_METHOD_RUN, + ESMF_METHOD_FINALIZE. See section 34.12 + for a complete list of valid method options. + +
+
userRoutine
+
The user-supplied subroutine to be associated for this Component + method. This subroutine does not have to be public. + +
+
phase
+
The phase number for multi-phase methods. + +
+
+ +

+ +

+ +

+12.2.9 ESMC_CplCompSetInternalState - Set the internal State of a Coupler Component +

+ +

+ +

+
+INTERFACE: +

 int ESMC_CplCompSetInternalState(
+   ESMC_CplComp comp,            // inout
+   void *data                    // in
+ );
+
RETURN VALUE: +
    Return code; equals ESMF_SUCCESS if there are no errors.
+
+DESCRIPTION: +
+ +

+Available to be called by an ESMC_CplComp at any time, but + expected to be most useful when called during the registration process, + or initialization. Since init, run, and finalize must be separate + subroutines, data that they need to share in common can either be global + data, or can be allocated in a private data block and the address of that + block can be registered with the framework and retrieved by subsequent + calls. + When running multiple instantiations of an ESMC_CplComp, + for example during ensemble runs, it may be simpler to maintain private + data specific to each run with private data blocks. A corresponding + ESMC_CplCompGetInternalState call retrieves the data pointer. + +

+Only the last data block set via + ESMC_CplCompSetInternalState will be accessible. + +

+The arguments are: +

+
comp
+
An ESMC_CplComp object. + +
+
data
+
Pointer to private data block to be stored. + +
+
+ +

+ +

+ +

+12.2.10 ESMC_CplCompSetServices - Destroy a Coupler Component +

+ +

+ +

+
+INTERFACE: +

 int ESMC_CplCompSetServices(
+   ESMC_CplComp comp,                            // in
+   void (*userRoutine)(ESMC_CplComp, int *),     // in
+   int *userRc                                   // out
+ );
+
RETURN VALUE: +
    Return code; equals ESMF_SUCCESS if there are no errors.
+
+DESCRIPTION: +
+ +

+Call into user provided userRoutine which is responsible for setting + Component's Initialize(), Run() and Finalize() services. + +

+The arguments are: +

+
comp
+
Gridded Component. + +
+
userRoutine
+
Routine to be called. + +
+
userRc
+
Return code set by userRoutine before returning. + +
+
+ +

+The Component writer must supply a subroutine with the exact interface shown + above for the userRoutine argument. + +

+The userRoutine, when called by the framework, must make successive + calls to ESMC_CplCompSetEntryPoint() to preset callback routines for + standard Component Initialize(), Run() and Finalize() methods. + +

+ + +

+13 SciComp Class +

+ +

+13.1 Description +

+ +

+ +

+In Earth system modeling, a particular piece of code representing a physical +domain, such as an atmospheric model or an ocean model, is typically +implemented as an ESMF Gridded Component, or ESMC_GridComp. +However, there are times when physical domains, or realms, need to be +represented, but aren't actual pieces of code, or software. These domains +can be implemented as ESMF Science Components, or ESMC_SciComp. + +

+Unlike Gridded and Coupler Components, Science Components are not associated +with software; they don't include execution routines such as initialize, +run and finalize. + +

+13.2 Class API +

+ +

+ +

+ +

+ +

+13.2.1 ESMC_SciCompCreate - Create a Science Component +

+ +

+ +

+
+INTERFACE: +

 ESMC_SciComp ESMC_SciCompCreate(
+   const char *name,                    // in 
+   int *rc                              // out
+ );
+
RETURN VALUE: +
    Newly created ESMC_SciComp object.
+
+DESCRIPTION: +
+ +

+This interface creates an ESMC_SciComp object. + +

+The arguments are: +

+
name
+
Name of the newly-created ESMC_SciComp. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+13.2.2 ESMC_SciCompDestroy - Destroy a Science Component +

+ +

+ +

+
+INTERFACE: +

 int ESMC_SciCompDestroy(
+   ESMC_SciComp *comp               // inout
+ );
+
RETURN VALUE: +
    Return code; equals ESMF_SUCCESS if there are no errors.
+
+DESCRIPTION: +
+ +

+Releases all resources associated with this ESMC_SciComp. + +

+The arguments are: +

+
comp
+
Release all resources associated with this ESMC_SciComp and mark + the object as invalid. It is an error to pass this object into any other + routines after being destroyed. + +
+
+ +

+ +

+ +

+13.2.3 ESMC_SciCompPrint - Print the contents of a SciComp +

+ +

+ +

+
+INTERFACE: +

 int ESMC_SciCompPrint(
+   ESMC_SciComp comp     // in
+ );
+
RETURN VALUE: +
    Return code; equals ESMF_SUCCESS if there are no errors.
+
+DESCRIPTION: +
+ +

+Prints information about an ESMC_SciComp to stdout. + +

+The arguments are: +

+
comp
+
An ESMC_SciComp object. + +
+
+ +

+ + +

+14 State Class +

+ +

+14.1 Description +

+ +

+ +

+A State contains the data and metadata to be transferred between +ESMF Components. It is an important class, because it defines a +standard for how data is represented in data transfers between Earth +science components. The +State construct is a rational compromise between a fully prescribed +interface - one that would dictate what specific fields should be +transferred between components - and an interface in which data structures +are completely ad hoc. + +

+There are two types of States, import and export. +An import State contains data that is necessary for a Gridded Component +or Coupler Component to execute, and an export State contains the data +that a Gridded Component or Coupler Component can make available. + +

+States can contain Arrays, ArrayBundles, Fields, FieldBundles, +and other States. However, the current C API only provides State access to +Arrays, Fields and nested States. +States cannot directly contain native language arrays +(i.e. Fortran or C style arrays). Objects in a State must span +the VM on which they are running. For sequentially executing components +which run on the same set of PETs this happens by calling the object +create methods on each PET, creating the object in unison. For +concurrently executing components which are running on subsets of PETs, +an additional method, called ESMF_StateReconcile(), is provided by +ESMF to broadcast information +about objects which were created in sub-components. +Currently this method is only available through the ESMF Fortran API. Hence +the Coupler Component reponsible for reconciling States from Component that +execute on subsets of PETs must be written in Fortran. + +

+State methods include creation and deletion, adding and retrieving +data items, and performing queries. + +

+ +

+14.2 Restrictions and Future Work +

+ +

+ +

    +
  1. No synchronization of object IDs at object create time. +Object IDs are used during the reconcile process to identify objects +which are unknown to some subset of the PETs in the currently running VM. +Object IDs are assigned in sequential order at object create time. + +

    +One important request by the user community during the ESMF object design was +that there be no communication overhead or synchronization when creating +distributed ESMF objects. As a consequence it is required to create these +objects in unison across all PETs in order to keep the ESMF object +identification in sync. + +

    +

  2. +
+ +

+ +

+14.3 Class API +

+ +

+ +

+ +

+ +

+14.3.1 ESMC_StateAddArray - Add an Array object to a State +

+ +

+ +

+
+INTERFACE: +

 int ESMC_StateAddArray(
+   ESMC_State state,   // in
+   ESMC_Array array    // in
+ );
+
RETURN VALUE: +
    Return code; equals ESMF_SUCCESS if there are no errors.
+
+DESCRIPTION: +
+ +

+Add an Array object to a ESMC_State object. + +

+The arguments are: +

+
state
+
The State object. + +
+
array
+
The Array object to be included within the State. + +
+
+ +

+ +

+ +

+14.3.2 ESMC_StateAddField - Add a Field object to a State +

+ +

+ +

+
+INTERFACE: +

 int ESMC_StateAddField(
+   ESMC_State state,   // in
+   ESMC_Field field    // in
+ );
+
RETURN VALUE: +
    Return code; equals ESMF_SUCCESS if there are no errors.
+
+DESCRIPTION: +
+ +

+Add an Array object to a ESMC_State object. + +

+The arguments are: +

+
state
+
The State object. + +
+
array
+
The Array object to be included within the State. + +
+
+ +

+ +

+ +

+14.3.3 ESMC_StateCreate - Create an Array +

+ +

+ +

+
+INTERFACE: +

 ESMC_State ESMC_StateCreate(
+   const char *name,  // in
+   int *rc            // out
+ );
+
RETURN VALUE: +
    Newly created ESMC_State object.
+
+DESCRIPTION: +
+ +

+Create an ESMC_State object. + +

+The arguments are: +

+
[name]
+
The name for the State object. If not specified, i.e. NULL, + a default unique name will be generated: "StateNNN" where NNN + is a unique sequence number from 001 to 999. + +
+
rc
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+14.3.4 ESMC_StateDestroy - Destroy a State +

+ +

+ +

+
+INTERFACE: +

 int ESMC_StateDestroy(
+   ESMC_State *state    // in
+ );
+
RETURN VALUE: +
    Return code; equals ESMF_SUCCESS if there are no errors.
+
+DESCRIPTION: +
+ +

+Destroy a ESMC_State object. + +

+The arguments are: +

+
state
+
The State to be destroyed. + +
+
+ +

+ +

+ +

+14.3.5 ESMC_StateGetArray - Obtains an Array object from a State +

+ +

+ +

+
+INTERFACE: +

 int ESMC_StateGetArray(
+   ESMC_State state,    // in
+   const char *name,    // in
+   ESMC_Array *array    // out
+ );
+
RETURN VALUE: +
    Return code; equals ESMF_SUCCESS if there are no errors.
+
+DESCRIPTION: +
+ +

+Obtain a pointer to an ESMC_Array object contained within + a State. + +

+The arguments are: +

+
state
+
The State object. + +
+
name
+
The name of the desired Array object. + +
+
array
+
A pointer to the Array object. + +
+
+ +

+ +

+ +

+14.3.6 ESMC_StateGetField - Obtains a Field object from a State +

+ +

+ +

+
+INTERFACE: +

 int ESMC_StateGetField(
+   ESMC_State state,    // in
+   const char *name,    // in
+   ESMC_Field *field    // out
+ );
+
RETURN VALUE: +
    Return code; equals ESMF_SUCCESS if there are no errors.
+
+DESCRIPTION: +
+ +

+Obtain a pointer to a ESMC_Field object contained within + a State. + +

+The arguments are: +

+
state
+
The State object. + +
+
name
+
The name of the desired Field object. + +
+
array
+
A pointer to the Field object. + +
+
+ +

+ +

+ +

+14.3.7 ESMC_StatePrint - Print the contents of a State +

+ +

+ +

+
+INTERFACE: +

 int ESMC_StatePrint(
+   ESMC_State state    // in
+ );
+
RETURN VALUE: +
    Return code; equals ESMF_SUCCESS if there are no errors.
+
+DESCRIPTION: +
+ +

+Prints the contents of a ESMC_State object. + +

+The arguments are: +

+
state
+
The State to be printed. + +
+
+ +

+ + +

+ +
+esmf_support@ucar.edu +
+ + diff --git a/docs/nightly/fix/reconcile-info/ESMC_crefdoc/node5.html b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/node5.html new file mode 100644 index 000000000..6f87a3ccb --- /dev/null +++ b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/node5.html @@ -0,0 +1,6306 @@ + + + + + +4 Infrastructure: Fields and Grids + + + + + + + + + + + + + + + + + + + + + +Subsections + + + +
+ +

+4 Infrastructure: Fields and Grids +

+ + +

+ +

+15 Overview of Infrastructure Data Handling +

+ +

+The ESMF infrastructure data classes are part of the framework's +hierarchy of structures for handling Earth system model data and +metadata on parallel platforms. The hierarchy is in complexity; the +simplest data class in the infrastructure represents a distributed data +array and the most complex data class represents a bundle of physical +fields that are discretized on the same grid. However, the current C API +does not support bundled data structures yet. Array and Field are the two +data classes offered by the ESMF C language binding. Data class methods +are called both from user-written code and from other classes +internal to the framework. + +

+Data classes are distributed over DEs, or Decomposition Elements. +A DE represents a piece of a decomposition. A DELayout is a collection +of DEs with some associated connectivity that describes a specific +distribution. For example, the distribution of a grid divided +into four segments in the x-dimension would be expressed in ESMF as +a DELayout with four DEs lying along an x-axis. This abstract concept +enables a data decomposition to be defined in +terms of threads, MPI processes, virtual decomposition elements, or +combinations of these without changes to user code. This is a +primary strategy for ensuring optimal performance and portability +for codes using the ESMF for communications. + +

+ESMF data classes provide a standard, +convenient way for developers to collect together information +related to model or observational data. The information assembled +in a data class includes a data pointer, a set of attributes +(e.g. units, although attributes can also be user-defined), and a +description of an associated grid. The same set of information within +an ESMF data object can be used by the framework to arrange +intercomponent data transfers, to perform I/O, for communications +such as gathers and scatters, for simplification of interfaces +within user code, for debugging, and for other functions. +This unifies and organizes codes overall so that the user need not +define different representations of metadata for the same field +for I/O and for component coupling. + +

+Since it is critical that users be able to introduce ESMF into their +codes easily and incrementally, ESMF data classes can be created based +on native Fortran pointers. Likewise, there are methods for retrieving +native Fortran pointers from within ESMF data objects. This allows +the user to perform allocations using ESMF, and to retrieve Fortran +arrays later for optimized model calculations. The ESMF data classes +do not have associated differential operators or other mathematical +methods. + +

+For flexibility, it is not necessary to build an ESMF data object +all at once. For example, it's possible to create a +field but to defer allocation of the associated field data until +a later time. + +

+

+ + + + + + + + + + + +
+
+Key Features
Hierarchy of data structures designed specifically for the Earth +system domain and high performance, parallel computing.
Multi-use ESMF structures simplify user code overall.
Data objects support incremental construction and deferred allocation.
Native Fortran arrays can be associated with or retrieved from ESMF data +objects, for ease of adoption, convenience, and performance.
+
+ +

+ +

+15.1 Infrastructure Data Classes +

+ +

+The main classes that are used for model and observational data manipulation +are as follows: + +

+ +

    +
  • Array An ESMF Array contains a data pointer, +information about its associated datatype, precision, and +dimension. + +

    +Data elements in Arrays are partitioned into categories +defined by the role the data element plays in distributed halo +operations. Haloing - sometimes called ghosting - is the +practice of copying portions of array data to multiple memory +locations to ensure that data dependencies can be satisfied +quickly when performing a calculation. ESMF Arrays contain +an exclusive domain, which contains data elements +updated exclusively and definitively by a given DE; a +computational domain, which contains all data elements +with values that are updated by the DE in computations; and +a total domain, which includes both the computational +domain and data elements from other DEs which may be read +but are not updated in computations. + +

    +

  • +
  • Field A Field holds model and/or observational +data together with its underlying grid or set of spatial +locations. It provides methods for configuration, +initialization, setting and retrieving data values, +data I/O, data regridding, and manipulation of attributes. + +

    +

  • +
+ +

+ +

+ +

+15.2 Design and Implementation Notes +

+ +

+ +

    +
  1. In communication methods such as Regrid, Redist, Scatter, etc. +the Field code cascades down through the Array code, so +that the actual implementation exist in only one place in the source. + +

    +

  2. +
+ +

+16 Field Class +

+ +

+16.1 Description +

+ +

+An ESMF Field represents a physical field, such as temperature. +The motivation for including Fields in ESMF is that bundles of +Fields are the entities that are normally exchanged when coupling +Components. + +

+The ESMF Field class contains distributed and discretized field data, a reference +to its associated grid, and metadata. The Field class stores the grid staggering +for that physical field. +This is the relationship of how the data array of a field maps onto a grid +(e.g. one item per +cell located at the cell center, one item per cell located at the NW +corner, one item per cell vertex, etc.). This means that different Fields +which are on the same underlying ESMF Grid but have different +staggerings can share the same Grid object without needing to replicate +it multiple times. + +

+Fields can be added to States for use in inter-Component +data communications. + +

+Field communication capabilities include: data redistribution, regridding, scatter, +gather, sparse-matrix multiplication, and halo update. These are discussed +in more detail in the documentation for the specific method calls. +ESMF does not currently support vector fields, so the components of +a vector field must be stored as separate Field objects. + +

+16.2 Constants +

+ +

+ +

+ +
+16.2.1 ESMC_REGRIDMETHOD +

+ +

+DESCRIPTION: +
+Specify which interpolation method to use during regridding. + +

+The type of this flag is: + +

+type(ESMC_RegridMethod_Flag) + +

+The valid values are: +

+
ESMC_REGRIDMETHOD_BILINEAR
+
Bilinear interpolation. Destination value is a linear combination of the source values in the cell which contains the destination point. The weights for the linear combination are based on the distance of destination point from each source value. +
+
ESMC_REGRIDMETHOD_PATCH
+
Higher-order patch recovery interpolation. Destination value is a weighted average of 2D polynomial patches constructed from cells surrounding the source cell which contains the destination point. This method typically results in better approximations to values and derivatives than bilinear. However, because of its larger stencil, it also results in a much larger interpolation matrix (and thus routeHandle) than the bilinear. +
+
ESMC_REGRIDMETHOD_NEAREST_STOD
+
In this version of nearest neighbor interpolation each destination point is mapped to the closest source point. A given source point may go to multiple destination points, but no destination point will receive input from more than one source point. +
+
ESMC_REGRIDMETHOD_NEAREST_DTOS
+
In this version of nearest neighbor interpolation each source point is mapped to the closest destination point. A given destination point may receive input from multiple source points, but no source point will go to more than one destination point. +
+
ESMC_REGRIDMETHOD_CONSERVE
+
First-order conservative interpolation. The main purpose of this method is to preserve the integral of the field between the source and destination. + Will typically give a less accurate approximation to the individual field values than the bilinear or patch methods. The value of a destination cell is calculated as the weighted sum of the values of the source cells that it overlaps. The weights are determined by the amount the source cell overlaps the destination cell. Needs corner coordinate values to be provided in the Grid. Currently only works for Fields created on the Grid center stagger or the Mesh element location. +
+
ESMC_REGRIDMETHOD_CONSERVE_2ND
+
Second-order conservative interpolation. As with first-order, preserves the integral of the value between the source and destination. However, typically produces a smoother more accurate result than first-order. Also like first-order, the value of a destination cell is calculated as the weighted sum of the values of the source cells that it overlaps. However, second-order also includes additional terms to take into account the gradient of the field across the source cell. Needs corner coordinate values to be provided in the Grid. Currently only works for Fields created on the Grid center stagger or the Mesh element location. +
+
+ +

+16.3 Use and Examples +

+ +

+A Field serves as an annotator of data, since it carries +a description of the grid it is associated with and metadata +such as name and units. Fields can be used in this capacity +alone, as convenient, descriptive containers into which arrays +can be placed and retrieved. However, for most codes the primary +use of Fields is in the context of import and export States, +which are the objects that carry coupling information between +Components. Fields enable data to be self-describing, and a +State holding ESMF Fields contains data in a standard format +that can be queried and manipulated. + +

+The sections below go into more detail about Field usage. + +

+ +

+16.3.1 Field create and destroy +

+ +

+Fields can be created and destroyed at any time during +application execution. However, these Field methods require +some time to complete. We do not recommend that the user +create or destroy Fields inside performance-critical +computational loops. + +

+All versions of the ESMC_FieldCreate() +routines require a Mesh object as input. +The Mesh contains the information needed to know which +Decomposition Elements (DEs) are participating in +the processing of this Field, and which subsets of the data +are local to a particular DE. + +

+The details of how the create process happens depend +on which of the variants of the ESMC_FieldCreate() +call is used. + +

+When finished with an ESMC_Field, the ESMC_FieldDestroy method +removes it. However, the objects inside the ESMC_Field +created externally should be destroyed separately, +since objects can be added to +more than one ESMC_Field. For example, the same ESMF_Mesh +can be referenced by multiple ESMC_Fields. In this case the +internal Mesh is not deleted by the ESMC_FieldDestroy call. + +

+16.4 Class API +

+ +

+ +

+ +

+ +

+16.4.1 ESMC_FieldCreateGridArraySpec - Create a Field from Grid and ArraySpec +

+ +

+ +

+
+INTERFACE: +

 ESMC_Field ESMC_FieldCreateGridArraySpec(
+   ESMC_Grid grid,                           // in
+   ESMC_ArraySpec arrayspec,                 // in
+   enum ESMC_StaggerLoc staggerloc,          // in
+   ESMC_InterArrayInt *gridToFieldMap,       // in
+   ESMC_InterArrayInt *ungriddedLBound,      // in
+   ESMC_InterArrayInt *ungriddedUBound,      // in
+   const char *name,                         // in
+   int *rc                                   // out
+ );
+
RETURN VALUE: +
    Newly created ESMC_Field object.
+
+DESCRIPTION: +
+ +

+Creates a ESMC_Field object. + +

+The arguments are: +

+
grid
+
A ESMC_Grid object. + +
+
arrayspec
+
A ESMC_ArraySpec object describing data type and kind specification. + +
+
staggerloc
+
Stagger location of data in grid cells. The default value is + ESMF_STAGGERLOC_CENTER. + +
+
gridToFieldMap
+
List with number of elements equal to the grid's dimCount. The list + elements map each dimension of the grid to a dimension in the field by + specifying the appropriate field dimension index. The default is to map all of + the grid's dimensions against the lowest dimensions of the field in sequence, + i.e. gridToFieldMap = (/1,2,3,.../). The values of all gridToFieldMap entries + must be greater than or equal to one and smaller than or equal to the field + rank. It is erroneous to specify the same gridToFieldMap entry multiple times. + The total ungridded dimensions in the field are the total field dimensions + less the dimensions in the grid. Ungridded dimensions must be in the same order + they are stored in the field. If the Field dimCount is less than the Mesh + dimCount then the default gridToFieldMap will contain zeros for the rightmost + entries. A zero entry in the gridToFieldMap indicates that the particular Mesh + dimension will be replicating the Field across the DEs along this direction. + +
+
ungriddedLBound
+
Lower bounds of the ungridded dimensions of the field. The number of elements + in the ungriddedLBound is equal to the number of ungridded dimensions in the + field. All ungridded dimensions of the field are also undistributed. When field + dimension count is greater than grid dimension count, both ungriddedLBound and + ungriddedUBound must be specified. When both are specified the values are + checked for consistency. Note that the the ordering of these ungridded + dimensions is the same as their order in the field. + +
+
ungriddedUBound
+
Upper bounds of the ungridded dimensions of the field. The number of elements + in the ungriddedUBound is equal to the number of ungridded dimensions in the + field. All ungridded dimensions of the field are also undistributed. When field + dimension count is greater than grid dimension count, both ungriddedLBound and + ungriddedUBound must be specified. When both are specified the values are + checked for consistency. Note that the the ordering of these ungridded + dimensions is the same as their order in the field. + +
+
[name]
+
The name for the newly created field. If not specified, i.e. NULL, + a default unique name will be generated: "FieldNNN" where NNN + is a unique sequence number from 001 to 999. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+16.4.2 ESMC_FieldCreateGridTypeKind - Create a Field from Grid and typekind +

+ +

+ +

+
+INTERFACE: +

 ESMC_Field ESMC_FieldCreateGridTypeKind(
+   ESMC_Grid grid,                           // in
+   enum ESMC_TypeKind_Flag typekind,         // in
+   enum ESMC_StaggerLoc staggerloc,          // in
+   ESMC_InterArrayInt *gridToFieldMap,       // in
+   ESMC_InterArrayInt *ungriddedLBound,      // in
+   ESMC_InterArrayInt *ungriddedUBound,      // in
+   const char *name,                         // in
+   int *rc                                   // out
+ );
+
RETURN VALUE: +
    Newly created ESMC_Field object.
+
+DESCRIPTION: +
+ +

+Creates a ESMC_Field object. + +

+The arguments are: +

+
grid
+
A ESMC_Grid object. + +
+
typekind
+
The ESMC_TypeKind_Flag that describes this Field data. + +
+
staggerloc
+
Stagger location of data in grid cells. The default value is + ESMF_STAGGERLOC_CENTER. + +
+
gridToFieldMap
+
List with number of elements equal to the grid's dimCount. The list + elements map each dimension of the grid to a dimension in the field by + specifying the appropriate field dimension index. The default is to map all of + the grid's dimensions against the lowest dimensions of the field in sequence, + i.e. gridToFieldMap = (/1,2,3,.../). The values of all gridToFieldMap entries + must be greater than or equal to one and smaller than or equal to the field + rank. It is erroneous to specify the same gridToFieldMap entry multiple times. + The total ungridded dimensions in the field are the total field dimensions + less the dimensions in the grid. Ungridded dimensions must be in the same order + they are stored in the field. If the Field dimCount is less than the Mesh + dimCount then the default gridToFieldMap will contain zeros for the rightmost + entries. A zero entry in the gridToFieldMap indicates that the particular Mesh + dimension will be replicating the Field across the DEs along this direction. + +
+
ungriddedLBound
+
Lower bounds of the ungridded dimensions of the field. The number of elements + in the ungriddedLBound is equal to the number of ungridded dimensions in the + field. All ungridded dimensions of the field are also undistributed. When field + dimension count is greater than grid dimension count, both ungriddedLBound and + ungriddedUBound must be specified. When both are specified the values are + checked for consistency. Note that the the ordering of these ungridded + dimensions is the same as their order in the field. + +
+
ungriddedUBound
+
Upper bounds of the ungridded dimensions of the field. The number of elements + in the ungriddedUBound is equal to the number of ungridded dimensions in the + field. All ungridded dimensions of the field are also undistributed. When field + dimension count is greater than grid dimension count, both ungriddedLBound and + ungriddedUBound must be specified. When both are specified the values are + checked for consistency. Note that the the ordering of these ungridded + dimensions is the same as their order in the field. + +
+
[name]
+
The name for the newly created field. If not specified, i.e. NULL, + a default unique name will be generated: "FieldNNN" where NNN + is a unique sequence number from 001 to 999. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+16.4.3 ESMC_FieldCreateMeshArraySpec - Create a Field from Mesh and ArraySpec +

+ +

+ +

+
+INTERFACE: +

 ESMC_Field ESMC_FieldCreateMeshArraySpec(
+   ESMC_Mesh mesh,                           // in
+   ESMC_ArraySpec arrayspec,                 // in
+   ESMC_InterArrayInt *gridToFieldMap,       // in
+   ESMC_InterArrayInt *ungriddedLBound,      // in
+   ESMC_InterArrayInt *ungriddedUBound,      // in
+   const char *name,                         // in
+   int *rc                                   // out
+ );
+
RETURN VALUE: +
    Newly created ESMC_Field object.
+
+DESCRIPTION: +
+ +

+Creates a ESMC_Field object. + +

+The arguments are: +

+
mesh
+
A ESMC_Mesh object. + +
+
arrayspec
+
A ESMC_ArraySpec object describing data type and kind specification. + +
+
gridToFieldMap
+
List with number of elements equal to the grid's dimCount. The list + elements map each dimension of the grid to a dimension in the field by + specifying the appropriate field dimension index. The default is to map all of + the grid's dimensions against the lowest dimensions of the field in sequence, + i.e. gridToFieldMap = (/1,2,3,.../). The values of all gridToFieldMap entries + must be greater than or equal to one and smaller than or equal to the field + rank. It is erroneous to specify the same gridToFieldMap entry multiple times. + The total ungridded dimensions in the field are the total field dimensions + less the dimensions in the grid. Ungridded dimensions must be in the same order + they are stored in the field. If the Field dimCount is less than the Mesh + dimCount then the default gridToFieldMap will contain zeros for the rightmost + entries. A zero entry in the gridToFieldMap indicates that the particular Mesh + dimension will be replicating the Field across the DEs along this direction. + +
+
ungriddedLBound
+
Lower bounds of the ungridded dimensions of the field. The number of elements + in the ungriddedLBound is equal to the number of ungridded dimensions in the + field. All ungridded dimensions of the field are also undistributed. When field + dimension count is greater than grid dimension count, both ungriddedLBound and + ungriddedUBound must be specified. When both are specified the values are + checked for consistency. Note that the the ordering of these ungridded + dimensions is the same as their order in the field. + +
+
ungriddedUBound
+
Upper bounds of the ungridded dimensions of the field. The number of elements + in the ungriddedUBound is equal to the number of ungridded dimensions in the + field. All ungridded dimensions of the field are also undistributed. When field + dimension count is greater than grid dimension count, both ungriddedLBound and + ungriddedUBound must be specified. When both are specified the values are + checked for consistency. Note that the the ordering of these ungridded + dimensions is the same as their order in the field. + +
+
[name]
+
The name for the newly created field. If not specified, i.e. NULL, + a default unique name will be generated: "FieldNNN" where NNN + is a unique sequence number from 001 to 999. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+16.4.4 ESMC_FieldCreateMeshTypeKind - Create a Field from Mesh and typekind +

+ +

+ +

+
+INTERFACE: +

 ESMC_Field ESMC_FieldCreateMeshTypeKind(
+   ESMC_Mesh mesh,                           // in
+   enum ESMC_TypeKind_Flag typekind,         // in
+   enum ESMC_MeshLoc_Flag meshloc,           // in
+   ESMC_InterArrayInt *gridToFieldMap,       // in
+   ESMC_InterArrayInt *ungriddedLBound,      // in
+   ESMC_InterArrayInt *ungriddedUBound,      // in
+   const char *name,                         // in
+   int *rc                                   // out
+ );
+
RETURN VALUE: +
    Newly created ESMC_Field object.
+
+DESCRIPTION: +
+ +

+Creates a ESMC_Field object. + +

+The arguments are: +

+
mesh
+
A ESMC_Mesh object. + +
+
typekind
+
The ESMC_TypeKind_Flag that describes this Field data. + +
+
meshloc
+
The ESMC_MeshLoc_Flag that describes this Field data. + +
+
gridToFieldMap
+
List with number of elements equal to the grid's dimCount. The list + elements map each dimension of the grid to a dimension in the field by + specifying the appropriate field dimension index. The default is to map all of + the grid's dimensions against the lowest dimensions of the field in sequence, + i.e. gridToFieldMap = (/1,2,3,.../). The values of all gridToFieldMap entries + must be greater than or equal to one and smaller than or equal to the field + rank. It is erroneous to specify the same gridToFieldMap entry multiple times. + The total ungridded dimensions in the field are the total field dimensions + less the dimensions in the grid. Ungridded dimensions must be in the same order + they are stored in the field. If the Field dimCount is less than the Mesh + dimCount then the default gridToFieldMap will contain zeros for the rightmost + entries. A zero entry in the gridToFieldMap indicates that the particular Mesh + dimension will be replicating the Field across the DEs along this direction. + +
+
ungriddedLBound
+
Lower bounds of the ungridded dimensions of the field. The number of elements + in the ungriddedLBound is equal to the number of ungridded dimensions in the + field. All ungridded dimensions of the field are also undistributed. When field + dimension count is greater than grid dimension count, both ungriddedLBound and + ungriddedUBound must be specified. When both are specified the values are + checked for consistency. Note that the the ordering of these ungridded + dimensions is the same as their order in the field. + +
+
ungriddedUBound
+
Upper bounds of the ungridded dimensions of the field. The number of elements + in the ungriddedUBound is equal to the number of ungridded dimensions in the + field. All ungridded dimensions of the field are also undistributed. When field + dimension count is greater than grid dimension count, both ungriddedLBound and + ungriddedUBound must be specified. When both are specified the values are + checked for consistency. Note that the the ordering of these ungridded + dimensions is the same as their order in the field. + +
+
[name]
+
The name for the newly created field. If not specified, i.e. NULL, + a default unique name will be generated: "FieldNNN" where NNN + is a unique sequence number from 001 to 999. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+16.4.5 ESMC_FieldCreateLocStreamArraySpec - Create a Field from LocStream and ArraySpec +

+ +

+ +

+
+INTERFACE: +

 ESMC_Field ESMC_FieldCreateLocStreamArraySpec(
+   ESMC_LocStream locstream,                 // in
+   ESMC_ArraySpec arrayspec,                 // in
+   ESMC_InterArrayInt *gridToFieldMap,       // in
+   ESMC_InterArrayInt *ungriddedLBound,      // in
+   ESMC_InterArrayInt *ungriddedUBound,      // in
+   const char *name,                         // in
+   int *rc                                   // out
+ );
+
RETURN VALUE: +
    Newly created ESMC_Field object.
+
+DESCRIPTION: +
+ +

+Creates a ESMC_Field object. + +

+The arguments are: +

+
locstream
+
A ESMC_LocStream object. + +
+
arrayspec
+
A ESMC_ArraySpec object describing data type and kind specification. + +
+
gridToFieldMap
+
List with number of elements equal to the grid's dimCount. The list + elements map each dimension of the grid to a dimension in the field by + specifying the appropriate field dimension index. The default is to map all of + the grid's dimensions against the lowest dimensions of the field in sequence, + i.e. gridToFieldMap = (/1,2,3,.../). The values of all gridToFieldMap entries + must be greater than or equal to one and smaller than or equal to the field + rank. It is erroneous to specify the same gridToFieldMap entry multiple times. + The total ungridded dimensions in the field are the total field dimensions + less the dimensions in the grid. Ungridded dimensions must be in the same order + they are stored in the field. If the Field dimCount is less than the Mesh + dimCount then the default gridToFieldMap will contain zeros for the rightmost + entries. A zero entry in the gridToFieldMap indicates that the particular Mesh + dimension will be replicating the Field across the DEs along this direction. + +
+
ungriddedLBound
+
Lower bounds of the ungridded dimensions of the field. The number of elements + in the ungriddedLBound is equal to the number of ungridded dimensions in the + field. All ungridded dimensions of the field are also undistributed. When field + dimension count is greater than grid dimension count, both ungriddedLBound and + ungriddedUBound must be specified. When both are specified the values are + checked for consistency. Note that the the ordering of these ungridded + dimensions is the same as their order in the field. + +
+
ungriddedUBound
+
Upper bounds of the ungridded dimensions of the field. The number of elements + in the ungriddedUBound is equal to the number of ungridded dimensions in the + field. All ungridded dimensions of the field are also undistributed. When field + dimension count is greater than grid dimension count, both ungriddedLBound and + ungriddedUBound must be specified. When both are specified the values are + checked for consistency. Note that the the ordering of these ungridded + dimensions is the same as their order in the field. + +
+
[name]
+
The name for the newly created field. If not specified, i.e. NULL, + a default unique name will be generated: "FieldNNN" where NNN + is a unique sequence number from 001 to 999. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+16.4.6 ESMC_FieldCreateLocStreamTypeKind - Create a Field from LocStream and typekind +

+ +

+ +

+
+INTERFACE: +

 ESMC_Field ESMC_FieldCreateLocStreamTypeKind(
+   ESMC_LocStream locstream,                 // in
+   enum ESMC_TypeKind_Flag typekind,         // in
+   ESMC_InterArrayInt *gridToFieldMap,       // in
+   ESMC_InterArrayInt *ungriddedLBound,      // in
+   ESMC_InterArrayInt *ungriddedUBound,      // in
+   const char *name,                         // in
+   int *rc                                   // out
+ );
+
RETURN VALUE: +
    Newly created ESMC_Field object.
+
+DESCRIPTION: +
+ +

+Creates a ESMC_Field object. + +

+The arguments are: +

+
locstream
+
A ESMC_LocStream object. + +
+
typekind
+
The ESMC_TypeKind_Flag that describes this Field data. + +
+
gridToFieldMap
+
List with number of elements equal to the grid's dimCount. The list + elements map each dimension of the grid to a dimension in the field by + specifying the appropriate field dimension index. The default is to map all of + the grid's dimensions against the lowest dimensions of the field in sequence, + i.e. gridToFieldMap = (/1,2,3,.../). The values of all gridToFieldMap entries + must be greater than or equal to one and smaller than or equal to the field + rank. It is erroneous to specify the same gridToFieldMap entry multiple times. + The total ungridded dimensions in the field are the total field dimensions + less the dimensions in the grid. Ungridded dimensions must be in the same order + they are stored in the field. If the Field dimCount is less than the Mesh + dimCount then the default gridToFieldMap will contain zeros for the rightmost + entries. A zero entry in the gridToFieldMap indicates that the particular Mesh + dimension will be replicating the Field across the DEs along this direction. + +
+
ungriddedLBound
+
Lower bounds of the ungridded dimensions of the field. The number of elements + in the ungriddedLBound is equal to the number of ungridded dimensions in the + field. All ungridded dimensions of the field are also undistributed. When field + dimension count is greater than grid dimension count, both ungriddedLBound and + ungriddedUBound must be specified. When both are specified the values are + checked for consistency. Note that the the ordering of these ungridded + dimensions is the same as their order in the field. + +
+
ungriddedUBound
+
Upper bounds of the ungridded dimensions of the field. The number of elements + in the ungriddedUBound is equal to the number of ungridded dimensions in the + field. All ungridded dimensions of the field are also undistributed. When field + dimension count is greater than grid dimension count, both ungriddedLBound and + ungriddedUBound must be specified. When both are specified the values are + checked for consistency. Note that the the ordering of these ungridded + dimensions is the same as their order in the field. + +
+
[name]
+
The name for the newly created field. If not specified, i.e. NULL, + a default unique name will be generated: "FieldNNN" where NNN + is a unique sequence number from 001 to 999. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+16.4.7 ESMC_FieldDestroy - Destroy a Field +

+ +

+ +

+
+INTERFACE: +

 int ESMC_FieldDestroy(
+   ESMC_Field *field     // inout
+ );
+
RETURN VALUE: +
    Return code; equals ESMF_SUCCESS if there are no errors.
+
+DESCRIPTION: +
+ +

+Releases all resources associated with this ESMC_Field. + Return code; equals ESMF_SUCCESS if there are no errors. + +

+The arguments are: +

+
field
+
Destroy contents of this ESMC_Field. + +
+
+ +

+ +

+ +

+16.4.8 ESMC_FieldGetArray - Get the internal Array stored in the Field +

+ +

+ +

+
+INTERFACE: +

 ESMC_Array ESMC_FieldGetArray(
+   ESMC_Field field,     // in
+   int *rc               // out
+ );
+
RETURN VALUE: +
    The ESMC_Array object stored in the ESMC_Field.
+
+DESCRIPTION: +
+ +

+Get the internal Array stored in the ESMC_Field. + +

+The arguments are: +

+
field
+
Get the internal Array stored in this ESMC_Field. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+16.4.9 ESMC_FieldGetMesh - Get the internal Mesh stored in the Field +

+ +

+ +

+
+INTERFACE: +

 ESMC_Mesh ESMC_FieldGetMesh(
+   ESMC_Field field,     // in
+   int *rc               // out
+ );
+
RETURN VALUE: +
    The ESMC_Mesh object stored in the ESMC_Field.
+
+DESCRIPTION: +
+ +

+Get the internal Mesh stored in the ESMC_Field. + +

+The arguments are: +

+
field
+
Get the internal Mesh stored in this ESMC_Field. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+16.4.10 ESMC_FieldGetPtr - Get the internal Fortran data pointer stored in the Field +

+ +

+ +

+
+INTERFACE: +

 void *ESMC_FieldGetPtr(
+   ESMC_Field field,     // in
+   int localDe,          // in
+   int *rc               // out
+ );
+
RETURN VALUE: +
    The Fortran data pointer stored in the ESMC_Field.
+
+DESCRIPTION: +
+ +

+Get the internal Fortran data pointer stored in the ESMC_Field. + +

+The arguments are: +

+
field
+
Get the internal Fortran data pointer stored in this ESMC_Field. + +
+
localDe
+
Local DE for which information is requested. [0,..,localDeCount-1]. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+16.4.11 ESMC_FieldGetBounds - Get the Field bounds +

+ +

+ +

+
+INTERFACE: +

 int ESMC_FieldGetBounds(
+   ESMC_Field field,      // in
+   int *localDe,
+   int *exclusiveLBound,
+   int *exclusiveUBound,
+   int rank
+ );
+
RETURN VALUE: +
    Return code; equals ESMF_SUCCESS if there are no errors.
+
+DESCRIPTION: +
+ +

+Get the Field bounds from the ESMC_Field. + +

+The arguments are: +

+
field
+
ESMC_Field whose bounds will be returned + +
+
localDe
+
The local DE of the ESMC_Field (not implemented) + +
+
exclusiveLBound
+
The exclusive lower bounds of the ESMC_Field + +
+
exclusiveUBound
+
The exclusive upper bounds of the ESMC_Field + +
+
rank
+
The rank of the ESMC_Field, to size the bounds arrays + +
+
+ +

+ +

+ +

+16.4.12 ESMC_FieldPrint - Print the internal information of a Field +

+ +

+ +

+
+INTERFACE: +

 int ESMC_FieldPrint(
+   ESMC_Field field      // in
+ );
+
RETURN VALUE: +
    Return code; equals ESMF_SUCCESS if there are no errors.
+
+DESCRIPTION: +
+ +

+Print the internal information within this ESMC_Field. + +

+The arguments are: +

+
field
+
Print contents of this ESMC_Field. + +
+
+ +

+ +

+ +

+16.4.13 ESMC_FieldRegridGetArea - Get the area of the cells used for +

+ +

+conservative interpolation + +

+ +

+
+INTERFACE: +

 int ESMC_FieldRegridGetArea(
+   ESMC_Field field      // in
+ );
+
RETURN VALUE: +
    Return code; equals ESMF_SUCCESS if there are no errors.
+
+DESCRIPTION: +
+ +

+This subroutine gets the area of the cells used for conservative interpolation for the grid object + associated with areaField and puts them into areaField. If created on a 2D Grid, it must + be built on the ESMF_STAGGERLOC_CENTER stagger location. + If created on a 3D Grid, it must be built on the ESMF_STAGGERLOC_CENTER_VCENTER stagger + location. If created on a Mesh, it must be built on the ESMF_MESHLOC_ELEMENT mesh location. + +

+The arguments are: +

+
areaField
+
The Field to put the area values in. + +
+
+ +

+ +

+ +

+16.4.14 ESMC_FieldRegridStore - Precompute a Field regridding operation and return a RouteHandle +

+ +

+ +

+
+INTERFACE: +

 int ESMC_FieldRegridStore( 
+     ESMC_Field srcField,                           // in
+     ESMC_Field dstField,                           // in
+     ESMC_InterArrayInt *srcMaskValues,             // in
+     ESMC_InterArrayInt *dstMaskValues,             // in
+     ESMC_RouteHandle *routehandle,                 // inout
+     enum ESMC_RegridMethod_Flag *regridmethod,     // in
+     enum ESMC_PoleMethod_Flag *polemethod,         // in
+     int *regridPoleNPnts,                          // in
+     enum ESMC_LineType_Flag *lineType,             // in
+     enum ESMC_NormType_Flag *normType,             // in
+     enum ESMC_ExtrapMethod_Flag *extrapMethod,     // in
+     int *extrapNumSrcPnts,                         // in
+     float *extrapDistExponent,                     // in
+     int *extrapNumLevels,                          // in
+     enum ESMC_UnmappedAction_Flag *unmappedaction, // in
+     enum ESMC_Logical *ignoreDegenerate,           // in
+     double **factorList,                           // inout
+     int **factorIndexList,                         // inout
+     int *numFactors,                               // inout
+     ESMC_Field *srcFracField,                      // inout
+     ESMC_Field *dstFracField);                     // inout
+
RETURN VALUE: +
     Return code; equals ESMF_SUCCESS if there are no errors.
+
+DESCRIPTION: +
+ +

+Creates a sparse matrix operation (stored in routehandle) that contains + the calculations and communications necessary to interpolate from srcField + to dstField. The routehandle can then be used in the call ESMC_FieldRegrid() + to interpolate between the Fields. + +

+The arguments are: +

+
srcField
+
ESMC_Field with source data. + +
+
dstField
+
ESMC_Field with destination data. + +
+
srcMaskValues
+
List of values that indicate a source point should be masked out. + If not specified, no masking will occur. + +
+
dstMaskValues
+
List of values that indicate a destination point should be masked out. + If not specified, no masking will occur. + +
+
routehandle
+
The handle that implements the regrid, to be used in ESMC_FieldRegrid(). + +
+
regridmethod
+
The type of interpolation. If not specified, defaults to ESMF_REGRIDMETHOD_BILINEAR. + +
+
polemethod
+
Which type of artificial pole + to construct on the source Grid for regridding. + If not specified, defaults to ESMF_POLEMETHOD_ALLAVG for non-conservative regrid methods, + and ESMF_POLEMETHOD_NONE for conservative methods. + If not specified, defaults to ESMC_POLEMETHOD_ALLAVG. + +
+
regridPoleNPnts
+
If polemethod is ESMC_POLEMETHOD_NPNTAVG. + This parameter indicates how many points should be averaged + over. Must be specified if polemethod is + ESMC_POLEMETHOD_NPNTAVG. + +
+
[lineType]
+
This argument controls the path of the line which connects two points on a sphere surface. This in + turn controls the path along which distances are calculated and the shape of the edges that make + up a cell. Both of these quantities can influence how interpolation weights are calculated. + As would be expected, this argument is only applicable when srcField and dstField are + built on grids which lie on the surface of a sphere. Section 34.8 shows a + list of valid options for this argument. If not specified, the default depends on the + regrid method. Section 34.8 has the defaults by line type. + +
+
normType
+
This argument controls the type of normalization used when generating conservative weights. + This option only applies to weights generated with regridmethod=ESMF_REGRIDMETHOD_CONSERVE. + If not specified normType defaults to ESMF_NORMTYPE_DSTAREA. + +
+
[extrapMethod]
+
The type of extrapolation. Please see Section 34.3 + for a list of valid options. If not specified, defaults to + ESMC_EXTRAPMETHOD_NONE. + +
+
[extrapNumSrcPnts]
+
The number of source points to use for the extrapolation methods that use more than one source point + (e.g. ESMC_EXTRAPMETHOD_NEAREST_IDAVG). If not specified, defaults to 8. + +
+
[extrapDistExponent]
+
The exponent to raise the distance to when calculating weights for + the ESMC_EXTRAPMETHOD_NEAREST_IDAVG extrapolation method. A higher value reduces the influence + of more distant points. If not specified, defaults to 2.0. + +
+
[extrapNumLevels]
+
The number of levels to output for the extrapolation methods that fill levels + (e.g. ESMC_EXTRAPMETHOD_CREEP). When a method is used that requires this, then + an error will be returned if it is not specified. + +
+
unmappedaction
+
Specifies what should happen if there are destination points that can't + be mapped to a source cell. Options are ESMF_UNMAPPEDACTION_ERROR or + ESMF_UNMAPPEDACTION_IGNORE. If not specified, defaults to ESMF_UNMAPPEDACTION_ERROR. + +
+
[factorList]
+
The list of coefficients for a sparse matrix which interpolates from srcField to + dstField. The array coming out of this variable is in the appropriate format to be used + in other ESMF sparse matrix multiply calls, for example ESMC_FieldSMMStore(). + The factorList array is allocated by the method and the user is responsible for + deallocating it. + +
+
[factorIndexList]
+
The indices for a sparse matrix which interpolates from srcField to + dstField. This argument is a 2D array containing pairs of source and destination + sequence indices corresponding to the coefficients in the factorList argument. + The first dimension of factorIndexList is of size 2. factorIndexList(1,:) specifies + the sequence index of the source element in the srcField. factorIndexList(2,:) specifies + the sequence index of the destination element in the dstField. The second dimension of + factorIndexList steps through the list of pairs, i.e. size(factorIndexList,2)==size(factorList). + The array coming out of this variable is in the appropriate format to be used + in other ESMF sparse matrix multiply calls, for example ESMC_FieldSMMStore(). + The factorIndexList array is allocated by the method and the user is responsible for deallocating it. + +
+
[numFactors]
+
The number of factors returned in factorList. + +
+
[srcFracField]
+
The fraction of each source cell participating in the regridding. Only + valid when regridmethod is ESMC_REGRIDMETHOD_CONSERVE. + This Field needs to be created on the same location (e.g staggerloc) + as the srcField. + +
+
[dstFracField]
+
The fraction of each destination cell participating in the regridding. Only + valid when regridmethod is ESMF_REGRIDMETHOD_CONSERVE. + This Field needs to be created on the same location (e.g staggerloc) + as the dstField. + +
+
+ +

+ +

+ +

+16.4.15 ESMC_FieldRegridStoreFile - Precompute a Field regridding operation and return a RouteHandle +

+ +

+ +

+
+INTERFACE: +

 int ESMC_FieldRegridStoreFile(
+     ESMC_Field srcField,                           // in
+     ESMC_Field dstField,                           // in
+     const char *filename,                          // in
+     ESMC_InterArrayInt *srcMaskValues,             // in
+     ESMC_InterArrayInt *dstMaskValues,             // in
+     ESMC_RouteHandle *routehandle,                 // inout
+     enum ESMC_RegridMethod_Flag *regridmethod,     // in
+     enum ESMC_PoleMethod_Flag *polemethod,         // in
+     int *regridPoleNPnts,                          // in
+     enum ESMC_LineType_Flag *lineType,             // in
+     enum ESMC_NormType_Flag *normType,             // in
+     enum ESMC_UnmappedAction_Flag *unmappedaction, // in
+     enum ESMC_Logical *ignoreDegenerate,           // in
+     enum ESMC_Logical *create_rh,                  // in
+     enum ESMC_FileMode_Flag *filemode,                  // in
+     const char *srcFile,                           // in
+     const char *dstFile,                           // in
+     enum ESMC_FileFormat_Flag *srcFileType,        // in
+     enum ESMC_FileFormat_Flag *dstFileType,        // in
+     enum ESMC_Logical *largeFileFlag,              // in
+     ESMC_Field *srcFracField,                      // out
+     ESMC_Field *dstFracField);                     // out
+
RETURN VALUE: +
     Return code; equals ESMF_SUCCESS if there are no errors.
+
+DESCRIPTION: +
+ +

+Creates a sparse matrix operation (stored in routehandle) that contains + the calculations and communications necessary to interpolate from srcField + to dstField. The routehandle can then be used in the call ESMC_FieldRegrid() + to interpolate between the Fields. The weights will be output to the file + with name filename. + +

+The arguments are: +

+
srcField
+
ESMC_Field with source data. + +
+
dstField
+
ESMC_Field with destination data. + +
+
[filename]
+
The output filename for the factorList and factorIndexList. + +
+
[srcMaskValues]
+
List of values that indicate a source point should be masked out. + If not specified, no masking will occur. + +
+
[dstMaskValues]
+
List of values that indicate a destination point should be masked out. + If not specified, no masking will occur. + +
+
[routehandle]
+
The handle that implements the regrid, to be used in ESMC_FieldRegrid(). + +
+
[regridmethod]
+
The type of interpolation. If not specified, defaults to ESMC_REGRIDMETHOD_BILINEAR. + +
+
[polemethod]
+
Which type of artificial pole + to construct on the source Grid for regridding. + If not specified, defaults to ESMC_POLEMETHOD_ALLAVG for non-conservative regrid methods, + and ESMC_POLEMETHOD_NONE for conservative methods. + If not specified, defaults to ESMC_POLEMETHOD_ALLAVG. + +
+
[regridPoleNPnts]
+
If polemethod is ESMC_POLEMETHOD_NPNTAVG. + This parameter indicates how many points should be averaged + over. Must be specified if polemethod is + ESMC_POLEMETHOD_NPNTAVG. + +
+
[lineType]
+
This argument controls the path of the line which connects two points on a sphere surface. This in + turn controls the path along which distances are calculated and the shape of the edges that make + up a cell. Both of these quantities can influence how interpolation weights are calculated. + As would be expected, this argument is only applicable when srcField and dstField are + built on grids which lie on the surface of a sphere. Section 34.8 shows a + list of valid options for this argument. If not specified, the default depends on the + regrid method. Section 34.8 has the defaults by line type. + +
+
[normType]
+
This argument controls the type of normalization used when generating conservative weights. + This option only applies to weights generated with regridmethod=ESMC_REGRIDMETHOD_CONSERVE. + If not specified normType defaults to ESMC_NORMTYPE_DSTAREA. + +
+
[unmappedaction]
+
Specifies what should happen if there are destination points that can't + be mapped to a source cell. Options are ESMC_UNMAPPEDACTION_ERROR or + ESMC_UNMAPPEDACTION_IGNORE. If not specified, defaults to ESMC_UNMAPPEDACTION_ERROR. + +
+
create_rh
+
Specifies whether or not to create a routehandle, or just write weights to file. + If not specified, defaults to ESMF_TRUE. + +
+
filemode
+
Specifies the mode to use when creating the weight file. Options are + ESMC_FILEMODE_BASIC and ESMC_FILEMODE_WITHAUX, which will + write a file that includes center coordinates of the grids. The default + value is ESMC_FILEMODE_BASIC. + +
+
srcFile
+
The name of the source file used to create the ESMC_Grid used + in this regridding operation. + +
+
dstFile
+
The name of the destination file used to create the ESMC_Grid used + in this regridding operation. + +
+
srcFileType
+
The type of the file used to represent the source grid. + +
+
dstFileType
+
The type of the file used to represent the destination grid. + +
+
[srcFracField]
+
The fraction of each source cell participating in the regridding. Only + valid when regridmethod is ESMC_REGRIDMETHOD_CONSERVE. + This Field needs to be created on the same location (e.g staggerloc) + as the srcField. + +
+
[dstFracField]
+
The fraction of each destination cell participating in the regridding. Only + valid when regridmethod is ESMC_REGRIDMETHOD_CONSERVE. + This Field needs to be created on the same location (e.g staggerloc) + as the dstField. + +
+
+ +

+ +

+ +

+16.4.16 ESMC_FieldRegrid - Compute a regridding operation +

+ +

+ +

+
+INTERFACE: +

   int ESMC_FieldRegrid( 
+     ESMC_Field srcField,                  // in
+     ESMC_Field dstField,                  // inout
+     ESMC_RouteHandle routehandle,         // in
+     enum ESMC_Region_Flag *zeroregion);   // in
+
RETURN VALUE: +
    Return code; equals ESMF_SUCCESS if there are no errors.
+
+DESCRIPTION: +
+ +

+Execute the precomputed regrid operation stored in routehandle to interpolate + from srcField to dstField. See ESMF_FieldRegridStore() on how to precompute + the routehandle. It is erroneous to specify the identical Field object for + srcField and dstField arguments. This call is collective across the + current VM. + +

+The arguments are: +

+
srcField
+
ESMC_Field with source data. + +
+
dstField
+
ESMC_Field with destination data. + +
+
routehandle
+
Handle to the precomputed Route. + +
+
[zeroregion]
+
If set to ESMC_REGION_TOTAL (default) the total regions of + all DEs in dstField will be initialized to zero before updating the + elements with the results of the sparse matrix multiplication. If set to + ESMC_REGION_EMPTY the elements in dstField will not be + modified prior to the sparse matrix multiplication and results will be + added to the incoming element values. Setting zeroregion to + ESMC_REGION_SELECT will only zero out those elements in the + destination Array that will be updated by the sparse matrix + multiplication. + +
+
+ +

+ +

+ +

+16.4.17 ESMC_FieldRegridRelease - Free resources used by a regridding operation +

+ +

+ +

+
+INTERFACE: +

   int ESMC_FieldRegridRelease(ESMC_RouteHandle *routehandle);  // inout
+
RETURN VALUE: +
    Return code; equals ESMF_SUCCESS if there are no errors.
+
+DESCRIPTION: +
+ +

+Free resources used by regrid object + +

+The arguments are: +

+
routehandle
+
Handle carrying the sparse matrix + +
+
+ +

+ +

+ +

+16.4.18 ESMC_FieldSMMStore - Precompute a Field regridding operation and return a RouteHandle +

+ +

+ +

+
+INTERFACE: +

 int ESMC_FieldSMMStore(
+     ESMC_Field srcField,                           // in
+     ESMC_Field dstField,                           // in
+     const char *filename,                          // in
+     ESMC_RouteHandle *routehandle,                 // out
+     enum ESMC_Logical *ignoreUnmatchedIndices,     // in
+     int *srcTermProcessing,                        // in
+     int *pipeLineDepth);                           // in
+
RETURN VALUE: +
     Return code; equals ESMF_SUCCESS if there are no errors.
+
+DESCRIPTION: +
+ +

+Creates a sparse matrix operation (stored in routehandle) that contains + the calculations and communications necessary to interpolate from srcField + to dstField. The routehandle can then be used in the call ESMC_FieldRegrid() + to interpolate between the Fields. + +

+The arguments are: +

+
srcField
+
ESMC_Field with source data. + +
+
dstField
+
ESMC_Field with destination data. + +
+
filename
+
Path to the file containing weights for creating an ESMC_RouteHandle. + Only "row", "col", and "S" variables are required. They + must be one-dimensionsal with dimension "n_s". + +
+
routehandle
+
The handle that implements the regrid, to be used in ESMC_FieldRegrid(). + +
+
[ignoreUnmatchedIndices]
+
A logical flag that affects the behavior for when sequence indices + in the sparse matrix are encountered that do not have a match on the + srcField or dstField side. The default setting is + .false., indicating that it is an error when such a situation is + encountered. Setting ignoreUnmatchedIndices to .true. ignores + entries with unmatched indices. + +
+
[srcTermProcessing]
+
The srcTermProcessing parameter controls how many source terms, + located on the same PET and summing into the same destination element, + are summed into partial sums on the source PET before being transferred + to the destination PET. A value of 0 indicates that the entire arithmetic + is done on the destination PET; source elements are neither multiplied + by their factors nor added into partial sums before being sent off by the + source PET. A value of 1 indicates that source elements are multiplied + by their factors on the source side before being sent to the destination + PET. Larger values of srcTermProcessing indicate the maximum number + of terms in the partial sums on the source side. + Note that partial sums may lead to bit-for-bit differences in the results. + See section [*] for an in-depth discussion of all + bit-for-bit reproducibility aspects related to route-based communication + methods. + The ESMC_FieldSMMStore() method implements an auto-tuning scheme + for the srcTermProcessing parameter. The intent on the + srcTermProcessing argument is "inout" in order to + support both overriding and accessing the auto-tuning parameter. + If an argument $>= 0$ is specified, it is used for the + srcTermProcessing parameter, and the auto-tuning phase is skipped. + In this case the srcTermProcessing argument is not modified on + return. If the provided argument is $< 0$, the srcTermProcessing + parameter is determined internally using the auto-tuning scheme. In this + case the srcTermProcessing argument is re-set to the internally + determined value on return. Auto-tuning is also used if the optional + srcTermProcessing argument is omitted. + +
+
[pipelineDepth]
+
The pipelineDepth parameter controls how many messages a PET + may have outstanding during a sparse matrix exchange. Larger values + of pipelineDepth typically lead to better performance. However, + on some systems too large a value may lead to performance degradation, + or runtime errors. + Note that the pipeline depth has no effect on the bit-for-bit + reproducibility of the results. However, it may affect the performance + reproducibility of the exchange. + The ESMC_FieldSMMStore() method implements an auto-tuning scheme + for the pipelineDepth parameter. The intent on the + pipelineDepth argument is "inout" in order to + support both overriding and accessing the auto-tuning parameter. + If an argument $>= 0$ is specified, it is used for the + pipelineDepth parameter, and the auto-tuning phase is skipped. + In this case the pipelineDepth argument is not modified on + return. If the provided argument is $< 0$, the pipelineDepth + parameter is determined internally using the auto-tuning scheme. In this + case the pipelineDepth argument is re-set to the internally + determined value on return. Auto-tuning is also used if the optional + pipelineDepth argument is omitted. + +
+
+ +

+ + +

+17 Array Class +

+ +

+17.1 Description +

+ +

+The Array class is an alternative to the Field class for representing +distributed, structured data. Unlike Fields, which are built to carry +grid coordinate information, Arrays can only carry information about the +indices associated with grid cells. Since they do not have coordinate +information, Arrays cannot be used to calculate interpolation weights. +However, if the user can supply interpolation weights, the Array sparse +matrix multiply operation can be used to apply the weights and transfer +data to the new grid. Arrays can also perform redistribution, scatter, +and gather communication operations. + +

+Like Fields, Arrays can be added to a State and used in inter-Component +data communications. + +

+From a technical standpoint, the ESMF Array class is an index space +based, distributed data storage class. It provides DE-local memory allocations +within DE-centric index regions and defines the relationship to the index +space described by the ESMF DistGrid. The Array class offers common +communication patterns within the index space formalism. + +

+17.2 Class API +

+ +

+ +

+ +

+ +

+17.2.1 ESMC_ArrayCreate - Create an Array +

+ +

+ +

+
+INTERFACE: +

 ESMC_Array ESMC_ArrayCreate(
+   ESMC_ArraySpec arrayspec,   // in
+   ESMC_DistGrid distgrid,     // in
+   const char* name,           // in
+   int *rc                     // out
+ );
+
RETURN VALUE: +
    Newly created ESMC_Array object.
+
+DESCRIPTION: +
+ +

+Create an ESMC_Array object. + +

+The arguments are: +

+
arrayspec
+
ESMC_ArraySpec object containing the type/kind/rank information. + +
+
distgrid
+
ESMC_DistGrid object that describes how the Array is decomposed and + distributed over DEs. The dimCount of distgrid must be smaller or equal + to the rank specified in arrayspec, otherwise a runtime ESMF error will be + raised. + +
+
[name]
+
The name for the Array object. If not specified, i.e. NULL, + a default unique name will be generated: "ArrayNNN" where NNN + is a unique sequence number from 001 to 999. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+17.2.2 ESMC_ArrayDestroy - Destroy an Array +

+ +

+ +

+
+INTERFACE: +

 int ESMC_ArrayDestroy(
+   ESMC_Array *array           // inout
+ );
+
RETURN VALUE: +
    Return code; equals ESMF_SUCCESS if there are no errors.
+
+DESCRIPTION: +
+ +

+Destroy an ESMC_Array object. + +

+The arguments are: +

+
array
+
ESMC_Array object to be destroyed. + +
+
+ +

+ +

+ +

+17.2.3 ESMC_ArrayGetName - Get the name of an Array +

+ +

+ +

+
+INTERFACE: +

 const char *ESMC_ArrayGetName(
+   ESMC_Array array,           // in
+   int *rc                     // out
+ );
+
RETURN VALUE: +
    Pointer to the Array name string.
+
+DESCRIPTION: +
+ +

+Get the name of the specified ESMC_Array object. + +

+The arguments are: +

+
array
+
ESMC_Array object to be queried. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+17.2.4 ESMC_ArrayGetPtr - Get pointer to Array data. +

+ +

+ +

+
+INTERFACE: +

 void *ESMC_ArrayGetPtr(
+   ESMC_Array array,           // in
+   int localDe,                // in
+   int *rc                     // out
+ );
+
RETURN VALUE: +
    Pointer to the Array data.
+
+DESCRIPTION: +
+ +

+Get pointer to the data of the specified ESMC_Array object. + +

+The arguments are: +

+
array
+
ESMC_Array object to be queried. + +
+
localDe
+
Local De for which to data pointer is queried. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+17.2.5 ESMC_ArrayPrint - Print an Array +

+ +

+ +

+
+INTERFACE: +

 int ESMC_ArrayPrint(
+   ESMC_Array array            // in
+ );
+
RETURN VALUE: +
    Return code; equals ESMF_SUCCESS if there are no errors.
+
+DESCRIPTION: +
+ +

+Print internal information of the specified ESMC_Array object. + +

+The arguments are: +

+
array
+
ESMC_Array object to be printed. + +
+
+ +

+ + +

+18 ArraySpec Class +

+ +

+18.1 Description +

+ +

+An ArraySpec is a very simple class that contains type, kind, and +rank information about an Array. This information is stored in two +parameters. TypeKind describes the data type of the elements +in the Array and their precision. Rank is the number of dimensions +in the Array. + +

+The only methods that are associated with the ArraySpec class are those +that allow you to set and retrieve this information. + +

+ +

+18.2 Class API +

+ +

+ +

+ +

+ +

+18.2.1 ESMC_ArraySpecGet - Get values from an ArraySpec +

+ +

+ +

+
+INTERFACE: +

 int ESMC_ArraySpecGet(
+   ESMC_ArraySpec arrayspec,         // in
+   int *rank,                        // out
+   enum ESMC_TypeKind_Flag *typekind // out
+ );
+
RETURN VALUE: +
    Return code; equals ESMF_SUCCESS if there are no errors.
+
+DESCRIPTION: +
+ +

+Returns information about the contents of an ESMC_ArraySpec. + +

+The arguments are: +

+
arrayspec
+
The ESMC_ArraySpec to query. + +
+
rank
+
Array rank (dimensionality - 1D, 2D, etc). Maximum allowed is 7D. + +
+
typekind
+
Array typekind. See section 34.18 for valid values. + +
+
+ +

+ +

+ +

+18.2.2 ESMC_ArraySpecSet - Set values for an ArraySpec +

+ +

+ +

+
+INTERFACE: +

 int ESMC_ArraySpecSet(
+   ESMC_ArraySpec *arrayspec,         // inout 
+   int rank,                          // in
+   enum ESMC_TypeKind_Flag typekind        // in
+ );
+
RETURN VALUE: +
    Return code; equals ESMF_SUCCESS if there are no errors.
+
+DESCRIPTION: +
+ +

+Set an Array specification - typekind, and rank. + +

+The arguments are: +

+
arrayspec
+
The ESMC_ArraySpec to set. + +
+
rank
+
Array rank (dimensionality - 1D, 2D, etc). Maximum allowed is 7D. + +
+
typekind
+
Array typekind. See section 34.18 for valid values. + +
+
+ +

+ + +

+19 Grid Class +

+ +

+19.1 Description +

+ +

+The ESMF Grid class is used to describe the geometry and discretization +of logically rectangular physical grids. It also contains the +description of the grid's underlying topology and the decomposition +of the physical grid across the available computational resources. +The most frequent use of the Grid class is to describe physical grids +in user code so that sufficient information is available to perform ESMF +methods such as regridding. + +

+

+ + + + + + + + + + + + + + + + + + + +
+
+Key Features
Representation of grids formed by logically rectangular regions, +including uniform and rectilinear grids (e.g. lat-lon grids), +curvilinear grids (e.g. displaced pole grids), and grids formed +by connected logically rectangular regions (e.g. cubed sphere grids).
Support for 1D, 2D, 3D, and higher dimension grids.
Distribution of grids across computational resources for parallel +operations - users set which grid dimensions are distributed.
Grids can be created already distributed, so that no single +resource needs global information during the creation process.
Options to define periodicity and other edge connectivities either +explicitly or implicitly via shape shortcuts.
Options for users to define grid coordinates themselves or call +prefabricated coordinate generation routines for standard grids +[NO GENERATION ROUTINES YET].
Options for incremental construction of grids.
Options for using a set of pre-defined stagger locations or for setting +custom stagger locations.
+
+ +

+ +

+19.1.1 Grid Representation in ESMF +

+ +

+ESMF Grids are based on the concepts described in A Standard +Description of Grids Used in Earth System Models [Balaji 2006]. In this document +Balaji introduces the mosaic concept as a means of describing +a wide variety of Earth system model grids. A mosaic is +composed of grid tiles connected at their edges. Mosaic grids +includes simple, single tile grids as a special case. + +

+The ESMF Grid class is a representation of a mosaic grid. Each ESMF +Grid is constructed of one or more logically rectangular Tiles. +A Tile will usually have some physical significance (e.g. the region +of the world covered by one face of a cubed sphere grid). + +

+The piece of a Tile that resides on one DE (for simple cases, a DE +can be thought of as a processor - see section on the DELayout) +is called a LocalTile. For example, the six faces of a cubed +sphere grid are each Tiles, and each Tile can be divided into many +LocalTiles. + +

+Every ESMF Grid contains a DistGrid object, which defines the Grid's +index space, topology, distribution, and connectivities. It enables +the user to define the complex edge relationships of tripole and other +grids. The DistGrid can be created explicitly and passed into a Grid +creation routine, or it can be created implicitly if the user takes +a Grid creation shortcut. The DistGrid used +in Grid creation describes the properties of the Grid cells. In addition +to this one, the Grid internally creates DistGrids for each stagger location. +These stagger DistGrids are related to the original DistGrid, but may +contain extra padding to represent the extent of the index space of +the stagger. These DistGrids are what are used when a Field is created +on a Grid. + +

+ +

+19.1.2 Supported Grids +

+ +

+The range of supported grids in ESMF can be defined by: + +

    +
  • Types of topologies and shapes supported. ESMF supports one or +more logically rectangular grid Tiles with connectivities specified +between cells. For more details see section 19.1.3. +
  • +
  • Types of distributions supported. ESMF supports regular, +irregular, or arbitrary distributions of data. +For more details see section 19.1.4. +
  • +
  • Types of coordinates supported. ESMF supports uniform, rectilinear, +and curvilinear coordinates. For more details see section 19.1.5. +
  • +
+ +

+ +

+ +
+19.1.3 Grid Topologies and Periodicity +

+ +ESMF has shortcuts for the creation of standard Grid topologies +or shapes up to 3D. In many cases, these enable the user to +bypass the step of creating a DistGrid before creating the Grid. +There are two sets of methods which allow the user to do this. These two sets of methods cover the same set of topologies, but +allow the user to specify them in different ways. + +

+The first set of these are a group of overloaded +calls broken up by the number of periodic dimensions they specify. With these the user can pick +the method which creates a Grid with the number of periodic dimensions they need, and then specify other connectivity +options via arguments to the method. The following is a description of these methods: + +

+ +

+
+ +

+

+
ESMF_GridCreateNoPeriDim()
+
Allows the user to create a Grid with no edge connections, for example, a regional Grid with closed boundaries. + +

+

+
ESMF_GridCreate1PeriDim()
+
Allows the user to create a Grid with 1 periodic dimension and supports a range of options for what to do at the pole (see Section 19.2.4. Some examples of Grids which can be created here are tripole spheres, bipole spheres, cylinders with open poles. + +

+

+
ESMF_GridCreate2PeriDim()
+
Allows the user to create a Grid with 2 periodic dimensions, for example a torus, or a regional Grid with +doubly periodic boundaries. +
+
+ +

+More detailed information can be found in the API description of each. + +

+ +

+
+ +

+The second set of shortcut methods is a set of methods overloaded under the name ESMF_GridCreate(). These methods +allow the user to specify the connectivites at the end of each dimension, by using the ESMF_GridConn_Flag flag. The table below shows the ESMF_GridConn_Flag settings used to create +standard shapes in 2D using the ESMF_GridCreate() call. Two values +are specified for each dimension, one for the low end and one for +the high end of the dimension's index values. + +

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
2D ShapeconnflagDim1(1)connflagDim1(2)connflagDim2(1)connflagDim2(2)
RectangleNONENONENONENONE
Bipole SpherePOLEPOLEPERIODICPERIODIC
Tripole SpherePOLEBIPOLEPERIODICPERIODIC
CylinderNONENONEPERIODICPERIODIC
TorusPERIODICPERIODICPERIODICPERIODIC
+ +

+
+ +

+If the user's grid shape is too complex for an ESMF shortcut routine, +or involves more than three dimensions, a DistGrid can be created +to specify the shape in detail. This DistGrid is then passed +into a Grid create call. + +

+ +

+ +
+19.1.4 Grid Distribution +

+ +

+ESMF Grids have several options for data distribution (also referred to +as decomposition). As ESMF Grids are cell based, these +options are all specified in terms of how the cells in the Grid +are broken up between DEs. + +

+The main distribution options are regular, irregular, and arbitrary. +A regular distribution is one in which the same number of +contiguous grid cells are assigned to each DE in the +distributed dimension. An irregular distribution is one in which +unequal numbers of contiguous grid cells are assigned to each +DE in the distributed dimension. An arbitrary distribution is +one in which any grid cell can be assigned to any DE. Any of these +distribution options can be applied to any of the grid shapes (i.e., +rectangle) or types (i.e., rectilinear). Support for arbitrary distribution +is limited in the current version of ESMF. + +

+Figure 7 illustrates options for distribution. + +

+ + + +
Figure 7: +Examples of regular and irregular decomposition of +a grid a that is 6x6, and an arbitrary decomposition of +a grid b that is 6x3.
+\scalebox{0.9}{\includegraphics{GridDecomps}}
+
+ +

+A distribution can also be specified using the DistGrid, by passing +object into a Grid create call. + +

+ +

+ +
+19.1.5 Grid Coordinates +

+Grid Tiles can have uniform, rectilinear, or curvilinear +coordinates. The coordinates of uniform grids are equally spaced along +their axes, and can be fully specified by the coordinates of the two opposing points +that define the grid's physical span. The coordinates of rectilinear grids +are unequally spaced along their axes, and can be fully specified by giving +the spacing of grid points along each axis. The coordinates of curvilinear +grids must be specified by giving the explicit set of coordinates for each +grid point. Curvilinear grids are often uniform or rectilinear grids that +have been warped; for example, to place a pole over a land mass so that it +does not affect the computations performed on an ocean model grid. Figure +8 shows examples of each type of grid. + +

+ +

+ + + +
Figure 8: +Types of logically rectangular grid tiles. Red circles show the +values needed to specify grid coordinates for each type.
+\scalebox{0.9}{\includegraphics{LogRectGrids}}
+
+ +

+Each of these coordinate types can be set for each of the standard grid shapes +described in section 19.1.3. + +

+The table below shows how examples of common single Tile grids fall +into this shape and coordinate taxonomy. Note that any +of the grids in the table can have a regular or arbitrary distribution. + +

+ +

+
+ + + + + + + + + + + + + + + + +
 UniformRectilinearCurvilinear
SphereGlobal uniform lat-lon gridGaussian gridDisplaced pole grid
RectangleRegional uniform lat-lon gridGaussian grid sectionPolar stereographic grid section
+ +

+ +

+19.1.6 Coordinate Specification and Generation +

+ +

+There are two ways of specifying coordinates in ESMF. The +first way is for the user to set the coordinates. The second +way is to take a shortcut and have the framework generate +the coordinates. + +

+No ESMF generation routines are currently available. + +

+ +

+19.1.7 Staggering +

+ +

+Staggering is a finite difference technique in which the values +of different physical quantities are placed at different locations +within a grid cell. + +

+The ESMF Grid class supports a variety of stagger locations, including +cell centers, corners, and edge centers. The default stagger location in +ESMF is the cell center, and cell counts in Grid are based on this assumption. +Combinations of the 2D ESMF stagger locations are sufficient to specify any of the +Arakawa staggers. ESMF also supports staggering in 3D and higher dimensions. +There are shortcuts for standard staggers, and interfaces through which users +can create custom staggers. + +

+As a default the ESMF Grid class provides symmetric staggering, so +that cell centers are enclosed by cell perimeter (e.g. corner) +stagger locations. This means the coordinate arrays for stagger +locations other than the center will have an additional element of +padding in order to enclose the cell center locations. +However, to achieve other types of staggering, the user may alter +or eliminate this padding by using the appropriate options when adding +coordinates to a Grid. + +

+ +

+ +
+19.1.8 Masking +

+ +

+Masking is the process whereby parts of a grid can be marked to be +ignored during an operation, such as regridding. Masking can be +used on a source grid to indicate that certain portions of the grid +should not be used to generate regridded data. This is useful, for +example, if a portion of the source grid contains unusable values. +Masking can also be used on a destination grid to indicate that the +portion of the field built on that part of the Grid should not +receive regridded data. This is useful, for example, when part of +the grid isn't being used (e.g. the land portion of an ocean grid). + +

+ESMF regrid currently supports masking for Fields built on +structured Grids and element masking for Fields built on +unstructured Meshes. The user may mask out points in the source +Field or destination Field or both. To do masking the user sets +mask information in the Grid +or Mesh +upon which the Fields passed into the +ESMC_FieldRegridStore() call are built. The srcMaskValues +and dstMaskValues arguments to that +call can then be used to specify which values in that mask +information indicate that a location should be masked out. For +example, if dstMaskValues is set to (/1,2/), then any location that +has a value of 1 or 2 in the mask information of the Grid or Mesh +upon which the destination Field is built will be masked out. + +

+Masking behavior differs slightly between regridding methods. For +non-conservative regridding methods (e.g. bilinear or high-order +patch), masking is done on points. For these methods, masking a +destination point means that that point won't participate in +regridding (e.g. won't be interpolated to). For these methods, +masking a source point means that the entire source cell using +that point is masked out. In other words, if any corner point +making up a source cell is masked then the cell is masked. For +conservative regridding methods (e.g. first-order conservative) +masking is done on cells. Masking a destination cell means that +the cell won't participate in regridding (e.g. won't be +interpolated to). Similarly, masking a source cell means that the +cell won't participate in regridding (e.g. won't be interpolated +from). For any type of interpolation method (conservative or +non-conservative) the masking is set on the location upon +which the Fields passed into the regridding call are built. +For example, if Fields built on ESMC_STAGGERLOC_CENTER are +passed into the ESMC_FieldRegridStore() call then the masking +should also be set on ESMC_STAGGERLOC_CENTER. + +

+19.2 Constants +

+ +

+ +

+ +
+19.2.1 ESMC_COORDSYS +

+ +

+DESCRIPTION: +
+ A set of values which indicates in which system the coordinates in the Grid are. This value is useful both to indicate to +other users the type of the coordinates, but also to control how the coordinates are interpreted in regridding methods +(e.g. ESMC_FieldRegridStore()). + +

+The type of this flag is: + +

+type(ESMC_CoordSys_Flag) + +

+The valid values are: +

+
ESMC_COORDSYS_CART
+
Cartesian coordinate system. In this system, the cartesian coordinates are mapped to the Grid coordinate dimensions in the following order: x,y,z. (E.g. using coordDim=2 in ESMC_GridGetCoord() references the y dimension) + +

+

+
ESMC_COORDSYS_SPH_DEG
+
Spherical coordinates in degrees. In this system, the spherical coordinates are mapped to the Grid coordinate dimensions in the following order: longitude, latitude, radius. (E.g. using coordDim=2 in ESMC_GridGetCoord() references the latitude dimension) Note, however, that ESMC_FieldRegridStore() currently just supports longitude and latitude (i.e. with this system, only Grids of dimension 2 are supported in the regridding). + +

+

+
ESMC_COORDSYS_SPH_RAD
+
Spherical coordinates in radians. In this system, the spherical coordinates are mapped to the Grid coordinate dimensions in the following order: longitude, latitude, radius. (E.g. using coordDim=2 in ESMC_GridGetCoord() references the latitude dimension) Note, however, that ESMC_FieldRegridStore() currently just supports longitude and latitude (i.e. with this system, only Grids of dimension 2 are supported in the regridding). + +

+

+
+ +

+ +

+ +
+19.2.2 ESMC_GRIDITEM +

+ +

+DESCRIPTION: +
+The ESMC Grid can contain other kinds of data besides coordinates. +This data is referred to as Grid “items”. Some items may be used +by ESMC for calculations involving the Grid. The following +are the valid values of ESMC_GridItem_Flag. + +

+The type of this flag is: + +

+type(ESMC_GridItem_Flag) + +

+The valid values are: +
+ + + + + + + + + + + + + + + + + + + +
Item LabelType RestrictionType DefaultESMC UsesControls
ESMC_GRIDITEM_MASKESMC_TYPEKIND_I4ESMC_TYPEKIND_I4YESMasking in Regrid
ESMC_GRIDITEM_AREANONEESMC_TYPEKIND_R8YESConservation in Regrid
+ +

+ +

+ +
+19.2.3 ESMC_GRIDSTATUS +

+ +

+DESCRIPTION: +
+The ESMC Grid class can exist in two states. These states are +present so that the library code can detect if a Grid has been +appropriately setup for the task at hand. The following +are the valid values of ESMC_GRIDSTATUS. + +

+The type of this flag is: + +

+type(ESMC_GridStatus_Flag) + +

+The valid values are: +

+
ESMC_GRIDSTATUS_EMPTY:
+
Status after a Grid has been created with + ESMC_GridEmptyCreate. A Grid object container is allocated but + space for internal objects is not. Topology information and coordinate + information is incomplete. This object can be used in ESMC_GridEmptyComplete() + methods in which additional information is added to the Grid. +
+
ESMC_GRIDSTATUS_COMPLETE:
+
The Grid has a specific topology and + distribution, but incomplete coordinate arrays. The Grid can be used + as the basis for allocating a Field, and coordinates can be added + via ESMC_GridCoordAdd() to allow other functionality. +
+
+ +

+ +

+ +
+19.2.4 ESMC_POLEKIND +

+ +

+DESCRIPTION: +
+This type describes the type of connection that occurs at the pole when a Grid is +created with ESMC_GridCreate1PeriodicDim(). + +

+The type of this flag is: + +

+type(ESMC_PoleKind_Flag) + +

+The valid values are: +

+
ESMC_POLEKIND_NONE
+
No connection at pole. + +

+

+
ESMC_POLEKIND_MONOPOLE
+
This edge is connected to itself. Given +that the edge is n elements long, then element i is connected to +element i+n/2. + +

+

+
ESMC_POLEKIND_BIPOLE
+
This edge is connected to itself. Given +that the edge is n elements long, element i is connected to element n-i+1. +
+
+ +

+ +

+ +
+19.2.5 ESMC_STAGGERLOC +

+ +

+DESCRIPTION: +
+ In the ESMC Grid class, data can be located at different positions in a + Grid cell. When setting or retrieving coordinate data the stagger location is + specified to tell the Grid method from where in the cell to get the data. + Although the user may define their own custom stagger locations, + ESMC provides a set of predefined locations for ease of use. The +following are the valid predefined stagger locations. + +

+ +

+
+ +

+

+
+
+ + + +
Figure 9: +2D Predefined Stagger Locations
+\scalebox{0.75}{\includegraphics{GridStaggerLoc2D}}
+
+
+
+ +

+The 2D predefined stagger locations (illustrated in figure 9) are: +

+
ESMC_STAGGERLOC_CENTER:
+
The center of the cell. +
+
ESMC_STAGGERLOC_CORNER:
+
The corners of the cell. +
+
ESMC_STAGGERLOC_EDGE1:
+
The edges offset from the center in the 1st dimension. +
+
ESMC_STAGGERLOC_EDGE2:
+
The edges offset from the center in the 2nd dimension. +
+
+ +

+ +

+
+ +

+

+
+
+ + + +
Figure 10: +3D Predefined Stagger Locations
+\scalebox{1.0}{\includegraphics{GridStaggerLoc3D}}
+
+
+
+ +

+The 3D predefined stagger locations (illustrated in figure 10) are: +

+
ESMC_STAGGERLOC_CENTER_VCENTER:
+
The center of the 3D cell. +
+
ESMC_STAGGERLOC_CORNER_VCENTER:
+
Half way up the vertical edges of the cell. +
+
ESMC_STAGGERLOC_EDGE1_VCENTER:
+
The center of the face bounded by edge 1 and the vertical dimension. +
+
ESMC_STAGGERLOC_EDGE2_VCENTER:
+
The center of the face bounded by edge 2 and the vertical dimension. +
+
ESMC_STAGGERLOC_CORNER_VFACE:
+
The corners of the 3D cell. +
+
ESMC_STAGGERLOC_EDGE1_VFACE:
+
The center of the edges of the 3D cell parallel offset from the center in the 1st dimension. +
+
ESMC_STAGGERLOC_EDGE2_VFACE:
+
The center of the edges of the 3D cell parallel offset from the center in the 2nd dimension. +
+
ESMC_STAGGERLOC_CENTER_VFACE:
+
The center of the top and bottom face. The face bounded by the 1st and 2nd dimensions. +
+
+ +

+ +

+ +
+19.2.6 ESMC_FILEFORMAT +

+ +

+DESCRIPTION: +
+This option is used by ESMC_GridCreateFromFile to specify the type of the input grid file. + +

+The type of this flag is: + +

+type(ESMC_FileFormat_Flag) + +

+The valid values are: +

+
ESMC_FILEFORMAT_SCRIP
+
SCRIP format grid file. The SCRIP format is the format accepted by the SCRIP regridding tool [1]. For Grid creation, files of this type only work when the grid_rank in the file is equal to 2. + +

+

+
ESMC_FILEFORMAT_GRIDSPEC
+
a single tile grid file comforming with the proposed CF-GRIDSPEC conventions. +
+
+ +

+19.3 Restrictions and Future Work +

+ +

+ +

    +
  • Grids with factorized coordinates can only be redisted when they are 2D. +Using the ESMF_GridCreate() interface that allows the user to create a copy of an existing Grid with a new distribution will give incorrect results when used on a Grid with 3 or more dimensions and whose coordinate arrays are less than the full dimension of the Grid (i.e. it contains factorized coordinates). + +

    +

  • +
  • 7D limit. Only grids up to 7D will be supported. + +

    +

  • +
  • Future adaptation. Currently Grids +are created and then remain unchanged. In the future, it would +be useful to provide support for the various forms of grid +adaptation. This would allow the grids to dynamically change +their resolution to more closely match what is needed at a particular +time and position during a computation for front tracking or adaptive meshes. + +

    +

  • +
  • Future Grid generation. This class for now only contains +the basic functionality for operating on the grid. In the future +methods will be added to enable the automatic generation of various types of +grids. + +

    +

  • +
+ +

+19.4 Design and Implementation Notes +

+ +

+ +

+19.4.1 Grid Topology +

+ +

+The ESMF_Grid class depends upon the ESMF_DistGrid class +for the specification of its topology. That is, when +creating a Grid, first an ESMF_DistGrid is created to describe the +appropriate index space topology. This decision was +made because it seemed redundant to have a system for doing this +in both classes. It also seems most appropriate for +the machinary for topology creation to be located at the lowest +level possible so that it can be used by other +classes (e.g. the ESMF_Array class). Because of this, however, +the authors recommend that as a natural part of the +implementation of subroutines to generate standard grid shapes +(e.g. ESMF_GridGenSphere) a set of standard +topology generation subroutines be implemented (e.g. ESMF_DistGridGenSphere) for users who want to create a standard topology, but a custom geometry. + +

+ +

+19.5 Class API: General Grid Methods +

+ +

+ +

+ +

+ +

+19.5.1 ESMC_GridCreateNoPeriDim - Create a Grid with no periodic dimensions +

+ +

+ +

+
+INTERFACE: +

 ESMC_Grid ESMC_GridCreateNoPeriDim(
+   ESMC_InterArrayInt *maxIndex,           // in
+   enum ESMC_CoordSys_Flag *coordSys,      // in
+   enum ESMC_TypeKind_Flag *coordTypeKind, // in
+   enum ESMC_IndexFlag *indexflag,         // in
+   int *rc                                 // out
+ );
+
RETURN VALUE: +
    type(ESMC_Grid)
+
+DESCRIPTION: +
+ +

+This call creates an ESMC_Grid with no periodic dimensions. + +

+The arguments are: +

+
maxIndex
+
The upper extent of the grid array. + +
+
coordSys
+
The coordinated system of the grid coordinate data. If not specified then + defaults to ESMF_COORDSYS_SPH_DEG. + +
+
coordTypeKind
+
The type/kind of the grid coordinate data. If not specified then the + type/kind will be 8 byte reals. + +
+
indexflag
+
Indicates the indexing scheme to be used in the new Grid. If not present, + defaults to ESMC_INDEX_DELOCAL. + +
+
rc
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+19.5.2 ESMC_GridCreate1PeriDim - Create a Grid with 1 periodic dimension +

+ +

+ +

+
+INTERFACE: +

 ESMC_Grid ESMC_GridCreate1PeriDim(
+   ESMC_InterArrayInt *maxIndex,           // in
+   ESMC_InterArrayInt *polekindflag,       // in
+   int *periodicDim,                       // in
+   int *poleDim,                           // in
+   enum ESMC_CoordSys_Flag *coordSys,      // in
+   enum ESMC_TypeKind_Flag *coordTypeKind, // in
+   enum ESMC_IndexFlag *indexflag,         // in
+   int *rc                                 // out
+ );
+
RETURN VALUE: +
    type(ESMC_Grid)
+
+DESCRIPTION: +
+ +

+This call creates an ESMC_Grid with 1 periodic dimension. + +

+The arguments are: +

+
maxIndex
+
The upper extent of the grid array. + +
+
polekindflag
+
Two item array which specifies the type of connection which occurs at the + pole. polekindflag(1) the connection that occurs at the minimum end of the + index dimension. polekindflag(2) the connection that occurs at the maximum + end of the index dimension. If not specified, the default is + ESMF_POLETYPE_MONOPOLE for both. + +
+
periodicDim
+
The periodic dimension. If not specified, defaults to 1. + +
+
poleDim
+
The dimension at which the poles are located at the ends. If not + specified, defaults to 2. + +
+
coordSys
+
The coordinated system of the grid coordinate data. If not specified then + defaults to ESMF_COORDSYS_SPH_DEG. + +
+
coordTypeKind
+
The type/kind of the grid coordinate data. If not specified then the + type/kind will be 8 byte reals. + +
+
indexflag
+
Indicates the indexing scheme to be used in the new Grid. If not present, + defaults to ESMC_INDEX_DELOCAL. + +
+
rc
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+19.5.3 ESMC_GridCreateCubedSphere - Create a cubed sphere Grid +

+ +

+ +

+
+INTERFACE: +

 ESMC_Grid ESMC_GridCreateCubedSphere(
+   int *tilesize,                      // in
+   ESMC_InterArrayInt *regDecompPTile, // in
+   //ESMC_InterArrayInt *decompFlagPTile,  // in
+   //ESMC_InterArrayInt *deLabelList,    // in
+   //ESMC_DELayout *delayout,            // in
+   ESMC_InterArrayInt *staggerLocList,   // in
+   const char *name,                   // in
+   int *rc);                           // out
+
RETURN VALUE: +
    type(ESMC_Grid)
+
+DESCRIPTION: +
+ +

+Create a six-tile ESMC_Grid for a cubed sphere grid using regular + decomposition. Each tile can have different decomposition. The grid + coordinates are generated based on the algorithm used by GEOS-5. The tile + resolution is defined by tileSize. + +

+The arguments are: +

+
tilesize
+
The number of elements on each side of the tile of the cubed sphere grid. + +
+
regDecompPTile
+
List of DE counts for each dimension. The second index steps through + the tiles. The total deCount is determined as the sum over + the products of regDecompPTile elements for each tile. + By default every tile is decomposed in the same way. If the total + PET count is less than 6, one tile will be assigned to one DE and the DEs + will be assigned to PETs sequentially, therefore, some PETs may have + more than one DE. If the total PET count is greater than 6, the total + number of DEs will be a multiple of 6 and less than or equal to the total + PET count. For instance, if the total PET count is 16, the total DE count + will be 12 with each tile decomposed into 1x2 blocks. The 12 DEs are mapped + to the first 12 PETs and the remaining 4 PETs have no DEs locally, unless + an optional delayout is provided. + +
+
staggerLocList
+
The list of stagger locations to fill with coordinates. Only ESMF_STAGGERLOC_CENTER and + ESMF_STAGGERLOC_CORNER are supported. If not present, no coordinates will be added or filled. + +
+
name
+
The name of the ESMC_Grid. + +
+
rc
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+19.5.4 ESMC_GridCreateFromFile - Create a Grid from a NetCDF file specification. +

+ +

+ +

+
+INTERFACE: +

 ESMC_Grid ESMC_GridCreateFromFile(const char *filename, int fileTypeFlag, 
+                   int *regDecomp, int *decompflag,
+                   int *isSphere, ESMC_InterArrayInt *polekindflag,
+                   int *addCornerStagger,
+                   int *addUserArea, enum ESMC_IndexFlag *indexflag,
+                   int *addMask, const char *varname,
+                   const char **coordNames, int *rc);
+
RETURN VALUE: +
    type(ESMC_Grid)
+
+DESCRIPTION: +
+ +

+This function creates a ESMC_Grid object from the specification in + a NetCDF file. + +

+The arguments are: +

+
filename
+
The NetCDF Grid filename. + +
+
fileTypeFlag
+
The Grid file format, please see Section 19.2.6 + for a list of valid options. + +
+
regDecomp
+
A 2 element array specifying how the grid is decomposed. + Each entry is the number of decounts for that dimension. + The total decounts cannot exceed the total number of PETs. In other + word, at most one DE is allowed per processor. + If not specified, the default decomposition will be petCountx1. + +
+
[decompflag]
+
List of decomposition flags indicating how each dimension of the + tile is to be divided between the DEs. The default setting + is ESMF_DECOMP_BALANCED in all dimensions. Please see + Section 34.3 for a full description of the + possible options. + +
+
[isSphere]
+
Set to 1 for a spherical grid, or 0 for regional. Defaults to 1. + +
+
polekindflag
+
Two item array which specifies the type of connection which occurs at the + pole. polekindflag(1) the connection that occurs at the minimum end of the + index dimension. polekindflag(2) the connection that occurs at the maximum + end of the index dimension. If not specified, the default is + ESMF_POLETYPE_MONOPOLE for both. + +
+
[addCornerStagger]
+
Set to 1 to use the information in the grid file to add the Corner stagger to + the Grid. The coordinates for the corner stagger are required for conservative + regridding. If not specified, defaults to 0. + +
+
[addUserArea]
+
Set to 1 to read in the cell area from the Grid file; otherwise, ESMF will + calculate it. This feature is only supported when the grid file is in the SCRIP + format. + +
+
indexflag
+
Indicates the indexing scheme to be used in the new Grid. If not present, + defaults to ESMC_INDEX_DELOCAL. + +
+
[addMask]
+
Set to 1 to generate the mask using the missing_value attribute defined in 'varname'. + This flag is only needed when the grid file is in the GRIDSPEC format. + +
+
[varname]
+
If addMask is non-zero, provide a variable name stored in the grid file and + the mask will be generated using the missing value of the data value of + this variable. The first two dimensions of the variable has to be the + longitude and the latitude dimension and the mask is derived from the + first 2D values of this variable even if this data is 3D, or 4D array. + +
+
[coordNames]
+
A two-element array containing the longitude and latitude variable names in a + GRIDSPEC file if there are multiple coordinates defined in the file. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+19.5.5 ESMC_GridDestroy - Destroy a Grid +

+ +

+ +

+
+INTERFACE: +

 int ESMC_GridDestroy(
+   ESMC_Grid *grid             // in
+ );
+
RETURN VALUE: +
    Return code; equals ESMF_SUCCESS if there are no errors.
+
+DESCRIPTION: +
+ +

+Destroy the Grid. + +

+The arguments are: +

+
grid
+
Grid object whose memory is to be freed. + +
+
+ +

+ +

+ +

+19.5.6 ESMC_GridAddItem - Add items to a Grid +

+ +

+ +

+
+INTERFACE: +

 int ESMC_GridAddItem(
+   ESMC_Grid grid,                   // in
+   enum ESMC_GridItem_Flag itemflag, // in
+   enum ESMC_StaggerLoc staggerloc   // in
+ );
+
RETURN VALUE: +
    Return code; equals ESMF_SUCCESS if there are no errors.
+
+DESCRIPTION: +
+ +

+Add an item (e.g. a mask) to the Grid. + +

+The arguments are: +

+
grid
+
Grid object to which the coordinates will be added + +
+
itemflag
+
The grid item to add. + +
+
staggerloc
+
The stagger location to add. + +
+
+ +

+ +

+ +

+19.5.7 ESMC_GridGetItem - Get item from a Grid +

+ +

+ +

+
+INTERFACE: +

 void * ESMC_GridGetItem(
+   ESMC_Grid grid,                         // in
+   enum ESMC_GridItem_Flag itemflag,       // in
+   enum ESMC_StaggerLoc staggerloc,        // in
+   int *localDE,                           // in
+   int *rc                                 // out
+ );
+
RETURN VALUE: +
    A pointer to the item data.
+
+DESCRIPTION: +
+ +

+Get a pointer to item data (e.g. mask data) in the Grid. + +

+The arguments are: +

+
grid
+
Grid object from which to obtain the coordinates. + +
+
itemflag
+
The grid item to add. + +
+
staggerloc
+
The stagger location to add. + +
+
localDE
+
The local decompositional element. If not present, defaults to 0. + +
+
rc
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+19.5.8 ESMC_GridAddCoord - Add coordinates to a Grid +

+ +

+ +

+
+INTERFACE: +

 int ESMC_GridAddCoord(
+   ESMC_Grid grid,                   // in
+   enum ESMC_StaggerLoc staggerloc   // in
+ );
+
RETURN VALUE: +
    Return code; equals ESMF_SUCCESS if there are no errors.
+
+DESCRIPTION: +
+ +

+Add coordinates to the Grid. + +

+The arguments are: +

+
grid
+
Grid object to which the coordinates will be added + +
+
staggerloc
+
The stagger location to add. + +
+
+ +

+ +

+ +

+19.5.9 ESMC_GridGetCoord - Get coordinates from a Grid +

+ +

+ +

+
+INTERFACE: +

 void * ESMC_GridGetCoord(
+   ESMC_Grid grid,                         // in
+   int coordDim,                           // in
+   enum ESMC_StaggerLoc staggerloc,        // in
+   int *localDE,
+   int *exclusiveLBound,                   // out
+   int *exclusiveUBound,                   // out
+   int *rc                                 // out
+ );
+
RETURN VALUE: +
    A pointer to coordinate data in the Grid.
+
+DESCRIPTION: +
+ +

+Get a pointer to coordinate data in the Grid. + +

+The arguments are: +

+
grid
+
Grid object from which to obtain the coordinates. + +
+
coordDim
+
The coordinate dimension from which to get the data. + +
+
staggerloc
+
The stagger location to add. + +
+
localDE
+
The local decompositional element. If not present, defaults to 0. + +
+
exclusiveLBound
+
Upon return this holds the lower bounds of the exclusive region. This bound + must be allocated to be of size equal to the coord dimCount. + +
+
exclusiveUBound
+
Upon return this holds the upper bounds of the exclusive region. This bound + must be allocated to be of size equal to the coord dimCount. + +
+
rc
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+19.5.10 ESMC_GridGetCoordBounds - Get coordinate bounds from a Grid +

+ +

+ +

+
+INTERFACE: +

 int ESMC_GridGetCoordBounds(
+   ESMC_Grid grid,                         // in
+   enum ESMC_StaggerLoc staggerloc,        // in
+   int *localDE,                           // in
+   int *exclusiveLBound,                   // out
+   int *exclusiveUBound,                   // out
+   int *rc                                 // out
+ );
+
RETURN VALUE: +
    Return code; equals ESMF_SUCCESS if there are no errors.
+
+DESCRIPTION: +
+ +

+Get coordinates bounds from the Grid. + +

+The arguments are: +

+
grid
+
Grid object from which to obtain the coordinates. + +
+
staggerloc
+
The stagger location to add. + +
+
localDE
+
The local decompositional element. If not present, defaults to 0. + +
+
exclusiveLBound
+
Upon return this holds the lower bounds of the exclusive region. This bound + must be allocated to be of size equal to the coord dimCount. + +
+
exclusiveUBound
+
Upon return this holds the upper bounds of the exclusive region. This bound + must be allocated to be of size equal to the coord dimCount. + +
+
rc
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ + +

+20 Mesh Class +

+ +

+20.1 Description +

+ +

+Unstructured grids are commonly used in the computational solution of Partial Differential equations. These are especially useful for problems that involve complex geometry, where using the less flexible structured grids can +result in grid representation of regions where no computation is needed. Finite +element and finite volume methods map naturally to unstructured grids and are used commonly +in hydrology, ocean modeling, and many other applications. + +

+In order to provide support for application codes using unstructured grids, the ESMF library provides a class for representing +unstructured grids called the Mesh. Fields can be created on a Mesh to hold data. In Fortran, Fields created on a Mesh can also be used +as either the source or destination or both of an interpolation (i.e. an ESMF_FieldRegridStore() call). This capability is currently +not supported with the C interface, however, if the C Field is passed via a State to a component written in Fortran then the regridding +can be performed there. The rest of this section describes the Mesh class and how to create and use them in ESMF. + +

+ +

+20.1.1 Mesh Representation in ESMF +

+ +

+A Mesh in ESMF is described in terms of nodes and elements. A node is a point in space which represents where the coordinate +information in a Mesh is located. An element is a higher dimensional shape constructed of nodes. Elements give a Mesh its shape and define the relationship of the nodes to one another. Field data may be located on a Mesh's nodes. + +

+ +

+20.1.2 Supported Meshes +

+ +

+The range of Meshes supported by ESMF are defined by several factors: dimension, element types, and distribution. + +

+ESMF currently only supports Meshes whose number of coordinate dimensions (spatial dimension) is 2 or 3. The dimension of the elements in a Mesh +(parametric dimension) must be less than or equal to the spatial dimension, but also must be either 2 or 3. This means that an ESMF mesh may be +either 2D elements in 2D space, 3D elements in 3D space, or a manifold constructed of 2D elements embedded in 3D space. + +

+ESMF currently supports two types of elements for each Mesh parametric dimension. For a parametric dimension of 2 the +supported element types are triangles or quadrilaterals. For a parametric dimension of 3 the supported element types are tetrahedrons +and hexahedrons. See Section 20.2.1 for diagrams of these. The Mesh supports any combination of element types within a particular +dimension, but types from different dimensions may not be mixed, for example, a Mesh cannot be constructed of both quadrilaterals and tetrahedra. + +

+ESMF currently only supports distributions where every node on a PET must be a part of an element on that PET. In other words, there +must not be nodes without an element on a PET. + +

+20.2 Constants +

+ +

+ +

+ +
+20.2.1 ESMC_MESHELEMTYPE +

+ +

+DESCRIPTION: +
+ An ESMF Mesh can be constructed from a combination of different elements. The type of elements that can +be used in a Mesh depends on the Mesh's parametric dimension, which is set during Mesh creation. The +following are the valid Mesh element types for each valid Mesh parametric dimension (2D or 3D) . + +

+ +

+
+ +

+

+                     3                          4 ---------- 3
+                    / \                         |            |  
+                   /   \                        |            |
+                  /     \                       |            |
+                 /       \                      |            |
+                /         \                     |            |
+               1 --------- 2                    1 ---------- 2
+
+           ESMC_MESHELEMTYPE_TRI            ESMC_MESHELEMTYPE_QUAD
+
+2D element types (numbers are the order for elementConn during 
+                  Mesh create)
+
+ +

+For a Mesh with parametric dimension of 2 the valid element types (illustrated above) are: + +

+ +

+ +

+ + + + + + + + + + + + + +
Element TypeNumber of NodesDescription
ESMC_MESHELEMTYPE_TRI3A triangle
ESMC_MESHELEMTYPE_QUAD4A quadrilateral (e.g. a rectangle)
+ +

+ +

+
+ +

+
+ +

+

+                                            
+                 3                               8---------------7
+                /|\                             /|              /|
+               / | \                           / |             / |
+              /  |  \                         /  |            /  |
+             /   |   \                       /   |           /   |
+            /    |    \                     5---------------6    |
+           4-----|-----2                    |    |          |    |
+            \    |    /                     |    4----------|----3
+             \   |   /                      |   /           |   /
+              \  |  /                       |  /            |  /
+               \ | /                        | /             | /
+                \|/                         |/              |/
+                 1                          1---------------2
+
+       ESMC_MESHELEMTYPE_TETRA             ESMC_MESHELEMTYPE_HEX  
+
+3D element types (numbers are the order for elementConn during 
+                  Mesh create)
+
+ +

+For a Mesh with parametric dimension of 3 the valid element types (illustrated above) are: + +

+ +

+ +

+ + + + + + + + + + + + + +
Element TypeNumber of NodesDescription
ESMC_MESHELEMTYPE_TETRA4A tetrahedron (CAN'T BE USED IN REGRID)
ESMC_MESHELEMTYPE_HEX8A hexahedron (e.g. a cube)
+ +

+ +

+ +
+20.2.2 ESMF_FILEFORMAT +

+ +

+DESCRIPTION: +
+This option is used by ESMF_MeshCreate to specify the type of the input grid file. + +

+The type of this flag is: + +

+type(ESMF_FileFormat_Flag) + +

+The valid values are: +

+
ESMF_FILEFORMAT_SCRIP
+
SCRIP format grid file. The SCRIP format is the format accepted by the SCRIP regridding tool [1]. For Mesh creation, files of this type only work when the grid_rank in the file is equal to 1. + +

+

+
ESMF_FILEFORMAT_ESMFMESH
+
ESMF unstructured grid file format. This format was developed by the ESMF team to match the capabilities of the Mesh class and to be efficient to convert to that class. + +

+

+
ESMF_FILEFORMAT_UGRID
+
CF-convention unstructured grid file format. This format is a proposed extension to the +CF-conventions for unstructured grid data model. Currently, only the 2D flexible mesh topology is supported in ESMF. +
+
+ +

+20.3 Class API +

+ +

+ +

+ +

+ +

+20.3.1 ESMC_MeshGetMOAB - Query if the MOAB mesh backend is enabled +

+ +

+ +

+
+INTERFACE: +

 void ESMC_MeshGetMOAB(
+   bool *moabOn,
+   int *rc
+ );
+
RETURN VALUE: +
    None
+
+DESCRIPTION: +
+ +

+This call will query whether or not the MOAB mesh backend is enabled. + +

+The arguments are: +

+
moabOn
+
This parameter will receive a boolean value indicating if MOAB is enabled. + +
+
rc
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+20.3.2 ESMC_MeshSetMOAB - Toggle the MOAB mesh backend +

+ +

+ +

+
+INTERFACE: +

 void ESMC_MeshSetMOAB(
+   bool moabOn,
+   int *rc
+ );
+
RETURN VALUE: +
    None
+
+DESCRIPTION: +
+ +

+This call will toggle the MOAB mesh backend. + +

+The arguments are: +

+
moabOn
+
This parameter will hold a boolean value to indicate the setting for the + MOAB mesh back end (on or off). + +
+
rc
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+
+20.3.3 ESMC_MeshAddElements - Add elements to a Mesh +

+ +

+ +

+
+INTERFACE: +

 int ESMC_MeshAddElements(
+   ESMC_Mesh mesh,           // inout
+   int  elementCount,        // in
+   int *elementIds,          // in
+   int *elementTypes,        // in
+   int *elementConn,         // in
+   int *elementMask,         // in
+   double *elementArea,      // in
+   double *elementCoords     // in
+ );
+
RETURN VALUE: +
    Return code; equals ESMF_SUCCESS if there are no errors.
+
+DESCRIPTION: +
+ +

+This call is the third and last part of the three part mesh create + sequence and should be called after the mesh is created with ESMF_MeshCreate() + (20.3.5) + and after the nodes are added with ESMF_MeshAddNodes() (20.3.4). + This call adds the elements to the + mesh and finalizes the create. After this call the Mesh is usable, for + example a Field may be built on the created Mesh object and + this Field may be used in a ESMF_FieldRegridStore() call. + +

+The parameters to this call elementIds, elementTypes, and + elementConn describe the elements to be created. The description + for a particular element lies at the same index location in elementIds + and elementTypes. Each entry in elementConn consists of the list of + nodes used to create that element, so the connections for element $e$ in the + elementIds array will start at +$number\_of\_nodes\_in\_element(1) + number\_of\_nodes\_in\_element(2) +
+\cdots + number\_of\_nodes\_in\_element(e-1) + 1$ in elementConn. + +

+

+
mesh
+
Mesh object. + +
+
elementCount
+
The number of elements on this PET. + +
+
elementIds
+
An array containing the global ids of the elements to be created on this PET. + This input consists of a 1D array of size elementCount. + +
+
elementTypes
+
An array containing the types of the elements to be created on this PET. The types used + must be appropriate for the parametric dimension of the Mesh. Please see + Section 20.2.1 for the list of options. This + input consists of a 1D array of size elementCount. + +
+
elementConn
+
An array containing the indexes of the sets of nodes to be connected together to form the + elements to be created on this PET. The entries in this list are NOT node global ids, + but rather each entry is a local index (1 based) into the list of nodes which were + created on this PET by the previous ESMC_MeshAddNodes() call. + In other words, an entry of 1 indicates that this element contains the node + described by nodeIds(1), nodeCoords(1), etc. passed into the + ESMC_MeshAddNodes() call on this PET. It is also + important to note that the order of the nodes in an element connectivity list + matters. Please see Section 20.2.1 for diagrams illustrating + the correct order of nodes in a element. This input consists of a 1D array with + a total size equal to the sum of the number of nodes in each element on + this PET. The number of nodes in each element is implied by its element type in + elementTypes. The nodes for each element + are in sequence in this array (e.g. the nodes for element 1 are elementConn(1), + elementConn(2), etc.). + +
+
[elementMask]
+
An array containing values which can be used for element masking. + Which values indicate masking are chosen via the srcMaskValues or + dstMaskValues arguments to ESMF_FieldRegridStore() call. This input + consists of a 1D array the size of the number of elements on this + PET. If not specified (i.e. NULL is passed in), then no masking will occur. + +
+
[elementArea]
+
An array containing element areas. This input consists of a 1D array + the size of the number of elements on this PET. If not specified (i.e. NULL is passed in), the + element areas are internally calculated. + +
+
[elementCoords]
+
An array containing the physical coordinates of the elements to be created on this + PET. This input consists of a 1D array the size of the number of elements on this PET times the Mesh's + spatial dimension (spatialDim). The coordinates in this array are ordered + so that the coordinates for an element lie in sequence in memory. (e.g. for a + Mesh with spatial dimension 2, the coordinates for element 1 are in elementCoords(1) and + elementCoords(2), the coordinates for element 2 are in elementCoords(3) and elementCoords(4), + etc.). + +

+

+
+ +

+ +

+ +

+
+20.3.4 ESMC_MeshAddNodes - Add nodes to a Mesh +

+ +

+ +

+
+INTERFACE: +

 int ESMC_MeshAddNodes(
+   ESMC_Mesh mesh,          // inout
+   int nodeCount,           // in
+   int *nodeIds,            // in
+   double *nodeCoords,      // in
+   int *nodeOwners,         // in
+   int *nodeMask            // in
+ );
+
RETURN VALUE: +
    Return code; equals ESMF_SUCCESS if there are no errors.
+
+DESCRIPTION: +
+ +

+This call is the second part of the three part mesh create + sequence and should be called after the mesh's dimensions are set + using ESMC_MeshCreate(). + This call adds the nodes to the + mesh. The next step is to call ESMC_MeshAddElements() (20.3.5). + +

+The parameters to this call nodeIds, nodeCoords, and + nodeOwners describe the nodes to be created on this PET. + The description for a particular node lies at the same index location in + nodeIds and nodeOwners. Each entry + in nodeCoords consists of spatial dimension coordinates, so the coordinates + for node $n$ in the nodeIds array will start at +$(n-1)*spatialDim+1$. + +

+

+
mesh
+
Mesh object. + +
+
nodeCount
+
The number of nodes on this PET. + +
+
nodeIds
+
An array containing the global ids of the nodes to be created on this PET. + This input consists of a 1D array the size of the number of nodes on this PET (i.e. nodeCount). + +
+
nodeCoords
+
An array containing the physical coordinates of the nodes to be created on this + PET. The coordinates in this array are ordered + so that the coordinates for a node lie in sequence in memory. (e.g. for a + Mesh with spatial dimension 2, the coordinates for node 1 are in nodeCoords(0) and + nodeCoords(1), the coordinates for node 2 are in nodeCoords(2) and nodeCoords(3), + etc.). This input consists of a 1D array the size of nodeCount times the Mesh's + spatial dimension (spatialDim). + +
+
nodeOwners
+
An array containing the PETs that own the nodes to be created on this PET. + If the node is shared with another PET, the value + may be a PET other than the current one. Only nodes owned by this PET + will have PET local entries in a Field created on the Mesh. This + input consists of a 1D array the size of the number of nodes on this PET (i.e. nodeCount). + +
+
+ +

+ +

+ +

+
+20.3.5 ESMC_MeshCreate - Create a Mesh as a 3 step process +

+ +

+ +

+
+INTERFACE: +

 ESMC_Mesh ESMC_MeshCreate(
+   int parametricDim,         // in
+   int spatialDim,            // in
+   enum ESMC_CoordSys_Flag *coordSys, // in
+   int *rc                    // out
+ );
+
RETURN VALUE: +
    type(ESMC_Mesh)         :: ESMC_MeshCreate
+
+DESCRIPTION: +
+ +

+This call is the first part of the three part mesh create sequence. This call sets the dimension of the elements + in the mesh (parametricDim) and the number of coordinate dimensions in the mesh (spatialDim). + The next step is to call ESMC_MeshAddNodes() (20.3.4) to add the nodes and then + ESMC_MeshAddElements() (20.3.3) + to add the elements and finalize the mesh. + +

+The arguments are: +

+
parametricDim
+
Dimension of the topology of the Mesh. (E.g. a mesh constructed of squares would have a parametric dimension + of 2, whereas a Mesh constructed of cubes would have one of 3.) + +
+
spatialDim
+
The number of coordinate dimensions needed to describe the locations of the nodes making up the Mesh. For a + manifold, the spatial dimension can be larger than the parametric dim (e.g. the 2D + surface of a sphere in 3D space), + but it can't be smaller. + +
+
[coordSys]
+
Set the coordinate system of the mesh. If not specified, then + defaults to ESMC_COORDSYS_SPH_DEG. + +
+
rc
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+
+20.3.6 ESMC_MeshCreateFromFile - Create a Mesh from a NetCDF grid file +

+ +

+ +

+
+INTERFACE: +

 ESMC_Mesh ESMC_MeshCreateFromFile(
+                                   const char *filename, // in (required)
+                                   int fileTypeFlag,     // in (required)
+                                   int *convertToDual,   // in (optional)
+                                   int *addUserArea,     // in (optional)
+                                   const char *meshname, // in (optional)
+                                   int *maskFlag,        // in (optional)
+                                   const char *varname,  // in (optional)
+                                   int *rc               // out
+ );
+
RETURN VALUE: +
    type(ESMC_Mesh)         :: ESMC_MeshCreateFromFile
+
+DESCRIPTION: +
+ +

+Method to create a Mesh object from a NetCDF file in either SCRIP, UGRID, + or ESMF file formats. + +

+The required arguments are: +

+
filename
+
The name of the grid file + +
+
filetypeflag
+
The file type of the grid file to be read, please see Section 20.2.2 + for a list of valid options. + +
+
[convertToDual]
+
if 1, the mesh will be converted to its dual. If not specified, + defaults to 0. Converting to dual is only supported with + file type ESMF_FILEFORMAT_SCRIP. + +
+
[addUserArea]
+
if 1, the cell area will be read in from the GRID file. This feature is + only supported when the grid file is in the SCRIP or ESMF format. If not specified, + defaults to 0. + +
+
[meshname]
+
The dummy variable for the mesh metadata in the UGRID file if the filetypeflag + is ESMF_FILEFORMAT_UGRID. If not specified, defaults to empty string. + +
+
[maskFlag]
+
An enumerated integer that, if specified, tells whether a mask in + a UGRID file should be defined on the nodes (MeshLoc.NODE) or + elements (MeshLoc.ELEMENT) of the mesh. If specified, generate + the mask using the missing_value attribute defined in 'varname'. + This flag is only supported when the grid file is in the UGRID + format. If not specified, defaults to no mask. + +
+
[varname]
+
If maskFlag is specified, provide a variable name stored in the UGRID file and + the mask will be generated using the missing value of the data value of + this variable. The first two dimensions of the variable has to be the + the longitude and the latitude dimension and the mask is derived from the + first 2D values of this variable even if this data is 3D, or 4D array. If not + specified, defaults to empty string. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+
+20.3.7 ESMC_MeshGetCoord - Get lat/lon coordinates from a Mesh +

+ +

+ +

+
+INTERFACE: +

 void ESMC_MeshGetCoord(
+                          ESMC_Mesh mesh_in, // in (required)
+                          double *nodeCoord, // out
+                          int *num_nodes,    // out
+                          int *num_dims,     // out
+                          int *rc            // out
+                          );
+
RETURN VALUE: +
    None
+
+DESCRIPTION: +
+ +

+This call returns the node coordinates of the given ESMC_Mesh + in the provided nodeCoord buffer of doubles. At completion, this + buffer is a 1-D array with the coordinates for a given node + in adjacent indices. For example, for $d$-dimensional coordinates, the first + $d$ values in the returned array are the coordinates for the first node, + the second $d$ values are the coordinates for the second node, etc. + +

+The arguments are: +

+
mesh_in
+
Mesh object. + +
+
nodeCoord
+
Pointer to doubles. The node coordinates are returned here. + +
+
num_nodes
+
Pointer to an integer. The number of nodes found in + the input Mesh is returned here. + +
+
num_dims
+
Pointer to an integer. The number of coordinate dimensions + is returned here. + +
+
rc
+
Return code; equals ESMF_SUCCESS if there are no + errors. + +
+
+ +

+ +

+ +

+
+20.3.8 ESMC_MeshGetElemCoord - Get lat/lon element center coordinates from a Mesh +

+ +

+ +

+
+INTERFACE: +

 void ESMC_MeshGetElemCoord(
+                          ESMC_Mesh mesh_in, // in (required)
+                          double *elemCoord, // out
+                          int *num_elems,    // out
+                          int *num_dims,     // out
+                          int *rc            // out
+                          );
+
RETURN VALUE: +
    None
+
+DESCRIPTION: +
+ +

+This call returns the element coordinates of the given ESMC_Mesh + in the provided elemCoord buffer of doubles. At completion, this + buffer is a 1-D array with the coordinates for a given element + in adjacent indices. For example, for $d$-dimensional coordinates, the first + $d$ values in the returned array are the coordinates for the first element, + the second $d$ values are the coordinates for the second element, etc. + +

+The arguments are: +

+
mesh_in
+
Mesh object. + +
+
elemCoord
+
Pointer to doubles. The element coordinates are returned here. + +
+
num_elems
+
Pointer to an integer. The number of elements found in + the input Mesh is returned here. + +
+
num_dims
+
Pointer to an integer. The number of coordinate dimensions + is returned here. + +
+
rc
+
Return code; equals ESMF_SUCCESS if there are no + errors. + +
+
+ +

+ +

+ +

+20.3.9 ESMC_MeshGetConnectivity - Get Mesh connectivity +

+ +

+ +

+
+INTERFACE: +

 void ESMC_MeshGetConnectivity(
+                          ESMC_Mesh mesh_in,     // in (required)
+                          double *connCoord,     // out
+                          int *nodesPerElem,  // out
+                          int *rc                // out
+                          );
+
RETURN VALUE: +
    None
+
+DESCRIPTION: +
+ +

+NOTE: At this time the connectivity that is returned from this call is + not necessarily in the same format as how it was passed into the + creation routine. + +

+This call returns the connectivity of the given ESMC_Mesh + in the provided connCoord buffer of doubles. At completion, this + buffer is a 1-D array with the coordinates for the nodes of a given element + in counterclockwise order. The /tt nodesPerElem buffer of integers + contains the number of nodes to expect per element. + +

+The arguments are: +

+
mesh_in
+
Mesh object. + +
+
connCoord
+
Pointer to doubles. The connectivity is returned here. + +
+
nodesPerElem
+
Pointer to integers. The number of nodes in each + element. + +
+
rc
+
Return code; equals ESMF_SUCCESS if there are no + errors. + +
+
+ +

+ +

+ +

+20.3.10 ESMC_MeshDestroy - Destroy a Mesh +

+ +

+ +

+
+INTERFACE: +

 int ESMC_MeshDestroy(
+   ESMC_Mesh *mesh             // in
+ );
+
RETURN VALUE: +
    Return code; equals ESMF_SUCCESS if there are no errors.
+
+DESCRIPTION: +
+ +

+Destroy the Mesh. This call removes all internal memory associated with mesh. After this call mesh will no longer be usable. + +

+The arguments are: +

+
mesh
+
Mesh object whose memory is to be freed. + +
+
+ +

+ +

+ +

+20.3.11 ESMC_MeshFreeMemory - Remove a Mesh and its memory +

+ +

+ +

+
+INTERFACE: +

 int ESMC_MeshFreeMemory(
+   ESMC_Mesh mesh            // in
+ );
+
RETURN VALUE: +
    Return code; equals ESMF_SUCCESS if there are no errors.
+
+DESCRIPTION: +
+ +

+This call removes the portions of mesh which contain connection and coordinate + information. After this call, Fields build on mesh will no longer be usable + as part of an ESMF_FieldRegridStore() operation. However, after this call + Fields built on mesh can still be used in an ESMF_FieldRegrid() + operation if the routehandle was generated beforehand. New Fields may also + be built on mesh after this call. + +

+The arguments are: +

+
mesh
+
Mesh object whose memory is to be freed. + +
+
+ +

+ +

+ +

+20.3.12 ESMC_MeshGetElementCount - Get the number of elements in a Mesh on the current PET +

+ +

+ +

+
+INTERFACE: +

 int ESMC_MeshGetElementCount(
+   ESMC_Mesh mesh,           // in
+   int *elementCount         // out
+ );
+
RETURN VALUE: +
    Return code; equals ESMF_SUCCESS if there are no errors.
+
+DESCRIPTION: +
+ +

+Query the number of elements in a mesh on the local PET. + The arguments are: +

+
mesh
+
The mesh + +
+
elementCount
+
The number of elements on this PET. + +
+
+ +

+ +

+ +

+20.3.13 ESMC_MeshGetNodeCount - Get the number of nodes in a Mesh on the current PET +

+ +

+ +

+
+INTERFACE: +

 int ESMC_MeshGetNodeCount(
+   ESMC_Mesh mesh,          // in
+   int *nodeCount           // out
+ );
+
RETURN VALUE: +
    Return code; equals ESMF_SUCCESS if there are no errors.
+
+DESCRIPTION: +
+ +

+Query the number of nodes in a mesh on the local PET. + The arguments are: +

+
mesh
+
The mesh + +
+
nodeCount
+
The number of nodes on this PET. + +
+
+ +

+ +

+ +

+20.3.14 ESMC_MeshGetOwnedElementCount - Get the number of elements in a Mesh owned by the current PET +

+ +

+ +

+
+INTERFACE: +

 int ESMC_MeshGetOwnedElementCount(
+   ESMC_Mesh mesh,           // in
+   int *elementCount         // out
+ );
+
RETURN VALUE: +
    Return code; equals ESMF_SUCCESS if there are no errors.
+
+DESCRIPTION: +
+ +

+Query the number of elements in a mesh owned by the local PET. This number will be equal or less than the + local element count. + The arguments are: +

+
mesh
+
The mesh + +
+
elementCount
+
The number of elements owned by this PET. + +
+
+ +

+ +

+ +

+20.3.15 ESMC_MeshGetOwnedNodeCount - Get the number of nodes in a Mesh owned by the current PET +

+ +

+ +

+
+INTERFACE: +

 int ESMC_MeshGetOwnedNodeCount(
+   ESMC_Mesh mesh,          // in
+   int *nodeCount           // out
+ );
+
RETURN VALUE: +
    Return code; equals ESMF_SUCCESS if there are no errors.
+
+DESCRIPTION: +
+ +

+Query the number of nodes in a mesh owned by the local PET. This number will be equal or less than the + local node count. + The arguments are: +

+
mesh
+
The mesh + +
+
nodeCount
+
The number of nodes owned by this PET. + +
+
+ +

+ + +

+21 XGrid Class +

+ +

+21.1 Description +

+ +

+An exchange grid represents the 2D boundary layer usually between the +atmosphere on one side and ocean and land on the other in an Earth +system model. There are dynamical and thermodynamical processes on +either side of the boundary layer and on the boundary layer itself. +The boundary layer exchanges fluxes from either side and adjusts +boundary conditions for the model components involved. For climate modeling, +it is critical that the fluxes transferred by the boundary layer are +conservative. + +

+The ESMF exchange grid is implemented as the ESMC_XGrid class. +Internally it's represented by a collection of the intersected cells +between atmosphere and ocean/land[2] grids. +These polygonal cells can have irregular shapes +and can be broken down into triangles facilitating a finite element +approach. + +

+Through the C API there is one way to create an ESMC_XGrid object from +user supplied information. The ESMC_XGrid takes +two lists of ESMC_Grid or ESMC_Mesh that represent the model component grids on +either side of the exchange grid. From the two lists of ESMC_Grid or ESMC_Mesh, +information required for flux exchange calculation between any pair of the +model components from either side of the exchange grid is computed. In addition, the +internal representation of the ESMC_XGrid is computed and can be optionally stored +as an ESMC_Mesh. This internal representation is the collection of the intersected +polygonal cells as a result of merged ESMC_Meshes from both sides of the exchange grid. +ESMC_Field can be created on the ESMC_XGrid and used for weight generation +and regridding as the internal representation in the ESMC_XGrid has +a complete geometrical description of the exchange grid. + +

+Once an ESMC_XGrid has been created, information describing it (e.g. cell areas, mesh representation, etc.) +can be retrieved from the object using a set of get calls (e.g. ESMC_XGridGetElementArea()). The full extent of these +can be found in the API section below. + +

+21.2 Restrictions and Future Work +

+ +

+ +

+21.2.1 Restrictions and Future Work +

+ +

+ + + +

    +
  1. CAUTION: Any Grid or Mesh pair picked from the A side and B side of the XGrid +cannot point to the same Grid or Mesh in memory on a local PET. This prevents Regrid from +selecting the right source and destination grid automatically to calculate the regridding routehandle. +It's okay for the Grid and Mesh to have identical topological and geographical properties as long +as they are stored in different memory. + +

    +

  2. +
+ +

+ +

+21.3 Design and Implementation Notes +

+ +

+ +

    +
  1. The XGrid class is implemented in Fortran, and as such is +defined inside the framework by a XGrid derived type and a set of +subprograms (functions and subroutines) which operate on that derived type. +The XGrid class contains information needed to create Grid, Field, and +communication routehandle. + +

    +

  2. +
  3. XGrid follows the framework-wide convention of the +unison creation and operation rule: All PETs which are +part of the currently executing VM must create the +same XGrids at the same point in their execution. +In addition to the unison rule, XGrid creation also performs inter-PET +communication within the current executing VM. +
  4. +
+ +

+21.4 Class API +

+ +

+ +

+ +

+ +

+21.4.1 ESMC_XGridCreate - Create an XGrid +

+ +

+ +

+
+INTERFACE: +

   ESMC_XGrid ESMC_XGridCreate(
+                               int sideAGridCount,  ESMC_Grid *sideAGrid, // in
+                               int sideAMeshCount,  ESMC_Mesh *sideAMesh, // in
+                               int sideBGridCount,  ESMC_Grid *sideBGrid, // in
+                               int sideBMeshCount,  ESMC_Mesh *sideBMesh, // in
+                               ESMC_InterArrayInt *sideAGridPriority,     // in
+                               ESMC_InterArrayInt *sideAMeshPriority,     // in
+                               ESMC_InterArrayInt *sideBGridPriority,     // in
+                               ESMC_InterArrayInt *sideBMeshPriority,     // in
+                               ESMC_InterArrayInt *sideAMaskValues,       // in
+                               ESMC_InterArrayInt *sideBMaskValues,       // in
+                               int storeOverlay,                          // in
+                               int *rc                                    // out
+ );
+
RETURN VALUE: +
    Newly created ESMC_XGrid object.
+
+DESCRIPTION: +
+ +

+Create an ESMC_XGrid object from user supplied input: the list of Grids or Meshes on side A and side B, + and other optional arguments. A user can supply both Grids and Meshes on one side to create + the XGrid. By default, the Grids have a higher priority over Meshes but the order of priority + can be adjusted by the optional GridPriority and MeshPriority arguments. The priority order + of Grids and Meshes can also be interleaved by rearranging the optional + GridPriority and MeshPriority arguments accordingly. + +

+Sparse matrix multiplication coefficients are internally computed and + uniquely determined by the Grids or Meshes provided in sideA and sideB. User can supply + a single ESMC_Grid or an array of ESMC_Grid on either side of the + ESMC_XGrid. For an array of ESMC_Grid or ESMC_Mesh in sideA or sideB, + a merging process concatenates all the ESMC_Grids and ESMC_Meshes + into a super mesh represented + by ESMC_Mesh. The super mesh is then used to compute the XGrid. + Grid or Mesh objects in sideA and sideB arguments must have coordinates defined for + the corners of a Grid or Mesh cell. XGrid creation can be potentially memory expensive given the + size of the input Grid and Mesh objects. By default, the super mesh is not stored + to reduce memory usage. + +

+If sideA and sideB have a single + Grid or Mesh object, it's erroneous + if the two Grids or Meshes are spatially disjoint. + It is also erroneous to specify a Grid or Mesh object in sideA or sideB + that is spatially disjoint from the ESMC_XGrid. + +

+This call is collective across the current VM. For more details please refer to the description + 21.1 of the XGrid class. + +

+The arguments are: +

+
sideAGridCount
+
The number of Grids in the sideAGrid array. + +
+
[sideAGrid]
+
Parametric 2D Grids on side A, for example, + these Grids can be either Cartesian 2D or Spherical. + +
+
sideAMeshCount
+
The number of Meshes in the sideAMesh array. + +
+
[sideAMesh]
+
Parametric 2D Meshes on side A, for example, + these Meshes can be either Cartesian 2D or Spherical. + +
+
sideBGridCount
+
The number of Grids in the sideBGrid array. + +
+
[sideBGrid]
+
Parametric 2D Grids on side B, for example, + these Grids can be either Cartesian 2D or Spherical. + +
+
sideBMeshCount
+
The number of Meshes in the sideBMesh array. + +
+
[sideBMesh]
+
Parametric 2D Meshes on side B, for example, + these Meshes can be either Cartesian 2D or Spherical. + +
+
[sideAGridPriority]
+
Priority array of Grids on sideA during overlay generation. + The priority arrays describe the priorities of Grids at the overlapping region. + Flux contributions at the overlapping region are computed in the order from the Grid of the + highest priority to the lowest priority. + +
+
[sideAMeshPriority]
+
Priority array of Meshes on sideA during overlay generation. + The priority arrays describe the priorities of Meshes at the overlapping region. + Flux contributions at the overlapping region are computed in the order from the Mesh of the + highest priority to the lowest priority. + +
+
[sideBGridPriority]
+
Priority of Grids on sideB during overlay generation + The priority arrays describe the priorities of Grids at the overlapping region. + Flux contributions at the overlapping region are computed in the order from the Grid of the + highest priority to the lowest priority. + +
+
[sideBMeshPriority]
+
Priority array of Meshes on sideB during overlay generation. + The priority arrays describe the priorities of Meshes at the overlapping region. + Flux contributions at the overlapping region are computed in the order from the Mesh of the + highest priority to the lowest priority. + +
+
[sideAMaskValues]
+
Mask information can be set in the Grid (see 19.1.8) or Mesh + upon which the Field is built. The sideAMaskValues argument specifies the values in that + mask information which indicate a point should be masked out. In other words, a location is masked if and only if the + value for that location in the mask information matches one of the values listed in sideAMaskValues. + If sideAMaskValues is not specified, no masking on side A will occur. + +
+
[sideBMaskValues]
+
Mask information can be set in the Grid (see 19.1.8) or Mesh + upon which the Field is built. The sideBMaskValues argument specifies the values in that + mask information which indicate a point should be masked out. In other words, a location is masked if and only if the + value for that location in the mask information matches one of the values listed in sideBMaskValues. + If sideBMaskValues is not specified, no masking on side B will occur. + +
+
storeOverlay
+
Setting the storeOverlay optional argument to 0. + allows a user to bypass storage of the Mesh used to represent the XGrid. + Only a DistGrid is stored to allow Field to be built on the XGrid. + If the temporary mesh object is of interest, storeOverlay can be set to a value not equal to 0. + so a user can retrieve it for future use. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS only if the ESMF_XGrid + is created. + +
+
+ +

+ +

+ +

+21.4.2 ESMC_XGridDestroy - Destroy a XGrid +

+ +

+ +

+
+INTERFACE: +

 int ESMC_XGridDestroy(
+   ESMC_XGrid *xgrid     // inout
+ );
+
RETURN VALUE: +
    Return code; equals ESMF_SUCCESS if there are no errors.
+
+DESCRIPTION: +
+ +

+Releases all resources associated with this ESMC_XGrid. + Return code; equals ESMF_SUCCESS if there are no errors. + +

+The arguments are: +

+
xgrid
+
Destroy contents of this ESMC_XGrid. + +
+
+ +

+ +

+ +

+21.4.3 ESMC_XGridGetSideAGridCount - Get the number of Grids on side A. +

+ +

+ +

+
+INTERFACE: +

 int ESMC_XGridGetSideAGridCount(
+   ESMC_XGrid xgrid,     // in
+   int *rc               // out
+ );
+
RETURN VALUE: +
    The number of Grids on side A.
+
+DESCRIPTION: +
+ +

+Get the number of Grids on side A. + +

+The arguments are: +

+
xgrid
+
The XGrid from which to get the information. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+21.4.4 ESMC_XGridGetSideAMeshCount - Get the number of Meshes on side A. +

+ +

+ +

+
+INTERFACE: +

 int ESMC_XGridGetSideAMeshCount(
+   ESMC_XGrid xgrid,     // in
+   int *rc               // out
+ );
+
RETURN VALUE: +
    The number of Meshes on side A.
+
+DESCRIPTION: +
+ +

+Get the number of Meshes on side A. + +

+The arguments are: +

+
xgrid
+
The XGrid from which to get the information. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+21.4.5 ESMC_XGridGetSideBGridCount - Get the number of Grids on side B. +

+ +

+ +

+
+INTERFACE: +

 int ESMC_XGridGetSideBGridCount(
+   ESMC_XGrid xgrid,     // in
+   int *rc               // out
+ );
+
RETURN VALUE: +
    The number of Grids on side B.
+
+DESCRIPTION: +
+ +

+Get the number of Grids on side B. + +

+The arguments are: +

+
xgrid
+
The XGrid from which to get the information. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+21.4.6 ESMC_XGridGetSideBMeshCount - Get the number of Meshes on side B. +

+ +

+ +

+
+INTERFACE: +

 int ESMC_XGridGetSideBMeshCount(
+   ESMC_XGrid xgrid,     // in
+   int *rc               // out
+ );
+
RETURN VALUE: +
    The number of Meshes on side B.
+
+DESCRIPTION: +
+ +

+Get the number of Meshes on side B. + +

+The arguments are: +

+
xgrid
+
The XGrid from which to get the information. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+21.4.7 ESMC_XGridGetDimCount - Get the dimension of the XGrid. +

+ +

+ +

+
+INTERFACE: +

 int ESMC_XGridGetDimCount(
+   ESMC_XGrid xgrid,     // in
+   int *rc               // out
+ );
+
RETURN VALUE: +
    The dimension of the XGrid.
+
+DESCRIPTION: +
+ +

+Get the dimension of the XGrid. + +

+The arguments are: +

+
xgrid
+
The XGrid from which to get the information. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+21.4.8 ESMC_XGridGetElementCount - Get the number of elements in the XGrid. +

+ +

+ +

+
+INTERFACE: +

 int ESMC_XGridGetElementCount(
+   ESMC_XGrid xgrid,     // in
+   int *rc               // out
+ );
+
RETURN VALUE: +
       The number of elements in the XGrid.
+
+DESCRIPTION: +
+ +

+Get the number of elements in the XGrid. + +

+The arguments are: +

+
xgrid
+
The XGrid from which to get the information. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+21.4.9 ESMC_XGridGetMesh - Get the Mesh representation of the XGrid. +

+ +

+ +

+
+INTERFACE: +

 ESMC_Mesh ESMC_XGridGetMesh(
+   ESMC_XGrid xgrid,     // in
+   int *rc               // out
+ );
+
RETURN VALUE: +
    The ESMC_Mesh object representing the XGrid.
+
+DESCRIPTION: +
+ +

+Get the ESMC_Mesh object representing the XGrid. + +

+The arguments are: +

+
xgrid
+
The xgrid from which to get the information. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+21.4.10 ESMC_XGridGetElementArea - Get the area of elements in the XGrid. +

+ +

+ +

+
+INTERFACE: +

 void ESMC_XGridGetElementArea(
+   ESMC_XGrid xgrid,     // in
+   ESMC_R8 *area,        // out
+   int *rc               // out
+ );
+
RETURN VALUE: +
       The number of elements in the XGrid.
+
+DESCRIPTION: +
+ +

+Get the number of elements in the XGrid. + +

+The arguments are: +

+
xgrid
+
The XGrid from which to get the information. + +
+
area
+
An array to fill with element areas. The array must be allocated + to size elementCount. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+21.4.11 ESMC_XGridGetElementCentroid - Get the centroid of elements in the XGrid. +

+ +

+ +

+
+INTERFACE: +

 void ESMC_XGridGetElementCentroid(
+   ESMC_XGrid xgrid,     // in
+   ESMC_R8 *centroid,    // out
+   int *rc               // out
+ );
+
RETURN VALUE: +
       The number of elements in the XGrid.
+
+DESCRIPTION: +
+ +

+Get the centroid for each element in the exchange grid. + +

+The arguments are: +

+
xgrid
+
The XGrid from which to get the information. + +
+
centroid
+
An array to fill with element centroids. The array must be allocated + to size elementCount*dimCount. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+21.4.12 ESMC_XGridGetSparseMatA2X - Get the sparse matrix that goes from a side A grid to the exchange grid. +

+ +

+ +

+
+INTERFACE: +

 void ESMC_XGridGetSparseMatA2X(
+                                ESMC_XGrid xgrid,      // in
+                                int sideAIndex,        // in
+                                int *factorListCount,  // out
+                                double **factorList,   // out
+                                int **factorIndexList, // out
+                                int *rc);
+
RETURN VALUE: +
       N/A
+
+DESCRIPTION: +
+ +

+Get the sparse matrix that goes from a side A grid to the exchange grid. + +

+The arguments are: +

+
xgrid
+
The XGrid from which to get the information. + +
+
sideAIndex
+
The 0 based index of the Grid/Mesh on side A to get the sparse matrix for. + If a priority has been specified for Grids and Meshes, then this index is + in priority order. If no priority was specified, then the all the Grids are + first followed by all the Meshes in the order they were passed into the XGrid + create call. + +
+
factorListCount
+
The size of the sparse matrix. + +
+
factorList
+
A pointer to the list of factors for the requested sparse matrix. + The list is of size factorListCount. To save space + this is a pointer to the internal xgrid memory for this list. + Don't deallocate it. + +
+
factorIndexList
+
A pointer to the list of indices for the requested sparse matrix. + The list is of size 2*factorListCount. For each pair of entries + in this array: entry 0 is the sequence index in the source grid, and entry 1 is + the sequence index in the destination grid. To save space + this is a pointer to the internal xgrid memory for this list. + Don't deallocate it. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+21.4.13 ESMC_XGridGetSparseMatA2X - Get the sparse matrix that goes from the exchange grid to a side A grid. +

+ +

+ +

+
+INTERFACE: +

 void ESMC_XGridGetSparseMatX2A(
+                                ESMC_XGrid xgrid,      // in
+                                int sideAIndex,        // in
+                                int *factorListCount,  // out
+                                double **factorList,   // out
+                                int **factorIndexList, // out
+                                int *rc);
+
RETURN VALUE: +
       N/A
+
+DESCRIPTION: +
+ +

+Get the sparse matrix that goes from the exchange grid to a side A grid. + +

+The arguments are: +

+
xgrid
+
The XGrid from which to get the information. + +
+
sideAIndex
+
The 0 based index of the Grid/Mesh on side A to get the sparse matrix for. + If a priority has been specified for Grids and Meshes, then this index is + in priority order. If no priority was specified, then the all the Grids are + first followed by all the Meshes in the order they were passed into the XGrid + create call. + +
+
factorListCount
+
The size of the sparse matrix. + +
+
factorList
+
A pointer to the list of factors for the requested sparse matrix. + The list is of size factorListCount. To save space + this is a pointer to the internal xgrid memory for this list. + Don't deallocate it. + +
+
factorIndexList
+
A pointer to the list of indices for the requested sparse matrix. + The list is of size 2*factorListCount. For each pair of entries + in this array: entry 0 is the sequence index in the source grid, and entry 1 is + the sequence index in the destination grid. To save space + this is a pointer to the internal xgrid memory for this list. + Don't deallocate it. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+21.4.14 ESMC_XGridGetSparseMatB2X - Get the sparse matrix that goes from a side B grid to the exchange grid. +

+ +

+ +

+
+INTERFACE: +

 void ESMC_XGridGetSparseMatB2X(
+                                ESMC_XGrid xgrid,      // in
+                                int sideBIndex,        // in
+                                int *factorListCount,  // out
+                                double **factorList,   // out
+                                int **factorIndexList, // out
+                                int *rc);
+
RETURN VALUE: +
       N/A
+
+DESCRIPTION: +
+ +

+Get the sparse matrix that goes from a side B grid to the exchange grid. + +

+The arguments are: +

+
xgrid
+
The XGrid from which to get the information. + +
+
sideBIndex
+
The 0 based index of the Grid/Mesh on side B to get the sparse matrix for. + If a priority has been specified for Grids and Meshes, then this index is + in priority order. If no priority was specified, then the all the Grids are + first followed by all the Meshes in the order they were passed into the XGrid + create call. + +
+
factorListCount
+
The size of the sparse matrix. + +
+
factorList
+
A pointer to the list of factors for the requested sparse matrix. + The list is of size factorListCount. To save space + this is a pointer to the internal xgrid memory for this list. + Don't deallocate it. + +
+
factorIndexList
+
A pointer to the list of indices for the requested sparse matrix. + The list is of size 2*factorListCount. For each pair of entries + in this array: entry 0 is the sequence index in the source grid, and entry 1 is + the sequence index in the destination grid. To save space + this is a pointer to the internal xgrid memory for this list. + Don't deallocate it. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+21.4.15 ESMC_XGridGetSparseMatB2X - Get the sparse matrix that goes from the exchange grid to a side B grid. +

+ +

+ +

+
+INTERFACE: +

 void ESMC_XGridGetSparseMatX2B(
+                                ESMC_XGrid xgrid,      // in
+                                int sideBIndex,        // in
+                                int *factorListCount,  // out
+                                double **factorList,   // out
+                                int **factorIndexList, // out
+                                int *rc);
+
RETURN VALUE: +
       N/A
+
+DESCRIPTION: +
+ +

+Get the sparse matrix that goes from the exchange grid to a side B grid. + +

+The arguments are: +

+
xgrid
+
The XGrid from which to get the information. + +
+
sideBIndex
+
The 0 based index of the Grid/Mesh on side B to get the sparse matrix for. + If a priority has been specified for Grids and Meshes, then this index is + in priority order. If no priority was specified, then the all the Grids are + first followed by all the Meshes in the order they were passed into the XGrid + create call. + +
+
factorListCount
+
The size of the sparse matrix. + +
+
factorList
+
A pointer to the list of factors for the requested sparse matrix. + The list is of size factorListCount. To save space + this is a pointer to the internal xgrid memory for this list. + Don't deallocate it. + +
+
factorIndexList
+
A pointer to the list of indices for the requested sparse matrix. + The list is of size 2*factorListCount. For each pair of entries + in this array: entry 0 is the sequence index in the source grid, and entry 1 is + the sequence index in the destination grid. To save space + this is a pointer to the internal xgrid memory for this list. + Don't deallocate it. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ + +

+22 DistGrid Class +

+ +

+22.1 Description +

+ +

+The ESMF DistGrid class sits on top of the DELayout class (not currently +directly accessible through the ESMF C API) and holds domain +information in index space. +A DistGrid object captures the index space topology +and describes its decomposition in terms of DEs. Combined with DELayout and VM +the DistGrid defines the data distribution of a domain decomposition across the +computational resources of an ESMF Component. + +

+The global domain is defined as the union of logically +rectangular (LR) sub-domains or tiles. The DistGrid create methods allow +the specification of such a multi-tile global domain and its decomposition into +exclusive, DE-local LR regions according to various degrees of user specified +constraints. Complex index space topologies can be constructed by specifying +connection relationships between tiles during creation. + +

+The DistGrid class holds domain information for all DEs. Each DE is associated +with a local LR region. No overlap of the regions is allowed. The DistGrid +offers query methods that allow DE-local topology information to be extracted, +e.g. for the construction of halos by higher classes. + +

+A DistGrid object only contains decomposable dimensions. The minimum rank for a +DistGrid object is 1. A maximum rank does not exist for DistGrid objects, +however, ranks greater than 7 may lead to difficulties with respect to the +Fortran API of higher classes based on DistGrid. The rank of a DELayout object +contained within a DistGrid object must be equal to the DistGrid rank. Higher +class objects that use the DistGrid, such as an Array object, may be of +different rank than the associated DistGrid object. The higher class object +will hold the mapping information between its dimensions and the DistGrid +dimensions. + +

+22.2 Class API +

+ +

+ +

+ +

+ +

+22.2.1 ESMC_DistGridCreate - Create a DistGrid +

+ +

+ +

+
+INTERFACE: +

 ESMC_DistGrid ESMC_DistGridCreate(
+   ESMC_InterArrayInt minIndexInterfaceArg,  // in
+   ESMC_InterArrayInt maxIndexInterfaceArg,  // in
+   int *rc                                   // out
+ );
+
RETURN VALUE: +
    Newly created ESMC_DistGrid object.
+
+DESCRIPTION: +
+ +

+Create an ESMC_DistGrid from a single logically rectangular (LR) + tile with default decomposition. The default decomposition is + deCount +$\times 1 \times ... \times 1$, where deCount is the + number of DEs in a default DELayout, equal to petCount. This means + that the default decomposition will be into as many DEs as there are PETs, + with 1 DE per PET. + +

+The arguments are: +

+
minIndex
+
Global coordinate tuple of the lower corner of the tile. + +
+
maxIndex
+
Global coordinate tuple of the upper corner of the tile. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+22.2.2 ESMC_DistGridDestroy - Destroy a DistGrid +

+ +

+ +

+
+INTERFACE: +

 int ESMC_DistGridDestroy(
+   ESMC_DistGrid *distgrid         // inout
+ );
+
RETURN VALUE: +
    Return code; equals ESMF_SUCCESS if there are no errors.
+
+DESCRIPTION: +
+ +

+Destroy an ESMC_DistGrid object. + +

+The arguments are: +

+
distgrid
+
ESMC_DistGrid object to be destroyed. + +
+
+ +

+ +

+ +

+22.2.3 ESMC_DistGridPrint - Print a DistGrid +

+ +

+ +

+
+INTERFACE: +

 int ESMC_DistGridPrint(
+   ESMC_DistGrid distgrid          // in
+ );
+
RETURN VALUE: +
    Return code; equals ESMF_SUCCESS if there are no errors.
+
+DESCRIPTION: +
+ +

+Print internal information of the specified ESMC_DistGrid object. + +

+The arguments are: +

+
distgrid
+
ESMC_DistGrid object to be destroyed. + +
+
+ +

+ + +

+23 RouteHandle Class +

+ +

+23.1 Description +

+ +

+ +

+The ESMF RouteHandle class provides a unified interface for all route-based communication methods across the Field, FieldBundle, Array, and ArrayBundle classes. All route-based communication methods implement a pre-computation step, returning a RouteHandle, an execution step, and a release step. Typically the pre-computation, or Store() step will be a lot more expensive (both in memory and time) than the execution step. The idea is that once precomputed, a RouteHandle will be executed many times over during a model run, making the execution time a very performance critical piece of code. In ESMF, Regridding, Redisting, and Haloing are implemented as route-based communication methods. The following sections discuss the RouteHandle concepts that apply uniformly to all route-based communication methods, across all of the above mentioned classes. + +

+ +

+23.2 Use and Examples +

+ +

+The user interacts with the RouteHandle class through the route-based communication methods of Field, FieldBundle, Array, and ArrayBundle. The usage of these methods are described in detail under their respective class documentation section. The following examples focus on the RouteHandle aspects common across classes and methods. + +

+23.3 Restrictions and Future Work +

+ +

+ +

    +
  • Non-blocking communication via the routesyncflag option is implemented for Fields and Arrays. It is not available for FieldBundles and ArrayBundles. The user is advised to use the VMEpoch approach for all cases to achive asynchronicity. + +

    +

  • +
  • The dynamic masking feature currently has the following limitations: + +

    + +

      +
    • Only available for ESMF_TYPEKIND_R8 and ESMF_TYPEKIND_R4 Fields and Arrays. + +

      +

    • +
    • Only available through the ESMF_FieldRegrid() and ESMF_ArraySMM() methods. + +

      +

    • +
    • Destination objects that have undistributed dimensions after any distributed dimension are not supported. + +

      +

    • +
    • No check is implemented that ensure the user-provided RouteHandle object is suitable for dynamic masking. + +

      +

    • +
    + +

    +

  • +
+ +

+23.4 Design and Implementation Notes +

+ +

+Internally all route-based communication calls are implemented as sparse matrix multiplications. The precompute step for all of the supported communication methods can be broken up into three steps: + +

    +
  1. Construction of the sparse matrix for the specific communication method. +
  2. +
  3. Generation of the communication pattern according to the sparse matrix. +
  4. +
  5. Encoding of the communication pattern for each participating PET in form of an XXE stream. +
  6. +
+ +

+23.5 Class API +

+ +

+ +

+ +

+ +

+23.5.1 ESMC_RouteHandleCreateFromFile - Create a RouteHandle +

+ +

+ +

+
+INTERFACE: +

 ESMC_RouteHandle ESMC_RouteHandleCreateFromFile(
+   char *filename,
+   int *rc
+ );
+
RETURN VALUE: +
    ESMC_RouteHandle
+
+DESCRIPTION: +
+ +

+Create an ESMC_RouteHandle object. + +

+The arguments are: +

+
filename
+
The file that describes the ESMC_RouteHandle object. + +
+
+ +

+ +

+ +

+23.5.2 ESMC_RouteHandlePrint - Print a RouteHandle +

+ +

+ +

+
+INTERFACE: +

 int ESMC_RouteHandlePrint(
+   ESMC_RouteHandle rh            // in
+ );
+
RETURN VALUE: +
    Return code; equals ESMF_SUCCESS if there are no errors.
+
+DESCRIPTION: +
+ +

+Print internal information of the specified ESMC_RouteHandle object. + +

+The arguments are: +

+
rh
+
ESMC_RouteHandle object to be printed. + +
+
+ +

+ +

+ +

+23.5.3 ESMC_RouteHandleWrite - Write a RouteHandle to file +

+ +

+ +

+
+INTERFACE: +

 int ESMC_RouteHandleWrite(
+   ESMC_RouteHandle rh,          // in
+   char *filename                // in
+ );
+
RETURN VALUE: +
    Return code; equals ESMF_SUCCESS if there are no errors.
+
+DESCRIPTION: +
+ +

+Write ESMC_RouteHandle object to file to save regrid information for + fast input for regridding operations during runtime. + +

+The arguments are: +

+
rh
+
ESMC_RouteHandle object to be printed. + +
+
filename
+
The name of the file for writing the ESMC_RouteHandle object. + +
+
+ +

+ + +

+ +
+esmf_support@ucar.edu +
+ + diff --git a/docs/nightly/fix/reconcile-info/ESMC_crefdoc/node6.html b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/node6.html new file mode 100644 index 000000000..2e03a73f7 --- /dev/null +++ b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/node6.html @@ -0,0 +1,2746 @@ + + + + + +5 Infrastructure: Utilities + + + + + + + + + + + + + + + + + + + + + +Subsections + + + +
+ +

+5 Infrastructure: Utilities +

+ + +

+ +

+24 Overview of Infrastructure Utility Classes +

+ +

+The ESMF utilities are a set of tools for quickly assembling modeling applications. + +

+The Time Management Library provides utilities for time and time interval representation, as well as a higher-level utility, a clock, that controls model time stepping. + +

+The ESMF Config class provides configuration management based on NASA DAO's Inpak package, a collection of methods for accessing files containing input parameters stored in an ASCII format. + +

+The ESMF LogErr class consists of a method for writing error, warning, and informational messages to a default Log file that is created during ESMF initialization. + +

+The ESMF VM (Virtual Machine) class provides methods for querying information about a VM. A VM is a generic representation of hardware and system software resources. There is exactly one VM object per ESMF Component, providing the execution environment for the Component code. The VM class handles all resource management tasks for the Component class and provides a description of the underlying configuration of the compute resources used by a Component. In addition to resource description and management, the VM class offers the lowest level of ESMF communication methods. + +

+25 Time Manager Utility +

+ +

+The ESMF Time Manager utility includes software for time and time interval +representation, as well as model time advancement. Since multi-component +geophysical applications often require synchronization across +the time management schemes of the individual components, the +Time Manager's standard calendars and consistent time representation +promote component interoperability. +

+ + + + + + + + + +
+
+Key Features
Drift-free timekeeping through an integer-based internal time +representation. Both integers and reals can be specified at the interface.
Support for many calendar kinds.
Support for both concurrent and sequential modes of component execution.
+
+ +

+ +

+25.1 Time Manager Classes +

+There are four ESMF classes that represent time concepts: + +
    +
  • Calendar A Calendar can be used to keep track of the +date as an ESMF Gridded Component advances in time. Standard calendars +(such as Gregorian and 360-day) are supported. +
  • +
  • Time A Time represents a time instant in a particular +calendar, such as November 28, 1964, at 7:00pm EST in the Gregorian +calendar. The Time class can be used +to represent the start and stop time of a time integration. +
  • +
  • TimeInterval TimeIntervals represent a period +of time, such as 3 hours. Time steps can be represented +using TimeIntervals. +
  • +
  • Clock Clocks collect the parameters and +methods used for model time advancement into a convenient +package. A Clock can be queried for quantities such +as current simulation time and time step. Clock methods +include incrementing the current time, and printing the its contents. +
  • +
+ +

+ +

+25.2 Calendar +

+The set of supported calendars includes: +
+
Gregorian
+
The standard Gregorian calendar. +
+
no-leap
+
The Gregorian calendar with no leap years. +
+
Julian
+
The standard Julian date calendar. +
+
Julian Day
+
The standard Julian days calendar. +
+
Modified Julian Day
+
The Modified Julian days calendar. +
+
360-day
+
A 30-day-per-month, 12-month-per-year calendar. +
+
no calendar
+
Tracks only elapsed model time in hours, minutes, seconds. +
+
+See Section 26.1 for more details on supported standard +calendars, and how to create a customized ESMF Calendar. + +

+ +

+ +
+25.3 Time Instants and TimeIntervals +

+TimeIntervals and Time instants (simply called Times) are the computational +building blocks of the Time Manager utility. Times support different queries +for values of individual Time components such as year and hour. +See Sections 27.1 and 28.1, respectively, +for use of Times and TimeIntervals. + +

+ +

+25.4 Clocks +

+It is useful to identify a higher-level concept to repeatedly step a Time +forward by a TimeInterval. We refer to this capability as a Clock, and +include in its required features the ability to store the start and stop times +of a model run, and to query the value of quantities such as the current time +and the number of time steps taken. Applications may contain +temporary or multiple Clocks. Section 29.1 describes the use of +Clocks in detail. + +

+26 Calendar Class +

+ +

+26.1 Description +

+ +

+The Calendar class represents the standard calendars used in +geophysical modeling: Gregorian, Julian, Julian Day, Modified Julian Day, +no-leap, 360-day, and no-calendar. Brief descriptions are provided for each calendar below. + +

+26.2 Constants +

+ +

+ +

+ +

+ +
+26.2.1 ESMC_CALKIND +

+ +

+DESCRIPTION: +
+Supported calendar kinds. + +

+The type of this flag is: + +

+type(ESMF_CalKind_Flag) + +

+The valid values are: +

+
ESMC_CALKIND_360DAY
+
Valid range: machine limits +
+In the 360-day calendar, there are 12 months, each of which has 30 days. +Like the no-leap calendar, this is a simple approximation to the Gregorian +calendar sometimes used by modelers. + +

+

+
ESMC_CALKIND_GREGORIAN
+
Valid range: 3/1/4801 BC to 10/29/292,277,019,914 +
+The Gregorian calendar is the calendar currently in use +throughout Western countries. Named after Pope Gregory XIII, it is a minor +correction to the older Julian calendar. In the Gregorian calendar every +fourth year is a leap year in which February has 29 and not 28 days; +however, years divisible by 100 are not leap years unless they are also +divisible by 400. As in the Julian calendar, days begin at midnight. + +

+

+
ESMC_CALKIND_JULIAN
+
Valid range: 3/1/4713 BC to 4/24/292,271,018,333 +
+The Julian calendar was introduced by Julius Caesar in 46 B.C., and +reached its final form in 4 A.D. The Julian calendar differs from the +Gregorian only in the determination of leap years, lacking the correction +for years divisible by 100 and 400 in the Gregorian calendar. In the Julian +calendar, any year is a leap year if divisible by 4. Days are considered to +begin at midnight. + +

+

+
ESMC_CALKIND_JULIANDAY
+
Valid range: +/- 1x10$^{14}$ +
+Julian days simply enumerate the days and fraction of a day which +have elapsed since the start of the Julian era, defined as beginning at noon +on Monday, 1st January of year 4713 B.C. in the Julian calendar. Julian days, +unlike the dates in the Julian and Gregorian calendars, begin at noon. + +

+

+
ESMC_CALKIND_MODJULIANDAY
+
Valid range: +/- 1x10$^{14}$ +
+The Modified Julian Day (MJD) was introduced by space scientists in + the late 1950's. It is defined as an offset from the Julian Day (JD): + +

+MJD = JD - 2400000.5 + +

+The half day is subtracted so that the day starts at midnight. + +

+

+
ESMC_CALKIND_NOCALENDAR
+
Valid range: machine limits +
+The no-calendar option simply tracks the elapsed model time in seconds. + +

+

+
ESMC_CALKIND_NOLEAP
+
Valid range: machine limits +
+The no-leap calendar is the Gregorian calendar with no leap years - +February is always assumed to have 28 days. Modelers sometimes use this +calendar as a simple, close approximation to the Gregorian calendar. + +

+

+
+ +

+26.3 Class API +

+ +

+ +

+ +

+ +

+26.3.1 ESMC_CalendarCreate - Create a Calendar +

+ +

+ +

+
+INTERFACE: +

 ESMC_Calendar ESMC_CalendarCreate(
+   const char *name,                      // in
+   enum ESMC_CalKind_Flag calkindflag,    // in
+   int *rc                                // out
+ );
+
RETURN VALUE: +
    Newly created ESMC_Calendar object.
+
+DESCRIPTION: +
+ +

+Creates and sets a ESMC_Calendar object to the given built-in + ESMC_CalKind_Flag. + +

+The arguments are: +

+
[name]
+
The name for the newly created Calendar. If not specified, i.e. NULL, + a default unique name will be generated: "CalendarNNN" where NNN + is a unique sequence number from 001 to 999. + +
+
calkindflag
+
The built-in ESMC_CalKind_Flag. Valid values are: +
+ ESMC_CALKIND_360DAY, +
+ ESMC_CALKIND_GREGORIAN, +
+ ESMC_CALKIND_JULIAN, +
+ ESMC_CALKIND_JULIANDAY, +
+ ESMC_CALKIND_MODJULIANDAY, +
+ ESMC_CALKIND_NOCALENDAR, +
+and ESMC_CALKIND_NOLEAP. +
+See Section 26.2 for a description of each + calendar kind. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+26.3.2 ESMC_CalendarDestroy - Destroy a Calendar +

+ +

+ +

+
+INTERFACE: +

 int ESMC_CalendarDestroy(
+   ESMC_Calendar *calendar   // inout
+ );
+
RETURN VALUE: +
    Return code; equals ESMF_SUCCESS if there are no errors.
+
+DESCRIPTION: +
+ +

+Releases all resources associated with this ESMC_Calendar. + +

+The arguments are: +

+
calendar
+
Destroy contents of this ESMC_Calendar. + +
+
+ +

+ +

+ +

+26.3.3 ESMC_CalendarPrint - Print a Calendar +

+ +

+ +

+
+INTERFACE: +

 int ESMC_CalendarPrint(
+   ESMC_Calendar calendar   // in
+ );
+
RETURN VALUE: +
    Return code; equals ESMF_SUCCESS if there are no errors.
+
+DESCRIPTION: +
+ +

+Prints out an ESMC_Calendar's properties to stdio, + in support of testing and debugging. + +

+The arguments are: +

+
calendar
+
ESMC_Calendar object to be printed. + +
+
+ +

+ + +

+27 Time Class +

+ +

+27.1 Description +

+ +

+A Time represents a specific point in time. + +

+There are Time methods defined for setting and getting a Time. + +

+A Time that is specified in hours does not need to be associated with a +standard calendar; use ESMC_CALKIND_NOCALENDAR. A Time whose specification +includes time units of a year must be associated with a standard calendar. +The ESMF representation of a calendar, the Calendar class, is described in +Section 26.1. The ESMC_TimeSet method is used to +initialize a Time as well as associate it with a Calendar. If a Time method +is invoked in which a Calendar is necessary and one has not been set, the +ESMF method will return an error condition. + +

+In the ESMF the TimeInterval class is used to represent time periods. +This class is frequently used in combination with the Time class. +The Clock class, for example, advances model time by incrementing a +Time with a TimeInterval. + +

+27.2 Class API +

+ +

+ +

+ +

+ +

+27.2.1 ESMC_TimeGet - Get a Time value +

+ +

+ +

+
+INTERFACE: +

 int ESMC_TimeGet(
+   ESMC_Time time,                         // in
+   ESMC_I4 *yy,                            // out
+   ESMC_I4 *h,                             // out
+   ESMC_Calendar *calendar,                // out
+   enum ESMC_CalKind_Flag *calkindflag,    // out
+   int *timeZone                           // out
+ );
+
RETURN VALUE: +
    Return code; equals ESMF_SUCCESS if there are no errors.
+
+DESCRIPTION: +
+ +

+Gets the value of an ESMC_Time in units specified by the user. + +

+The arguments are: +

+
time
+
ESMC_Time object to be queried. + +
+
[yy]
+
Integer year (>= 32-bit). + +
+
[h]
+
Integer hours. + +
+
[calendar]
+
Associated ESMC_Calendar. + +
+
[calkindflag]
+
Associated ESMC_CalKind_Flag. + +
+
+ +

+ +

+ +

+27.2.2 ESMC_TimePrint - Print a Time +

+ +

+ +

+
+INTERFACE: +

 int ESMC_TimePrint(
+   ESMC_Time time   // in
+ );
+
RETURN VALUE: +
    Return code; equals ESMF_SUCCESS if there are no errors.
+
+DESCRIPTION: +
+ +

+Prints out an ESMC_Time's properties to stdio, + in support of testing and debugging. + +

+The arguments are: +

+
time
+
ESMC_Time object to be printed. + +
+
+ +

+ +

+ +

+27.2.3 ESMC_TimeSet - Initialize or set a Time +

+ +

+ +

+
+INTERFACE: +

 int ESMC_TimeSet(
+   ESMC_Time *time,                       // inout
+   ESMC_I4 yy,                            // in
+   ESMC_I4 h,                             // in
+   ESMC_Calendar calendar,                // in
+   enum ESMC_CalKind_Flag calkindflag,    // in
+   int timeZone                           // in
+ );
+
RETURN VALUE: +
    Return code; equals ESMF_SUCCESS if there are no errors.
+
+DESCRIPTION: +
+ +

+Initializes an ESMC_Time with a set of user-specified units. + +

+The arguments are: +

+
time
+
ESMC_Time object to initialize or set. + +
+
yy
+
Integer year (>= 32-bit). + +
+
h
+
Integer hours. + +
+
calendar
+
Associated ESMC_Calendar. If not created, defaults to calendar + ESMC_CALKIND_NOCALENDAR or default specified in + ESMC_Initialize(). If created, has precedence over + calkindflag below. + +
+
calkindflag
+
Specifies associated ESMC_Calendar if calendar argument above + not created. More convenient way of specifying a built-in calendar kind. + +
+
+ +

+ + +

+28 TimeInterval Class +

+ +

+28.1 Description +

+ +

+A TimeInterval represents a period between time instants. +It can be either positive or negative. + +

+There are TimeInterval methods defined for setting and getting +a TimeInterval, for printing the contents of a TimeInterval. + +

+The class used to represent time instants in ESMF is Time, +and this class is frequently used in operations along with +TimeIntervals. The Clock class, for example, advances model time by +incrementing a Time with a TimeInterval. + +

+TimeIntervals are used by other parts of the ESMF timekeeping +system, such as Clocks; see Section 29.1. + +

+28.2 Class API +

+ +

+ +

+ +

+ +

+28.2.1 ESMC_TimeIntervalGet - Get a TimeInterval value +

+ +

+ +

+
+INTERFACE: +

 int ESMC_TimeIntervalGet(
+   ESMC_TimeInterval timeinterval,   // in
+   ESMC_I8 *s_i8,                    // out
+   ESMC_R8 *h_r8                     // out
+ );
+
RETURN VALUE: +
    Return code; equals ESMF_SUCCESS if there are no errors.
+
+DESCRIPTION: +
+ +

+Gets the value of an ESMC_TimeInteval in units specified by the user. + +

+The arguments are: +

+
timeinterval
+
ESMC_TimeInterval object to be queried. + +
+
[s_i8]
+
Integer seconds (large, >= 64-bit). + +
+
[h_r8]
+
Double precision hours. + +
+
+ +

+ +

+ +

+28.2.2 ESMC_TimeIntervalPrint - Print a TimeInterval +

+ +

+ +

+
+INTERFACE: +

 int ESMC_TimeIntervalPrint(
+   ESMC_TimeInterval timeinterval   // in
+ );
+
RETURN VALUE: +
    Return code; equals ESMF_SUCCESS if there are no errors.
+
+DESCRIPTION: +
+ +

+Prints out an ESMC_TimeInterval's properties to stdio, + in support of testing and debugging. + +

+The arguments are: +

+
timeinterval
+
ESMC_TimeInterval object to be printed. + +
+
+ +

+ +

+ +

+28.2.3 ESMC_TimeIntervalSet - Initialize or set a TimeInterval +

+ +

+ +

+
+INTERFACE: +

 int ESMC_TimeIntervalSet(
+   ESMC_TimeInterval *timeinterval,   // inout
+   ESMC_I4 h                          // in
+ );
+
RETURN VALUE: +
    Return code; equals ESMF_SUCCESS if there are no errors.
+
+DESCRIPTION: +
+ +

+Sets the value of the ESMC_TimeInterval in units specified by + the user. + +

+The arguments are: +

+
timeinterval
+
ESMC_TimeInterval object to initialize or set. + +
+
h
+
Integer hours. + +
+
+ +

+ + +

+29 Clock Class +

+ +

+29.1 Description +

+ +

+ +

+The Clock class advances model time and tracks its associated +date on a specified Calendar. It stores start time, stop time, +current time, and a time step. + +

+There are methods for setting and getting the Times associated +with a Clock. Methods are defined for advancing the Clock's +current time and printing a Clock's contents. + +

+29.2 Class API +

+ +

+ +

+ +

+ +

+29.2.1 ESMC_ClockAdvance - Advance a Clock's current time by one time step +

+ +

+ +

+
+INTERFACE: +

 int ESMC_ClockAdvance(
+   ESMC_Clock clock   // in
+ );
+
RETURN VALUE: +
    Return code; equals ESMF_SUCCESS if there are no errors.
+
+DESCRIPTION: +
+ +

+Advances the ESMC_Clock's current time by one time step. + +

+The arguments are: +

+
clock
+
ESMC_Clock object to be advanced. + +
+
+ +

+ +

+ +

+29.2.2 ESMC_ClockCreate - Create a Clock +

+ +

+ +

+
+INTERFACE: +

 ESMC_Clock ESMC_ClockCreate(
+   const char *name,             // in
+   ESMC_TimeInterval timeStep,   // in
+   ESMC_Time startTime,          // in
+   ESMC_Time stopTime,           // in
+   int *rc                       // out
+ );
+
RETURN VALUE: +
    Newly created ESMC_Clock object.
+
+DESCRIPTION: +
+ +

+Creates and sets the initial values in a new ESMC_Clock object. + +

+The arguments are: +

+
[name]
+
The name for the newly created Clock. If not specified, i.e. NULL, + a default unique name will be generated: "ClockNNN" where NNN + is a unique sequence number from 001 to 999. + +
+
timeStep
+
The ESMC_Clock's time step interval, which can be + positive or negative. + +
+
startTime
+
The ESMC_Clock's starting time. Can be less than or + or greater than stopTime, depending on a positive or negative + timeStep, respectively, and whether a stopTime is specified; + see below. + +
+
stopTime
+
The ESMC_Clock's stopping time. Can be greater than or + less than the startTime, depending on a positive or negative + timeStep, respectively. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+29.2.3 ESMC_ClockDestroy - Destroy a Clock +

+ +

+ +

+
+INTERFACE: +

 int ESMC_ClockDestroy(
+   ESMC_Clock *clock   // inout
+ );
+
RETURN VALUE: +
    Return code; equals ESMF_SUCCESS if there are no errors.
+
+DESCRIPTION: +
+ +

+Releases all resources associated with this ESMC_Clock. + +

+The arguments are: +

+
clock
+
Destroy contents of this ESMC_Clock. + +
+
+ +

+ +

+ +

+29.2.4 ESMC_ClockGet - Get a Clock's properties +

+ +

+ +

+
+INTERFACE: +

 int ESMC_ClockGet(
+   ESMC_Clock clock,                 // in
+   ESMC_TimeInterval *currSimTime,   // out
+   ESMC_I8 *advanceCount             // out
+ );
+
RETURN VALUE: +
    Return code; equals ESMF_SUCCESS if there are no errors.
+
+DESCRIPTION: +
+ +

+Gets one or more of the properties of an ESMC_Clock. + +

+The arguments are: +

+
clock
+
ESMC_Clock object to be queried. + +
+
[currSimTime]
+
The current simulation time. + +
+
[advanceCount]
+
The number of times the ESMC_Clock has been advanced. + +
+
+ +

+ +

+ +

+29.2.5 ESMC_ClockPrint - Print the contents of a Clock +

+ +

+ +

+
+INTERFACE: +

 int ESMC_ClockPrint(
+   ESMC_Clock clock   // in
+ );
+
RETURN VALUE: +
    Return code; equals ESMF_SUCCESS if there are no errors.
+
+DESCRIPTION: +
+ +

+Prints out an ESMC_Clock's properties to stdio, + in support of testing and debugging. + +

+The arguments are: +

+
clock
+
ESMC_Clock object to be printed. + +
+
+ +

+ + +

+30 Config Class +

+ +

+30.1 Description +

+ +

+ +

+ESMF Configuration Management is based on NASA DAO's +Inpak 90 package, a Fortran 90 collection of routines/functions +for accessing Resource Files in ASCII format.The package +is optimized for minimizing formatted I/O, performing all of its +string operations in memory using Fortran intrinsic functions. +
+

+ +

+30.1.1 Package history +

+ +

+The ESMF Configuration Management Package was evolved by +Leonid Zaslavsky and Arlindo da Silva from Ipack90 package +created by Arlindo da Silva at NASA DAO. + +

+Back in the 70's Eli Isaacson wrote IOPACK in Fortran +66. In June of 1987 Arlindo da Silva wrote Inpak77 using +Fortran 77 string functions; Inpak 77 is a vastly +simplified IOPACK, but has its own goodies not found in +IOPACK. Inpak 90 removes some obsolete functionality in +Inpak77, and parses the whole resource file in memory for +performance. + +

+30.2 Class API +

+ +

+ +

+ +

+ +

+30.2.1 ESMC_ConfigCreate - Create a Config object +

+ +

+ +

+
+INTERFACE: +

 ESMC_Config ESMC_ConfigCreate(
+   int* rc                    // out
+ );
+
RETURN VALUE: +
    ESMC_Config*  to newly allocated ESMC_Config
+
+DESCRIPTION: +
+ +

+Creates an ESMC_Config for use in subsequent calls. + +

+The arguments are: +

+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+30.2.2 ESMC_ConfigDestroy - Destroy a Config object +

+ +

+ +

+
+INTERFACE: +

 int ESMC_ConfigDestroy(
+   ESMC_Config* config        // in
+ );
+
RETURN VALUE: +
    Return code; equals ESMF_SUCCESS if there are no errors.
+
+DESCRIPTION: +
+ +

+Destroys the config object. + +

+The arguments are: +

+
config
+
Already created ESMC_Config object to destroy. + +
+
+ +

+ +

+ +

+30.2.3 ESMC_ConfigCreate - Create a Config object from a section of an existing Config object +

+ +

+ +

+
+INTERFACE: +

 ESMC_Config ESMC_ConfigCreateFromSection(
+   ESMC_Config config,       // in
+   const char* olabel,       // in
+   const char* clabel,       // in
+   int* rc                   // out
+ );
+
RETURN VALUE: +
    ESMC_Config*  to newly allocated ESMC_Config
+
+DESCRIPTION: +
+ +

+Instantiates an ESMC_Config object from a section of an existing + ESMC_Config object delimited by openlabel and closelabel. + An error is returned if neither of the input labels is found in input + config. + +

+Note that a section is intended as the content of a given ESMC_Config + object delimited by two distinct labels. Such content, as well as each of the + surrounding labels, are still within the scope of the parent ESMC_Config + object. Therefore, including in a section labels used outside that + section should be done carefully to prevent parsing conflicts. + +

+The arguments are: +

+
config
+
The input ESMC_Config object. + +
+
openlabel
+
Label marking the beginning of a section in config. + +
+
closelabel
+
Label marking the end of a section in config. + +
+
+ +

+ +

+ +

+30.2.4 ESMC_ConfigFindLabel - Find a label +

+ +

+ +

+
+INTERFACE: +

 int ESMC_ConfigFindLabel(
+   ESMC_Config config,        // in
+   const char* label,         // in
+   int *isPresent             // out
+ );
+
RETURN VALUE: +
    Return code; equals ESMF_SUCCESS if there are no errors.
+    If label not found, and the {\tt isPresent} pointer is {\tt NULL},
+    an error will be returned.
+
+DESCRIPTION: +
+ +

+Finds the label (key) in the config file. + +

+Since the search is done by looking for a word in the + whole resource file, it is important to use special + conventions to distinguish labels from other words + in the resource files. The DAO convention is to finish + line labels by : and table labels by ::. + +

+The arguments are: +

+
config
+
Already created ESMC_Config object. + +
+
label
+
Identifying label. + +
+
[isPresent]
+
Label presence flag. (optional). If non-NULL, the target is + set to 1 when the label is found; otherwise set to 0. + +
+
+ +

+ +

+ +

+30.2.5 ESMC_ConfigFindNextLabel - Find a label +

+ +

+ +

+
+INTERFACE: +

 int ESMC_ConfigFindNextLabel(
+   ESMC_Config config,        // in
+   const char* label,         // in
+   int *isPresent             // out
+ );
+
RETURN VALUE: +
    Return code; equals ESMF_SUCCESS if there are no errors.
+    If label not found, and the {\tt isPresent} pointer is {\tt NULL},
+    an error will be returned.
+
+DESCRIPTION: +
+ +

+Finds the label (key) string in the config object, + starting from the current position pointer. + +

+This method is equivalent to ESMC_ConfigFindLabel, but the search + is performed starting from the current position pointer. + +

+The arguments are: +

+
config
+
Already created ESMC_Config object. + +
+
label
+
Identifying label. + +
+
isPresent
+
If non-NULL, the address specified is given a value of 1 if the + label is found, and 0 when the label is not found. + +
+
+ +

+ +

+ +

+30.2.6 ESMC_ConfigGetDim - Get table sizes +

+ +

+ +

+
+INTERFACE: +

 int ESMC_ConfigGetDim(
+   ESMC_Config config,        // in
+   int* lineCount,            // out
+   int* columnCount,          // out
+   ...                        // optional argument list
+ );
+
RETURN VALUE: +
    Return code; equals ESMF_SUCCESS if there are no errors.
+
+DESCRIPTION: +
+ +

+Returns the number of lines in the table in lineCount and + the maximum number of words in a table line in columnCount. + +

+The arguments are: +

+
config
+
Already created ESMC_Config object. + +
+
lineCount
+
Returned number of lines in the table. + +
+
columnCount
+
Returned maximum number of words in a table line. + +
+
[label]
+
Identifying label (optional). + +
+
+ +

+Due to this method accepting optional arguments, the final argument + must be ESMC_ArgLast. + +

+ +

+ +

+30.2.7 ESMC_ConfigGetLen - Get the length of the line in words +

+ +

+ +

+
+INTERFACE: +

 int ESMC_ConfigGetLen(
+   ESMC_Config config,        // in
+   int* wordCount,            // out
+   ...                        // optional argument list
+ );
+
RETURN VALUE: +
    Return code; equals ESMF_SUCCESS if there are no errors.
+
+DESCRIPTION: +
+ +

+Gets the length of the line in words by counting words + disregarding types. Returns the word count as an integer. + +

+The arguments are: +

+
config
+
Already created ESMC_Config object. + +
+
wordCount
+
Returned number of words in the line. + +
+
[label]
+
Identifying label. If not specified, use the current line (optional). + +
+
+ +

+Due to this method accepting optional arguments, the final argument + must be ESMC_ArgLast. + +

+ +

+ +

+30.2.8 ESMC_ConfigLoadFile - Load resource file into memory +

+ +

+ +

+
+INTERFACE: +

 int ESMC_ConfigLoadFile(
+   ESMC_Config config,        // in
+   const char* file,          // in
+   ...                        // optional argument list
+ );
+
RETURN VALUE: +
    Return code; equals ESMF_SUCCESS if there are no errors.
+
+DESCRIPTION: +
+ +

+Resource file with filename is loaded into memory. + +

+The arguments are: +

+
config
+
Already created ESMC_Config object. + +
+
file
+
Configuration file name. + +
+
[delayout]
+
ESMC_DELayout associated with this config object. + **NOTE: This argument is not currently supported. + +
+
[unique]
+
If specified as true, uniqueness of labels are checked and + error code set if duplicates found (optional). + +
+
+ +

+Due to this method accepting optional arguments, the final argument + must be ESMC_ArgLast. + +

+ +

+ +

+30.2.9 ESMC_ConfigNextLine - Find next line +

+ +

+ +

+
+INTERFACE: +

 int ESMC_ConfigNextLine(
+   ESMC_Config config,       // in
+   int *tableEnd             // out
+ );
+
RETURN VALUE: +
    Return code; equals ESMF_SUCCESS if there are no errors.
+
+DESCRIPTION: +
+ +

+Selects the next line (for tables). + +

+The arguments are: +

+
config
+
Already created ESMC_Config object. + +
+
[tableEnd]
+
End of table mark (::) found flag. Returns 1 when found, and 0 when + not found. + +
+
+ +

+ +

+ +

+30.2.10 ESMC_ConfigPrint - Write content of config object to standard output +

+ +

+ +

+
+INTERFACE: +

 int ESMC_ConfigPrint(
+   ESMC_Config config        // in
+ );
+
RETURN VALUE: +
    Return code; equals ESMF_SUCCESS if there are no errors.
+
+DESCRIPTION: +
+ +

+Write content of a ESMC_Config object to standard output. + +

+The arguments are: +

+
config
+
Already created ESMC_Config object. + +
+
+ +

+ +

+ +

+30.2.11 ESMC_ConfigValidate - Validate a Config object +

+ +

+ +

+
+INTERFACE: +

 int ESMC_ConfigValidate(
+   ESMC_Config config,        // in
+   ...                        // optional argument list
+ );
+
RETURN VALUE: +
    Return code; equals ESMF_SUCCESS if there are no errors.
+    Equals ESMF_RC_ATTR_UNUSED if any unused attributes are found
+    with option "unusedAttributes" below.
+
+DESCRIPTION: +
+ +

+Checks whether a config object is valid. + +

+The arguments are: +

+
config
+
Already created ESMC_Config object. + +
+
[options]
+
If none specified: simply check that the buffer is not full and the + pointers are within range (optional). + "unusedAttributes" - Report to the default logfile all attributes not + retrieved via a call to ESMC_ConfigGetAttribute() or + ESMC_ConfigGetChar(). The attribute name (label) will be + logged via ESMC_LogErr with the WARNING log message type. + For an array-valued attribute, retrieving at least one value via + ESMC_ConfigGetAttribute() or ESMC_ConfigGetChar() + constitutes being "used." + +
+
+ +

+Due to this method accepting optional arguments, the final argument + must be ESMC_ArgLast. + +

+ + +

+31 Log Class +

+ +

+31.1 Description +

+ +

+ +

+The Log class consists of a variety of methods for writing error, warning, and +informational messages to files. A default Log is created at ESMF +initialization. + +

+When ESMF is started with ESMC_Initialize(), multiple Log files will +be created by PET number. The PET number (in the format +PETx.) will be prepended to each file name where x is the PET number. +The ESMC_LogWrite() call is used to issue messages to the log. As +part of the call, a message can be tagged as either an informational, +warning, or error message. + +

+The messages may be buffered within ESMF before appearing in the log. +All messages will be properly flushed to the log files when ESMC_Finalize() +is called. + +

+31.2 Constants +

+ +

+ +

+ +
+31.2.1 ESMC_LOGKIND +

+ +

+DESCRIPTION: +
+Specifies a single log file, multiple log files (one per PET), or no log files. + +

+The valid values are: +

+
ESMC_LOGKIND_SINGLE
+
Use a single log file, combining messages from all of the PETs. Not supported on some platforms. + +
+
ESMC_LOGKIND_MULTI
+
Use multiple log files -- one per PET. + +
+
ESMC_LOGKIND_NONE
+
Do not issue messages to a log file. +
+
+ +

+ +

+ +
+31.2.2 ESMC_LOGMSG +

+ +

+DESCRIPTION: +
+ +Specifies a message level. + +

+The valid values are: +

+
ESMC_LOGMSG_INFO
+
Informational messages + +
+
ESMC_LOGMSG_WARNING
+
Warning messages + +
+
ESMC_LOGMSG_ERROR
+
Error messages + +
+
ESMC_LOGMSG_TRACE
+
Trace messages + +
+
ESMC_LOGMSG_DEBUG
+
Debug messages + +
+
ESMC_LOGMSG_JSON
+
JSON format messages +
+
+ +

+31.3 Class API +

+ +

+ +

+ +

+ +

+31.3.1 ESMC_LogWrite - Write an entry into the Log file +

+ +

+ +

+
+INTERFACE: +

 int ESMC_LogWrite(
+   const char msg[], // in
+   int msgtype       // in
+ );
+
RETURN VALUE: +
    Return code; equals ESMF_SUCCESS if there are no errors.
+
+DESCRIPTION: +
+ +

+Write an entry into the Log file. + +

+The arguments are: +

+
msg
+
The message to be written. + +
+
msgtype
+
The message type. This flag is documented in section 31.2.2 + +
+
+ +

+ +

+ +

+31.3.2 ESMC_LogSet - Set Log properties +

+ +

+ +

+
+INTERFACE: +

 int ESMC_LogSet(
+   int flush       // in
+ );
+
RETURN VALUE: +
    Return code; equals ESMF_SUCCESS if there are no errors.
+
+DESCRIPTION: +
+ +

+Set Log properties. + +

+The arguments are: +

+
flush
+
If set to ESMF_TRUE, flush log messages immediately, rather than buffering + them. Default is to flush after 10 messages. + +
+
+ +

+ + +

+32 VM Class +

+ +

+32.1 Description +

+ +

+The ESMF VM (Virtual Machine) class is a generic representation of hardware and system software resources. There is exactly one VM object per ESMF Component, providing the execution environment for the Component code. The VM class handles all resource management tasks for the Component class and provides a description of the underlying configuration of the compute resources used by a Component. + +

+In addition to resource description and management, the VM class offers the lowest level of ESMF communication methods. The VM communication calls are very similar to MPI. Data references in VM communication calls must be provided as raw, language-specific, one-dimensional, contiguous data arrays. The similarity between VM and MPI communication calls is striking and there are many equivalent point-to-point and collective communication calls. However, unlike MPI, the VM communication calls support communication between threaded PETs in a completely transparent fashion. + +

+Many ESMF applications do not interact with the VM class directly very much. The resource management aspect is wrapped completely transparent into the ESMF Component concept. Often the only reason that user code queries a Component +object for the associated VM object is to inquire about resource information, such as the localPet or the petCount. Further, for most applications the use of higher level communication APIs, such as provided by Array and Field, are much more convenient than using the low level VM communication calls. + +

+The basic elements of a VM are called PETs, which stands for Persistent Execution Threads. These are equivalent to OS threads with a lifetime of at least that of the associated component. All VM functionality is expressed in terms of PETs. In the simplest, and most common case, a PET is equivalent to an MPI process. However, ESMF also supports multi-threading, where multiple PETs run as Pthreads inside the same virtual address space (VAS). + +

+32.2 Class API +

+ +

+ +

+ +

+ +

+32.2.1 ESMC_VMBarrier - block calling PETs until all PETS called +

+ +

+ +

+
+INTERFACE: +

 int ESMC_VMBarrier(
+   ESMC_VM vm                   // in
+ );
+
RETURN VALUE: +
    Return code; equals ESMF_SUCCESS if there are no errors.
+
+DESCRIPTION: +
+ +

+Collective ESMC_VM communication call that blocks calling PET until + all PETs of the VM context have issued the call. + +

+The arguments are: +

+
vm
+
Queried ESMC_VM object. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+32.2.2 ESMC_VMBroadcast - Broadcast data across the VM +

+ +

+ +

+
+INTERFACE: +

 int ESMC_VMBroadcast(ESMC_VM vm,
+                   void *bcstData,
+                   int count,
+                   enum ESMC_TypeKind_Flag *typekind,
+                   int rootPet);
+
RETURN VALUE: +
    Return code; equals ESMF_SUCCESS if there are no errors.
+
+DESCRIPTION: +
+ +

+Collective ESMC_VM communication call that broadcasts a contiguous + data array from rootPet to all other PETs of the ESMC_VM + object. + +

+This method is overloaded for: + ESMC_TYPEKIND_I4, ESMC_TYPEKIND_I8, + ESMC_TYPEKIND_R4, ESMC_TYPEKIND_R8, + ESMC_TYPEKIND_LOGICAL. + +

+The arguments are: +

+
vm
+
ESMC_VM object. + +
+
bcstData
+
Contiguous data array. On rootPet bcstData holds data that + is to be broadcasted to all other PETs. On all other PETs + bcstData is used to receive the broadcasted data. + +
+
count
+
Number of elements in bcstData. Must be the same on all PETs. + +
+
typekind
+
The typekind of the data to be reduced. See section + 34.18 for a list of valid typekind options. + +
+
rootPet
+
PET that holds data that is being broadcast. + +
+
+ +

+ +

+ +

+32.2.3 ESMC_VMGet - Get VM internals +

+ +

+ +

+
+INTERFACE: +

 int ESMC_VMGet(
+   ESMC_VM vm,                   // in
+   int *localPet,                // out
+   int *petCount,                // out
+   int *peCount,                 // out
+   MPI_Comm *mpiCommunicator,    // out
+   int *pthreadsEnabledFlag,     // out
+   int *openMPEnabledFlag        // out
+ );
+
RETURN VALUE: +
    Return code; equals ESMF_SUCCESS if there are no errors.
+
+DESCRIPTION: +
+ +

+Get internal information about the specified ESMC_VM object. + +

+The arguments are: +

+
vm
+
Queried ESMC_VM object. + +
+
[localPet]
+
Upon return this holds the id of the PET that issued this call. + +
+
[petCount]
+
Upon return this holds the number of PETs in the specified ESMC_VM + object. + +
+
[peCount]
+
Upon return this holds the number of PEs referenced by the specified + ESMC_VM object. + +
+
[mpiCommunicator]
+
Upon return this holds the MPI intra-communicator used by the + specified ESMC_VM object. This communicator may be used for + user-level MPI communications. It is recommended that the user + duplicates the communicator via MPI_Comm_Dup() in order to + prevent any interference with ESMC communications. + +
+
[pthreadsEnabledFlag]
+
A return value of '1' indicates that the ESMF library was compiled with + Pthreads enabled. A return value of '0' indicates that Pthreads are + disabled in the ESMF library. + +
+
[openMPEnabledFlag]
+
A return value of '1' indicates that the ESMF library was compiled with + OpenMP enabled. A return value of '0' indicates that OpenMP is + disabled in the ESMF library. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+32.2.4 ESMC_VMGetCurrent - Get current VM +

+ +

+ +

+
+INTERFACE: +

 ESMC_VM ESMC_VMGetCurrent(
+   int *rc                     // out
+ );
+
RETURN VALUE: +
    VM object of the current execution context.
+
+DESCRIPTION: +
+ +

+Get the ESMC_VM object of the current execution context. Calling + ESMC_VMGetCurrent() within an ESMC Component, will return the + same VM object as ESMC_GridCompGet(..., vm=vm, ...) or + ESMC_CplCompGet(..., vm=vm, ...). + +

+The main purpose of providing ESMC_VMGetCurrent() is to simplify ESMF + adoption in legacy code. Specifically, code that uses MPI_COMM_WORLD + deep within its calling tree can easily be modified to use the correct MPI + communicator of the current ESMF execution context. The advantage is that + these modifications are very local, and do not require wide reaching + interface changes in the legacy code to pass down the ESMF component object, + or the MPI communicator. + +

+The use of ESMC_VMGetCurrent() is strongly discouraged in newly + written Component code. Instead, the ESMF Component object should be used as + the appropriate container of ESMF context information. This object should be + passed between the subroutines of a Component, and be queried for any + Component specific information. + +

+Outside of a Component context, i.e. within the driver context, the call + to ESMC_VMGetCurrent() is identical to ESMC_VMGetGlobal(). +
+ +

+The arguments are: +

+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+32.2.5 ESMC_VMGetGlobal - Get global VM +

+ +

+ +

+
+INTERFACE: +

 ESMC_VM ESMC_VMGetGlobal(
+   int *rc                     // out
+ );
+
RETURN VALUE: +
    VM object of the global execution context.
+
+DESCRIPTION: +
+ +

+Get the global ESMC_VM object. This is the VM object + that is created during ESMC_Initialize() and is the ultimate + parent of all VM objects in an ESMF application. It is identical to the VM + object returned by ESMC_Initialize(..., vm=vm, ...). + +

+The ESMC_VMGetGlobal() call provides access to information about the + global execution context via the global VM. This call is necessary because + ESMF does not create a global ESMF Component during + ESMC_Initialize() that could be queried for information about + the global execution context of an ESMF application. + +

+Usage of ESMC_VMGetGlobal() from within Component code is + strongly discouraged. ESMF Components should only access their own VM + objects through Component methods. Global information, if required by + the Component user code, should be passed down to the Component from the + driver through the Component calling interface. +
+ +

+The arguments are: +

+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+32.2.6 ESMC_VMLogMemInfo - Log memory measurements to file +

+ +

+ +

+
+INTERFACE: +

 int ESMC_VMLogMemInfo(
+   const char *prefix                // in
+ );
+
RETURN VALUE: +
    Return code; equals ESMF_SUCCESS if there are no errors.
+
+DESCRIPTION: +
+ +

+Write memory info to the log file. + +

+The arguments are: +

+
prefix
+
String value to indicate the location of the memory measurement + +
+
+ +

+ +

+ +

+32.2.7 ESMC_VMPrint - Print a VM +

+ +

+ +

+
+INTERFACE: +

 int ESMC_VMPrint(
+   ESMC_VM vm                // in
+ );
+
RETURN VALUE: +
    Return code; equals ESMF_SUCCESS if there are no errors.
+
+DESCRIPTION: +
+ +

+Print internal information of the specified ESMC_VM object. + +

+The arguments are: +

+
vm
+
ESMC_VM object to be printed. + +
+
+ +

+ +

+ +

+32.2.8 ESMC_VMReduce - Reduce data from across the VM +

+ +

+ +

+
+INTERFACE: +

 int ESMC_VMReduce(ESMC_VM vm,
+                   void *sendData,
+                   void *recvData,
+                   int count,
+                   enum ESMC_TypeKind_Flag *typekind,
+                   enum ESMC_Reduce_Flag *reduceflag,
+                   int rootPet);
+
RETURN VALUE: +
    Return code; equals ESMF_SUCCESS if there are no errors.
+
+DESCRIPTION: +
+ +

+Collective ESMC_VM communication call that reduces a contiguous data + array across the ESMC_VM object into a contiguous data array of + the same <type><kind>. The result array is returned on rootPet. + Different reduction operations can be specified. + +

+This method is overloaded for: + ESMC_TYPEKIND_I4, ESMC_TYPEKIND_I8, + ESMC_TYPEKIND_R4, ESMC_TYPEKIND_R8. + +

+The arguments are: +

+
vm
+
ESMC_VM object. + +
+
sendData
+
Contiguous data array holding data to be sent. All PETs must specify a + valid source array. + +
+
recvData
+
Contiguous data array for data to be received. Only the recvData + array specified by the rootPet will be used by this method. + +
+
count
+
Number of elements in sendData and recvData. Must be the same on all PETs. + +
+
typekind
+
The typekind of the data to be reduced. See section + 34.18 for a list of valid typekind options. + +
+
reduceflag
+
Reduction operation. See section 34.14 for a list of + valid reduce operations. + +
+
rootPet
+
PET on which reduced data is returned. + +
+
+ +

+ + +

+33 Profiling and Tracing +

+ +

+33.1 Description +

+ +

+ +

+ +
+33.1.1 Profiling +

+ +

+ESMF's built in profiling capability collects runtime statistics +of an executing ESMF application through both automatic and manual code +instrumentation. Timing information for all phases of all ESMF components +executing in an application can be automatically collected using the +ESMF_RUNTIME_PROFILE environment variable (see below for settings). +Additionally, arbitrary user-defined code regions can be timed by +manually instrumenting code with special API calls. Timing profiles +of component phases and user-defined regions can be output in several +different formats: + +

    +
  • in text at the end of ESMF Log files +
  • +
  • in separate text file, one per PET (if the ESMF Logs are turned off) +
  • +
  • in a single summary text file that aggregates timings over multiple PETs +
  • +
  • in a binary format for import into the esmf-profiler +for profile visualization +
  • +
+ +

+The following table lists important environment variables that control +aspects of ESMF profiling. + +

+ + + + + + + + + + + + + + + + + + + + + +
Environment VariableDescriptionExample ValuesDefault
ESMF_RUNTIME_PROFILEEnable/disables all profiling functionsON or OFFOFF
ESMF_RUNTIME_PROFILE_PETLISTLimits profiling to an explicit list of PETs0-9 50 99profile all PETs
ESMF_RUNTIME_PROFILE_OUTPUTControls output format of profiles; multiple can be specified in a space separated listTEXT, SUMMARY, BINARYTEXT
+ +

+ +

+ +
+33.1.2 Tracing +

+ +

+Whereas profiling collects summary information from an application, +tracing records a more detailed set of events for later analysis. Trace +analysis can be used to understand what happened during a program's +execution and is often used for diagnosing problems, debugging, and +performance analysis. + +

+ESMF has a built-in tracing capability that records events into special +binary log files. Unlike log files written by the ESMF_Log class, +which are primarily for human consumption (see Section 31.1), +the trace output files are +recorded in a compact binary representation and are processed by tools +to produce various analyses. ESMF event streams are recorded in the +Common Trace Format +(CTF). +CTF traces include one or more event streams, +as well as a metadata file describing the events in the streams. + +

+Several tools are available for reading in the CTF traces output by ESMF. +Of the tools listed below, the first one is designed specifically for +analyzing ESMF applications and the second two are general purpose tools +for working with all CTF traces. + +

    +
  • esmf-profiler +is a tool that ingests traces from an ESMF application and generates + performance profile plots. +
  • +
  • TraceCompass +is a general purpose tool for reading, analyzing, and visualizing traces. +
  • +
  • Babeltrace +is a command-line tool and library for trace conversion + that can read and write CTF traces. Python bindings are available + to open CTF traces are iterate through events. +
  • +
+ +

+Events that can be captured by the ESMF tracer include the following. Events +are recorded with a high-precision timestamp to allow timing analyses. +

+
phase_enter
+
indicates entry into an initialize, run, or finalize ESMF component routine +
+
phase_exit
+
indicates exit from an initialize, run, or finalize ESMF component routine +
+
region_enter
+
indicates entry into a user-defined code region +
+
region_exit
+
indicates exit from a user-defined code region +
+
+ +

+The following table lists important environment variables that control +aspects of ESMF tracing. + +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Environment VariableDescriptionExample ValuesDefault
ESMF_RUNTIME_TRACEEnable/disables all tracing functionsON or OFFOFF
ESMF_RUNTIME_TRACE_CLOCKSets the type of clock for timestamping events (see Section [*]).REALTIME or MONOTONIC or MONOTONIC_SYNCREALTIME
ESMF_RUNTIME_TRACE_PETLISTLimits tracing to an explicit list of PETs0-9 50 99trace all PETs
ESMF_RUNTIME_TRACE_COMPONENTEnables/disable tracing of Component phase_enter and phase_exit eventsON or OFFON
ESMF_RUNTIME_TRACE_FLUSHControls frequency of event stream flushing to fileDEFAULT or EAGERDEFAULT
+ +

+ +

+33.2 Restrictions and Future Work +

+ +

+ +

    +
  1. Limited types of trace events. + Currently only a few trace event types are available. The tracer may + be extended in the future to record additional types of events. +
  2. +
  3. MPI call profing not available for statically linked executables on Darwin. + Currently the linker on Darwin systems does not support the wrapping of + symbols during static linking. In order to access MPI call profiling on Darwin, + executables should be linked dynamically in combination with the procedure + described in section [*]. +
  4. +
+ +

+ +

+33.3 Class API +

+ +

+ +

+ +

+ +

+33.3.1 ESMC_TraceRegionEnter - Enter a trace region +

+ +

+ +

+
+INTERFACE: +

 int ESMC_TraceRegionEnter(
+   const char* name  // in
+ );
+
RETURN VALUE: +
    Return code; equals ESMF_SUCCESS if there are no errors.
+
+DESCRIPTION: +
+ +

+Enter a named trace region. + +

+The arguments are: +

+
name
+
Name of the trace region. + +
+
+ +

+ +

+ +

+33.3.2 ESMC_TraceRegionExit - Exit a trace region +

+ +

+ +

+
+INTERFACE: +

 int ESMC_TraceRegionExit(
+   const char* name  // in
+ );
+
RETURN VALUE: +
    Return code; equals ESMF_SUCCESS if there are no errors.
+
+DESCRIPTION: +
+ +

+Exit a named trace region. + +

+The arguments are: +

+
name
+
Name of the trace region. + +
+
+ +

+ + +

+ +
+esmf_support@ucar.edu +
+ + diff --git a/docs/nightly/fix/reconcile-info/ESMC_crefdoc/node7.html b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/node7.html new file mode 100644 index 000000000..b22d1525e --- /dev/null +++ b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/node7.html @@ -0,0 +1,59 @@ + + + + + +6 References + + + + + + + + + + + + + + + + + + + + + +

+6 References +

+

+
+esmf_support@ucar.edu +
+ + diff --git a/docs/nightly/fix/reconcile-info/ESMC_crefdoc/node8.html b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/node8.html new file mode 100644 index 000000000..6662c2680 --- /dev/null +++ b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/node8.html @@ -0,0 +1,80 @@ + + + + + +Bibliography + + + + + + + + + + + + + + + + + + + + + +

+Bibliography +

1 +
+SCRIP: A Spherical Coordinate Remapping and Interpolation Package. +
http://oceans11.lanl.gov/trac/SCRIP, last accessed on Dec 4, 2015. +
Los Alamos Software Release LACC 98-45. + +

2 +
+V. Balaji, Jeff Anderson, Isaac Held, Michael Winton, Jeff Durachta, Sergey + Malyshev, and Ronald J. Stouffer. +
The exchange grid: a mechanism for data exchange between earth system + components on independent grids. +
Parallel Computational Fluid Dynamics: Theory and Applications, + Proceedings of the 2005 International Conference on Parallel Computational + Fluid Dynamics, 2006. + +

3 +
+J. Rumbaugh, I. Jacobson, and G. Booch. +
The Unified Modeling Language Reference Manual. +
Addison-Wesley, 1999. +
+ +

+
+esmf_support@ucar.edu +
+ + diff --git a/docs/nightly/fix/reconcile-info/ESMC_crefdoc/node9.html b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/node9.html new file mode 100644 index 000000000..41f1192de --- /dev/null +++ b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/node9.html @@ -0,0 +1,789 @@ + + + + + +7 Appendices + + + + + + + + + + + + + + + + + + + + + +Subsections + + + +
+ +

+7 Appendices +

+ +

+ +

+ +
+34 Appendix A: Master List of Constants +

+ +

+ +

+34.1 ESMC_CALKIND +

+This flag is documented in section 26.2.1. + +

+ +

+34.2 ESMC_COORDSYS +

+This flag is documented in section 19.2.1. + +

+ +

+ +
+34.3 ESMC_DECOMP +

+DESCRIPTION: +
+Indicates how DistGrid elements are decomposed over DEs. + +

+The type of this flag is: + +

+type(ESMC_Decomp_Flag) + +

+The valid values are: +

+
ESMC_DECOMP_BALANCED
+
Decompose elements as balanced as possible across DEs. The maximum + difference in number of elements per DE is 1, with the extra elements on + the lower DEs. +
+
ESMC_DECOMP_CYCLIC
+
Decompose elements cyclically across DEs. +
+
ESMC_DECOMP_RESTFIRST
+
Divide elements over DEs. Assign the rest of this division to the first + DE. +
+
ESMC_DECOMP_RESTLAST
+
Divide elements over DEs. Assign the rest of this division to the last DE. +
+
ESMC_DECOMP_SYMMEDGEMAX
+
Decompose elements across the DEs in a symmetric fashion. Start with the + maximum number of elements at the two edge DEs, and assign a decending + number of elements to the DEs as the center of the decomposition is + approached from both sides. +
+
+ +

+subsection(ESMC_ExtrapMethod_Flag) +DESCRIPTION: +
+Specify which extrapolation method to use on unmapped destination points after +regridding. + +

+The type of this flag is: + +

+type(ESMC_ExtrapMethod_Flag) + +

+The valid values are: +

+
ESMC_EXTRAPMETHOD_NONE
+
Indicates that no extrapolation should be done. +
+
ESMC_EXTRAPMETHOD_NEAREST_STOD
+
Inverse distance weighted average. + Here the value of a destination point is the weighted average of the + closest N source points. The weight is the reciprocal of the distance of + the source point from the destination point raised to a power P. All the + weights contributing to one destination point are normalized so that they + sum to 1.0. The user can choose N and P when using this method, but + defaults are also provided. +
+
ESMC_EXTRAPMETHOD_NEAREST_IDAVG
+
Nearest source to destination. + Here each destination point is mapped to the closest source point. A given + source point may go to multiple destination points, but no destination + point will receive input from more than one source point. +
+
+ +

+ +

+34.4 ESMC_FILEFORMAT +

+This flag is documented in section 19.2.6. + +

+subsection(ESMC_FileMode_Flag) +DESCRIPTION: +
+Specify which mode to use when writing a weight file. + +

+The type of this flag is: + +

+type(ESMC_FileMode_Flag) + +

+The valid values are: +

+
ESMC_FILEMODE_BASIC
+
Indicates that only the factorList and factorIndexList should be written. +
+
ESMC_FILEMODE_WITHAUX
+
Indicates that grid center coordinates should also be written. +
+
+ +

+ +

+34.5 ESMC_GRIDITEM +

+This flag is documented in section 19.2.2. + +

+ +

+34.6 ESMC_GRIDSTATUS +

+This flag is documented in section 19.2.3. + +

+ +

+ +
+34.7 ESMC_INDEX +

+ +

+DESCRIPTION: +
+Indicates whether index is local (per DE) or global (per object). + +

+The type of this flag is: + +

+type(ESMC_IndexFlag) + +

+The valid values are: +

+
ESMC_INDEX_DELOCAL
+
Indicates that DE-local index space starts at lower bound 1 for each DE. +
+
ESMC_INDEX_GLOBAL
+
Indicates that global indices are used. This means that DE-local index + space starts at the global lower bound for each DE. +
+
ESMC_INDEX_USER
+
Indicates that the DE-local index bounds are explicitly set by the user. +
+
+ +

+ +

+ +
+34.8 ESMC_LINETYPE +

+ +

+DESCRIPTION: +
This argument allows the user to select the path of the +line which connects two points on the surface of a sphere. +This in turn controls the path along which distances are calculated and the +shape of the edges that make up a cell. + +

+The type of this flag is: + +

+type(ESMC_LineType_Flag) + +

+The valid values are: +

+
ESMC_LINETYPE_CART
+
Cartesian line. When this option is specified distances are calculated in a + straight line through the 3D Cartesian space in which the sphere is + embedded. Cells are approximated by 3D planes bounded by 3D Cartesian lines + between their corner vertices. + When calculating regrid weights, this line type is currently the default for + the following regrid methods: ESMC_REGRIDMETHOD_BILINEAR, + ESMC_REGRIDMETHOD_PATCH, ESMC_REGRIDMETHOD_NEAREST_STOD, and + ESMC_REGRIDMETHOD_NEAREST_DTOS. +
+
ESMC_LINETYPE_GREAT_CIRCLE
+
Great circle line. When this option is specified distances are calculated + along a great circle path (the shortest distance between two points on a + sphere surface). Cells are bounded by great circle paths between their + corner vertices. When calculating regrid weights, this line type is + currently the default for the following regrid method: + ESMC_REGRIDMETHOD_CONSERVE. +
+
+ +

+ +

+34.9 ESMC_LOGKIND +

+This flag is documented in section 31.2.1. + +

+ +

+34.10 ESMC_LOGMSG +

+This flag is documented in section 31.2.2. + +

+ +

+34.11 ESMC_MESHELEMTYPE +

+This flag is documented in section 20.2.1. + +

+ +

+ +
+34.12 ESMF_METHOD +

+ +

+DESCRIPTION: +
+Specify standard ESMF Component method. + +

+The type of this flag is: + +

+type(ESMF_Method_Flag) + +

+The valid values are: +

+
ESMF_METHOD_FINALIZE
+
Finalize method. +
+
ESMF_METHOD_INITIALIZE
+
Initialize method. +
+
ESMF_METHOD_READRESTART
+
ReadRestart method. +
+
ESMF_METHOD_RUN
+
Run method. +
+
ESMF_METHOD_WRITERESTART
+
WriteRestart method. +
+
+ +

+ +

+34.13 ESMC_POLEKIND +

+This flag is documented in section 19.2.4. + +

+ +

+ +
+34.14 ESMC_REDUCE +

+DESCRIPTION: +
+Indicates reduce operation. + +

+The type of this flag is: + +

+type(ESMC_Reduce_Flag) + +

+The valid values are: +

+
ESMC_REDUCE_SUM
+
Use arithmetic sum to add all data elements. +
+
ESMC_REDUCE_MIN
+
Determine the minimum of all data elements. +
+
ESMC_REDUCE_MAX
+
Determine the maximum of all data elements. +
+
+ +

+ +

+ +
+34.15 ESMC_REGION +

+DESCRIPTION: +
+Specifies various regions in the data layout of an Array or Field object. + +

+The type of this flag is: + +

+type(ESMC_Region_Flag) + +

+The valid values are: +

+
ESMC_REGION_TOTAL
+
Total allocated memory. +
+
ESMC_REGION_SELECT
+
Region of operation-specific elements. +
+
ESMC_REGION_EMPTY
+
The empty region contains no elements. +
+
+ +

+ +

+34.16 ESMC_REGRIDMETHOD +

+This flag is documented in section 16.2.1. + +

+ +

+34.17 ESMC_STAGGERLOC +

+This flag is documented in section 19.2.5. + +

+ +

+ +
+34.18 ESMC_TYPEKIND +

+ +

+DESCRIPTION: +
+Named constants used to indicate type and kind combinations supported by the +overloaded ESMC interfaces. The corresponding Fortran kind-parameter constants +are described in the ESMF_TYPEKIND section of Appendices of the ESMF Fortran +reference manual. + +

+The type of these named constants is: + +

+type(ESMC_TypeKind_Flag) + +

+The named constants are: +

+
ESMC_TYPEKIND_I1
+
Indicates 1 byte integer.
+ (Only available if ESMF was built with + ESMF_NO_INTEGER_1_BYTE = FALSE. This is not the default.) +
+
ESMC_TYPEKIND_I2
+
Indicates 2 byte integer.
+ (Only available if ESMF was built with + ESMF_NO_INTEGER_2_BYTE = FALSE. This is not the default.) +
+
ESMC_TYPEKIND_I4
+
Indicates 4 byte integer. +
+
ESMC_TYPEKIND_I8
+
Indicates 8 byte integer. +
+
ESMC_TYPEKIND_R4
+
Indicates 4 byte real. +
+
ESMC_TYPEKIND_R8
+
Indicates 8 byte real. +
+
+ +

+ +

+ +
+34.19 ESMC_UNMAPPEDACTION +

+DESCRIPTION: +
+Indicates what action to take with respect to unmapped destination points +and the entries of the sparse matrix that correspond to these points. + +

+The type of this flag is: + +

+type(ESMC_UnmappedAction_Flag) + +

+The valid values are: +

+
ESMC_UNMAPPEDACTION_ERROR
+
An error is issued when there exist destination points in a regridding + operation that are not mapped by corresponding source points. + +
+
ESMC_UNMAPPEDACTION_IGNORE
+
Destination points which do not have corresponding source points are + ignored and zeros are used for the entries of the sparse matrix + that is generated. +
+
+ +

+ +

+35 Appendix B: A Brief Introduction to UML +

+ +

+The schematic below shows the Unified Modeling Language (UML) notation +for the class diagrams presented in this Reference Manual. For +more on UML, see references such as The Unified Modeling Language +Reference Manual, Rumbaugh et al, [3]. + +

+

+ +\scalebox{0.8}{\includegraphics{Appendix_uml}} +
+ +

+ +

+ +
+36 Appendix C: ESMF Error Return Codes +

+ +

+The tables below show the possible error return codes for Fortran and +C methods. + +

+ +

+ +

+ +

+

+ 
+ =====================================
+ Fortran Symmetric Return Codes 1-500
+ =====================================
+ 
+  ESMF_SUCCESS               0
+  ESMF_RC_OBJ_BAD            1
+  ESMF_RC_OBJ_INIT           2
+  ESMF_RC_OBJ_CREATE         3
+  ESMF_RC_OBJ_COR            4
+  ESMF_RC_OBJ_WRONG          5
+  ESMF_RC_ARG_BAD            6
+  ESMF_RC_ARG_RANK           7
+  ESMF_RC_ARG_SIZE           8
+  ESMF_RC_ARG_VALUE          9
+  ESMF_RC_ARG_DUP           10
+  ESMF_RC_ARG_SAMETYPE      11
+  ESMF_RC_ARG_SAMECOMM      12
+  ESMF_RC_ARG_INCOMP        13
+  ESMF_RC_ARG_CORRUPT       14
+  ESMF_RC_ARG_WRONG         15
+  ESMF_RC_ARG_OUTOFRANGE    16
+  ESMF_RC_ARG_OPT           17
+  ESMF_RC_NOT_IMPL          18
+  ESMF_RC_FILE_OPEN         19
+  ESMF_RC_FILE_CREATE       20
+  ESMF_RC_FILE_READ         21
+  ESMF_RC_FILE_WRITE        22
+  ESMF_RC_FILE_UNEXPECTED   23
+  ESMF_RC_FILE_CLOSE        24
+  ESMF_RC_FILE_ACTIVE       25
+  ESMF_RC_PTR_NULL          26
+  ESMF_RC_PTR_BAD           27
+  ESMF_RC_PTR_NOTALLOC      28
+  ESMF_RC_PTR_ISALLOC       29
+  ESMF_RC_MEM               30
+  ESMF_RC_MEM_ALLOCATE      31
+  ESMF_RC_MEM_DEALLOCATE    32
+  ESMF_RC_MEMC              33
+  ESMF_RC_DUP_NAME          34
+  ESMF_RC_LONG_NAME         35
+  ESMF_RC_LONG_STR          36
+  ESMF_RC_COPY_FAIL         37
+  ESMF_RC_DIV_ZERO          38
+  ESMF_RC_CANNOT_GET        39
+  ESMF_RC_CANNOT_SET        40
+  ESMF_RC_NOT_FOUND         41
+  ESMF_RC_NOT_VALID         42
+  ESMF_RC_INTNRL_LIST       43
+  ESMF_RC_INTNRL_INCONS     44
+  ESMF_RC_INTNRL_BAD        45
+  ESMF_RC_SYS               46
+  ESMF_RC_BUSY              47
+  ESMF_RC_LIB               48
+  ESMF_RC_LIB_NOT_PRESENT   49
+  ESMF_RC_ATTR_UNUSED       50
+  ESMF_RC_OBJ_NOT_CREATED   51
+  ESMF_RC_OBJ_DELETED       52
+  ESMF_RC_NOT_SET           53
+  ESMF_RC_VAL_WRONG         54
+  ESMF_RC_VAL_ERRBOUND      55
+  ESMF_RC_VAL_OUTOFRANGE    56
+  ESMF_RC_ATTR_NOTSET       57
+  ESMF_RC_ATTR_WRONGTYPE    58
+  ESMF_RC_ATTR_ITEMSOFF     59
+  ESMF_RC_ATTR_LINK         60
+  ESMF_RC_BUFFER_SHORT      61
+  ESMF_RC_TIMEOUT           62
+  ESMF_RC_FILE_EXISTS       63
+  ESMF_RC_FILE_NOTDIR       64
+  ESMF_RC_MOAB_ERROR        65
+  ESMF_RC_NOOP              66
+  ESMF_RC_NETCDF_ERROR      67
+ 
+ 68-499 reserved for future Fortran symmetric return code definitions
+ 
+ =====================================
+ C/C++ Symmetric Return Codes 501-999
+ =====================================
+ 
+  ESMC_RC_OBJ_BAD          501
+  ESMC_RC_OBJ_INIT         502
+  ESMC_RC_OBJ_CREATE       503
+  ESMC_RC_OBJ_COR          504
+  ESMC_RC_OBJ_WRONG        505
+  ESMC_RC_ARG_BAD          506
+  ESMC_RC_ARG_RANK         507
+  ESMC_RC_ARG_SIZE         508
+  ESMC_RC_ARG_VALUE        509
+  ESMC_RC_ARG_DUP          510
+  ESMC_RC_ARG_SAMETYPE     511
+  ESMC_RC_ARG_SAMECOMM     512
+  ESMC_RC_ARG_INCOMP       513
+  ESMC_RC_ARG_CORRUPT      514
+  ESMC_RC_ARG_WRONG        515
+  ESMC_RC_ARG_OUTOFRANGE   516
+  ESMC_RC_ARG_OPT          517
+  ESMC_RC_NOT_IMPL         518
+  ESMC_RC_FILE_OPEN        519
+  ESMC_RC_FILE_CREATE      520
+  ESMC_RC_FILE_READ        521
+  ESMC_RC_FILE_WRITE       522
+  ESMC_RC_FILE_UNEXPECTED  523
+  ESMC_RC_FILE_CLOSE       524
+  ESMC_RC_FILE_ACTIVE      525
+  ESMC_RC_PTR_NULL         526
+  ESMC_RC_PTR_BAD          527
+  ESMC_RC_PTR_NOTALLOC     528
+  ESMC_RC_PTR_ISALLOC      529
+  ESMC_RC_MEM              530
+  ESMC_RC_MEM_ALLOCATE     531
+  ESMC_RC_MEM_DEALLOCATE   532
+  ESMC_RC_MEMC             533
+  ESMC_RC_DUP_NAME         534
+  ESMC_RC_LONG_NAME        535
+  ESMC_RC_LONG_STR         536
+  ESMC_RC_COPY_FAIL        537
+  ESMC_RC_DIV_ZERO         538
+  ESMC_RC_CANNOT_GET       539
+  ESMC_RC_CANNOT_SET       540
+  ESMC_RC_NOT_FOUND        541
+  ESMC_RC_NOT_VALID        542
+  ESMC_RC_INTNRL_LIST      543
+  ESMC_RC_INTNRL_INCONS    544
+  ESMC_RC_INTNRL_BAD       545
+  ESMC_RC_SYS              546
+  ESMC_RC_BUSY             547
+  ESMC_RC_LIB              548
+  ESMC_RC_LIB_NOT_PRESENT  549
+  ESMC_RC_ATTR_UNUSED      550
+  ESMC_RC_OBJ_NOT_CREATED  551
+  ESMC_RC_OBJ_DELETED      552
+  ESMC_RC_NOT_SET          553
+  ESMC_RC_VAL_WRONG        554
+  ESMC_RC_VAL_ERRBOUND     555
+  ESMC_RC_VAL_OUTOFRANGE   556
+  ESMC_RC_ATTR_NOTSET      557
+  ESMC_RC_ATTR_WRONGTYPE   558
+  ESMC_RC_ATTR_ITEMSOFF    559
+  ESMC_RC_ATTR_LINK        560
+  ESMC_RC_BUFFER_SHORT     561
+  ESMC_RC_TIMEOUT          562
+  ESMC_RC_FILE_EXISTS      563
+  ESMC_RC_FILE_NOTDIR      564
+  ESMC_RC_MOAB_ERROR       565
+  ESMC_RC_NOOP             566
+  ESMC_RC_NETCDF_ERROR     567
+ 
+ 568-999 reserved for future C/C++ symmetric return code definitions
+ 
+ =====================================
+ C/C++ Non-symmetric Return Codes 1000
+ =====================================
+ 
+  ESMC_RC_OPTARG_BAD      1000
+
+ + +

+ +

+ +
+esmf_support@ucar.edu +
+ + diff --git a/docs/nightly/fix/reconcile-info/ESMC_crefdoc/prev.png b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/prev.png new file mode 100644 index 000000000..e60b8b407 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/prev.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMC_crefdoc/prev_g.png b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/prev_g.png new file mode 100644 index 000000000..ac6f0bceb Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/prev_g.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMC_crefdoc/up.png b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/up.png new file mode 100644 index 000000000..3937e168f Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/up.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMC_crefdoc/up_g.png b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/up_g.png new file mode 100644 index 000000000..fb36cf765 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMC_crefdoc/up_g.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc.pdf b/docs/nightly/fix/reconcile-info/ESMF_refdoc.pdf new file mode 100644 index 000000000..e57d109da Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc.pdf differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/ESMF_refdoc.css b/docs/nightly/fix/reconcile-info/ESMF_refdoc/ESMF_refdoc.css new file mode 100644 index 000000000..410279303 --- /dev/null +++ b/docs/nightly/fix/reconcile-info/ESMF_refdoc/ESMF_refdoc.css @@ -0,0 +1,42 @@ +/* Century Schoolbook font is very similar to Computer Modern Math: cmmi */ +.MATH { font-family: "Century Schoolbook", serif; } +.MATH I { font-family: "Century Schoolbook", serif; font-style: italic } +.BOLDMATH { font-family: "Century Schoolbook", serif; font-weight: bold } + +/* implement both fixed-size and relative sizes */ +SMALL.XTINY { font-size : xx-small } +SMALL.TINY { font-size : x-small } +SMALL.SCRIPTSIZE { font-size : smaller } +SMALL.FOOTNOTESIZE { font-size : small } +SMALL.SMALL { } +BIG.LARGE { } +BIG.XLARGE { font-size : large } +BIG.XXLARGE { font-size : x-large } +BIG.HUGE { font-size : larger } +BIG.XHUGE { font-size : xx-large } + +/* heading styles */ +H1 { } +H2 { } +H3 { } +H4 { } +H5 { } + +/* mathematics styles */ +DIV.displaymath { } /* math displays */ +TD.eqno { } /* equation-number cells */ + + +/* document-specific styles come next */ +SPAN.bf { } +DIV.center { } +DIV.em { } +SPAN.it { } +DIV.navigation { } +PRE.preform { } +DIV.quote { } +SPAN.sc { } +SPAN.tt { } +SPAN.arabic { } +SPAN.textbf { font-weight: bold } +SPAN.textit { font-style: italic } diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/ESMF_refdoc.html b/docs/nightly/fix/reconcile-info/ESMF_refdoc/ESMF_refdoc.html new file mode 100644 index 000000000..6f7440320 --- /dev/null +++ b/docs/nightly/fix/reconcile-info/ESMF_refdoc/ESMF_refdoc.html @@ -0,0 +1,1010 @@ + + + + + +ESMF_refdoc + + + + + + + + + + + + + + + + + + + +

+ +

+

+Earth System Modeling Framework +
+
+
+
+ESMF Reference Manual for Fortran   +
+
+
+
+Version 8.8.0 beta snapshot +
+
+
+
+
+ESMF Joint Specification Team: V. Balaji, Byron Boville, Samson Cheung, Tom Clune, Nancy Collins, Tony Craig, Carlos Cruz, Arlindo da Silva, Cecelia DeLuca, Rosalinda de Fainchtein, Rocky Dunlap, Brian Eaton, Steve Goldhaber, Bob Hallberg, Tom Henderson, Chris Hill, Mark Iredell, Joseph Jacob, Rob Jacob, Phil Jones, Brian Kauffman, Erik Kluzek, Ben Koziol, Jay Larson, Peggy Li, Fei Liu, John Michalakes, Raffaele Montuoro, Sylvia Murphy, David Neckels, Ryan O Kuinghttons, Bob Oehmke, Chuck Panaccione, Daniel Rosen, Jim Rosinski, Mathew Rothstein, Bill Sacks, Kathy Saint, Will Sawyer, Earl Schwab, Shepard Smithline, Walter Spector, Don Stark, Max Suarez, Spencer Swift, Gerhard Theurich, Atanas Trayanov, Silverio Vasquez, Jon Wolfe, Weiyu Yang, Mike Young, Leonid Zaslavsky +
+
+
+
+December 3, 2024 +
+
+
+ +
+ +

+ +

+ + +

+
+
+
+
+
+
+
+
+
+
+
+
+
+

+Acknowledgements + +
+ +

+The ESMF software is based on the contributions of a broad community. +Below are the software packages that are included in ESMF or strongly +influenced our design. We'd like to express our gratitude to the +developers of these codes for access to their software as well as their +ideas and advice. + +

+ +

    +
  • Parallel I/O (PIO) developers at NCAR and DOE Laboratories for their +excellent work on this package and their help in making it work with ESMF + +

    +

  • +
  • The Spherical Coordinate Remapping and Interpolation Package (SCRIP) +from Los Alamos, which informed the design of our regridding functionality + +

    +

  • +
  • The Model Coupling Toolkit (MCT) from Argonne National Laboratory, +on which we based our sparse matrix multiply approach to general +regridding + +

    +

  • +
  • The Inpack configuration attributes package from NASA Goddard, +which was adapted for use in ESMF by members of NASA Global Modeling and +Assimilation group + +

    +

  • +
  • The Flexible Modeling System (FMS) package from GFDL and the +Goddard Earth Modeling System (GEMS) from NASA Goddard, both of which +provided inspiration for the overall ESMF architecture + +

    +

  • +
  • The Common Component Architecture (CCA) effort within the Department +of Energy, from which we drew many ideas about how to design components + +

    +

  • +
  • The Vector Signal Image Processing Library (VSIPL) and its +predecessors, which informed many aspects of our design, and the +radar system software design group at Lincoln Laboratory + +

    +

  • +
  • The Portable, Extensible Toolkit for Scientific Computation (PETSc) +package from Argonne National Laboratories, on which we +based our initial makefile system + +

    +

  • +
  • The Community Climate System Model (CCSM) and Weather Research and +Forecasting (WRF) modeling groups at NCAR, who have provided valuable +feedback on the design and implementation of the framework + +

    +

  • +
+ +

+ + + + + + + + +
+esmf_support@ucar.edu +
+ + diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/WARNINGS b/docs/nightly/fix/reconcile-info/ESMF_refdoc/WARNINGS new file mode 100644 index 000000000..0cd772c7f --- /dev/null +++ b/docs/nightly/fix/reconcile-info/ESMF_refdoc/WARNINGS @@ -0,0 +1,11 @@ + +ESMF_refdoc.tex is newer than ESMF_refdoc.aux: Please rerun latex. + +Substitution of arg to newlabelxx delayed. + +? brace missing for \oldcontentsline +couldn't convert character ft into available encodings + + ...set $ACCENT_IMAGES to get an image + +ESMF_refdoc.tex is newer than ESMF_refdoc.bbl: Please rerun latex and bibtex. diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/contents.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/contents.png new file mode 100644 index 000000000..0c752c66c Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/contents.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/crossref.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/crossref.png new file mode 100644 index 000000000..7314fa7c5 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/crossref.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/footnode.html b/docs/nightly/fix/reconcile-info/ESMF_refdoc/footnode.html new file mode 100644 index 000000000..d0f236ea7 --- /dev/null +++ b/docs/nightly/fix/reconcile-info/ESMF_refdoc/footnode.html @@ -0,0 +1,100 @@ + + + + + +Footnotes + + + + + + + + + + + + + + + + +
+
... Fortran.1
+
Since the customer base for it is +small, we have not yet prepared a comprehensive reference manual for C. + +
.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+
+
+
... model.2
+
It is not necessary to create +a Coupler Component for each individual data transfer. + +
.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+.
+
+
+
+ + diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/images.aux b/docs/nightly/fix/reconcile-info/ESMF_refdoc/images.aux new file mode 100644 index 000000000..c01f471a8 --- /dev/null +++ b/docs/nightly/fix/reconcile-info/ESMF_refdoc/images.aux @@ -0,0 +1,19 @@ +\relax +\providecommand\hyper@newdestlabel[2]{} +\providecommand\HyperFirstAtBeginDocument{\AtBeginDocument} +\HyperFirstAtBeginDocument{\ifx\hyper@anchor\@undefined +\global\let\oldcontentsline\contentsline +\gdef\contentsline#1#2#3#4{\oldcontentsline{#1}{#2}{#3}} +\global\let\oldnewlabel\newlabel +\gdef\newlabel#1#2{\newlabelxx{#1}#2} +\gdef\newlabelxx#1#2#3#4#5#6{\oldnewlabel{#1}{{#2}{#3}}} +\AtEndDocument{\ifx\hyper@anchor\@undefined +\let\contentsline\oldcontentsline +\let\newlabel\oldnewlabel +\fi} +\fi} +\global\let\hyper@last\relax +\gdef\HyperFirstAtBeginDocument#1{#1} +\providecommand*\HyPL@Entry[1]{} +\HyPL@Entry{0<>} +\babel@aux{english}{} diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/images.bbl b/docs/nightly/fix/reconcile-info/ESMF_refdoc/images.bbl new file mode 100644 index 000000000..284beb7c0 --- /dev/null +++ b/docs/nightly/fix/reconcile-info/ESMF_refdoc/images.bbl @@ -0,0 +1,169 @@ +\begin{thebibliography}{10} + +\bibitem{json_for_modern_cpp} +{\em JSON for Modern C++}, 2020 (accessed February 2020). +\newblock \url{https://github.com/nlohmann/json}. + +\bibitem{json_for_modern_cpp_64bit_float} +{\em JSON for Modern C++ 64-Bit Float}, 2020 (accessed February 2020). +\newblock + \url{https://nlohmann.github.io/json/classnlohmann_1_1basic__json_a88d6103cb3620410b35200ee8e313d97.html#a88d6103cb3620410b35200ee8e313d97}. + +\bibitem{json_for_modern_cpp_64bit_int} +{\em JSON for Modern C++ 64-Bit Integer}, 2020 (accessed February 2020). +\newblock + \url{https://nlohmann.github.io/json/classnlohmann_1_1basic__json_a98e611d67b7bd75307de99c9358ab2dc.html#a98e611d67b7bd75307de99c9358ab2dc}. + +\bibitem{json_for_modern_cpp_is_structured} +{\em JSON for Modern C++ Is Structured}, 2020 (accessed February 2020). +\newblock + \url{https://nlohmann.github.io/json/classnlohmann_1_1basic__json_a9f68a0af820c3ced7f9d17851ce4c22d.html#a9f68a0af820c3ced7f9d17851ce4c22d}. + +\bibitem{json_for_modern_cpp_json_pointer} +{\em JSON for Modern C++ JSON Pointer}, 2020 (accessed February 2020). +\newblock + \url{https://nlohmann.github.io/json/classnlohmann_1_1json__pointer_a7f32d7c62841f0c4a6784cf741a6e4f8.html#a7f32d7c62841f0c4a6784cf741a6e4f8}. + +\bibitem{json_for_modern_cpp_memory_overhead} +{\em JSON for Modern C++ Memory Efficiency}, 2020 (accessed February 2020). +\newblock \url{https://github.com/nlohmann/json#design-goals}. + +\bibitem{json_for_modern_cpp_null} +{\em JSON for Modern C++ Null Value}, 2020 (accessed February 2020). +\newblock + \url{https://nlohmann.github.io/json/classnlohmann_1_1basic__json_a8faa039ca82427ed29c486ffd00600c3.html#a8faa039ca82427ed29c486ffd00600c3}. + +\bibitem{json_for_modern_cpp_object} +{\em JSON for Modern C++ Object}, 2020 (accessed February 2020). +\newblock + \url{https://nlohmann.github.io/json/classnlohmann_1_1basic__json_a5e48a7893520e1314bf0c9723e26ea2a.html#a5e48a7893520e1314bf0c9723e26ea2a}. + +\bibitem{json_for_modern_cpp_typename} +{\em JSON for Modern C++ Type Name}, 2020 (accessed February 2020). +\newblock + \url{https://nlohmann.github.io/json/classnlohmann_1_1basic__json_ad14563c53cf7ca9189bc164082367bf3.html#ad14563c53cf7ca9189bc164082367bf3}. + +\bibitem{json_for_modern_cpp_update} +{\em JSON for Modern C++ Update}, 2020 (accessed February 2020). +\newblock + \url{https://nlohmann.github.io/json/classnlohmann_1_1basic__json_a1cfa9ae5e7c2434cab4cfe69bffffe11.html#a1cfa9ae5e7c2434cab4cfe69bffffe11}. + +\bibitem{json} +{\em JSON}, 2020 (accessed March 2020). +\newblock \url{https://www.json.org/json-en.html}. + +\bibitem{JDNcalculator} +{A Julian Day and Civil Date Calculator}. +\newblock http://www.numerical-recipes.com/julian.html, last accessed on Dec 3, + 2015. + +\bibitem{ref:SCRIP} +{SCRIP: A Spherical Coordinate Remapping and Interpolation Package}. +\newblock http://oceans11.lanl.gov/trac/SCRIP, last accessed on Dec 4, 2015. +\newblock Los Alamos Software Release LACC 98-45. + +\bibitem{ISOnotes} +{Some notes on the ISO 8601 date and time specification standard.} +\newblock http://en.wikipedia.org/wiki/ISO\_8601 \newline + http://www.iso.ch/iso/en/prods-services/popstds/datesandtime.html, last + accessed on Dec 4, 2015. + +\bibitem{NetCDF_CF} +{NetCDF Climate and Forecast (CF) Metadata Conventions}. +\newblock http://cfconventions.org/, last accessed on Nov 27, 2015. + +\bibitem{NetCDF3_UsersGuide_C} +{NetCDF Users Guide for C, Version 3}. +\newblock http://www.unidata.ucar.edu/software/netcdf/docs, last accessed on + Nov 27, 2015. + +\bibitem{BalajiXGrid} +V.~Balaji, Jeff Anderson, Isaac Held, Michael Winton, Jeff Durachta, Sergey + Malyshev, and Ronald~J. Stouffer. +\newblock The exchange grid: a mechanism for data exchange between earth system + components on independent grids. +\newblock {\em Parallel Computational Fluid Dynamics: Theory and Applications, + Proceedings of the 2005 International Conference on Parallel Computational + Fluid Dynamics}, 2006. + +\bibitem{Zoltan} +E.~G. Boman, U.~V. Catalyurek, C.~Chevalier, and K.~D. Devine. +\newblock The {Z}oltan and {I}sorropia parallel toolkits for combinatorial + scientific computing: Partitioning, ordering, and coloring. +\newblock {\em Scientific Programming}, 20(2), 2012. + +\bibitem{ConservativeOrder2} +Y.~Meurdesoif E.~Kritsikis, M.~Aechtner and T.~Dubos. +\newblock Conservative interpolation between general spherical meshes. +\newblock {\em Geoscientific Model Development}, 10, 2017. + +\bibitem{Sierra} +H.~C. Edwards, A.~B. Williams, G.~D. Sjaardema, D.~G. Baur, and W.~K. Cochran. +\newblock {SIERRA} toolkit computational mesh conceptual model. +\newblock Technical Report SAND2010-1192, Sandia National Laboratories, + Albuquerque, New Mexico 87185, March 2010. + +\bibitem{Fli68} +{Fliegel, H.F. and Van Flandern, T.C.} +\newblock {A Machine Algorithm for Processing Calendar Dates}. +\newblock {\em Communications of the ACM}, 11(10):657, 1968. + +\bibitem{PatchInterp2} +H.~Gu, Z.~Zong, and K.C. Hung. +\newblock A modified superconvergent patch recovery method and its application + to large deformation problems. +\newblock {\em Finite Elements in Analysis and Design}, 40(5-6), 2004. + +\bibitem{Hat84} +{Hatcher, D.A.} +\newblock {Simple Formulae for Julian Day Numbers and Calendar Dates}. +\newblock {\em Q.JlR. astr. Soc.}, 25(1):53--55, 1984. + +\bibitem{ISO} +{International Organization for Standardization}. +\newblock {Standard 8601:2004, Data elements and interchange formats -- + Information interchange -- Representation of dates and times}. +\newblock + {http://www.iso.ch/iso/en/CatalogueDetailPage.CatalogueDetail?CSNUMBER=40874\&COMMID=\&scopelist=}, + last accessed on Dec 4, 2015. + +\bibitem{PatchInterp1} +A.R. Khoei and S.A. Gharehbaghi. +\newblock The superconvergent patch recovery technique and data transfer + operators in 3d plasticity problems. +\newblock {\em Finite Elements in Analysis and Design}, 43(8), 2007. + +\bibitem{Meyer1} +Peter Meyer. +\newblock {A good discussion of Gregorian and Julian Calendars}. +\newblock http://www.hermetic.ch/cal\_stud/cal\_art.html, last accessed on Nov + 27, 2015. + +\bibitem{Meyer2} +Peter Meyer. +\newblock {A good discussion of Julian Day Numbers}. +\newblock http://www.hermetic.ch/cal\_stud/jdn.htm, last accessed on Nov 27, + 2015. + +\bibitem{ConservativeOrder1} +D.~Ramshaw. +\newblock Conservative rezoning algorithm for generalized two-dimensional + meshes. +\newblock {\em Journal of Computational Physics}, 59, 1985. + +\bibitem{uml} +J.~Rumbaugh, I.~Jacobson, and G.~Booch. +\newblock {\em The Unified Modeling Language Reference Manual}. +\newblock Addison-Wesley, 1999. + +\bibitem{Seidelman} +{Seidelman, P.K.} +\newblock {\em {Explanatory Supplement to the Astronomical Almanac}}. +\newblock University Science Books, 1992. + +\bibitem{MJD} +Gernot~M.R. Winkler. +\newblock {A good discussion of the Modified Julian Day Calendar}. +\newblock http://tycho.usno.navy.mil/mjd.html, last accessed on Nov 27, 2015. + +\end{thebibliography} diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/images.log b/docs/nightly/fix/reconcile-info/ESMF_refdoc/images.log new file mode 100644 index 000000000..7e96333fa --- /dev/null +++ b/docs/nightly/fix/reconcile-info/ESMF_refdoc/images.log @@ -0,0 +1,1711 @@ +This is pdfTeX, Version 3.14159265-2.6-1.40.18 (TeX Live 2017/Debian) (preloaded format=latex 2022.7.28) 3 DEC 2024 17:26 +entering extended mode + restricted \write18 enabled. + %&-line parsing enabled. +**./images.tex +(./images.tex +LaTeX2e <2017-04-15> +Babel <3.18> and hyphenation patterns for 84 language(s) loaded. + +(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls +Document Class: article 2014/09/29 v1.4h Standard LaTeX document class +(/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo +File: size10.clo 2014/09/29 v1.4h Standard LaTeX file (size option) +) +\c@part=\count79 +\c@section=\count80 +\c@subsection=\count81 +\c@subsubsection=\count82 +\c@paragraph=\count83 +\c@subparagraph=\count84 +\c@figure=\count85 +\c@table=\count86 +\abovecaptionskip=\skip41 +\belowcaptionskip=\skip42 +\bibindent=\dimen102 +) (/usr/share/texlive/texmf-dist/tex/latex/base/ifthen.sty +Package: ifthen 2014/09/29 v1.1c Standard LaTeX ifthen package (DPC) +) (/usr/share/texlive/texmf-dist/tex/generic/babel/babel.sty +Package: babel 2018/02/14 3.18 The Babel package +(/usr/share/texlive/texmf-dist/tex/generic/babel/switch.def +File: switch.def 2018/02/14 3.18 Babel switching mechanism +) (/usr/share/texlive/texmf-dist/tex/generic/babel-english/english.ldf +Language: english 2017/06/06 v3.3r English support from the babel system +(/usr/share/texlive/texmf-dist/tex/generic/babel/babel.def +File: babel.def 2018/02/14 3.18 Babel common definitions +\babel@savecnt=\count87 +\U@D=\dimen103 +(/usr/share/texlive/texmf-dist/tex/generic/babel/txtbabel.def) +\bbl@dirlevel=\count88 +) +\l@canadian = a dialect from \language\l@american +\l@australian = a dialect from \language\l@british +\l@newzealand = a dialect from \language\l@british +)) (/usr/share/texlive/texmf-dist/tex/latex/tools/longtable.sty +Package: longtable 2014/10/28 v4.11 Multi-page Table package (DPC) +\LTleft=\skip43 +\LTright=\skip44 +\LTpre=\skip45 +\LTpost=\skip46 +\LTchunksize=\count89 +\LTcapwidth=\dimen104 +\LT@head=\box26 +\LT@firsthead=\box27 +\LT@foot=\box28 +\LT@lastfoot=\box29 +\LT@cols=\count90 +\LT@rows=\count91 +\c@LT@tables=\count92 +\c@LT@chunks=\count93 +\LT@p@ftn=\toks14 +) (/usr/share/texmf/tex/latex/html/html.sty +Package: html 1999/07/19 v1.38 hypertext commands for latex2html (nd, hws, rrm) + +\c@lpart=\count94 +\c@lchapter=\count95 +\c@chapter=\count96 +\c@lsection=\count97 +\c@lsubsection=\count98 +\c@lsubsubsection=\count99 +\c@lparagraph=\count100 +\c@lsubparagraph=\count101 +\c@lsubsubparagraph=\count102 +\ptrfile=\write3 +) (/usr/share/texlive/texmf-dist/tex/latex/psnfss/times.sty +Package: times 2005/04/12 PSNFSS-v9.2a (SPQR) +) (/usr/share/texlive/texmf-dist/tex/latex/graphics/graphicx.sty +Package: graphicx 2017/06/01 v1.1a Enhanced LaTeX Graphics (DPC,SPQR) +(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty +Package: keyval 2014/10/28 v1.15 key=value parser (DPC) +\KV@toks@=\toks15 +) (/usr/share/texlive/texmf-dist/tex/latex/graphics/graphics.sty +Package: graphics 2017/06/25 v1.2c Standard LaTeX Graphics (DPC,SPQR) +(/usr/share/texlive/texmf-dist/tex/latex/graphics/trig.sty +Package: trig 2016/01/03 v1.10 sin cos tan (DPC) +) (/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/graphics.cfg +File: graphics.cfg 2016/06/04 v1.11 sample graphics configuration +) +Package graphics Info: Driver file: dvips.def on input line 99. +(/usr/share/texlive/texmf-dist/tex/latex/graphics-def/dvips.def +File: dvips.def 2017/06/20 v3.1d Graphics/color driver for dvips +)) +\Gin@req@height=\dimen105 +\Gin@req@width=\dimen106 +) (/usr/share/texlive/texmf-dist/tex/latex/hyperref/hyperref.sty +Package: hyperref 2018/02/06 v6.86b Hypertext links for LaTeX +(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/hobsub-hyperref.sty +Package: hobsub-hyperref 2016/05/16 v1.14 Bundle oberdiek, subset hyperref (HO) + +(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/hobsub-generic.sty +Package: hobsub-generic 2016/05/16 v1.14 Bundle oberdiek, subset generic (HO) +Package: hobsub 2016/05/16 v1.14 Construct package bundles (HO) +Package: infwarerr 2016/05/16 v1.4 Providing info/warning/error messages (HO) +Package: ltxcmds 2016/05/16 v1.23 LaTeX kernel commands for general use (HO) +Package: ifluatex 2016/05/16 v1.4 Provides the ifluatex switch (HO) +Package ifluatex Info: LuaTeX not detected. +Package: ifvtex 2016/05/16 v1.6 Detect VTeX and its facilities (HO) +Package ifvtex Info: VTeX not detected. +Package: intcalc 2016/05/16 v1.2 Expandable calculations with integers (HO) +Package: ifpdf 2017/03/15 v3.2 Provides the ifpdf switch +Package: etexcmds 2016/05/16 v1.6 Avoid name clashes with e-TeX commands (HO) +Package etexcmds Info: Could not find \expanded. +(etexcmds) That can mean that you are not using pdfTeX 1.50 or +(etexcmds) that some package has redefined \expanded. +(etexcmds) In the latter case, load this package earlier. +Package: kvsetkeys 2016/05/16 v1.17 Key value parser (HO) +Package: kvdefinekeys 2016/05/16 v1.4 Define keys (HO) +Package: pdftexcmds 2018/01/21 v0.26 Utility functions of pdfTeX for LuaTeX (HO +) +Package pdftexcmds Info: LuaTeX not detected. +Package pdftexcmds Info: \pdf@primitive is available. +Package pdftexcmds Info: \pdf@ifprimitive is available. +Package pdftexcmds Info: \pdfdraftmode is ignored in DVI mode. +Package: pdfescape 2016/05/16 v1.14 Implements pdfTeX's escape features (HO) +Package: bigintcalc 2016/05/16 v1.4 Expandable calculations on big integers (HO +) +Package: bitset 2016/05/16 v1.2 Handle bit-vector datatype (HO) +Package: uniquecounter 2016/05/16 v1.3 Provide unlimited unique counter (HO) +) +Package hobsub Info: Skipping package `hobsub' (already loaded). +Package: letltxmacro 2016/05/16 v1.5 Let assignment for LaTeX macros (HO) +Package: hopatch 2016/05/16 v1.3 Wrapper for package hooks (HO) +Package: xcolor-patch 2016/05/16 xcolor patch +Package: atveryend 2016/05/16 v1.9 Hooks at the very end of document (HO) +Package atveryend Info: \enddocument detected (standard20110627). +Package: atbegshi 2016/06/09 v1.18 At begin shipout hook (HO) +Package: refcount 2016/05/16 v3.5 Data extraction from label references (HO) +Package: hycolor 2016/05/16 v1.8 Color options for hyperref/bookmark (HO) +) (/usr/share/texlive/texmf-dist/tex/generic/ifxetex/ifxetex.sty +Package: ifxetex 2010/09/12 v0.6 Provides ifxetex conditional +) (/usr/share/texlive/texmf-dist/tex/latex/oberdiek/auxhook.sty +Package: auxhook 2016/05/16 v1.4 Hooks for auxiliary files (HO) +) (/usr/share/texlive/texmf-dist/tex/latex/oberdiek/kvoptions.sty +Package: kvoptions 2016/05/16 v3.12 Key value format for package options (HO) +) +\@linkdim=\dimen107 +\Hy@linkcounter=\count103 +\Hy@pagecounter=\count104 +(/usr/share/texlive/texmf-dist/tex/latex/hyperref/pd1enc.def +File: pd1enc.def 2018/02/06 v6.86b Hyperref: PDFDocEncoding definition (HO) +) +\Hy@SavedSpaceFactor=\count105 +(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/hyperref.cfg +File: hyperref.cfg 2002/06/06 v1.2 hyperref configuration of TeXLive +) +Package hyperref Info: Hyper figures OFF on input line 4509. +Package hyperref Info: Link nesting OFF on input line 4514. +Package hyperref Info: Hyper index ON on input line 4517. +Package hyperref Info: Plain pages OFF on input line 4524. +Package hyperref Info: Backreferencing OFF on input line 4529. +Package hyperref Info: Implicit mode ON; LaTeX internals redefined. +Package hyperref Info: Bookmarks ON on input line 4762. +\c@Hy@tempcnt=\count106 +(/usr/share/texlive/texmf-dist/tex/latex/url/url.sty +\Urlmuskip=\muskip10 +Package: url 2013/09/16 ver 3.4 Verb mode for urls, etc. +) +LaTeX Info: Redefining \url on input line 5115. +LaTeX Info: Redefining \hyperref on input line 5126. +\XeTeXLinkMargin=\dimen108 +\Fld@menulength=\count107 +\Field@Width=\dimen109 +\Fld@charsize=\dimen110 +Package hyperref Info: Hyper figures OFF on input line 6369. +Package hyperref Info: Link nesting OFF on input line 6374. +Package hyperref Info: Hyper index ON on input line 6377. +Package hyperref Info: backreferencing OFF on input line 6384. +Package hyperref Info: Link coloring OFF on input line 6389. +Package hyperref Info: Link coloring with OCG OFF on input line 6394. +Package hyperref Info: PDF/A mode OFF on input line 6399. +LaTeX Info: Redefining \ref on input line 6439. +LaTeX Info: Redefining \pageref on input line 6443. +\Hy@abspage=\count108 +\c@Item=\count109 +\c@Hfootnote=\count110 +) +Package hyperref Info: Driver (default): hdvips. +(/usr/share/texlive/texmf-dist/tex/latex/hyperref/hdvips.def +File: hdvips.def 2018/02/06 v6.86b Hyperref driver for dvips +(/usr/share/texlive/texmf-dist/tex/latex/hyperref/pdfmark.def +File: pdfmark.def 2018/02/06 v6.86b Hyperref definitions for pdfmark specials +\pdf@docset=\toks16 +\pdf@box=\box30 +\pdf@toks=\toks17 +\pdf@defaulttoks=\toks18 +\HyField@AnnotCount=\count111 +\Fld@listcount=\count112 +\c@bookmark@seq@number=\count113 +(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/rerunfilecheck.sty +Package: rerunfilecheck 2016/05/16 v1.8 Rerun checks for auxiliary files (HO) +Package uniquecounter Info: New unique counter `rerunfilecheck' on input line 2 +82. +) +\Hy@SectionHShift=\skip47 +)) (/usr/share/texlive/texmf-dist/tex/latex/base/fontenc.sty +Package: fontenc 2017/04/05 v2.0i Standard LaTeX package +(/usr/share/texlive/texmf-dist/tex/latex/base/t1enc.def +File: t1enc.def 2017/04/05 v2.0i Standard LaTeX file +LaTeX Font Info: Redeclaring font encoding T1 on input line 48. +)) +\oldparskip=\skip48 +\oldparindent=\skip49 +\oldbaselineskip=\skip50 +(/usr/share/texlive/texmf-dist/tex/latex/xcolor/xcolor.sty +Package: xcolor 2016/05/11 v2.12 LaTeX color extensions (UK) +(/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/color.cfg +File: color.cfg 2016/01/02 v1.6 sample color configuration +) +Package xcolor Info: Driver file: dvips.def on input line 225. +Package xcolor Info: Model `cmy' substituted by `cmy0' on input line 1348. +Package xcolor Info: Model `RGB' extended on input line 1364. +Package xcolor Info: Model `HTML' substituted by `rgb' on input line 1366. +Package xcolor Info: Model `Hsb' substituted by `hsb' on input line 1367. +Package xcolor Info: Model `tHsb' substituted by `hsb' on input line 1368. +Package xcolor Info: Model `HSB' substituted by `hsb' on input line 1369. +Package xcolor Info: Model `Gray' substituted by `gray' on input line 1370. +Package xcolor Info: Model `wave' substituted by `hsb' on input line 1371. +) (/usr/share/texlive/texmf-dist/tex/latex/base/inputenc.sty +Package: inputenc 2015/03/17 v1.2c Input encoding file +\inpenc@prehook=\toks19 +\inpenc@posthook=\toks20 +) +\sizebox=\box31 +\lthtmlwrite=\write4 +(./images.aux) +\openout1 = `images.aux'. + +LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 176. +LaTeX Font Info: ... okay on input line 176. +LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 176. +LaTeX Font Info: ... okay on input line 176. +LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 176. +LaTeX Font Info: ... okay on input line 176. +LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 176. +LaTeX Font Info: ... okay on input line 176. +LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 176. +LaTeX Font Info: ... okay on input line 176. +LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 176. +LaTeX Font Info: ... okay on input line 176. +LaTeX Font Info: Checking defaults for PD1/pdf/m/n on input line 176. +LaTeX Font Info: ... okay on input line 176. +LaTeX Font Info: Try loading font information for T1+ptm on input line 176. +(/usr/share/texlive/texmf-dist/tex/latex/psnfss/t1ptm.fd +File: t1ptm.fd 2001/06/04 font definitions for T1/ptm. +) +\AtBeginShipoutBox=\box32 +Package hyperref Info: Link coloring OFF on input line 176. +(/usr/share/texlive/texmf-dist/tex/latex/hyperref/nameref.sty +Package: nameref 2016/05/21 v2.44 Cross-referencing by name of section +(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/gettitlestring.sty +Package: gettitlestring 2016/05/16 v1.5 Cleanup title references (HO) +) +\c@section@level=\count114 +) +LaTeX Info: Redefining \ref on input line 176. +LaTeX Info: Redefining \pageref on input line 176. +LaTeX Info: Redefining \nameref on input line 176. +\@outlinefile=\write5 +\openout5 = `images.out'. + + +latex2htmlLength hsize=349.0pt + +latex2htmlLength vsize=697.295pt + +latex2htmlLength hoffset=0.0pt + +latex2htmlLength voffset=0.0pt + +latex2htmlLength topmargin=0.0pt + +latex2htmlLength topskip=0.00003pt + +latex2htmlLength headheight=0.0pt + +latex2htmlLength headsep=0.0pt + +latex2htmlLength parskip=0.0pt + +latex2htmlLength oddsidemargin=0.0pt + +latex2htmlLength evensidemargin=0.0pt + +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <7> on input line 200. +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <5> on input line 200. +l2hSize :tex2html_wrap_inline134253:6.74997pt::0.0pt::3.94516pt. +[1 + + + +] +l2hSize :tex2html_wrap_inline134255:7.24997pt::7.24997pt::21.08658pt. +[2 + + +] +l2hSize :tex2html_wrap_inline134257:7.24997pt::7.24997pt::19.98682pt. +[3 + + +] +File: ESMF_sandwich.eps Graphic file (type eps) + +Overfull \hbox (33.42874pt too wide) detected at line 230 + [] + [] + +l2hSize :tex2html_wrap312:210.78749pt::0.0pt::349.0pt. +[4 + + +] +l2hSize :tex2html_wrap_inline1710:7.24997pt::7.24997pt::14.70204pt. +[5 + + +] +l2hSize :tex2html_wrap_inline1714:7.24997pt::7.24997pt::5.19052pt. +[6 + + +] +l2hSize :tex2html_wrap_inline1716:8.0pt::8.0pt::83.48174pt. +[7 + + +] +l2hSize :tex2html_wrap_inline1718:7.44444pt::7.44444pt::12.43874pt. +[8 + + +] +l2hSize :tex2html_wrap_inline1724:7.33331pt::7.33331pt::15.10365pt. +[9 + + +] +l2hSize :tex2html_wrap_inline1726:7.33331pt::7.33331pt::15.51537pt. +[10 + + +] +l2hSize :tex2html_wrap_inline1728:8.0pt::8.0pt::113.75217pt. +[11 + + +] +l2hSize :tex2html_wrap_inline1730:7.33331pt::7.33331pt::12.99275pt. +[12 + + +] +l2hSize :tex2html_wrap_inline1732:10.38896pt::10.38896pt::268.15746pt. +[13 + + +] +File: ESMF_GEOS5.eps Graphic file (type eps) + +Overfull \hbox (109.91138pt too wide) detected at line 405 + [] + [] + +l2hSize :tex2html_wrap3068:279.14096pt::0.0pt::349.0pt. +[14 + + +] +File: ESMF_appunit.eps Graphic file (type eps) + +Overfull \hbox (124.76999pt too wide) detected at line 412 + [] + [] + +l2hSize :tex2html_wrap3088:346.29375pt::0.0pt::349.0pt. +[15 + + +] +File: ESMF_serial.eps Graphic file (type eps) + +Overfull \hbox (44.46999pt too wide) detected at line 419 + [] + [] + +l2hSize :tex2html_wrap3108:445.665pt::0.0pt::349.0pt. +[16 + + +] +File: ESMF_concurrent.eps Graphic file (type eps) + +Overfull \hbox (44.46999pt too wide) detected at line 425 + [] + [] + +l2hSize :tex2html_wrap3114:382.42874pt::0.0pt::349.0pt. +[17 + + +] +File: ESMF_reconcile.eps Graphic file (type eps) + +Overfull \hbox (51.49625pt too wide) detected at line 433 + [] + [] + +l2hSize :tex2html_wrap3134:418.56374pt::0.0pt::349.0pt. +[18 + + +] +File: Comp_obj.eps Graphic file (type eps) + +Overfull \hbox (88.635pt too wide) detected at line 441 + [] + [] + +l2hSize :tex2html_wrap134509:143.53624pt::0.0pt::349.0pt. +[19 + + +] +File: Excl_src_grid.eps Graphic file (type eps) + +l2hSize :tex2html_wrap13357:158.9929pt::0.0pt::349.0pt. +[20 + + +] +File: Excl_dst_grid.eps Graphic file (type eps) + +l2hSize :tex2html_wrap13363:151.76596pt::0.0pt::349.0pt. +[21 + + +] +File: Excl_src_grid_cpl.eps Graphic file (type eps) + +Overfull \hbox (45.77219pt too wide) detected at line 1182 + [] + [] + +l2hSize :tex2html_wrap13371:183.38387pt::0.0pt::349.0pt. +[22 + + +] +File: Excl_dst_grid_cpl.eps Graphic file (type eps) + +Overfull \hbox (86.42378pt too wide) detected at line 1188 + [] + [] + +l2hSize :tex2html_wrap13377:187.90071pt::0.0pt::349.0pt. +[23 + + +] +File: State_obj.eps Graphic file (type eps) + +Overfull \hbox (124.76999pt too wide) detected at line 1195 + [] + [] + +l2hSize :tex2html_wrap135234:138.51749pt::0.0pt::349.0pt. +[24 + + +] +File: webservices.eps Graphic file (type eps) + +l2hSize :tex2html_wrap16909:279.54437pt::0.0pt::349.0pt. +[25 + + +] +l2hSize :tex2html_wrap_inline17590:6.94444pt::0.0pt::5.7049pt. +[26 + + +] +l2hSize :tex2html_wrap_inline17592:10.38896pt::10.38896pt::219.23499pt. +[27 + + +] +l2hSize :tex2html_wrap_inline17594:7.24997pt::7.24997pt::8.51682pt. +[28 + + +] +l2hSize :tex2html_wrap_inline17596:7.33331pt::7.33331pt::16.85017pt. +[29 + + +] +l2hSize :tex2html_wrap_inline17598:7.24997pt::7.24997pt::11.9312pt. +[30 + + +] +l2hSize :tex2html_wrap_inline17600:7.24997pt::7.24997pt::9.49046pt. +[31 + + +] +l2hSize :tex2html_wrap_inline17602:10.38896pt::10.38896pt::268.15746pt. +[32 + + +] +l2hSize :tex2html_wrap_inline19546:8.94843pt::8.94843pt::113.58128pt. +[33 + + +] +l2hSize :tex2html_wrap_inline19548:8.94843pt::8.94843pt::110.72125pt. +[34 + + +] +l2hSize :tex2html_wrap_inline19550:7.24997pt::7.24997pt::83.0809pt. +[35 + + +] +l2hSize :tex2html_wrap_inline19552:8.0pt::8.0pt::112.99733pt. +[36 + + +] +l2hSize :tex2html_wrap_inline19554:7.24997pt::7.24997pt::5.53128pt. +[37 + + +] +l2hSize :tex2html_wrap_inline19556:7.24997pt::7.24997pt::5.67018pt. +[38 + + +] +l2hSize :tex2html_wrap_inline19558:6.74997pt::0.0pt::6.22461pt. +[39 + + +] +l2hSize :tex2html_wrap_inline19560:6.74997pt::0.0pt::5.70604pt. +[40 + + +] +l2hSize :tex2html_wrap_inline21288:7.24997pt::7.24997pt::23.83336pt. +[41 + + +] +l2hSize :tex2html_wrap_inline21290:7.24997pt::7.24997pt::16.05556pt. +[42 + + +] +l2hSize :tex2html_wrap_inline24559:7.24997pt::7.24997pt::58.07022pt. +[43 + + +] +l2hSize :tex2html_wrap_inline24561:8.0pt::8.0pt::108.93636pt. +[44 + + +] +l2hSize :tex2html_wrap_inline24563:8.0pt::8.0pt::65.22731pt. +[45 + + +] +l2hSize :tex2html_wrap_inline24565:7.24997pt::7.24997pt::13.0163pt. +[46 + + +] +l2hSize :tex2html_wrap_inline24567:7.24997pt::7.24997pt::13.38538pt. +[47 + + +] +l2hSize :tex2html_wrap_inline24569:8.0pt::8.0pt::46.09215pt. +[48 + + +] +l2hSize :tex2html_wrap_inline24571:7.24997pt::7.24997pt::10.82816pt. +[49 + + +] +l2hSize :tex2html_wrap_inline24573:7.44444pt::7.44444pt::30.11972pt. +[50 + + +] +File: FieldParameterSetup.eps Graphic file (type eps) + +Overfull \hbox (111.72124pt too wide) detected at line 2370 + [] + [] + +l2hSize :tex2html_wrap24697:596.22748pt::0.0pt::349.0pt. +[51 + + +] +l2hSize :tex2html_wrap_inline25883:8.0pt::8.0pt::164.64523pt. +[52 + + +] +l2hSize :tex2html_wrap_inline25885:7.44444pt::7.44444pt::17.3328pt. +[53 + + +] +l2hSize :tex2html_wrap_inline25887:7.33331pt::7.33331pt::19.61928pt. +[54 + + +] +l2hSize :tex2html_wrap_inline25889:7.24997pt::7.24997pt::18.51802pt. +[55 + + +] +l2hSize :tex2html_wrap_inline26040:8.64003pt::8.64003pt::49.29288pt. +[56 + + +] +l2hSize :tex2html_wrap_inline26042:8.0pt::8.0pt::52.49536pt. +[57 + + +] +l2hSize :tex2html_wrap_inline26044:8.0pt::8.0pt::104.72679pt. +[58 + + +] +l2hSize :tex2html_wrap_inline26048:6.74997pt::0.0pt::29.6666pt. +[59 + + +] +l2hSize :tex2html_wrap_inline26050:6.74997pt::0.0pt::6.2153pt. +[60 + + +] +l2hSize :tex2html_wrap_inline27922:6.74997pt::0.0pt::6.50238pt. +[61 + + +] +l2hSize :tex2html_wrap_inline35407:7.44444pt::7.44444pt::77.26146pt. +[62 + + +] +l2hSize :tex2html_wrap_inline43657:7.24997pt::7.24997pt::32.72223pt. +[63 + + +] +l2hSize :tex2html_wrap_inline44752:7.44444pt::7.44444pt::80.91606pt. +[64 + + +] +l2hSize :tex2html_wrap_inline44754:8.0pt::8.0pt::33.27786pt. +[65 + + +] +l2hSize :tex2html_wrap_inline44756:7.24997pt::7.24997pt::63.2776pt. +[66 + + +] +l2hSize :tex2html_wrap_inline46005:8.0pt::8.0pt::26.83012pt. +[67 + + +] +l2hSize :displaymath45914:14.5pt::0.0pt::349.0pt. +[68 + + +] +l2hSize :displaymath45916:14.5pt::0.0pt::349.0pt. +[69 + + +] +l2hSize :displaymath45918:14.86108pt::0.0pt::349.0pt. +[70 + + +] +l2hSize :tex2html_wrap_inline46007:7.33331pt::7.33331pt::35.19728pt. +[71 + + +] +l2hSize :tex2html_wrap_inline46009:7.33331pt::7.33331pt::36.08156pt. +[72 + + +] +l2hSize :tex2html_wrap_inline46797:6.74997pt::0.0pt::5.50005pt. +[73 + + +] +l2hSize :tex2html_wrap_inline46799:6.74997pt::0.0pt::5.50005pt. +[74 + + +] +l2hSize :tex2html_wrap_inline46801:7.24997pt::7.24997pt::46.05545pt. +[75 + + +] +l2hSize :tex2html_wrap_inline46803:6.74997pt::0.0pt::10.50006pt. +[76 + + +] +l2hSize :tex2html_wrap_inline47276:6.74997pt::0.0pt::5.50005pt. +[77 + + +] +l2hSize :tex2html_wrap_inline47280:8.0pt::8.0pt::8.27783pt. +[78 + + +] +l2hSize :tex2html_wrap_inline47282:8.0pt::8.0pt::6.0556pt. +[79 + + +] +File: GridDecomps.eps Graphic file (type eps) + +Overfull \hbox (109.91138pt too wide) detected at line 5091 + [] + [] + +l2hSize :tex2html_wrap57854:140.92552pt::0.0pt::349.0pt. +[80 + + +] +File: LogRectGrids.eps Graphic file (type eps) + +Overfull \hbox (109.91138pt too wide) detected at line 5098 + [] + [] + +l2hSize :tex2html_wrap57870:140.92552pt::0.0pt::349.0pt. +[81 + + +] +File: GridStaggerLoc2D.eps Graphic file (type eps) + +Overfull \hbox (3.31624pt too wide) detected at line 5114 + [] + [] + +l2hSize :tex2html_wrap58125:216.80998pt::0.0pt::349.0pt. +[82 + + +] +File: GridStaggerLoc3D.eps Graphic file (type eps) + +Overfull \hbox (3.31624pt too wide) detected at line 5120 + [] + [] + +l2hSize :tex2html_wrap58137:261.97874pt::0.0pt::349.0pt. +[83 + + +] +File: GridExclusiveReg.eps Graphic file (type eps) + +Overfull \hbox (71.06937pt too wide) detected at line 5176 + [] + [] + +l2hSize :tex2html_wrap59353:203.25937pt::0.0pt::349.0pt. +[84 + + +] +l2hSize :tex2html_wrap_inline58705:8.0pt::8.0pt::38.27788pt. +[85 + + +] +l2hSize :tex2html_wrap_inline58707:8.0pt::8.0pt::22.72227pt. +[86 + + +] +l2hSize :tex2html_wrap_inline58709:7.24997pt::7.24997pt::13.27785pt. +[87 + + +] +l2hSize :tex2html_wrap_inline58715:6.74997pt::0.0pt::5.50005pt. +[88 + + +] +File: GridCustStaggerLoc.eps Graphic file (type eps) + +Overfull \hbox (46.97935pt too wide) detected at line 5212 + [] + [] + +l2hSize :tex2html_wrap59517:223.5853pt::0.0pt::349.0pt. +[89 + + +] +l2hSize :tex2html_wrap_inline58717:8.0pt::8.0pt::22.72227pt. +[90 + + +] +l2hSize :tex2html_wrap_inline58719:7.24997pt::7.24997pt::13.27785pt. +[91 + + +] +l2hSize :tex2html_wrap_inline58727:8.0pt::8.0pt::32.1667pt. +[92 + + +] +l2hSize :tex2html_wrap_inline58729:8.0pt::8.0pt::32.1667pt. +[93 + + +] +File: GridCellsAndCorners.eps Graphic file (type eps) + +l2hSize :tex2html_wrap59545:162.6075pt::0.0pt::349.0pt. +[94 + + +] +l2hSize :tex2html_wrap_inline58751:8.0pt::8.0pt::32.7223pt. +[95 + + +] +l2hSize :tex2html_wrap_inline64433:8.14003pt::0.0pt::14.98619pt. +[96 + + +] +l2hSize :tex2html_wrap_inline67334:6.74997pt::0.0pt::5.1563pt. +[97 + + +] +l2hSize :tex2html_wrap_inline67336:8.0pt::8.0pt::527.62456pt. + +Overfull \hbox (181.62457pt too wide) in paragraph at lines 5661--5662 +[]|[] + [] + +[98 + + +] +l2hSize :tex2html_wrap_inline67340:8.0pt::8.0pt::109.4784pt. +[99 + + +] +l2hSize :tex2html_wrap_inline67352:8.0pt::8.0pt::553.72885pt. + +Overfull \hbox (207.72887pt too wide) in paragraph at lines 5683--5684 +[]|[] + [] + +[100 + + +] +l2hSize :tex2html_wrap_inline68289:7.44444pt::7.44444pt::9.88202pt. +[101 + + +] +l2hSize :tex2html_wrap_inline68291:6.83331pt::0.0pt::8.00005pt. +[102 + + +] +l2hSize :tex2html_wrap_inline68293:7.44444pt::7.44444pt::9.88202pt. +[103 + + +] +l2hSize :tex2html_wrap_inline68305:6.83331pt::0.0pt::8.31949pt. +[104 + + +] +l2hSize :tex2html_wrap_inline68307:10.38896pt::10.38896pt::164.95984pt. +[105 + + +] +l2hSize :tex2html_wrap_inline68309:10.38896pt::10.38896pt::239.29778pt. +[106 + + +] +l2hSize :tex2html_wrap_inline68311:7.24997pt::7.24997pt::16.09639pt. +[107 + + +] +l2hSize :tex2html_wrap_inline68315:6.83331pt::0.0pt::8.68056pt. +[108 + + +] +File: XGridEx1.eps Graphic file (type eps) + +Overfull \hbox (80.4086pt too wide) detected at line 5845 + [] + [] + +l2hSize :tex2html_wrap68887:288.48068pt::0.0pt::349.0pt. +[109 + + +] +l2hSize :tex2html_wrap_inline71025:6.74997pt::0.0pt::8.27783pt. +[110 + + +] +l2hSize :tex2html_wrap_inline71027:6.83331pt::0.0pt::9.625pt. +[111 + + +] +l2hSize :tex2html_wrap_inline71029:8.0pt::8.0pt::90.48274pt. +[112 + + +] +l2hSize :tex2html_wrap_inline71031:6.83331pt::0.0pt::27.70514pt. +[113 + + +] +l2hSize :tex2html_wrap_inline71033:7.33331pt::7.33331pt::26.84715pt. +[114 + + +] +l2hSize :tex2html_wrap_inline71037:7.24997pt::7.24997pt::22.7222pt. +[115 + + +] +l2hSize :tex2html_wrap_inline71039:7.24997pt::7.24997pt::41.05544pt. +[116 + + +] +File: dgconnect_2tiles_not_connected.eps Graphic file (type eps) + +Overfull \hbox (121.75876pt too wide) detected at line 6157 + [] + [] + +l2hSize :tex2html_wrap138540:242.9075pt::0.0pt::349.0pt. +[117 + + +] +! Missing $ inserted. + + $ +l.6162 + +I've inserted a begin-math/end-math symbol since I think +you left one out. Proceed, with fingers crossed. + +! Display math should end with $$. + + \par +l.6162 + +The `$' that I just saw supposedly matches a previous `$$'. +So I shall assume that you typed `$$' both times. + +! Missing $ inserted. + + $ +l.6163 \vec + a \rightarrow \vec b = \hat R \vec a + \vec P. +I've inserted a begin-math/end-math symbol since I think +you left one out. Proceed, with fingers crossed. + +! Missing $ inserted. + + $ +l.6164 \end{displaymath} + % +I've inserted something that you may have forgotten. +(See the above.) +With luck, this will get me unwedged. But if you +really didn't forget anything, try typing `2' now; then +my insertion and my current dilemma will both disappear. + +l2hSize :displaymath70648:30.74997pt::0.83333pt::349.0pt. +[118 + + +] +l2hSize :tex2html_wrap_inline71043:7.14444pt::0.0pt::5.78592pt. +[119 + + +] +l2hSize :tex2html_wrap_inline71045:9.78334pt::0.0pt::4.79169pt. +[120 + + +] +l2hSize :tex2html_wrap_inline71047:9.47221pt::0.0pt::8.17018pt. +[121 + + +] +l2hSize :tex2html_wrap_inline71049:9.67221pt::0.0pt::8.30907pt. +[122 + + +] +l2hSize :tex2html_wrap_inline71055:9.47221pt::0.0pt::28.17018pt. +[123 + + +] +l2hSize :tex2html_wrap_inline71057:10.17221pt::10.17221pt::43.86453pt. +[124 + + +] +l2hSize :tex2html_wrap_inline71059:10.28334pt::10.28334pt::166.77512pt. +[125 + + +] +File: dgconnect_2tiles_connected.eps Graphic file (type eps) + +Overfull \hbox (121.75876pt too wide) detected at line 6214 + [] + [] + +l2hSize :tex2html_wrap138554:242.9075pt::0.0pt::349.0pt. +[126 + + +] +l2hSize :displaymath70676:12.83333pt::0.0pt::349.0pt. +[127 + + +] +l2hSize :tex2html_wrap_inline71065:9.78334pt::0.0pt::25.63301pt. +[128 + + +] +l2hSize :tex2html_wrap_inline71069:7.64444pt::7.64444pt::5.53128pt. +[129 + + +] +l2hSize :tex2html_wrap_indisplay138562:10.28334pt::10.28334pt::25.63301pt. +[130 + + +] +l2hSize :tex2html_wrap_indisplay138563:7.24997pt::7.24997pt::8.27783pt. +[131 + + +] +l2hSize :tex2html_wrap_indisplay138564:9.97221pt::9.97221pt::55.74065pt. +[132 + + +] +l2hSize :tex2html_wrap_indisplay138566:9.97221pt::9.97221pt::65.04633pt. +[133 + + +] +l2hSize :displaymath70687:14.5pt::0.0pt::349.0pt. +[134 + + +] +l2hSize :tex2html_wrap_inline71071:8.98969pt::0.0pt::4.11115pt. +[135 + + +] +! Missing $ inserted. + + $ +l.6277 + +I've inserted a begin-math/end-math symbol since I think +you left one out. Proceed, with fingers crossed. + +! Display math should end with $$. + + \par +l.6277 + +The `$' that I just saw supposedly matches a previous `$$'. +So I shall assume that you typed `$$' both times. + +! Missing $ inserted. + + $ +l.6278 \vec + a \rightarrow \vec b = +I've inserted a begin-math/end-math symbol since I think +you left one out. Proceed, with fingers crossed. + +! Missing $ inserted. + + $ +l.6280 \end{displaymath} + % +I've inserted something that you may have forgotten. +(See the above.) +With luck, this will get me unwedged. But if you +really didn't forget anything, try typing `2' now; then +my insertion and my current dilemma will both disappear. + +l2hSize :displaymath70692:30.74997pt::2.5pt::349.0pt. +[136 + + +] +! Missing $ inserted. + + $ +l.6287 + +I've inserted a begin-math/end-math symbol since I think +you left one out. Proceed, with fingers crossed. + +! Display math should end with $$. + + \par +l.6287 + +The `$' that I just saw supposedly matches a previous `$$'. +So I shall assume that you typed `$$' both times. + +! Missing $ inserted. + + $ +l.6288 \vec + P = ({1\!\!1} - \hat R) \vec p + \vec t. +I've inserted a begin-math/end-math symbol since I think +you left one out. Proceed, with fingers crossed. + +! Missing $ inserted. + + $ +l.6289 \end{displaymath} + % +I've inserted something that you may have forgotten. +(See the above.) +With luck, this will get me unwedged. But if you +really didn't forget anything, try typing `2' now; then +my insertion and my current dilemma will both disappear. + +l2hSize :displaymath70697:30.74997pt::2.5pt::349.0pt. +[137 + + +] +l2hSize :tex2html_wrap_inline71075:6.88586pt::0.0pt::15.09729pt. +[138 + + +] +l2hSize :tex2html_wrap_inline71079:6.88586pt::0.0pt::10.09727pt. +[139 + + +] +l2hSize :tex2html_wrap_inline71081:15.0001pt::15.0001pt::45.22235pt. +[140 + + +] +l2hSize :tex2html_wrap_inline71083:15.0001pt::15.0001pt::30.22234pt. +[141 + + +] +l2hSize :tex2html_wrap_inline71087:15.0001pt::15.0001pt::53.00015pt. +[142 + + +] +l2hSize :tex2html_wrap_inline71089:15.0001pt::15.0001pt::38.00014pt. +[143 + + +] +l2hSize :tex2html_wrap_inline71091:6.88586pt::0.0pt::20.0973pt. +[144 + + +] +l2hSize :tex2html_wrap_inline71093:15.0001pt::15.0001pt::60.77795pt. +[145 + + +] +l2hSize :tex2html_wrap_inline71095:15.0001pt::15.0001pt::38.00014pt. +[146 + + +] +l2hSize :tex2html_wrap_inline71097:6.88586pt::0.0pt::20.0973pt. +[147 + + +] +l2hSize :tex2html_wrap_inline71099:15.0001pt::15.0001pt::53.00015pt. +[148 + + +] +l2hSize :tex2html_wrap_inline71101:15.0001pt::15.0001pt::38.00014pt. +[149 + + +] +l2hSize :tex2html_wrap_inline71105:15.0001pt::15.0001pt::53.00015pt. +[150 + + +] +l2hSize :tex2html_wrap_inline71107:15.0001pt::15.0001pt::38.00014pt. +[151 + + +] +l2hSize :tex2html_wrap_inline71111:15.0001pt::15.0001pt::53.00015pt. +[152 + + +] +l2hSize :tex2html_wrap_inline71113:15.0001pt::15.0001pt::38.00014pt. +[153 + + +] +l2hSize :tex2html_wrap_inline71117:15.0001pt::15.0001pt::45.22235pt. +[154 + + +] +l2hSize :tex2html_wrap_inline71119:15.0001pt::15.0001pt::30.22234pt. +[155 + + +] +l2hSize :tex2html_wrap_inline71123:15.0001pt::15.0001pt::60.77795pt. +[156 + + +] +l2hSize :tex2html_wrap_inline71125:15.0001pt::15.0001pt::38.00014pt. +[157 + + +] +l2hSize :tex2html_wrap_inline71127:6.88586pt::0.0pt::35.25012pt. +[158 + + +] +l2hSize :tex2html_wrap_inline71129:7.38586pt::7.38586pt::55.25006pt. +[159 + + +] +File: dgconnect_1tile_not_connected.eps Graphic file (type eps) + +l2hSize :tex2html_wrap138634:311.1625pt::0.0pt::349.0pt. +[160 + + +] +l2hSize :tex2html_wrap_inline71131:10.28334pt::10.28334pt::166.15607pt. +[161 + + +] +File: dgconnect_1tile_periodic1_connected.eps Graphic file (type eps) + +l2hSize :tex2html_wrap138640:311.1625pt::0.0pt::349.0pt. +[162 + + +] +File: dgconnect_1tile_periodic2_connected.eps Graphic file (type eps) + +l2hSize :tex2html_wrap138644:311.1625pt::0.0pt::349.0pt. +[163 + + +] +l2hSize :tex2html_wrap_inline71143:7.24997pt::7.24997pt::21.16731pt. +[164 + + +] +l2hSize :tex2html_wrap_inline71155:7.24997pt::7.24997pt::39.11029pt. +[165 + + +] +l2hSize :tex2html_wrap_inline71157:6.88586pt::0.0pt::20.0973pt. +[166 + + +] +l2hSize :tex2html_wrap_inline71159:8.0pt::8.0pt::110.90118pt. +[167 + + +] +l2hSize :tex2html_wrap_inline71161:7.24997pt::7.24997pt::100.45555pt. +[168 + + +] +l2hSize :displaymath70831:25.00023pt::0.0pt::349.0pt. +[169 + + +] +l2hSize :tex2html_wrap_indisplay138663:10.17221pt::10.17221pt::8.30907pt. +[170 + + +] +l2hSize :tex2html_wrap_indisplay138665:10.28334pt::10.28334pt::29.96986pt. +[171 + + +] +l2hSize :tex2html_wrap_indisplay138667:15.0001pt::15.0001pt::198.26003pt. +[172 + + +] +l2hSize :tex2html_wrap_indisplay138669:15.0001pt::15.0001pt::72.47545pt. +[173 + + +] +File: dgconnect_1tile_peripole_connected.eps Graphic file (type eps) + +l2hSize :tex2html_wrap138680:318.18875pt::0.0pt::349.0pt. +[174 + + +] +l2hSize :tex2html_wrap_inline71177:8.0pt::8.0pt::137.62262pt. +[175 + + +] +l2hSize :tex2html_wrap_inline71179:8.0pt::8.0pt::172.06693pt. +[176 + + +] +l2hSize :tex2html_wrap_inline71185:7.24997pt::7.24997pt::19.31389pt. +[177 + + +] +l2hSize :tex2html_wrap_indisplay138693:15.0001pt::15.0001pt::182.50655pt. +[178 + + +] +l2hSize :tex2html_wrap_indisplay138695:15.0001pt::15.0001pt::80.61635pt. +[179 + + +] +File: dgconnect_1tile_peribipole_connected.eps Graphic file (type eps) + +l2hSize :tex2html_wrap138705:318.18875pt::0.0pt::349.0pt. +[180 + + +] +File: dgconnect_cusph_not_connected.eps Graphic file (type eps) + +Overfull \hbox (27.40625pt too wide) detected at line 6619 + [] + [] + +l2hSize :tex2html_wrap138710:290.08376pt::0.0pt::349.0pt. +[181 + + +] +File: dgconnect_cusph_5connected.eps Graphic file (type eps) + +Overfull \hbox (27.40625pt too wide) detected at line 6625 + [] + [] + +l2hSize :tex2html_wrap138714:290.08376pt::0.0pt::349.0pt. +[182 + + +] +l2hSize :tex2html_wrap_inline71201:6.74997pt::0.0pt::10.50005pt. +[183 + + +] +File: dgconnect_cusph_6connected.eps Graphic file (type eps) + +Overfull \hbox (27.40625pt too wide) detected at line 6637 + [] + [] + +l2hSize :tex2html_wrap138722:290.08376pt::0.0pt::349.0pt. +[184 + + +] +! Missing $ inserted. + + $ +l.6642 + +I've inserted a begin-math/end-math symbol since I think +you left one out. Proceed, with fingers crossed. + +! Display math should end with $$. + + \par +l.6642 + +The `$' that I just saw supposedly matches a previous `$$'. +So I shall assume that you typed `$$' both times. + +! Missing $ inserted. + + $ +l.6643 \vec + P = \vec b - \hat R \vec a. +I've inserted a begin-math/end-math symbol since I think +you left one out. Proceed, with fingers crossed. + +! Missing $ inserted. + + $ +l.6644 \end{displaymath} + % +I've inserted something that you may have forgotten. +(See the above.) +With luck, this will get me unwedged. But if you +really didn't forget anything, try typing `2' now; then +my insertion and my current dilemma will both disappear. + +l2hSize :displaymath70962:30.74997pt::0.83333pt::349.0pt. +[185 + + +] +l2hSize :tex2html_wrap_inline71217:6.88586pt::0.0pt::15.09729pt. +[186 + + +] +l2hSize :tex2html_wrap_inline71221:6.88586pt::0.0pt::20.0973pt. +[187 + + +] +l2hSize :tex2html_wrap_inline71223:15.0001pt::15.0001pt::74.00352pt. +[188 + + +] +l2hSize :tex2html_wrap_inline71231:15.0001pt::15.0001pt::74.00352pt. +[189 + + +] +File: dgconnect_cusph_2rotconnected.eps Graphic file (type eps) + +Overfull \hbox (27.40625pt too wide) detected at line 6680 + [] + [] + +l2hSize :tex2html_wrap138744:290.08376pt::0.0pt::349.0pt. +[190 + + +] +File: dgconnect_cusph_12connected.eps Graphic file (type eps) + +Overfull \hbox (31.42125pt too wide) detected at line 6686 + [] + [] + +l2hSize :tex2html_wrap138748:321.2pt::0.0pt::349.0pt. +[191 + + +] +l2hSize :tex2html_wrap_inline72759:8.64003pt::8.64003pt::118.41658pt. +[192 + + +] +l2hSize :tex2html_wrap_inline72767:7.24997pt::7.24997pt::23.72453pt. +[193 + + +] +l2hSize :tex2html_wrap_inline72769:6.74997pt::0.0pt::17.05789pt. +[194 + + +] +File: TimeMgr_desc.eps Graphic file (type eps) + +Overfull \hbox (124.76999pt too wide) detected at line 7410 + [] + [] + +l2hSize :tex2html_wrap139134:137.51375pt::0.0pt::349.0pt. +[195 + + +] +l2hSize :tex2html_wrap_inline79408:9.22066pt::9.22066pt::19.86676pt. +[196 + + +] +File: TimeMgr_obj.eps Graphic file (type eps) + +Overfull \hbox (124.76999pt too wide) detected at line 7428 + [] + [] + +l2hSize :tex2html_wrap139173:219.82124pt::0.0pt::349.0pt. +[197 + + +] +l2hSize :tex2html_wrap_inline79523:8.14003pt::0.0pt::8.97229pt. +[198 + + +] +l2hSize :tex2html_wrap_inline81073:8.14003pt::0.0pt::13.9723pt. +[199 + + +] +l2hSize :tex2html_wrap_inline81077:8.14003pt::0.0pt::13.9723pt. +[200 + + +] +File: Log_obj.eps Graphic file (type eps) + +Overfull \hbox (124.76999pt too wide) detected at line 8420 + [] + [] + +l2hSize :tex2html_wrap140512:210.78749pt::0.0pt::349.0pt. +[201 + + +] +l2hSize :tex2html_wrap_inline97805:8.0pt::8.0pt::98.69392pt. +[202 + + +] +l2hSize :tex2html_wrap_inline97807:8.0pt::8.0pt::81.47177pt. +[203 + + +] +File: VM_design.eps Graphic file (type eps) + +Overfull \hbox (105.70335pt too wide) detected at line 9177 + [] + [] + +l2hSize :tex2html_wrap100760:331.84311pt::0.0pt::349.0pt. +[204 + + +] +l2hSize :tex2html_wrap_inline102006:7.24997pt::7.24997pt::8.27783pt. +[205 + + +] +l2hSize :tex2html_wrap_inline102008:7.24997pt::7.24997pt::8.27783pt. +[206 + + +] +l2hSize :tex2html_wrap_inline102026:8.0pt::8.0pt::75.17973pt. +[207 + + +] +File: Appendix_uml.eps Graphic file (type eps) + +Overfull \hbox (8.33635pt too wide) detected at line 9664 + [] + [] + +l2hSize :tex2html_wrap107306:480.99883pt::0.0pt::349.0pt. +[208 + + +] +Package atveryend Info: Empty hook `BeforeClearDocument' on input line 9784. +Package atveryend Info: Empty hook `AfterLastShipout' on input line 9784. +(./images.aux) +Package atveryend Info: Empty hook `AtVeryEndDocument' on input line 9784. +Package atveryend Info: Executing hook `AtEndAfterFileList' on input line 9784. + + +Package rerunfilecheck Warning: File `images.out' has changed. +(rerunfilecheck) Rerun to get outlines right +(rerunfilecheck) or use package `bookmark'. + +Package rerunfilecheck Info: Checksums for `images.out': +(rerunfilecheck) Before: +(rerunfilecheck) After: D41D8CD98F00B204E9800998ECF8427E;0. +Package atveryend Info: Empty hook `AtVeryVeryEnd' on input line 9784. + ) +Here is how much of TeX's memory you used: + 6752 strings out of 492983 + 100633 string characters out of 6134922 + 221269 words of memory out of 5000000 + 10251 multiletter control sequences out of 15000+600000 + 6047 words of font info for 16 fonts, out of 8000000 for 9000 + 1141 hyphenation exceptions out of 8191 + 29i,8n,35p,834b,367s stack positions out of 5000i,500n,10000p,200000b,80000s + +Output written on images.dvi (208 pages, 135856 bytes). diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/images.out b/docs/nightly/fix/reconcile-info/ESMF_refdoc/images.out new file mode 100644 index 000000000..e69de29bb diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/images.pl b/docs/nightly/fix/reconcile-info/ESMF_refdoc/images.pl new file mode 100644 index 000000000..dd6a858e4 --- /dev/null +++ b/docs/nightly/fix/reconcile-info/ESMF_refdoc/images.pl @@ -0,0 +1,1340 @@ +# LaTeX2HTML 2018 (Released Feb 1, 2018) +# Associate images original text with physical files. + + +$key = q/();MSF=1.6;AAT/; +$cached_env_img{$key} = q|$()$|; + +$key = q/(-1,-1);MSF=1.6;AAT/; +$cached_env_img{$key} = q|$(-1,-1)$|; + +$key = q/(0,0);MSF=1.6;AAT/; +$cached_env_img{$key} = q|$(0,0)$|; + +$key = q/(0,0,0);MSF=1.6;AAT/; +$cached_env_img{$key} = q|$(0,0,0)$|; + +$key = q/(1,1);MSF=1.6;AAT/; +$cached_env_img{$key} = q|$(1,1)$|; + +$key = q/(1,1,1);MSF=1.6;AAT/; +$cached_env_img{$key} = q|$(1,1,1)$|; + +$key = q/(10,10);MSF=1.6;AAT/; +$cached_env_img{$key} = q|$(10,10)$|; + +$key = q/(i_{min}+1,j_{max}+1)rightarrow(i_{max}-1,j_{max});MSF=1.6;AAT/; +$cached_env_img{$key} = q|$(i_{min}+1, j_{max}+1) \rightarrow (i_{max}-1, j_{max})$|; + +$key = q/(i_{min},j_{max}+1)rightarrow(i_{max},j_{max});MSF=1.6;AAT/; +$cached_env_img{$key} = q|$(i_{min}, j_{max}+1) \rightarrow (i_{max}, j_{max})$|; + +$key = q/(n-1)*spatialDim+1;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$(n-1)*spatialDim+1$|; + +$key = q/(nDEstimes1times...times1);MSF=1.6;AAT/; +$cached_env_img{$key} = q|$(nDEs \times 1
+\times ... \times 1) $|; + +$key = q/+1;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$+1$|; + +$key = q/+;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$+$|; + +$key = q/+frac{{{rm{sN}}{{{rm{sD}};MSF=1.6;AAT/; +$cached_env_img{$key} = q|$+
+\frac{{\rm sN}}{{\rm sD}}$|; + +$key = q/-1;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$-1$|; + +$key = q/-80^{circ}..+80^{circ};MSF=1.6;AAT/; +$cached_env_img{$key} = q|$-80^{\circ}..+80^{\circ}$|; + +$key = q/0;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$0$|; + +$key = q/0^{circ}..360^{circ};MSF=1.6;AAT/; +$cached_env_img{$key} = q|$0^{\circ}..360^{\circ}$|; + +$key = q/0^{circ};MSF=1.6;AAT/; +$cached_env_img{$key} = q|$0^{\circ}$|; + +$key = q/1+n;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$1+n$|; + +$key = q/10;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$10$|; + +$key = q/10^{8};MSF=1.6;AAT/; +$cached_env_img{$key} = q|$10^{8}$|; + +$key = q/10times10;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$10\times 10$|; + +$key = q/180^circ;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$180^\circ$|; + +$key = q/180^{circ};MSF=1.6;AAT/; +$cached_env_img{$key} = q|$180^{\circ}$|; + +$key = q/1;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$1$|; + +$key = q/270^circ;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$270^\circ$|; + +$key = q/270^{circ};MSF=1.6;AAT/; +$cached_env_img{$key} = q|$270^{\circ}$|; + +$key = q/2;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$2$|; + +$key = q/2^{31};MSF=1.6;AAT/; +$cached_env_img{$key} = q|$2^{31}$|; + +$key = q/2^{63};MSF=1.6;AAT/; +$cached_env_img{$key} = q|$2^{63}$|; + +$key = q/2times3=6;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$2 \times 3 = 6 $|; + +$key = q/2times5=10;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$2 \times 5=10$|; + +$key = q/4times1;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$4 \times 1$|; + +$key = q/4times4times4=64;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$4\times 4\times 4 = 64$|; + +$key = q/5;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$5$|; + +$key = q/90^circ;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$90^\circ$|; + +$key = q/90^{circ};MSF=1.6;AAT/; +$cached_env_img{$key} = q|$90^{\circ}$|; + +$key = q/<0;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$< 0$|; + +$key = q/>2^{31}-1=2,147,483,647;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$> 2^{31}-1 = 2,147,483,647$|; + +$key = q/>=0;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$>= 0$|; + +$key = q/A;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$A$|; + +$key = q/A_{dj};MSF=1.6;AAT/; +$cached_env_img{$key} = q|$A_{dj}$|; + +$key = q/A_{si};MSF=1.6;AAT/; +$cached_env_img{$key} = q|$A_{si}$|; + +$key = q/D_j;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$D_j$|; + +$key = q/F;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$F$|; + +$key = q/M_{i,j};MSF=1.6;AAT/; +$cached_env_img{$key} = q|$M_{i,j}$|; + +$key = q/N-1;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$N-1$|; + +$key = q/N;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$N$|; + +$key = q/N_i=10;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$N_i = 10$|; + +$key = q/N_j=20;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$N_j = 20$|; + +$key = q/[-10,5];MSF=1.6;AAT/; +$cached_env_img{$key} = q|$[-10, 5]$|; + +$key = q/[0...localDeCount-1];MSF=1.6;AAT/; +$cached_env_img{$key} = q|$[0...localDeCount-1]$|; + +$key = q/[0..petCount-1];MSF=1.6;AAT/; +$cached_env_img{$key} = q|$[0..petCount-1]$|; + +$key = q/[1...localDeCount];MSF=1.6;AAT/; +$cached_env_img{$key} = q|$[1...localDeCount]$|; + +$key = q/[];MSF=1.6;AAT/; +$cached_env_img{$key} = q|$[]$|; + +$key = q/^{14};MSF=1.6;AAT/; +$cached_env_img{$key} = q|$^{14}$|; + +$key = q/c_{d};MSF=1.6;AAT/; +$cached_env_img{$key} = q|$c_{d}$|; + +$key = q/c_{si};MSF=1.6;AAT/; +$cached_env_img{$key} = q|$c_{si}$|; + +$key = q/d;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$d$|; + +$key = q/d=sum^{intersecting-source-cells}_{i}(s_{i}+nablas_{i}cdot(c_{si}-c_{d}));MSF=1.6;AAT/; +$cached_env_img{$key} = q|$d=\sum^{intersecting-source-cells}_{i}(s_{i}+\nabla s_{i} \cdot (c_{si}-c_{d}))$|; + +$key = q/displaystylehatR(veca-vecp)+vecp;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$\displaystyle \hat R (\vec a - \vec p) + \vec p$|; + +$key = q/displaystylehatRveca+({1!!1}-hatR)vecp;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$\displaystyle \hat R \vec a + ({1\!\!1} - \hat R) \vec p$|; + +$key = q/displaystyleleft(array{{l}i+i_{size}slash2j_{max}array{right)-left(arrol_mark>-1array{right)left(array{{l}ij_{max}+1array{right);MSF=1.6;AAT/; +$cached_env_img{$key} = q|$\displaystyle \left( \begin{array}{l}
+i + i_{size}/2\\\\
+j_{max} \end{array} \ri...
+...\end{array} \right)
+\left( \begin{array}{l}
+i \\\\
+j_{max}+1 \end{array} \right)$|; + +$key = q/displaystyleleft(array{{l}i_{max}+i_{min}2j_{max}+1array{right).;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$\displaystyle \left( \begin{array}{l}
+i_{max}+i_{min}\\\\
+2j_{max} +1 \end{array} \right).$|; + +$key = q/displaystyleleft(array{{l}i_{max}j_{max}array{right)-left(array{{rr}-1k>-1array{right)left(array{{l}i_{min}j_{max}+1array{right);MSF=1.6;AAT/; +$cached_env_img{$key} = q|$\displaystyle \left( \begin{array}{l}
+i_{max}\\\\
+j_{max} \end{array} \right)
+- ...
+...rray} \right)
+\left( \begin{array}{l}
+i_{min} \\\\
+j_{max}+1 \end{array} \right)$|; + +$key = q/displaystyleleft(array{{l}i_{size}slash22j_{max}+1array{right).;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$\displaystyle \left( \begin{array}{l}
+i_{size}/2\\\\
+2j_{max} +1 \end{array} \right).$|; + +$key = q/displaystylevecP;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$\displaystyle \vec P$|; + +$key = q/displaystylevecarightarrowvecb;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$\displaystyle \vec a \rightarrow \vec b$|; + +$key = q/displaystylevecb-hatRveca;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$\displaystyle \vec b - \hat R \vec a$|; + +$key = q/dstField(i)=i*srcField(i),i=1...4;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$dstField(i) = i * srcField(i), i = 1 ... 4$|; + +$key = q/dst_i;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$dst_i$|; + +$key = q/e;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$e$|; + +$key = q/f(i,j);MSF=1.6;AAT/; +$cached_env_img{$key} = q|$f(i,j)$|; + +$key = q/f_1;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$f_1$|; + +$key = q/f_2;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$f_2$|; + +$key = q/f_{ij};MSF=1.6;AAT/; +$cached_env_img{$key} = q|$f_{ij}$|; + +$key = q/frac{rho}{rho^gamma}+u{(frac{p}{rho^gamma})}_x+v{(frac{p}{rho^gamma})}_y=0;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$\frac{\rho}{\rho^\gamma} + u {(\frac{p}{\rho^\gamma})}_x + v {(\frac{p}{\rho^\gamma})}_y = 0$|; + +$key = q/hatR;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$\hat R$|; + +$key = q/hatR=left(array{{rr}0&-11&0array{right);MSF=1.6;AAT/; +$cached_env_img{$key} = q|$\hat R=\left(\begin{array}{rr}
+0 & -1 \\\\
+1 & 0 \end{array} \right)$|; + +$key = q/hatR=left(array{{rr}0&1-1&0array{right);MSF=1.6;AAT/; +$cached_env_img{$key} = q|$\hat R=\left(\begin{array}{rr}
+0 & 1 \\\\
+-1 & 0 \end{array} \right)$|; + +$key = q/hatR={1!!1};MSF=1.6;AAT/; +$cached_env_img{$key} = q|$\hat R ={1\!\!1}$|; + +$key = q/i+1;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$i+1$|; + +$key = q/i;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$i$|; + +$key = q/i=mod(i+i_{size}slash2,i_{size});MSF=1.6;AAT/; +$cached_env_img{$key} = q|$i=mod(i+i_{size}/2, i_{size})$|; + +$key = q/i_B;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$i_B$|; + +$key = q/i_B=phi;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$i_B = \phi$|; + +$key = q/i_Bin[phi,1...n_B];MSF=1.6;AAT/; +$cached_env_img{$key} = q|$i_B \in [\phi, 1...n_B]$|; + +$key = q/i_{min};MSF=1.6;AAT/; +$cached_env_img{$key} = q|$i_{min}$|; + +$key = q/i_{size}=i_{max}-i_{min}+1;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$i_{size}=i_{max}
+-i_{min}+1$|; + +$key = q/includegraphics{Comp_obj};AAT/; +$cached_env_img{$key} = q|\includegraphics{Comp_obj}|; + +$key = q/includegraphics{Log_obj};AAT/; +$cached_env_img{$key} = q|\includegraphics{Log_obj}|; + +$key = q/includegraphics{State_obj};AAT/; +$cached_env_img{$key} = q|\includegraphics{State_obj}|; + +$key = q/includegraphics{TimeMgr_desc};AAT/; +$cached_env_img{$key} = q|\includegraphics{TimeMgr_desc}|; + +$key = q/includegraphics{TimeMgr_obj};AAT/; +$cached_env_img{$key} = q|\includegraphics{TimeMgr_obj}|; + +$key = q/includegraphics{dgconnect_1tile_not_connected.eps};AAT/; +$cached_env_img{$key} = q|\includegraphics{dgconnect_1tile_not_connected.eps}|; + +$key = q/includegraphics{dgconnect_1tile_peribipole_connected.eps};AAT/; +$cached_env_img{$key} = q|\includegraphics{dgconnect_1tile_peribipole_connected.eps}|; + +$key = q/includegraphics{dgconnect_1tile_periodic1_connected.eps};AAT/; +$cached_env_img{$key} = q|\includegraphics{dgconnect_1tile_periodic1_connected.eps}|; + +$key = q/includegraphics{dgconnect_1tile_periodic2_connected.eps};AAT/; +$cached_env_img{$key} = q|\includegraphics{dgconnect_1tile_periodic2_connected.eps}|; + +$key = q/includegraphics{dgconnect_1tile_peripole_connected.eps};AAT/; +$cached_env_img{$key} = q|\includegraphics{dgconnect_1tile_peripole_connected.eps}|; + +$key = q/includegraphics{dgconnect_2tiles_connected.eps};AAT/; +$cached_env_img{$key} = q|\includegraphics{dgconnect_2tiles_connected.eps}|; + +$key = q/includegraphics{dgconnect_2tiles_not_connected.eps};AAT/; +$cached_env_img{$key} = q|\includegraphics{dgconnect_2tiles_not_connected.eps}|; + +$key = q/includegraphics{dgconnect_cusph_12connected.eps};AAT/; +$cached_env_img{$key} = q|\includegraphics{dgconnect_cusph_12connected.eps}|; + +$key = q/includegraphics{dgconnect_cusph_2rotconnected.eps};AAT/; +$cached_env_img{$key} = q|\includegraphics{dgconnect_cusph_2rotconnected.eps}|; + +$key = q/includegraphics{dgconnect_cusph_5connected.eps};AAT/; +$cached_env_img{$key} = q|\includegraphics{dgconnect_cusph_5connected.eps}|; + +$key = q/includegraphics{dgconnect_cusph_6connected.eps};AAT/; +$cached_env_img{$key} = q|\includegraphics{dgconnect_cusph_6connected.eps}|; + +$key = q/includegraphics{dgconnect_cusph_not_connected.eps};AAT/; +$cached_env_img{$key} = q|\includegraphics{dgconnect_cusph_not_connected.eps}|; + +$key = q/j;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$j$|; + +$key = q/j=j_{max};MSF=1.6;AAT/; +$cached_env_img{$key} = q|$j=j_{max}$|; + +$key = q/j_{max};MSF=1.6;AAT/; +$cached_env_img{$key} = q|$j_{max}$|; + +$key = q/j_{min};MSF=1.6;AAT/; +$cached_env_img{$key} = q|$j_{min}$|; + +$key = q/left(array{{rr}-1&00&-1array{right);MSF=1.6;AAT/; +$cached_env_img{$key} = q|$\left( \begin{array}{rr}
+-1 & 0 \\\\
+0 & -1 \end{array} \right)$|; + +$key = q/left(array{{rr}-1&00&1array{right);MSF=1.6;AAT/; +$cached_env_img{$key} = q|$\left( \begin{array}{rr}
+-1 & 0 \\\\
+0 & 1 \end{array} \right)$|; + +$key = q/left(array{{rr}0&-1-1&0array{right);MSF=1.6;AAT/; +$cached_env_img{$key} = q|$\left( \begin{array}{rr}
+0 & -1 \\\\
+-1 & 0 \end{array} \right)$|; + +$key = q/left(array{{rr}0&-11&0array{right);MSF=1.6;AAT/; +$cached_env_img{$key} = q|$\left( \begin{array}{rr}
+0 & -1 \\\\
+1 & 0 \end{array} \right)$|; + +$key = q/left(array{{rr}0&1-1&0array{right);MSF=1.6;AAT/; +$cached_env_img{$key} = q|$\left( \begin{array}{rr}
+0 & 1 \\\\
+-1 & 0 \end{array} \right)$|; + +$key = q/left(array{{rr}0&11&0array{right);MSF=1.6;AAT/; +$cached_env_img{$key} = q|$\left( \begin{array}{rr}
+0 & 1 \\\\
+1 & 0 \end{array} \right)$|; + +$key = q/left(array{{rr}1&00&-1array{right);MSF=1.6;AAT/; +$cached_env_img{$key} = q|$\left( \begin{array}{rr}
+1 & 0 \\\\
+0 & -1 \end{array} \right)$|; + +$key = q/left(array{{rr}1&00&1array{right);MSF=1.6;AAT/; +$cached_env_img{$key} = q|$\left( \begin{array}{rr}
+1 & 0 \\\\
+0 & 1 \end{array} \right)$|; + +$key = q/left(array{{r}-1-2array{right);MSF=1.6;AAT/; +$cached_env_img{$key} = q|$\left( \begin{array}{r}
+-1 \\\\
+-2 \end{array} \right)$|; + +$key = q/left(array{{r}-12array{right);MSF=1.6;AAT/; +$cached_env_img{$key} = q|$\left( \begin{array}{r}
+-1 \\\\
+2 \end{array} \right)$|; + +$key = q/left(array{{r}-2-1array{right);MSF=1.6;AAT/; +$cached_env_img{$key} = q|$\left( \begin{array}{r}
+-2 \\\\
+-1 \end{array} \right)$|; + +$key = q/left(array{{r}-21array{right);MSF=1.6;AAT/; +$cached_env_img{$key} = q|$\left( \begin{array}{r}
+-2 \\\\
+1 \end{array} \right)$|; + +$key = q/left(array{{r}1-2array{right);MSF=1.6;AAT/; +$cached_env_img{$key} = q|$\left( \begin{array}{r}
+1 \\\\
+-2 \end{array} \right)$|; + +$key = q/left(array{{r}12array{right);MSF=1.6;AAT/; +$cached_env_img{$key} = q|$\left( \begin{array}{r}
+1 \\\\
+2 \end{array} \right)$|; + +$key = q/left(array{{r}2-1array{right);MSF=1.6;AAT/; +$cached_env_img{$key} = q|$\left( \begin{array}{r}
+2 \\\\
+-1 \end{array} \right)$|; + +$key = q/left(array{{r}21array{right);MSF=1.6;AAT/; +$cached_env_img{$key} = q|$\left( \begin{array}{r}
+2 \\\\
+1 \end{array} \right)$|; + +$key = q/localDeCount>1;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$localDeCount > 1 $|; + +$key = q/map_{A,B}(i);MSF=1.6;AAT/; +$cached_env_img{$key} = q|$map_{A,B}(i)$|; + +$key = q/map_{A,B}(i=1...n_A)=i_B;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$map_{A,B}(i=1...n_A) = i_B$|; + +$key = q/mathcal{F};MSF=1.6;AAT/; +$cached_env_img{$key} = q|$\mathcal{F}$|; + +$key = q/n;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$n$|; + +$key = q/n=;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$n=$|; + +$key = q/nDEs;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$nDEs$|; + +$key = q/n_A;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$n_A$|; + +$key = q/n_B;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$n_B$|; + +$key = q/n_{DE}=n_{PET};MSF=1.6;AAT/; +$cached_env_img{$key} = q|$n_{DE} = n_{PET}$|; + +$key = q/nablas_{i};MSF=1.6;AAT/; +$cached_env_img{$key} = q|$\nabla s_{i}$|; + +$key = q/number_of_corners_in_element(1)+number_of_corners_in_element(2)+cdots+number_of_corners_in_element(e-1)+1;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$number\_of\_corners\_in\_element(1)
++ number\_of\_corners\_in\_element(2) +
+\cdots + number\_of\_corners\_in\_element(e-1) + 1$|; + +$key = q/number_of_nodes_in_element(1)+number_of_nodes_in_element(2)+cdots+number_of_nodes_in_element(e-1)+1;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$number\_of\_nodes\_in\_element(1) + number\_of\_nodes\_in\_element(2) +
+\cdots + number\_of\_nodes\_in\_element(e-1) + 1$|; + +$key = q/p;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$p$|; + +$key = q/ranktimestileCount;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$rank \times tileCount$|; + +$key = q/rho;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$\rho$|; + +$key = q/rightarrow;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$\rightarrow$|; + +$key = q/s_{i};MSF=1.6;AAT/; +$cached_env_img{$key} = q|$s_{i}$|; + +$key = q/scalebox{0.5}{includegraphics{webservices}};AAT/; +$cached_env_img{$key} = q|\scalebox{0.5}{\includegraphics{webservices}}|; + +$key = q/scalebox{0.6}{includegraphics{VM_design}};AAT/; +$cached_env_img{$key} = q|\scalebox{0.6}{\includegraphics{VM_design}}|; + +$key = q/scalebox{0.6}{includegraphics{XGridEx1}};AAT/; +$cached_env_img{$key} = q|\scalebox{0.6}{\includegraphics{XGridEx1}}|; + +$key = q/scalebox{0.75}{includegraphics{FieldParameterSetup}};AAT/; +$cached_env_img{$key} = q|\scalebox{0.75}{\includegraphics{FieldParameterSetup}}|; + +$key = q/scalebox{0.75}{includegraphics{GridCellsAndCorners}};AAT/; +$cached_env_img{$key} = q|\scalebox{0.75}{\includegraphics{GridCellsAndCorners}}|; + +$key = q/scalebox{0.75}{includegraphics{GridCustStaggerLoc}};AAT/; +$cached_env_img{$key} = q|\scalebox{0.75}{\includegraphics{GridCustStaggerLoc}}|; + +$key = q/scalebox{0.75}{includegraphics{GridExclusiveReg}};AAT/; +$cached_env_img{$key} = q|\scalebox{0.75}{\includegraphics{GridExclusiveReg}}|; + +$key = q/scalebox{0.75}{includegraphics{GridStaggerLoc2D}};AAT/; +$cached_env_img{$key} = q|\scalebox{0.75}{\includegraphics{GridStaggerLoc2D}}|; + +$key = q/scalebox{0.8}{includegraphics{Appendix_uml}};AAT/; +$cached_env_img{$key} = q|\scalebox{0.8}{\includegraphics{Appendix_uml}}|; + +$key = q/scalebox{0.9}{includegraphics{ESMF_GEOS5}};AAT/; +$cached_env_img{$key} = q|\scalebox{0.9}{\includegraphics{ESMF_GEOS5}}|; + +$key = q/scalebox{0.9}{includegraphics{Excl_dst_grid_cpl}};AAT/; +$cached_env_img{$key} = q|\scalebox{0.9}{\includegraphics{Excl_dst_grid_cpl}}|; + +$key = q/scalebox{0.9}{includegraphics{Excl_dst_grid}};AAT/; +$cached_env_img{$key} = q|\scalebox{0.9}{\includegraphics{Excl_dst_grid}}|; + +$key = q/scalebox{0.9}{includegraphics{Excl_src_grid_cpl}};AAT/; +$cached_env_img{$key} = q|\scalebox{0.9}{\includegraphics{Excl_src_grid_cpl}}|; + +$key = q/scalebox{0.9}{includegraphics{Excl_src_grid}};AAT/; +$cached_env_img{$key} = q|\scalebox{0.9}{\includegraphics{Excl_src_grid}}|; + +$key = q/scalebox{0.9}{includegraphics{GridDecomps}};AAT/; +$cached_env_img{$key} = q|\scalebox{0.9}{\includegraphics{GridDecomps}}|; + +$key = q/scalebox{0.9}{includegraphics{LogRectGrids}};AAT/; +$cached_env_img{$key} = q|\scalebox{0.9}{\includegraphics{LogRectGrids}}|; + +$key = q/scalebox{1.0}{includegraphics{ESMF_appunit}};AAT/; +$cached_env_img{$key} = q|\scalebox{1.0}{\includegraphics{ESMF_appunit}}|; + +$key = q/scalebox{1.0}{includegraphics{ESMF_concurrent}};AAT/; +$cached_env_img{$key} = q|\scalebox{1.0}{\includegraphics{ESMF_concurrent}}|; + +$key = q/scalebox{1.0}{includegraphics{ESMF_reconcile}};AAT/; +$cached_env_img{$key} = q|\scalebox{1.0}{\includegraphics{ESMF_reconcile}}|; + +$key = q/scalebox{1.0}{includegraphics{ESMF_sandwich}};AAT/; +$cached_env_img{$key} = q|\scalebox{1.0}{\includegraphics{ESMF_sandwich}}|; + +$key = q/scalebox{1.0}{includegraphics{ESMF_serial}};AAT/; +$cached_env_img{$key} = q|\scalebox{1.0}{\includegraphics{ESMF_serial}}|; + +$key = q/scalebox{1.0}{includegraphics{GridStaggerLoc3D}};AAT/; +$cached_env_img{$key} = q|\scalebox{1.0}{\includegraphics{GridStaggerLoc3D}}|; + +$key = q/sim;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$\sim$|; + +$key = q/src_j;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$src_j$|; + +$key = q/sum^{all-source-cells}(V_{si}*A'_{si})=sum^{all-destination-cells}(V_{dj}*A'_{dj});MSF=1.6;AAT/; +$cached_env_img{$key} = q|$\sum^{all-source-cells}(V_{si}*A'_{si}) = \sum^{all-destination-cells}(V_{dj}*A'_{dj})$|; + +$key = q/sum^{all-source-cells}(V_{si}*A_{si})=sum^{all-destination-cells}(V_{dj}*A_{dj});MSF=1.6;AAT/; +$cached_env_img{$key} = q|$\sum^{all-source-cells}(V_{si}*A_{si}) = \sum^{all-destination-cells}(V_{dj}*A_{dj})$|; + +$key = q/sum_{g=1}^{g=n_dstgrid}sum_{d=1}^{d=n_dstcell}{sum_{s=1}^{s=n_intersect}(w_{sd}F_s)f_{2d}A_d};MSF=1.6;AAT/; +$cached_env_img{$key} = q|$\sum_{g=1}^{g=n\_dstgrid}\sum_{d=1}^{d=n\_dstcell}{ \sum_{s=1}^{s=n\_intersect}(w_{sd} F_s) f_{2d} A_d}$|; + +$key = q/sum_{g=1}^{g=n_srcgrid}sum_{s=1}^{s=n_srccell}{f_{1s}f_{2s}A_sF_s};MSF=1.6;AAT/; +$cached_env_img{$key} = q|$\sum_{g=1}^{g=n\_srcgrid}\sum_{s=1}^{s=n\_srccell}{ f_{1s} f_{2s} A_s F_s }$|; + +$key = q/textstyle=;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$\textstyle =$|; + +$key = q/times;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$\times$|; + +$key = q/trightarrowinfty;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$t \rightarrow \infty$|; + +$key = q/u(0,x)=20;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$u(0, x) = 20$|; + +$key = q/u(t,0)=10,u(t,1)=40;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$u(t, 0) = 10, u(t, 1) = 40$|; + +$key = q/u;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$u$|; + +$key = q/u_t+uu_x+vu_y+frac{1}{rho}p_x=0;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$u_t + u u_x + v u_y + \frac{1}{\rho} p_x = 0$|; + +$key = q/u_t=alpha^2u_{xx};MSF=1.6;AAT/; +$cached_env_img{$key} = q|$u_t = \alpha^2 u_{xx}$|; + +$key = q/v;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$v$|; + +$key = q/v_t+uv_x+vv_y+frac{1}{rho}p_y=0;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$v_t + u v_x + v v_y + \frac{1}{\rho} p_y = 0$|; + +$key = q/vecP;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$\vec P$|; + +$key = q/vecP=(0,0);MSF=1.6;AAT/; +$cached_env_img{$key} = q|$\vec P = (0,0)$|; + +$key = q/vecP=vecb-veca=(1,3)-(11,3)=(-10,0);MSF=1.6;AAT/; +$cached_env_img{$key} = q|$\vec P = \vec b - \vec a = (1,3) - (11,3) = (-10,0)$|; + +$key = q/vecP=vecb-veca=(1,j)-(51,j)=(-50,0);MSF=1.6;AAT/; +$cached_env_img{$key} = q|$\vec P = \vec b - \vec a = (1,j) - (51,j) =
+(-50,0)$|; + +$key = q/veca;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$\vec a$|; + +$key = q/vecarightarrowvecb;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$\vec a \rightarrow \vec b$|; + +$key = q/vecb;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$\vec b$|; + +$key = q/vecp;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$\vec p$|; + +$key = q/vect;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$\vec t$|; + +$key = q/w_{ij};MSF=1.6;AAT/; +$cached_env_img{$key} = q|$w_{ij}$|; + +$key = q/w_{ij}=f_{ij}*A_{si}slash(A_{dj}*D_j);MSF=1.6;AAT/; +$cached_env_img{$key} = q|$w_{ij}=f_{ij} * A_{si}/(A_{dj}*D_j)$|; + +$key = q/w_{ij}=f_{ij}*A_{si}slashA_{dj};MSF=1.6;AAT/; +$cached_env_img{$key} = q|$w_{ij}=f_{ij} * A_{si}/A_{dj}$|; + +$key = q/w_{sd};MSF=1.6;AAT/; +$cached_env_img{$key} = q|$w_{sd}$|; + +$key = q/x;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$x$|; + +$key = q/{displaymath}alpha=2pislashN_i,i=1,...N_i{displaymath};MSF=1.6;AAT/; +$cached_env_img{$key} = q|\begin{displaymath}
+\alpha = 2\pi/N_i, i=1,...N_i
+\end{displaymath}|; + +$key = q/{displaymath}beta=2pislashN_j,j=1,...N_j,{displaymath};MSF=1.6;AAT/; +$cached_env_img{$key} = q|\begin{displaymath}
+\beta = 2\pi/N_j, j=1,...N_j,
+\end{displaymath}|; + +$key = q/{displaymath}f(i,j)=sin(alphai)cos(betaj),{displaymath};MSF=1.6;AAT/; +$cached_env_img{$key} = q|\begin{displaymath}
+f(i,j) = \sin(\alpha i)\cos(\beta j),
+\end{displaymath}|; + +$key = q/{displaymath}vecP=({1!!1}-hatR)vecp+vect.{displaymath};MSF=1.6;AAT/; +$cached_env_img{$key} = q|\begin{displaymath}
+\vec P = ({1\!\!1} - \hat R) \vec p + \vec t.
+\end{displaymath}|; + +$key = q/{displaymath}vecP=({1!!1}-hatR)vecp{displaymath};MSF=1.6;AAT/; +$cached_env_img{$key} = q|\begin{displaymath}
+\vec P = ({1\!\!1} - \hat R) \vec p
+\end{displaymath}|; + +$key = q/{displaymath}vecP=vecb-hatRveca.{displaymath};MSF=1.6;AAT/; +$cached_env_img{$key} = q|\begin{displaymath}
+\vec P = \vec b - \hat R \vec a.
+\end{displaymath}|; + +$key = q/{displaymath}veca=left(array{{l}ij_{max}+1array{right)rightarrowvecb=left(array{{l}i+i_{size}slash2j_{max}array{right).{displaymath};MSF=1.6;AAT/; +$cached_env_img{$key} = q|\begin{displaymath}
+\vec a = \left( \begin{array}{l}
+i \\\\
+j_{max}+1 \end{arr...
+...in{array}{l}
+i + i_{size}/2\\\\
+j_{max} \end{array} \right).
+\end{displaymath}|; + +$key = q/{displaymath}vecarightarrowvecb=hatRveca+({1!!1}-hatR)vecp+vect.{displaymath};MSF=1.6;AAT/; +$cached_env_img{$key} = q|\begin{displaymath}
+\vec a \rightarrow \vec b =
+\hat R \vec a + ({1\!\!1} - \hat R) \vec p + \vec t.
+\end{displaymath}|; + +$key = q/{displaymath}vecarightarrowvecb=hatRveca+vecP.{displaymath};MSF=1.6;AAT/; +$cached_env_img{$key} = q|\begin{displaymath}
+\vec a \rightarrow \vec b = \hat R \vec a + \vec P.
+\end{displaymath}|; + +$key = q/{displaymath}vecbrightarrowveca=hatR^{-1}vecb-hatR^{-1}vecP.{displaymath};MSF=1.6;AAT/; +$cached_env_img{$key} = q|\begin{displaymath}
+\vec b \rightarrow \vec a = \hat R^{-1} \vec b - \hat R^{-1} \vec P.
+\end{displaymath}|; + +$key = q/{rho}_t+{rhou}_x+{rhov}_y=0;MSF=1.6;AAT/; +$cached_env_img{$key} = q|${\rho}_t + {\rho u}_x + {\rho v}_y = 0$|; + +1; + diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/images.tex b/docs/nightly/fix/reconcile-info/ESMF_refdoc/images.tex new file mode 100644 index 000000000..9df91f6f7 --- /dev/null +++ b/docs/nightly/fix/reconcile-info/ESMF_refdoc/images.tex @@ -0,0 +1,9784 @@ +\batchmode + +\documentclass[english]{article} +\RequirePackage{ifthen} + + +\usepackage{babel} +\usepackage{longtable} +\usepackage{html} +\usepackage{times} +\usepackage{graphicx} +\usepackage{hyperref} +\usepackage[T1]{fontenc}% +\providecommand{\docmttype}{Reference Manual for Fortran}% +\providecommand{\req}[1]{\section{\hspace{.2in}#1}}% +\providecommand{\sreq}[1]{\subsection{\hspace{.2in}#1}}% +\providecommand{\ssreq}[1]{\subsubsection{\hspace{.2in}#1}}% +\providecommand{\mytitle}{\longname Reference Manual for Fortran~~}% +\providecommand{\myversion}{Version 8.8.0 beta snapshot} + +% +\providecommand{\apiStatusCompatibleVersion}[1]{This interface is backward compatible with ESMF versions starting at #1. If code using this interface compiles with any version of ESMF starting with #1, then it will compile with the current version.}% +\providecommand{\apiStatusModifiedSinceVersion}[1]{This interface was modified since ESMF version #1. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version #1 is desired then care must be taken to limit the use of this interface to features that were available in the #1 release. \\ +Changes made after the #1 release:} + +% +\providecommand{\apiStatusCompatibleVersionExceptions}[1]{This interface is backward compatible with ESMF versions starting at #1 - {\em except those arguments indicated below}.}% +\providecommand{\apiStatusCompatibleException}{{\sc Status:}{\em This argument is excluded from the backward compatibility statement}.\\} + +% +\providecommand{\apiDeprecatedArg}{\sf DEPRECATED ARGUMENT!}% +\providecommand{\apiDeprecatedArgWithReplacement}[1]{{\bf DEPRECATED ARGUMENT!} Please use the argument {\tt #1} instead.} + +% +\providecommand{\apiDeprecatedMethodWithReplacement}[3]{{\bf DEPRECATED METHOD} as of ESMF #1. Please use {\tt #2}, section {\tt \ref{#3}} instead.} + +% +\providecommand{\apiDeprecatedClassWithTargetReleaseAndReplacement}[4]{{\bf DEPRECATED CLASS!}\\The entire #1 class has been deprecated and is scheduled for removal with ESMF #2. This includes all of the class derived types, named constants, and methods. Please use the replacment class {\tt #3}, section {\tt \ref{#4}} instead!\\} + +% +\newenvironment{reqlist}{\begin{list} {} {} \rm \item[]} +{\end{list}} +\setcounter{secnumdepth}{3} +\setcounter{tocdepth}{3} +\setlongtables% +\providecommand{\longname}{ESMF }% +\providecommand{\funcname}{ESMF }% +\providecommand{\shortname}{REF}% +\providecommand{\myauthors}{ESMF Joint Specification Team: V. Balaji, Byron Boville, Samson Cheung, Tom Clune, Nancy Collins, Tony Craig, Carlos Cruz, Arlindo da Silva, Cecelia DeLuca, Rosalinda de Fainchtein, Rocky Dunlap, Brian Eaton, Steve Goldhaber, Bob Hallberg, Tom Henderson, Chris Hill, Mark Iredell, Joseph Jacob, Rob Jacob, Phil Jones, Brian Kauffman, Erik Kluzek, Ben Koziol, Jay Larson, Peggy Li, Fei Liu, John Michalakes, Raffaele Montuoro, Sylvia Murphy, David Neckels, Ryan O Kuinghttons, Bob Oehmke, Chuck Panaccione, Daniel Rosen, Jim Rosinski, Mathew Rothstein, Bill Sacks, Kathy Saint, Will Sawyer, Earl Schwab, Shepard Smithline, Walter Spector, Don Stark, Max Suarez, Spencer Swift, Gerhard Theurich, Atanas Trayanov, Silverio Vasquez, Jon Wolfe, Weiyu Yang, Mike Young, Leonid Zaslavsky} + +\setlength{\textwidth}{6.5truein} + +\setlength{\textheight}{8.5truein} + +\setlength{\oddsidemargin}{0in} + +\setlength{\unitlength}{1truecm} + +\newlength{\oldparskip} + +\newlength{\oldparindent} + +\newlength{\oldbaselineskip} + +\setlength{\parskip}{0pt} + +\setlength{\parindent}{0pt} + +\setlength{\baselineskip}{11pt} +\hbadness = 10000 +\vbadness = 10000 + + +\usepackage{xcolor} + +\usepackage[]{inputenc} + + + +\makeatletter + +\makeatletter +\count@=\the\catcode`\_ \catcode`\_=8 +\newenvironment{tex2html_wrap}{}{}% +\catcode`\<=12\catcode`\_=\count@ +\newcommand{\providedcommand}[1]{\expandafter\providecommand\csname #1\endcsname}% +\newcommand{\renewedcommand}[1]{\expandafter\providecommand\csname #1\endcsname{}% + \expandafter\renewcommand\csname #1\endcsname}% +\newcommand{\newedenvironment}[1]{\newenvironment{#1}{}{}\renewenvironment{#1}}% +\let\newedcommand\renewedcommand +\let\renewedenvironment\newedenvironment +\makeatother +\let\mathon=$ +\let\mathoff=$ +\ifx\AtBeginDocument\undefined \newcommand{\AtBeginDocument}[1]{}\fi +\newbox\sizebox +\setlength{\hoffset}{0pt}\setlength{\voffset}{0pt} +\addtolength{\textheight}{\footskip}\setlength{\footskip}{0pt} +\addtolength{\textheight}{\topmargin}\setlength{\topmargin}{0pt} +\addtolength{\textheight}{\headheight}\setlength{\headheight}{0pt} +\addtolength{\textheight}{\headsep}\setlength{\headsep}{0pt} +\setlength{\textwidth}{349pt} +\newwrite\lthtmlwrite +\makeatletter +\let\realnormalsize=\normalsize +\global\topskip=2sp +\def\preveqno{}\let\real@float=\@float \let\realend@float=\end@float +\def\@float{\let\@savefreelist\@freelist\real@float} +\def\liih@math{\ifmmode$\else\bad@math\fi} +\def\end@float{\realend@float\global\let\@freelist\@savefreelist} +\let\real@dbflt=\@dbflt \let\end@dblfloat=\end@float +\let\@largefloatcheck=\relax +\let\if@boxedmulticols=\iftrue +\def\@dbflt{\let\@savefreelist\@freelist\real@dbflt} +\def\adjustnormalsize{\def\normalsize{\mathsurround=0pt \realnormalsize + \parindent=0pt\abovedisplayskip=0pt\belowdisplayskip=0pt}% + \def\phantompar{\csname par\endcsname}\normalsize}% +\def\lthtmltypeout#1{{\let\protect\string \immediate\write\lthtmlwrite{#1}}}% +\newcommand\lthtmlhboxmathA{\adjustnormalsize\setbox\sizebox=\hbox\bgroup\kern.05em }% +\newcommand\lthtmlhboxmathB{\adjustnormalsize\setbox\sizebox=\hbox to\hsize\bgroup\hfill }% +\newcommand\lthtmlvboxmathA{\adjustnormalsize\setbox\sizebox=\vbox\bgroup % + \let\ifinner=\iffalse \let\)\liih@math }% +\newcommand\lthtmlboxmathZ{\@next\next\@currlist{}{\def\next{\voidb@x}}% + \expandafter\box\next\egroup}% +\newcommand\lthtmlmathtype[1]{\gdef\lthtmlmathenv{#1}}% +\newcommand\lthtmllogmath{\dimen0\ht\sizebox \advance\dimen0\dp\sizebox + \ifdim\dimen0>.95\vsize + \lthtmltypeout{% +*** image for \lthtmlmathenv\space is too tall at \the\dimen0, reducing to .95 vsize ***}% + \ht\sizebox.95\vsize \dp\sizebox\z@ \fi + \lthtmltypeout{l2hSize % +:\lthtmlmathenv:\the\ht\sizebox::\the\dp\sizebox::\the\wd\sizebox.\preveqno}}% +\newcommand\lthtmlfigureA[1]{\let\@savefreelist\@freelist + \lthtmlmathtype{#1}\lthtmlvboxmathA}% +\newcommand\lthtmlpictureA{\bgroup\catcode`\_=8 \lthtmlpictureB}% +\newcommand\lthtmlpictureB[1]{\lthtmlmathtype{#1}\egroup + \let\@savefreelist\@freelist \lthtmlhboxmathB}% +\newcommand\lthtmlpictureZ[1]{\hfill\lthtmlfigureZ}% +\newcommand\lthtmlfigureZ{\lthtmlboxmathZ\lthtmllogmath\copy\sizebox + \global\let\@freelist\@savefreelist}% +\newcommand\lthtmldisplayA{\bgroup\catcode`\_=8 \lthtmldisplayAi}% +\newcommand\lthtmldisplayAi[1]{\lthtmlmathtype{#1}\egroup\lthtmlvboxmathA}% +\newcommand\lthtmldisplayB[1]{\edef\preveqno{(\theequation)}% + \lthtmldisplayA{#1}\let\@eqnnum\relax}% +\newcommand\lthtmldisplayZ{\lthtmlboxmathZ\lthtmllogmath\lthtmlsetmath}% +\newcommand\lthtmlinlinemathA{\bgroup\catcode`\_=8 \lthtmlinlinemathB} +\newcommand\lthtmlinlinemathB[1]{\lthtmlmathtype{#1}\egroup\lthtmlhboxmathA + \vrule height1.5ex width0pt }% +\newcommand\lthtmlinlineA{\bgroup\catcode`\_=8 \lthtmlinlineB}% +\newcommand\lthtmlinlineB[1]{\lthtmlmathtype{#1}\egroup\lthtmlhboxmathA}% +\newcommand\lthtmlinlineZ{\egroup\expandafter\ifdim\dp\sizebox>0pt % + \expandafter\centerinlinemath\fi\lthtmllogmath\lthtmlsetinline} +\newcommand\lthtmlinlinemathZ{\egroup\expandafter\ifdim\dp\sizebox>0pt % + \expandafter\centerinlinemath\fi\lthtmllogmath\lthtmlsetmath} +\newcommand\lthtmlindisplaymathZ{\egroup % + \centerinlinemath\lthtmllogmath\lthtmlsetmath} +\def\lthtmlsetinline{\hbox{\vrule width.1em \vtop{\vbox{% + \kern.1em\copy\sizebox}\ifdim\dp\sizebox>0pt\kern.1em\else\kern.3pt\fi + \ifdim\hsize>\wd\sizebox \hrule depth1pt\fi}}} +\def\lthtmlsetmath{\hbox{\vrule width.1em\kern-.05em\vtop{\vbox{% + \kern.1em\kern0.8 pt\hbox{\hglue.17em\copy\sizebox\hglue0.8 pt}}\kern.3pt% + \ifdim\dp\sizebox>0pt\kern.1em\fi \kern0.8 pt% + \ifdim\hsize>\wd\sizebox \hrule depth1pt\fi}}} +\def\centerinlinemath{% + \dimen1=\ifdim\ht\sizebox<\dp\sizebox \dp\sizebox\else\ht\sizebox\fi + \advance\dimen1by.5pt \vrule width0pt height\dimen1 depth\dimen1 + \dp\sizebox=\dimen1\ht\sizebox=\dimen1\relax} + +\def\lthtmlcheckvsize{\ifdim\ht\sizebox<\vsize + \ifdim\wd\sizebox<\hsize\expandafter\hfill\fi \expandafter\vfill + \else\expandafter\vss\fi}% +\providecommand{\selectlanguage}[1]{}% +\makeatletter \tracingstats = 1 + + +\begin{document} +\pagestyle{empty}\thispagestyle{empty}\lthtmltypeout{}% +\lthtmltypeout{latex2htmlLength hsize=\the\hsize}\lthtmltypeout{}% +\lthtmltypeout{latex2htmlLength vsize=\the\vsize}\lthtmltypeout{}% +\lthtmltypeout{latex2htmlLength hoffset=\the\hoffset}\lthtmltypeout{}% +\lthtmltypeout{latex2htmlLength voffset=\the\voffset}\lthtmltypeout{}% +\lthtmltypeout{latex2htmlLength topmargin=\the\topmargin}\lthtmltypeout{}% +\lthtmltypeout{latex2htmlLength topskip=\the\topskip}\lthtmltypeout{}% +\lthtmltypeout{latex2htmlLength headheight=\the\headheight}\lthtmltypeout{}% +\lthtmltypeout{latex2htmlLength headsep=\the\headsep}\lthtmltypeout{}% +\lthtmltypeout{latex2htmlLength parskip=\the\parskip}\lthtmltypeout{}% +\lthtmltypeout{latex2htmlLength oddsidemargin=\the\oddsidemargin}\lthtmltypeout{}% +\makeatletter +\if@twoside\lthtmltypeout{latex2htmlLength evensidemargin=\the\evensidemargin}% +\else\lthtmltypeout{latex2htmlLength evensidemargin=\the\oddsidemargin}\fi% +\lthtmltypeout{}% +\makeatother +\setcounter{page}{1} +\onecolumn + +% !!! IMAGES START HERE !!! + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline134253}% +$i$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline134255}% +$j_{max}$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline134257}% +$j_{min}$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +\setcounter{secnumdepth}{3} +\setcounter{tocdepth}{3} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} +\stepcounter{part} +\stepcounter{section} +\stepcounter{section} +{\newpage\clearpage +\lthtmlpictureA{tex2html_wrap312}% +\scalebox{1.0}{\includegraphics{ESMF_sandwich}}% +\lthtmlpictureZ +\lthtmlcheckvsize\clearpage} + +\stepcounter{section} +\stepcounter{section} +\stepcounter{section} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{section} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{section} +\stepcounter{subsection} +\stepcounter{section} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{section} +\stepcounter{section} +\stepcounter{part} +\stepcounter{section} +\stepcounter{subsection} +\stepcounter{section} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1710}% +$w_{ij}$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1714}% +$j$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1716}% +$w_{ij}=f_{ij} * A_{si}/A_{dj}$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1718}% +$f_{ij}$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1724}% +$A_{si}$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1726}% +$A_{dj}$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1728}% +$w_{ij}=f_{ij} * A_{si}/(A_{dj}*D_j)$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1730}% +$D_j$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +\stepcounter{subsubsection} +\stepcounter{subsection} +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1732}% +$\sum^{all-source-cells}(V_{si}*A'_{si}) = \sum^{all-destination-cells}(V_{dj}*A'_{dj})$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsection} +\stepcounter{section} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{section} +\stepcounter{subsection} +\stepcounter{part} +\stepcounter{section} +\stepcounter{subsection} +{\newpage\clearpage +\lthtmlpictureA{tex2html_wrap3068}% +\scalebox{0.9}{\includegraphics{ESMF_GEOS5}}% +\lthtmlpictureZ +\lthtmlcheckvsize\clearpage} + +\stepcounter{subsection} +{\newpage\clearpage +\lthtmlpictureA{tex2html_wrap3088}% +\scalebox{1.0}{\includegraphics{ESMF_appunit}}% +\lthtmlpictureZ +\lthtmlcheckvsize\clearpage} + +\stepcounter{subsection} +{\newpage\clearpage +\lthtmlpictureA{tex2html_wrap3108}% +\scalebox{1.0}{\includegraphics{ESMF_serial}}% +\lthtmlpictureZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlpictureA{tex2html_wrap3114}% +\scalebox{1.0}{\includegraphics{ESMF_concurrent}}% +\lthtmlpictureZ +\lthtmlcheckvsize\clearpage} + +\stepcounter{subsection} +\stepcounter{subsection} +{\newpage\clearpage +\lthtmlpictureA{tex2html_wrap3134}% +\scalebox{1.0}{\includegraphics{ESMF_reconcile}}% +\lthtmlpictureZ +\lthtmlcheckvsize\clearpage} + +\stepcounter{subsection} +\stepcounter{subsection} +{\newpage\clearpage +\lthtmlpictureA{tex2html_wrap134509}% +\includegraphics{Comp_obj}% +\lthtmlpictureZ +\lthtmlcheckvsize\clearpage} + +\stepcounter{section} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsubsection} +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{section} +\stepcounter{subsection} +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{subsection} +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{section} +\stepcounter{subsection} +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{subsection} +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{section} +\stepcounter{subsection} +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{subsection} +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{section} +\stepcounter{subsection} +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{subsection} +\stepcounter{section} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsection} +\stepcounter{subsubsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{subsection} +\stepcounter{subsection} +{\newpage\clearpage +\lthtmlpictureA{tex2html_wrap13357}% +\scalebox{0.9}{\includegraphics{Excl_src_grid}}% +\lthtmlpictureZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlpictureA{tex2html_wrap13363}% +\scalebox{0.9}{\includegraphics{Excl_dst_grid}}% +\lthtmlpictureZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlpictureA{tex2html_wrap13371}% +\scalebox{0.9}{\includegraphics{Excl_src_grid_cpl}}% +\lthtmlpictureZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlpictureA{tex2html_wrap13377}% +\scalebox{0.9}{\includegraphics{Excl_dst_grid_cpl}}% +\lthtmlpictureZ +\lthtmlcheckvsize\clearpage} + +\stepcounter{subsection} +{\newpage\clearpage +\lthtmlpictureA{tex2html_wrap135234}% +\includegraphics{State_obj}% +\lthtmlpictureZ +\lthtmlcheckvsize\clearpage} + +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{section} +\stepcounter{subsection} +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{subsection} +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{section} +\stepcounter{subsection} +{\newpage\clearpage +\lthtmlpictureA{tex2html_wrap16909}% +\scalebox{0.5}{\includegraphics{webservices}}% +\lthtmlpictureZ +\lthtmlcheckvsize\clearpage} + +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{subsection} +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{part} +\stepcounter{section} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline17590}% +$d$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline17592}% +$d=\sum^{intersecting-source-cells}_{i}(s_{i}+\nabla s_{i} \cdot (c_{si}-c_{d}))$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline17594}% +$s_{i}$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline17596}% +$\nabla s_{i}$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline17598}% +$c_{si}$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline17600}% +$c_{d}$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +\stepcounter{subsubsection} +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline17602}% +$\sum^{all-source-cells}(V_{si}*A_{si}) = \sum^{all-destination-cells}(V_{dj}*A_{dj})$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{subsection} +\stepcounter{section} +\stepcounter{subsection} +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline19546}% +$u_t + u u_x + v u_y + \frac{1}{\rho} p_x = 0$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline19548}% +$v_t + u v_x + v v_y + \frac{1}{\rho} p_y = 0$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline19550}% +${\rho}_t + {\rho u}_x + {\rho v}_y = 0$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline19552}% +$\frac{\rho}{\rho^\gamma} + u {(\frac{p}{\rho^\gamma})}_x + v {(\frac{p}{\rho^\gamma})}_y = 0$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline19554}% +$p$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline19556}% +$\rho$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline19558}% +$u$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline19560}% +$v$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline21288}% +$>= 0$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline21290}% +$< 0$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{section} +\stepcounter{subsection} +\stepcounter{subsubsection} +\stepcounter{subsection} +\stepcounter{subsubsection} +\stepcounter{subsection} +\stepcounter{subsubsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline24559}% +$n_{DE} = n_{PET}$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +\stepcounter{subsubsection} +\stepcounter{subsubsection} +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline24561}% +$map_{A,B}(i=1...n_A) = i_B$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline24563}% +$i_B \in [\phi, 1...n_B]$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline24565}% +$n_A$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline24567}% +$n_B$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline24569}% +$map_{A,B}(i)$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline24571}% +$i_B$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline24573}% +$i_B = \phi$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +\stepcounter{subsubsection} +\stepcounter{subsubsection} +{\newpage\clearpage +\lthtmlpictureA{tex2html_wrap24697}% +\scalebox{0.75}{\includegraphics{FieldParameterSetup}}% +\lthtmlpictureZ +\lthtmlcheckvsize\clearpage} + +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline25883}% +$dstField(i) = i * srcField(i), i = 1 ... 4$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline25885}% +$dst_i$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline25887}% +$M_{i,j}$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline25889}% +$src_j$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline26040}% +$u_t = \alpha^2 u_{xx}$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline26042}% +$u(0, x) = 20$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline26044}% +$u(t, 0) = 10, u(t, 1) = 40$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline26048}% +$t \rightarrow \infty$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline26050}% +$x$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline27922}% +$n$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline35407}% +$rank \times tileCount$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{section} +\stepcounter{subsection} +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{section} +\stepcounter{subsection} +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline43657}% +$10\times 10$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline44752}% +$ localDeCount > 1 $% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline44754}% +$[-10, 5]$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline44756}% +$4\times 4\times 4 = 64$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline46005}% +$f(i,j)$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmldisplayA{displaymath45914}% +\begin{displaymath} + f(i,j) = \sin(\alpha i)\cos(\beta j), + \end{displaymath}% +\lthtmldisplayZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmldisplayA{displaymath45916}% +\begin{displaymath} + \alpha = 2\pi/N_i, i=1,...N_i + \end{displaymath}% +\lthtmldisplayZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmldisplayA{displaymath45918}% +\begin{displaymath} + \beta = 2\pi/N_j, j=1,...N_j, + \end{displaymath}% +\lthtmldisplayZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline46007}% +$N_i = 10$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline46009}% +$N_j = 20$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{paragraph} +\stepcounter{paragraph} +\stepcounter{paragraph} +\stepcounter{paragraph} +\stepcounter{paragraph} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{paragraph} +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline46797}% +$2$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline46799}% +$5$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline46801}% +$2 \times 5=10$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline46803}% +$10$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +\stepcounter{paragraph} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline47276}% +$1$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline47280}% +$()$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline47282}% +$[]$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{section} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{section} +\stepcounter{subsection} +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{section} +\stepcounter{subsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +{\newpage\clearpage +\lthtmlpictureA{tex2html_wrap57854}% +\scalebox{0.9}{\includegraphics{GridDecomps}}% +\lthtmlpictureZ +\lthtmlcheckvsize\clearpage} + +\stepcounter{subsubsection} +{\newpage\clearpage +\lthtmlpictureA{tex2html_wrap57870}% +\scalebox{0.9}{\includegraphics{LogRectGrids}}% +\lthtmlpictureZ +\lthtmlcheckvsize\clearpage} + +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +{\newpage\clearpage +\lthtmlpictureA{tex2html_wrap58125}% +\scalebox{0.75}{\includegraphics{GridStaggerLoc2D}}% +\lthtmlpictureZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlpictureA{tex2html_wrap58137}% +\scalebox{1.0}{\includegraphics{GridStaggerLoc3D}}% +\lthtmlpictureZ +\lthtmlcheckvsize\clearpage} + +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +{\newpage\clearpage +\lthtmlpictureA{tex2html_wrap59353}% +\scalebox{0.75}{\includegraphics{GridExclusiveReg}}% +\lthtmlpictureZ +\lthtmlcheckvsize\clearpage} + +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline58705}% +$(-1,-1)$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline58707}% +$(1,1)$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline58709}% +$-1$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline58715}% +$0$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlpictureA{tex2html_wrap59517}% +\scalebox{0.75}{\includegraphics{GridCustStaggerLoc}}% +\lthtmlpictureZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline58717}% +$(0,0)$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline58719}% +$+1$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline58727}% +$(0,0,0)$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline58729}% +$(1,1,1)$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +\stepcounter{subsubsection} +{\newpage\clearpage +\lthtmlpictureA{tex2html_wrap59545}% +\scalebox{0.75}{\includegraphics{GridCellsAndCorners}}% +\lthtmlpictureZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline58751}% +$(10,10)$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsubsection} +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{section} +\stepcounter{subsection} +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline64433}% +$10^{8}$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +\stepcounter{subsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{section} +\stepcounter{subsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsection} +\stepcounter{subsubsection} +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline67334}% +$e$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline67336}% +$number\_of\_nodes\_in\_element(1) + number\_of\_nodes\_in\_element(2) + + \cdots + number\_of\_nodes\_in\_element(e-1) + 1$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +\stepcounter{subsubsection} +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline67340}% +$(n-1)*spatialDim+1$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline67352}% +$number\_of\_corners\_in\_element(1) + + number\_of\_corners\_in\_element(2) + + \cdots + number\_of\_corners\_in\_element(e-1) + 1$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{section} +\stepcounter{subsection} +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline68289}% +$f_1$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline68291}% +$A$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline68293}% +$f_2$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline68305}% +$F$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline68307}% +$\sum_{g=1}^{g=n\_srcgrid}\sum_{s=1}^{s=n\_srccell}{ f_{1s} f_{2s} A_s F_s }$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline68309}% +$\sum_{g=1}^{g=n\_dstgrid}\sum_{d=1}^{d=n\_dstcell}{ \sum_{s=1}^{s=n\_intersect}(w_{sd} F_s) f_{2d} A_d}$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline68311}% +$w_{sd}$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline68315}% +$\mathcal{F}$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +\stepcounter{subsection} +\stepcounter{subsubsection} +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +{\newpage\clearpage +\lthtmlpictureA{tex2html_wrap68887}% +\scalebox{0.6}{\includegraphics{XGridEx1}}% +\lthtmlpictureZ +\lthtmlcheckvsize\clearpage} + +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{subsection} +\stepcounter{subsubsection} +\stepcounter{subsection} +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{section} +\stepcounter{subsection} +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{section} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsubsection} +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline71025}% +$\sim$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline71027}% +$N$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline71029}% +$ (nDEs \times 1 + \times ... \times 1) $% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline71031}% +$nDEs$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline71033}% +$N-1$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline71037}% +$4 \times 1$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline71039}% +$2 \times 3 = 6 $% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +{\newpage\clearpage +\lthtmlpictureA{tex2html_wrap138540}% +\includegraphics{dgconnect_2tiles_not_connected.eps}% +\lthtmlpictureZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmldisplayA{displaymath70648}% +\begin{displaymath} + + \vec a \rightarrow \vec b = \hat R \vec a + \vec P. + \end{displaymath}% +\lthtmldisplayZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline71043}% +$\vec a$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline71045}% +$\vec b$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline71047}% +$\hat R$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline71049}% +$\vec P$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline71055}% +$\hat R ={1\!\!1}$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline71057}% +$\vec P = (0,0)$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline71059}% +$\vec P = \vec b - \vec a = (1,3) - (11,3) = (-10,0)$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlpictureA{tex2html_wrap138554}% +\includegraphics{dgconnect_2tiles_connected.eps}% +\lthtmlpictureZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmldisplayA{displaymath70676}% +\begin{displaymath} + \vec b \rightarrow \vec a = \hat R^{-1} \vec b - \hat R^{-1} \vec P. + \end{displaymath}% +\lthtmldisplayZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline71065}% +$ \vec a \rightarrow \vec b$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline71069}% +$\vec p$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_indisplay138562}% +$\displaystyle \vec a \rightarrow \vec b$% +\lthtmlindisplaymathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_indisplay138563}% +$\textstyle =$% +\lthtmlindisplaymathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_indisplay138564}% +$\displaystyle \hat R (\vec a - \vec p) + \vec p$% +\lthtmlindisplaymathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_indisplay138566}% +$\displaystyle \hat R \vec a + ({1\!\!1} - \hat R) \vec p$% +\lthtmlindisplaymathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmldisplayA{displaymath70687}% +\begin{displaymath} + \vec P = ({1\!\!1} - \hat R) \vec p + \end{displaymath}% +\lthtmldisplayZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline71071}% +$\vec t$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmldisplayA{displaymath70692}% +\begin{displaymath} + + \vec a \rightarrow \vec b = + \hat R \vec a + ({1\!\!1} - \hat R) \vec p + \vec t. + \end{displaymath}% +\lthtmldisplayZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmldisplayA{displaymath70697}% +\begin{displaymath} + + \vec P = ({1\!\!1} - \hat R) \vec p + \vec t. + \end{displaymath}% +\lthtmldisplayZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline71075}% +$90^{\circ}$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline71079}% +$0^{\circ}$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline71081}% +$\left( \begin{array}{rr} + 1 & 0 \\ + 0 & 1 \end{array} \right)$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline71083}% +$\left( \begin{array}{r} + 1 \\ + 2 \end{array} \right)$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline71087}% +$\left( \begin{array}{rr} + 0 & -1 \\ + 1 & 0 \end{array} \right)$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline71089}% +$\left( \begin{array}{r} + -2 \\ + 1 \end{array} \right)$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline71091}% +$180^{\circ}$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline71093}% +$\left( \begin{array}{rr} + -1 & 0 \\ + 0 & -1 \end{array} \right)$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline71095}% +$\left( \begin{array}{r} + -1 \\ + -2 \end{array} \right)$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline71097}% +$270^{\circ}$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline71099}% +$\left( \begin{array}{rr} + 0 & 1 \\ + -1 & 0 \end{array} \right)$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline71101}% +$\left( \begin{array}{r} + 2 \\ + -1 \end{array} \right)$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline71105}% +$\left( \begin{array}{rr} + -1 & 0 \\ + 0 & 1 \end{array} \right)$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline71107}% +$\left( \begin{array}{r} + -1 \\ + 2 \end{array} \right)$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline71111}% +$\left( \begin{array}{rr} + 1 & 0 \\ + 0 & -1 \end{array} \right)$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline71113}% +$\left( \begin{array}{r} + 1 \\ + -2 \end{array} \right)$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline71117}% +$\left( \begin{array}{rr} + 0 & 1 \\ + 1 & 0 \end{array} \right)$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline71119}% +$\left( \begin{array}{r} + 2 \\ + 1 \end{array} \right)$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline71123}% +$\left( \begin{array}{rr} + 0 & -1 \\ + -1 & 0 \end{array} \right)$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline71125}% +$\left( \begin{array}{r} + -2 \\ + -1 \end{array} \right)$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +\stepcounter{subsubsection} +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline71127}% +$0^{\circ}..360^{\circ}$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline71129}% +$-80^{\circ}..+80^{\circ}$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlpictureA{tex2html_wrap138634}% +\includegraphics{dgconnect_1tile_not_connected.eps}% +\lthtmlpictureZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline71131}% +$\vec P = \vec b - \vec a = (1,j) - (51,j) = + (-50,0)$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlpictureA{tex2html_wrap138640}% +\includegraphics{dgconnect_1tile_periodic1_connected.eps}% +\lthtmlpictureZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlpictureA{tex2html_wrap138644}% +\includegraphics{dgconnect_1tile_periodic2_connected.eps}% +\lthtmlpictureZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline71143}% +$i+1$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline71155}% +$j=j_{max}$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline71157}% +$180^\circ$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline71159}% +$i=mod(i+i_{size}/2, i_{size})$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline71161}% +$i_{size}=i_{max} + -i_{min}+1$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmldisplayA{displaymath70831}% +\begin{displaymath} + \vec a = \left( \begin{array}{l} + i \\ + j_{max}+1 \end{array} \right) + \rightarrow + \vec b = \left( \begin{array}{l} + i + i_{size}/2\\ + j_{max} \end{array} \right). + \end{displaymath}% +\lthtmldisplayZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_indisplay138663}% +$\displaystyle \vec P$% +\lthtmlindisplaymathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_indisplay138665}% +$\displaystyle \vec b - \hat R \vec a$% +\lthtmlindisplaymathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_indisplay138667}% +$\displaystyle \left( \begin{array}{l} +i + i_{size}/2\\ +j_{max} \end{array} \right) +- \left( \begin{array}{rr} +1 & 0 \\ +0 & -1 \end{array} \right) +\left( \begin{array}{l} +i \\ +j_{max}+1 \end{array} \right)$% +\lthtmlindisplaymathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_indisplay138669}% +$\displaystyle \left( \begin{array}{l} +i_{size}/2\\ +2j_{max} +1 \end{array} \right).$% +\lthtmlindisplaymathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlpictureA{tex2html_wrap138680}% +\includegraphics{dgconnect_1tile_peripole_connected.eps}% +\lthtmlpictureZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline71177}% +$(i_{min}, j_{max}+1) \rightarrow (i_{max}, j_{max})$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline71179}% +$(i_{min}+1, j_{max}+1) \rightarrow (i_{max}-1, j_{max})$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline71185}% +$i_{min}$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_indisplay138693}% +$\displaystyle \left( \begin{array}{l} +i_{max}\\ +j_{max} \end{array} \right) +- \left( \begin{array}{rr} +-1 & 0 \\ +0 & -1 \end{array} \right) +\left( \begin{array}{l} +i_{min} \\ +j_{max}+1 \end{array} \right)$% +\lthtmlindisplaymathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_indisplay138695}% +$\displaystyle \left( \begin{array}{l} +i_{max}+i_{min}\\ +2j_{max} +1 \end{array} \right).$% +\lthtmlindisplaymathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlpictureA{tex2html_wrap138705}% +\includegraphics{dgconnect_1tile_peribipole_connected.eps}% +\lthtmlpictureZ +\lthtmlcheckvsize\clearpage} + +\stepcounter{subsubsection} +{\newpage\clearpage +\lthtmlpictureA{tex2html_wrap138710}% +\includegraphics{dgconnect_cusph_not_connected.eps}% +\lthtmlpictureZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlpictureA{tex2html_wrap138714}% +\includegraphics{dgconnect_cusph_5connected.eps}% +\lthtmlpictureZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline71201}% +$\rightarrow$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlpictureA{tex2html_wrap138722}% +\includegraphics{dgconnect_cusph_6connected.eps}% +\lthtmlpictureZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmldisplayA{displaymath70962}% +\begin{displaymath} + + \vec P = \vec b - \hat R \vec a. + \end{displaymath}% +\lthtmldisplayZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline71217}% +$90^\circ$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline71221}% +$270^\circ$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline71223}% +$\hat R=\left(\begin{array}{rr} + 0 & 1 \\ + -1 & 0 \end{array} \right)$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline71231}% +$\hat R=\left(\begin{array}{rr} + 0 & -1 \\ + 1 & 0 \end{array} \right)$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlpictureA{tex2html_wrap138744}% +\includegraphics{dgconnect_cusph_2rotconnected.eps}% +\lthtmlpictureZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlpictureA{tex2html_wrap138748}% +\includegraphics{dgconnect_cusph_12connected.eps}% +\lthtmlpictureZ +\lthtmlcheckvsize\clearpage} + + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline72759}% +$ > 2^{31}-1 = 2,147,483,647$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline72767}% +$1+n$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline72769}% +$n=$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{section} +\stepcounter{subsection} +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{section} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{part} +\stepcounter{section} +\stepcounter{section} +\stepcounter{subsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsection} +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{section} +\stepcounter{subsection} +{\newpage\clearpage +\lthtmlpictureA{tex2html_wrap139134}% +\includegraphics{TimeMgr_desc}% +\lthtmlpictureZ +\lthtmlcheckvsize\clearpage} + +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline79408}% +$ + +\frac{{\rm sN}}{{\rm sD}}$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +\stepcounter{subsection} +\stepcounter{subsection} +{\newpage\clearpage +\lthtmlpictureA{tex2html_wrap139173}% +\includegraphics{TimeMgr_obj}% +\lthtmlpictureZ +\lthtmlcheckvsize\clearpage} + +\stepcounter{section} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsubsection} +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline79523}% +$^{14}$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{subsection} +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{section} +\stepcounter{subsection} +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{subsection} +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline81073}% +$2^{63}$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline81077}% +$2^{31}$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{section} +\stepcounter{subsection} +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{subsection} +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{section} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsubsection} +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{subsection} +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{section} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsubsection} +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{section} +\stepcounter{subsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{section} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsubsection} +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{paragraph} +\stepcounter{paragraph} +\stepcounter{paragraph} +\stepcounter{paragraph} +\stepcounter{paragraph} +\stepcounter{paragraph} +\stepcounter{paragraph} +\stepcounter{paragraph} +\stepcounter{paragraph} +\stepcounter{paragraph} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{section} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +{\newpage\clearpage +\lthtmlpictureA{tex2html_wrap140512}% +\includegraphics{Log_obj}% +\lthtmlpictureZ +\lthtmlcheckvsize\clearpage} + +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{section} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline97805}% +$[0...localDeCount-1]$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline97807}% +$[1...localDeCount]$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{section} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsubsection} +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{subsection} +\stepcounter{subsection} +{\newpage\clearpage +\lthtmlpictureA{tex2html_wrap100760}% +\scalebox{0.6}{\includegraphics{VM_design}}% +\lthtmlpictureZ +\lthtmlcheckvsize\clearpage} + +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline102006}% +$\times$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline102008}% +$+$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline102026}% +$[0..petCount-1]$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{section} +\stepcounter{subsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{subsection} +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{section} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{part} +\stepcounter{part} +\stepcounter{section} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{section} +{\newpage\clearpage +\lthtmlpictureA{tex2html_wrap107306}% +\scalebox{0.8}{\includegraphics{Appendix_uml}}% +\lthtmlpictureZ +\lthtmlcheckvsize\clearpage} + +\stepcounter{section} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{section} +\stepcounter{subsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} + +\end{document} diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img1.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img1.png new file mode 100644 index 000000000..1ce37a2af Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img1.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img10.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img10.png new file mode 100644 index 000000000..2b5c32b0c Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img10.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img100.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img100.png new file mode 100644 index 000000000..307b5f187 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img100.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img101.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img101.png new file mode 100644 index 000000000..90a55059f Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img101.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img102.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img102.png new file mode 100644 index 000000000..e7280f00d Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img102.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img103.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img103.png new file mode 100644 index 000000000..dbc72effa Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img103.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img104.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img104.png new file mode 100644 index 000000000..73d08fdb3 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img104.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img105.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img105.png new file mode 100644 index 000000000..b45a5cff7 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img105.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img106.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img106.png new file mode 100644 index 000000000..e39f4332c Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img106.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img107.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img107.png new file mode 100644 index 000000000..f4bc176d9 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img107.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img108.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img108.png new file mode 100644 index 000000000..cddac4ff8 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img108.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img109.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img109.png new file mode 100644 index 000000000..dfa2185f6 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img109.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img11.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img11.png new file mode 100644 index 000000000..0d422847a Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img11.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img110.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img110.png new file mode 100644 index 000000000..08d103531 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img110.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img111.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img111.png new file mode 100644 index 000000000..d7f670c34 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img111.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img112.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img112.png new file mode 100644 index 000000000..135d8e173 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img112.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img113.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img113.png new file mode 100644 index 000000000..a4332ff6c Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img113.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img114.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img114.png new file mode 100644 index 000000000..ff72a6205 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img114.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img115.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img115.png new file mode 100644 index 000000000..ad1b1416d Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img115.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img116.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img116.png new file mode 100644 index 000000000..69cf07d68 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img116.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img117.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img117.png new file mode 100644 index 000000000..1b350632d Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img117.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img118.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img118.png new file mode 100644 index 000000000..e871c4272 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img118.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img119.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img119.png new file mode 100644 index 000000000..38040ff9b Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img119.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img12.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img12.png new file mode 100644 index 000000000..d32a0dbfb Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img12.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img120.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img120.png new file mode 100644 index 000000000..188fda2e0 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img120.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img121.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img121.png new file mode 100644 index 000000000..d85a4a79d Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img121.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img122.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img122.png new file mode 100644 index 000000000..728924349 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img122.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img123.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img123.png new file mode 100644 index 000000000..b22d11a09 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img123.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img124.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img124.png new file mode 100644 index 000000000..4b3621dfe Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img124.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img125.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img125.png new file mode 100644 index 000000000..fd270c869 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img125.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img126.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img126.png new file mode 100644 index 000000000..a54e5e57e Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img126.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img127.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img127.png new file mode 100644 index 000000000..b1c94ac1a Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img127.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img128.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img128.png new file mode 100644 index 000000000..0bc3c32a0 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img128.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img129.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img129.png new file mode 100644 index 000000000..0ee35c104 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img129.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img13.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img13.png new file mode 100644 index 000000000..784a5dc4c Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img13.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img130.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img130.png new file mode 100644 index 000000000..1b553af7f Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img130.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img131.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img131.png new file mode 100644 index 000000000..ea8800075 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img131.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img132.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img132.png new file mode 100644 index 000000000..285a8c9fc Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img132.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img133.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img133.png new file mode 100644 index 000000000..d4196374a Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img133.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img134.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img134.png new file mode 100644 index 000000000..9c46e592b Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img134.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img135.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img135.png new file mode 100644 index 000000000..b0c8d42ae Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img135.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img136.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img136.png new file mode 100644 index 000000000..242438ec1 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img136.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img137.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img137.png new file mode 100644 index 000000000..a8f6e2ac0 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img137.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img138.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img138.png new file mode 100644 index 000000000..952d66dc5 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img138.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img139.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img139.png new file mode 100644 index 000000000..c91cdf965 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img139.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img14.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img14.png new file mode 100644 index 000000000..d76157394 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img14.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img140.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img140.png new file mode 100644 index 000000000..0bf6a7448 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img140.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img141.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img141.png new file mode 100644 index 000000000..ba11becb9 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img141.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img142.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img142.png new file mode 100644 index 000000000..b533f5923 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img142.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img143.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img143.png new file mode 100644 index 000000000..86d4cc593 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img143.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img144.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img144.png new file mode 100644 index 000000000..51a25ce1c Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img144.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img145.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img145.png new file mode 100644 index 000000000..618f63d5e Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img145.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img146.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img146.png new file mode 100644 index 000000000..53f683d6e Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img146.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img147.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img147.png new file mode 100644 index 000000000..6e582394a Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img147.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img148.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img148.png new file mode 100644 index 000000000..329c2d2c7 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img148.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img149.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img149.png new file mode 100644 index 000000000..04556294a Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img149.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img15.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img15.png new file mode 100644 index 000000000..1b81d5f8d Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img15.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img150.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img150.png new file mode 100644 index 000000000..f4c5d6ded Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img150.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img151.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img151.png new file mode 100644 index 000000000..30f46336d Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img151.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img152.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img152.png new file mode 100644 index 000000000..414e9e9c4 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img152.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img153.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img153.png new file mode 100644 index 000000000..31cadefde Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img153.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img154.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img154.png new file mode 100644 index 000000000..66fc8567e Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img154.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img155.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img155.png new file mode 100644 index 000000000..a722e4f04 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img155.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img156.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img156.png new file mode 100644 index 000000000..6171c793e Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img156.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img157.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img157.png new file mode 100644 index 000000000..bb3a31229 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img157.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img158.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img158.png new file mode 100644 index 000000000..6ae4453da Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img158.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img159.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img159.png new file mode 100644 index 000000000..27a3cc52a Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img159.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img16.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img16.png new file mode 100644 index 000000000..e11811754 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img16.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img160.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img160.png new file mode 100644 index 000000000..0ae16ff78 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img160.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img161.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img161.png new file mode 100644 index 000000000..565041a7f Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img161.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img162.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img162.png new file mode 100644 index 000000000..2272cc839 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img162.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img163.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img163.png new file mode 100644 index 000000000..f4e0139a9 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img163.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img164.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img164.png new file mode 100644 index 000000000..401af42f2 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img164.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img165.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img165.png new file mode 100644 index 000000000..49d0c9b5d Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img165.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img166.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img166.png new file mode 100644 index 000000000..51a25ce1c Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img166.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img167.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img167.png new file mode 100644 index 000000000..03a010cec Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img167.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img168.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img168.png new file mode 100644 index 000000000..adf00d967 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img168.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img169.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img169.png new file mode 100644 index 000000000..190cda66d Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img169.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img17.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img17.png new file mode 100644 index 000000000..414a7d65c Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img17.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img170.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img170.png new file mode 100644 index 000000000..84c88db08 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img170.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img171.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img171.png new file mode 100644 index 000000000..5109a7714 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img171.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img172.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img172.png new file mode 100644 index 000000000..ade82f6e5 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img172.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img173.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img173.png new file mode 100644 index 000000000..99ea547dc Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img173.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img174.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img174.png new file mode 100644 index 000000000..02a9237b6 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img174.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img175.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img175.png new file mode 100644 index 000000000..86c6c724f Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img175.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img176.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img176.png new file mode 100644 index 000000000..532265d6b Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img176.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img177.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img177.png new file mode 100644 index 000000000..ef8a73591 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img177.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img178.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img178.png new file mode 100644 index 000000000..975d100f0 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img178.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img179.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img179.png new file mode 100644 index 000000000..44943c96c Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img179.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img18.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img18.png new file mode 100644 index 000000000..dd13f6509 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img18.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img180.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img180.png new file mode 100644 index 000000000..19fcdae5b Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img180.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img181.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img181.png new file mode 100644 index 000000000..5d60accce Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img181.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img182.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img182.png new file mode 100644 index 000000000..dc14407cd Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img182.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img183.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img183.png new file mode 100644 index 000000000..f007e99a8 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img183.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img184.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img184.png new file mode 100644 index 000000000..2bb4d9bbc Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img184.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img185.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img185.png new file mode 100644 index 000000000..633f7a250 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img185.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img186.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img186.png new file mode 100644 index 000000000..952d66dc5 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img186.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img187.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img187.png new file mode 100644 index 000000000..6e582394a Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img187.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img188.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img188.png new file mode 100644 index 000000000..269e26520 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img188.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img189.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img189.png new file mode 100644 index 000000000..755b0d622 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img189.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img19.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img19.png new file mode 100644 index 000000000..7a76c5385 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img19.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img190.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img190.png new file mode 100644 index 000000000..7e4373819 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img190.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img191.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img191.png new file mode 100644 index 000000000..4d2a967fb Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img191.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img192.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img192.png new file mode 100644 index 000000000..461a5d818 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img192.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img193.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img193.png new file mode 100644 index 000000000..f9cb84533 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img193.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img194.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img194.png new file mode 100644 index 000000000..151215189 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img194.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img195.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img195.png new file mode 100644 index 000000000..3398dea90 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img195.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img196.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img196.png new file mode 100644 index 000000000..3030c0c13 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img196.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img197.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img197.png new file mode 100644 index 000000000..65646c3ce Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img197.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img198.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img198.png new file mode 100644 index 000000000..b955e3452 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img198.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img199.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img199.png new file mode 100644 index 000000000..50ddf7e64 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img199.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img2.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img2.png new file mode 100644 index 000000000..136ea2246 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img2.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img20.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img20.png new file mode 100644 index 000000000..91c8ba788 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img20.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img200.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img200.png new file mode 100644 index 000000000..e3214c47d Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img200.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img201.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img201.png new file mode 100644 index 000000000..cbfacb796 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img201.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img202.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img202.png new file mode 100644 index 000000000..aa6d1570f Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img202.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img203.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img203.png new file mode 100644 index 000000000..b1d872c30 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img203.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img204.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img204.png new file mode 100644 index 000000000..684459d14 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img204.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img205.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img205.png new file mode 100644 index 000000000..66560a008 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img205.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img206.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img206.png new file mode 100644 index 000000000..3cc9e049c Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img206.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img207.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img207.png new file mode 100644 index 000000000..9111f3e1d Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img207.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img208.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img208.png new file mode 100644 index 000000000..315cacb80 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img208.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img21.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img21.png new file mode 100644 index 000000000..7bc9195a6 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img21.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img22.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img22.png new file mode 100644 index 000000000..049166911 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img22.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img23.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img23.png new file mode 100644 index 000000000..8791f4a82 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img23.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img24.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img24.png new file mode 100644 index 000000000..31616451d Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img24.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img25.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img25.png new file mode 100644 index 000000000..2b9162583 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img25.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img26.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img26.png new file mode 100644 index 000000000..2bf79a256 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img26.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img27.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img27.png new file mode 100644 index 000000000..32b026954 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img27.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img28.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img28.png new file mode 100644 index 000000000..f10d3ef8d Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img28.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img29.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img29.png new file mode 100644 index 000000000..9436007a2 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img29.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img3.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img3.png new file mode 100644 index 000000000..3704f2233 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img3.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img30.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img30.png new file mode 100644 index 000000000..fa56d648f Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img30.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img31.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img31.png new file mode 100644 index 000000000..10b5c15b5 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img31.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img32.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img32.png new file mode 100644 index 000000000..f193d8ca3 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img32.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img33.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img33.png new file mode 100644 index 000000000..b621c3932 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img33.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img34.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img34.png new file mode 100644 index 000000000..c3a9615b5 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img34.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img35.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img35.png new file mode 100644 index 000000000..4474a10b9 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img35.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img36.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img36.png new file mode 100644 index 000000000..8598ca598 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img36.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img37.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img37.png new file mode 100644 index 000000000..015a86623 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img37.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img38.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img38.png new file mode 100644 index 000000000..b7c636ff9 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img38.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img39.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img39.png new file mode 100644 index 000000000..5045fa508 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img39.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img4.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img4.png new file mode 100644 index 000000000..c03ab3aa1 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img4.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img40.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img40.png new file mode 100644 index 000000000..42a302f8b Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img40.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img41.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img41.png new file mode 100644 index 000000000..e0e2acd72 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img41.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img42.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img42.png new file mode 100644 index 000000000..510e6ba90 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img42.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img43.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img43.png new file mode 100644 index 000000000..2f94ee87d Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img43.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img44.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img44.png new file mode 100644 index 000000000..3b98454ab Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img44.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img45.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img45.png new file mode 100644 index 000000000..ad0547988 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img45.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img46.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img46.png new file mode 100644 index 000000000..efd13754c Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img46.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img47.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img47.png new file mode 100644 index 000000000..75ad12387 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img47.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img48.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img48.png new file mode 100644 index 000000000..63688a7a2 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img48.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img49.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img49.png new file mode 100644 index 000000000..4ea3f375b Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img49.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img5.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img5.png new file mode 100644 index 000000000..6e31108cf Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img5.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img50.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img50.png new file mode 100644 index 000000000..aca9b6834 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img50.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img51.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img51.png new file mode 100644 index 000000000..6bfaa4a96 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img51.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img52.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img52.png new file mode 100644 index 000000000..fcbbd7d69 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img52.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img53.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img53.png new file mode 100644 index 000000000..e7fdc09ef Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img53.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img54.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img54.png new file mode 100644 index 000000000..fa57cd9fb Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img54.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img55.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img55.png new file mode 100644 index 000000000..7dac08411 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img55.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img56.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img56.png new file mode 100644 index 000000000..94ce4e626 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img56.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img57.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img57.png new file mode 100644 index 000000000..bdff8442b Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img57.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img58.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img58.png new file mode 100644 index 000000000..21ca4ede1 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img58.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img59.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img59.png new file mode 100644 index 000000000..197f91758 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img59.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img6.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img6.png new file mode 100644 index 000000000..03d1dc06c Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img6.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img60.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img60.png new file mode 100644 index 000000000..ec885a0ab Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img60.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img61.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img61.png new file mode 100644 index 000000000..03d78b254 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img61.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img62.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img62.png new file mode 100644 index 000000000..4fa5f8f85 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img62.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img63.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img63.png new file mode 100644 index 000000000..af6d98a51 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img63.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img64.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img64.png new file mode 100644 index 000000000..9c437e0e5 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img64.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img65.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img65.png new file mode 100644 index 000000000..6be1fe330 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img65.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img66.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img66.png new file mode 100644 index 000000000..728e5aea4 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img66.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img67.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img67.png new file mode 100644 index 000000000..2a08c81dd Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img67.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img68.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img68.png new file mode 100644 index 000000000..c9310190c Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img68.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img69.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img69.png new file mode 100644 index 000000000..0841163a9 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img69.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img7.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img7.png new file mode 100644 index 000000000..d20d3b4e0 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img7.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img70.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img70.png new file mode 100644 index 000000000..7eeb724aa Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img70.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img71.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img71.png new file mode 100644 index 000000000..2202e3c22 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img71.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img72.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img72.png new file mode 100644 index 000000000..e17bafc31 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img72.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img73.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img73.png new file mode 100644 index 000000000..17d5cb20c Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img73.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img74.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img74.png new file mode 100644 index 000000000..9dec0113f Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img74.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img75.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img75.png new file mode 100644 index 000000000..357071dbb Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img75.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img76.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img76.png new file mode 100644 index 000000000..44f8433ac Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img76.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img77.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img77.png new file mode 100644 index 000000000..eb4a74d79 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img77.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img78.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img78.png new file mode 100644 index 000000000..355a29c94 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img78.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img79.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img79.png new file mode 100644 index 000000000..55042078e Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img79.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img8.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img8.png new file mode 100644 index 000000000..effe43a0a Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img8.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img80.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img80.png new file mode 100644 index 000000000..bbd7e4980 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img80.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img81.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img81.png new file mode 100644 index 000000000..dcbb7463c Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img81.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img82.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img82.png new file mode 100644 index 000000000..4995285c9 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img82.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img83.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img83.png new file mode 100644 index 000000000..5ced5f938 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img83.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img84.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img84.png new file mode 100644 index 000000000..ac3f000e5 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img84.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img85.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img85.png new file mode 100644 index 000000000..29015895e Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img85.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img86.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img86.png new file mode 100644 index 000000000..016eea4cc Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img86.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img87.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img87.png new file mode 100644 index 000000000..38744e674 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img87.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img88.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img88.png new file mode 100644 index 000000000..55cf30c9e Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img88.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img89.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img89.png new file mode 100644 index 000000000..448748bc2 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img89.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img9.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img9.png new file mode 100644 index 000000000..51f3418d9 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img9.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img90.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img90.png new file mode 100644 index 000000000..27d0a5cf1 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img90.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img91.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img91.png new file mode 100644 index 000000000..cd6b9c166 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img91.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img92.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img92.png new file mode 100644 index 000000000..eaa4bd994 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img92.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img93.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img93.png new file mode 100644 index 000000000..e8a4057c8 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img93.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img94.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img94.png new file mode 100644 index 000000000..5a96e5189 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img94.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img95.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img95.png new file mode 100644 index 000000000..f7e3f2d5b Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img95.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img96.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img96.png new file mode 100644 index 000000000..709d6b46a Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img96.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img97.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img97.png new file mode 100644 index 000000000..1cc88ffcc Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img97.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img98.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img98.png new file mode 100644 index 000000000..fef60fca2 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img98.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/img99.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img99.png new file mode 100644 index 000000000..b0075cd30 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/img99.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/index.html b/docs/nightly/fix/reconcile-info/ESMF_refdoc/index.html new file mode 100644 index 000000000..6f7440320 --- /dev/null +++ b/docs/nightly/fix/reconcile-info/ESMF_refdoc/index.html @@ -0,0 +1,1010 @@ + + + + + +ESMF_refdoc + + + + + + + + + + + + + + + + + + + +

+ +

+

+Earth System Modeling Framework +
+
+
+
+ESMF Reference Manual for Fortran   +
+
+
+
+Version 8.8.0 beta snapshot +
+
+
+
+
+ESMF Joint Specification Team: V. Balaji, Byron Boville, Samson Cheung, Tom Clune, Nancy Collins, Tony Craig, Carlos Cruz, Arlindo da Silva, Cecelia DeLuca, Rosalinda de Fainchtein, Rocky Dunlap, Brian Eaton, Steve Goldhaber, Bob Hallberg, Tom Henderson, Chris Hill, Mark Iredell, Joseph Jacob, Rob Jacob, Phil Jones, Brian Kauffman, Erik Kluzek, Ben Koziol, Jay Larson, Peggy Li, Fei Liu, John Michalakes, Raffaele Montuoro, Sylvia Murphy, David Neckels, Ryan O Kuinghttons, Bob Oehmke, Chuck Panaccione, Daniel Rosen, Jim Rosinski, Mathew Rothstein, Bill Sacks, Kathy Saint, Will Sawyer, Earl Schwab, Shepard Smithline, Walter Spector, Don Stark, Max Suarez, Spencer Swift, Gerhard Theurich, Atanas Trayanov, Silverio Vasquez, Jon Wolfe, Weiyu Yang, Mike Young, Leonid Zaslavsky +
+
+
+
+December 3, 2024 +
+
+
+ +
+ +

+ +

+ + +

+
+
+
+
+
+
+
+
+
+
+
+
+
+

+Acknowledgements + +
+ +

+The ESMF software is based on the contributions of a broad community. +Below are the software packages that are included in ESMF or strongly +influenced our design. We'd like to express our gratitude to the +developers of these codes for access to their software as well as their +ideas and advice. + +

+ +

    +
  • Parallel I/O (PIO) developers at NCAR and DOE Laboratories for their +excellent work on this package and their help in making it work with ESMF + +

    +

  • +
  • The Spherical Coordinate Remapping and Interpolation Package (SCRIP) +from Los Alamos, which informed the design of our regridding functionality + +

    +

  • +
  • The Model Coupling Toolkit (MCT) from Argonne National Laboratory, +on which we based our sparse matrix multiply approach to general +regridding + +

    +

  • +
  • The Inpack configuration attributes package from NASA Goddard, +which was adapted for use in ESMF by members of NASA Global Modeling and +Assimilation group + +

    +

  • +
  • The Flexible Modeling System (FMS) package from GFDL and the +Goddard Earth Modeling System (GEMS) from NASA Goddard, both of which +provided inspiration for the overall ESMF architecture + +

    +

  • +
  • The Common Component Architecture (CCA) effort within the Department +of Energy, from which we drew many ideas about how to design components + +

    +

  • +
  • The Vector Signal Image Processing Library (VSIPL) and its +predecessors, which informed many aspects of our design, and the +radar system software design group at Lincoln Laboratory + +

    +

  • +
  • The Portable, Extensible Toolkit for Scientific Computation (PETSc) +package from Argonne National Laboratories, on which we +based our initial makefile system + +

    +

  • +
  • The Community Climate System Model (CCSM) and Weather Research and +Forecasting (WRF) modeling groups at NCAR, who have provided valuable +feedback on the design and implementation of the framework + +

    +

  • +
+ +

+ + + + + + + + +
+esmf_support@ucar.edu +
+ + diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/internals.pl b/docs/nightly/fix/reconcile-info/ESMF_refdoc/internals.pl new file mode 100644 index 000000000..0eb3a5335 --- /dev/null +++ b/docs/nightly/fix/reconcile-info/ESMF_refdoc/internals.pl @@ -0,0 +1,1786 @@ +# LaTeX2HTML 2018 (Released Feb 1, 2018) +# Associate internals original text with physical files. + + +$key = q/API:GridCreateFrmNCFile/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/API:GridCreateMosaicReg/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/API:GridGet/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/API:GridGetCoord/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/API:GridGetCoordInfo/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/API:GridGetCoordIntoArray/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/API:GridGetCoordR4/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/API:GridGetCoordR8/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/API:GridGetItem/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/API:GridGetItemInfo/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/API:GridGetItemIntoArray/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/API:GridGetPLocalDe/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/API:GridGetPLocalDePSloc/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/API:GridGetPSloc/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/API:GridGetPSlocPTile/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/API:MeshCreateFromFile/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/API:TimeIntervalSetStr/; +$ref_files{$key} = "$dir".q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/Array:ArbHalo/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/Array:CommNB/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/Array:Halo/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/Array:LocalArray/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/Array:Redist/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/Array:Redist:DefaultMode/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/Array:Redist:TransposeMode/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/Array:ScatterGather/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/Array:ScatterGatherRevisited/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/Array:SparseMatMul/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/Array:fpadding/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/Array:padding/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/Array:rest/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/ArrayRedistStoreNF/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/ArrayRedistStoreNFTP/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/ArrayRedistStoreTK/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/ArrayRedistStoreTKTP/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/ArraySMMStoreNF/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/ArraySMMStoreNFTP/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/ArraySMMStoreTK/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/ArraySMMStoreTKTP/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/Array_from_native_1_to_1/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/Array_native_language_localde/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/Array_regions_and_default_bounds/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/Array_shared_memory_features/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/CplComp:SetServices/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/CplComp:SetServicesShObj/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/DELayout_general_mapping/; +$ref_files{$key} = "$dir".q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/DistGrid:ArbitrarySeqInd/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/ESMF_FieldFill/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/Field:rest/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/FieldRedistStoreNF/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/FieldRedistStoreTK/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/Field_shared_memory_features/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/GridComp:SetServices/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/GridComp:SetServicesShObj/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/HConfigMatch/; +$ref_files{$key} = "$dir".q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/RH:DynMask/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/RH:RHfromFile/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/RH:RHfromRH/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/RH:Reusability/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/RH:asyncVMEpoch/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/RH:bfb/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/Regrid_Interfaces/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/VM:NBVMEpoch/; +$ref_files{$key} = "$dir".q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/XGrid:rest/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/api:ArrayBundleRead/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/api:ArrayBundleWrite/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/api:ArrayRead/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/api:ArrayWrite/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/api:DistGridConnectionGet/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/api:DistGridConnectionSet/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/api:DynamicMaskSetR4R4R4/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/api:DynamicMaskSetR4R4R4V/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/api:DynamicMaskSetR4R8R4/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/api:DynamicMaskSetR4R8R4V/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/api:DynamicMaskSetR8R8R8/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/api:DynamicMaskSetR8R8R8V/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/api:FieldBundleRead/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/api:FieldBundleWrite/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/api:FieldRead/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/api:FieldWrite/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/api:SparseMatrixWrite/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/api:esmf_fieldbundleregridstore/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/api:esmf_fieldregridstorenx/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/api:esmf_fileregrid/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/api:esmf_regridweightgenDG/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/api:esmf_regridweightgenfile/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/appendix_attribute_legacy_api/; +$ref_files{$key} = "$dir".q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/appendix_esmf_error_codes/; +$ref_files{$key} = "$dir".q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/assignment_equality_copy_compare/; +$ref_files{$key} = "$dir".q|node2.html|; +$noresave{$key} = "$nosave"; + +$key = q/cite_BalajiXGrid/; +$ref_files{$key} = "$dir".q|node8.html|; +$noresave{$key} = "$nosave"; + +$key = q/cite_ConservativeOrder1/; +$ref_files{$key} = "$dir".q|node8.html|; +$noresave{$key} = "$nosave"; + +$key = q/cite_ConservativeOrder2/; +$ref_files{$key} = "$dir".q|node8.html|; +$noresave{$key} = "$nosave"; + +$key = q/cite_Fli68/; +$ref_files{$key} = "$dir".q|node8.html|; +$noresave{$key} = "$nosave"; + +$key = q/cite_Hat84/; +$ref_files{$key} = "$dir".q|node8.html|; +$noresave{$key} = "$nosave"; + +$key = q/cite_ISO/; +$ref_files{$key} = "$dir".q|node8.html|; +$noresave{$key} = "$nosave"; + +$key = q/cite_ISOnotes/; +$ref_files{$key} = "$dir".q|node8.html|; +$noresave{$key} = "$nosave"; + +$key = q/cite_JDNcalculator/; +$ref_files{$key} = "$dir".q|node8.html|; +$noresave{$key} = "$nosave"; + +$key = q/cite_MJD/; +$ref_files{$key} = "$dir".q|node8.html|; +$noresave{$key} = "$nosave"; + +$key = q/cite_Meyer1/; +$ref_files{$key} = "$dir".q|node8.html|; +$noresave{$key} = "$nosave"; + +$key = q/cite_Meyer2/; +$ref_files{$key} = "$dir".q|node8.html|; +$noresave{$key} = "$nosave"; + +$key = q/cite_NetCDF3_UsersGuide_C/; +$ref_files{$key} = "$dir".q|node8.html|; +$noresave{$key} = "$nosave"; + +$key = q/cite_NetCDF_CF/; +$ref_files{$key} = "$dir".q|node8.html|; +$noresave{$key} = "$nosave"; + +$key = q/cite_PatchInterp1/; +$ref_files{$key} = "$dir".q|node8.html|; +$noresave{$key} = "$nosave"; + +$key = q/cite_PatchInterp2/; +$ref_files{$key} = "$dir".q|node8.html|; +$noresave{$key} = "$nosave"; + +$key = q/cite_Seidelman/; +$ref_files{$key} = "$dir".q|node8.html|; +$noresave{$key} = "$nosave"; + +$key = q/cite_Sierra/; +$ref_files{$key} = "$dir".q|node8.html|; +$noresave{$key} = "$nosave"; + +$key = q/cite_Zoltan/; +$ref_files{$key} = "$dir".q|node8.html|; +$noresave{$key} = "$nosave"; + +$key = q/cite_json/; +$ref_files{$key} = "$dir".q|node8.html|; +$noresave{$key} = "$nosave"; + +$key = q/cite_json_for_modern_cpp/; +$ref_files{$key} = "$dir".q|node8.html|; +$noresave{$key} = "$nosave"; + +$key = q/cite_json_for_modern_cpp_64bit_float/; +$ref_files{$key} = "$dir".q|node8.html|; +$noresave{$key} = "$nosave"; + +$key = q/cite_json_for_modern_cpp_64bit_int/; +$ref_files{$key} = "$dir".q|node8.html|; +$noresave{$key} = "$nosave"; + +$key = q/cite_json_for_modern_cpp_is_structured/; +$ref_files{$key} = "$dir".q|node8.html|; +$noresave{$key} = "$nosave"; + +$key = q/cite_json_for_modern_cpp_json_pointer/; +$ref_files{$key} = "$dir".q|node8.html|; +$noresave{$key} = "$nosave"; + +$key = q/cite_json_for_modern_cpp_memory_overhead/; +$ref_files{$key} = "$dir".q|node8.html|; +$noresave{$key} = "$nosave"; + +$key = q/cite_json_for_modern_cpp_null/; +$ref_files{$key} = "$dir".q|node8.html|; +$noresave{$key} = "$nosave"; + +$key = q/cite_json_for_modern_cpp_object/; +$ref_files{$key} = "$dir".q|node8.html|; +$noresave{$key} = "$nosave"; + +$key = q/cite_json_for_modern_cpp_typename/; +$ref_files{$key} = "$dir".q|node8.html|; +$noresave{$key} = "$nosave"; + +$key = q/cite_json_for_modern_cpp_update/; +$ref_files{$key} = "$dir".q|node8.html|; +$noresave{$key} = "$nosave"; + +$key = q/cite_ref:SCRIP/; +$ref_files{$key} = "$dir".q|node8.html|; +$noresave{$key} = "$nosave"; + +$key = q/cite_uml/; +$ref_files{$key} = "$dir".q|node8.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:alarmlist/; +$ref_files{$key} = "$dir".q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:arbdim/; +$ref_files{$key} = "$dir".q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:attcopy/; +$ref_files{$key} = "$dir".q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:attgetcount/; +$ref_files{$key} = "$dir".q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:attnest/; +$ref_files{$key} = "$dir".q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:attreconcile/; +$ref_files{$key} = "$dir".q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:attwrite/; +$ref_files{$key} = "$dir".q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:calkindflag/; +$ref_files{$key} = "$dir".q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:comptype/; +$ref_files{$key} = "$dir".q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:contextflag/; +$ref_files{$key} = "$dir".q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:coordkeyname/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:coordsys/; +$ref_files{$key} = "$dir".q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:cubedspherecalcflag/; +$ref_files{$key} = "$dir".q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:datacopyflag/; +$ref_files{$key} = "$dir".q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:decompflag/; +$ref_files{$key} = "$dir".q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:direction/; +$ref_files{$key} = "$dir".q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:distgridmatch/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:endflag/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:fieldstatus/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:fileformatflag/; +$ref_files{$key} = "$dir".q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:filemodeflag/; +$ref_files{$key} = "$dir".q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:filestatusflag/; +$ref_files{$key} = "$dir".q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:geomtype/; +$ref_files{$key} = "$dir".q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:gridconn/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:griditem/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:gridmatch/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:gridstatus/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:hconfigmatch/; +$ref_files{$key} = "$dir".q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:indexflag/; +$ref_files{$key} = "$dir".q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:ionetcdfflag/; +$ref_files{$key} = "$dir".q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:iopioflag/; +$ref_files{$key} = "$dir".q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:iopnetcdfflag/; +$ref_files{$key} = "$dir".q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:itemorderflag/; +$ref_files{$key} = "$dir".q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:kind/; +$ref_files{$key} = "$dir".q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:logerr/; +$ref_files{$key} = "$dir".q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:logkindflag/; +$ref_files{$key} = "$dir".q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:logmsgflag/; +$ref_files{$key} = "$dir".q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:maskkeyname/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:master/; +$ref_files{$key} = "$dir".q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:meshelemtype/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:meshloc/; +$ref_files{$key} = "$dir".q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:meshop/; +$ref_files{$key} = "$dir".q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:meshstatus/; +$ref_files{$key} = "$dir".q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:method/; +$ref_files{$key} = "$dir".q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:pin_flag/; +$ref_files{$key} = "$dir".q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:polekind/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:polemethod/; +$ref_files{$key} = "$dir".q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:reduce/; +$ref_files{$key} = "$dir".q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:region/; +$ref_files{$key} = "$dir".q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:routesync/; +$ref_files{$key} = "$dir".q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:servicereply_flag/; +$ref_files{$key} = "$dir".q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:staggerloc/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:startregion/; +$ref_files{$key} = "$dir".q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:stateintent/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:stateitem/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:sync/; +$ref_files{$key} = "$dir".q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:termorderflag/; +$ref_files{$key} = "$dir".q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:typekind/; +$ref_files{$key} = "$dir".q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:unmappedaction/; +$ref_files{$key} = "$dir".q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:version/; +$ref_files{$key} = "$dir".q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:vmepoch_flag/; +$ref_files{$key} = "$dir".q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:xgridside/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/eqn:dg_forward_connect_form/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/eqn:dg_forward_connect_pivot/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/eqn:dg_forward_connect_pivot_trans/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/eqn:dg_forward_connect_pivot_trans_pv/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/eqn:dg_forward_pvec/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/esmf_info_class/; +$ref_files{$key} = "$dir".q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/esmf_infobroadcast/; +$ref_files{$key} = "$dir".q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/esmf_infosync/; +$ref_files{$key} = "$dir".q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/esmfstateremovelist/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/ex:TraceEx/; +$ref_files{$key} = "$dir".q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/ex:TraceUserEx/; +$ref_files{$key} = "$dir".q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/example:2DIrregCurviGrid/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/example:2DIrregUniGrid/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/example:2DPeriRegUniGrid/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/example:2DRegUniGrid/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/example:ArbGridWithUndistDim/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/example:CurviGridWithUndistDim/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:GEOS5/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:GridDecomps/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:LogRectGrids/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:TheESMFwich/; +$ref_files{$key} = "$dir".q|node2.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:appunit/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:concurrent/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:dgconnect_1tile_not_connected/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:dgconnect_1tile_peribipole_connected/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:dgconnect_1tile_periodic1_connected/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:dgconnect_1tile_periodic2_connected/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:dgconnect_1tile_peripole_connected/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:dgconnect_2tiles_connected/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:dgconnect_2tiles_not_connected/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:dgconnect_cusph_12connected/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:dgconnect_cusph_2rotconnected/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:dgconnect_cusph_5connected/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:dgconnect_cusph_6connected/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:dgconnect_cusph_not_connected/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:excl_destination/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:excl_destination_cpl/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:excl_source/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:excl_source_cpl/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:fieldparameter/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:gridcellsandcorners/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:gridcuststaggerloc/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:gridexreg/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:gridfileformatfeatures/; +$ref_files{$key} = "$dir".q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:gridstaggerloc2d/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:gridstaggerloc3d/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:reconcile/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:serial/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:webservices_fig/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:xgridsimple/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/fio:unitnumbers/; +$ref_files{$key} = "$dir".q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/get_info_handle_from_esmf_object/; +$ref_files{$key} = "$dir".q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/gridspecexample/; +$ref_files{$key} = "$dir".q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/info_key_format/; +$ref_files{$key} = "$dir".q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/info_tutorial/; +$ref_files{$key} = "$dir".q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/io:dataio/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/line_type_support/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/locstream:createfromfile/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/log_class/; +$ref_files{$key} = "$dir".q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/opt:extrapmethod/; +$ref_files{$key} = "$dir".q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/opt:iofmtflag/; +$ref_files{$key} = "$dir".q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/opt:lineType/; +$ref_files{$key} = "$dir".q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/opt:normType/; +$ref_files{$key} = "$dir".q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/opt:regridmethod/; +$ref_files{$key} = "$dir".q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/opt:regridstatus/; +$ref_files{$key} = "$dir".q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/part:CLTs/; +$ref_files{$key} = "$dir".q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/part:ESMFOverview/; +$ref_files{$key} = "$dir".q|node2.html|; +$noresave{$key} = "$nosave"; + +$key = q/part:Superstructure/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/ref:distgridconnection/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/ref:distgridregdecomp/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/ref:dynamicmask/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/ref:stagsub/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/regrid:masking/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/regridoutput/; +$ref_files{$key} = "$dir".q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec::vectorRegrid/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:Alarm/; +$ref_files{$key} = "$dir".q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:AppDriverIntProc/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:AppDriverSetVM/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:BasicProfiling/; +$ref_files{$key} = "$dir".q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:Calendar/; +$ref_files{$key} = "$dir".q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:Clock/; +$ref_files{$key} = "$dir".q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:CompTunnel/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:CompTunnelActualCreate/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:CompTunnelActualDestroy/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:CompTunnelActualSide/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:CompTunnelDualCreate/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:CompTunnelDualDestroy/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:CompTunnelDualSide/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:CompTunnelInvoking/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:CompTunnelInvokingNonblocking/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:Config/; +$ref_files{$key} = "$dir".q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:CplComp/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:CplFinalize/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:CplInitialize/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:CplRun/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:CplSetServ/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:CplSetVM/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:DistGrid/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:ESMF_PrintInfo/; +$ref_files{$key} = "$dir".q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:ESMF_Regrid/; +$ref_files{$key} = "$dir".q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:ESMF_RegridWeightGen/; +$ref_files{$key} = "$dir".q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:ESMF_Scrip2Unstruct/; +$ref_files{$key} = "$dir".q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:GridComp/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:GridFinalize/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:GridInitialize/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:GridRun/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:GridSetServ/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:GridSetVM/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:HConfig/; +$ref_files{$key} = "$dir".q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:IOUtil/; +$ref_files{$key} = "$dir".q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:LimitProfiling/; +$ref_files{$key} = "$dir".q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:Log/; +$ref_files{$key} = "$dir".q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:MPIProfiling/; +$ref_files{$key} = "$dir".q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:Profiling/; +$ref_files{$key} = "$dir".q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:RHandle/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:SciComp/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:ShapeShortcut/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:State/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:Submission/; +$ref_files{$key} = "$dir".q|node2.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:SummaryProfiling/; +$ref_files{$key} = "$dir".q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:Support/; +$ref_files{$key} = "$dir".q|node2.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:Time/; +$ref_files{$key} = "$dir".q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:TimeInterval/; +$ref_files{$key} = "$dir".q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:Tracing/; +$ref_files{$key} = "$dir".q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:TracingClocks/; +$ref_files{$key} = "$dir".q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:aliases/; +$ref_files{$key} = "$dir".q|node2.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:array:usage:replicated_dims/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:array:usage:undistributed_dims/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:bundlerest/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:component:usage:scicomp/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:concurrency/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:conventions/; +$ref_files{$key} = "$dir".q|node2.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:coordspec/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:deepshallow/; +$ref_files{$key} = "$dir".q|node2.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:desc:dist/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:example:2DLogRecFromScrip/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:example:MeshCubedSphere/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:example:UnstructFromFile/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:extrapolation:creep/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:extrapolation:nearestidavg/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:extrapolation:neareststod/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:extrapolation:overview/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:field:usage:createArbGrid/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:field:usage:createArbGridRep/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:field:usage:createMeshArrayspecOpt/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:field:usage:create_2darray/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:field:usage:create_2dgrid_3dptr/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:field:usage:create_2dgrid_3dptr_map/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:field:usage:create_2dgrid_3dptr_map_halo/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:field:usage:create_2dptr/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:field:usage:create_5dgrid_7dptr_2dungridded/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:field:usage:create_empty/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:field:usage:create_grid_array/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:field:usage:create_grid_arrayspec/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:field:usage:create_grid_tkr/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:field:usage:create_locs_arrayspec/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:field:usage:create_locs_tkr/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:field:usage:create_mesh_array/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:field:usage:create_mesh_arrayspec/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:field:usage:create_mesh_tkr/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:field:usage:create_repdim/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:field:usage:field_get_dataptr/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:field:usage:field_get_default/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:field:usage:gather_2dptr/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:field:usage:halo/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:field:usage:partial_creation/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:field:usage:redist_1dptr/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:field:usage:redist_gathering/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:field:usage:redist_scattering/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:field:usage:scatter_2dptr/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:field:usage:smm_1dptr/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:fieldbundle:usage:create_empty/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:fieldbundle:usage:create_emptylist/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:fieldbundle:usage:create_list/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:fieldbundle:usage:get/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:fieldbundle:usage:getlist/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:fieldbundle:usage:halo/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:fieldbundle:usage:packedFBGrid/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:fieldbundle:usage:packedFBMesh/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:fieldbundle:usage:redist_1dptr/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:fieldbundle:usage:redist_packed/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:fieldbundle:usage:smm_1dptr/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:fieldregrid/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:filebasedregrid/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:fileformat:esmf/; +$ref_files{$key} = "$dir".q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:fileformat:gridspec/; +$ref_files{$key} = "$dir".q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:fileformat:mosaic/; +$ref_files{$key} = "$dir".q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:fileformat:scrip/; +$ref_files{$key} = "$dir".q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:fileformat:ugrid/; +$ref_files{$key} = "$dir".q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:fileregridusage/; +$ref_files{$key} = "$dir".q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:grid:usage:bounds/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:hierarchy/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:interpolation:bilinear/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:interpolation:conservation/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:interpolation:conservative_norm_opts/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:interpolation:conserve/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:interpolation:conserve_2ndorder/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:interpolation:great_circle_cells/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:interpolation:nearestdtos/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:interpolation:neareststod/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:interpolation:patch/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:localcomm/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:mesh:1pet1step/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:mesh:1pet3step/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:mesh:4pet1step/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:mesh:4pet1stepee/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:mesh:4pet1stepee1type/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:mesh:api:meshaddelements/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:mesh:api:meshaddnodes/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:mesh:api:meshcreate/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:mesh:halo/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:mesh:mask/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:mesh:usage:meshCreation/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:meshrep/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:overallimpl/; +$ref_files{$key} = "$dir".q|node2.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:overallrest/; +$ref_files{$key} = "$dir".q|node2.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:performance/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:regrid/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:regridusage/; +$ref_files{$key} = "$dir".q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:regridweightgencheck/; +$ref_files{$key} = "$dir".q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:rwg:conservation/; +$ref_files{$key} = "$dir".q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:rwg:conservative_norm_opts/; +$ref_files{$key} = "$dir".q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:rwg_bilinear/; +$ref_files{$key} = "$dir".q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:rwg_conserve/; +$ref_files{$key} = "$dir".q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:rwg_conserve2d/; +$ref_files{$key} = "$dir".q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:rwg_extrap/; +$ref_files{$key} = "$dir".q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:rwg_linetype/; +$ref_files{$key} = "$dir".q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:rwg_masking/; +$ref_files{$key} = "$dir".q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:rwg_nearest/; +$ref_files{$key} = "$dir".q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:rwg_options/; +$ref_files{$key} = "$dir".q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:rwg_patch/; +$ref_files{$key} = "$dir".q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:rwg_poles/; +$ref_files{$key} = "$dir".q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:rwg_regridmethods/; +$ref_files{$key} = "$dir".q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:rwg_unmapped/; +$ref_files{$key} = "$dir".q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:scoping/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:spatialclasses/; +$ref_files{$key} = "$dir".q|node2.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:usage:adv:create/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:usage:coords:accessing/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:usage:cubedsphere/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:usage:cubedspherefromfile/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:usage:cubedspherewttransform/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:usage:items/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:usage:items:accessing/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:usage:setcommit/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:usage:staggerloc/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:usage:staggerloc:adv/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:usage:staggerpadding:adv/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:weightfileformat/; +$ref_files{$key} = "$dir".q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:xgrid:desc/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:xgrid:usage:xgrid_create/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:xgrid:usage:xgrid_create_masking/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:xgrid:usage:xgrid_createfromsparsemat/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:xgrid:usage:xgrid_destroy/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:xgrid:usage:xgrid_get/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/subsec:Calendar_options/; +$ref_files{$key} = "$dir".q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/subsec:Calendar_rest/; +$ref_files{$key} = "$dir".q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/subsec:Time_Instants_and_TimeIntervals/; +$ref_files{$key} = "$dir".q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/tab:dg_ops/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/table:timeOpts/; +$ref_files{$key} = "$dir".q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/ugridexample/; +$ref_files{$key} = "$dir".q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/vm_higherrank/; +$ref_files{$key} = "$dir".q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/vm_inside_user_mpi/; +$ref_files{$key} = "$dir".q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/vm_multi_instance_esmf/; +$ref_files{$key} = "$dir".q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/vm_nesting_esmf/; +$ref_files{$key} = "$dir".q|node6.html|; +$noresave{$key} = "$nosave"; + +1; + diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/labels.pl b/docs/nightly/fix/reconcile-info/ESMF_refdoc/labels.pl new file mode 100644 index 000000000..568fa6827 --- /dev/null +++ b/docs/nightly/fix/reconcile-info/ESMF_refdoc/labels.pl @@ -0,0 +1,3453 @@ +# LaTeX2HTML 2018 (Released Feb 1, 2018) +# Associate labels original text with physical files. + + +$key = q/API:GridCreateFrmNCFile/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/API:GridCreateMosaicReg/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/API:GridGet/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/API:GridGetCoord/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/API:GridGetCoordInfo/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/API:GridGetCoordIntoArray/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/API:GridGetCoordR4/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/API:GridGetCoordR8/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/API:GridGetItem/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/API:GridGetItemInfo/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/API:GridGetItemIntoArray/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/API:GridGetPLocalDe/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/API:GridGetPLocalDePSloc/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/API:GridGetPSloc/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/API:GridGetPSlocPTile/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/API:MeshCreateFromFile/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/API:TimeIntervalSetStr/; +$external_labels{$key} = "$URL/" . q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/Array:ArbHalo/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/Array:CommNB/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/Array:Halo/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/Array:LocalArray/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/Array:Redist/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/Array:Redist:DefaultMode/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/Array:Redist:TransposeMode/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/Array:ScatterGather/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/Array:ScatterGatherRevisited/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/Array:SparseMatMul/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/Array:fpadding/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/Array:padding/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/Array:rest/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/ArrayRedistStoreNF/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/ArrayRedistStoreNFTP/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/ArrayRedistStoreTK/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/ArrayRedistStoreTKTP/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/ArraySMMStoreNF/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/ArraySMMStoreNFTP/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/ArraySMMStoreTK/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/ArraySMMStoreTKTP/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/Array_from_native_1_to_1/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/Array_native_language_localde/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/Array_regions_and_default_bounds/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/Array_shared_memory_features/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/CplComp:SetServices/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/CplComp:SetServicesShObj/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/DELayout_general_mapping/; +$external_labels{$key} = "$URL/" . q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/DistGrid:ArbitrarySeqInd/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/ESMF_FieldFill/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/Field:rest/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/FieldRedistStoreNF/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/FieldRedistStoreTK/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/Field_shared_memory_features/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/GridComp:SetServices/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/GridComp:SetServicesShObj/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/HConfigMatch/; +$external_labels{$key} = "$URL/" . q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/RH:DynMask/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/RH:RHfromFile/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/RH:RHfromRH/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/RH:Reusability/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/RH:asyncVMEpoch/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/RH:bfb/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/Regrid_Interfaces/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/VM:NBVMEpoch/; +$external_labels{$key} = "$URL/" . q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/XGrid:rest/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/api:ArrayBundleRead/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/api:ArrayBundleWrite/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/api:ArrayRead/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/api:ArrayWrite/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/api:DistGridConnectionGet/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/api:DistGridConnectionSet/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/api:DynamicMaskSetR4R4R4/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/api:DynamicMaskSetR4R4R4V/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/api:DynamicMaskSetR4R8R4/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/api:DynamicMaskSetR4R8R4V/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/api:DynamicMaskSetR8R8R8/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/api:DynamicMaskSetR8R8R8V/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/api:FieldBundleRead/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/api:FieldBundleWrite/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/api:FieldRead/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/api:FieldWrite/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/api:SparseMatrixWrite/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/api:esmf_fieldbundleregridstore/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/api:esmf_fieldregridstorenx/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/api:esmf_fileregrid/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/api:esmf_regridweightgenDG/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/api:esmf_regridweightgenfile/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/appendix_attribute_legacy_api/; +$external_labels{$key} = "$URL/" . q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/appendix_esmf_error_codes/; +$external_labels{$key} = "$URL/" . q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/assignment_equality_copy_compare/; +$external_labels{$key} = "$URL/" . q|node2.html|; +$noresave{$key} = "$nosave"; + +$key = q/cite_BalajiXGrid/; +$external_labels{$key} = "$URL/" . q|node8.html|; +$noresave{$key} = "$nosave"; + +$key = q/cite_ConservativeOrder1/; +$external_labels{$key} = "$URL/" . q|node8.html|; +$noresave{$key} = "$nosave"; + +$key = q/cite_ConservativeOrder2/; +$external_labels{$key} = "$URL/" . q|node8.html|; +$noresave{$key} = "$nosave"; + +$key = q/cite_Fli68/; +$external_labels{$key} = "$URL/" . q|node8.html|; +$noresave{$key} = "$nosave"; + +$key = q/cite_Hat84/; +$external_labels{$key} = "$URL/" . q|node8.html|; +$noresave{$key} = "$nosave"; + +$key = q/cite_ISO/; +$external_labels{$key} = "$URL/" . q|node8.html|; +$noresave{$key} = "$nosave"; + +$key = q/cite_ISOnotes/; +$external_labels{$key} = "$URL/" . q|node8.html|; +$noresave{$key} = "$nosave"; + +$key = q/cite_JDNcalculator/; +$external_labels{$key} = "$URL/" . q|node8.html|; +$noresave{$key} = "$nosave"; + +$key = q/cite_MJD/; +$external_labels{$key} = "$URL/" . q|node8.html|; +$noresave{$key} = "$nosave"; + +$key = q/cite_Meyer1/; +$external_labels{$key} = "$URL/" . q|node8.html|; +$noresave{$key} = "$nosave"; + +$key = q/cite_Meyer2/; +$external_labels{$key} = "$URL/" . q|node8.html|; +$noresave{$key} = "$nosave"; + +$key = q/cite_NetCDF3_UsersGuide_C/; +$external_labels{$key} = "$URL/" . q|node8.html|; +$noresave{$key} = "$nosave"; + +$key = q/cite_NetCDF_CF/; +$external_labels{$key} = "$URL/" . q|node8.html|; +$noresave{$key} = "$nosave"; + +$key = q/cite_PatchInterp1/; +$external_labels{$key} = "$URL/" . q|node8.html|; +$noresave{$key} = "$nosave"; + +$key = q/cite_PatchInterp2/; +$external_labels{$key} = "$URL/" . q|node8.html|; +$noresave{$key} = "$nosave"; + +$key = q/cite_Seidelman/; +$external_labels{$key} = "$URL/" . q|node8.html|; +$noresave{$key} = "$nosave"; + +$key = q/cite_Sierra/; +$external_labels{$key} = "$URL/" . q|node8.html|; +$noresave{$key} = "$nosave"; + +$key = q/cite_Zoltan/; +$external_labels{$key} = "$URL/" . q|node8.html|; +$noresave{$key} = "$nosave"; + +$key = q/cite_json/; +$external_labels{$key} = "$URL/" . q|node8.html|; +$noresave{$key} = "$nosave"; + +$key = q/cite_json_for_modern_cpp/; +$external_labels{$key} = "$URL/" . q|node8.html|; +$noresave{$key} = "$nosave"; + +$key = q/cite_json_for_modern_cpp_64bit_float/; +$external_labels{$key} = "$URL/" . q|node8.html|; +$noresave{$key} = "$nosave"; + +$key = q/cite_json_for_modern_cpp_64bit_int/; +$external_labels{$key} = "$URL/" . q|node8.html|; +$noresave{$key} = "$nosave"; + +$key = q/cite_json_for_modern_cpp_is_structured/; +$external_labels{$key} = "$URL/" . q|node8.html|; +$noresave{$key} = "$nosave"; + +$key = q/cite_json_for_modern_cpp_json_pointer/; +$external_labels{$key} = "$URL/" . q|node8.html|; +$noresave{$key} = "$nosave"; + +$key = q/cite_json_for_modern_cpp_memory_overhead/; +$external_labels{$key} = "$URL/" . q|node8.html|; +$noresave{$key} = "$nosave"; + +$key = q/cite_json_for_modern_cpp_null/; +$external_labels{$key} = "$URL/" . q|node8.html|; +$noresave{$key} = "$nosave"; + +$key = q/cite_json_for_modern_cpp_object/; +$external_labels{$key} = "$URL/" . q|node8.html|; +$noresave{$key} = "$nosave"; + +$key = q/cite_json_for_modern_cpp_typename/; +$external_labels{$key} = "$URL/" . q|node8.html|; +$noresave{$key} = "$nosave"; + +$key = q/cite_json_for_modern_cpp_update/; +$external_labels{$key} = "$URL/" . q|node8.html|; +$noresave{$key} = "$nosave"; + +$key = q/cite_ref:SCRIP/; +$external_labels{$key} = "$URL/" . q|node8.html|; +$noresave{$key} = "$nosave"; + +$key = q/cite_uml/; +$external_labels{$key} = "$URL/" . q|node8.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:alarmlist/; +$external_labels{$key} = "$URL/" . q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:arbdim/; +$external_labels{$key} = "$URL/" . q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:attcopy/; +$external_labels{$key} = "$URL/" . q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:attgetcount/; +$external_labels{$key} = "$URL/" . q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:attnest/; +$external_labels{$key} = "$URL/" . q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:attreconcile/; +$external_labels{$key} = "$URL/" . q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:attwrite/; +$external_labels{$key} = "$URL/" . q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:calkindflag/; +$external_labels{$key} = "$URL/" . q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:comptype/; +$external_labels{$key} = "$URL/" . q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:contextflag/; +$external_labels{$key} = "$URL/" . q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:coordkeyname/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:coordsys/; +$external_labels{$key} = "$URL/" . q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:cubedspherecalcflag/; +$external_labels{$key} = "$URL/" . q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:datacopyflag/; +$external_labels{$key} = "$URL/" . q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:decompflag/; +$external_labels{$key} = "$URL/" . q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:direction/; +$external_labels{$key} = "$URL/" . q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:distgridmatch/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:endflag/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:fieldstatus/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:fileformatflag/; +$external_labels{$key} = "$URL/" . q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:filemodeflag/; +$external_labels{$key} = "$URL/" . q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:filestatusflag/; +$external_labels{$key} = "$URL/" . q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:geomtype/; +$external_labels{$key} = "$URL/" . q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:gridconn/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:griditem/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:gridmatch/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:gridstatus/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:hconfigmatch/; +$external_labels{$key} = "$URL/" . q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:indexflag/; +$external_labels{$key} = "$URL/" . q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:ionetcdfflag/; +$external_labels{$key} = "$URL/" . q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:iopioflag/; +$external_labels{$key} = "$URL/" . q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:iopnetcdfflag/; +$external_labels{$key} = "$URL/" . q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:itemorderflag/; +$external_labels{$key} = "$URL/" . q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:kind/; +$external_labels{$key} = "$URL/" . q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:logerr/; +$external_labels{$key} = "$URL/" . q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:logkindflag/; +$external_labels{$key} = "$URL/" . q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:logmsgflag/; +$external_labels{$key} = "$URL/" . q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:maskkeyname/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:master/; +$external_labels{$key} = "$URL/" . q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:meshelemtype/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:meshloc/; +$external_labels{$key} = "$URL/" . q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:meshop/; +$external_labels{$key} = "$URL/" . q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:meshstatus/; +$external_labels{$key} = "$URL/" . q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:method/; +$external_labels{$key} = "$URL/" . q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:pin_flag/; +$external_labels{$key} = "$URL/" . q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:polekind/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:polemethod/; +$external_labels{$key} = "$URL/" . q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:reduce/; +$external_labels{$key} = "$URL/" . q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:region/; +$external_labels{$key} = "$URL/" . q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:routesync/; +$external_labels{$key} = "$URL/" . q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:servicereply_flag/; +$external_labels{$key} = "$URL/" . q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:staggerloc/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:startregion/; +$external_labels{$key} = "$URL/" . q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:stateintent/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:stateitem/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:sync/; +$external_labels{$key} = "$URL/" . q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:termorderflag/; +$external_labels{$key} = "$URL/" . q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:typekind/; +$external_labels{$key} = "$URL/" . q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:unmappedaction/; +$external_labels{$key} = "$URL/" . q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:version/; +$external_labels{$key} = "$URL/" . q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:vmepoch_flag/; +$external_labels{$key} = "$URL/" . q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/const:xgridside/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/eqn:dg_forward_connect_form/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/eqn:dg_forward_connect_pivot/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/eqn:dg_forward_connect_pivot_trans/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/eqn:dg_forward_connect_pivot_trans_pv/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/eqn:dg_forward_pvec/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/esmf_info_class/; +$external_labels{$key} = "$URL/" . q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/esmf_infobroadcast/; +$external_labels{$key} = "$URL/" . q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/esmf_infosync/; +$external_labels{$key} = "$URL/" . q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/esmfstateremovelist/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/ex:TraceEx/; +$external_labels{$key} = "$URL/" . q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/ex:TraceUserEx/; +$external_labels{$key} = "$URL/" . q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/example:2DIrregCurviGrid/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/example:2DIrregUniGrid/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/example:2DPeriRegUniGrid/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/example:2DRegUniGrid/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/example:ArbGridWithUndistDim/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/example:CurviGridWithUndistDim/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:GEOS5/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:GridDecomps/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:LogRectGrids/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:TheESMFwich/; +$external_labels{$key} = "$URL/" . q|node2.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:appunit/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:concurrent/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:dgconnect_1tile_not_connected/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:dgconnect_1tile_peribipole_connected/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:dgconnect_1tile_periodic1_connected/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:dgconnect_1tile_periodic2_connected/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:dgconnect_1tile_peripole_connected/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:dgconnect_2tiles_connected/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:dgconnect_2tiles_not_connected/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:dgconnect_cusph_12connected/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:dgconnect_cusph_2rotconnected/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:dgconnect_cusph_5connected/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:dgconnect_cusph_6connected/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:dgconnect_cusph_not_connected/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:excl_destination/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:excl_destination_cpl/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:excl_source/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:excl_source_cpl/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:fieldparameter/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:gridcellsandcorners/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:gridcuststaggerloc/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:gridexreg/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:gridfileformatfeatures/; +$external_labels{$key} = "$URL/" . q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:gridstaggerloc2d/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:gridstaggerloc3d/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:reconcile/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:serial/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:webservices_fig/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:xgridsimple/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/fio:unitnumbers/; +$external_labels{$key} = "$URL/" . q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/get_info_handle_from_esmf_object/; +$external_labels{$key} = "$URL/" . q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/gridspecexample/; +$external_labels{$key} = "$URL/" . q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/info_key_format/; +$external_labels{$key} = "$URL/" . q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/info_tutorial/; +$external_labels{$key} = "$URL/" . q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/io:dataio/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/line_type_support/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/locstream:createfromfile/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/log_class/; +$external_labels{$key} = "$URL/" . q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/opt:extrapmethod/; +$external_labels{$key} = "$URL/" . q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/opt:iofmtflag/; +$external_labels{$key} = "$URL/" . q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/opt:lineType/; +$external_labels{$key} = "$URL/" . q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/opt:normType/; +$external_labels{$key} = "$URL/" . q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/opt:regridmethod/; +$external_labels{$key} = "$URL/" . q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/opt:regridstatus/; +$external_labels{$key} = "$URL/" . q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/part:CLTs/; +$external_labels{$key} = "$URL/" . q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/part:ESMFOverview/; +$external_labels{$key} = "$URL/" . q|node2.html|; +$noresave{$key} = "$nosave"; + +$key = q/part:Superstructure/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/ref:distgridconnection/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/ref:distgridregdecomp/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/ref:dynamicmask/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/ref:stagsub/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/regrid:masking/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/regridoutput/; +$external_labels{$key} = "$URL/" . q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec::vectorRegrid/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:Alarm/; +$external_labels{$key} = "$URL/" . q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:AppDriverIntProc/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:AppDriverSetVM/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:BasicProfiling/; +$external_labels{$key} = "$URL/" . q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:Calendar/; +$external_labels{$key} = "$URL/" . q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:Clock/; +$external_labels{$key} = "$URL/" . q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:CompTunnel/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:CompTunnelActualCreate/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:CompTunnelActualDestroy/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:CompTunnelActualSide/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:CompTunnelDualCreate/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:CompTunnelDualDestroy/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:CompTunnelDualSide/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:CompTunnelInvoking/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:CompTunnelInvokingNonblocking/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:Config/; +$external_labels{$key} = "$URL/" . q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:CplComp/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:CplFinalize/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:CplInitialize/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:CplRun/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:CplSetServ/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:CplSetVM/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:DistGrid/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:ESMF_PrintInfo/; +$external_labels{$key} = "$URL/" . q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:ESMF_Regrid/; +$external_labels{$key} = "$URL/" . q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:ESMF_RegridWeightGen/; +$external_labels{$key} = "$URL/" . q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:ESMF_Scrip2Unstruct/; +$external_labels{$key} = "$URL/" . q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:GridComp/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:GridFinalize/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:GridInitialize/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:GridRun/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:GridSetServ/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:GridSetVM/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:HConfig/; +$external_labels{$key} = "$URL/" . q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:IOUtil/; +$external_labels{$key} = "$URL/" . q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:LimitProfiling/; +$external_labels{$key} = "$URL/" . q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:Log/; +$external_labels{$key} = "$URL/" . q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:MPIProfiling/; +$external_labels{$key} = "$URL/" . q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:Profiling/; +$external_labels{$key} = "$URL/" . q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:RHandle/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:SciComp/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:ShapeShortcut/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:State/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:Submission/; +$external_labels{$key} = "$URL/" . q|node2.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:SummaryProfiling/; +$external_labels{$key} = "$URL/" . q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:Support/; +$external_labels{$key} = "$URL/" . q|node2.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:Time/; +$external_labels{$key} = "$URL/" . q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:TimeInterval/; +$external_labels{$key} = "$URL/" . q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:Tracing/; +$external_labels{$key} = "$URL/" . q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:TracingClocks/; +$external_labels{$key} = "$URL/" . q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:aliases/; +$external_labels{$key} = "$URL/" . q|node2.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:array:usage:replicated_dims/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:array:usage:undistributed_dims/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:bundlerest/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:component:usage:scicomp/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:concurrency/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:conventions/; +$external_labels{$key} = "$URL/" . q|node2.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:coordspec/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:deepshallow/; +$external_labels{$key} = "$URL/" . q|node2.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:desc:dist/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:example:2DLogRecFromScrip/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:example:MeshCubedSphere/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:example:UnstructFromFile/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:extrapolation:creep/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:extrapolation:nearestidavg/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:extrapolation:neareststod/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:extrapolation:overview/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:field:usage:createArbGrid/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:field:usage:createArbGridRep/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:field:usage:createMeshArrayspecOpt/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:field:usage:create_2darray/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:field:usage:create_2dgrid_3dptr/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:field:usage:create_2dgrid_3dptr_map/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:field:usage:create_2dgrid_3dptr_map_halo/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:field:usage:create_2dptr/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:field:usage:create_5dgrid_7dptr_2dungridded/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:field:usage:create_empty/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:field:usage:create_grid_array/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:field:usage:create_grid_arrayspec/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:field:usage:create_grid_tkr/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:field:usage:create_locs_arrayspec/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:field:usage:create_locs_tkr/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:field:usage:create_mesh_array/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:field:usage:create_mesh_arrayspec/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:field:usage:create_mesh_tkr/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:field:usage:create_repdim/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:field:usage:field_get_dataptr/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:field:usage:field_get_default/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:field:usage:gather_2dptr/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:field:usage:halo/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:field:usage:partial_creation/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:field:usage:redist_1dptr/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:field:usage:redist_gathering/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:field:usage:redist_scattering/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:field:usage:scatter_2dptr/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:field:usage:smm_1dptr/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:fieldbundle:usage:create_empty/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:fieldbundle:usage:create_emptylist/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:fieldbundle:usage:create_list/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:fieldbundle:usage:get/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:fieldbundle:usage:getlist/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:fieldbundle:usage:halo/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:fieldbundle:usage:packedFBGrid/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:fieldbundle:usage:packedFBMesh/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:fieldbundle:usage:redist_1dptr/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:fieldbundle:usage:redist_packed/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:fieldbundle:usage:smm_1dptr/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:fieldregrid/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:filebasedregrid/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:fileformat:esmf/; +$external_labels{$key} = "$URL/" . q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:fileformat:gridspec/; +$external_labels{$key} = "$URL/" . q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:fileformat:mosaic/; +$external_labels{$key} = "$URL/" . q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:fileformat:scrip/; +$external_labels{$key} = "$URL/" . q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:fileformat:ugrid/; +$external_labels{$key} = "$URL/" . q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:fileregridusage/; +$external_labels{$key} = "$URL/" . q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:grid:usage:bounds/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:hierarchy/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:interpolation:bilinear/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:interpolation:conservation/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:interpolation:conservative_norm_opts/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:interpolation:conserve/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:interpolation:conserve_2ndorder/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:interpolation:great_circle_cells/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:interpolation:nearestdtos/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:interpolation:neareststod/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:interpolation:patch/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:localcomm/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:mesh:1pet1step/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:mesh:1pet3step/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:mesh:4pet1step/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:mesh:4pet1stepee/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:mesh:4pet1stepee1type/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:mesh:api:meshaddelements/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:mesh:api:meshaddnodes/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:mesh:api:meshcreate/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:mesh:halo/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:mesh:mask/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:mesh:usage:meshCreation/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:meshrep/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:overallimpl/; +$external_labels{$key} = "$URL/" . q|node2.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:overallrest/; +$external_labels{$key} = "$URL/" . q|node2.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:performance/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:regrid/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:regridusage/; +$external_labels{$key} = "$URL/" . q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:regridweightgencheck/; +$external_labels{$key} = "$URL/" . q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:rwg:conservation/; +$external_labels{$key} = "$URL/" . q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:rwg:conservative_norm_opts/; +$external_labels{$key} = "$URL/" . q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:rwg_bilinear/; +$external_labels{$key} = "$URL/" . q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:rwg_conserve/; +$external_labels{$key} = "$URL/" . q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:rwg_conserve2d/; +$external_labels{$key} = "$URL/" . q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:rwg_extrap/; +$external_labels{$key} = "$URL/" . q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:rwg_linetype/; +$external_labels{$key} = "$URL/" . q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:rwg_masking/; +$external_labels{$key} = "$URL/" . q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:rwg_nearest/; +$external_labels{$key} = "$URL/" . q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:rwg_options/; +$external_labels{$key} = "$URL/" . q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:rwg_patch/; +$external_labels{$key} = "$URL/" . q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:rwg_poles/; +$external_labels{$key} = "$URL/" . q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:rwg_regridmethods/; +$external_labels{$key} = "$URL/" . q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:rwg_unmapped/; +$external_labels{$key} = "$URL/" . q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:scoping/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:spatialclasses/; +$external_labels{$key} = "$URL/" . q|node2.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:usage:adv:create/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:usage:coords:accessing/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:usage:cubedsphere/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:usage:cubedspherefromfile/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:usage:cubedspherewttransform/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:usage:items/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:usage:items:accessing/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:usage:setcommit/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:usage:staggerloc/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:usage:staggerloc:adv/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:usage:staggerpadding:adv/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:weightfileformat/; +$external_labels{$key} = "$URL/" . q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:xgrid:desc/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:xgrid:usage:xgrid_create/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:xgrid:usage:xgrid_create_masking/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:xgrid:usage:xgrid_createfromsparsemat/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:xgrid:usage:xgrid_destroy/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:xgrid:usage:xgrid_get/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/subsec:Calendar_options/; +$external_labels{$key} = "$URL/" . q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/subsec:Calendar_rest/; +$external_labels{$key} = "$URL/" . q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/subsec:Time_Instants_and_TimeIntervals/; +$external_labels{$key} = "$URL/" . q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/tab:dg_ops/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/table:timeOpts/; +$external_labels{$key} = "$URL/" . q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/ugridexample/; +$external_labels{$key} = "$URL/" . q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/vm_higherrank/; +$external_labels{$key} = "$URL/" . q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/vm_inside_user_mpi/; +$external_labels{$key} = "$URL/" . q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/vm_multi_instance_esmf/; +$external_labels{$key} = "$URL/" . q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/vm_nesting_esmf/; +$external_labels{$key} = "$URL/" . q|node6.html|; +$noresave{$key} = "$nosave"; + +1; + + +# LaTeX2HTML 2018 (Released Feb 1, 2018) +# labels from external_latex_labels array. + + +$key = q/API:GridCreateFrmNCFile/; +$external_latex_labels{$key} = q|31.6.13|; +$noresave{$key} = "$nosave"; + +$key = q/API:GridCreateMosaicReg/; +$external_latex_labels{$key} = q|31.6.28|; +$noresave{$key} = "$nosave"; + +$key = q/API:GridGet/; +$external_latex_labels{$key} = q|31.6.35|; +$noresave{$key} = "$nosave"; + +$key = q/API:GridGetCoord/; +$external_latex_labels{$key} = q|31.6.40|; +$noresave{$key} = "$nosave"; + +$key = q/API:GridGetCoordInfo/; +$external_latex_labels{$key} = q|31.6.44|; +$noresave{$key} = "$nosave"; + +$key = q/API:GridGetCoordIntoArray/; +$external_latex_labels{$key} = q|31.6.41|; +$noresave{$key} = "$nosave"; + +$key = q/API:GridGetCoordR4/; +$external_latex_labels{$key} = q|31.6.42|; +$noresave{$key} = "$nosave"; + +$key = q/API:GridGetCoordR8/; +$external_latex_labels{$key} = q|31.6.43|; +$noresave{$key} = "$nosave"; + +$key = q/API:GridGetItem/; +$external_latex_labels{$key} = q|31.6.46|; +$noresave{$key} = "$nosave"; + +$key = q/API:GridGetItemInfo/; +$external_latex_labels{$key} = q|31.6.48|; +$noresave{$key} = "$nosave"; + +$key = q/API:GridGetItemIntoArray/; +$external_latex_labels{$key} = q|31.6.47|; +$noresave{$key} = "$nosave"; + +$key = q/API:GridGetPLocalDe/; +$external_latex_labels{$key} = q|31.6.36|; +$noresave{$key} = "$nosave"; + +$key = q/API:GridGetPLocalDePSloc/; +$external_latex_labels{$key} = q|31.6.37|; +$noresave{$key} = "$nosave"; + +$key = q/API:GridGetPSloc/; +$external_latex_labels{$key} = q|31.6.38|; +$noresave{$key} = "$nosave"; + +$key = q/API:GridGetPSlocPTile/; +$external_latex_labels{$key} = q|31.6.39|; +$noresave{$key} = "$nosave"; + +$key = q/API:MeshCreateFromFile/; +$external_latex_labels{$key} = q|33.4.8|; +$noresave{$key} = "$nosave"; + +$key = q/API:TimeIntervalSetStr/; +$external_latex_labels{$key} = q|44.4.26|; +$noresave{$key} = "$nosave"; + +$key = q/Array:ArbHalo/; +$external_latex_labels{$key} = q|28.2.16|; +$noresave{$key} = "$nosave"; + +$key = q/Array:CommNB/; +$external_latex_labels{$key} = q|28.2.20|; +$noresave{$key} = "$nosave"; + +$key = q/Array:Halo/; +$external_latex_labels{$key} = q|28.2.15|; +$noresave{$key} = "$nosave"; + +$key = q/Array:LocalArray/; +$external_latex_labels{$key} = q|28.2.3|; +$noresave{$key} = "$nosave"; + +$key = q/Array:Redist/; +$external_latex_labels{$key} = q|28.2.17|; +$noresave{$key} = "$nosave"; + +$key = q/Array:Redist:DefaultMode/; +$external_latex_labels{$key} = q|28.2.17|; +$noresave{$key} = "$nosave"; + +$key = q/Array:Redist:TransposeMode/; +$external_latex_labels{$key} = q|28.2.17|; +$noresave{$key} = "$nosave"; + +$key = q/Array:ScatterGather/; +$external_latex_labels{$key} = q|28.2.14|; +$noresave{$key} = "$nosave"; + +$key = q/Array:ScatterGatherRevisited/; +$external_latex_labels{$key} = q|28.2.19|; +$noresave{$key} = "$nosave"; + +$key = q/Array:SparseMatMul/; +$external_latex_labels{$key} = q|28.2.18|; +$noresave{$key} = "$nosave"; + +$key = q/Array:fpadding/; +$external_latex_labels{$key} = q|28.2.2|; +$noresave{$key} = "$nosave"; + +$key = q/Array:padding/; +$external_latex_labels{$key} = q|28.2.8|; +$noresave{$key} = "$nosave"; + +$key = q/Array:rest/; +$external_latex_labels{$key} = q|28.3|; +$noresave{$key} = "$nosave"; + +$key = q/ArrayRedistStoreNF/; +$external_latex_labels{$key} = q|28.5.33|; +$noresave{$key} = "$nosave"; + +$key = q/ArrayRedistStoreNFTP/; +$external_latex_labels{$key} = q|28.5.34|; +$noresave{$key} = "$nosave"; + +$key = q/ArrayRedistStoreTK/; +$external_latex_labels{$key} = q|28.5.31|; +$noresave{$key} = "$nosave"; + +$key = q/ArrayRedistStoreTKTP/; +$external_latex_labels{$key} = q|28.5.32|; +$noresave{$key} = "$nosave"; + +$key = q/ArraySMMStoreNF/; +$external_latex_labels{$key} = q|28.5.42|; +$noresave{$key} = "$nosave"; + +$key = q/ArraySMMStoreNFTP/; +$external_latex_labels{$key} = q|28.5.43|; +$noresave{$key} = "$nosave"; + +$key = q/ArraySMMStoreTK/; +$external_latex_labels{$key} = q|28.5.40|; +$noresave{$key} = "$nosave"; + +$key = q/ArraySMMStoreTKTP/; +$external_latex_labels{$key} = q|28.5.41|; +$noresave{$key} = "$nosave"; + +$key = q/Array_from_native_1_to_1/; +$external_latex_labels{$key} = q|28.2.1|; +$noresave{$key} = "$nosave"; + +$key = q/Array_native_language_localde/; +$external_latex_labels{$key} = q|28.2.5|; +$noresave{$key} = "$nosave"; + +$key = q/Array_regions_and_default_bounds/; +$external_latex_labels{$key} = q|28.2.6|; +$noresave{$key} = "$nosave"; + +$key = q/Array_shared_memory_features/; +$external_latex_labels{$key} = q|28.2.13|; +$noresave{$key} = "$nosave"; + +$key = q/CplComp:SetServices/; +$external_latex_labels{$key} = q|18.4.19|; +$noresave{$key} = "$nosave"; + +$key = q/CplComp:SetServicesShObj/; +$external_latex_labels{$key} = q|18.4.20|; +$noresave{$key} = "$nosave"; + +$key = q/DELayout_general_mapping/; +$external_latex_labels{$key} = q|50.3.7|; +$noresave{$key} = "$nosave"; + +$key = q/DistGrid:ArbitrarySeqInd/; +$external_latex_labels{$key} = q|36.3.5|; +$noresave{$key} = "$nosave"; + +$key = q/ESMF_FieldFill/; +$external_latex_labels{$key} = q|26.6.52|; +$noresave{$key} = "$nosave"; + +$key = q/Field:rest/; +$external_latex_labels{$key} = q|26.4|; +$noresave{$key} = "$nosave"; + +$key = q/FieldRedistStoreNF/; +$external_latex_labels{$key} = q|26.6.67|; +$noresave{$key} = "$nosave"; + +$key = q/FieldRedistStoreTK/; +$external_latex_labels{$key} = q|26.6.66|; +$noresave{$key} = "$nosave"; + +$key = q/Field_shared_memory_features/; +$external_latex_labels{$key} = q|26.3.10|; +$noresave{$key} = "$nosave"; + +$key = q/GridComp:SetServices/; +$external_latex_labels{$key} = q|17.4.19|; +$noresave{$key} = "$nosave"; + +$key = q/GridComp:SetServicesShObj/; +$external_latex_labels{$key} = q|17.4.20|; +$noresave{$key} = "$nosave"; + +$key = q/HConfigMatch/; +$external_latex_labels{$key} = q|48.6.44|; +$noresave{$key} = "$nosave"; + +$key = q/RH:DynMask/; +$external_latex_labels{$key} = q|37.2.6|; +$noresave{$key} = "$nosave"; + +$key = q/RH:RHfromFile/; +$external_latex_labels{$key} = q|37.2.4|; +$noresave{$key} = "$nosave"; + +$key = q/RH:RHfromRH/; +$external_latex_labels{$key} = q|37.2.3|; +$noresave{$key} = "$nosave"; + +$key = q/RH:Reusability/; +$external_latex_labels{$key} = q|37.2.5|; +$noresave{$key} = "$nosave"; + +$key = q/RH:asyncVMEpoch/; +$external_latex_labels{$key} = q|37.2.2|; +$noresave{$key} = "$nosave"; + +$key = q/RH:bfb/; +$external_latex_labels{$key} = q|37.2.1|; +$noresave{$key} = "$nosave"; + +$key = q/Regrid_Interfaces/; +$external_latex_labels{$key} = q|24.2|; +$noresave{$key} = "$nosave"; + +$key = q/VM:NBVMEpoch/; +$external_latex_labels{$key} = q|51.3.11|; +$noresave{$key} = "$nosave"; + +$key = q/XGrid:rest/; +$external_latex_labels{$key} = q|34.4.1|; +$noresave{$key} = "$nosave"; + +$key = q/_/; +$external_latex_labels{$key} = q|<|; +$noresave{$key} = "$nosave"; + +$key = q/api:ArrayBundleRead/; +$external_latex_labels{$key} = q|27.5.17|; +$noresave{$key} = "$nosave"; + +$key = q/api:ArrayBundleWrite/; +$external_latex_labels{$key} = q|27.5.28|; +$noresave{$key} = "$nosave"; + +$key = q/api:ArrayRead/; +$external_latex_labels{$key} = q|28.5.28|; +$noresave{$key} = "$nosave"; + +$key = q/api:ArrayWrite/; +$external_latex_labels{$key} = q|28.5.48|; +$noresave{$key} = "$nosave"; + +$key = q/api:DistGridConnectionGet/; +$external_latex_labels{$key} = q|36.7.1|; +$noresave{$key} = "$nosave"; + +$key = q/api:DistGridConnectionSet/; +$external_latex_labels{$key} = q|36.7.2|; +$noresave{$key} = "$nosave"; + +$key = q/api:DynamicMaskSetR4R4R4/; +$external_latex_labels{$key} = q|28.6.5|; +$noresave{$key} = "$nosave"; + +$key = q/api:DynamicMaskSetR4R4R4V/; +$external_latex_labels{$key} = q|28.6.6|; +$noresave{$key} = "$nosave"; + +$key = q/api:DynamicMaskSetR4R8R4/; +$external_latex_labels{$key} = q|28.6.3|; +$noresave{$key} = "$nosave"; + +$key = q/api:DynamicMaskSetR4R8R4V/; +$external_latex_labels{$key} = q|28.6.4|; +$noresave{$key} = "$nosave"; + +$key = q/api:DynamicMaskSetR8R8R8/; +$external_latex_labels{$key} = q|28.6.1|; +$noresave{$key} = "$nosave"; + +$key = q/api:DynamicMaskSetR8R8R8V/; +$external_latex_labels{$key} = q|28.6.2|; +$noresave{$key} = "$nosave"; + +$key = q/api:FieldBundleRead/; +$external_latex_labels{$key} = q|25.5.19|; +$noresave{$key} = "$nosave"; + +$key = q/api:FieldBundleWrite/; +$external_latex_labels{$key} = q|25.5.39|; +$noresave{$key} = "$nosave"; + +$key = q/api:FieldRead/; +$external_latex_labels{$key} = q|26.6.63|; +$noresave{$key} = "$nosave"; + +$key = q/api:FieldWrite/; +$external_latex_labels{$key} = q|26.6.85|; +$noresave{$key} = "$nosave"; + +$key = q/api:SparseMatrixWrite/; +$external_latex_labels{$key} = q|28.5.49|; +$noresave{$key} = "$nosave"; + +$key = q/api:esmf_fieldbundleregridstore/; +$external_latex_labels{$key} = q|25.5.26|; +$noresave{$key} = "$nosave"; + +$key = q/api:esmf_fieldregridstorenx/; +$external_latex_labels{$key} = q|26.6.70|; +$noresave{$key} = "$nosave"; + +$key = q/api:esmf_fileregrid/; +$external_latex_labels{$key} = q|24.3.3|; +$noresave{$key} = "$nosave"; + +$key = q/api:esmf_regridweightgenDG/; +$external_latex_labels{$key} = q|24.3.2|; +$noresave{$key} = "$nosave"; + +$key = q/api:esmf_regridweightgenfile/; +$external_latex_labels{$key} = q|24.3.1|; +$noresave{$key} = "$nosave"; + +$key = q/appendix_attribute_legacy_api/; +$external_latex_labels{$key} = q|57|; +$noresave{$key} = "$nosave"; + +$key = q/appendix_esmf_error_codes/; +$external_latex_labels{$key} = q|56|; +$noresave{$key} = "$nosave"; + +$key = q/assignment_equality_copy_compare/; +$external_latex_labels{$key} = q|8.4|; +$noresave{$key} = "$nosave"; + +$key = q/const:alarmlist/; +$external_latex_labels{$key} = q|46.2.1|; +$noresave{$key} = "$nosave"; + +$key = q/const:arbdim/; +$external_latex_labels{$key} = q|54.2|; +$noresave{$key} = "$nosave"; + +$key = q/const:attcopy/; +$external_latex_labels{$key} = q|57.1.1|; +$noresave{$key} = "$nosave"; + +$key = q/const:attgetcount/; +$external_latex_labels{$key} = q|57.1.2|; +$noresave{$key} = "$nosave"; + +$key = q/const:attnest/; +$external_latex_labels{$key} = q|54.5|; +$noresave{$key} = "$nosave"; + +$key = q/const:attreconcile/; +$external_latex_labels{$key} = q|54.6|; +$noresave{$key} = "$nosave"; + +$key = q/const:attwrite/; +$external_latex_labels{$key} = q|57.1.3|; +$noresave{$key} = "$nosave"; + +$key = q/const:calkindflag/; +$external_latex_labels{$key} = q|42.2.1|; +$noresave{$key} = "$nosave"; + +$key = q/const:comptype/; +$external_latex_labels{$key} = q|54.9|; +$noresave{$key} = "$nosave"; + +$key = q/const:contextflag/; +$external_latex_labels{$key} = q|54.10|; +$noresave{$key} = "$nosave"; + +$key = q/const:coordkeyname/; +$external_latex_labels{$key} = q|32.2.1|; +$noresave{$key} = "$nosave"; + +$key = q/const:coordsys/; +$external_latex_labels{$key} = q|54.11|; +$noresave{$key} = "$nosave"; + +$key = q/const:cubedspherecalcflag/; +$external_latex_labels{$key} = q|54.12|; +$noresave{$key} = "$nosave"; + +$key = q/const:datacopyflag/; +$external_latex_labels{$key} = q|54.13|; +$noresave{$key} = "$nosave"; + +$key = q/const:decompflag/; +$external_latex_labels{$key} = q|54.14|; +$noresave{$key} = "$nosave"; + +$key = q/const:direction/; +$external_latex_labels{$key} = q|45.2.1|; +$noresave{$key} = "$nosave"; + +$key = q/const:distgridmatch/; +$external_latex_labels{$key} = q|36.2.1|; +$noresave{$key} = "$nosave"; + +$key = q/const:endflag/; +$external_latex_labels{$key} = q|16.2.1|; +$noresave{$key} = "$nosave"; + +$key = q/const:fieldstatus/; +$external_latex_labels{$key} = q|26.2.1|; +$noresave{$key} = "$nosave"; + +$key = q/const:fileformatflag/; +$external_latex_labels{$key} = q|54.20|; +$noresave{$key} = "$nosave"; + +$key = q/const:filemodeflag/; +$external_latex_labels{$key} = q|54.21|; +$noresave{$key} = "$nosave"; + +$key = q/const:filestatusflag/; +$external_latex_labels{$key} = q|54.22|; +$noresave{$key} = "$nosave"; + +$key = q/const:geomtype/; +$external_latex_labels{$key} = q|54.23|; +$noresave{$key} = "$nosave"; + +$key = q/const:gridconn/; +$external_latex_labels{$key} = q|31.2.1|; +$noresave{$key} = "$nosave"; + +$key = q/const:griditem/; +$external_latex_labels{$key} = q|31.2.2|; +$noresave{$key} = "$nosave"; + +$key = q/const:gridmatch/; +$external_latex_labels{$key} = q|31.2.3|; +$noresave{$key} = "$nosave"; + +$key = q/const:gridstatus/; +$external_latex_labels{$key} = q|31.2.4|; +$noresave{$key} = "$nosave"; + +$key = q/const:hconfigmatch/; +$external_latex_labels{$key} = q|48.2.1|; +$noresave{$key} = "$nosave"; + +$key = q/const:indexflag/; +$external_latex_labels{$key} = q|54.29|; +$noresave{$key} = "$nosave"; + +$key = q/const:ionetcdfflag/; +$external_latex_labels{$key} = q|54.31|; +$noresave{$key} = "$nosave"; + +$key = q/const:iopioflag/; +$external_latex_labels{$key} = q|54.32|; +$noresave{$key} = "$nosave"; + +$key = q/const:iopnetcdfflag/; +$external_latex_labels{$key} = q|54.33|; +$noresave{$key} = "$nosave"; + +$key = q/const:itemorderflag/; +$external_latex_labels{$key} = q|54.34|; +$noresave{$key} = "$nosave"; + +$key = q/const:kind/; +$external_latex_labels{$key} = q|54.35|; +$noresave{$key} = "$nosave"; + +$key = q/const:logerr/; +$external_latex_labels{$key} = q|49.2.1|; +$noresave{$key} = "$nosave"; + +$key = q/const:logkindflag/; +$external_latex_labels{$key} = q|49.2.2|; +$noresave{$key} = "$nosave"; + +$key = q/const:logmsgflag/; +$external_latex_labels{$key} = q|49.2.3|; +$noresave{$key} = "$nosave"; + +$key = q/const:maskkeyname/; +$external_latex_labels{$key} = q|32.2.2|; +$noresave{$key} = "$nosave"; + +$key = q/const:master/; +$external_latex_labels{$key} = q|54|; +$noresave{$key} = "$nosave"; + +$key = q/const:meshelemtype/; +$external_latex_labels{$key} = q|33.2.1|; +$noresave{$key} = "$nosave"; + +$key = q/const:meshloc/; +$external_latex_labels{$key} = q|54.41|; +$noresave{$key} = "$nosave"; + +$key = q/const:meshop/; +$external_latex_labels{$key} = q|54.42|; +$noresave{$key} = "$nosave"; + +$key = q/const:meshstatus/; +$external_latex_labels{$key} = q|54.43|; +$noresave{$key} = "$nosave"; + +$key = q/const:method/; +$external_latex_labels{$key} = q|54.44|; +$noresave{$key} = "$nosave"; + +$key = q/const:pin_flag/; +$external_latex_labels{$key} = q|50.2.1|; +$noresave{$key} = "$nosave"; + +$key = q/const:polekind/; +$external_latex_labels{$key} = q|31.2.5|; +$noresave{$key} = "$nosave"; + +$key = q/const:polemethod/; +$external_latex_labels{$key} = q|54.48|; +$noresave{$key} = "$nosave"; + +$key = q/const:reduce/; +$external_latex_labels{$key} = q|54.49|; +$noresave{$key} = "$nosave"; + +$key = q/const:region/; +$external_latex_labels{$key} = q|54.50|; +$noresave{$key} = "$nosave"; + +$key = q/const:routesync/; +$external_latex_labels{$key} = q|54.53|; +$noresave{$key} = "$nosave"; + +$key = q/const:servicereply_flag/; +$external_latex_labels{$key} = q|50.2.2|; +$noresave{$key} = "$nosave"; + +$key = q/const:staggerloc/; +$external_latex_labels{$key} = q|31.2.6|; +$noresave{$key} = "$nosave"; + +$key = q/const:startregion/; +$external_latex_labels{$key} = q|54.56|; +$noresave{$key} = "$nosave"; + +$key = q/const:stateintent/; +$external_latex_labels{$key} = q|21.2.1|; +$noresave{$key} = "$nosave"; + +$key = q/const:stateitem/; +$external_latex_labels{$key} = q|21.2.2|; +$noresave{$key} = "$nosave"; + +$key = q/const:sync/; +$external_latex_labels{$key} = q|54.59|; +$noresave{$key} = "$nosave"; + +$key = q/const:termorderflag/; +$external_latex_labels{$key} = q|54.60|; +$noresave{$key} = "$nosave"; + +$key = q/const:typekind/; +$external_latex_labels{$key} = q|54.61|; +$noresave{$key} = "$nosave"; + +$key = q/const:unmappedaction/; +$external_latex_labels{$key} = q|54.62|; +$noresave{$key} = "$nosave"; + +$key = q/const:version/; +$external_latex_labels{$key} = q|54.63|; +$noresave{$key} = "$nosave"; + +$key = q/const:vmepoch_flag/; +$external_latex_labels{$key} = q|51.2.1|; +$noresave{$key} = "$nosave"; + +$key = q/const:xgridside/; +$external_latex_labels{$key} = q|34.2.1|; +$noresave{$key} = "$nosave"; + +$key = q/eqn:dg_forward_connect_form/; +$external_latex_labels{$key} = q|4|; +$noresave{$key} = "$nosave"; + +$key = q/eqn:dg_forward_connect_pivot/; +$external_latex_labels{$key} = q|6|; +$noresave{$key} = "$nosave"; + +$key = q/eqn:dg_forward_connect_pivot_trans/; +$external_latex_labels{$key} = q|8|; +$noresave{$key} = "$nosave"; + +$key = q/eqn:dg_forward_connect_pivot_trans_pv/; +$external_latex_labels{$key} = q|9|; +$noresave{$key} = "$nosave"; + +$key = q/eqn:dg_forward_pvec/; +$external_latex_labels{$key} = q|13|; +$noresave{$key} = "$nosave"; + +$key = q/esmf_info_class/; +$external_latex_labels{$key} = q|40|; +$noresave{$key} = "$nosave"; + +$key = q/esmf_infobroadcast/; +$external_latex_labels{$key} = q|40.4.4|; +$noresave{$key} = "$nosave"; + +$key = q/esmf_infosync/; +$external_latex_labels{$key} = q|40.4.29|; +$noresave{$key} = "$nosave"; + +$key = q/esmfstateremovelist/; +$external_latex_labels{$key} = q|21.7.16|; +$noresave{$key} = "$nosave"; + +$key = q/ex:TraceEx/; +$external_latex_labels{$key} = q|52.2.7|; +$noresave{$key} = "$nosave"; + +$key = q/ex:TraceUserEx/; +$external_latex_labels{$key} = q|52.2.8|; +$noresave{$key} = "$nosave"; + +$key = q/example:2DIrregCurviGrid/; +$external_latex_labels{$key} = q|31.3.5|; +$noresave{$key} = "$nosave"; + +$key = q/example:2DIrregUniGrid/; +$external_latex_labels{$key} = q|31.3.4|; +$noresave{$key} = "$nosave"; + +$key = q/example:2DPeriRegUniGrid/; +$external_latex_labels{$key} = q|31.3.3|; +$noresave{$key} = "$nosave"; + +$key = q/example:2DRegUniGrid/; +$external_latex_labels{$key} = q|31.3.2|; +$noresave{$key} = "$nosave"; + +$key = q/example:ArbGridWithUndistDim/; +$external_latex_labels{$key} = q|31.3.7|; +$noresave{$key} = "$nosave"; + +$key = q/example:CurviGridWithUndistDim/; +$external_latex_labels{$key} = q|31.3.6|; +$noresave{$key} = "$nosave"; + +$key = q/fig:GEOS5/; +$external_latex_labels{$key} = q|2|; +$noresave{$key} = "$nosave"; + +$key = q/fig:GridDecomps/; +$external_latex_labels{$key} = q|13|; +$noresave{$key} = "$nosave"; + +$key = q/fig:LogRectGrids/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/fig:TheESMFwich/; +$external_latex_labels{$key} = q|1|; +$noresave{$key} = "$nosave"; + +$key = q/fig:appunit/; +$external_latex_labels{$key} = q|3|; +$noresave{$key} = "$nosave"; + +$key = q/fig:concurrent/; +$external_latex_labels{$key} = q|5|; +$noresave{$key} = "$nosave"; + +$key = q/fig:dgconnect_1tile_not_connected/; +$external_latex_labels{$key} = q|23|; +$noresave{$key} = "$nosave"; + +$key = q/fig:dgconnect_1tile_peribipole_connected/; +$external_latex_labels{$key} = q|27|; +$noresave{$key} = "$nosave"; + +$key = q/fig:dgconnect_1tile_periodic1_connected/; +$external_latex_labels{$key} = q|24|; +$noresave{$key} = "$nosave"; + +$key = q/fig:dgconnect_1tile_periodic2_connected/; +$external_latex_labels{$key} = q|25|; +$noresave{$key} = "$nosave"; + +$key = q/fig:dgconnect_1tile_peripole_connected/; +$external_latex_labels{$key} = q|26|; +$noresave{$key} = "$nosave"; + +$key = q/fig:dgconnect_2tiles_connected/; +$external_latex_labels{$key} = q|22|; +$noresave{$key} = "$nosave"; + +$key = q/fig:dgconnect_2tiles_not_connected/; +$external_latex_labels{$key} = q|21|; +$noresave{$key} = "$nosave"; + +$key = q/fig:dgconnect_cusph_12connected/; +$external_latex_labels{$key} = q|32|; +$noresave{$key} = "$nosave"; + +$key = q/fig:dgconnect_cusph_2rotconnected/; +$external_latex_labels{$key} = q|31|; +$noresave{$key} = "$nosave"; + +$key = q/fig:dgconnect_cusph_5connected/; +$external_latex_labels{$key} = q|29|; +$noresave{$key} = "$nosave"; + +$key = q/fig:dgconnect_cusph_6connected/; +$external_latex_labels{$key} = q|30|; +$noresave{$key} = "$nosave"; + +$key = q/fig:dgconnect_cusph_not_connected/; +$external_latex_labels{$key} = q|28|; +$noresave{$key} = "$nosave"; + +$key = q/fig:excl_destination/; +$external_latex_labels{$key} = q|8|; +$noresave{$key} = "$nosave"; + +$key = q/fig:excl_destination_cpl/; +$external_latex_labels{$key} = q|10|; +$noresave{$key} = "$nosave"; + +$key = q/fig:excl_source/; +$external_latex_labels{$key} = q|7|; +$noresave{$key} = "$nosave"; + +$key = q/fig:excl_source_cpl/; +$external_latex_labels{$key} = q|9|; +$noresave{$key} = "$nosave"; + +$key = q/fig:fieldparameter/; +$external_latex_labels{$key} = q|12|; +$noresave{$key} = "$nosave"; + +$key = q/fig:gridcellsandcorners/; +$external_latex_labels{$key} = q|19|; +$noresave{$key} = "$nosave"; + +$key = q/fig:gridcuststaggerloc/; +$external_latex_labels{$key} = q|18|; +$noresave{$key} = "$nosave"; + +$key = q/fig:gridexreg/; +$external_latex_labels{$key} = q|17|; +$noresave{$key} = "$nosave"; + +$key = q/fig:gridfileformatfeatures/; +$external_latex_labels{$key} = q|12.8|; +$noresave{$key} = "$nosave"; + +$key = q/fig:gridstaggerloc2d/; +$external_latex_labels{$key} = q|15|; +$noresave{$key} = "$nosave"; + +$key = q/fig:gridstaggerloc3d/; +$external_latex_labels{$key} = q|16|; +$noresave{$key} = "$nosave"; + +$key = q/fig:reconcile/; +$external_latex_labels{$key} = q|6|; +$noresave{$key} = "$nosave"; + +$key = q/fig:serial/; +$external_latex_labels{$key} = q|4|; +$noresave{$key} = "$nosave"; + +$key = q/fig:webservices_fig/; +$external_latex_labels{$key} = q|11|; +$noresave{$key} = "$nosave"; + +$key = q/fig:xgridsimple/; +$external_latex_labels{$key} = q|20|; +$noresave{$key} = "$nosave"; + +$key = q/fio:unitnumbers/; +$external_latex_labels{$key} = q|53.2.1|; +$noresave{$key} = "$nosave"; + +$key = q/get_info_handle_from_esmf_object/; +$external_latex_labels{$key} = q|40.3.1|; +$noresave{$key} = "$nosave"; + +$key = q/gridspecexample/; +$external_latex_labels{$key} = q|13.1|; +$noresave{$key} = "$nosave"; + +$key = q/info_key_format/; +$external_latex_labels{$key} = q|40.2|; +$noresave{$key} = "$nosave"; + +$key = q/info_tutorial/; +$external_latex_labels{$key} = q|40.3.2|; +$noresave{$key} = "$nosave"; + +$key = q/io:dataio/; +$external_latex_labels{$key} = q|38.2|; +$noresave{$key} = "$nosave"; + +$key = q/line_type_support/; +$external_latex_labels{$key} = q|24.2.16|; +$noresave{$key} = "$nosave"; + +$key = q/locstream:createfromfile/; +$external_latex_labels{$key} = q|32.4.14|; +$noresave{$key} = "$nosave"; + +$key = q/log_class/; +$external_latex_labels{$key} = q|49|; +$noresave{$key} = "$nosave"; + +$key = q/opt:extrapmethod/; +$external_latex_labels{$key} = q|54.18|; +$noresave{$key} = "$nosave"; + +$key = q/opt:iofmtflag/; +$external_latex_labels{$key} = q|54.30|; +$noresave{$key} = "$nosave"; + +$key = q/opt:lineType/; +$external_latex_labels{$key} = q|54.36|; +$noresave{$key} = "$nosave"; + +$key = q/opt:normType/; +$external_latex_labels{$key} = q|54.45|; +$noresave{$key} = "$nosave"; + +$key = q/opt:regridmethod/; +$external_latex_labels{$key} = q|54.51|; +$noresave{$key} = "$nosave"; + +$key = q/opt:regridstatus/; +$external_latex_labels{$key} = q|54.52|; +$noresave{$key} = "$nosave"; + +$key = q/part:CLTs/; +$external_latex_labels{$key} = q|II|; +$noresave{$key} = "$nosave"; + +$key = q/part:ESMFOverview/; +$external_latex_labels{$key} = q|I|; +$noresave{$key} = "$nosave"; + +$key = q/part:Superstructure/; +$external_latex_labels{$key} = q|III|; +$noresave{$key} = "$nosave"; + +$key = q/ref:distgridconnection/; +$external_latex_labels{$key} = q|36.7|; +$noresave{$key} = "$nosave"; + +$key = q/ref:distgridregdecomp/; +$external_latex_labels{$key} = q|36.8|; +$noresave{$key} = "$nosave"; + +$key = q/ref:dynamicmask/; +$external_latex_labels{$key} = q|28.6|; +$noresave{$key} = "$nosave"; + +$key = q/ref:stagsub/; +$external_latex_labels{$key} = q|31.7|; +$noresave{$key} = "$nosave"; + +$key = q/regrid:masking/; +$external_latex_labels{$key} = q|24.2.10|; +$noresave{$key} = "$nosave"; + +$key = q/regridoutput/; +$external_latex_labels{$key} = q|12.9.3|; +$noresave{$key} = "$nosave"; + +$key = q/sec::vectorRegrid/; +$external_latex_labels{$key} = q|24.2.17|; +$noresave{$key} = "$nosave"; + +$key = q/sec:Alarm/; +$external_latex_labels{$key} = q|46.1|; +$noresave{$key} = "$nosave"; + +$key = q/sec:AppDriverIntProc/; +$external_latex_labels{$key} = q|16.4.9|; +$noresave{$key} = "$nosave"; + +$key = q/sec:AppDriverSetVM/; +$external_latex_labels{$key} = q|16.4.8|; +$noresave{$key} = "$nosave"; + +$key = q/sec:BasicProfiling/; +$external_latex_labels{$key} = q|52.2.1|; +$noresave{$key} = "$nosave"; + +$key = q/sec:Calendar/; +$external_latex_labels{$key} = q|42.1|; +$noresave{$key} = "$nosave"; + +$key = q/sec:Clock/; +$external_latex_labels{$key} = q|45.1|; +$noresave{$key} = "$nosave"; + +$key = q/sec:CompTunnel/; +$external_latex_labels{$key} = q|20.1|; +$noresave{$key} = "$nosave"; + +$key = q/sec:CompTunnelActualCreate/; +$external_latex_labels{$key} = q|20.2.1|; +$noresave{$key} = "$nosave"; + +$key = q/sec:CompTunnelActualDestroy/; +$external_latex_labels{$key} = q|20.2.8|; +$noresave{$key} = "$nosave"; + +$key = q/sec:CompTunnelActualSide/; +$external_latex_labels{$key} = q|20.2.3|; +$noresave{$key} = "$nosave"; + +$key = q/sec:CompTunnelDualCreate/; +$external_latex_labels{$key} = q|20.2.2|; +$noresave{$key} = "$nosave"; + +$key = q/sec:CompTunnelDualDestroy/; +$external_latex_labels{$key} = q|20.2.7|; +$noresave{$key} = "$nosave"; + +$key = q/sec:CompTunnelDualSide/; +$external_latex_labels{$key} = q|20.2.4|; +$noresave{$key} = "$nosave"; + +$key = q/sec:CompTunnelInvoking/; +$external_latex_labels{$key} = q|20.2.5|; +$noresave{$key} = "$nosave"; + +$key = q/sec:CompTunnelInvokingNonblocking/; +$external_latex_labels{$key} = q|20.2.6|; +$noresave{$key} = "$nosave"; + +$key = q/sec:Config/; +$external_latex_labels{$key} = q|47.1|; +$noresave{$key} = "$nosave"; + +$key = q/sec:CplComp/; +$external_latex_labels{$key} = q|18.1|; +$noresave{$key} = "$nosave"; + +$key = q/sec:CplFinalize/; +$external_latex_labels{$key} = q|18.2.4|; +$noresave{$key} = "$nosave"; + +$key = q/sec:CplInitialize/; +$external_latex_labels{$key} = q|18.2.2|; +$noresave{$key} = "$nosave"; + +$key = q/sec:CplRun/; +$external_latex_labels{$key} = q|18.2.3|; +$noresave{$key} = "$nosave"; + +$key = q/sec:CplSetServ/; +$external_latex_labels{$key} = q|18.2.1|; +$noresave{$key} = "$nosave"; + +$key = q/sec:CplSetVM/; +$external_latex_labels{$key} = q|18.2.5|; +$noresave{$key} = "$nosave"; + +$key = q/sec:DistGrid/; +$external_latex_labels{$key} = q|36.1|; +$noresave{$key} = "$nosave"; + +$key = q/sec:ESMF_PrintInfo/; +$external_latex_labels{$key} = q|11|; +$noresave{$key} = "$nosave"; + +$key = q/sec:ESMF_Regrid/; +$external_latex_labels{$key} = q|13|; +$noresave{$key} = "$nosave"; + +$key = q/sec:ESMF_RegridWeightGen/; +$external_latex_labels{$key} = q|12|; +$noresave{$key} = "$nosave"; + +$key = q/sec:ESMF_Scrip2Unstruct/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/sec:GridComp/; +$external_latex_labels{$key} = q|17.1|; +$noresave{$key} = "$nosave"; + +$key = q/sec:GridFinalize/; +$external_latex_labels{$key} = q|17.2.4|; +$noresave{$key} = "$nosave"; + +$key = q/sec:GridInitialize/; +$external_latex_labels{$key} = q|17.2.2|; +$noresave{$key} = "$nosave"; + +$key = q/sec:GridRun/; +$external_latex_labels{$key} = q|17.2.3|; +$noresave{$key} = "$nosave"; + +$key = q/sec:GridSetServ/; +$external_latex_labels{$key} = q|17.2.1|; +$noresave{$key} = "$nosave"; + +$key = q/sec:GridSetVM/; +$external_latex_labels{$key} = q|17.2.5|; +$noresave{$key} = "$nosave"; + +$key = q/sec:HConfig/; +$external_latex_labels{$key} = q|48.1|; +$noresave{$key} = "$nosave"; + +$key = q/sec:IOUtil/; +$external_latex_labels{$key} = q|53.1|; +$noresave{$key} = "$nosave"; + +$key = q/sec:LimitProfiling/; +$external_latex_labels{$key} = q|52.2.3|; +$noresave{$key} = "$nosave"; + +$key = q/sec:Log/; +$external_latex_labels{$key} = q|49.1|; +$noresave{$key} = "$nosave"; + +$key = q/sec:MPIProfiling/; +$external_latex_labels{$key} = q|52.2.4|; +$noresave{$key} = "$nosave"; + +$key = q/sec:Profiling/; +$external_latex_labels{$key} = q|52.1.1|; +$noresave{$key} = "$nosave"; + +$key = q/sec:RHandle/; +$external_latex_labels{$key} = q|37.1|; +$noresave{$key} = "$nosave"; + +$key = q/sec:SciComp/; +$external_latex_labels{$key} = q|19.1|; +$noresave{$key} = "$nosave"; + +$key = q/sec:ShapeShortcut/; +$external_latex_labels{$key} = q|31.1.3|; +$noresave{$key} = "$nosave"; + +$key = q/sec:State/; +$external_latex_labels{$key} = q|21.1|; +$noresave{$key} = "$nosave"; + +$key = q/sec:Submission/; +$external_latex_labels{$key} = q|4|; +$noresave{$key} = "$nosave"; + +$key = q/sec:SummaryProfiling/; +$external_latex_labels{$key} = q|52.2.2|; +$noresave{$key} = "$nosave"; + +$key = q/sec:Support/; +$external_latex_labels{$key} = q|3|; +$noresave{$key} = "$nosave"; + +$key = q/sec:Time/; +$external_latex_labels{$key} = q|43.1|; +$noresave{$key} = "$nosave"; + +$key = q/sec:TimeInterval/; +$external_latex_labels{$key} = q|44.1|; +$noresave{$key} = "$nosave"; + +$key = q/sec:Tracing/; +$external_latex_labels{$key} = q|52.1.2|; +$noresave{$key} = "$nosave"; + +$key = q/sec:TracingClocks/; +$external_latex_labels{$key} = q|52.2.6|; +$noresave{$key} = "$nosave"; + +$key = q/sec:aliases/; +$external_latex_labels{$key} = q|6.3|; +$noresave{$key} = "$nosave"; + +$key = q/sec:array:usage:replicated_dims/; +$external_latex_labels{$key} = q|28.2.12|; +$noresave{$key} = "$nosave"; + +$key = q/sec:array:usage:undistributed_dims/; +$external_latex_labels{$key} = q|28.2.11|; +$noresave{$key} = "$nosave"; + +$key = q/sec:bundlerest/; +$external_latex_labels{$key} = q|25.3|; +$noresave{$key} = "$nosave"; + +$key = q/sec:component:usage:scicomp/; +$external_latex_labels{$key} = q|19.2.1|; +$noresave{$key} = "$nosave"; + +$key = q/sec:concurrency/; +$external_latex_labels{$key} = q|15.3|; +$noresave{$key} = "$nosave"; + +$key = q/sec:conventions/; +$external_latex_labels{$key} = q|5|; +$noresave{$key} = "$nosave"; + +$key = q/sec:coordspec/; +$external_latex_labels{$key} = q|31.1.5|; +$noresave{$key} = "$nosave"; + +$key = q/sec:deepshallow/; +$external_latex_labels{$key} = q|6.2|; +$noresave{$key} = "$nosave"; + +$key = q/sec:desc:dist/; +$external_latex_labels{$key} = q|31.1.4|; +$noresave{$key} = "$nosave"; + +$key = q/sec:example:2DLogRecFromScrip/; +$external_latex_labels{$key} = q|31.3.8|; +$noresave{$key} = "$nosave"; + +$key = q/sec:example:MeshCubedSphere/; +$external_latex_labels{$key} = q|33.3.9|; +$noresave{$key} = "$nosave"; + +$key = q/sec:example:UnstructFromFile/; +$external_latex_labels{$key} = q|33.3.8|; +$noresave{$key} = "$nosave"; + +$key = q/sec:extrapolation:creep/; +$external_latex_labels{$key} = q|24.2.14|; +$noresave{$key} = "$nosave"; + +$key = q/sec:extrapolation:nearestidavg/; +$external_latex_labels{$key} = q|24.2.13|; +$noresave{$key} = "$nosave"; + +$key = q/sec:extrapolation:neareststod/; +$external_latex_labels{$key} = q|24.2.12|; +$noresave{$key} = "$nosave"; + +$key = q/sec:extrapolation:overview/; +$external_latex_labels{$key} = q|24.2.11|; +$noresave{$key} = "$nosave"; + +$key = q/sec:field:usage:createArbGrid/; +$external_latex_labels{$key} = q|26.3.23|; +$noresave{$key} = "$nosave"; + +$key = q/sec:field:usage:createArbGridRep/; +$external_latex_labels{$key} = q|26.3.24|; +$noresave{$key} = "$nosave"; + +$key = q/sec:field:usage:createMeshArrayspecOpt/; +$external_latex_labels{$key} = q|26.3.21|; +$noresave{$key} = "$nosave"; + +$key = q/sec:field:usage:create_2darray/; +$external_latex_labels{$key} = q|26.3.11|; +$noresave{$key} = "$nosave"; + +$key = q/sec:field:usage:create_2dgrid_3dptr/; +$external_latex_labels{$key} = q|26.3.13|; +$noresave{$key} = "$nosave"; + +$key = q/sec:field:usage:create_2dgrid_3dptr_map/; +$external_latex_labels{$key} = q|26.3.14|; +$noresave{$key} = "$nosave"; + +$key = q/sec:field:usage:create_2dgrid_3dptr_map_halo/; +$external_latex_labels{$key} = q|26.3.15|; +$noresave{$key} = "$nosave"; + +$key = q/sec:field:usage:create_2dptr/; +$external_latex_labels{$key} = q|26.3.12|; +$noresave{$key} = "$nosave"; + +$key = q/sec:field:usage:create_5dgrid_7dptr_2dungridded/; +$external_latex_labels{$key} = q|26.3.9|; +$noresave{$key} = "$nosave"; + +$key = q/sec:field:usage:create_empty/; +$external_latex_labels{$key} = q|26.3.8|; +$noresave{$key} = "$nosave"; + +$key = q/sec:field:usage:create_grid_array/; +$external_latex_labels{$key} = q|26.3.6|; +$noresave{$key} = "$nosave"; + +$key = q/sec:field:usage:create_grid_arrayspec/; +$external_latex_labels{$key} = q|26.3.5|; +$noresave{$key} = "$nosave"; + +$key = q/sec:field:usage:create_grid_tkr/; +$external_latex_labels{$key} = q|26.3.4|; +$noresave{$key} = "$nosave"; + +$key = q/sec:field:usage:create_locs_arrayspec/; +$external_latex_labels{$key} = q|26.3.17|; +$noresave{$key} = "$nosave"; + +$key = q/sec:field:usage:create_locs_tkr/; +$external_latex_labels{$key} = q|26.3.16|; +$noresave{$key} = "$nosave"; + +$key = q/sec:field:usage:create_mesh_array/; +$external_latex_labels{$key} = q|26.3.20|; +$noresave{$key} = "$nosave"; + +$key = q/sec:field:usage:create_mesh_arrayspec/; +$external_latex_labels{$key} = q|26.3.19|; +$noresave{$key} = "$nosave"; + +$key = q/sec:field:usage:create_mesh_tkr/; +$external_latex_labels{$key} = q|26.3.18|; +$noresave{$key} = "$nosave"; + +$key = q/sec:field:usage:create_repdim/; +$external_latex_labels{$key} = q|26.3.22|; +$noresave{$key} = "$nosave"; + +$key = q/sec:field:usage:field_get_dataptr/; +$external_latex_labels{$key} = q|26.3.2|; +$noresave{$key} = "$nosave"; + +$key = q/sec:field:usage:field_get_default/; +$external_latex_labels{$key} = q|26.3.3|; +$noresave{$key} = "$nosave"; + +$key = q/sec:field:usage:gather_2dptr/; +$external_latex_labels{$key} = q|26.3.28|; +$noresave{$key} = "$nosave"; + +$key = q/sec:field:usage:halo/; +$external_latex_labels{$key} = q|26.3.34|; +$noresave{$key} = "$nosave"; + +$key = q/sec:field:usage:partial_creation/; +$external_latex_labels{$key} = q|26.3.7|; +$noresave{$key} = "$nosave"; + +$key = q/sec:field:usage:redist_1dptr/; +$external_latex_labels{$key} = q|26.3.30|; +$noresave{$key} = "$nosave"; + +$key = q/sec:field:usage:redist_gathering/; +$external_latex_labels{$key} = q|26.3.32|; +$noresave{$key} = "$nosave"; + +$key = q/sec:field:usage:redist_scattering/; +$external_latex_labels{$key} = q|26.3.31|; +$noresave{$key} = "$nosave"; + +$key = q/sec:field:usage:scatter_2dptr/; +$external_latex_labels{$key} = q|26.3.29|; +$noresave{$key} = "$nosave"; + +$key = q/sec:field:usage:smm_1dptr/; +$external_latex_labels{$key} = q|26.3.33|; +$noresave{$key} = "$nosave"; + +$key = q/sec:fieldbundle:usage:create_empty/; +$external_latex_labels{$key} = q|25.2.2|; +$noresave{$key} = "$nosave"; + +$key = q/sec:fieldbundle:usage:create_emptylist/; +$external_latex_labels{$key} = q|25.2.3|; +$noresave{$key} = "$nosave"; + +$key = q/sec:fieldbundle:usage:create_list/; +$external_latex_labels{$key} = q|25.2.1|; +$noresave{$key} = "$nosave"; + +$key = q/sec:fieldbundle:usage:get/; +$external_latex_labels{$key} = q|25.2.4|; +$noresave{$key} = "$nosave"; + +$key = q/sec:fieldbundle:usage:getlist/; +$external_latex_labels{$key} = q|25.2.5|; +$noresave{$key} = "$nosave"; + +$key = q/sec:fieldbundle:usage:halo/; +$external_latex_labels{$key} = q|25.2.12|; +$noresave{$key} = "$nosave"; + +$key = q/sec:fieldbundle:usage:packedFBGrid/; +$external_latex_labels{$key} = q|25.2.6|; +$noresave{$key} = "$nosave"; + +$key = q/sec:fieldbundle:usage:packedFBMesh/; +$external_latex_labels{$key} = q|25.2.7|; +$noresave{$key} = "$nosave"; + +$key = q/sec:fieldbundle:usage:redist_1dptr/; +$external_latex_labels{$key} = q|25.2.9|; +$noresave{$key} = "$nosave"; + +$key = q/sec:fieldbundle:usage:redist_packed/; +$external_latex_labels{$key} = q|25.2.10|; +$noresave{$key} = "$nosave"; + +$key = q/sec:fieldbundle:usage:smm_1dptr/; +$external_latex_labels{$key} = q|25.2.11|; +$noresave{$key} = "$nosave"; + +$key = q/sec:fieldregrid/; +$external_latex_labels{$key} = q|26.3.25|; +$noresave{$key} = "$nosave"; + +$key = q/sec:filebasedregrid/; +$external_latex_labels{$key} = q|24.3|; +$noresave{$key} = "$nosave"; + +$key = q/sec:fileformat:esmf/; +$external_latex_labels{$key} = q|12.8.2|; +$noresave{$key} = "$nosave"; + +$key = q/sec:fileformat:gridspec/; +$external_latex_labels{$key} = q|12.8.3|; +$noresave{$key} = "$nosave"; + +$key = q/sec:fileformat:mosaic/; +$external_latex_labels{$key} = q|12.8.5|; +$noresave{$key} = "$nosave"; + +$key = q/sec:fileformat:scrip/; +$external_latex_labels{$key} = q|12.8.1|; +$noresave{$key} = "$nosave"; + +$key = q/sec:fileformat:ugrid/; +$external_latex_labels{$key} = q|12.8.4|; +$noresave{$key} = "$nosave"; + +$key = q/sec:fileregridusage/; +$external_latex_labels{$key} = q|13.2|; +$noresave{$key} = "$nosave"; + +$key = q/sec:grid:usage:bounds/; +$external_latex_labels{$key} = q|31.3.19|; +$noresave{$key} = "$nosave"; + +$key = q/sec:hierarchy/; +$external_latex_labels{$key} = q|15.2|; +$noresave{$key} = "$nosave"; + +$key = q/sec:interpolation:bilinear/; +$external_latex_labels{$key} = q|24.2.1|; +$noresave{$key} = "$nosave"; + +$key = q/sec:interpolation:conservation/; +$external_latex_labels{$key} = q|24.2.7|; +$noresave{$key} = "$nosave"; + +$key = q/sec:interpolation:conservative_norm_opts/; +$external_latex_labels{$key} = q|24.2.8|; +$noresave{$key} = "$nosave"; + +$key = q/sec:interpolation:conserve/; +$external_latex_labels{$key} = q|24.2.5|; +$noresave{$key} = "$nosave"; + +$key = q/sec:interpolation:conserve_2ndorder/; +$external_latex_labels{$key} = q|24.2.6|; +$noresave{$key} = "$nosave"; + +$key = q/sec:interpolation:great_circle_cells/; +$external_latex_labels{$key} = q|24.2.9|; +$noresave{$key} = "$nosave"; + +$key = q/sec:interpolation:nearestdtos/; +$external_latex_labels{$key} = q|24.2.4|; +$noresave{$key} = "$nosave"; + +$key = q/sec:interpolation:neareststod/; +$external_latex_labels{$key} = q|24.2.3|; +$noresave{$key} = "$nosave"; + +$key = q/sec:interpolation:patch/; +$external_latex_labels{$key} = q|24.2.2|; +$noresave{$key} = "$nosave"; + +$key = q/sec:localcomm/; +$external_latex_labels{$key} = q|15.4|; +$noresave{$key} = "$nosave"; + +$key = q/sec:mesh:1pet1step/; +$external_latex_labels{$key} = q|33.3.2|; +$noresave{$key} = "$nosave"; + +$key = q/sec:mesh:1pet3step/; +$external_latex_labels{$key} = q|33.3.3|; +$noresave{$key} = "$nosave"; + +$key = q/sec:mesh:4pet1step/; +$external_latex_labels{$key} = q|33.3.4|; +$noresave{$key} = "$nosave"; + +$key = q/sec:mesh:4pet1stepee/; +$external_latex_labels{$key} = q|33.3.7|; +$noresave{$key} = "$nosave"; + +$key = q/sec:mesh:4pet1stepee1type/; +$external_latex_labels{$key} = q|33.3.6|; +$noresave{$key} = "$nosave"; + +$key = q/sec:mesh:api:meshaddelements/; +$external_latex_labels{$key} = q|33.4.4|; +$noresave{$key} = "$nosave"; + +$key = q/sec:mesh:api:meshaddnodes/; +$external_latex_labels{$key} = q|33.4.5|; +$noresave{$key} = "$nosave"; + +$key = q/sec:mesh:api:meshcreate/; +$external_latex_labels{$key} = q|33.4.6|; +$noresave{$key} = "$nosave"; + +$key = q/sec:mesh:halo/; +$external_latex_labels{$key} = q|33.3.12|; +$noresave{$key} = "$nosave"; + +$key = q/sec:mesh:mask/; +$external_latex_labels{$key} = q|33.3.11|; +$noresave{$key} = "$nosave"; + +$key = q/sec:mesh:usage:meshCreation/; +$external_latex_labels{$key} = q|33.3.1|; +$noresave{$key} = "$nosave"; + +$key = q/sec:meshrep/; +$external_latex_labels{$key} = q|33.1.1|; +$noresave{$key} = "$nosave"; + +$key = q/sec:overallimpl/; +$external_latex_labels{$key} = q|9|; +$noresave{$key} = "$nosave"; + +$key = q/sec:overallrest/; +$external_latex_labels{$key} = q|10|; +$noresave{$key} = "$nosave"; + +$key = q/sec:performance/; +$external_latex_labels{$key} = q|15.6|; +$noresave{$key} = "$nosave"; + +$key = q/sec:regrid/; +$external_latex_labels{$key} = q|24.2|; +$noresave{$key} = "$nosave"; + +$key = q/sec:regridusage/; +$external_latex_labels{$key} = q|12.6|; +$noresave{$key} = "$nosave"; + +$key = q/sec:regridweightgencheck/; +$external_latex_labels{$key} = q|12.10|; +$noresave{$key} = "$nosave"; + +$key = q/sec:rwg:conservation/; +$external_latex_labels{$key} = q|12.4|; +$noresave{$key} = "$nosave"; + +$key = q/sec:rwg:conservative_norm_opts/; +$external_latex_labels{$key} = q|12.5|; +$noresave{$key} = "$nosave"; + +$key = q/sec:rwg_bilinear/; +$external_latex_labels{$key} = q|12.3.1|; +$noresave{$key} = "$nosave"; + +$key = q/sec:rwg_conserve/; +$external_latex_labels{$key} = q|12.3.4|; +$noresave{$key} = "$nosave"; + +$key = q/sec:rwg_conserve2d/; +$external_latex_labels{$key} = q|12.3.5|; +$noresave{$key} = "$nosave"; + +$key = q/sec:rwg_extrap/; +$external_latex_labels{$key} = q|12.2.3|; +$noresave{$key} = "$nosave"; + +$key = q/sec:rwg_linetype/; +$external_latex_labels{$key} = q|12.2.5|; +$noresave{$key} = "$nosave"; + +$key = q/sec:rwg_masking/; +$external_latex_labels{$key} = q|12.2.2|; +$noresave{$key} = "$nosave"; + +$key = q/sec:rwg_nearest/; +$external_latex_labels{$key} = q|12.3.3|; +$noresave{$key} = "$nosave"; + +$key = q/sec:rwg_options/; +$external_latex_labels{$key} = q|12.2|; +$noresave{$key} = "$nosave"; + +$key = q/sec:rwg_patch/; +$external_latex_labels{$key} = q|12.3.2|; +$noresave{$key} = "$nosave"; + +$key = q/sec:rwg_poles/; +$external_latex_labels{$key} = q|12.2.1|; +$noresave{$key} = "$nosave"; + +$key = q/sec:rwg_regridmethods/; +$external_latex_labels{$key} = q|12.3|; +$noresave{$key} = "$nosave"; + +$key = q/sec:rwg_unmapped/; +$external_latex_labels{$key} = q|12.2.4|; +$noresave{$key} = "$nosave"; + +$key = q/sec:scoping/; +$external_latex_labels{$key} = q|15.5|; +$noresave{$key} = "$nosave"; + +$key = q/sec:spatialclasses/; +$external_latex_labels{$key} = q|6.6|; +$noresave{$key} = "$nosave"; + +$key = q/sec:usage:adv:create/; +$external_latex_labels{$key} = q|31.3.24|; +$noresave{$key} = "$nosave"; + +$key = q/sec:usage:coords:accessing/; +$external_latex_labels{$key} = q|31.3.16|; +$noresave{$key} = "$nosave"; + +$key = q/sec:usage:cubedsphere/; +$external_latex_labels{$key} = q|31.3.10|; +$noresave{$key} = "$nosave"; + +$key = q/sec:usage:cubedspherefromfile/; +$external_latex_labels{$key} = q|31.3.12|; +$noresave{$key} = "$nosave"; + +$key = q/sec:usage:cubedspherewttransform/; +$external_latex_labels{$key} = q|31.3.11|; +$noresave{$key} = "$nosave"; + +$key = q/sec:usage:items/; +$external_latex_labels{$key} = q|31.3.17|; +$noresave{$key} = "$nosave"; + +$key = q/sec:usage:items:accessing/; +$external_latex_labels{$key} = q|31.3.18|; +$noresave{$key} = "$nosave"; + +$key = q/sec:usage:setcommit/; +$external_latex_labels{$key} = q|31.3.9|; +$noresave{$key} = "$nosave"; + +$key = q/sec:usage:staggerloc/; +$external_latex_labels{$key} = q|31.3.13|; +$noresave{$key} = "$nosave"; + +$key = q/sec:usage:staggerloc:adv/; +$external_latex_labels{$key} = q|31.3.25|; +$noresave{$key} = "$nosave"; + +$key = q/sec:usage:staggerpadding:adv/; +$external_latex_labels{$key} = q|31.3.26|; +$noresave{$key} = "$nosave"; + +$key = q/sec:weightfileformat/; +$external_latex_labels{$key} = q|12.9|; +$noresave{$key} = "$nosave"; + +$key = q/sec:xgrid:desc/; +$external_latex_labels{$key} = q|34.1|; +$noresave{$key} = "$nosave"; + +$key = q/sec:xgrid:usage:xgrid_create/; +$external_latex_labels{$key} = q|34.3.1|; +$noresave{$key} = "$nosave"; + +$key = q/sec:xgrid:usage:xgrid_create_masking/; +$external_latex_labels{$key} = q|34.3.2|; +$noresave{$key} = "$nosave"; + +$key = q/sec:xgrid:usage:xgrid_createfromsparsemat/; +$external_latex_labels{$key} = q|34.3.3|; +$noresave{$key} = "$nosave"; + +$key = q/sec:xgrid:usage:xgrid_destroy/; +$external_latex_labels{$key} = q|34.3.5|; +$noresave{$key} = "$nosave"; + +$key = q/sec:xgrid:usage:xgrid_get/; +$external_latex_labels{$key} = q|34.3.4|; +$noresave{$key} = "$nosave"; + +$key = q/subsec:Calendar_options/; +$external_latex_labels{$key} = q|42.2|; +$noresave{$key} = "$nosave"; + +$key = q/subsec:Calendar_rest/; +$external_latex_labels{$key} = q|42.4|; +$noresave{$key} = "$nosave"; + +$key = q/subsec:Time_Instants_and_TimeIntervals/; +$external_latex_labels{$key} = q|41.3|; +$noresave{$key} = "$nosave"; + +$key = q/tab:dg_ops/; +$external_latex_labels{$key} = q|3|; +$noresave{$key} = "$nosave"; + +$key = q/table:timeOpts/; +$external_latex_labels{$key} = q|41.4|; +$noresave{$key} = "$nosave"; + +$key = q/ugridexample/; +$external_latex_labels{$key} = q|13.1|; +$noresave{$key} = "$nosave"; + +$key = q/vm_higherrank/; +$external_latex_labels{$key} = q|51.3.12|; +$noresave{$key} = "$nosave"; + +$key = q/vm_inside_user_mpi/; +$external_latex_labels{$key} = q|51.3.5|; +$noresave{$key} = "$nosave"; + +$key = q/vm_multi_instance_esmf/; +$external_latex_labels{$key} = q|51.3.7|; +$noresave{$key} = "$nosave"; + +$key = q/vm_nesting_esmf/; +$external_latex_labels{$key} = q|51.3.6|; +$noresave{$key} = "$nosave"; + +1; + diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/next.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/next.png new file mode 100644 index 000000000..1628652aa Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/next.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/next_g.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/next_g.png new file mode 100644 index 000000000..3c1c3f569 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/next_g.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/node1.html b/docs/nightly/fix/reconcile-info/ESMF_refdoc/node1.html new file mode 100644 index 000000000..002e0791c --- /dev/null +++ b/docs/nightly/fix/reconcile-info/ESMF_refdoc/node1.html @@ -0,0 +1,3407 @@ + + + + + +Contents + + + + + + + + + + + + + + + + + + + + +
+ +

+Contents +

+ + + + + +

+
+esmf_support@ucar.edu +
+ + diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/node10.html b/docs/nightly/fix/reconcile-info/ESMF_refdoc/node10.html new file mode 100644 index 000000000..c7006ed79 --- /dev/null +++ b/docs/nightly/fix/reconcile-info/ESMF_refdoc/node10.html @@ -0,0 +1,69 @@ + + + + + +About this document ... + + + + + + + + + + + + + + + + + + + +

+About this document ... +

+

+This document was generated using the +LaTeX2HTML translator Version 2018 (Released Feb 1, 2018) +

+Copyright © 1993, 1994, 1995, 1996, +Nikos Drakos, +Computer Based Learning Unit, University of Leeds. +
+Copyright © 1997, 1998, 1999, +Ross Moore, +Mathematics Department, Macquarie University, Sydney. +

+The command line arguments were:
+ latex2html -white -toc_depth 5 -split +1 -show_section_numbers -local_icons -address 'esmf_support@ucar.edu' ESMF_refdoc.tex +

+The translation was initiated on 2024-12-03 +


+
+esmf_support@ucar.edu +
+ + diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/node2.html b/docs/nightly/fix/reconcile-info/ESMF_refdoc/node2.html new file mode 100644 index 000000000..f8d036780 --- /dev/null +++ b/docs/nightly/fix/reconcile-info/ESMF_refdoc/node2.html @@ -0,0 +1,1298 @@ + + + + + +1 ESMF Overview + + + + + + + + + + + + + + + + + + + + + +Subsections + + + +
+ +

+ +
+1 ESMF Overview +

+ + +

+ +

+1 What is the Earth System Modeling Framework? +

+ +

+The Earth System Modeling Framework (ESMF) is a suite of software +tools for developing high-performance, multi-component Earth science +modeling applications. Such applications may include a few or dozens +of components representing atmospheric, oceanic, terrestrial, or +other physical domains, and their constituent processes (dynamical, chemical, +biological, etc.). Often these components are developed by different +groups independently, and must be “coupled” together using software +that transfers and transforms data among the components in order to form +functional simulations. + +

+ESMF supports the development of these complex applications in a number +of ways. It introduces a set of simple, consistent component interfaces +that apply to all types of components, including couplers themselves. These +interfaces expose in an obvious way the inputs and outputs of each component. +It offers a variety of data structures for transferring data between components, +and libraries for regridding, time advancement, and other common modeling +functions. Finally, it provides a growing set of tools for using metadata +to describe components and their input and output fields. This capability +is important because components that are self-describing +can be integrated more easily into automated workflows, model and dataset +distribution and analysis portals, and other emerging “semantically enabled” +computational environments. + +

+ESMF is not a single Earth system model into which all components +must fit, and its distribution doesn't contain any scientific code. +Rather it provides a way of structuring components so that they can be used +in many different user-written applications and contexts with minimal code +modification, and so they can be coupled together in new configurations +with relative ease. The idea is to create many components across a +broad community, and so to encourage new collaborations and combinations. + +

+ESMF offers the flexibility needed by this diverse user base. It is tested +nightly on more than two dozen platform/compiler combinations; can be +run on one processor or thousands; supports shared and distributed memory +programming models and a hybrid model; can run components +sequentially (on all the same processors) or concurrently (on mutually +exclusive processors); and supports single executable or multiple +executable modes. + +

+ESMF's generality and breadth of function can make it daunting for the +novice user. To help users navigate the software, we try to apply +consistent names and behavior throughout and to provide many examples. +The large-scale structure of the software is straightforward. +The utilities and data structures for building modeling components +are called the ESMF infrastructure. The coupling interfaces and +drivers are called the superstructure. User code sits between +these two layers, making calls to the infrastructure +libraries underneath and being scheduled and synchronized by the +superstructure above. The configuration resembles a sandwich, as +shown in Figure 1. + +

+ESMF users may choose to extensively rewrite their codes +to take advantage of the ESMF infrastructure, or they may decide to +simply wrap their components in the ESMF superstructure in order to +utilize framework coupling services. Either way, we encourage users +to contact our +support team +if questions arise about how to best +use the software, or how to structure their application. ESMF is +more than software; it's a group of people dedicated to realizing +the vision of a collaborative model development community that spans +institutional and national bounds. + +

+ +

+2 The ESMF Reference Manual for Fortran +

+ +

+ESMF has a complete set of Fortran interfaces and +some C interfaces. This ESMF Reference Manual is a listing of +ESMF interfaces for Fortran.1 + +

+Interfaces are grouped by class. A class is comprised of the data and +methods for a specific concept like a physical field. Superstructure classes +are listed first in this Manual, followed by infrastructure +classes. + +

+The major classes in the ESMF superstructure are Components, which +usually represent +large pieces of functionality such as atmosphere and ocean models, +and States, which are the data structures +used to transfer data between Components. There are both data +structures and utilities in the ESMF +infrastructure. Data structures include multi-dimensional Arrays, Fields +that are comprised of an Array and a Grid, and collections of Arrays +and Fields called ArrayBundles and FieldBundles, respectively. +There are utility libraries for data decomposition and communications, +time management, logging and error handling, and application configuration. + +

+

+
+
+ + + +
Figure 1: +Schematic of the ESMF “sandwich” architecture. +The framework consists of two parts, an upper level +superstructure layer and a lower level infrastructure layer. +User code is sandwiched between these two layers.
+\scalebox{1.0}{\includegraphics{ESMF_sandwich}}
+
+
+
+ +

+ +
+3 How to Contact User Support and Find Additional Information +

+The ESMF team can answer questions about the interfaces presented in this +document. For user support, please contact +esmf_support@ucar.edu. + +

+The website, http://www.earthsystemmodeling.org, provide more information of the ESMF project as a whole. +The website includes release notes and known bugs for each version of the +framework, supported platforms, project history, values, and metrics, related projects, +the ESMF management structure, and more. The ESMF User's Guide +contains build and installation instructions, an overview of the ESMF system and a description of +how its classes interrelate (this version of the document corresponds to the last public version of the framework). Also available on the ESMF website is the +ESMF Developer's Guide +that details ESMF procedures and conventions. + +

+ +

+ +
+4 How to Submit Comments, Bug Reports, and Feature Requests +

+ +We welcome input on any aspect of the ESMF project. Send +questions and comments to +esmf_support@ucar.edu. + +

+ +

+ +
+5 Conventions +

+ +

+ +

+5.1 Typeface and Diagram Conventions +

+ +

+ +

+The following conventions for fonts and capitalization are used +in this and other ESMF documents.
+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
StyleMeaningExample
italicsdocumentsESMF Reference Manual
couriercode fragmentsESMF_TRUE
courier()ESMF method nameESMF_FieldGet()
boldfacefirst definitionsAn address space is ...
boldfaceweb links and tabsDevelopers tab on the website
CapitalsESMF class nameDataMap
+ +

+ESMF class names frequently coincide with words commonly +used within the Earth system domain (field, grid, component, array, +etc.) The convention we adopt in this manual is that if a word is +used in the context of an ESMF class name it is capitalized, and +if the word is used in a more general context it remains in lower +case. We would write, for example, that an ESMF Field class +represents a physical field. + +

+Diagrams are drawn using the Unified Modeling Language (UML). UML +is a visual tool that can illustrate the structure of +classes, define relationships between classes, and describe sequences +of actions. A reader interested in more detail can refer to a +text such as The Unified Modeling Language Reference Manual. + [29] + +

+ +

+5.2 Method Name and Argument Conventions +

+ +

+Method names begin with ESMF_, followed by the class name, +followed by the name of the operation being performed. Each new +word is capitalized. Although Fortran interfaces are not case-sensitive, +we use case to help parse multi-word names. + +

+For method arguments that are multi-word, the first word is lower +case and subsequent words begin with upper case. ESMF class +names (including typed flags) are an exception. When multi-word +class names appear in argument lists, all letters after the first +are lower case. The first letter is lower case if the class is the +first word in the argument and upper case otherwise. For +example, in an argument list the DELayout class name may appear +as delayout or srcDelayout. + +

+Most Fortran calls in the ESMF are subroutines, with +any returned values passed through the interface. For the sake of +convenience, some ESMF calls are written as functions. + +

+A typical ESMF call looks like this: + +

+

+call ESMF_<ClassName><Operation>(classname, firstArgument, 
+           secondArgument, ..., rc)
+
+ +

+where
+<ClassName> is the class name,
+<Operation> is the name of the action to be performed,
+classname is a variable of the derived type associated +with the class,
+the arg* arguments are whatever other variables are required +for the operation,
+and rc is a return code.
+ +

+ +

+6 The ESMF Application Programming Interface +

+ +

+The ESMF Application Programming Interface (API) is based on the +object-oriented programming concept of a class. A class is a +software construct that is used for grouping a set of related variables +together with the subroutines and functions that operate on them. We +use classes in ESMF because they help to organize the code, and often +make it easier to maintain and understand. A particular instance +of a class is called an object. For example, Field is an +ESMF class. An actual Field called temperature is an object. +That is about as far as we will go into software engineering +terminology. + +

+The Fortran interface is implemented so that the variables associated +with a class are stored in a derived type. For example, an +ESMF_Field derived type stores the data array, grid +information, and metadata associated with a physical field. +The derived type for each class is stored in a Fortran module, and +the operations associated with each class are defined as module +procedures. We use the Fortran features of generic functions and +optional arguments extensively to simplify our interfaces. + +

+The modules for ESMF are bundled together and can be accessed with a +single USE statement, USE ESMF. + +

+ +

+6.1 Standard Methods and Interface Rules +

+ +

+ESMF defines a set of standard methods and interface rules that +hold across the entire API. These are: + +

+ +

    +
  • ESMF_<Class>Create() and ESMF_<Class>Destroy(), for +creating and destroying objects of ESMF classes that require internal memory +management (- called ESMF deep classes). The ESMF_<Class>Create() method +allocates memory for the object itself and for internal variables, and +initializes variables where appropriate. It is always written as a Fortran +function that returns a derived type instance of the class, i.e. an object. + +

    +

  • +
  • ESMF_<Class>Set() and ESMF_<Class>Get(), for setting and +retrieving a particular item or flag. In general, these methods are overloaded +for all cases where the item can be manipulated as a name/value pair. If +identifying the item requires more than a name, or if the class is of +sufficient complexity that overloading in this way would result in an +overwhelming number of options, we define specific +ESMF_<Class>Set<Something>() and ESMF_<Class>Get<Something>() +interfaces. + +

    + +

  • +
  • ESMF_<Class>Add(), ESMF_<Class>AddReplace(), +ESMF_<Class>Remove(), and ESMF_<Class>Replace(), for manipulating +objects of ESMF container classes - such as ESMF_State and +ESMF_FieldBundle. For example, the ESMF_FieldBundleAdd() +method adds another Field to an existing FieldBundle object. + +

    +

  • +
  • ESMF_<Class>Print(), for printing the contents of an object to +standard out. This method is mainly intended for debugging. + +

    +

  • +
  • ESMF_<Class>ReadRestart() and ESMF_<Class>WriteRestart(), +for saving the contents of a class and restoring it exactly. Read +and write restart methods have not yet been implemented for most +ESMF classes, so where necessary the user needs to write restart +values themselves. + +

    +

  • +
  • ESMF_<Class>Validate(), for determining whether a class is +internally consistent. For example, ESMF_FieldValidate() validates +the internal consistency of a Field object. + +

    +

  • +
+ +

+ +

+ +
+6.2 Deep and Shallow Classes +

+ +

+ESMF contains two types of classes. + +

+Deep classes require +ESMF_<Class>Create() and ESMF_<Class>Destroy() calls. +They involve memory allocation, take significant time to set up (due to +memory management) and should not be created in a time-critical portion of code. +Deep objects persist even after the method in which they were created has +returned. Most classes in ESMF, including GridComp, CplComp, State, Fields, +FieldBundles, Arrays, ArrayBundles, Grids, and Clocks, fall into this category. + +

+Shallow classes do not possess ESMF_<Class>Create() +and ESMF_<Class>Destroy() calls. They are simply declared +and their values set using an ESMF_<Class>Set() call. +Examples of shallow classes are Time, TimeInterval, and ArraySpec. +Shallow classes do not take long to set up and can be declared and set within +a time-critical code segment. Shallow objects stop existing when execution +goes out of the declaring scope. + +

+An exception to this is when a shallow object, such as a Time, +is stored in a deep object such as a Clock. The deep Clock object then +becomes the declaring scope of the Time object, persisting in memory. +The Time object is deallocated with the ESMF_ClockDestroy() call. + +

+See Section 9, Overall Design and Implementation +Notes, for a brief discussion of deep and shallow classes from +an implementation perspective. For an in-depth look at the design +and inter-language issues related to deep and shallow classes, +see the ESMF Implementation Report. + +

+ +

+ +
+6.3 Aliases and Named Aliases +

+ +

+Deep objects, i.e. instances of ESMF deep classes created by the appropriate +ESMF_<Class>Create(), can be used with the standard assignment (=), +equality (==), and not equal (/=) operators. + +

+The assignment +

+deep2 = deep1
+
+makes deep2 an alias of deep1, meaning that both variables +reference the same deep allocation in memory. Many aliases of the same deep +object can be created. + +

+All the aliases of a deep object are equivalent. In particular, there is no +distinction between the variable on the left hand side of the actual +ESMF_<Class>Create() call, and any aliases created from it. All actions +taken on any of the aliases of a deep object affect the deep object, and thus +all other aliases. + +

+The equality and not equal operators for deep objects are implemented as simple +alias checks. For a more general comparison of two distinct deep objects, a +deep class might provide the ESMF_<Class>Match() method. + +

+ESMF provides the concept of a named alias. A named alias behaves just +like an alias in all aspects, except when it comes to setting and getting the +name of the deep object it is associated with. While regular aliases +all access the same name string in the actual deep object, a named alias keeps +its private name string. This allows the same deep object to be known under a +different name in different contexts. + +

+The assignment +

+deep2 = ESMF_NamedAlias(deep1)
+
+makes deep2 a named alias of deep1. Any name changes on +deep2 only affect deep2. However, the name retrieved from +deep1, or from any regular aliases created from deep1, is +unaffected. + +

+Notice that aliases generated from a named alias are again named aliases. This +is true even when using the regular assignment operator with a named alias on +the right hand side. Named aliases own their unique name string that cannot +be accessed or altered through any other alias. + +

+ +

+ +

+ +

+ +

+6.3.1 ESMF_NamedAlias - Generate a Named Alias +

+ +

+ +

+
+INTERFACE: +

     function ESMF_NamedAlias(object, name, rc)
+
RETURN VALUE: +
     type(ESMF_*)        :: ESMF_NamedAlias
+
ARGUMENTS: +
     type(ESMF_*),       intent(in)            :: object
+     character(len = *), intent(in),  optional :: name
+     integer,            intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Generate a named alias to object. The supported classes are: + +

    +
  • ESMF_State +
  • +
  • ESMF_GridComp +
  • +
  • ESMF_CplComp +
  • +
  • ESMF_SciComp +
  • +
  • ESMF_FieldBundle +
  • +
  • ESMF_Field +
  • +
  • ESMF_ArrayBundle +
  • +
  • ESMF_Array + +
  • +
+ +

+The arguments are: +

+
object
+
The incoming object for which a named alias is generated. + +
+
[name]
+
The name of the named alias. By default use the name of object. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ + +

+ +

+6.4 Special Methods +

+ +

+The following are special methods which, in one case, +are required by any application using ESMF, and in the +other case must be called by any application that is using +ESMF Components. + +

+ +

    +
  • ESMF_Initialize() and ESMF_Finalize() are required +methods that must bracket the use of ESMF within an application. +They manage the resources required to run ESMF and shut it down +gracefully. ESMF does not support restarts in the same executable, i.e. +ESMF_Initialize() should not be called after ESMF_Finalize(). +
  • +
  • ESMF_<Type>CompInitialize(), ESMF_<Type>CompRun(), and ESMF_<Type>CompFinalize() are component methods that are used at the +highest level within ESMF. <Type> may be <Grid>, for +Gridded Components such as oceans or atmospheres, or +<Cpl>, for Coupler Components that are used to connect +them. The content of these methods is not part of the ESMF. +Instead the methods call into associated subroutines within +user code. + +

    +

  • +
+ +

+ +

+6.5 The ESMF Data Hierarchy +

+ +

+The ESMF API is organized around a hierarchy of classes that +contain model data. The operations that are performed +on model data, such as regridding, redistribution, and halo +updates, are methods of these classes. + +

+The main data classes in ESMF, in order of increasing complexity, are: + +

    +
  • Array An ESMF Array is a distributed, multi-dimensional +array that can carry information such as its type, kind, rank, and +associated halo widths. It contains a reference to a native Fortran array. +
  • +
  • ArrayBundle An ArrayBundle is a collection of Arrays, not +necessarily distributed in the same manner. It is useful for performing +collective data operations and communications. +
  • +
  • Field A Field represents a physical scalar or vector field. +It contains a reference to an Array along with grid information and metadata. +
  • +
  • FieldBundle A FieldBundle is a collection of Fields discretized +on the same grid. The staggering of data points may be different for +different Fields within a FieldBundle. Like the ArrayBundle, it is +useful for performing collective data operations and +communications. +
  • +
  • State A State represents the collection of data that a +Component either requires to run (an Import State) or can make +available to other Components (an Export State). +States may contain references to Arrays, ArrayBundles, Fields, +FieldBundles, or other States. +
  • +
  • Component A Component is a piece of software +with a distinct function. ESMF currently recognizes two types +of Components. Components that represent a physical domain +or process, such +as an atmospheric model, are called Gridded Components since they are +usually discretized on an underlying grid. The Components +responsible for regridding and transferring data between Gridded +Components are called Coupler Components. Each Component +is associated with an Import and an Export State. Components +can be nested so that simpler Components are contained within more +complex ones. + +

    +

  • +
+ +

+Underlying these data classes are native language arrays. ESMF allows +you to reference an existing Fortran array to an ESMF Array or +Field so that ESMF data classes can be readily +introduced into existing code. You can perform communication operations +directly on Fortran arrays through the VM class, which serves +as a unifying wrapper for distributed and shared memory communication +libraries. + +

+ +

+ +
+6.6 ESMF Spatial Classes +

+ +

+Like the hierarchy of model data classes, ranging from the +simple to the complex, ESMF is organized around a hierarchy of +classes that represent different spaces associated with a computation. +Each of these spaces can be manipulated, in order to give +the user control over how a computation is executed. For Earth system +models, this hierarchy starts with the address space associated +with the computer and extends to the physical region described by +the application. The main spatial classes in ESMF, from +those closest to the machine to those closest to the application, are: + +

+ +

    +
  • The Virtual Machine, or VM The ESMF VM is an +abstraction of a parallel computing environment that encompasses +both shared and distributed memory, single and multi-core systems. +Its primary purpose is resource allocation and management. Each Component +runs in its own VM, using the resources it defines. The elements of a VM +are Persistent Execution Threads, or PETs, that are +executing in Virtual Address Spaces, or VASs. A simple +case is one in which every PET is associated with a single MPI process. +In this case every PET is executing in its own private VAS. If Components +are nested, the parent component allocates a subset of its PETs to its +children. The children have some flexibility, subject to the constraints of +the computing environment, to decide how they want to use the +resources associated with the PETs they've received. + +

    +

  • +
  • DELayout A DELayout represents a data decomposition +(we also refer to this as a distribution). Its +basic elements are Decomposition Elements, or DEs. +A DELayout associates a set of DEs with the PETs in a VM. DEs are not +necessarily one-to-one with PETs. For cache blocking, +or user-managed multi-threading, more DEs than PETs may be defined. +Fewer DEs than PETs may also be defined if an application requires it. + +

    +

  • +
  • DistGrid A DistGrid represents the index space +associated with a grid. It is a useful abstraction because +often a full specification of grid coordinates is not necessary +to define data communication patterns. The DistGrid contains +information about the sequence and connectivity of data points, +which is sufficient information for many operations. Arrays +are defined on DistGrids. + +

    +

  • +
  • Array An Array defines how the index space described +in the DistGrid is associated with the VAS of each PET. This association +considers the type, kind and rank of the indexed data. Fields are +defined on Arrays. + +

    +

  • +
  • Grid A Grid is an abstraction for a logically rectangular +region in physical space. It associates a coordinate system, a set of +coordinates, and a topology to a collection of grid cells. Grids in ESMF +are comprised of DistGrids plus additional coordinate information. + +

    +

  • +
  • Mesh A Mesh provides an abstraction for an unstructured +grid. Coordinate information is set in nodes, which represent +vertices or corners. Together the nodes establish the boundaries +of mesh elements or cells. + +

    +

  • +
  • LocStream A LocStream is an abstraction for a set of +unstructured data points without any topological relationship to each +other. + +

    +

  • +
  • Field A Field may contain more dimensions than the +Grid that it is discretized on. For example, for convenience +during integration, a user may want to define a single Field object +that holds snapshots of data at multiple times. Fields also +keep track of the stagger location of a Field data point within its +associated Grid cell. + +

    +

  • +
+ +

+ +

+6.7 ESMF Maps +

+ +

+In order to define how the index spaces of the spatial classes relate +to each other, we require either implicit rules (in which case the +relationship between spaces is defined by default), or special Map arrays +that allow the user to specify the desired association. The form of the +specification is usually that the position of the array element carries +information about the first object, and the value of the array element carries +information about the second object. ESMF includes a distGridToArrayMap, +a gridToFieldMap, a distGridToGridMap, and others. + +

+ +

+6.8 ESMF Specification Classes +

+ +

+It can be useful to make small packets +of descriptive parameters. ESMF has one of these: + +

    +
  • ArraySpec, for storing the specifics, such as type/kind/rank, +of an array. +
  • +
+ +

+ +

+6.9 ESMF Utility Classes +

+ +

+There are a number of utilities in ESMF that can be used independently. +These are: + +

    +
  • Attributes, for storing metadata about Fields, +FieldBundles, States, and other classes. +
  • +
  • TimeMgr, for calendar, time, clock and alarm functions. +
  • +
  • LogErr, for logging and error handling. +
  • +
  • Config, for creating resource files that can replace namelists +as a consistent way of setting configuration parameters. +
  • +
+ +

+ +

+7 Integrating ESMF into Applications +

+ +

+Depending on the requirements of the application, the user may +want to begin integrating ESMF in either a top-down or bottom-up +manner. In the top-down approach, tools at the superstructure +level are used to help reorganize and structure the interactions +among large-scale components in the application. It is appropriate +when interoperability is a primary concern; for example, when +several different versions or implementations of components are going +to be swapped in, or a particular component is going to be used +in multiple contexts. Another reason for deciding on a top-down +approach is that the application contains legacy code that for +some reason (e.g., intertwined functions, very large, +highly performance-tuned, resource limitations) there is little +motivation to fully restructure. The superstructure can usually be +incorporated into such applications in a way that is non-intrusive. + +

+In the bottom-up approach, the user selects desired utilities +(data communications, calendar management, performance profiling, +logging and error handling, etc.) from the ESMF infrastructure +and either writes new code using them, introduces them into +existing code, or replaces the functionality in existing code +with them. This makes sense when maximizing code reuse and +minimizing maintenance costs is a goal. There may be a specific +need for functionality or the component writer may be starting +from scratch. The calendar management utility is a popular +place to start. + +

+ +

+7.1 Using the ESMF Superstructure +

+ +

+The following is a typical set of steps involved in adopting +the ESMF superstructure. The first two tasks, which occur +before an ESMF call is ever made, have the potential to be +the most difficult and time-consuming. They are the work +of splitting an application into components and ensuring that +each component has well-defined stages of execution. ESMF +aside, this sort of code structure helps to promote application +clarity and maintainability, and the effort put into it is likely +to be a good investment. + +

+ +

    +
  1. Decide how to organize the application as discrete Gridded +and Coupler Components. This might involve reorganizing code +so that individual components are cleanly separated and their +interactions consist of a minimal number of data exchanges. + +

    +

  2. +
  3. Divide the code for each component into initialize, run, and +finalize methods. These methods can be multi-phase, e.g., +init_1, init_2. + +

    +

  4. +
  5. Pack any data that will be transferred between components +into ESMF Import and Export State data structures. This is done +by first wrapping model data in either ESMF Arrays or Fields. +Arrays are simpler to create and use than Fields, but carry less +information and have a more limited range of operations. +These Arrays and Fields are then added to Import and +Export States. They may be packed into ArrayBundles or +FieldBundles first, for more efficient communications. +Metadata describing the model data can also be added. +At the end of this step, the data to be transferred between +components will be in a compact and largely self-describing +form. + +

    +

  6. +
  7. Pack time information into ESMF time management data +structures. + +

    +

  8. +
  9. Using code templates provided in the ESMF distribution, create +ESMF Gridded and Coupler Components to represent each component +in the user code. + +

    +

  10. +
  11. Write a set services routine that sets ESMF entry +points for each user component's initialize, run, and finalize +methods. + +

    +

  12. +
  13. Run the application using an ESMF Application Driver. + +

    +

  14. +
+ +

+ +

+8 Overall Rules and Behavior +

+ +

+ +

+8.1 Return Code Handling +

+ +

+All ESMF methods pass a return code back to the caller via the rc +argument. If no errors are encountered during the method execution, a +value of ESMF_SUCCESS is returned. Otherwise one of the predefined +error codes is returned to the caller. See the appendix, section +56, for a full list of the ESMF error return codes. + +

+Any code calling an ESMF method must check the return code. If rc is not +equal to ESMF_SUCCESS, the calling code is expected to break out of its +execution and pass the rc to the next level up. All ESMF errors are to be +handled as fatal, i.e. the calling code must bail-on-all-errors. + +

+ESMF provides a number of methods, described under section 49, +that make implementation of the bail-on-all-errors stategy more convenient. +Consistent use of these methods will ensure that a full back trace is generated +in the ESMF log output whenever an error condition is triggered. + +

+Note that in ESMF requesting not present information, e.g. via a Get() +method, will trigger an error condition. Combined with the bail-on-all-errors +strategy this has the advantage of producing an error trace pointing to the +earliest location in the code that attempts to access unavailable information. +In cases where the calling side is able to handle the presence or absence of +certain pieces of of information, the code first must query for the resepctive +isPresent argument. If this argument comes back as .true. it is +safe to query for the actual information. + +

+ +

+8.2 Local and Global Views and Associated Conventions +

+ +

+ESMF data objects such as Fields are distributed over +DEs, with each DE getting a portion of the data. Depending +on the task, a local or global view of the object may be +preferable. In a local view, data indices start with the first +element on the DE and end with the last element on the same DE. +In a global view, there is an assumed or specified order to +the set of DEs over which the object is distributed. Data +indices start with the first element on the first DE, and +continue across all the elements in the sequence of DEs. +The last data index represents the number of elements in the +entire object. The DistGrid provides the mapping between +local and global data indices. + +

+The convention in ESMF is that entities with a global view +have no prefix. Entities with a DE-local (and in some cases, +PET-local) view have the prefix “local.” + +

+Just as data is distributed over DEs, DEs themselves can be +distributed over PETs. This is an advanced feature for users +who would like to create multiple local chunks of data, for +algorithmic or performance reasons. +Local DEs are those DEs that are located on the local PET. +Local DE labeling always starts at 0 and goes to localDeCount-1, +where localDeCount is the number of DEs on the local PET. +Global DE numbers also start at 0 and go to deCount-1. +The DELayout class provides the mapping between local +and global DE numbers. + +

+ +

+8.3 Allocation Rules +

+ +

+The basic rule of allocation and deallocation for the ESMF is: +whoever allocates it is responsible for deallocating it. + +

+ESMF methods that allocate their own space for data will +deallocate that space when the object is destroyed. +Methods which accept a user-allocated buffer, for example +ESMF_FieldCreate() with the ESMF_DATACOPY_REFERENCE flag, +will not deallocate that buffer at the time the object is +destroyed. The user must deallocate the buffer +when all use of it is complete. + +

+Classes such as Fields, FieldBundles, and States may have Arrays, +Fields, Grids and FieldBundles created externally and associated with +them. These associated items are not destroyed along with the rest +of the data object since it is possible for the items to be added +to more than one data object at a time (e.g. the same Grid could +be part of many Fields). It is the user's responsibility to delete +these items when the last use of them is done. + +

+ +

+ +
+8.4 Assignment, Equality, Copying and Comparing Objects +

+The equal sign assignment has not been overloaded in ESMF, thus resulting in +the standard Fortran behavior. This behavior has been documented as the first +entry in the API documentation section for each ESMF class. For deep ESMF +objects the assignment results in setting an alias the the same ESMF object +in memory. For shallow ESMF objects the assignment is essentially a equivalent +to a copy of the object. For deep classes the equality operators have been +overloaded to test for the alias condition as a counter part to the assignment +behavior. This and the not equal operator are documented following the +assignment in the class API documentation sections. + +

+Deep object copies are implemented as a special variant of the +ESMF_<Class>Create() methods. It takes an existing deep object as +one of the required arguments. At this point not all deep classes have +ESMF_<Class>Create() methods that allow object copy. + +

+Due to the complexity of deep classes there are many aspects when comparing two +objects of the same class. ESMF provide ESMF_<Class>Match() methods, +which are functions that return a class specific match flag. At this point not +all deep classes have ESMF_<Class>Match() methods that allow deep object +comparison. + +

+ +

+8.5 Attributes +

+ +

+Attributes are (name, value) pairs, where +the name is a character string and the value can be either a single +value or list of integer, real, double precision, +logical, or character values. +Attributes can be associated with Fields, FieldBundles, and States. +Mixed types are not allowed in a single attribute, and all attribute +names must be unique within a single object. Attributes are set +by name, and can be retrieved either directly by name or by querying +for a count of attributes and retrieving names and values +by index number. + +

+ +

+8.6 Constants +

+ +

+Named constants are used throughout ESMF to specify the values of many +arguments with multiple well defined values in a consistent way. These +constants are defined by a derived type that follows this pattern: + +

+

+ESMF_<CONSTANT_NAME>_Flag
+
+ +

+The values of the constant are then specified by this pattern: + +

+

+ESMF_<CONSTANT_NAME>_<VALUE1>
+ESMF_<CONSTANT_NAME>_<VALUE2>
+ESMF_<CONSTANT_NAME>_<VALUE3>
+...
+
+ +

+A master list of all available constants can be found in section +54. + +

+ +

+ +
+9 Overall Design and Implementation Notes +

+ +

+ +

    +
  1. Deep and shallow classes. The deep and shallow classes +described in Section 6.2 differ in how and where they +are allocated within a multi-language implementation environment. We +distinguish between the implementation language, which is the language +a method is written in, and the calling language, which is the language +that the user application is written in. Deep classes are allocated +off the process heap by the implementation language. Shallow classes +are allocated off the stack by the calling language. + +

    +

  2. +
  3. Base class. All ESMF classes are built upon a Base class, +which holds a small set of system-wide capabilities. + +

    +

  4. +
+ +

+ +

+ +
+10 Overall Restrictions and Future Work +

+ +

+ +

    +
  1. 32-bit integer limitations. In general, Fortran array bounds should +be limited to 2**31-1 elements or less. This is due to the Fortran-95 +limitation of returning default sized (e.g., 32 bit) integers for array bound +and size inquiries, and consequent ESMF use of default sized integers for +holding these values. + +

    +

  2. +
+ + + +
+esmf_support@ucar.edu +
+ + diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/node3.html b/docs/nightly/fix/reconcile-info/ESMF_refdoc/node3.html new file mode 100644 index 000000000..94e9eef05 --- /dev/null +++ b/docs/nightly/fix/reconcile-info/ESMF_refdoc/node3.html @@ -0,0 +1,2733 @@ + + + + + +2 Command Line Tools + + + + + + + + + + + + + + + + + + + + + +Subsections + + + +
+ +

+ +
+2 Command Line Tools +

+ +

+The main product delivered by ESMF is the ESMF library that allows application +developers to write programs based on the ESMF API. In addition to the +programming library, ESMF distributions come with a small set of command line +tools (CLT) that are of general interest to the community. These CLTs utilize +the ESMF library to implement features such as printing general information +about the ESMF installation, or generating regrid weight files. The provided +ESMF CLTs are intended to be used as standard command line tools. + +

+The bundled ESMF CLTs are built and installed during the usual ESMF +installation process, which is described in detail in the ESMF User's Guide +section "Building and Installing the ESMF". After installation, the +CLTs will be located in the ESMF_APPSDIR directory, which can +be found as a Makefile variable in the esmf.mk file. The esmf.mk +file can be found in the ESMF_INSTALL_LIBDIR directory after a +successful installation. The ESMF User's Guide discusses the esmf.mk +mechanism to access the bundled CLTs in more detail in section +"Using Bundled ESMF Command Line Tools". + +

+The following sections provide in-depth documentation of the bundled ESMF +CLTs. In addition, each tool supports the standard + --help command line argument, providing a brief description of how +to invoke the program. + +

+ +

+ +
+11 ESMF_PrintInfo +

+ +

+ +

+11.1 Description +

+ +

+The ESMF_PrintInfo command line tool that prints basic information about the +ESMF installation to stdout. + +

+The command line tool usage is as follows: + +

+

+ESMF_PrintInfo  [--help]
+
+where
+  --help     prints a brief usage message
+
+` + +

+ +
+12 ESMF_RegridWeightGen +

+ +

+ +

+12.1 Description +

+ +

+This section describes the offline regrid weight generation application provided by ESMF (for a description of ESMF regridding in general see Section 24.2). Regridding, also called remapping or interpolation, is the process of changing the grid that underlies data values while preserving qualities of the original data. Different kinds of transformations are appropriate for different problems. Regridding may be needed when communicating data between Earth system model components such as land and atmosphere, or between different data sets to support operations such as visualization. + +

+Regridding can be broken into two stages. The first stage is generation of an interpolation weight matrix that describes how points in +the source grid contribute to points in the destination grid. The second stage is the multiplication of values on the source grid by the +interpolation weight matrix to produce values on the destination grid. This is implemented as a parallel sparse matrix multiplication. + +

+There are two options for accessing ESMF regridding functionality: integrated and offline. Integrated regridding is a process whereby interpolation +weights are generated via subroutine calls during the execution of the user's code. The integrated regridding can also perform the parallel sparse +matrix multiplication. In other words, ESMF integrated regridding allows a user to perform the whole process of interpolation within their code. +For a further description of ESMF integrated regridding please see Section 26.3.25. +In contrast to integrated regridding, +offline regridding is a process whereby interpolation weights are generated by a separate ESMF command line tool, not within the user code. The ESMF offline +regridding tool also only generates the interpolation matrix, the user is responsible for reading in this matrix and doing the actual interpolation + (multiplication by the sparse matrix) in their code. The rest of this section further describes ESMF offline regridding. + +

+For a discussion of installing and accessing ESMF command line tools such as this one please see the beginning of this part of the reference manual (Section II) or for the quickest approach to just building and accessing the command line tools please refer to the "Building and using bundled ESMF Command Line Tools" Section in the ESMF User's Guide. + +

+This application requires the NetCDF library to read the grid files and to write out the weight files in NetCDF format. To compile ESMF with the NetCDF library, please refer to the "Third Party Libraries" Section in the ESMF User's Guide for more information. + +

+As described above, this tool reads in +two grid files and outputs weights for interpolation + between the two grids. The input and output files are all in NetCDF format. The grid files can be defined in five +different formats: the SCRIP format 12.8.1 as is used as an input to SCRIP [13], the CF convension single-tile grid file 12.8.3 following the +CF metadata conventions, the GRIDSPEC Mosaic file 12.8.5 following the proposed GRIDSPEC standard, +the ESMF unstructured grid format 12.8.2 or the proposed CF unstructured grid data model (UGRID) 12.8.4. GRIDSPEC is a proposed CF extension for the annotation of complex Earth system grids. In the latest ESMF library, we added support for multi-tile GRIDSPEC Mosaic file with non-overlapping tiles. For UGRID, we support the 2D flexible mesh topology with mixed triangles and quadrilaterals and fully 3D unstructured mesh topology with hexahedrons and tetrahedrons. + +

+The ESMF_RegridWeightGen command line tool can detect the type of the input grid files automatically, so the specification of source and destination grid file type arguments is optional. However, these arguments (-t, --src_type or --dst_type) can be provided to override the auto-detection. If not explicitly specified, the rule to determine the file format is the following: + +

+ +

    +
  • ESMF_FILEFORMAT_UGRID: a variable with attribute "cf_role" or "standard_name" set to "mesh_topology" +
  • +
  • ESMF_FILEFORMAT_MOSAIC: a variable with attribute "standard_name" set to "grid_mosaic_spec" +
  • +
  • ESMF_FILEFORMAT_TILE: a varilable with attribute "standard_name" set to "grid_tile_spec" +
  • +
  • ESMF_FILEFORMAT_ESMFMESH: variables nodeCoords and elementConn exist +
  • +
  • ESMF_FILEFORMAT_SCRIP: variables grid_corner_lon and grid_corner_lat exist +
  • +
  • ESMF_FILEFORMAT_CFGRID: variables with attributes "degree_north" and "degree_east" (or similar) exist, and other formats aren't matched +
  • +
+ +

+This command line tool can do regrid weight generation from a global or regional source grid to a global or regional destination grid. +As is true with many global models, this application currently assumes the latitude and longitude values refer to positions on a perfect sphere, as opposed to a more complex and accurate representation of the Earth's true shape such as would be used in a GIS system. (ESMF's current user base doesn't require this level of detail in representing the Earth's shape, but it could be added in the future if necessary.) + +

+The interpolation weights generated by this application are output to a NetCDF file (specified by the "-w" or "--weight" +keywords). Two type of weight files are supported: the SCRIP format is the same as that generated by SCRIP, see Section 12.9 for a description of the format; and a simple weight file containing only the weights and the source and destination grid indices (In ESMF +term, these are the factorList and factorIndexList generated by the ESMF weight calculation function ESMF_FieldRegridStore(). +Note that the sequence of the weights in the file can +vary with the number of processors used to run the application. This means that two weight files generated by using different +numbers of processors can contain exactly the same interpolation matrix, but can appear different in a direct line by line +comparison (such as would be done by ncdiff). The interpolation weights can be generated with +the bilinear, patch, nearest neighbor, first-order conservative, or second-order conservative methods described in Section 12.3. + +

+Internally this application uses the ESMF public API to generate the interpolation weights. +If a source or destination grid is a single tile logically rectangular grid, then ESMF_GridCreate()31.3.8 +is used to create an ESMF_Grid object. The cell center +coordinates of the input grid are put into the center stagger location (ESMF_STAGGERLOC_CENTER). +In addition, the corner coordinates are also put into the corner stagger location +(ESMF_STAGGERLOC_CORNER) for conservative regridding. If a grid contains multiple logically rectangular tiles +connected with each other by edges, such as a Cubed Sphere grid, the grid can be represented as a multi-tile ESMF_Grid object created +using ESMF_GridCreateMosaic() 31.3.12. Such a grid is stored in the GRIDSPEC Mosaic and tile file format. 12.8.5 +The method ESMF_MeshCreate() 33.3.8 +is used to create an ESMF_Mesh object, if the +source or destination grid is an unstructured grid. When making this call, +the flag convert3D is set to TRUE to convert the 2D coordinates into 3D Cartesian coordinates. +Internally ESMF_FieldRegridStore() is used to generate the weight table and indices table representing the interpolation matrix. + +

+ +

+
+12.2 Regridding Options +

+ +

+The offline regrid weight generation application supports most of the options available in the rest of the ESMF regrid system. The following is a description of these options as relevant to the application. For a more in-depth description see Section 24.2. + +

+ +

+
+12.2.1 Poles +

+The regridding occurs in 3D to avoid +problems with periodicity and with the pole singularity. This application +supports four options for handling the pole region (i.e. the empty area above the top row of the source grid or below +the bottom row of the source grid). Note that all of these pole options currently only work for logically rectangular grids (i.e. SCRIP format grids with grid_rank=2 or GRIDSPEC single-tile format grids). The first option is to leave the pole region empty ("-p none"), in this +case if a destination point lies above or below the +top row of the source grid, it will fail to map, yielding an error (unless "-i" is specified). +With the next two options, the pole region is handled by constructing +an artificial pole in the center of the top and bottom row of grid points and then filling +in the region from this pole to the edges of the source grid with triangles. +The pole is located at the average of the position of the points surrounding +it, but moved outward to be at the same radius as the rest of the points +in the grid. The difference between these two artificial pole options is what value is used at the pole. + The default pole option ("-p all") sets the value at the pole to be the average of the values +of all of the grid points surrounding the pole. For the other option ("-p N"), the user chooses +a number N from 1 to the number of source grid points around the pole. For +each destination point, the value at the pole is then the average of the N source points +surrounding that destination point. For the last pole option ("-p teeth") no artificial pole is constructed, instead the +pole region is covered by connecting points across the top and bottom row of the source Grid into triangles. As +this makes the top and bottom of the source sphere flat, for a big enough difference between the size of +the source and destination pole regions, this can still result in unmapped destination points. +Only pole option "none" is currently supported with the conservative interpolation methods (e.g. "-m conserve") and with the +nearest neighbor interpolation methods ("-m nearestdtos" and "-m neareststod"). + +

+ +

+
+12.2.2 Masking +

+ Masking is supported for both the logically rectangular grids and the unstructured grids. +If the grid file is in the SCRIP format, the variable "grid_imask" is used as the mask. +If the value is set to 0 for a grid point, then that point is considered masked out and +won't be used in the weights generated by the application. If the grid file is in the ESMF format, the variable "element Mask" is used as the mask. For a grid defined in the GRIDSPEC +single-tile or multi-tile grid or in the UGRID convention, there is no mask variable defined. +However, a GRIDSPEC single-tile file or a UGRID file may contain both the grid definition and the data. +The grid mask is usually constructed using the missing values defined in the data variable. +The regridding application provides the argument "--src_missingvalue" or +"--dst_missingvalue" for users to specify the variable name from where the mask can be +constructed. + +

+ +

+
+12.2.3 Extrapolation +

+The ESMF_RegridWeightGen application supports a number of kinds of extrapolation to fill in points not mapped by the regrid method. +Please see the sections starting with section 24.2.11 for a description of these methods. When using the application +an extrapolation method is specified by using the "--extrap_method" flag. For the inverse distance weighted average method (nearestidavg), +the number of source locations is specified using the "--extrap_num_src_pnts" flag, and the distance exponent is specified using +the "--extrap_dist_exponent" flag. For the creep fill method (creep), the number of creep levels is specified using the "--extrap_num_levels" flag. + +

+ +

+
+12.2.4 Unmapped destination points +

+If a destination point can't be mapped, then the default behavior of the application is to stop with an error. By specifying "-i" or the equivalent "--ignore_unmapped " the user can cause the application to ignore unmapped destination points. In this case, the output matrix won't contain entries for the unmapped destination points. Note that the unmapped point detection doesn't +currently work for nearest destination to source method ("-m nearestdtos"), so when using that method it is as if “-i” is always on. + +

+ +

+
+12.2.5 Line type +

+ Another variation in the regridding supported with spherical grids is line type. This is controlled by the "--line_type" or “-l” flag. This switch allows the user to select the path of the line which connects +two points on a sphere surface. This in turn controls the path along which distances are calculated and the shape of +the edges that make up a cell. Both of these quantities can influence how interpolation weights are calculated, for example in +bilinear interpolation the distances are used to calculate the weights and the cell edges are used to determine to which source +cell a destination point should be mapped. + +

+ESMF currently supports two line types: “cartesian” and “greatcircle”. The “cartesian” option +specifies that the line between two points follows a straight path through the 3D Cartesian space in which the sphere is embedded. +Distances are measured along this 3D Cartesian line. Under this option cells are approximated by planes in 3D space, and their boundaries are +3D Cartesian lines between their corner points. The “greatcircle” option specifies that the line between two points follows +a great circle path along the sphere surface. (A great circle is the shortest path between two points on a sphere.) +Distances are measured along the great circle path. Under this option cells are on the sphere surface, and their boundaries +are great circle paths between their corner points. + +

+ +

+
+12.3 Regridding Methods +

+ This regridding application can be used to generate bilinear, patch, nearest neighbor, first-order conservative, or second-order conservative +interpolation weights. The following is a description of these interpolation methods as relevant to the offline weight generation application. For a more in-depth description see Section 24.2. + +

+ +

+
+12.3.1 Bilinear +

+ The default interpolation method for the weight generation application is bilinear. The algorithm used by this application to +generate the bilinear weights is the standard one found in many textbooks. Each destination point is mapped to a location +in the source Mesh, the position of the destination point relative to the source points surrounding it is used to calculate the interpolation weights. A restriction on +bilinear interpolation is that ESMF doesn't support self-intersecting cells (e.g. a cell twisted into a bow tie) in the source grid. + +

+ +

+
+12.3.2 Patch +

+This application can also be used to generate patch interpolation weights. Patch +interpolation is the ESMF version of a technique called "patch recovery" commonly +used in finite element modeling [25] [22]. It typically results in better approximations to values and derivatives when compared to bilinear interpolation. +Patch interpolation works by constructing multiple polynomial patches to represent +the data in a source element. For 2D grids, these polynomials +are currently 2nd degree 2D polynomials. The interpolated value at the destination point + is the weighted average of the values of the patches at that point. + +

+The patch interpolation process works as follows. +For each source element containing a destination point +we construct a patch for each corner node that makes up the element (e.g. 4 patches for +quadrilateral elements, 3 for triangular elements). To construct a polynomial patch for +a corner node we gather all the elements around that node. +(Note that this means that the patch interpolation weights depends on the source +element's nodes, and the nodes of all elements neighboring the source element.) +We then use a least squares fitting algorithm to choose the set of coefficients +for the polynomial that produces the best fit for the data in the elements. +This polynomial will give a value at the destination point that fits the source data +in the elements surrounding the corner node. We then repeat this process for each +corner node of the source element generating a new polynomial for each set of elements. +To calculate the value at the destination point we do a weighted average of the values +of each of the corner polynomials evaluated at that point. The weight for a corner's +polynomial is the bilinear weight of the destination point with regard to that corner. + +

+The patch method has a larger stencil than the bilinear, for this reason the patch weight matrix can be correspondingly larger +than the bilinear matrix (e.g. for a quadrilateral grid the patch matrix is around 4x the size of + the bilinear matrix). This can be an issue when performing a regrid weight generation operation close to the memory +limit on a machine. + +

+The patch method does not guarantee that after regridding the range of values in the destination field is within the range of +values in the source field. For example, if the mininum value in the source field is 0.0, then it's possible that after regridding with the +patch method, the destination field will contain values less than 0.0. + +

+This method currently doesn't support self-intersecting cells (e.g. a cell twisted into a bow tie) in the source grid. + +

+ +

+
+12.3.3 Nearest neighbor +

+The nearest neighbor interpolation options work by associating a point in one set with the closest point in another set. If two points are equally +close then the point with the smallest index is arbitrarily used (i.e. the point with that would have the smallest index in the weight matrix). There are two +versions of this type of interpolation available in the regrid weight generation application. One of these is the nearest source to destination +method ("-m neareststod"). In this method each destination point is mapped to the closest source point. The other of these is the +nearest destination to source method ("-m nearestdtos"). In this method each source point is mapped to the closest destination point. Note +that with this method the unmapped destination point detection doesn't work, so no error will be returned even if there are destination points +which don't map to any source point. + +

+ +

+
+12.3.4 First-order conservative +

+ The main purpose of this method is to preserve the integral of the field across the interpolation from source to destination. + (For a more in-depth description of what this preservation of the integral (i.e. conservation) means please see section 12.4.) In this method the value across each source cell is treated as a constant, so it will typically have a larger + interpolation error than the bilinear or patch methods. The first-order method used here is similar to that described in the following paper [28]. + +

+By default (or if "--norm_type dstarea"), the weight $w_{ij}$ for a particular source cell $i$ and destination cell $j$ are calculated as +$w_{ij}=f_{ij} * A_{si}/A_{dj}$. +In this equation $f_{ij}$ is the fraction of the source cell $i$ contributing to destination cell $j$, and $A_{si}$ and $A_{dj}$ are the areas of the source and +destination cells. If "--norm_type fracarea", then the weights are further divided by the destination fraction. In other words, in that case +$w_{ij}=f_{ij} * A_{si}/(A_{dj}*D_j)$ where $D_j$ is fraction of the destination cell that intersects the unmasked source grid. + +

+To see a description of how the different normalization options affect the values and integrals produced by the conservative methods see section 12.5. For a grid on a sphere this method uses great circle cells, for a description of potential problems with these see 24.2.9. + +

+ +

+
+12.3.5 Second-order conservative +

+ Like the first-order conservative method, this method's main purpose is to preserve the integral of the field across the interpolation from source to destination. + (For a more in-depth description of what this preservation of the integral (i.e. conservation) means please see section 12.4.) The difference between the first and second-order conservative methods is that the second-order takes the source gradient into account, so + it yields a smoother destination field that typically better matches the source field. This difference between the first and second-order methods + is particularly apparent when going from a coarse source grid to a finer destination grid. Another difference is that the second-order method + does not guarantee that after regridding the range of values in the destination field is within the range of + values in the source field. For example, if the mininum value in the source field is 0.0, then it's possible that after regridding with the + second-order method, the destination field will contain values less than 0.0. The implementation of this method is based on the one described in this paper [19]. + +

+The weights for second-order are calculated in a similar manner to first-order 12.3.4 with additional weights that take into account the gradient across the source cell. + +

+To see a description of how the different normalization options affect the values and integrals produced by the conservative methods see section 12.5. For a grid on a sphere this method uses great circle cells, for a description of potential problems with these see 24.2.9. + +

+ +

+
+12.4 Conservation +

+ Conservation means that the following equation will hold: + +$\sum^{all-source-cells}(V_{si}*A'_{si}) = \sum^{all-destination-cells}(V_{dj}*A'_{dj})$, where + V is the variable being regridded and A is the area of a cell. + The subscripts s and d refer to source and destination values, and the i and j are the source + and destination grid cell indices (flattening the arrays to 1 dimension). + +

+There are a couple of options for how the areas (A) in the proceding equation can be calculated. By default, ESMF calculates the areas. For a grid on a sphere, +areas are calculated by connecting the corner coordinates of each grid cell (obtained from the grid file) with great circles. For a Cartesian grid, areas are calculated +in the typcial manner for 2D polygons. If the user specifies the user area's option ("--user_areas"), then weights will be adjusted so that the equation above +will hold for the areas provided in the grid files. In either case, the areas output to the weight file are the ones for which the weights have been adjusted to conserve. + +

+ +

+
+12.5 The effect of normalization options on integrals and values produced by conservative methods +

+ It is important to note that by default (i.e. using destination area normalization) conservative regridding doesn't normalize the interpolation weights by the destination fraction. This means that for a destination grid which only partially overlaps the source grid the destination field which is output from the regrid operation should be divided by the corresponding destination fraction to yield the true interpolated values for cells which are only partially covered by the source grid. +The fraction also needs to be included when computing the total source and destination integrals. To include the fraction in the conservative weights, the user can specify the fraction area normalization type. This can be done by specifying "--norm_type fracarea” on the command line. + +

+For weights generated using destination area normalization (either by not specifying any normalization type or by specifying "--norm_type dstarea"), +the following pseudo-code shows how to adjust a destination field (dst_field) by the destination fraction (dst_frac) called frac_b in the weight file: + +

+

+ for each destination element i
+    if (dst_frac(i) not equal to 0.0) then
+       dst_field(i)=dst_field(i)/dst_frac(i)
+    end if
+ end for
+
+ +

+For weights generated using destination area normalization (either by not specifying any normalization type or by specifying "--norm_type dstarea"), +the following pseudo-code shows how to compute the total destination integral (dst_total) given the destination field values (dst_field) resulting +from the sparse matrix multiplication of the weights in the weight file by the source field, the destination area (dst_area) called area_b in the +weight file, and the destination fraction (dst_frac) called frac_b in the weight file. As in the previous paragraph, it also +shows how to adjust the destination field (dst_field) resulting from the sparse matrix multiplication by the fraction +(dst_frac) called frac_b in the weight file: + +

+

+ dst_total=0.0
+ for each destination element i
+    if (dst_frac(i) not equal to 0.0) then
+       dst_total=dst_total+dst_field(i)*dst_area(i)
+       dst_field(i)=dst_field(i)/dst_frac(i)
+       ! If mass computed here after dst_field adjust, would need to be:
+       ! dst_total=dst_total+dst_field(i)*dst_area(i)*dst_frac(i)
+    end if
+ end for
+
+ +

+For weights generated using fraction area normalization (set by specifying "--norm_type fracarea"), no adjustment of the destination field (dst_field) by the destination fraction is necessary. The following pseudo-code shows how to compute the total destination integral (dst_total) given the destination field values (dst_field) resulting + from the sparse matrix multiplication of the weights in the weight file by the source field, the destination area (dst_area) called area_b in the +weight file, and the destination fraction (dst_frac) called frac_b in the weight file: + +

+

+ dst_total=0.0
+ for each destination element i
+       dst_total=dst_total+dst_field(i)*dst_area(i)*dst_frac(i)
+ end for
+
+ +

+For either normalization type, the following pseudo-code shows how to compute the total source integral (src_total) given the source field values (src_field), the source area (src_area) called area_a in the weight file, and the source fraction (src_frac) called frac_a in the weight file: + +

+

+ src_total=0.0
+ for each source element i
+    src_total=src_total+src_field(i)*src_area(i)*src_frac(i)
+ end for
+
+ +

+ +

+
+12.6 Usage +

+ +

+The command line arguments are all keyword based. Both the long keyword prefixed with '--' or the +one character short keyword prefixed with '-' are supported. The format to run the application is +as follows: + +

+

+ESMF_RegridWeightGen  
+        --source|-s src_grid_filename
+        --destination|-d dst_grid_filename
+        --weight|-w out_weight_file
+        [--method|-m bilinear|patch|nearestdtos|neareststod|conserve|conserve2nd]
+        [--pole|-p none|all|teeth|1|2|..]
+        [--line_type|-l cartesian|greatcircle]
+        [--norm_type dstarea|fracarea]
+        [--extrap_method none|neareststod|nearestidavg|nearestd|creep|creepnrstd]
+        [--extrap_num_src_pnts <N>]
+        [--extrap_dist_exponent <P>]
+        [--extrap_num_levels <L>]
+        [--ignore_unmapped|-i]
+        [--ignore_degenerate]
+        [--src_type SCRIP|ESMFMESH|UGRID|CFGRID|GRIDSPEC|MOSAIC|TILE]
+        [--dst_type SCRIP|ESMFMESH|UGRID|CFGRID|GRIDSPEC|MOSAIC|TILE]
+        [-t SCRIP|ESMFMESH|UGRID|CFGRID|GRIDSPEC|MOSAIC|TILE]
+        [-r]
+        [--src_regional]
+        [--dst_regional]
+        [--64bit_offset]
+        [--netcdf4]
+        [--src_missingvalue var_name]
+        [--dst_missingvalue var_name]
+        [--src_coordinates lon_name,lat_name]
+        [--dst_coordinates lon_name,var_name]
+        [--tilefile_path filepath]
+        [--src_loc center|corner]
+        [--dst_loc center|corner]
+        [--user_areas]
+        [--weight_only]
+        [--check]
+        [--checkFlag]
+        [--no_log]
+        [--help]
+        [--version]
+        [-V]
+
+where:
+  --source or -s      - a required argument specifying the source grid
+                        file name
+
+  --destination or -d - a required argument specifying the destination
+                        grid file name
+
+  --weight or -w      - a required argument specifying the output regridding
+                        weight file name
+
+  --method or -m      - an optional argument specifying which interpolation
+                        method is used. The value can be one of the following:
+
+                        bilinear     - for bilinear interpolation, also the
+                                       default method if not specified.
+                        patch        - for patch recovery interpolation
+                        neareststod  - for nearest source to destination interpolation
+                        nearestdtos  - for nearest destination to source interpolation
+                        conserve     - for first-order conservative interpolation
+                        conserve2nd  - for second-order conservative interpolation
+
+  --pole or -p        - an optional argument indicating how to extrapolate 
+                        in the pole region. 
+                        The value can be one of the following:
+
+                        none  - No pole, the source grid ends at the top
+                                (and bottom) row of nodes specified in
+                                <source grid>.
+                        all   - Construct an artificial pole placed in the
+                                center of the top (or bottom) row of nodes,
+                                but projected onto the sphere formed by the
+                                rest of the grid. The value at this pole is
+                                the average of all the pole values. This
+                                is the default option.
+
+                        teeth - No new pole point is constructed, instead
+                                the holes at the poles are filled by
+                                constructing triangles across the top and
+                                bottom row of the source Grid. This can be
+                                useful because no averaging occurs, however,
+                                because the top and bottom of the sphere are
+                                now flat, for a big enough mismatch between
+                                 the size of the destination and source pole
+                                regions, some destination points may still
+                                not be able to be mapped to the source Grid.
+
+                        <N>   - Construct an artificial pole placed in the
+                                center of the top (or bottom) row of nodes,
+                                but projected onto the sphere formed by the
+                                rest of the grid. The value at this pole is
+                                the average of the N source nodes next to
+                                the pole and surrounding the destination
+                                point (i.e.  the value may differ for each
+                                destination point. Here N ranges from 1 to
+                                the number of nodes around the pole.
+
+    --line_type 
+         or
+         -l           - an optional argument indicating the type of path
+                        lines (e.g. cell edges) follow on a spherical
+                        surface. The default value depends on the regrid
+                        method. For non-conservative methods the default is
+                        cartesian. For conservative methods the default is
+                        greatcircle. 
+
+    --norm_type       - an optional argument indicating the type of normal-
+                        ization to do when generating conservative weights. 
+                        The default value is dstarea.
+
+    --extrap_method   - an optional argument specifying which extrapolation
+                        method is used to handle unmapped destination locations.
+                        The value can be one of the following:
+
+                        none         - no extrapolation method should be used.
+                                       This is the default. 
+
+                        neareststod  - nearest source to destination. Each
+                                       unmapped destination location is mapped 
+                                       to the closest source location. This 
+                                       extrapolation method is not supported with 
+                                       conservative regrid methods (e.g. conserve).
+        
+                        nearestidavg - inverse distance weighted average. 
+                                       The value of each unmapped destination location
+                                       is the weighted average of the closest N 
+                                       source locations. The weight is the reciprocal 
+                                       of the distance of the source from the destination
+                                       raised to a power P. All the weights contributing 
+                                       to one destination point are normalized so that 
+                                       they sum to 1.0. The user can choose N and P by
+                                       using --extrap_num_src_pnts and 
+                                       --extrap_dist_exponent, but defaults are 
+                                       also provided. This extrapolation method is not 
+                                       supported with conservative regrid methods
+                                       (e.g. conserve).
+
+                        nearestd     - nearest mapped destination to 
+                                       unmapped destination. Each
+                                       unmapped destination location is mapped 
+                                       to the closest mapped destination location. This 
+                                       extrapolation method is not supported with 
+                                       conservative regrid methods (e.g. conserve).
+
+                        creep        - creep fill. 
+                                       Here unmapped destination points are filled by 
+                                       moving values from mapped locations to neighboring 
+                                       unmapped locations. The value filled into a 
+                                       new location is the average of its already filled
+                                       neighbors' values. This process is repeated for 
+                                       the number of levels indicated by the 
+                                       --extrap_num_levels flag. This extrapolation
+                                       method is not supported with conservative 
+                                       regrid methods (e.g. conserve).
+
+                        creepnrstd   - creep fill with nearest destination.  
+                                       Here unmapped destination points are filled by 
+                                       first doing a creep fill, and then filling the 
+                                       remaining unmapped points by using 
+                                       the nearest destination method (both of these
+                                       methods are described in the entries above). 
+                                       This extrapolation method is not supported 
+                                       with conservative regrid methods (e.g. conserve).
+                                       
+
+    --extrap_num_src_pnts - an optional argument specifying how many source points
+                            should be used when the extrapolation method is 
+                            nearestidavg. If not specified, the default is 8.
+
+    --extrap_dist_exponent - an optional argument specifying the exponent that 
+                             the distance should be raised to when the 
+                             extrapolation method is nearestidavg. If not specified, 
+                             the default is 2.0.
+
+    --extrap_num_levels - an optional argument specifying how many levels should
+                          be filled for level based extrapolation methods (e.g. creep).
+
+    --ignore_unmapped
+           or
+           -i         - ignore unmapped destination points. If not specified
+                        the default is to stop with an error if an unmapped
+                        point is found.
+
+    --ignore_degenerate - ignore degenerate cells in the input grids. If not specified
+                        the default is to stop with an error if an degenerate
+                        cell is found.
+
+    --src_type        - an optional argument specifying the source grid file type.
+                        The value can be one of SCRIP, ESMFMESH, UGRID, CFGRID, GRIDSPEC, MOSAIC or TILE.
+                        If neither --src_type nor -t is given, the source grid file type will be
+                        determined automatically. (Usually it is unnecessary to provide --src_type,
+                        but it can be specified when the automatic file type determination fails.)
+
+    --dst_type        - an optional argument specifying the destination grid file type.
+                        The value can be one of SCRIP, ESMFMESH, UGRID, CFGRID, GRIDSPEC, MOSAIC or TILE.
+                        If neither --dst_type nor -t is given, the destination grid file type will be
+                        determined automatically. (Usually it is unnecessary to provide --dst_type,
+                        but it can be specified when the automatic file type determination fails.)
+
+    -t                - an optional argument specifying the file types for both the source
+                        and the destination grid files.
+                        The value can be one of SCRIP, ESMFMESH, UGRID, CFGRID, GRIDSPEC, MOSAIC or TILE.
+                        If -t is given, then neither --src_type nor --dst_type can be given.
+
+    -r                - an optional argument specifying that the source and
+                        destination grids are regional grids.  If the argument
+                        is not given, the grids are assumed to be global.
+
+    --src_regional    - an optional argument specifying that the source is
+                        a regional grid and the destination is a global grid.
+
+    --dst_regional    - an optional argument specifying that the destination
+                        is a regional grid and the source is a global grid.
+
+    --64bit_offset    - an optional argument specifying that the weight file
+                        will be created in the NetCDF 64-bit offset format
+                        to allow variables larger than 2GB.  Note the 64-bit
+                        offset format is not supported in the NetCDF version
+                        earlier than 3.6.0.  An error message will be generated
+                        if this flag is specified while the application is
+                        linked with a NetCDF library earlier than 3.6.0.
+
+    --netcdf4         - an optional argument specifying that the output weight
+                        will be created in the NetCDF4 format.  This option 
+                        only works with NetCDF library version 4.1 and above 
+                        that was compiled with the NetCDF4 file format enabled 
+                        (with HDF5 compression). An error message will be 
+                        generated if these conditions are not met.
+
+    --src_missingvalue - an optional argument that defines the variable name 
+                         in the source grid file if the file type is either CF Convension
+                         single-tile or UGRID.  The regridder will generate a mask using 
+                         the missing values of the data variable.  The missing 
+                         value is defined using an attribute called "_FillValue" 
+                         or "missing_value". 
+     --dst_missingvalue - an optional argument that defines the variable name
+                         in the destination grid file if the file type is
+                         CF Convension single-tile or UGRID.  The regridder will generate a mask using
+                         the missing values of the data variable.  The missing
+                         value is defined using an attribute called "_FillValue"
+                         or "missing_value"
+
+    --src_coordinates - an optional argument that defines the longitude and
+                        latitude variable names in the source grid file if
+                        the file type is CF Convension single-tile.  The variable names are
+                        separated by comma.  This argument is required in case
+                        there are multiple sets of coordinate variables defined
+                        in the file.  Without this argument, the offline regrid
+                        application will terminate with an error message when
+                        multiple coordinate variables are found in the file.
+
+    --dst_coordinates - an optional argument that defines the longitude and
+                        latitude variable names in the destination grid file
+                        if the file type is CF Convension single-tile.  The variable names are
+                        separated by comma.  This argument is required in case
+                        there are multiple sets of coordinate variables defined
+                        in the file.  Without this argument, the offline regrid
+                        application will terminate with an error message when
+                        multiple coordinate variables are found in the file.
+
+    --tilefile_path   - the alternative file path for the tile files when either the source
+                        or the destination grid is a GRIDSPEC Mosaic grid.  The path can
+                        be either relative or absolute.  If it is relative, it is relative
+                        to the working directory.  When specified, the gridlocation variable
+                        defined in the Mosaic file will be ignored. 
+                
+    --src_loc         - an optional argument indicating which part of a source
+                        grid cell to use for regridding. Currently, this flag is 
+                        only required for non-conservative regridding when the 
+                        source grid is an unstructured grid in ESMF or UGRID format.
+                        For all other cases, only the center location is supported.
+                        The value can be one of the following:
+
+                        center - Regrid using the center location of each grid cell.
+
+                        corner - Regrid using the corner location of each grid cell.
+
+    --dst_loc         - an optional argument indicating which part of a destination
+                        grid cell to use for regridding. Currently, this flag is 
+                        only required for non-conservative regridding when the 
+                        destination grid is an unstructured grid in ESMF or UGRID format.
+                        For all other cases, only the center location is supported.
+                        The value can be one of the following:
+
+                        center - Regrid using the center location of each grid cell.
+
+                        corner - Regrid using the corner location of each grid cell.
+
+
+    --user_areas      - an optional argument specifying that the conservation
+                        is adjusted to hold for the user areas provided in
+                        the grid files. If not specified, then the 
+                        conservation will hold for the ESMF calculated 
+                        (great circle) areas.
+                        Whichever areas the conservation holds for are output
+                        to the weight file.
+
+     --weight_only    - an optional argument specifying that the output weight file only 
+                        contains the weights and the source and destination grid's indices.
+
+     --check          - Check that the generated weights produce reasonable 
+                        regridded fields. This is done by calling ESMF_Regrid() 
+                        on an analytic source field using the weights generated 
+                        by this application.  The mean relative error between 
+                        the destination and analytic field is computed, as well 
+                        as the relative error between the mass of the source and 
+                        destination fields in the conservative case.
+
+     --checkFlag      - Turn on more expensive extra error checking during 
+                        weight generation.
+
+     --no_log         - Turn off the ESMF Log files.  By default, ESMF creates 
+                        multiple log files, one per PET.
+
+     --help           - Print the usage message and exit.
+
+     --version        - Print ESMF version and license information and exit.
+
+     -V               - Print ESMF version number and exit.
+
+ +

+ +

+12.7 Examples +

+ +

+The example below shows the command to generate a set of conservative interpolation weights between a global +SCRIP format source grid file (src.nc) and a global SCRIP format destination grid file (dst.nc). The weights +are written into file w.nc. In this case the +ESMF library and applications have been compiled using an MPI parallel communication library +(e.g. setting ESMF_COMM to openmpi) to enable it to run in parallel. To demonstrate running in parallel +the mpirun script is used to run the application in parallel on 4 processors. + +

+

+  mpirun -np 4 ./ESMF_RegridWeightGen -s src.nc -d dst.nc -m conserve -w w.nc
+
+ +

+The next example below shows the command to do the same thing as the previous example except for three changes. The first +change is this time the source grid is regional ("--src_regional"). The second change is that +for this example bilinear interpolation ("-m bilinear") is being used. Because bilinear is the default, we could also +omit the "-m bilinear". The third change is that in this example some of the destination points are expected to +not be found in the source grid, but the user is ok with that and just wants those points to not appear in the weight file instead of causing an error ("-i"). + +

+

+  mpirun -np 4 ./ESMF_RegridWeightGen -i --src_regional -s src.nc -d dst.nc \
+                 -m bilinear -w w.nc
+
+ +

+The last example shows how to use the missing values of a data variable to generate the +grid mask for a CF Convension single-tile file, how to specify the coordinate variable names +using "--src_coordinates" + and use user defined area for the conservative regridding. + +

+

+  mpirun -np 4 ./ESMF_RegridWeightGen -s src.nc -d dst.nc -m conserve \
+                 -w w.nc --src_missingvalue datavar \
+                 --src_coordinates lon,lat --user_areas
+
+ +

+In the above example, "datavar" is the variable name defined in the source grid that will + be used to construct the mask using its missing values. In addition, "lon" and "lat" are the +variable names for the longitude and latitude values, respectively. + +

+ +

+12.8 Grid File Formats +

+ +

+This section describes the grid file formats supported by ESMF. These are typically used either to describe grids to ESMF_RegridWeightGen or to create grids within ESMF. The following table summarizes the +features supported by each of the grid file formats. + +

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FeatureSCRIPESMF Unstruct.CF GridUGRIDGRIDSPEC Mosaic
Create an unstructured MeshYESYESNOYESNO
Create a logically-rectangular GridYESNOYESNOYES
Create a multi-tile GridNONONONOYES
2DYESYESYESYESYES
3DNOYESNOYESNO
Spherical coordinatesYESYESYESYESYES
Cartesian coordinatesNOYESNONONO
Non-conserv regrid on cornersNOYESNOYESYES
+ +
+ +

+The rest of this section contains a detailed descriptions of each grid file format along with a simple example of the format. + +

+ +

+
+12.8.1 SCRIP Grid File Format +

+ +

+A SCRIP format grid file is a NetCDF file for describing grids. This format is the same as is used by the SCRIP [13] +package, and so grid files which work with that package should also work here. +When using the ESMF API, the file format flag ESMF_FILEFORMAT_SCRIP can be used to indicate a file in this format. + +

+SCRIP format files are capable of storing either 2D logically rectangular +grids or 2D unstructured grids. The basic format for both of these grids is the same and they are distinguished by the +value of the grid_rank variable. Logically rectangular grids have grid_rank set to 2, +whereas unstructured grids have this variable set to 1. + +

+The following is a sample header of a logically rectangular grid file: + +

+

+netcdf remap_grid_T42 {
+dimensions:
+      grid_size = 8192 ;
+      grid_corners = 4 ;
+      grid_rank = 2 ;
+
+variables:
+      int grid_dims(grid_rank) ;
+      double grid_center_lat(grid_size) ;
+         grid_center_lat:units = "radians";
+      double grid_center_lon(grid_size) ;
+         grid_center_lon:units = "radians" ;
+      int grid_imask(grid_size) ;
+         grid_imask:units = "unitless" ;
+      double grid_corner_lat(grid_size, grid_corners) ;
+         grid_corner_lat:units = "radians" ;
+      double grid_corner_lon(grid_size, grid_corners) ;
+         grid_corner_lon:units ="radians" ;
+
+// global attributes:
+         :title = "T42 Gaussian Grid" ;
+}
+
+ +

+The grid_size dimension is the total number of cells in the grid; grid_rank refers to the +number of dimensions. In this case grid_rank is 2 for a 2D logically rectangular grid. +The integer array grid_dims gives the number of grid cells along each dimension. +The number of corners (vertices) in each grid cell is given by grid_corners. +The grid corner coordinates need to be listed in an order such that the corners are in counterclockwise +order. Also, note that if your grid has a variable number of corners on grid cells, then +you should set grid_corners to be the highest value and use redundant points +on cells with fewer corners. + +

+The integer array grid_imask is used to mask out grid cells which should +not participate in the regridding. The array values should be zero for any points +that do not participate in the regridding and one for all other points. +Coordinate arrays provide the latitudes and longitudes of cell centers +and cell corners. The unit of the coordinates can be either "radians" or "degrees". + +

+Here is a sample header from a SCRIP unstructured grid file: + +

+

+netcdf ne4np4-pentagons {
+dimensions:
+      grid_size = 866 ;
+      grid_corners = 5 ;
+      grid_rank = 1 ;
+variables:
+      int grid_dims(grid_rank) ;
+      double grid_center_lat(grid_size) ;
+         grid_center_lat:units = "degrees" ;
+      double grid_center_lon(grid_size) ;
+         grid_center_lon:units = "degrees" ;
+      double grid_corner_lon(grid_size, grid_corners) ;
+         grid_corner_lon:units = "degrees";
+         grid_corner_lon:_FillValue = -9999. ;
+      double grid_corner_lat(grid_size, grid_corners) ;
+         grid_corner_lat:units = "degrees" ;
+         grid_corner_lat:_FillValue = -9999. ;
+      int grid_imask(grid_size) ;
+         grid_imask:_FillValue = -9999. ;
+      double grid_area(grid_size) ;
+         grid_area:units = "radians^2" ;
+         grid_area:long_name = "area weights" ;
+}
+
+ +

+The variables are the same as described above, however, here grid_rank = 1. In this format there +is no notion of which cells are next to which, so to construct the unstructured mesh the connection between +cells is defined by searching for cells with the same corner coordinates. (e.g. the same grid_corner_lat +and grid_corner_lon values). + +

+Both the SCRIP grid file format and the SCRIP weight file format work with the SCRIP 1.4 tools. + +

+ +

+
+12.8.2 ESMF Unstructured Grid File Format (ESMFMESH) +

+ +

+ESMF supports a custom unstructured grid file format for describing meshes. This format is more compatible than the SCRIP format with the methods used to create an ESMF Mesh object, so less conversion needs to be done to create a Mesh. The ESMF format is thus more efficient than SCRIP when used with ESMF codes (e.g. the ESMF_RegridWeightGen application). When using the ESMF API, the file format flag ESMF_FILEFORMAT_ESMFMESH can be used to indicate a file in this format. + +

+The following is a sample header in the ESMF format followed by a description: + +

+

+netcdf mesh-esmf {
+dimensions:
+     nodeCount = 9 ;
+     elementCount = 5 ;
+     maxNodePElement = 4 ;
+     coordDim = 2 ;
+variables:
+     double nodeCoords(nodeCount, coordDim);
+            nodeCoords:units = "degrees" ;
+     int elementConn(elementCount, maxNodePElement) ;
+            elementConn:long_name = "Node Indices that define the element /
+                                     connectivity";
+            elementConn:_FillValue = -1 ;
+            elementConn:start_index = 1 ;
+     byte numElementConn(elementCount) ;
+            numElementConn:long_name = "Number of nodes per element" ;
+     double centerCoords(elementCount, coordDim) ;
+            centerCoords:units = "degrees" ;
+     double elementArea(elementCount) ;
+            elementArea:units = "radians^2" ;
+            elementArea:long_name = "area weights" ;
+     int elementMask(elementCount) ;
+            elementMask:_FillValue = -9999. ;
+// global attributes:
+            :gridType="unstructured";
+            :version = "0.9" ;
+
+ +

+In the ESMF format the NetCDF dimensions have the following meanings. The nodeCount dimension is the number of nodes in the mesh. + The elementCount dimension is the number of elements in the mesh. The maxNodePElement dimension is the maximum number + of nodes in any element in the mesh. For example, in a mesh containing just triangles, then maxNodePElement would be 3. However, + if the mesh contained one quadrilateral then maxNodePElement would need to be 4. The coordDim dimension is the number of dimensions + of the points making up the mesh (i.e. the spatial dimension of the mesh). For example, a 2D planar mesh would have coordDim equal to 2. + +

+In the ESMF format the NetCDF variables have the following meanings. The nodeCoords variable contains the coordinates for each node. + nodeCoords is a two-dimensional array of dimension (nodeCount,coordDim). + For a 2D Grid, coordDim is 2 and the grid can be either spherical or Cartesian. If the units + attribute is either degrees or radians, it is spherical. nodeCoords(:,1) contains +the longitude coordinates and nodeCoords(:,2) contains the latitude coordinates. If the value of +the units attribute is km, kilometers or meters, the grid is in 2D Cartesian +coordinates. nodeCoords(:,1) contains the x coordinates and + nodeCoords(:,2) contains the y coordinates. + The same order applies to centerCoords. + For a 3D Grid, coordDim is 3 and the grid is assumed to be Cartesian. nodeCoords(:,1) contains the x coordinates, nodeCoords(:,2) contains the y coordinates, + and nodeCoords(:,3) contains the z coordinates. The same order applies to centerCoords. +A 2D grid in the Cartesian coordinate can only be regridded into another 2D grid in the Cartesian coordinate. + +

+The elementConn variable describes how the nodes are connected together to form each element. For each element, this variable contains a list of indices into the nodeCoords variable pointing to the nodes which make up that + element. By default, the index is 1-based. It can be changed to 0-based by adding an attribute +start_index of value 0 to the elementConn variable. The order of the indices describing the element is important. + The proper order for elements available in an ESMF mesh can be found in Section 33.2.1. The file format does support 2D polygons with more + corners than those in that section, but internally these are broken into triangles. For these polygons, the corners should + be listed such that they are in counterclockwise order around the element. +elementConn can be either a 2D array or a 1D array. If it is a 2D array, the second + dimension of the elementConn variable has to be the size of the largest number of nodes in any element (i.e. maxNodePElement), the actual number of + nodes in an element is given by the numElementConn variable. For a given dimension (i.e. coordDim) the number of nodes in the element + indicates the element shape. For example in 2D, if numElementConn is 4 then the element is a quadrilateral. In 3D, if numElementConn is 8 + then the element is a hexahedron. + +

+If the grid contains some elements with large number of edges, using a 2D array for elementConn could take a lot of space. +In that case, elementConn can be represented as a 1D array that stores the edges of all the elements continuously. When elementConn is a 1D array, the dimension maxNodePElement is no longer needed, instead, a new dimension variable connectionCount +is required to define the size of elementConn. The value of connectionCount is the sum of all the values in numElementConn. + +

+The following is an example grid file using 1D array for elementConn: + +

+

+netcdf catchments_esmf1 {
+dimensions:
+        nodeCount = 1824345 ;
+        elementCount = 68127 ;
+        connectionCount = 18567179 ;
+        coordDim = 2 ;
+variables:
+        double nodeCoords(nodeCount, coordDim) ;
+                nodeCoords:units = “degrees” ;
+        double centerCoords(elementCount, coordDim) ;
+                centerCoords:units = “degrees” ;
+        int elementConn(connectionCount) ;
+                elementConn:polygon_break_value = -8 ;
+                elementConn:start_index = 0. ;
+        int numElementConn(elementCount) ;
+}
+
+ +

+In some cases, one mesh element may contain multiple polygons and these polygons are separated by a special value defined in the attribute + polygon_break_value. + +

+The rest of the variables in the format are optional. The centerCoords variable gives the coordinates of the center of the corresponding element. + This variable is used by ESMF for non-conservative interpolation on the data field residing at the center of the elements. The elementArea variable gives the area (or volume in 3D) of the corresponding element. This + area is used by ESMF during conservative interpolation. If not specified, ESMF calculates the area (or volume) based on the coordinates of the nodes + making up the element. The final variable is the elementMask variable. This variable allows the user to specify a mask value for + the corresponding element. If the value is 1, then the element is unmasked and if the value is 0 the element is masked. + If not specified, ESMF assumes that no elements are masked. + +

+The following is a picture of a small example mesh and a sample ESMF format header using non-optional variables describing that mesh: + +

+

+  2.0   7 ------- 8 ------- 9
+        |         |         |
+        |    4    |    5    |
+        |         |         |
+  1.0   4 ------- 5 ------- 6
+        |         |  \   3  |
+        |    1    |    \    |
+        |         |  2   \  |
+  0.0   1 ------- 2 ------- 3
+
+       0.0       1.0        2.0
+
+        Node indices at corners
+       Element indices in centers
+
+netcdf mesh-esmf {
+dimensions:
+        nodeCount = 9 ;
+        elementCount = 5 ;
+        maxNodePElement = 4 ;
+        coordDim = 2 ;
+variables:
+        double  nodeCoords(nodeCount, coordDim);
+                nodeCoords:units = "degrees" ;
+        int elementConn(elementCount, maxNodePElement) ;
+                elementConn:long_name = "Node Indices that define the element /
+                                         connectivity";
+                elementConn:_FillValue = -1 ;
+        byte numElementConn(elementCount) ;
+                numElementConn:long_name = "Number of nodes per element" ;
+// global attributes:
+                :gridType="unstructured";
+                :version = "0.9" ;
+data:
+    nodeCoords=
+        0.0, 0.0,
+        1.0, 0.0,
+        2.0, 0.0,
+        0.0, 1.0,
+        1.0, 1.0,
+        2.0, 1.0,
+        0.0, 2.0,
+        1.0, 2.0,
+        2.0, 2.0 ;
+
+    elementConn=
+        1, 2, 5,  4,
+        2, 3, 5, -1,
+        3, 6, 5, -1,
+        4, 5, 8,  7,
+        5, 6, 9,  8 ;
+
+    numElementConn= 4, 3, 3, 4, 4 ;
+}
+
+ +

+ +

+
+12.8.3 CF Convention Single Tile File Format (CFGRID/GRIDSPEC) +

+ +

+ESMF_RegridWeightGen supports single tile logically rectangular lat/lon grid files that follow the NETCDF CF convention based on +CF Metadata Conventions V1.6. When using the ESMF API, the file format flag ESMF_FILEFORMAT_CFGRID (or its equivalent deprecated name, ESMF_FILEFORMAT_GRIDSPEC) can be used to indicate a file in this format. + +

+An example grid file is shown below. +The cell center coordinate variables are determined by the value of its attribute units. The longitude +variable has the attribute value set to either degrees_east, degree_east, degrees_E, degree_E, +degreesE or degreeE. The latitude variable has the attribute value set to degrees_north, degree_north, degrees_N, +degree_N, degreesN or degreeN. The latitude and the longitude variables are one-dimensional arrays if the grid is a regular lat/lon grid, two-dimensional arrays if the grid is curvilinear. The bound coordinate +variables define the bound or the corner coordinates of a cell. The bound variable name is specified in the +bounds attribute of the latitude and longitude variables. In the following example, the latitude bound +variable is lat_bnds and the longitude bound variable is lon_bnds. The bound variables are 2D +arrays for a regular lat/lon grid and a 3D array for a curvilinear grid. The first dimension of the bound +array is 2 for a regular lat/lon grid and 4 for a curvilinear grid. The bound coordinates for a curvilinear +grid are defined in counterclockwise order. Since the grid is a regular lat/lon grid, +the coordinate variables are 1D and the bound variables are 2D with the first dimension equal to 2. +The bound coordinates will be read in and stored in a ESMF Grid object as the corner stagger coordinates when doing a conservative regrid. In case there are multiple sets of coordinate variables defined in a grid file, +the offline regrid application will return an error for duplicate latitude or longitude variables unless +"--src_coordinates" +or "--src_coordinates" options are used to specify the coordinate variable names +to be used in the regrid. + +

+

+netcdf single_tile_grid {
+dimensions:
+	time = 1 ;
+	bound = 2 ;
+	lat = 181 ;
+	lon = 360 ;
+variables:
+	double lat(lat) ;
+		lat:bounds = "lat_bnds" ;
+		lat:units = "degrees_north" ;
+		lat:long_name = "latitude" ;
+		lat:standard_name = "latitude" ;
+	double lat_bnds(lat, bound) ;
+	double lon(lon) ;
+		lon:bounds = "lon_bnds" ;
+		lon:long_name = "longitude" ;
+		lon:standard_name = "longitude" ;
+		lon:units = "degrees_east" ;
+	double lon_bnds(lon, bound) ;
+	float so(time, lat, lon) ;
+		so:standard_name = "sea_water_salinity" ;
+		so:units = "psu" ;
+		so:missing_value = 1.e+20f ;
+}
+
+ +

+2D Cartesian coordinates can be supplied in additional to the required +longitude/latitude coordinates. They can be used in ESMF to create a grid and +used in ESMF_RegridWeightGen. The Cartesian coordinate variables have to +include an "axis" attribute with value "X" or "Y". The "units" +attribute can be either "m" or "meters" for meters or "km" or "kilometers" +for kilometers. When a grid with 2D Cartesian coordinates are used in +ESMF_RegridWeightGen, the optional arguments "--src_coordinates" +or "--src_coordinates" have to be used to specify the coordinate +variable names. A grid with 2D Cartesian coordinates can only be regridded +with another grid in 2D Cartesian coordinates. Internally in ESMF, the +Cartesian coordinates are all converted into kilometers. Here is an example +of the 2D Cartesian coordinates: + +

+

+      double xc(xc) ;
+              xc:long_name = "x-coordinate in Cartesian system" ;
+              xc:standard_name = "projection_x_coordinate" ;
+              xc:axis = "X" ;
+              xc:units = "m" ;
+      double yc(yc) ;
+              yc:long_name = "y-coordinate in Cartesian system" ;
+              yc:standard_name = "projection_y_coordinate" ;
+              yc:axis = "Y" ;
+              yc:units = "m" ;
+
+ +

+Since a CF convension tile file does not have a way to specify the grid mask, the mask is usually derived by the missing values stored in a data variable. ESMF_RegridWeightGen provides an option for users to +derive the grid mask from a data variable's missing values. The value of the missing value is defined by the +variable attribute missing_value or _FillValue. If the value of the data point is equal to the +missing value, the grid mask for that grid point is set to 0, otherwise, it is set to 1. In the following +grid, the variable so can be used to derive the grid mask. A data variable could be a 2D, 3D or 4D. +For example, it may have additional depth and time dimensions. +It is assumed that the first and the second dimensions of the data variable should be the longitude and the +latitude dimension. ESMF_RegridWeightGen will use the first 2D data values to derive the grid mask. + +

+ +

+
+12.8.4 CF Convention UGRID File Format +

+ +

+ESMF_RegridWeightGen supports NetCDF files that follow the UGRID conventions for unstructured grids. + +

+The UGRID file format is a proposed extension to the CF metadata conventions for the unstructured grid data model. The latest proposal can be found at https://github.com/ugrid-conventions/ugrid-conventions. The proposal is still evolving, the Mesh creation API and ESMF_RegridWeightGen in the current ESMF release is based on UGRID Version 0.9.0 published on October 29, 2013. When using the ESMF API, the file format flag ESMF_FILEFORMAT_UGRID can be used to indicate a file in this format. + +

+In the UGRID proposal, a 1D, 2D, or 3D mesh topology can be defined for an unstructured grid. Currently, ESMF +supports two types of meshes: (1) the 2D flexible mesh topology where each cell (a.k.a. "face" as defined in the UGRID document) in the mesh is either a triangle or a quadrilateral, and (2) the fully 3D unstructured mesh topology where each cell (a.k.a. "volume" as defined in the UGRID document) in the mesh +is either a tetrahedron or a hexahedron. Pyramids and wedges are not currently supported in ESMF, but they +can be defined as degenerate hexahedrons. ESMF_RegridWeightGen also +supports UGRID 1D network mesh topology in a limited way: A 1D mesh in UGRID +can be used as the source grid for nearest neighbor regridding, and as the +destination grid for non-conservative regridding. + +

+The main addition of the UGRID extension is a dummy variable that defines the mesh +topology. This additional variable has a required attribute cf_role +with value "mesh_topology". In addition, it has two more required attributes: topology_dimension +and node_coordinates. If it is a 1D mesh, topology_dimension is +set to 1. +If it is a 2D mesh (i.e., topology_dimension equals to 2), an additional attribute +face_node_connectivity is required. If it is a 3D mesh (i.e., topology_dimension equals to 3), two additional attributes volume_node_connectivity and volume_shape_type are required. +The value of attribute node_coordinates is a list of the names of the node longitude and latitude variables, +plus the elevation variable if it is a 3D mesh. +The value of attribute face_node_connectivity or volume_node_connectivity is the variable name that defines the corner node indices for each mesh cell. The additional attribute volume_shape_type for the +3D mesh points to a flag variable that specifies the shape type of each cell in the mesh. + +

+Below is a sample 2D mesh called FVCOM_grid2d. The dummy mesh topology variable is fvcom_mesh. As described above, its cf_role attribute has to be mesh_topology +and the topology_dimension attribute has to be 2 for a 2D mesh. It defines +the node coordinate variable names to be lon and lat. It also specifies the face/node connectivity variable name as nv. + +

+The variable nv is a two-dimensional array that defines the node indices of each face. The first dimension +defines the maximal number of nodes for each face. In this example, it is a +triangle mesh so the number of nodes per face is 3. Since each face may have a different number of corner nodes, +some of the cells may have fewer nodes than the specified dimension. In that case, it is filled with the +missing values defined by the attribute _FillValue. If _FillValue is not defined, the default value +is -1. The nodes are in counterclockwise order. An optional attribute +start_index defines whether the node index is 1-based or 0-based. If start_index is not defined, +the default node index is 0-based. + +

+The coordinate variables follows the CF metadata convention for coordinates. They are 1D array with attribute +standard_name being either latitude or longitude. The units of the coordinates can be either degrees or radians. + +

+The UGRID files may also contain data variables. The data may be located at the nodes or at the faces. Two additional attributes are introduced in the UGRID extension for the data variables: location and mesh. The location +attribute defines where the data is located, it can be either face or node. The mesh attribute defines which mesh topology this variable belongs to since multiple mesh topologies may be defined in one +file. The coordinates attribute defined in the CF conventions can also be used to associate the variables to their locations. ESMF checks both location and coordinates attributes to determine where the data variable is defined upon. If both attributes are present, the location attribute takes the precedence. ESMF_RegridWeightGen uses the data variable on the face to derive the element masks for the mesh cell and variable on the node to derive the node masks for the mesh. + +

+When creating a ESMF Mesh from a UGRID file, the user has to provide the mesh topology variable name to ESMF_MeshCreate(). + +

+

+netcdf FVCOM_grid2d {
+dimensions:
+	node = 417642 ;
+	nele = 826866 ;
+	three = 3 ;
+        time  = 1 ;
+
+variables:
+// Mesh topology
+	int fvcom_mesh;
+		fvcom_mesh:cf_role = "mesh_topology" ;
+		fvcom_mesh:topology_dimension = 2. ;
+		fvcom_mesh:node_coordinates = "lon lat" ;
+		fvcom_mesh:face_node_connectivity = "nv" ;
+	int nv(nele, three) ;
+		nv:standard_name = "face_node_connectivity" ;
+		nv:start_index = 1. ;
+
+// Mesh node coordinates
+	float lon(node) ;
+                lon:standard_name = "longitude" ;
+	        lon:units = "degrees_east" ;
+	float lat(node) ;
+                lat:standard_name = "latitude" ;
+		lat:units = "degrees_north" ;
+
+// Data variable
+	float ua(time, nele) ;
+		ua:standard_name = "barotropic_eastward_sea_water_velocity" ;
+		ua:missing_value = -999. ;
+		ua:location = "face" ;
+		ua:mesh = "fvcom_mesh" ;
+	float va(time, nele) ;
+		va:standard_name = "barotropic_northward_sea_water_velocity" ;
+		va:missing_value = -999. ;
+		va:location = "face" ;
+		va:mesh = "fvcom_mesh" ;
+}
+
+ +

+Following is a sample 3D UGRID file containing hexahedron cells. The dummy mesh topology variable is fvcom_mesh. Its cf_role attribute has to be mesh_topology +and topology_dimension attribute has to be 3 for a 3D mesh. There are two additional required attributes: +volume_node_connectivity specifies a variable name that defines the corner indices of the mesh cells and +volume_shape_type specifies a variable name that defines the type of the mesh cells. + +

+The node coordinates are defined by variables nodelon, nodelat and height. Currently, the units +attribute for the height variable is either kilometers, km or meters. +The variable vertids is a two-dimensional array that defines the corner node indices of each mesh cell. The first dimension +defines the maximal number of nodes for each cell. There is only one type of cells in the sample grid, i.e. hexahedrons, so the maximal number +of nodes is 8. The node order is defined in 33.2.1. The index can be either 1-based or 0-based and +the default is 0-based. + Setting an optional attribute start_index to 1 changed it to 1-based index scheme. +The variable meshtype is a one-dimensional integer array that defines the shape type of each cell. Currently, ESMF only +supports tetrahedron and hexahedron shapes. There are three attributes in meshtype: flag_range, flag_values, and flag_meanings representing the range of the flag values, all the possible flag values, and the meaning of each flag value, respectively. flag_range and flag_values are either a scalar or an array of integers. flag_meanings is a text string containing a list of shape types separated by space. In this example, there +is only one shape type, thus, the values of meshtype are all 1. + +

+

+netcdf wam_ugrid100_110 {
+dimensions:
+	nnodes = 78432 ;
+	ncells = 66030 ;
+	eight = 8 ;
+variables:
+	int mesh ;
+		mesh:cf_role = "mesh_topology" ;
+		mesh:topology_dimension = 3. ;
+		mesh:node_coordinates = "nodelon nodelat height" ;
+		mesh:volume_node_connectivity = "vertids" ;
+		mesh:volume_shape_type = "meshtype" ;
+	double nodelon(nnodes) ;
+		nodelon:standard_name = "longitude" ;
+		nodelon:units = "degrees_east" ;
+	double nodelat(nnodes) ;
+		nodelat:standard_name = "latitude" ;
+		nodelat:units = "degrees_north" ;
+	double height(nnodes) ;
+		height:standard_name = "elevation" ;
+		height:units = "kilometers" ;
+	int vertids(ncells, eight) ;
+		vertids:cf_role = "volume_node_connectivity" ;
+		vertids:start_index = 1. ;
+	int meshtype(ncells) ;
+		meshtype:cf_role = "volume_shape_type" ;
+		meshtype:flag_range = 1. ;
+		meshtype:flag_values = 1. ;
+		meshtype:flag_meanings = "hexahedron" ;
+}
+
+ +

+ +

+
+12.8.5 GRIDSPEC Mosaic File Format +

+ +

+GRIDSPEC is a draft proposal to extend the Climate and Forecast (CF) metadata conventions for the representation of gridded data for Earth System Models. The original GRIDSPEC standard was proposed by V. Balaji and Z. Liang of GFDL (see ref). GRIDSPEC extends the current CF convention to support grid mosaics, i.e., a grid consisting of multiple logically +rectangular grid tiles. It also provides a mechanism for storing a grid dataset in multiple files. Therefore, +it introduces different types of files, such as a mosaic file that defines the multiple tiles and their +connectivity, and a tile file for a single tile grid definition on a so-called "Supergrid" format. When using the ESMF API, the file format flag ESMF_FILEFORMAT_MOSAIC can be used to indicate a file in this format. + +

+Following is an example of a mosaic file that defines a 6 tile Cubed Sphere grid: + +

+

+netcdf C48_mosaic {
+dimensions:
+	ntiles = 6 ;
+	ncontact = 12 ;
+	string = 255 ;
+variables:
+	char mosaic(string) ;
+		mosaic:standard_name = "grid_mosaic_spec" ;
+		mosaic:children = "gridtiles" ;
+		mosaic:contact_regions = "contacts" ;
+		mosaic:grid_descriptor = "" ;
+	char gridlocation(string) ;
+	char gridfiles(ntiles, string) ;
+	char gridtiles(ntiles, string) ;
+	char contacts(ncontact, string) ;
+		contacts:standard_name = "grid_contact_spec" ;
+		contacts:contact_type = "boundary" ;
+		contacts:alignment = "true" ;
+		contacts:contact_index = "contact_index" ;
+		contacts:orientation = "orient" ;
+	char contact_index(ncontact, string) ;
+		contact_index:standard_name = "starting_ending_point_index_of_contact" ;
+
+data:
+
+mosaic = "C48_mosaic" ;
+
+gridlocation = "./data/" ;
+
+gridfiles =
+  "horizontal_grid.tile1.nc",
+  "horizontal_grid.tile2.nc",
+  "horizontal_grid.tile3.nc",
+  "horizontal_grid.tile4.nc",
+  "horizontal_grid.tile5.nc",
+  "horizontal_grid.tile6.nc" ;
+
+gridtiles =
+  "tile1",
+  "tile2",
+  "tile3",
+  "tile4",
+  "tile5",
+  "tile6" ;
+
+contacts =
+  "C48_mosaic:tile1::C48_mosaic:tile2",
+  "C48_mosaic:tile1::C48_mosaic:tile3",
+  "C48_mosaic:tile1::C48_mosaic:tile5",
+  "C48_mosaic:tile1::C48_mosaic:tile6",
+  "C48_mosaic:tile2::C48_mosaic:tile3",
+  "C48_mosaic:tile2::C48_mosaic:tile4",
+  "C48_mosaic:tile2::C48_mosaic:tile6",
+  "C48_mosaic:tile3::C48_mosaic:tile4",
+  "C48_mosaic:tile3::C48_mosaic:tile5",
+  "C48_mosaic:tile4::C48_mosaic:tile5",
+  "C48_mosaic:tile4::C48_mosaic:tile6",
+  "C48_mosaic:tile5::C48_mosaic:tile6" ;
+
+ contact_index =
+  "96:96,1:96::1:1,1:96",
+  "1:96,96:96::1:1,96:1",
+  "1:1,1:96::96:1,96:96",
+  "1:96,1:1::1:96,96:96",
+  "1:96,96:96::1:96,1:1",
+  "96:96,1:96::96:1,1:1",
+  "1:96,1:1::96:96,96:1",
+  "96:96,1:96::1:1,1:96",
+  "1:96,96:96::1:1,96:1",
+  "1:96,96:96::1:96,1:1",
+  "96:96,1:96::96:1,1:1",
+  "96:96,1:96::1:1,1:96" ;
+}
+
+ +

+A GRIDSPEC Mosaic file is identified by a dummy variable with its standard_name attribute set to grid_mosaic_spec. +The children attribute of this dummy variable provides the variable name that contains the tile names and the +contact_region attribute points to the variable name that defines a list of tile pairs that are connected +to each other. For a Cubed Sphere grid, there are six tiles and 12 connections. The contacts variable, the +variable that defines the contact_region +has three required attributes: standard_name, contact_type, and contact_index. startand_name +has to be set to grid_contact_spec. contact_type can be either boundary or overlap. Currently, ESMF +only supports non-overlapping tiles connected by boundary. contact_index defines the variable name that contains the information defining how the +two adjacent tiles are connected to each other. In the above example, the contact_index variable contains 12 entries. Each entry +contains the index of four points that defines the two edges that contact to + each other from the two neighboring tiles. Assuming the four points are A, B, C, and D. + A and B defines the edge of tile 1 and C and D defines the edge of tile 2. A is the same point + as C and B is the same as D. (Ai, Aj) is the index for point A. The entry looks like this: +

+  Ai:Bi,Aj:Bj::Ci:Di,Cj:Dj
+
+ +

+There are two fixed-name variables required in the mosaic file: variable gridfiles defines the associated tile file names and +variable gridlocation defines the directory path of the tile files. +The gridlocation can be overwritten with an command line argument -tilefile_path in ESMF_RegridWeightGen application. + +

+It is possible to define a single-tile Mosaic file. If there is only one tile in the Mosaic, the contact_region attribute in the +grid_mosaic_spec varilable will be ignored. + +

+Each tile in the Mosaic is a logically rectangular lat/lon grid and is defined in a separate file. The tile file used in the GRIDSPEC Mosaic file defines the coordinates of a so-called +supergrid. A supergrid contains all the +stagger locations in one grid. It contains the corner, edge and center coordinates all in one 2D array. +In this example, there are 48 elements in each side of a tile, therefore, the size of the supergrid is +48*2+1=97, i.e. 97x97. + +

+Here is the header of one of the tile files: + +

+

+netcdf horizontal_grid.tile1 {
+dimensions:
+	string = 255 ;
+	nx = 96 ;
+	ny = 96 ;
+	nxp = 97 ;
+	nyp = 97 ;
+variables:
+	char tile(string) ;
+		tile:standard_name = "grid_tile_spec" ;
+		tile:geometry = "spherical" ;
+		tile:north_pole = "0.0 90.0" ;
+		tile:projection = "cube_gnomonic" ;
+		tile:discretization = "logically_rectangular" ;
+		tile:conformal = "FALSE" ;
+	double x(nyp, nxp) ;
+		x:standard_name = "geographic_longitude" ;
+		x:units = "degree_east" ;
+	double y(nyp, nxp) ;
+		y:standard_name = "geographic_latitude" ;
+		y:units = "degree_north" ;
+	double dx(nyp, nx) ;
+		dx:standard_name = "grid_edge_x_distance" ;
+		dx:units = "meters" ;
+	double dy(ny, nxp) ;
+		dy:standard_name = "grid_edge_y_distance" ;
+		dy:units = "meters" ;
+	double area(ny, nx) ;
+		area:standard_name = "grid_cell_area" ;
+		area:units = "m2" ;
+	double angle_dx(nyp, nxp) ;
+		angle_dx:standard_name = "grid_vertex_x_angle_WRT_geographic_east" ;
+		angle_dx:units = "degrees_east" ;
+	double angle_dy(nyp, nxp) ;
+		angle_dy:standard_name = "grid_vertex_y_angle_WRT_geographic_north" ;
+		angle_dy:units = "degrees_north" ;
+	char arcx(string) ;
+		arcx:standard_name = "grid_edge_x_arc_type" ;
+		arcx:north_pole = "0.0 90.0" ;
+
+// global attributes:
+		:grid_version = "0.2" ;
+		:history = "/home/z1l/bin/tools_20091028/make_hgrid --grid_type gnomonic_ed --nlon 96" ;
+}
+
+ +

+The tile file not only defines the coordinates at all staggers, it also has a complete specification of +distances, angles, and areas. In ESMF, we only use the geographic_longitude and geographic_latitude +variables and its subsets on the center and corner staggers. ESMF currently supports the Mosaic containing tiles of the same size. +A tile can be square or rectangular. For a cubed sphere grid, each tile is a square, i.e. the x and y +dimensions are the same. + +

+ +

+
+12.9 Regrid Weight File Format +

+ +

+A regrid weight file is a NetCDF format file containing the information necessary to perform +a regridding between two grids. It also optionally contains information about the grids used to compute +the regridding. This information is provided to allow applications (e.g. ESMF_RegridWeightGenCheck) to +independently compute the accuracy of the regridding weights. In some cases, ESMF_RegridWeightGen doesn't +output the full grid information (e.g. when it's costly to compute, or when the current grid format doesn't +support the type of grids used to generate the weights). In that case, the weight file can still be used +for regridding, but applications which depend on the grid information may not work. + +

+The following is the header of a sample regridding weight file that describes a bilinear regridding +from a logically rectangular 2D grid to a triangular unstructured grid: + +

+

+netcdf t42mpas-bilinear {
+dimensions:
+        n_a = 8192 ;
+        n_b = 20480 ;
+        n_s = 42456 ;
+        nv_a = 4 ;
+        nv_b = 3 ;
+        num_wgts = 1 ;
+        src_grid_rank = 2 ;
+        dst_grid_rank = 1 ;
+variables:
+        int src_grid_dims(src_grid_rank) ;
+        int dst_grid_dims(dst_grid_rank) ;
+        double yc_a(n_a) ;
+               yc_a:units = "degrees" ;
+        double yc_b(n_b) ;
+               yc_b:units = "radians" ;
+        double xc_a(n_a) ;
+               xc_a:units = "degrees" ;
+        double xc_b(n_b) ;
+               xc_b:units = "radians" ;
+        double yv_a(n_a, nv_a) ;
+               yv_a:units = "degrees" ;
+        double xv_a(n_a, nv_a) ;
+               xv_a:units = "degrees" ;
+        double yv_b(n_b, nv_b) ;
+               yv_b:units = "radians" ;
+        double xv_b(n_b, nv_b) ;
+               xv_b:units = "radians" ;
+        int mask_a(n_a) ;
+               mask_a:units = "unitless" ;
+        int mask_b(n_b) ;
+               mask_b:units = "unitless" ;
+        double area_a(n_a) ;
+               area_a:units = "square radians" ;
+        double area_b(n_b) ;
+               area_b:units = "square radians" ;
+        double frac_a(n_a) ;
+               frac_a:units = "unitless" ;
+        double frac_b(n_b) ;
+               frac_b:units = "unitless" ;
+        int col(n_s) ;
+        int row(n_s) ;
+        double S(n_s) ;
+ 
+// global attributes:
+        :title = "ESMF Offline Regridding Weight Generator" ;
+        :normalization = "destarea" ;
+        :map_method = "Bilinear remapping" ;
+        :ESMF_regrid_method = "Bilinear" ;
+        :conventions = "NCAR-CSM" ;
+        :domain_a = "T42_grid.nc" ;
+        :domain_b = "grid-dual.nc" ;
+        :grid_file_src = "T42_grid.nc" ;
+        :grid_file_dst = "grid-dual.nc" ;
+        :ESMF_version = "ESMF_8_2_0_beta_snapshot_05-3-g2193fa3f8a" ;
+}
+
+ +

+The weight file contains four types of information: a description of the source grid, a description of the destination grid, the output of the regrid weight calculation, and global attributes describing the weight file. + +

+ +

+12.9.1 Source Grid Description +

+ +

+The variables describing the source grid in the weight file end with the suffix "_a". To be consistent with the original use of this weight file format +the grid information is written to the file such that the location being regridded is always the cell center. This means that the grid structure described here may not be identical to that in the source grid file. The full set of these variables may not always be present in the weight file. The following is an +explanation of each variable: +

+
+
n_a
+
The number of source cells. + +
+
nv_a
+
The maximum number of corners (i.e. vertices) around a source cell. If a cell has less than the maximum number of corners, then the remaining corner coordinates are repeats of the last valid corner's coordinates. + +
+
xc_a
+
The longitude coordinates of the centers of each source cell. + +
+
yc_a
+
The latitude coordinates of the centers of each source cell. + +
+
xv_a
+
The longitude coordinates of the corners of each source cell. + +
+
yv_a
+
The latitude coordinates of the corners of each source cell. + +
+
mask_a
+
The mask for each source cell. A value of 0, indicates that the cell is masked. + +
+
area_a
+
The area of each source cell. This quantity is either from the source grid file or calculated by ESMF_RegridWeightGen. When a non-conservative regridding method (e.g. bilinear) is used, the area is set to 0.0. + +
+
src_grid_rank
+
The number of dimensions of the source grid. Currently this can only be 1 or 2. Where 1 indicates an unstructured grid and 2 indicates a 2D logically rectangular grid. + +
+
src_grid_dims
+
The number of cells along each dimension of the source grid. For unstructured grids this is equal to the number of cells in the grid. +
+
+ +

+ +

+12.9.2 Destination Grid Description +

+ +

+The variables describing the destination grid in the weight file end with the suffix "_b". To be consistent with the original use of this weight file format +the grid information is written to the file such that the location being regridded is always the cell center. This means that the grid structure described here may not be identical to that in the destination grid file. The full set of these variables may not always be present in the weight file. The following is an +explanation of each variable: +

+
+
n_b
+
The number of destination cells. + +
+
nv_b
+
The maximum number of corners (i.e. vertices) around a destination cell. If a cell has less than the maximum number of corners, then the remaining corner coordinates are repeats of the last valid corner's coordinates. + +
+
xc_b
+
The longitude coordinates of the centers of each destination cell. + +
+
yc_b
+
The latitude coordinates of the centers of each destination cell. + +
+
xv_b
+
The longitude coordinates of the corners of each destination cell. + +
+
yv_b
+
The latitude coordinates of the corners of each destination cell. + +
+
mask_b
+
The mask for each destination cell. A value of 0, indicates that the cell is masked. + +
+
area_b
+
The area of each destination cell. This quantity is either from the destination grid file or calculated by ESMF_RegridWeightGen. When a non-conservative regridding method (e.g. bilinear) is used, the area is set to 0.0. + +
+
dst_grid_rank
+
The number of dimensions of the destination grid. Currently this can only be 1 or 2. Where 1 indicates an unstructured grid and 2 indicates a 2D logically rectangular grid. + +
+
dst_grid_dims
+
The number of cells along each dimension of the destination grid. For unstructured grids this is equal to the number of cells in the grid. +
+
+ +

+ +

+
+12.9.3 Regrid Calculation Output +

+ +

+The following is an explanation of the variables containing the output of the regridding calculation: +

+
+
n_s
+
The number of entries in the regridding matrix. + +
+
col
+
The position in the source grid for each entry in the regridding matrix. + +
+
row
+
The position in the destination grid for each entry in the weight matrix. + +
+
S
+
The weight for each entry in the regridding matrix. + +
+
frac_a
+
When a conservative regridding method is used, this contains the fraction of each source cell that participated in the regridding. When a non-conservative regridding method is used, this array is set to 0.0. + +
+
frac_b
+
When a conservative regridding method is used, this contains the fraction of each destination cell that participated in the regridding. When a non-conservative regridding method is used, this array is set to 1.0 where the point participated in the regridding (i.e. was within the unmasked source grid), and 0.0 otherwise. +
+
+ +

+The following code shows how to apply the weights in the weight file to interpolate a source field (src_field) defined +over the source grid to a destination field (dst_field) defined over the destination grid. The variables n_s, n_b, +row, col, and S are from the weight file. + +

+

+ ! Initialize destination field to 0.0
+ do i=1, n_b
+   dst_field(i)=0.0
+ enddo
+
+ ! Apply weights
+ do i=1, n_s
+   dst_field(row(i))=dst_field(row(i))+S(i)*src_field(col(i))
+ enddo
+
+ +

+If the first-order conservative interpolation method is specified ("-m conserve") then the destination field may need to be adjusted by the destination fraction (frac_b). +This should be done if the normalization type is "dstarea" and if the destination grid extends outside the unmasked source grid. If it isn't known if the destination extends outside the source, then it doesn't hurt to apply the destination fraction. (If it doesn't extend outside, then the fraction will be 1.0 everywhere anyway.) +The following code shows how to adjust an already interpolated destination field (dst_field) by the destination fraction. The variables n_b, and frac_b are from the weight file: + +

+

+ ! Adjust destination field by fraction
+ do i=1, n_b
+   if (frac_b(i) .ne. 0.0) then
+      dst_field(i)=dst_field(i)/frac_b(i)
+   endif
+ enddo
+
+ +

+ +

+12.9.4 Weight File Description Attributes +

+ +

+The following is an explanation of the global attributes describing the weight file: +

+
+
title
+
Always set to "ESMF Offline Regridding Weight Generator" when generated by ESMF_RegridWeightGen. + +
+
normalization
+
The normalization type used to compute conservative regridding weights. The options for this are described in section 12.3.4 which contains a description of the conservative regridding method. + +
+
map_method
+
An indication of the mapping method which is constrained by the original use of this format. In some cases the method specified here will differ from the actual regridding method used, for example weights generated with the "patch" method will have this attribute set to "Bilinear remapping". + +
+
ESMF_regrid_method
+
The ESMF regridding method used to generate the weight file. + +
+
conventions
+
The set of conventions that the weight file follows. Currently only "NCAR-CSM" is supported. + +
+
domain_a
+
The source grid file name. + +
+
domain_b
+
The destination grid file name. + +
+
grid_file_src
+
The source grid file name. + +
+
grid_file_dst
+
The destination grid file name. + +
+
ESMF_version
+
The version of ESMF used to generate the weight file. +
+
+ +

+ +

+12.9.5 Weight Only Weight File +

+ +

+In the current ESMF distribution, a new simplified weight file option -weight_only is added to ESMF_RegridWeightGen. +The simple weight file contains only a subset of the Regrid Calculation Output defined in 12.9.3, i.e. +the weights S, the source grid indices col and destination grid indices row. The dimension of these three variables is n_s. + +

+ +

+
+12.10 ESMF_RegridWeightGenCheck +

+ +

+The ESMF_RegridWeightGen application is used in the +ESMF_RegridWeightGenCheck external demo +to generate interpolation weights. These weights are then tested by using them for a regridding operation and then comparing them against an analytic function on the destination grid. This external demo is also used to regression test ESMF regridding, and it is run nightly on over 150 combinations of structured and unstructured, regional and global grids, and regridding methods. + +

+ +

+ +
+13 ESMF_Regrid +

+ +

+ +

+13.1 Description +

+ +

+This section describes the file-based regridding command line tool provided by ESMF (for a description of ESMF regridding in general see Section 24.2). Regridding, also called remapping or interpolation, is the process of changing the grid that underlies data values while preserving qualities of the original data. Different kinds of transformations are appropriate for different problems. Regridding may be needed when communicating data between Earth system model components such as land and atmosphere, or between different data sets to support operations such as visualization. + +

+Regridding can be broken into two stages. The first stage is generation of an interpolation weight matrix that describes how points in +the source grid contribute to points in the destination grid. The second stage is the multiplication of values on the source grid by the +interpolation weight matrix to produce values on the destination grid. This is implemented as a parallel sparse matrix multiplication. + +

+The ESMF_RegridWeightGen command line tool described in Section 12 +performs the first stage of the regridding process - generate the interpolation weight matrix. +This tool not only calculates the interpolation weights, it also applies the +weights to a list of variables +stored in the source grid file and produces the interpolated values on the destination grid. +The interpolated output variable is written out to the destination grid file. This tool +supports three CF compliant file formats: the CF Single Tile grid file format( 12.8.3) for +a logically rectangular grid, the UGRID file +format( 12.8.4) for unstructured grid and the GRIDSPEC +Mosaic file format( 12.8.5) for cubed-sphere grid. For +the GRIDSPEC Mosaic file format, the data are stored in seperate data files, +one file per tile. +The SCRIP format( 12.8.1) and the ESMF unstructured grid format( 12.8.2) are not supported because there is no way to define a variable field using these two formats. Currently, the tool only works with 2D grids, the support for the 3D grid will be +made available in the future release. The variable array can be up to four dimensions. The +variable type is currently limited to single or double precision real numbers. The support for +other data types, such as integer or short will be added in the future release. + +

+The user interface of this tool is greatly simplified from ESMF_RegridWeightGen. User only +needs to provide two input file names, the source and the destination variable names and the regrid method. The tool will figure out the type of the grid file automatically based on the attributes of the variable. +If the variable has a coordinates attribute, the grid file is a GRIDSPEC file and the value of the +coordinates defines the longitude and latitude variable's names. For example, following is a simple +GRIDSPEC file with a variable named PSL and coordinate variables named lon and lat. + +

+

+netcdf simple_gridspec {
+dimensions:
+      lat = 192 ;
+      lon = 288 ;
+variables:
+      float PSL(lat, lon) ;
+         PSL:time = 50. ;
+         PSL:units = "Pa" ;
+         PSL:long_name = "Sea level pressure" ;
+         PSL:cell_method = "time: mean" ;
+         PSL:coordinates = "lon lat" ;
+      double lat(lat) ;
+         lat:long_name = "latitude" ;
+         lat:units = "degrees_north" ;
+      double lon(lon) ;
+         lon:long_name = "longitude" ;
+         lon:units = "degrees_east" ;
+}
+
+ +

+If the variable has a mesh attribute and a location attribute, the grid file is in UGRID +format( 12.8.4). The value of mesh attribute is the name of a dummy variable that defines the mesh topology. If the application performs a conservative regridding, the value of the location attribute has to be face, otherwise, it has to be node. +This is because ESMF only supports non-conservative regridding on the data stored at the nodes of a ESMF_Mesh object, and conservative regridding on the data stored at the cells of +a ESMF_Mesh object. + +

+Here is an example 2D UGRID file: + +

+

+netcdf simple_ugrid {
+dimensions:
+      node = 4176 ; 
+      nele = 8268 ;
+      three = 3 ;
+      time  = 2 ;
+variables:
+      float lon(node) ;
+         lon:units = "degrees_east" ;
+      float lat(node) ;
+         lat:units = "degrees_north" ;
+      float lonc(nele) ;
+         lonc:units = "degrees_east" ;
+      float latc(nele) ;
+         latc:units = "degrees_north" ;
+      int nv(nele, three) ;
+         nv:standard_name = "face_node_connectivity" ;
+         nv:start_index = 1. ;
+      float zeta(time, node) ;
+         zeta:standard_name = "sea_surface_height_above_geoid" ;
+         zeta:_FillValue = -999. ;
+         zeta:location = "node" ;
+         zeta:mesh = "fvcom_mesh" ;
+      float ua(time, nele) ;
+         ua:standard_name = "barotropic_eastward_sea_water_velocity" ;
+         ua:_FillValue = -999. ;
+         ua:location = "face" ;
+         ua:mesh = "fvcom_mesh" ;
+      float va(time, nele) ;
+         va:standard_name = "barotropic_northward_sea_water_velocity" ;
+         va:_FillValue = -999. ;
+         va:location = "face" ;
+         va:mesh = "fvcom_mesh" ;
+      int fvcom_mesh(node) ;
+         fvcom_mesh:cf_role = "mesh_topology" ;
+         fvcom_mesh:dimension = 2. ;
+         fvcom_mesh:locations = "face node" ;
+         fvcom_mesh:node_coordinates = "lon lat" ;
+         fvcom_mesh:face_coordinates = "lonc latc" ;
+         fvcom_mesh:face_node_connectivity = "nv" ;
+}
+
+ +

+There are three variables defined in the above UGRID file - zeta on the node of the mesh, ua and +va on the face of the mesh. All three variables have one extra time dimension. + +

+The GRIDSPEC MOSAIC file( 12.8.5) can be identified by a dummy variable with standard_name attribute set to grid_mosaic_spec. The data for a +GRIDSPEC Mosaic file are stored in seperate files, one tile per file. The +name of the data file is not specified in the mosaic file. Therefore, +additional optional argument -srcdatafile or -dstdatafile is +required to provide the prefix of the datafile. The datafile is also a CF +compliant NetCDF file. The complete name of the datafile is +constructed by appending the tilename (defined in the Mosaic file in a +variable specified by the children attribute of the dummy variable). +For instance, if the prefix of the datafile is mosaicdata, then the +datafile names are mosaicdata.tile1.nc, mosaicdata.tile2.nc, +etc... using the mosaic file example in 12.8.5. The +path of the datafile is defined by gridlocation variable, similar to the +tile files. To overwrite it, an optional argument tilefile_path can be +specified. + +

+Following is an example GRIDSPEC MOSAIC datafile: + +

+

+netcdf mosaictest.tile1 {
+dimensions:
+     grid_yt = 48 ;
+     grid_xt = 48 ;
+     time = UNLIMITED ; // (12 currently)
+variables:
+     float area_land(grid_yt, grid_xt) ;
+        area_land:long_name = "area in the grid cell" ;
+        area_land:units = "m2" ;
+     float evap_land(time, grid_yt, grid_xt) ;
+        evap_land:long_name = "vapor flux up from land" ;
+        evap_land:units = "kg/(m2 s)" ;
+        evap_land:coordinates = "geolon_t geolat_t" ;
+     double geolat_t(grid_yt, grid_xt) ;
+        geolat_t:long_name = "latitude of grid cell centers" ;
+        geolat_t:units = "degrees_N" ;
+     double geolon_t(grid_yt, grid_xt) ;
+        geolon_t:long_name = "longitude of grid cell centers" ;
+        geolon_t:units = "degrees_E" ;
+     double time(time) ;
+        time:long_name = "time" ;
+        time:units = "days since 1900-01-01 00:00:00" ;
+}
+
+ +

+This is a database for the C48 Cubed Sphere grid defined in +12.8.5. Note currently we assume that the data are +located at the center stagger of the grid. The coordinate variables geolon_t and geolat_t should be identical to the center coordinates +defined in the corresponding tile files. They are not used to create the +multi-tile grid. For this application, they are only used to construct the +analytic field to check the correctness of the regridding results if -check argument is given. + +

+If the variable specified for the destination file does not already exist in the file, the file type is determined as follows: +First search for a variable that has a cf_role attribute of value mesh_topology. If successful, +the file is a UGRID file. The destination variable will be created on the nodes if the regrid method is +non-conservative and an optional argument dst_loc is set to corner. Otherwise, the destination variable will be created +on the face. If the destination file is not a UGRID file, check if there is a variable with its units attribute set to degrees_east and another variable with it's units attribute set to degrees_west. If such a pair is found, +the file is a GRIDSPEC file and the above two variables will be used as the coordinate variables for the +variable to be created. If more than one pair of coordinate variables are found in the file, the application +will fail with an error message. + +

+If the destination +variable exists in the destination grid file, it has to have the same number of dimensions and the same type as the source variable. Except for the latitude and longitude dimensions, the size of +the destination variable's extra dimensions (e.g., time and vertical layers) has to match with the +source variable. If the destination varialbe does not exist in the destination grid file, a +new variable will be created with the same type and matching dimensions as the source variable. +All the attributes of the source variable will be copied to the destination variable except those +related to the grid definition (i.e. coordinates attribute if the destination file is in +GRIDSPEC or MOSAIC format or mesh and location attributes if the destination file is in UGRID format. + +

+Additional rules beyond the CF convention are adopted to determine whether there is a time dimension defined +in the source and destination files. In this application, only a dimension with a name time is +considered as a time dimension. +If the source variable has a time dimension and the destination variable is not already defined, +the application first checks if there is a time dimension defined in the destination file. If so, +the values of the time dimension in both files have to be identical. If the time dimension values don't match, the application +terminates with an error message. The application does not check the existence of a time variable +or if the units attribute of the time variable match in two input files. If the destination +file does not have a time dimension, it will be created. UNLIMITED time dimension is allowed in the +source file, but the time dimension created in the destination file is not UNLIMITED. + +

+This application requires the NetCDF library to read the grid files and write out the interpolated variables. To compile ESMF with +the NetCDF library, please refer to the "Third Party Libraries" Section in the ESMF User's Guide for more information. + +

+Internally this application uses the ESMF public API to perform regridding. +If a source or destination grid is logically rectangular, then ESMF_GridCreate()31.6.13) is used to create an ESMF_Grid object from the file. The coordinate variables are stored +at the center stagger location (ESMF_STAGGERLOC_CENTER). If the application performs a +conservative regridding, the addCornerStager argument is set to TRUE and the bound variables in the grid file will +be read in and stored at the corner stagger location (ESMF_STAGGERLOC_CORNER). If the variable has an _FillValue attribute defined, a mask will be generated using the missing values of the variable. +The data variable is defined as a ESMF_Field object at the center stagger location (ESMF_STAGGERLOC_CENTER) of the grid. + +

+If the source grid is an unstructured grid and the the regrid method is nearest neighbor, or if the destination grid +is unstructured and the regrid method is non-conservative, ESMF_LocStreamCreate()32.4.14 is used to create an ESMF_LocStream object. Otherwise, +ESMF_MeshCreate()33.4.8) is used to create an ESMF_Mesh object for the unstructured +input grids. Currently, only the 2D unstructured grid is supported. +If the application performs a conservative regridding, the variable has to be defined on the face of the mesh cells, i.e., its location attribute has to be set to face. Otherwise, the variable has to be +defined on the node and its (location attribute is set to node). + +

+If a source or a destination grid is a Cubed Sphere grid defined in GRIDSPEC +MOSAIC file format, ESMF_GridCreateMosaic()31.6.28) will be used to create a multi-tile ESMF_Grid +object from the file. The coordinates at the center and the corner stagger in +the tile files will be stored in the grid. The data has to be located at the +center stagger of the grid. + +

+Similar to the ESMF_RegridWeightGen command line tool (Section 12), this application supports +bilinear, patch, nearest neighbor, first-order and second-order conservative interpolation. The descriptions of different +interpolation methods can be found at Section 24.2 and Section 12. +It also supports different pole methods for non-conservative interpolation and allows user to choose to +ignore the errors when some of the destination points cannot be mapped by any source points. + +

+If the optional argument -check is given, the interpolated fields will +be checked agaist a synthetic field defined as follows: + +

+

+
+ +

+ +

+
+13.2 Usage +

+ +

+The command line arguments are all keyword based. Both the long keyword prefixed with '--' or the +one character short keyword prefixed with '-' are supported. The format to run the command line tool is as follows: + +

+

+ESMF_Regrid  
+        --source|-s src_grid_filename
+        --destination|-d dst_grid_filename
+	--src_var var_name[,var_name,..]
+	--dst_var var_name[,var_name,..]
+        [--srcdatafile]
+        [--dstdatafile]
+        [--tilefile_path filepath]
+        [--dst_loc center|corner]
+        [--method|-m bilinear|patch|nearestdtos|neareststod|conserve|conserve2nd]
+        [--pole|-p none|all|teeth|1|2|..]
+        [--ignore_unmapped|-i]
+        [--ignore_degenerate]
+        [-r]
+        [--src_regional]
+        [--dst_regional]
+        [--check]
+        [--no_log]
+	[--help]
+        [--version]
+        [-V]
+where
+  --source or -s      - a required argument specifying the source grid
+                        file name
+
+  --destination or -d - a required argument specifying the destination
+                        grid file name
+
+  --src_var           - a required argument specifying the variable names 
+                        in the src grid file to be interpolated from.  If more
+                        than one, separated them with comma.
+
+  --dst_var           - a required argument specifying the variable names 
+                        to be interpolated to.  If more than one, separated 
+                        them with comma. The variable may or may not 
+                        exist in the destination grid file.
+
+  --srcdatafile       - If the source grid is a GRIDSPEC MOSAIC grid, the data 
+                        is stored in separate files, one per tile. srcdatafile
+                        is the prefix of the source data file.  The filename
+                        is srcdatafile.tilename.nc, where tilename is the tile 
+                        name defined in the MOSAIC file.
+
+  --srcdatafile       - If the destination grid is a GRIDSPEC MOSAIC grid, the data 
+                        is stored in separate files, one per tile. dstdatafile
+                        is the prefix of the destination data file.  The filename
+                        is dstdatafile.tilename.nc, where tilename is the tile 
+                        name defined in the MOSAIC file.
+
+  --tilefile_path    - the alternative file path for the tile files and the
+                        data files when either the source or the destination grid
+                        is a GRIDSPEC MOSAIC grid.  The path can be either relative
+                        or absolute.  If it is relative, it is relative to the
+                        working directory.  When specified, the gridlocation variable
+                        defined in the Mosaic file will be ignored. 
+
+    --dst_loc         - an optional argument that specifies whether the destination
+                        variable is located at the center or the corner of the grid
+                        if the destination variable does not exist in the destination
+                        grid file. This flag is only required for non-conservative
+                        regridding when the destination grid is in UGRID format.
+                        For all other cases, only the center location is supported
+                        that is also the default value if this argument is not specified.
+
+  --method or -m      - an optional argument specifying which interpolation
+                        method is used. The value can be one of the following:
+
+                        bilinear   - for bilinear interpolation, also the
+                                     default method if not specified.
+                        patch      - for patch recovery interpolation
+                        nearstdtos - for nearest destination to source interpolation
+                        nearststod - for nearest source to destination interpolation
+                        conserve   - for first-order conservative interpolation
+
+  --pole or -p        - an optional argument indicating what to do with
+                        the pole.
+                        The value can be one of the following:
+
+                        none  - No pole, the source grid ends at the top
+                                (and bottom) row of nodes specified in
+                                <source grid>.
+                        all   - Construct an artificial pole placed in the
+                                center of the top (or bottom) row of nodes,
+                                but projected onto the sphere formed by the
+                                rest of the grid. The value at this pole is
+                                the average of all the pole values. This
+                                is the default option.
+
+                        teeth - No new pole point is constructed, instead
+                                the holes at the poles are filled by
+                                constructing triangles across the top and
+                                bottom row of the source Grid. This can be
+                                useful because no averaging occurs, however,
+                                because the top and bottom of the sphere are
+                                now flat, for a big enough mismatch between
+                                the size of the destination and source pole
+                                regions, some destination points may still
+                                not be able to be mapped to the source Grid.
+
+                        <N>   - Construct an artificial pole placed in the
+                                center of the top (or bottom) row of nodes,
+                                but projected onto the sphere formed by the
+                                rest of the grid. The value at this pole is
+                                the average of the N source nodes next to
+                                the pole and surrounding the destination
+                                point (i.e.  the value may differ for each
+                                destination point. Here N ranges from 1 to
+                                the number of nodes around the pole.
+
+    --ignore_unmapped
+           or
+           -i         - ignore unmapped destination points. If not specified
+                        the default is to stop with an error if an unmapped
+                        point is found.
+
+    --ignore_degenerate - ignore degenerate cells in the input grids. If not specified
+                        the default is to stop with an error if an degenerate
+                        cell is found.
+
+    -r                - an optional argument specifying that the source and
+                        destination grids are regional grids.  If the argument
+                        is not given, the grids are assumed to be global.
+
+    --src_regional    - an optional argument specifying that the source is
+                        a regional grid and the destination is a global grid.
+
+    --dst_regional    - an optional argument specifying that the destination
+                        is a regional grid and the source is a global grid.
+
+    --check           - Check the correctness of the interpolated destination 
+                        variables against an analytic field. The source variable 
+                        has to be synthetically constructed using the same analytic
+                        method in order to perform meaningful comparison.
+                        The analytic field is calculated based on the coordinate
+                        of the data point.  The formular is as follows:
+                        data(i,j,k,l)=2.0+cos(lat(i,j))**2*cos(2.0*lon(i,j))+(k-1)+2*(l-1)
+                        The data field can be up to four dimensional with the
+                        first two dimension been longitude and latitude.
+                        The mean relative error between the destination and 
+                        analytic field is computed.
+
+     --no_log         - Turn off the ESMF error log.
+
+     --help           - Print the usage message and exit.
+
+     --version        - Print ESMF version and license information and exit.
+
+     -V               - Print ESMF version number and exit.
+
+ +

+ +

+13.3 Examples +

+ +

+The example below regrids the node variable zeta defined in the sample UGRID file(13.1) to +the destination grid defined in the sample GRIDSPEC file(13.1) using bilinear regridding +method and write the interpolated data into a variable named zeta. + +

+

+  mpirun -np 4 ESMF_Regrid -s simple_ugrid.nc -d simple_gridspec.nc \
+                --src_var zeta --dst_var zeta
+
+ +

+In this case, the destination variable does not exist in simple_ugrid.nc and the time +dimension is not defined in the destination file. The resulting output file has a new time dimension and a new variable zeta. +The attributes from the source variable zeta are copied to the destination variable except for +mesh and location. A new attribute coordinates is created for the destination variable to +specify the names of the coordinate variables. The header of the output file looks like: + +

+

+netcdf simple_gridspec {
+dimensions:
+      lat = 192 ;
+      lon = 288 ;
+      time = 2  ;
+variables:
+      float PSL(lat, lon) ;
+         PSL:time = 50. ;
+         PSL:units = "Pa" ;
+         PSL:long_name = "Sea level pressure" ;
+         PSL:cell_method = "time: mean" ;
+         PSL:coordinates = "lon lat" ;
+      double lat(lat) ;
+         lat:long_name = "latitude" ;
+         lat:units = "degrees_north" ;
+      double lon(lon) ;
+         lon:long_name = "longitude" ;
+         lon:units = "degrees_east" ;
+      float zeta(time, lat, lon) ;
+         zeta:standard_name = "sea_surface_height_above_geoid" ;
+         zeta:_FillValue = -999. ;
+         zeta:coordinates = "lon lat" ;
+}
+
+ +

+The next example shows the command to do the same thing as the previous example but for a +different variable ua. Since ua is defined on the face, we can only do a conservative +regridding. + +

+

+  mpirun -np 4 ESMF_Regrid -s simple_ugrid.nc -d simple_gridspec.nc \
+               --src_var ua --dst_var ua -m conserve
+
+ +

+ +

+ +

+ +
+14 ESMF_Scrip2Unstruct +

+ +

+ +

+14.1 Description +

+ +

+The ESMF_Scrip2Unstruct application is a parallel program that converts a SCRIP format grid file 12.8.1 into an unstructured grid file in the ESMF unstructured file format 12.8.2 or in the UGRID file format 12.8.4. This application program can be used together with ESMF_RegridWeightGen 12 application for the unstructured SCRIP format grid files. An unstructured SCRIP grid file will be converted into the ESMF unstructured file format internally in ESMF_RegridWeightGen. The conversion subroutine used in ESMF_RegridWeightGen is sequential and could be slow if the grid file is very big. It will be more efficient to run the ESMF_Scrip2Unstruct first and then regrid the output ESMF or UGRID file using ESMF_RegridWeightGen. Note that a logically rectangular grid file in the SCRIP format (i.e. the dimension grid_rank is equal to 2) can also be converted into an unstructured grid file with this application. + +

+The application usage is as follows: + +

+

+ESMF_Scrip2Unstruct  inputfile outputfile dualflag [fileformat]
+
+where
+  inputfile       - a SCRIP format grid file
+
+  outputfile      - the output file name
+ 
+  dualflag        - 0 for straight conversion and 1 for dual 
+		    mesh.  A dual mesh is a mesh constructed 
+                    by putting the corner coordinates in the 
+                    center of the elements and using the 
+		    center coordinates to form the mesh 
+		    corner vertices.
+
+  fileformat      - an optional argument for the output file 
+		    format.  It could be either ESMF or UGRID.
+                    If not specified, the output file is in 
+		    the ESMF format.
+
+ + + +
+esmf_support@ucar.edu +
+ + diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/node4.html b/docs/nightly/fix/reconcile-info/ESMF_refdoc/node4.html new file mode 100644 index 000000000..61c9f22cb --- /dev/null +++ b/docs/nightly/fix/reconcile-info/ESMF_refdoc/node4.html @@ -0,0 +1,15089 @@ + + + + + +3 Superstructure + + + + + + + + + + + + + + + + + + + + + +Subsections + + + +
+ +

+ +
+3 Superstructure +

+ + +

+ +

+15 Overview of Superstructure +

+ +

+ESMF superstructure classes define an architecture for assembling +Earth system applications from modeling components. A component +may be defined in terms of the physical domain that it represents, +such as an atmosphere or sea ice model. It may also be defined in terms +of a computational function, such as a data assimilation system. +Earth system research often requires that such components be coupled +together to create an application. By coupling we mean the data +transformations and, on parallel computing systems, data transfers, +that are necessary to allow data from one component to be utilized by +another. ESMF offers regridding methods and other tools to simplify +the organization and execution of inter-component data exchanges. + +

+In addition to components defined at the level of major physical +domains and computational functions, components may be defined that +represent smaller computational functions within larger components, +such as the transformation of data between the physics and dynamics +in a spectral atmosphere model, +or the creation of nested higher resolution regions +within a coarser grid. The objective is to couple components at varying +scales both flexibly and efficiently. ESMF encourages a hierarchical +application structure, in which large components branch into +smaller sub-components (see Figure 2). ESMF also makes +it easier for the same component to be used in multiple contexts +without changes to its source code. + +

+

+ + + + + + + + + + + + + + + +
+
+Key Features
Modular, component-based architecture.
Hierarchical assembly of components into applications.
Use of components in multiple contexts without modification.
Sequential or concurrent component execution.
Single program, multiple datastream (SPMD) applications for +maximum portability and reconfigurability.
Multiple program, multiple datastream (MPMD) option for +flexibility.
+
+ +

+ +

+15.1 Superstructure Classes +

+ +

+There are a small number of classes in the ESMF superstructure: + +

+ +

    +
  • Component An ESMF component has two parts, one that is +supplied by ESMF and one that is supplied by the user. The +part that is supplied by the framework is an ESMF derived type that +is either a Gridded Component (GridComp) or a Coupler +Component (CplComp). A Gridded Component typically represents +a physical domain in which data is associated with one or more +grids - for example, a sea ice model. A Coupler Component +arranges and executes data transformations and transfers between +one or more Gridded Components. Gridded Components and Coupler +Components have standard methods, which include initialize, run, +and finalize. These methods can be multi-phase. + +

    +The second part of an ESMF Component is user code, such as a +model or data assimilation system. Users set entry points +within their code so that it is callable by the framework. +In practice, setting entry points means that within user code +there are calls to ESMF methods that associate the name of a +Fortran subroutine with a corresponding standard ESMF operation. +For example, a user-written initialization routine called +myOceanInit might be associated with the standard +initialize routine of an ESMF Gridded Component named “myOcean” +that represents an ocean model. + +

    +

  • +
  • State ESMF Components exchange information with other +Components only through States. A State is an ESMF derived +type that can contain Fields, FieldBundles, Arrays, ArrayBundles, +and other States. A Component is associated with two States, an +Import State and an Export State. Its Import State +holds the data that it receives from other Components. +Its Export State contains data that it makes available to +other Components. + +

    +

  • +
+ +

+An ESMF coupled application typically involves a parent Gridded Component, +two or more child Gridded Components and one or more Coupler +Components. + +

+The parent Gridded Component is responsible for creating the child +Gridded Components that are exchanging data, for creating the Coupler, +for creating the necessary Import and Export States, and for +setting up the desired sequencing. The application's “main” routine +calls the parent Gridded Component's initialize, run, and finalize +methods in order to execute the application. For each of these +standard methods, the parent Gridded Component in turn calls the +corresponding methods in the child Gridded Components and the +Coupler Component. For example, consider a simple coupled +ocean/atmosphere simulation. When the initialize method of the +parent Gridded Component is called by the application, it in turn +calls the initialize methods of its child atmosphere and ocean +Gridded Components, and the initialize method of an +ocean-to-atmosphere Coupler Component. Figure 3 +shows this schematically. + +

+

+
+
+ + + +
Figure 2: +ESMF enables applications such as the atmospheric general +circulation model GEOS-5 to be structured hierarchically, and +reconfigured and extended easily. Each box in this diagram is an +ESMF Gridded Component.
+\scalebox{0.9}{\includegraphics{ESMF_GEOS5}}
+
+
+
+ +

+ +

+ +
+15.2 Hierarchical Creation of Components +

+ +

+Components are allocated computational resources in the form of +Persistent Execution Threads, or PETs. A list of a Component's +PETs is contained in a structure called a Virtual Machine, +or VM. The VM also contains information about the topology and +characteristics of the underlying computer. +Components are created hierarchically, with parent Components creating +child Components and allocating some or all of their PETs to each one. +By default ESMF creates a new VM for each child Component, which +allows Components to tailor their VM resources to match their needs. +In some cases, a child may want to share its parent's VM - ESMF +supports this, too. + +

+A Gridded Component may exist across all the PETs in an application. +A Gridded Component may also reside on a subset of PETs in an +application. These PETs may wholly coincide with, be wholly contained +within, or wholly contain another Component. + +

+

+
+
+ + + +
Figure 3: +A call to a standard ESMF initialize (run, finalize) method +by a parent component triggers calls to initialize (run, finalize) +all of its child components.
+\scalebox{1.0}{\includegraphics{ESMF_appunit}}
+
+
+
+ +

+ +

+ +
+15.3 Sequential and Concurrent Execution of Components +

+ +

+When a set of Gridded Components and a Coupler runs in sequence +on the same set of PETs the application is executing in a sequential +mode. When Gridded Components are created and run on mutually exclusive +sets of PETs, and are coupled by a Coupler Component that extends over +the union of these sets, the mode of execution is concurrent. + +

+Figure 4 illustrates a typical configuration for +a simple coupled sequential +application, and Figure 5 shows a possible +configuration for the same application running in a concurrent mode. + +

+Parent Components can select if and when to wait for concurrently +executing child Components, synchronizing only when required. + +

+It is possible for ESMF applications to contain some Component sets +that are executing sequentially and others that are executing concurrently. +We might have, for example, atmosphere and land Components created +on the same subset of PETs, ocean and sea ice Components created on +the remainder of PETs, and a Coupler created across all the PETs in +the application. + +

+

+
+
+ + + +
Figure 4: +Schematic of the run method of a coupled application, with an +“Atmosphere” and an “Ocean” Gridded Component running sequentially with +an “Atm-Ocean Coupler.” The top-level “Hurricane Model” +Gridded Component contains the sequencing information and time +advancement loop. The application driver, Coupler, and all Gridded Components +are distributed over nine PETs.
+\scalebox{1.0}{\includegraphics{ESMF_serial}}
+
+
+
+ +

+

+
+
+ + + +
Figure 5: +Schematic of the run method of a coupled application, with an +“Atmosphere” and an “Ocean” Gridded Component running concurrently with +an “Atm-Ocean Coupler.” The top-level “Hurricane Model” +Gridded Component contains the sequencing information and time +advancement loop. The application driver, Coupler, and top-level “Hurricane +Model” Gridded Component are distributed over nine PETs. The +“Atmosphere” Gridded Component is distributed over three PETs and +the “Ocean” Gridded Component is distributed over six PETs.
+\scalebox{1.0}{\includegraphics{ESMF_concurrent}}
+
+
+
+ +

+ +

+ +
+15.4 Intra-Component Communication +

+ +

+All data transfers within an ESMF application occur within a +component. For example, a Gridded Component may contain halo updates. +Another example is that a Coupler Component may redistribute +data between two Gridded Components. As a result, +the architecture of ESMF does not depend on any particular data +communication mechanism, and new communication schemes can be +introduced without affecting the overall structure of the application. + +

+Since all data communication happens within a component, a Coupler +Component must be created on the union of the PETs of all +the Gridded Components that it couples. + +

+ +

+ +
+15.5 Data Distribution and Scoping in Components +

+ +

+The scope of distributed objects is the VM of the currently +executing Component. For this reason, all +PETs in the current VM must make the same distributed object +creation calls. When a Coupler Component running on a superset +of a Gridded Component's PETs needs to make communication calls +involving objects created by the Gridded Component, +an ESMF-supplied function called ESMF_StateReconcile() creates proxy +objects for those PETs that had no previous information about the +distributed objects. Proxy objects contain no local data but +can be used in communication calls (such as regrid or redistribute) +to describe the remote source for data being moved to the current PET, +or to describe the remote destination for data being moved from the local PET. +Figure 6 is a simple schematic that shows the +sequence of events in a reconcile call. + +

+

+
+
+ + + +
Figure 6: +An ESMF_StateReconcile() call creates proxy +objects for use in subsequent communication calls. The reconcile +call would normally be made during Coupler initialization.
+\scalebox{1.0}{\includegraphics{ESMF_reconcile}}
+
+
+
+ +

+ +

+ +
+15.6 Performance +

+ +

+The ESMF design enables the user to configure ESMF +applications so that data is transferred directly from one component +to another, without requiring that it be copied or sent to a different data +buffer as an interim step. This is likely to be the most efficient way +of performing inter-component coupling. However, if desired, an +application can also be configured so that data from a source component +is sent to a distinct set of Coupler Component PETs for processing +before being sent to its destination. + +

+The ability to overlap computation with communication is essential for +performance. When running with ESMF the user can initiate data +sends during Gridded Component execution, as soon as the data is ready. +Computations can then proceed simultaneously with the data transfer. + +

+ +

+15.7 Object Model +

+ +

+The following is a simplified Unified Modeling Language (UML) diagram showing the relationships among +ESMF superstructure classes. See Appendix A, A Brief Introduction +to UML, for a translation table that lists the symbols in the diagram +and their meaning. + +

+

+\includegraphics{Comp_obj} + +
+ +

+ +

+16 Application Driver and Required ESMF Methods +

+ +

+16.1 Description +

+ +

+Every ESMF application needs a driver code. Typically the driver layer is +implemented as the "main" of the application, although this is not strictly an +ESMF requirement. For most ESMF applications the task of the application driver +will be very generic: Initialize ESMF, create a top-level Component and call its +Initialize, Run and Finalize methods, before destroying the top-level Component +again and calling ESMF Finalize. + +

+ESMF provides a number of different application driver templates in the +$ESMF_DIR/src/Superstructure/AppDriver directory. An appropriate one +can be chosen depending on how the application is to be structured: + +

+

+
Sequential vs. Concurrent Execution
+

+In a sequential execution model, every Component executes +on all PETs, with each Component completing execution before +the next Component begins. This has the appeal of +simplicity of data consumption and production: when a Gridded +Component starts, all required data is available for use, and when +a Gridded Component finishes, all data produced is ready for consumption +by the next Gridded Component. This approach also has +the possibility of less data movement if the grid and +data decomposition is done such that each processor's memory contains +the data needed by the next Component. + +

+In a concurrent execution model, subgroups of PETs run +Gridded Components and multiple Gridded Components are active at the +same time. Data exchange must be coordinated between Gridded +Components so that data deadlock does not occur. This strategy +has the advantage of allowing coupling to other Gridded Components +at any time during the computational process, including not +having to return to the calling level of code before making +data available. + +

+

+
Pairwise vs. Hub and Spoke
+

+Coupler Components are responsible for taking data from one +Gridded Component and putting it into the form expected by another +Gridded Component. This might include regridding, change of units, +averaging, or binning. + +

+Coupler Components can be written for pairwise data exchange: +the Coupler Component takes data from a single Component and transforms +it for use by another single Gridded Component. This simplifies the +structure of the Coupler Component code. + +

+Couplers can also be written using a hub and spoke model where a +single Coupler accepts data from all other Components, can do data +merging or splitting, and formats data for all other Components. + +

+Multiple Couplers, using either of the above two models or some mixture of +these approaches, are also possible. + +

+

+
Implementation Language
+

+The ESMF framework currently has Fortran interfaces for all public functions. +Some functions also have C interfaces, and the number of these is expected to +increase over time. + +

+

+
Number of Executables
+

+The simplest way to run an application +is to run the same executable program on all PETs. Different Components +can still be run on mutually exclusive PETs by using branching +(e.g., if this is PET 1, 2, or 3, run Component A, if it is +PET 4, 5, or 6 run Component B). This is a SPMD model, +Single Program Multiple Data. + +

+The alternative is to start a different executable program on different +PETs. This is a MPMD model, Multiple Program Multiple Data. +There are complications with many job control systems on multiprocessor +machines in getting the different executables started, and getting +inter-process communications established. ESMF currently has some +support for MPMD: different Components can run as separate executables, +but the Coupler that transfers data between the Components must still +run on the union of their PETs. This means that the Coupler Component +must be linked into all of the executables. + +

+

+
+ +

+ +

+16.2 Constants +

+ +

+ +

+ +
+16.2.1 ESMF_END +

+ +

+DESCRIPTION: +
+The ESMF_End_Flag determines how an ESMF application is shut down. + +

+The type of this flag is: + +

+type(ESMF_End_Flag) + +

+The valid values are: +

+
ESMF_END_ABORT
+
Global abort of the ESMF application. There is no guarantee + that all PETs will shut down cleanly during an abort. However, all + attempts are made to prevent the application from hanging and the + LogErr of at least one PET will be completely flushed during the abort. + This option should only be used if a condition is detected that + prevents normal continuation or termination of the application. + Typical conditions that warrant the use of ESMF_END_ABORT + are those that occur on a per PET basis where other PETs may be blocked + in communication calls, unable to reach the normal termination point. + An aborted application returns to the parent process with a system + dependent indication that a failure occurred during execution. + +
+
ESMF_END_NORMAL
+
Normal termination of the ESMF application. Wait for all PETs of the + global VM to reach + ESMF_Finalize() before termination. This is + the clean way of terminating an application. MPI_Finalize() will + be called in case of MPI applications. + +
+
ESMF_END_KEEPMPI
+
Same as ESMF_END_NORMAL but MPI_Finalize() will not + be called. It is the user code's responsibility to shut down MPI + cleanly if necessary. +
+
+ +

+16.3 Use and Examples +

+ +

+ESMF encourages application organization in which there is a single +top-level Gridded Component. This provides a simple, clear sequence +of operations at the highest level, and also enables the entire +application to be treated as a sub-Component of another, larger +application if desired. When a simple application is organized in this fashion +the standard AppDriver can probably be used without much modification. + +

+Examples of program organization using the AppDriver can be found in the +src/Superstructure/AppDriver directory. A set of subdirectories +within the AppDriver directory follows the naming convention: + +

+<seq|concur>_<pairwise|hub>_<f|c>driver_<spmd|mpmd>
+
+ +

+The example that is currently implemented is +seq_pairwise_fdriver_spmd, which +has sequential component execution, a pairwise coupler, a main program +in Fortran, and all processors launching the same executable. +It is also copied automatically into a top-level +quick_start directory at compilation time. + +

+The user can copy the AppDriver files into +their own local directory. Some of the files can be used unchanged. +Others are template files which have the rough outline of the code but +need additional application-specific code added in order to perform a +meaningful function. The README file in the AppDriver +subdirectory or quick_start directory contains instructions about +which files to change. + +

+Examples of concurrent component execution can be found in the +system tests that are bundled with the ESMF distribution. + +

+ +

+ +

+ +

+

+ 
+  ---------------------------------------------------------------------------
+  ---------------------------------------------------------------------------
+   EXAMPLE:  This is an AppDriver.F90 file for a sequential ESMF application.
+  ---------------------------------------------------------------------------
+  ---------------------------------------------------------------------------
+  
+    The ChangeMe.F90 file that's included below contains a number of
+    definitions that are used by the AppDriver, such as the name of the
+    application's main configuration file and the name of the application's
+    SetServices routine.  This file is in the same directory as the
+    AppDriver.F90 file.
+  ---------------------------------------------------------------------------
+ 
+ #include "ChangeMe.F90"
+ 
+     program ESMF_AppDriver
+ #define ESMF_METHOD "program ESMF_AppDriver"
+ 
+ #include "ESMF.h"
+ 
+     ! ESMF module, defines all ESMF data types and procedures
+     use ESMF
+ 
+     ! Gridded Component registration routines.  Defined in "ChangeMe.F90"
+     use USER_APP_Mod, only : SetServices => USER_APP_SetServices
+ 
+     implicit none
+ 
+  ---------------------------------------------------------------------------
+    Define local variables
+  ---------------------------------------------------------------------------
+ 
+     ! Components and States
+     type(ESMF_GridComp) :: compGridded
+     type(ESMF_State) :: defaultstate
+ 
+     ! Configuration information
+     type(ESMF_Config) :: config
+ 
+     ! A common Grid
+     type(ESMF_Grid) :: grid
+ 
+     ! A Clock, a Calendar, and timesteps
+     type(ESMF_Clock) :: clock
+     type(ESMF_TimeInterval) :: timeStep
+     type(ESMF_Time) :: startTime
+     type(ESMF_Time) :: stopTime
+ 
+     ! Variables related to the Grid
+     integer :: i_max, j_max
+ 
+     ! Return codes for error checks
+     integer :: rc, localrc
+ 
+  ---------------------------------------------------------------------------
+    Initialize ESMF.  Note that an output Log is created by default.
+  ---------------------------------------------------------------------------
+ 
+     call ESMF_Initialize(defaultCalKind=ESMF_CALKIND_GREGORIAN, rc=localrc)
+     if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
+         ESMF_CONTEXT, rcToReturn=rc)) &
+         call ESMF_Finalize(rc=localrc, endflag=ESMF_END_ABORT)
+ 
+     call ESMF_LogWrite("ESMF AppDriver start", ESMF_LOGMSG_INFO)
+ 
+  ---------------------------------------------------------------------------
+    Create and load a configuration file.
+    The USER_CONFIG_FILE is set to sample.rc in the ChangeMe.F90 file.
+    The sample.rc file is also included in the directory with the
+    AppDriver.F90 file.
+  ---------------------------------------------------------------------------
+ 
+     config = ESMF_ConfigCreate(rc=localrc)
+     if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
+         ESMF_CONTEXT, rcToReturn=rc)) &
+         call ESMF_Finalize(rc=localrc, endflag=ESMF_END_ABORT)
+ 
+     call ESMF_ConfigLoadFile(config, USER_CONFIG_FILE, rc = localrc)
+     if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
+         ESMF_CONTEXT, rcToReturn=rc)) &
+         call ESMF_Finalize(rc=localrc, endflag=ESMF_END_ABORT)
+ 
+  ---------------------------------------------------------------------------
+    Get configuration information.
+  
+    A configuration file like sample.rc might include:
+    - size and coordinate information needed to create the default Grid.
+    - the default start time, stop time, and running intervals
+      for the main time loop.
+  ---------------------------------------------------------------------------
+ 
+     call ESMF_ConfigGetAttribute(config, i_max, label='I Counts:', &
+       default=10, rc=localrc)
+     if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
+         ESMF_CONTEXT, rcToReturn=rc)) &
+         call ESMF_Finalize(rc=localrc, endflag=ESMF_END_ABORT)
+     call ESMF_ConfigGetAttribute(config, j_max, label='J Counts:', &
+       default=40, rc=localrc)
+     if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
+         ESMF_CONTEXT, rcToReturn=rc)) &
+         call ESMF_Finalize(rc=localrc, endflag=ESMF_END_ABORT)
+ 
+  ---------------------------------------------------------------------------
+    Create the top Gridded Component.
+  ---------------------------------------------------------------------------
+ 
+     compGridded = ESMF_GridCompCreate(name="ESMF Gridded Component", &
+         rc=localrc)
+     if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
+         ESMF_CONTEXT, rcToReturn=rc)) &
+         call ESMF_Finalize(rc=localrc, endflag=ESMF_END_ABORT)
+ 
+     call ESMF_LogWrite("Component Create finished", ESMF_LOGMSG_INFO)
+ 
+  ----------------------------------------------------------------------------
+    Register the set services method for the top Gridded Component.
+  ----------------------------------------------------------------------------
+ 
+     call ESMF_GridCompSetServices(compGridded, userRoutine=SetServices, rc=rc)
+     if (ESMF_LogFoundError(rc, msg="Registration failed", rcToReturn=rc)) &
+         call ESMF_Finalize(rc=localrc, endflag=ESMF_END_ABORT)
+ 
+  ----------------------------------------------------------------------------
+    Create and initialize a Clock.
+  ----------------------------------------------------------------------------
+ 
+       call ESMF_TimeIntervalSet(timeStep, s=2, rc=localrc)
+       if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
+             ESMF_CONTEXT, rcToReturn=rc)) &
+             call ESMF_Finalize(rc=localrc, endflag=ESMF_END_ABORT)
+ 
+       call ESMF_TimeSet(startTime, yy=2004, mm=9, dd=25, rc=localrc)
+       if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
+             ESMF_CONTEXT, rcToReturn=rc)) &
+             call ESMF_Finalize(rc=localrc, endflag=ESMF_END_ABORT)
+ 
+       call ESMF_TimeSet(stopTime, yy=2004, mm=9, dd=26, rc=localrc)
+       if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
+             ESMF_CONTEXT, rcToReturn=rc)) &
+             call ESMF_Finalize(rc=localrc, endflag=ESMF_END_ABORT)
+ 
+       clock = ESMF_ClockCreate(timeStep, startTime, stopTime=stopTime, &
+                 name="Application Clock", rc=localrc)
+       if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
+             ESMF_CONTEXT, rcToReturn=rc)) &
+             call ESMF_Finalize(rc=localrc, endflag=ESMF_END_ABORT)
+ 
+  ----------------------------------------------------------------------------
+    Create and initialize a Grid.
+  
+    The default lower indices for the Grid are (/1,1/).
+    The upper indices for the Grid are read in from the sample.rc file,
+    where they are set to (/10,40/).  This means a Grid will be
+    created with 10 grid cells in the x direction and 40 grid cells in the
+    y direction.  The Grid section in the Reference Manual shows how to set
+    coordinates.
+  ----------------------------------------------------------------------------
+ 
+       grid = ESMF_GridCreateNoPeriDim(maxIndex=(/i_max, j_max/), &
+                              name="source grid", rc=localrc)
+       if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
+             ESMF_CONTEXT, rcToReturn=rc)) &
+             call ESMF_Finalize(rc=localrc, endflag=ESMF_END_ABORT)
+ 
+       ! Attach the grid to the Component
+       call ESMF_GridCompSet(compGridded, grid=grid, rc=localrc)
+       if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
+             ESMF_CONTEXT, rcToReturn=rc)) &
+             call ESMF_Finalize(rc=localrc, endflag=ESMF_END_ABORT)
+ 
+  ----------------------------------------------------------------------------
+    Create and initialize a State to use for both import and export.
+    In a real code, separate import and export States would normally be
+    created.
+  ----------------------------------------------------------------------------
+ 
+       defaultstate = ESMF_StateCreate(name="Default State", rc=localrc)
+       if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
+             ESMF_CONTEXT, rcToReturn=rc)) &
+             call ESMF_Finalize(rc=localrc, endflag=ESMF_END_ABORT)
+ 
+  ----------------------------------------------------------------------------
+    Call the initialize, run, and finalize methods of the top component.
+    When the initialize method of the top component is called, it will in
+    turn call the initialize methods of all its child components, they
+    will initialize their children, and so on.  The same is true of the
+    run and finalize methods.
+  ----------------------------------------------------------------------------
+ 
+       call ESMF_GridCompInitialize(compGridded, importState=defaultstate, &
+         exportState=defaultstate, clock=clock, rc=localrc)
+       if (ESMF_LogFoundError(rc, msg="Initialize failed", rcToReturn=rc)) &
+           call ESMF_Finalize(rc=localrc, endflag=ESMF_END_ABORT)
+ 
+       call ESMF_GridCompRun(compGridded, importState=defaultstate, &
+         exportState=defaultstate, clock=clock, rc=localrc)
+       if (ESMF_LogFoundError(rc, msg="Run failed", rcToReturn=rc)) &
+           call ESMF_Finalize(rc=localrc, endflag=ESMF_END_ABORT)
+ 
+       call ESMF_GridCompFinalize(compGridded, importState=defaultstate, &
+         exportState=defaultstate, clock=clock, rc=localrc)
+       if (ESMF_LogFoundError(rc, msg="Finalize failed", rcToReturn=rc)) &
+           call ESMF_Finalize(rc=localrc, endflag=ESMF_END_ABORT)
+ 
+ 
+  ----------------------------------------------------------------------------
+    Destroy objects.
+  ----------------------------------------------------------------------------
+ 
+       call ESMF_ClockDestroy(clock, rc=localrc)
+       if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
+         ESMF_CONTEXT, rcToReturn=rc)) &
+         call ESMF_Finalize(rc=localrc, endflag=ESMF_END_ABORT)
+ 
+       call ESMF_StateDestroy(defaultstate, rc=localrc)
+       if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
+         ESMF_CONTEXT, rcToReturn=rc)) &
+         call ESMF_Finalize(rc=localrc, endflag=ESMF_END_ABORT)
+ 
+       call ESMF_GridCompDestroy(compGridded, rc=localrc)
+       if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
+         ESMF_CONTEXT, rcToReturn=rc)) &
+         call ESMF_Finalize(rc=localrc, endflag=ESMF_END_ABORT)
+ 
+  ----------------------------------------------------------------------------
+    Finalize and clean up.
+  ----------------------------------------------------------------------------
+ 
+     call ESMF_Finalize()
+ 
+     end program ESMF_AppDriver
+
+ + +

+16.4 Required ESMF Methods +

+ +

+There are a few methods that every ESMF application must contain. First, +ESMF_Initialize() and ESMF_Finalize() are in complete analogy +to MPI_Init() and MPI_Finalize() known from MPI. All ESMF +programs, serial or parallel, must initialize the ESMF system at the beginning, +and finalize it at the end of execution. The behavior of calling any +ESMF method before ESMF_Initialize(), or after ESMF_Finalize() +is undefined. + +

+Second, every ESMF Component that is accessed by an ESMF application requires +that its set services routine is called through +ESMF_<Grid/Cpl>CompSetServices(). The Component must implement +one public entry point, its set services routine, that can be called +through the ESMF_<Grid/Cpl>CompSetServices() library routine. The +Component set services routine is responsible for setting entry points +for the standard ESMF Component methods Initialize, Run, and Finalize. + +

+Finally, the Component can optionally call ESMF_<Grid/Cpl>CompSetVM() +before calling +ESMF_<Grid/Cpl>CompSetServices(). Similar to +ESMF_<Grid/Cpl>CompSetServices(), the +ESMF_<Grid/Cpl>CompSetVM() +call requires a public entry point into the Component. It allows the Component +to adjust certain aspects of its execution environment, i.e. its own VM, before +it is started up. + +

+The following sections discuss the above mentioned aspects in more detail. + +

+ +

+ +

+ +

+ +

+16.4.1 ESMF_Initialize - Initialize ESMF +

+ +

+ +

+
+INTERFACE: +

       subroutine ESMF_Initialize(configFilenameFromArgNum, &
+         configFilename, configKey, &
+         defaultDefaultCalKind, defaultCalKind, &
+         defaultDefaultLogFilename, defaultLogFilename, &
+         defaultLogAppendFlag, logAppendFlag, defaultLogKindFlag, logKindFlag, &
+         mpiCommunicator,  ioUnitLBound, ioUnitUBound, &
+         defaultGlobalResourceControl, globalResourceControl, config, hconfig, &
+         vm, rc)
+
ARGUMENTS: +
 -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       integer,                 intent(in),  optional :: configFilenameFromArgNum
+       character(len=*),        intent(in),  optional :: configFilename
+       character(len=*),        intent(in),  optional :: configKey(:)
+       type(ESMF_CalKind_Flag), intent(in),  optional :: defaultDefaultCalKind
+       type(ESMF_CalKind_Flag), intent(in),  optional :: defaultCalKind
+       character(len=*),        intent(in),  optional :: defaultDefaultLogFilename
+       character(len=*),        intent(in),  optional :: defaultLogFilename
+       logical,                 intent(in),  optional :: defaultLogAppendFlag
+       logical,                 intent(in),  optional :: logAppendFlag
+       type(ESMF_LogKind_Flag), intent(in),  optional :: defaultLogKindFlag
+       type(ESMF_LogKind_Flag), intent(in),  optional :: logKindFlag
+       integer,                 intent(in),  optional :: mpiCommunicator
+       integer,                 intent(in),  optional :: ioUnitLBound
+       integer,                 intent(in),  optional :: ioUnitUBound
+       logical,                 intent(in),  optional :: defaultGlobalResourceControl
+       logical,                 intent(in),  optional :: globalResourceControl
+       type(ESMF_Config),       intent(out), optional :: config
+       type(ESMF_HConfig),      intent(out), optional :: hconfig
+       type(ESMF_VM),           intent(out), optional :: vm
+       integer,                 intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    7.0.0
    +
    Added argument logAppendFlag to allow specifying that the + existing log files will be overwritten. + +
    +
    8.2.0
    +
    Added argument globalResourceControl to support ESMF-aware + threading and resource control on the global VM level. +
    +Added argument config to return default handle to the + defaultConfig. +
    +Renamed argument defaultConfigFilename to + configFilename, in order to clarify that provided settings + in the Config file are not defaults, but final + overrides. +
    +Introduce default prefixed arguments: + defaultDefaultLogFilename, + defaultLogAppendFlag, defaultLogKindFlag, + defaultGlobalResourceControl. These arguments allow + specification of defaults for the associated settings. This + default can be overridden via the associated argument, without + the extra default prefix, either specified in the call, or + within the specified Config file. + +
    +
    8.5.0
    +
    Added argument configKey to support custom location of the + map of predefined initialization options for YAML + configurations. +
    +Added argument configFilenameFromArgNum to support config + file specification via the command line. + +
    +
    8.6.0
    +
    Added defaultDefaultCalKind argument to allow specifiation + of a default for defaultCalKind. + +
    +
    8.7.0
    +
    Added argument hconfig to simplify direct access to the + default ESMF_HConfig object. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+This method must be called once on each PET before + any other ESMF methods are used. The method contains a + barrier before returning, ensuring that all processes + made it successfully through initialization. + +

+Typically ESMF_Initialize() will call MPI_Init() + internally unless MPI has been initialized by the user code before + initializing the framework. If the MPI initialization is left to + ESMF_Initialize() it inherits all of the MPI implementation + dependent limitations of what may or may not be done before + MPI_Init(). For instance, it is unsafe for some MPI + implementations, such as MPICH1, to do I/O before the MPI environment + is initialized. Please consult the documentation of your MPI + implementation for details. + +

+Note that when using MPICH1 as the MPI library, ESMF needs to use + the application command line arguments for MPI_Init(). However, + ESMF acquires these arguments internally and the user does not need + to worry about providing them. Also, note that ESMF does not alter + the command line arguments, so that if the user obtains them they will + be as specified on the command line (including those which MPICH1 would + normally strip out). + +

+ESMF_Initialize() supports running ESMF inside a user MPI program. + Details of this feature are discussed under the VM example + 51.3.5. It is not necessary that all MPI ranks are + handed to ESMF. Section 51.3.6 shows how an MPI + communicator can be used to execute ESMF on a subset of MPI ranks. + ESMF_Initialize() supports running multiple concurrent + instances of ESMF under the same user MPI program. This feature is + discussed under 51.3.7. + +

+In order to use any of the advanced resource management functions that + ESMF provides via the ESMF_*CompSetVM*() methods, the MPI + environment must be thread-safe. ESMF_Initialize() handles this + automatically if it is in charge of initializing MPI. However, if the + user code initializes MPI before calling into ESMF_Initialize(), + it must do so via MPI_Init_thread(), specifying + MPI_THREAD_SERIALIZED or above for the required level of thread + support. + +

+In cases where ESMF_*CompSetVM*() methods are used to move + processing elements (PEs), i.e. CPU cores, between persistent execution + threads (PETs), ESMF uses POSIX signals between PETs. In order to do so + safely, the proper signal handlers must be installed before MPI is + initialized. ESMF_Initialize() handles this automatically if it is + in charge of initializing MPI. If, however, MPI is explicitly initialized + by user code, then to ensure correct signal handling it is necessary to + call ESMF_InitializePreMPI() from the user code prior to the MPI + initialization. + +

+By default, ESMF_Initialize() opens multiple error log files, + one per processor. This is very useful for debugging purpose. However, + when running the application on a large number of tasks, opening a + large number of log files and writing log messages from all the tasks + can become a performance bottleneck. Therefore, it is recommended + for production runs to set logKindFlag to ESMF_LOGKIND_NONE, or + ESMF_LOGKIND_Multi_On_Error. The latter only creates log files + when an error occurs. + +

+When integrating ESMF with applications where Fortran unit number conflicts + exist, the optional ioUnitLBound and ioUnitUBound arguments may be + used to specify an alternate unit number range. See section 53.2.1 + for more information on how ESMF uses Fortran unit numbers. + +

+Before exiting the application the user must call ESMF_Finalize() + to release resources and clean up ESMF gracefully. See the + ESMF_Finalize() documentation about details relating to the MPI + environment. + +

+The arguments are: +

+
[configFilenameFromArgNum]
+
Index of the command line argument specifying the config file + name. If the specified command line argument does not exist, or + configFilenameFromArgNum was not specified, the + configFilename argument, if provided, is used by default. + +
+
[configFilename]
+
Name of the configuration file for the entire application. + If this argument is specified, the configuration file must exist. + Its content is read during ESMF_Initialize(), and + returned in optional argument config if present. + +

+The traditional ESMF_Config format and the YAML format + are supported. The latter is identified by file suffix .yaml + and .yml, including all lower/upper case letter combinations + that map to either suffix. + +

+In the case of the traditional ESMF_Config format, the + predefined labels of initialization options discussed below are + expected on the top level of the configuration. The expected + termination character for this case is a single colon following + each label. + +

+For the YAML case, the predefined initialization option labels are + expected as the keys of a map. If the optional argument + configKey is specified, it is used to locate this map. The + map is expected as the terminal value of a succession of mappings: +

+               configKey(1) : 
+                 configKey(2) : 
+                   ...
+                     configKey(size(configKey)) :
+                       {map of specified init options}
+
+ By default, in the absence of argument configKey, the top + level itself is searched for a mapping of predefined labels, + analogous to the traditional case. + +

+If any of the following predefined labels are found in the specified + configuration file (as per the above defined rules), their + values are used to set the associated ESMF_Initialize() + argument, overriding any defaults. + If the same argument is also specified in the + ESMF_Initialize() call directly, an error is returned, + and ESMF is not initialized. + The supported config labels are: + +

    +
  • defaultCalKind +
  • +
  • defaultLogFilename +
  • +
  • logAppendFlag +
  • +
  • logKindFlag +
  • +
  • globalResourceControl + +
  • +
+ +

+ESMF allows the user to affect certain details about the execution + of an application through a number of run-time environment variables. + The following list of variables are checked within the specified + configuration file. If a matching label is found, the respective + value is set, potentially overriding the value defined within the + user environment for the same variable. + +

    +
  • ESMF_RUNTIME_PROFILE +
  • +
  • ESMF_RUNTIME_PROFILE_OUTPUT +
  • +
  • ESMF_RUNTIME_PROFILE_PETLIST +
  • +
  • ESMF_RUNTIME_TRACE +
  • +
  • ESMF_RUNTIME_TRACE_CLOCK +
  • +
  • ESMF_RUNTIME_TRACE_PETLIST +
  • +
  • ESMF_RUNTIME_TRACE_COMPONENT +
  • +
  • ESMF_RUNTIME_TRACE_FLUSH +
  • +
  • ESMF_RUNTIME_COMPLIANCECHECK + +
  • +
+ +
+
[configKey]
+
If present, use configKey to find the map of predefined + initialization options that are used during ESMF initialization. + The default is to search the top level of the configuration for the + labels directly. + The configKey option is only supported for YAML configurations. + An error is returned if configKey is specified for the + traditional ESMF_Config case. + +
+
[defaultDefaultCalKind]
+
Default value for argument defaultCalKind, the calendar + used by ESMF Time Manger by default. + If not specified, defaults to ESMF_CALKIND_NOCALENDAR. + +
+
[defaultCalKind]
+
Sets the default calendar to be used by ESMF Time Manager. + See section 42.2.1 for a list of valid options. + If not specified, + defaults according to defaultDefaultCalKind. + +
+
[defaultDefaultLogFilename]
+
Default value for argument defaultLogFilename, the name of + the default log file for warning and error messages. + If not specified, the default is ESMF_LogFile. + +
+
[defaultLogFilename]
+
Name of the default log file for warning and error messages. + If not specified, + defaults according to defaultDefaultLogFilename. + +
+
[defaultLogAppendFlag]
+
Default value for argument logAppendFlag, indicating the + overwrite behavior in case the default log file already exists. + If not specified, the default is .true.. + +
+
[logAppendFlag]
+
If the default log file already exists, a value of .false. + will set the file position to the beginning of the file. A value + of .true. sets the position to the end of the file. + If not specified, + defaults according to defaultLogAppendFlag. + +
+
[defaultLogKindFlag]
+
Default value for argument logKindFlag, setting the LogKind + of the default ESMF log. + If not specified, the default is ESMF_LOGKIND_MULTI. + +
+
[logKindFlag]
+
Sets the LogKind of the default ESMF log. See section + 49.2.2 for a list of valid options. + If not specified, + defaults according to defaultLogKindFlag. + +
+
[mpiCommunicator]
+
MPI communicator defining the group of processes on which the + ESMF application is running. + See section 51.3.6 and 51.3.7 + for details. + If not specified, defaults to MPI_COMM_WORLD. + +
+
[ioUnitLBound]
+
Lower bound for Fortran unit numbers used within the ESMF library. + Fortran units are primarily used for log files. Legal unit numbers + are positive integers. A value higher than 10 is recommended + in order to avoid the compiler-specific + reservations which are typically found on the first few units. + If not specified, defaults to ESMF_LOG_FORT_UNIT_NUMBER, + which is distributed with a value of 50. + +
+
[ioUnitUBound]
+
Upper bound for Fortran unit numbers used within the ESMF library. + Must be set to a value at least 5 units higher than ioUnitLBound. + If not specified, defaults to ESMF_LOG_UPPER, which is + distributed with a value of 99. + +
+
[defaultGlobalResourceControl]
+
Default value for argument globalResourceControl, indicating + whether PETs of the global VM are pinned to PEs and the OpenMP + threading level is reset. + If not specified, the default is .false.. + +
+
[globalResourceControl]
+
For .true., each global PET is pinned to the corresponding + PE (i.e. CPU core) in order. Further, if OpenMP support is enabled + for the ESMF installation (during build time), the + OMP_NUM_THREADS is set to 1 on every PET, regardless + of the setting in the launching environment. The .true. + setting is recommended for applications that utilize the ESMF-aware + threading and resource control features. + For .false., global PETs are not pinned by ESMF, and + OMP_NUM_THREADS is not modified. + If not specified, + defaults according to defaultGlobalResourceControl. + +
+
[config]
+
Returns the default ESMF_Config if the + configFilename argument was provided. Otherwise the + presence of this argument triggers an error. + +
+
[hconfig]
+
Returns the default ESMF_HConfig if the + configFilename argument was provided. Otherwise the + presence of this argument triggers an error. + +
+
[vm]
+
Returns the global ESMF_VM that was created + during initialization. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +

+

+
+ +

+ +

+ +

+16.4.2 ESMF_InitializePreMPI - Initialize parts of ESMF that must happen before MPI is initialized +

+ +

+ +

+
+INTERFACE: +

       subroutine ESMF_InitializePreMPI(rc)
+
ARGUMENTS: +
 -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       integer,                 intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+This method is only needed for cases where MPI is initialized + explicitly by user code. In most typical cases ESMF_Initialize() + is called before MPI is initialized, and takes care of all the internal + initialization, including MPI. + +

+There are circumstances where it is necessary or convenient to + initialize MPI before calling into ESMF_Initialize(). This option + is supported by ESMF, and for most cases no special action is required + on the user side. However, for cases where ESMF_*CompSetVM*() + methods are used to move processing elements (PEs), i.e. CPU cores, + between persistent execution threads (PETs), ESMF uses POSIX signals + between PETs. In order to do so safely, the proper signal handlers must + be installed before MPI is initialized. This is accomplished by calling + ESMF_InitializePreMPI() from the user code prior to the MPI + initialization. + +

+Note also that in order to use any of the advanced resource management + functions that ESMF provides via the ESMF_*CompSetVM*() methods, + the MPI environment must be thread-safe. ESMF_Initialize() handles + this automatically if it is in charge of initializing MPI. However, if the + user code initializes MPI before calling into ESMF_Initialize(), + it must do so via MPI_Init_thread(), specifying + MPI_THREAD_SERIALIZED or above for the required level of thread + support. + +

+The arguments are: +

+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +

+

+
+ +

+ +

+ +

+16.4.3 ESMF_IsInitialized - Query Initialized status of ESMF +

+ +

+ +

+
+INTERFACE: +

     function ESMF_IsInitialized(rc)
+
RETURN VALUE: +
       logical :: ESMF_IsInitialized
+
ARGUMENTS: +
 -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       integer,                 intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Returns .true. if the framework has been initialized. This means + that ESMF_Initialize() has been called. Otherwise returns + .false.. If an error occurs, i.e. rc /= ESMF_SUCCESS is + returned, the return value of the function will also be .false.. + +

+The arguments are: +

+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +

+

+
+ +

+ +

+ +

+16.4.4 ESMF_IsFinalized - Query Finalized status of ESMF +

+ +

+ +

+
+INTERFACE: +

     function ESMF_IsFinalized(rc)
+
RETURN VALUE: +
       logical :: ESMF_IsFinalized
+
ARGUMENTS: +
 -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       integer,                 intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Returns .true. if the framework has been finalized. This means + that ESMF_Finalize() has been called. Otherwise returns + .false.. If an error occurs, i.e. rc /= ESMF_SUCCESS is + returned, the return value of the function will also be .false.. + +

+The arguments are: +

+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +

+

+
+ +

+ +

+ +

+16.4.5 ESMF_Finalize - Clean up and shut down ESMF +

+ +

+ +

+
+INTERFACE: +

       subroutine ESMF_Finalize(endflag, rc)
+
ARGUMENTS: +
 -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       type(ESMF_End_Flag), intent(in), optional  :: endflag
+       integer,             intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+This must be called once on each PET before the application exits + to allow ESMF to flush buffers, close open connections, and + release internal resources cleanly. The optional argument + endflag may be used to indicate the mode of termination. + Note that this call must be issued only once per PET with + endflag=ESMF_END_NORMAL, and that this call may not be followed + by ESMF_Initialize(). This last restriction means that it is not + possible to restart ESMF within the same execution. + +

+The arguments are: +

+
[endflag]
+
Specify mode of termination. The default is ESMF_END_NORMAL + which waits for all PETs of the global VM to reach + ESMF_Finalize() before termination. See section + 16.2.1 for a complete list and description of + valid flags. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ + +

+ +

+16.4.6 User-code SetServices method +

+ +

+Many programs call some library routines. The library +documentation must explain what the routine name is, what arguments +are required and what are optional, and what the code does. + +

+In contrast, all ESMF components must be written to be called +by another part of the program; in effect, an ESMF component takes the +place of a library. The interface is prescribed by the framework, +and the component writer must provide specific subroutines which +have standard argument lists and perform specific operations. +For technical reasons none of the arguments in user-provided subroutines +must be declared as optional. + +

+The only required public interface of a Component is its +SetServices method. This subroutine must have an +externally accessible name (be a public symbol), take a component +as the first argument, and an integer return code as the second. +Both arguments are required and must not be declared as +optional. If an intent is specified in the interface it must be +intent(inout) for the first and intent(out) for the +second argument. The subroutine name is not predefined, it is set by the +component writer, but must be provided as part of the component +documentation. + +

+The required function that the SetServices subroutine must provide is to +specify the user-code entry points for the standard ESMF Component methods. To +this end the user-written SetServices routine calls the + +

+ESMF_<Grid/Cpl>CompSetEntryPoint() method to set each +Component entry point. + +

+See sections 17.2.1 and 18.2.1 for examples of +how to write a user-code SetServices routine. + +

+Note that a component does not call its own SetServices routine; +the AppDriver or parent component code, which is creating a component, +will first call ESMF_<Grid/Cpl>CompCreate() to create a component object, and then must call into ESMF_<Grid/Cpl>CompSetServices(), supplying the user-code SetServices routine as an argument. The framework then calls into the user-code SetServices, after the Component's VM has been started up. + +

+It is good practice to package the user-code implementing a component into a Fortran module, with the user-code SetService routine being the only public module method. ESMF supports three mechanisms for accessing the user-code SetServices routine from the calling AppDriver or parent component. + +

+ +

    +
  • Fortran USE association: The AppDriver or parent component utilizes the standard Fortran USE statement on the component module to make all public entities available. The user-code SetServices routine can then be passed directly into the ESMF_<Grid/Cpl>CompSetServices() interface documented in 17.4.19 and 18.4.19, respectively. + +

    +Pros: Standard Fortran module use: name mangling and interface checking is handled by the Fortran compiler. + +

    +Cons: Fortran 90/95 has no mechanism to implement a "smart" dependency scheme through USE association. Any change in a lower level component module (even just adding or changing a comment!) will trigger a complete recompilation of all of the higher level components throughout the component hierarchy. This situation is particularly annoying for ESMF componentized code, where the prescribed ESMF component interfaces, in principle, remove all interdependencies between components that would require recompilation. + +

    +Fortran submodules, introduced as an extension to Fortran 2003, and now part for the Fortran 2008 standard, are designed to avoid this "false" dependency issue. A code change to an ESMF component that keeps the actual implementation within a submodule, will not trigger a recompilation of the components further up in the component hierarchy. Unfortunately, as of mid-2015, only two compiler vendors support submodules. + +

    +

  • +
  • External routine: The AppDriver or parent component provides an explicit interface block for an external routine that implements (or calls) the user-code SetServices routine. This routine can then be passed directly into the ESMF_<Grid/Cpl>CompSetServices() interface documented in 17.4.19 and 18.4.19, respectively. (In practice this can be implemented by the component as an external subroutine that simply calls into the user-code SetServices module routine.) + +

    +Pros: Avoids Fortran USE dependencies: a change to lower level component code will not trigger a complete recompilation of all of the higher level components throughout the component hierarchy. Name mangling is handled by the Fortran compiler. + +

    +Cons: The user-code SetServices interface is not checked by the compiler. The user must ensure uniqueness of the external routine name across the entire application. + +

    + +

  • +
  • Name lookup: The AppDriver or parent component specifies the user-code SetServices routine by name. The actual lookup and code association does not occur until runtime. The name string is passed into the ESMF_<Grid/Cpl>CompSetServices() interface documented in 17.4.20 and 18.4.20, respectively. + +

    +Pros: Avoids Fortran USE dependencies: a change to lower level component code will not trigger a complete recompilation of all of the higher level components throughout the component hierarchy. The component code does not have to be accessible until runtime and may be located in a shared object, thus avoiding relinking of the application. + +

    +Cons: The user-code SetServices interface is not checked by the compiler. The user must explicitly deal with all of the Fortran name mangling issues: 1) Accessing a module routine requires precise knowledge of the name mangling rules of the specific compiler. Alternatively, the user-code SetServices routine may be implemented as an external routine, avoiding the module name mangling. 2) Even then, Fortran compilers typically append one or two underscores on a symbol name. This must be considered when passing the name into the ESMF_<Grid/Cpl>CompSetServices() method. + +

    +

  • +
+ +

+ +

+16.4.7 User-code Initialize, Run, and Finalize methods +

+ +

+The required standard ESMF Component methods, for which user-code entry +points must be set, are Initialize, Run, and Finalize. Currently optional, +a Component may also set entry points for the WriteRestart and +ReadRestart methods. + +

+Sections 17.2.1 and 18.2.1 provide examples +of how the entry points for Initialize, Run, and Finalize are set during +the user-code SetServices routine, using the +ESMF_<Grid/Cpl>CompSetEntryPoint() library call. + +

+All standard user-code methods must abide exactly to the prescribed +interfaces. None of the arguments must be declared as optional. + +

+The names of the Initialize, Run, and Finalize user-code subroutines do +not need to be public; in fact it is far better for them to be private to +lower the chances of public symbol clashes between different components. + +

+See sections 17.2.2, 17.2.3, +17.2.4, and 18.2.2, 18.2.3, +18.2.4 for examples of how to write entry points for the +standard ESMF Component methods. + +

+ +

+ +
+16.4.8 User-code SetVM method +

+ +

+When the AppDriver or parent component code calls +ESMF_<Grid/Cpl>CompCreate() it has the option to specify a +petList argument. All of the parent PETs contained in this list become +resources of the child component. By default, without the petList argument, all of the parent PETs are provided to the child component. + +

+Typically each component has its own virtual machine (VM) object. However, using the optional contextflag argument during ESMF_<Grid/Cpl>CompCreate() a child component can inherit its parent component's VM. Unless a child component inherits the parent VM, it has the option to set certain aspects of how its VM utilizes the provided resources. The resources provided via the parent PETs are the associated processing elements (PEs) and virtual address spaces (VASs). + +

+The optional user-written SetVM routine is called from the parent for the child through the ESMF_<Grid/Cpl>CompSetVM() method. This is the only place where the child component can set aspects of its own VM before it is started up. The child component's VM must be running before the SetServices routine can be called, and thus the parent must call the optional ESMF_<Grid/Cpl>CompSetVM() method before ESMF_<Grid/Cpl>CompSetServices(). + +

+Inside the user-code called by the SetVM routine, the component has the option to specify how the PETs share the provided parent PEs. Further, PETs on the same single system image (SSI) can be set to run multi-threaded within a reduced number of virtual address spaces (VAS), allowing a component to leverage shared memory concepts. + +

+Sections 17.2.5 and 18.2.5 provide examples for +simple user-written SetVM routines. + +

+One common use of the SetVM approach is to implement hybrid parallelism based on MPI+OpenMP. Under ESMF, each component can use its own hybrid parallelism implementation. Different components, even if running on the same PE resources, do not have to agree on the number of MPI processes (i.e. PETs), or the number of OpenMP threads launched under each PET. Hybrid and non-hybrid components can be mixed within the same application. Coupling between components of any flavor is supported under ESMF. + +

+In order to obtain best performance when using SetVM based resource control for hybrid parallelism, it is strongly recommended to set OMP_WAIT_POLICY=PASSIVE in the environment. This is one of the standard OpenMP environment variables. The PASSIVE setting ensures that OpenMP threads relinquish the PEs as soon as they have completed their work. Without that setting ESMF resource control threads can be delayed, and context switching between components becomes more expensive. + +

+ +

+ +
+16.4.9 Use of internal procedures as user-provided procedures +

+ +

+Internal procedures are nested within a surrounding procedure, and only local to the surrounding procedure. +They are specified by using the CONTAINS statement. + +

+Prior to Fortran-2008 an internal procedure could not be used as a user-provided callback procedure. +In Fortran-2008 this restriction was lifted. It is important to note that if ESMF is passed an internal +procedure, that the surrounding procedure be active whenever ESMF calls it. This helps ensure that +local variables at the surrounding procedures scope are properly initialized. + +

+When internal procedures contained within a main program unit are used for callbacks, there is no problem. +This is because the main program unit is always active. However when internal procedures are used within +other program units, initialization could become a problem. The following outlines the issue: + +

+

+  module my_procs_mod
+    use ESMF
+    implicit none
+
+  contains
+
+    subroutine my_procs (...)
+      integer :: my_setting
+      :
+      call ESMF_GridCompSetEntryPoint(gridcomp, methodflag=ESMF_METHOD_INITIALIZE, &
+          userRoutine=my_grid_proc_init, rc=localrc)
+      :
+      my_setting = 42
+
+    contains
+
+      subroutine my_grid_proc_init (gridcomp, importState, exportState, clock, rc)
+        :
+      ! my_setting is possibly uninitialized when my_grid_proc_init is used as a call-back
+        something = my_setting
+        :
+      end subroutine my_grid_proc_init
+    end subroutine my_procs
+  end module my_procs_mod
+
+ +

+The Fortran standard does not specify whether variable my_setting is statically or +automatically allocated, unless it is explicitly given the SAVE attribute. Thus there is no +guarantee that its value will persist after my_procs has finished. The SAVE attribute +is usually given to a variable via specifying a SAVE attribute in its delaration. However it can +also be inferred by initializing the variable in its declaration: + +

+

+      :
+      integer, save : my_setting
+      :
+
+ +

+or, + +

+

+      :
+      integer :: my_setting = 42
+      :
+
+ +

+Because of the potential initialization issues, it is recommended that internal procedures +only be used as ESMF callbacks when the surrounding procedure is also active. + +

+17 GridComp Class +

+ +

+17.1 Description +

+ +

+ +

+In Earth system modeling, the most natural way to think about an ESMF +Gridded Component, or ESMF_GridComp, is as a piece of code +representing a particular physical domain, such as an atmospheric +model or an ocean model. Gridded Components may also represent individual +processes, such as radiation or chemistry. It's up to the application +writer to decide how deeply to “componentize.” + +

+Earth system software components tend to share a number of basic +features. Most ingest and produce a variety of physical fields, refer to +a (possibly noncontiguous) spatial region and a grid that is +partitioned across a set of computational resources, and require +a clock for things like stepping a governing set of PDEs forward in time. +Most can also be divided into distinct initialize, run, and finalize +computational phases. These common characteristics are used +within ESMF to define a Gridded Component data structure that +is tailored for Earth system modeling and yet is still flexible +enough to represent a variety of domains. + +

+A well designed Gridded Component does not store information +internally about how it couples to other Gridded Components. That +allows it to be used in different contexts without changes to source +code. The idea here is to avoid situations in which slightly +different versions of the same model source are maintained for use in +different contexts - standalone vs. coupled versions, for example. +Data is passed in and out of Gridded Components using an ESMF State, +this is described in Section 21.1. + +

+An ESMF Gridded Component has two parts, one which is user-written +and another which is part of the framework. The user-written +part is software that represents a physical domain or performs some +other computational function. It forms the body of the Gridded +Component. It may be a piece of legacy code, or it may be developed +expressly for use with ESMF. It must contain routines with +standard ESMF interfaces that can be called to initialize, run, and +finalize the Gridded Component. These routines can have separate +callable phases, such as distinct first and second initialization steps. + +

+ESMF provides the Gridded Component derived type, +ESMF_GridComp. An ESMF_GridComp must be created +for every portion of the application that will be represented +as a separate component. For example, in a climate model, there may +be Gridded Components representing the land, ocean, sea ice, and +atmosphere. If the application contains an ensemble of identical +Gridded Components, every one has its own associated ESMF_GridComp. +Each Gridded Component has its own name and is allocated +a set of computational resources, in the form of an ESMF Virtual +Machine, or VM. + +

+The user-written part of a Gridded Component is associated with an +ESMF_GridComp derived type through a routine called +ESMF_SetServices(). +This is a routine that the user must write, and declare public. +Inside the SetServices routine the user must call +ESMF_SetEntryPoint() methods that associate a standard ESMF +operation with the name of the corresponding Fortran subroutine +in their user code. + +

+17.2 Use and Examples +

+ +

+A Gridded Component is a computational entity which consumes and produces data. It uses a State object to exchange data between itself and other Components. It uses a Clock object to manage time, and a VM to describe its own and its child components' computational resources. + +

+This section shows how to create Gridded Components. For demonstrations +of the use of Gridded Components, see the system tests that are bundled with the ESMF software +distribution. These can be found in the directory esmf/src/system_tests. + +

+ +

+ +

+ +

+ +

+17.2.1 Implement a user-code SetServices routine +

+ +

+ +

+Every ESMF_GridComp is required to provide and document + a public set services routine. It can have any name, but must + follow the declaration below: a subroutine which takes an + ESMF_GridComp as the first argument, and + an integer return code as the second. + Both arguments are required and must not be declared as + optional. If an intent is specified in the interface it must be + intent(inout) for the first and intent(out) for the + second argument. + +

+The set services routine must call the ESMF method + ESMF_GridCompSetEntryPoint() to + register with the framework what user-code subroutines should be called + to initialize, run, and finalize the component. There are + additional routines which can be registered as well, for checkpoint + and restart functions. + +

+Note that the actual subroutines being registered do not have to be + public to this module; only the set services routine itself must + be available to be used by other code. +

+

+    ! Example Gridded Component
+    module ESMF_GriddedCompEx
+    
+    ! ESMF Framework module
+    use ESMF
+    implicit none
+    public GComp_SetServices
+    public GComp_SetVM
+
+    contains
+
+    subroutine GComp_SetServices(comp, rc)
+      type(ESMF_GridComp)   :: comp   ! must not be optional
+      integer, intent(out)  :: rc     ! must not be optional
+
+      ! Set the entry points for standard ESMF Component methods
+      call ESMF_GridCompSetEntryPoint(comp, ESMF_METHOD_INITIALIZE, &
+                                userRoutine=GComp_Init, rc=rc)
+      call ESMF_GridCompSetEntryPoint(comp, ESMF_METHOD_RUN, &
+                                userRoutine=GComp_Run, rc=rc)
+      call ESMF_GridCompSetEntryPoint(comp, ESMF_METHOD_FINALIZE, &
+                                userRoutine=GComp_Final, rc=rc)
+
+      rc = ESMF_SUCCESS
+
+    end subroutine
+
+ +

+ +

+ +

+17.2.2 Implement a user-code Initialize routine +

+ +

+ +

+When a higher level component is ready to begin using an + ESMF_GridComp, it will call its initialize routine. + +

+The component writer must supply a subroutine with the exact interface + shown below. Arguments must not be declared as optional, and the types and + order must match. + +

+At initialization time the component can allocate data space, open + data files, set up initial conditions; anything it needs to do to + prepare to run. + +

+The rc return code should be set if an error occurs, otherwise + the value ESMF_SUCCESS should be returned. +

+

+    subroutine GComp_Init(comp, importState, exportState, clock, rc)
+      type(ESMF_GridComp)   :: comp                   ! must not be optional
+      type(ESMF_State)      :: importState            ! must not be optional
+      type(ESMF_State)      :: exportState            ! must not be optional
+      type(ESMF_Clock)      :: clock                  ! must not be optional
+      integer, intent(out)  :: rc                     ! must not be optional
+
+      print *, "Gridded Comp Init starting"
+
+      ! This is where the model specific setup code goes.  
+ 
+      ! If the initial Export state needs to be filled, do it here.
+      !call ESMF_StateAdd(exportState, field, rc)
+      !call ESMF_StateAdd(exportState, bundle, rc)
+      print *, "Gridded Comp Init returning"
+   
+      rc = ESMF_SUCCESS
+
+    end subroutine GComp_Init
+
+ +

+ +

+ +

+17.2.3 Implement a user-code Run routine +

+ +

+ +

+During the execution loop, the run routine may be called many times. + Each time it should read data from the importState, use the + clock to determine what the current time is in the calling + component, compute new values or process the data, + and produce any output and place it in the exportState. + +

+When a higher level component is ready to use the ESMF_GridComp + it will call its run routine. + +

+The component writer must supply a subroutine with the exact interface + shown below. Arguments must not be declared as optional, and the types and + order must match. + +

+It is expected that this is where the bulk of the model computation + or data analysis will occur. + +

+The rc return code should be set if an error occurs, otherwise + the value ESMF_SUCCESS should be returned. +

+

+    subroutine GComp_Run(comp, importState, exportState, clock, rc)
+      type(ESMF_GridComp)   :: comp                   ! must not be optional
+      type(ESMF_State)      :: importState            ! must not be optional
+      type(ESMF_State)      :: exportState            ! must not be optional
+      type(ESMF_Clock)      :: clock                  ! must not be optional
+      integer, intent(out)  :: rc                     ! must not be optional
+
+      print *, "Gridded Comp Run starting"
+      ! call ESMF_StateGet(), etc to get fields, bundles, arrays
+      !  from import state.
+
+      ! This is where the model specific computation goes.
+
+      ! Fill export state here using ESMF_StateAdd(), etc
+
+      print *, "Gridded Comp Run returning"
+
+      rc = ESMF_SUCCESS
+
+    end subroutine GComp_Run
+
+ +

+ +

+ +

+17.2.4 Implement a user-code Finalize routine +

+ +

+ +

+At the end of application execution, each ESMF_GridComp should + deallocate data space, close open files, and flush final results. + These functions should be placed in a finalize routine. + +

+The component writer must supply a subroutine with the exact interface + shown below. Arguments must not be declared as optional, and the types and + order must match. + +

+The rc return code should be set if an error occurs, otherwise + the value ESMF_SUCCESS should be returned. + +

+

+    subroutine GComp_Final(comp, importState, exportState, clock, rc)
+      type(ESMF_GridComp)   :: comp                   ! must not be optional
+      type(ESMF_State)      :: importState            ! must not be optional
+      type(ESMF_State)      :: exportState            ! must not be optional
+      type(ESMF_Clock)      :: clock                  ! must not be optional
+      integer, intent(out)  :: rc                     ! must not be optional
+
+      print *, "Gridded Comp Final starting"
+    
+      ! Add whatever code here needed
+
+      print *, "Gridded Comp Final returning"
+   
+      rc = ESMF_SUCCESS
+
+    end subroutine GComp_Final
+
+ +

+ +

+ +

+17.2.5 Implement a user-code SetVM routine +

+ +

+ +

+Every ESMF_GridComp can optionally provide and document + a public set vm routine. It can have any name, but must + follow the declaration below: a subroutine which takes an + ESMF_GridComp as the first argument, and + an integer return code as the second. + Both arguments are required and must not be declared as + optional. If an intent is specified in the interface it must be + intent(inout) for the first and intent(out) for the + second argument. + +

+The set vm routine is the only place where the child component can + use the ESMF_GridCompSetVMMaxPEs(), or + ESMF_GridCompSetVMMaxThreads(), or + ESMF_GridCompSetVMMinThreads() call to modify aspects of its own VM. + +

+A component's VM is started up right before its set services routine is + entered. ESMF_GridCompSetVM() is executing in the parent VM, and must + be called before ESMF_GridCompSetServices(). +

+

+    subroutine GComp_SetVM(comp, rc)
+      type(ESMF_GridComp)   :: comp   ! must not be optional
+      integer, intent(out)  :: rc     ! must not be optional
+      
+      type(ESMF_VM) :: vm
+      logical :: pthreadsEnabled
+      
+      ! Test for Pthread support, all SetVM calls require it
+      call ESMF_VMGetGlobal(vm, rc=rc)
+      call ESMF_VMGet(vm, pthreadsEnabledFlag=pthreadsEnabled, rc=rc)
+
+      if (pthreadsEnabled) then
+        ! run PETs single-threaded
+        call ESMF_GridCompSetVMMinThreads(comp, rc=rc)
+      endif
+
+      rc = ESMF_SUCCESS
+
+    end subroutine
+
+    end module ESMF_GriddedCompEx
+
+ +

+ + +

+ +

+ +

+ +

+17.2.6 Set and Get the Internal State +

+ +

+ESMF provides the concept of an Internal State that is associated with + a Component. Through the Internal State API a user can attach a private + data block to a Component, and later retrieve a pointer to this memory + allocation. Setting and getting of Internal State information are + supported from anywhere in the Component's SetServices, Initialize, Run, + or Finalize code. + +

+The code below demonstrates the basic Internal State API + of ESMF_<Grid|Cpl>SetInternalState() and + ESMF_<Grid|Cpl>GetInternalState(). Notice that an extra level of + indirection to the user data is necessary! + +

+

+  ! ESMF Framework module
+  use ESMF
+  use ESMF_TestMod
+  implicit none
+  
+  type(ESMF_GridComp) :: comp
+  integer :: rc, finalrc
+
+  ! Internal State Variables
+  type testData
+  sequence
+    integer :: testValue
+    real    :: testScaling
+  end type
+
+  type dataWrapper
+  sequence
+    type(testData), pointer :: p
+  end type
+
+  type(dataWrapper) :: wrap1, wrap2
+  type(testData), target :: data
+  type(testData), pointer :: datap  ! extra level of indirection
+
+ +

+

+!-------------------------------------------------------------------------
+        
+  call ESMF_Initialize(defaultlogfilename="InternalStateEx.Log", &
+                    logkindflag=ESMF_LOGKIND_MULTI, rc=rc)
+  if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+!-------------------------------------------------------------------------
+
+  !  Creation of a Component
+  comp = ESMF_GridCompCreate(name="test", rc=rc)  
+  if (rc .ne. ESMF_SUCCESS) finalrc = ESMF_FAILURE 
+
+!-------------------------------------------------------------------------
+! This could be called, for example, during a Component's initialize phase.
+
+    ! Initialize private data block
+  data%testValue = 4567
+  data%testScaling = 0.5
+
+  ! Set Internal State
+  wrap1%p => data
+  call ESMF_GridCompSetInternalState(comp, wrap1, rc)
+  if (rc .ne. ESMF_SUCCESS) finalrc = ESMF_FAILURE 
+
+!-------------------------------------------------------------------------
+! This could be called, for example, during a Component's run phase.
+
+  ! Get Internal State
+  call ESMF_GridCompGetInternalState(comp, wrap2, rc)
+  if (rc .ne. ESMF_SUCCESS) finalrc = ESMF_FAILURE 
+
+  ! Access private data block and verify data
+  datap => wrap2%p 
+  if ((datap%testValue .ne. 4567) .or. (datap%testScaling .ne. 0.5)) then
+    print *, "did not get same values back"
+    finalrc = ESMF_FAILURE
+  else
+    print *, "got same values back from GetInternalState as original"
+  endif
+
+ +

+ + +

+ +

+ +

+When working with ESMF Internal States it is important to consider the + applying scoping rules. The user must ensure that the private data block + that is being referenced persists for the entire access period. This is + not an issue in the previous example, where the private data block was + defined on the scope of the main program. However, the Internal State + construct is often useful inside of Component modules to hold Component + specific data between calls. One option to ensure persisting private data + blocks is to use the Fortran SAVE attribute either on local or module + variables. A second option, illustrated in the following example, is to + use Fortran pointers and user controlled memory management via allocate() + and deallocate() calls. + +

+One situation where the Internal State is useful is in the + creation of ensembles of the same Component. In this case it can + be tricky to distinguish which data, held in saved module variables, + belongs to which ensemble member - especially if the ensemble members + are executing on the same set of PETs. The Internal State solves this + problem by providing a handle to instance specific data allocations. + +

+

+module user_mod
+
+  use ESMF
+
+  implicit none
+  
+  ! module variables
+  private
+
+  ! Internal State Variables
+  type testData
+  sequence
+    integer       :: testValue        ! scalar data
+    real          :: testScaling      ! scalar data
+    real, pointer :: testArray(:)     ! array data
+  end type
+
+  type dataWrapper
+  sequence
+    type(testData), pointer :: p
+  end type
+
+ +

+

+  contains !--------------------------------------------------------------
+
+ +

+

+  subroutine mygcomp_init(gcomp, istate, estate, clock, rc)
+    type(ESMF_GridComp):: gcomp
+    type(ESMF_State):: istate, estate
+    type(ESMF_Clock):: clock
+    integer, intent(out):: rc
+
+    ! Local variables
+    type(dataWrapper) :: wrap
+    type(testData), pointer :: data
+    integer :: i
+
+    rc = ESMF_SUCCESS
+    
+    ! Allocate private data block
+    allocate(data)
+
+    ! Initialize private data block
+    data%testValue = 4567         ! initialize scalar data
+    data%testScaling = 0.5        ! initialize scalar data
+    allocate(data%testArray(10))  ! allocate array data
+    
+    do i=1, 10
+      data%testArray(i) = real(i) ! initialize array data
+    enddo
+    
+    ! In a real ensemble application the initial data would be set to 
+    ! something unique for this ensemble member. This could be 
+    ! accomplished for example by reading a member specific config file 
+    ! that was specified by the driver code. Alternatively, Attributes, 
+    ! set by the driver, could be used to label the Component instances 
+    ! as specific ensemble members.
+    
+    ! Set Internal State
+    wrap%p => data
+    call ESMF_GridCompSetInternalState(gcomp, wrap, rc)
+
+  end subroutine !-------------------------------------------------------
+  
+  subroutine mygcomp_run(gcomp, istate, estate, clock, rc)
+    type(ESMF_GridComp):: gcomp
+    type(ESMF_State):: istate, estate
+    type(ESMF_Clock):: clock
+    integer, intent(out):: rc
+
+    ! Local variables
+    type(dataWrapper) :: wrap
+    type(testData), pointer :: data
+    logical :: match = .true.
+    integer :: i
+    
+    rc = ESMF_SUCCESS
+
+    ! Get Internal State
+    call ESMF_GridCompGetInternalState(gcomp, wrap, rc)
+    if (rc/=ESMF_SUCCESS) return
+
+    ! Access private data block and verify data
+    data => wrap%p 
+    if (data%testValue .ne. 4567) match = .false.   ! test scalar data
+    if (data%testScaling .ne. 0.5) match = .false.  ! test scalar data
+    do i=1, 10
+      if (data%testArray(i) .ne. real(i)) match = .false. ! test array data
+    enddo
+    
+    if (match) then
+      print *, "got same values back from GetInternalState as original"
+    else
+      print *, "did not get same values back"
+      rc = ESMF_FAILURE
+    endif
+    
+  end subroutine !-------------------------------------------------------
+
+  subroutine mygcomp_final(gcomp, istate, estate, clock, rc)
+    type(ESMF_GridComp):: gcomp
+    type(ESMF_State):: istate, estate
+    type(ESMF_Clock):: clock
+    integer, intent(out):: rc
+
+    ! Local variables
+    type(dataWrapper) :: wrap
+    type(testData), pointer :: data
+
+    rc = ESMF_SUCCESS
+    
+    ! Get Internal State
+    call ESMF_GridCompGetInternalState(gcomp, wrap, rc)
+    if (rc/=ESMF_SUCCESS) return
+    
+    ! Deallocate private data block
+    data => wrap%p 
+    deallocate(data%testArray)  ! deallocate array data
+    deallocate(data)
+    
+  end subroutine !--------------------------------------------------------------
+
+
+end module
+
+ +

+ + +

+17.3 Restrictions and Future Work +

+ +

+ +

    +
  1. No optional arguments. User-written routines called by SetServices, +and registered for Initialize, Run and Finalize, must not declare any +of the arguments as optional. + +

    +

  2. +
  3. Namespace isolation. +If possible, Gridded Components should attempt to make +all data private, so public names do not interfere with data +in other components. + +

    +

  4. +
  5. Single execution mode. +It is not expected that a single Gridded Component be able +to function in both sequential and concurrent modes, although +Gridded Components of different types can be nested. For example, +a concurrently called Gridded Component can contain several nested +sequential Gridded Components. + +

    +

  6. +
+ +

+17.4 Class API +

+ +

+ +

+ +

+ +

+17.4.1 ESMF_GridCompAssignment(=) - GridComp assignment +

+ +

+ +

+
+INTERFACE: +

     interface assignment(=)
+     gridcomp1 = gridcomp2
+
ARGUMENTS: +
     type(ESMF_GridComp) :: gridcomp1
+     type(ESMF_GridComp) :: gridcomp2
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Assign gridcomp1 as an alias to the same ESMF GridComp object in memory + as gridcomp2. If gridcomp2 is invalid, then gridcomp1 will be equally invalid after + the assignment. + +

+The arguments are: +

+
gridcomp1
+
The ESMF_GridComp object on the left hand side of the assignment. + +
+
gridcomp2
+
The ESMF_GridComp object on the right hand side of the assignment. + +
+
+ +

+ +

+ +

+17.4.2 ESMF_GridCompOperator(==) - GridComp equality operator +

+ +

+ +

+
+INTERFACE: +

   interface operator(==)
+     if (gridcomp1 == gridcomp2) then ... endif
+               OR
+     result = (gridcomp1 == gridcomp2)
+
RETURN VALUE: +
     logical :: result
+
ARGUMENTS: +
     type(ESMF_GridComp), intent(in) :: gridcomp1
+     type(ESMF_GridComp), intent(in) :: gridcomp2
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Test whether gridcomp1 and gridcomp2 are valid aliases to the same ESMF + GridComp object in memory. For a more general comparison of two ESMF GridComps, + going beyond the simple alias test, the ESMF_GridCompMatch() function (not yet + implemented) must be used. + +

+The arguments are: +

+
gridcomp1
+
The ESMF_GridComp object on the left hand side of the equality + operation. + +
+
gridcomp2
+
The ESMF_GridComp object on the right hand side of the equality + operation. + +
+
+ +

+ +

+ +

+17.4.3 ESMF_GridCompOperator(/=) - GridComp not equal operator +

+ +

+ +

+
+INTERFACE: +

   interface operator(/=)
+     if (gridcomp1 /= gridcomp2) then ... endif
+               OR
+     result = (gridcomp1 /= gridcomp2)
+
RETURN VALUE: +
     logical :: result
+
ARGUMENTS: +
     type(ESMF_GridComp), intent(in) :: gridcomp1
+     type(ESMF_GridComp), intent(in) :: gridcomp2
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Test whether gridcomp1 and gridcomp2 are not valid aliases to the + same ESMF GridComp object in memory. For a more general comparison of two ESMF + GridComps, going beyond the simple alias test, the ESMF_GridCompMatch() function + (not yet implemented) must be used. + +

+The arguments are: +

+
gridcomp1
+
The ESMF_GridComp object on the left hand side of the non-equality + operation. + +
+
gridcomp2
+
The ESMF_GridComp object on the right hand side of the non-equality + operation. + +
+
+ +

+ +

+ +

+17.4.4 ESMF_GridCompCreate - Create a GridComp +

+ +

+ +

+
+INTERFACE: +

   recursive function ESMF_GridCompCreate(grid, gridList, &
+     mesh, meshList, locstream, locstreamList, xgrid, xgridList, &
+     hconfig, config, configFile, clock, petList, devList, contextflag, name, rc)
+
RETURN VALUE: +
     type(ESMF_GridComp) :: ESMF_GridCompCreate
+
ARGUMENTS: +
 -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     type(ESMF_Grid),         intent(in),    optional :: grid
+     type(ESMF_Grid),         intent(in),    optional :: gridList(:)
+     type(ESMF_Mesh),         intent(in),    optional :: mesh
+     type(ESMF_Mesh),         intent(in),    optional :: meshList(:)
+     type(ESMF_LocStream),    intent(in),    optional :: locstream
+     type(ESMF_LocStream),    intent(in),    optional :: locstreamList(:)
+     type(ESMF_XGrid),        intent(in),    optional :: xgrid
+     type(ESMF_XGrid),        intent(in),    optional :: xgridList(:)
+     type(ESMF_HConfig),      intent(in),    optional :: hconfig
+     type(ESMF_Config),       intent(in),    optional :: config
+     character(len=*),        intent(in),    optional :: configFile
+     type(ESMF_Clock),        intent(in),    optional :: clock
+     integer,                 intent(in),    optional :: petList(:)
+     integer,                 intent(in),    optional :: devList(:)
+     type(ESMF_Context_Flag), intent(in),    optional :: contextflag
+     character(len=*),        intent(in),    optional :: name
+     integer,                 intent(out),   optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    7.1.0r
    +
    Added arguments gridList, mesh, meshList, + locstream, locstreamList, xgrid, and xgridList. + These arguments add support for holding references to multiple geom objects, + either of the same type, or different type, in the same + ESMF_GridComp object. + +
    +
    8.6.0
    +
    Added argument devList to support management of accelerator + devices. + +
    +
    8.7.0
    +
    Added argument hconfig to simplify direct usage of + ESMF_HConfig objects with Components. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+This interface creates an ESMF_GridComp object. By default, a + separate VM context will be created for each component. This implies + creating a new MPI communicator and allocating additional memory to + manage the VM resources. When running on a large number of processors, + creating a separate VM for each component could be both time and memory + inefficient. If the application is sequential, i.e., each component is + running on all the PETs of the global VM, it will be more efficient to use + the global VM instead of creating a new one. This can be done by setting + contextflag to ESMF_CONTEXT_PARENT_VM. + +

+The return value is the new ESMF_GridComp. + +

+The arguments are: +

+
[grid]
+
Associate an ESMF_Grid object with the newly created component. + This is simply a convenience feature for the user. The ESMF library code + does not access the grid object. + The grid argument is mutually exclusive with the gridList + argument. If both arguments are provided, the routine will fail, and an + error is returned in rc. + By default, i.e. if neither grid nor gridList are provided, + no ESMF_Grid objects are associated with the component. + +
+
[gridList]
+
Associate a list of ESMF_Grid objects with the newly created + component. + This is simply a convenience feature for the user. The ESMF library code + does not access the gridList object. + The gridList argument is mutually exclusive with the grid + argument. If both arguments are provided, the routine will fail, and an + error is returned in rc. + By default, i.e. if neither grid nor gridList are provided, + no ESMF_Grid objects are associated with the component. + +
+
[mesh]
+
Associate an ESMF_Mesh object with the newly created component. + This is simply a convenience feature for the user. The ESMF library code + does not access the mesh object. + The mesh argument is mutually exclusive with the meshList + argument. If both arguments are provided, the routine will fail, and an + error is returned in rc. + By default, i.e. if neither mesh nor meshList are provided, + no ESMF_Mesh objects are associated with the component. + +
+
[meshList]
+
Associate a list of ESMF_Mesh objects with the newly created + component. + This is simply a convenience feature for the user. The ESMF library code + does not access the meshList object. + The meshList argument is mutually exclusive with the mesh + argument. If both arguments are provided, the routine will fail, and an + error is returned in rc. + By default, i.e. if neither mesh nor meshList are provided, + no ESMF_Mesh objects are associated with the component. + +
+
[locstream]
+
Associate an ESMF_LocStream object with the newly created component. + This is simply a convenience feature for the user. The ESMF library code + does not access the locstream object. + The locstream argument is mutually exclusive with the + locstreamList + argument. If both arguments are provided, the routine will fail, and an + error is returned in rc. + By default, i.e. if neither locstream nor locstreamList are + provided, no ESMF_LocStream objects are associated with the + component. + +
+
[locstreamList]
+
Associate a list of ESMF_LocStream objects with the newly created + component. + This is simply a convenience feature for the user. The ESMF library code + does not access the locstreamList object. + The locstreamList argument is mutually exclusive with the + locstream + argument. If both arguments are provided, the routine will fail, and an + error is returned in rc. + By default, i.e. if neither locstream nor locstreamList are + provided, no ESMF_LocStream objects are associated with the + component. + +
+
[xgrid]
+
Associate an ESMF_XGrid object with the newly created component. + This is simply a convenience feature for the user. The ESMF library code + does not access the xgrid object. + The xgrid argument is mutually exclusive with the xgridList + argument. If both arguments are provided, the routine will fail, and an + error is returned in rc. + By default, i.e. if neither xgrid nor xgridList are provided, + no ESMF_XGrid objects are associated with the component. + +
+
[xgridList]
+
Associate a list of ESMF_XGrid objects with the newly created + component. + This is simply a convenience feature for the user. The ESMF library code + does not access the xgridList object. + The xgridList argument is mutually exclusive with the xgrid + argument. If both arguments are provided, the routine will fail, and an + error is returned in rc. + By default, i.e. if neither xgrid nor xgridList are provided, + no ESMF_XGrid objects are associated with the component. + +
+
[hconfig]
+
An already-created ESMF_HConfig object to be attached to the newly + created component. + Only one of hconfig, config, or configFile must be + specified. + +
+
[config]
+
An already-created ESMF_Config object to be attached to the newly + created component. + Only one of hconfig, config, or configFile must be + specified. + +
+
[configFile]
+
The filename of a config file. + If specified, a new ESMF_Config object is created and attached to the + newly created component. The configFile file is opened and associated + with the new config object. + Only one of hconfig, config, or configFile must be + specified. + +
+
[clock]
+
Component-specific ESMF_Clock. This clock is available to be + queried and updated by the new ESMF_GridComp as it chooses. + This should + not be the parent component clock, which should be maintained and passed + down to the initialize/run/finalize routines separately. + +
+
[petList]
+
List of parent PETs given to the created child component by the + parent component. If petList is not specified, or is empty, all of the + parent PETs are given to the child component. The order of + PETs in petList determines how the child local PETs map back to + the parent PETs. + +
+
[devList]
+
List of accelerator devices global ids DEVs to be associated with the + created child component. If devList is not specified, or is empty, + no devices are associated with the component. + +
+
[contextflag]
+
Specify the component's VM context. The default context is + ESMF_CONTEXT_OWN_VM. See section 54.10 for a + complete list of valid flags. + +
+
[name]
+
Name of the newly-created ESMF_GridComp. This name can be altered + from within the ESMF_GridComp code once the initialization routine + is called. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+17.4.5 ESMF_GridCompDestroy - Release resources associated with a GridComp +

+ +

+ +

+
+INTERFACE: +

   recursive subroutine ESMF_GridCompDestroy(gridcomp, &
+     timeout, timeoutFlag, rc)
+
ARGUMENTS: +
     type(ESMF_GridComp), intent(inout)          :: gridcomp
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,             intent(in),   optional :: timeout
+     logical,             intent(out),  optional :: timeoutFlag
+     integer,             intent(out),  optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    5.3.0
    +
    Added argument timeout. + Added argument timeoutFlag. + The new arguments provide access to the fault-tolerant component + features. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Destroys an ESMF_GridComp, releasing the resources associated + with the object. + +

+The arguments are: +

+
gridcomp
+
Release all resources associated with this ESMF_GridComp + and mark the object as invalid. It is an error to pass this + object into any other routines after being destroyed. + +
+
[timeout]
+
The maximum period in seconds that this call will wait in communications + with the actual component, before returning with a timeout condition. + The default is 3600, i.e. 1 hour. The timeout argument is only + supported for connected dual components. + +
+
[timeoutFlag]
+
Returns .true. if the timeout was reached, .false. otherwise. + If timeoutFlag was not provided, a timeout condition will lead + to a return code of rc \= ESMF_SUCCESS. Otherwise the + return value of timeoutFlag is the sole indicator of a timeout + condition. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+17.4.6 ESMF_GridCompFinalize - Call the GridComp's finalize routine +

+ +

+ +

+
+INTERFACE: +

   recursive subroutine ESMF_GridCompFinalize(gridcomp, &
+     importState, exportState, clock, syncflag, phase, timeout, timeoutFlag, &
+     userRc, rc)
+
ARGUMENTS: +
     type(ESMF_GridComp),  intent(inout)           :: gridcomp
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     type(ESMF_State),     intent(inout), optional :: importState
+     type(ESMF_State),     intent(inout), optional :: exportState
+     type(ESMF_Clock),     intent(inout), optional :: clock
+     type(ESMF_Sync_Flag), intent(in),    optional :: syncflag
+     integer,              intent(in),    optional :: phase
+     integer,              intent(in),    optional :: timeout
+     logical,              intent(out),   optional :: timeoutFlag
+     integer,              intent(out),   optional :: userRc
+     integer,              intent(out),   optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    5.3.0
    +
    Added argument timeout. + Added argument timeoutFlag. + The new arguments provide access to the fault-tolerant component + features. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Call the associated user-supplied finalization routine for + an ESMF_GridComp. + +

+The arguments are: +

+
gridcomp
+
The ESMF_GridComp to call finalize routine for. + +
+
[importState]
+
ESMF_State containing import data. If not present, a dummy + argument will be passed to the user-supplied routine. The + importState argument in the user code cannot be optional. + +
+
[exportState]
+
ESMF_State containing export data. If not present, a dummy + argument will be passed to the user-supplied routine. The + exportState argument in the user code cannot be optional. + +
+
[clock]
+
External ESMF_Clock for passing in time information. + This is generally the parent component's clock, and will be treated + as read-only by the child component. The child component can maintain + a private clock for its own internal time computations. If not present, a dummy + argument will be passed to the user-supplied routine. The + clock argument in the user code cannot be optional. + +
+
[syncflag]
+
Blocking behavior of this method call. See section 54.59 + for a list of valid blocking options. Default option is + ESMF_SYNC_VASBLOCKING which blocks PETs and their spawned off threads + across each VAS but does not synchronize PETs that run in different VASs. + +
+
[phase]
+
Component providers must document whether each of their + routines are single-phase or multi-phase. + Single-phase routines require only one invocation to complete + their work. + Multi-phase routines provide multiple subroutines to accomplish + the work, accommodating components which must complete part of their + work, return to the caller and allow other processing to occur, + and then continue the original operation. + For multiple-phase child components, this is the integer phase + number to be invoked. + For single-phase child components this argument is optional. The default + is 1. + +
+
[timeout]
+
The maximum period in seconds that this call will wait in communications + with the actual component, before returning with a timeout condition. + The default is 3600, i.e. 1 hour. The timeout argument is only + supported for connected dual components. + +
+
[timeoutFlag]
+
Returns .true. if the timeout was reached, .false. otherwise. + If timeoutFlag was not provided, a timeout condition will lead + to a return code of rc \= ESMF_SUCCESS. Otherwise the + return value of timeoutFlag is the sole indicator of a timeout + condition. + +
+
[userRc]
+
Return code set by userRoutine before returning. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+17.4.7 ESMF_GridCompGet - Get GridComp information +

+ +

+ +

+
+INTERFACE: +

   recursive subroutine ESMF_GridCompGet(gridcomp, &
+     gridIsPresent, grid, gridList, meshIsPresent, mesh, meshList, &
+     locstreamIsPresent, locstream, locstreamList, xgridIsPresent, &
+     xgrid, xgridList, importStateIsPresent, importState, &
+     exportStateIsPresent, exportState, hconfigIsPresent, hconfig, &
+     configIsPresent, config, configFileIsPresent, configFile, &
+     clockIsPresent, clock, localPet, petCount, contextflag, &
+     currentMethod, currentPhase, comptype, vmIsPresent, vm, name, rc)
+
ARGUMENTS: +
     type(ESMF_GridComp),           intent(in)            :: gridcomp
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     logical,                       intent(out), optional :: gridIsPresent
+     type(ESMF_Grid),               intent(out), optional :: grid
+     type(ESMF_Grid), allocatable,  intent(out), optional :: gridList(:)
+     logical,                       intent(out), optional :: meshIsPresent
+     type(ESMF_Mesh),               intent(out), optional :: mesh
+     type(ESMF_Mesh), allocatable,  intent(out), optional :: meshList(:)
+     logical,                       intent(out), optional :: locstreamIsPresent
+     type(ESMF_LocStream),          intent(out), optional :: locstream
+     type(ESMF_LocStream), allocatable, intent(out), optional :: locstreamList(:)
+     logical,                       intent(out), optional :: xgridIsPresent
+     type(ESMF_XGrid),              intent(out), optional :: xgrid
+     type(ESMF_XGrid), allocatable, intent(out), optional :: xgridList(:)
+     logical,                       intent(out), optional :: importStateIsPresent
+     type(ESMF_State),              intent(out), optional :: importState
+     logical,                       intent(out), optional :: exportStateIsPresent
+     type(ESMF_State),              intent(out), optional :: exportState
+     logical,                       intent(out), optional :: hconfigIsPresent
+     type(ESMF_HConfig),            intent(out), optional :: hconfig
+     logical,                       intent(out), optional :: configIsPresent
+     type(ESMF_Config),             intent(out), optional :: config
+     logical,                       intent(out), optional :: configFileIsPresent
+     character(len=*),              intent(out), optional :: configFile
+     logical,                       intent(out), optional :: clockIsPresent
+     type(ESMF_Clock),              intent(out), optional :: clock
+     integer,                       intent(out), optional :: localPet
+     integer,                       intent(out), optional :: petCount
+     type(ESMF_Context_Flag),       intent(out), optional :: contextflag
+     type(ESMF_Method_Flag),        intent(out), optional :: currentMethod
+     integer,                       intent(out), optional :: currentPhase
+     type(ESMF_CompType_Flag),      intent(out), optional :: comptype
+     logical,                       intent(out), optional :: vmIsPresent
+     type(ESMF_VM),                 intent(out), optional :: vm
+     character(len=*),              intent(out), optional :: name
+     integer,                       intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    7.1.0r
    +
    Added arguments gridList, meshIsPresent, mesh, + meshList, locstreamIsPresent, locstream, + locstreamList, xgridIsPresent, xgrid, and xgridList. + These arguments add support for accessing references to multiple geom objects, + either of the same type, or different type, associated with the same + ESMF_GridComp object. + +
    +
    8.7.0
    +
    Added arguments hconfigIsPresent and hconfig to + simplify direct usage of ESMF_HConfig objects with Components. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Get information about an ESMF_GridComp object. + +

+The arguments are: +

+
gridcomp
+
The ESMF_GridComp object being queried. + +
+
[gridIsPresent]
+
Set to .true. if at least one ESMF_Grid object is + associated with the gridcomp component. + Set to .false. otherwise. + +
+
[grid]
+
Return the ESMF_Grid object associated with the gridcomp + component. If multiple ESMF_Grid objects are associated, return the + first in the list. + It is an error to query for grid if no ESMF_Grid object is + associated with the gridcomp component. + If unsure, query for gridIsPresent first, or use the gridList + variant. + +
+
[gridList]
+
Return a list of all ESMF_Grid objects associated with the + gridcomp component. The size of the returned gridList + corresponds to the number of ESMF_Grid objects associated. + If no ESMF_Grid object is associated with the gridcomp + component, the size of the returned gridList is zero. + +
+
[meshIsPresent]
+
Set to .true. if at least one ESMF_Mesh object is + associated with the gridcomp component. + Set to .false. otherwise. + +
+
[mesh]
+
Return the ESMF_Mesh object associated with the gridcomp + component. If multiple ESMF_Mesh objects are associated, return the + first in the list. + It is an error to query for mesh if no ESMF_Mesh object is + associated with the gridcomp component. + If unsure, query for meshIsPresent first, or use the meshList + variant. + +
+
[meshList]
+
Return a list of all ESMF_Mesh objects associated with the + gridcomp component. The size of the returned meshList + corresponds to the number of ESMF_Mesh objects associated. + If no ESMF_Mesh object is associated with the gridcomp + component, the size of the returned meshList is zero. + +
+
[locstreamIsPresent]
+
Set to .true. if at least one ESMF_LocStream object is + associated with the gridcomp component. + Set to .false. otherwise. + +
+
[locstream]
+
Return the ESMF_LocStream object associated with the gridcomp + component. If multiple ESMF_LocStream objects are associated, return + the first in the list. + It is an error to query for locstream if no ESMF_Grid object is + associated with the gridcomp component. + If unsure, query for locstreamIsPresent first, or use the + locstreamList variant. + +
+
[locstreamList]
+
Return a list of all ESMF_LocStream objects associated with the + gridcomp component. The size of the returned locstreamList + corresponds to the number of ESMF_LocStream objects associated. + If no ESMF_LocStream object is associated with the gridcomp + component, the size of the returned locstreamList is zero. + +
+
[xgridIsPresent]
+
Set to .true. if at least one ESMF_XGrid object is + associated with the gridcomp component. + Set to .false. otherwise. + +
+
[xgrid]
+
Return the ESMF_XGrid object associated with the gridcomp + component. If multiple ESMF_XGrid objects are associated, return the + first in the list. + It is an error to query for xgrid if no ESMF_XGrid object is + associated with the gridcomp component. + If unsure, query for xgridIsPresent first, or use the xgridList + variant. + +
+
[xgridList]
+
Return a list of all ESMF_XGrid objects associated with the + gridcomp component. The size of the returned xgridList + corresponds to the number of ESMF_XGrid objects associated. + If no ESMF_XGrid object is associated with the gridcomp + component, the size of the returned xgridList is zero. + +
+
[importStateIsPresent]
+
.true. if importState was set in GridComp object, + .false. otherwise. + +
+
[importState]
+
Return the associated import State. + It is an error to query for the import State if none is associated with + the GridComp. If unsure, get importStateIsPresent first to determine + the status. + +
+
[exportStateIsPresent]
+
.true. if exportState was set in GridComp object, + .false. otherwise. + +
+
[exportState]
+
Return the associated export State. + It is an error to query for the export State if none is associated with + the GridComp. If unsure, get exportStateIsPresent first to determine + the status. + +
+
[hconfigIsPresent]
+
.true. if hconfig is available in the GridComp object, + .false. otherwise. + +
+
[hconfig]
+
Return the associated HConfig object. + It is an error to query for the HConfig object if none is associated with + the GridComp. If unsure, get hconfigIsPresent first to determine + the status. + +
+
[configIsPresent]
+
.true. if config is available in the GridComp object, + .false. otherwise. + +
+
[config]
+
Return the associated Config object. + It is an error to query for the Config if none is associated with + the GridComp. If unsure, get configIsPresent first to determine + the status. + +
+
[configFileIsPresent]
+
.true. if configFile is available in the GridComp object, + .false. otherwise. + +
+
[configFile]
+
Return the associated configuration filename. + It is an error to query for the configuration filename if none is associated with + the GridComp. If unsure, get configFileIsPresent first to determine + the status. + +
+
[clockIsPresent]
+
.true. if clock was set in GridComp object, + .false. otherwise. + +
+
[clock]
+
Return the associated Clock. + It is an error to query for the Clock if none is associated with + the GridComp. If unsure, get clockIsPresent first to determine + the status. + +
+
[localPet]
+
Return the local PET id within the ESMF_GridComp object. + +
+
[petCount]
+
Return the number of PETs in the the ESMF_GridComp object. + +
+
[contextflag]
+
Return the ESMF_Context_Flag for this ESMF_GridComp. + See section 54.10 for a complete list of valid flags. + +
+
[currentMethod]
+
Return the current ESMF_Method_Flag of the ESMF_GridComp + execution. See section 54.44 for a complete list of valid + options. + +
+
[currentPhase]
+
Return the current phase of the ESMF_GridComp execution. + +
+
[comptype]
+
Return the Component type. + See section 54.9 for a complete list of valid flags. + +
+
[vmIsPresent]
+
.true. if vm was set in GridComp object, + .false. otherwise. + +
+
[vm]
+
Return the associated VM. + It is an error to query for the VM if none is associated with + the GridComp. If unsure, get vmIsPresent first to determine + the status. + +
+
[name]
+
Return the name of the ESMF_GridComp. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+17.4.8 ESMF_GridCompGetInternalState - Get private data block pointer +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_GridCompGetInternalState(gridcomp, wrappedDataPointer, rc)
+
ARGUMENTS: +
     type(ESMF_GridComp)             :: gridcomp
+     type(wrapper)                   :: wrappedDataPointer
+     integer,            intent(out) :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Available to be called by an ESMF_GridComp at any time after + ESMF_GridCompSetInternalState has been called. + Since init, run, and finalize must be separate subroutines, data that + they need to share in common can either be module global data, or can + be allocated in a private data block and the address of that block + can be registered with the framework and retrieved by this call. + When running multiple instantiations of an ESMF_GridComp, + for example during ensemble runs, + it may be simpler to maintain private data specific to + each run with private data blocks. A corresponding + ESMF_GridCompSetInternalState call sets the data pointer to + this block, and this call retrieves the data pointer. + Note that the wrappedDataPointer argument needs to be a derived type + which contains only a pointer of the type of the data block defined + by the user. When making this call the pointer needs to be unassociated. + When the call returns, the pointer will now reference the original + data block which was set during the previous call to + ESMF_GridCompSetInternalState. + +

+Only the last data block set via + ESMF_GridCompSetInternalState will be accessible. + +

+CAUTION: If you are working with a compiler that does not support Fortran 2018 + assumed-type dummy arguments, then this method does not have an explicit + Fortran interface. In this case do not specify argument keywords when calling + this method! + +

+The arguments are: +

+
gridcomp
+
An ESMF_GridComp object. + +
+
wrappedDataPointer
+
A derived type (wrapper), containing only an unassociated pointer + to the private data block. + The framework will fill in the pointer. When this call returns, the + pointer is set to the same address set during the last + ESMF_GridCompSetInternalState call. + This level of indirection is needed to reliably set and retrieve + the data block no matter which architecture or compiler is used. + +
+
rc
+
Return code; equals ESMF_SUCCESS if there are no errors. + Note: unlike most other ESMF routines, this argument is not optional + because of implementation considerations. + +
+
+ +

+ +

+ +

+17.4.9 ESMF_GridCompInitialize - Call the GridComp's initialize routine +

+ +

+ +

+
+INTERFACE: +

   recursive subroutine ESMF_GridCompInitialize(gridcomp, &
+     importState, exportState, clock, syncflag, phase, timeout, timeoutFlag, &
+     userRc, rc)
+
ARGUMENTS: +
     type(ESMF_GridComp),  intent(inout)           :: gridcomp
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     type(ESMF_State),     intent(inout), optional :: importState
+     type(ESMF_State),     intent(inout), optional :: exportState
+     type(ESMF_Clock),     intent(inout), optional :: clock
+     type(ESMF_Sync_Flag), intent(in),    optional :: syncflag
+     integer,              intent(in),    optional :: phase
+     integer,              intent(in),    optional :: timeout
+     logical,              intent(out),   optional :: timeoutFlag
+     integer,              intent(out),   optional :: userRc
+     integer,              intent(out),   optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    5.3.0
    +
    Added argument timeout. + Added argument timeoutFlag. + The new arguments provide access to the fault-tolerant component + features. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Call the associated user initialization routine for + an ESMF_GridComp. + +

+The arguments are: +

+
gridcomp
+
ESMF_GridComp to call initialize routine for. + +
+
[importState]
+
ESMF_State containing import data for coupling. If not present, a dummy + argument will be passed to the user-supplied routine. The + importState argument in the user code cannot be optional. + +
+
[exportState]
+
ESMF_State containing export data for coupling. If not present, a dummy + argument will be passed to the user-supplied routine. The + exportState argument in the user code cannot be optional. + +
+
[clock]
+
External ESMF_Clock for passing in time information. + This is generally the parent component's clock, and will be treated + as read-only by the child component. The child component can maintain + a private clock for its own internal time computations. If not present, a dummy + argument will be passed to the user-supplied routine. The + clock argument in the user code cannot be optional. + +
+
[syncflag]
+
Blocking behavior of this method call. See section 54.59 + for a list of valid blocking options. Default option is + ESMF_SYNC_VASBLOCKING which blocks PETs and their spawned off threads + across each VAS but does not synchronize PETs that run in different VASs. + +
+
[phase]
+
Component providers must document whether each of their + routines are single-phase or multi-phase. + Single-phase routines require only one invocation to complete + their work. + Multi-phase routines provide multiple subroutines to accomplish + the work, accommodating components which must complete part of their + work, return to the caller and allow other processing to occur, + and then continue the original operation. + For multiple-phase child components, this is the integer phase + number to be invoked. + For single-phase child components this argument is optional. The default is + 1. + +
+
[timeout]
+
The maximum period in seconds that this call will wait in communications + with the actual component, before returning with a timeout condition. + The default is 3600, i.e. 1 hour. The timeout argument is only + supported for connected dual components. + +
+
[timeoutFlag]
+
Returns .true. if the timeout was reached, .false. otherwise. + If timeoutFlag was not provided, a timeout condition will lead + to a return code of rc \= ESMF_SUCCESS. Otherwise the + return value of timeoutFlag is the sole indicator of a timeout + condition. + +
+
[userRc]
+
Return code set by userRoutine before returning. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+17.4.10 ESMF_GridCompIsCreated - Check whether a GridComp object has been created +

+ +

+ +

+
+INTERFACE: +

   function ESMF_GridCompIsCreated(gridcomp, rc)
+
RETURN VALUE: +
     logical :: ESMF_GridCompIsCreated
+
ARGUMENTS: +
     type(ESMF_GridComp), intent(in)            :: gridcomp
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,             intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Return .true. if the gridcomp has been created. Otherwise return + .false.. If an error occurs, i.e. rc /= ESMF_SUCCESS is + returned, the return value of the function will also be .false.. + +

+The arguments are: +

+
gridcomp
+
ESMF_GridComp queried. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+17.4.11 ESMF_GridCompIsPetLocal - Inquire if this GridComp is to execute on the calling PET +

+ +

+ +

+
+INTERFACE: +

   recursive function ESMF_GridCompIsPetLocal(gridcomp, rc)
+
RETURN VALUE: +
     logical :: ESMF_GridCompIsPetLocal
+
ARGUMENTS: +
     type(ESMF_GridComp), intent(in)            :: gridcomp
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,             intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Inquire if this ESMF_GridComp object is to execute on the calling PET. + +

+The return value is .true. if the component is to execute on the + calling PET, .false. otherwise. + +

+The arguments are: +

+
gridcomp
+
ESMF_GridComp queried. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+17.4.12 ESMF_GridCompPrint - Print GridComp information +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_GridCompPrint(gridcomp, rc)
+
ARGUMENTS: +
     type(ESMF_GridComp), intent(in)            :: gridcomp
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,             intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Prints information about an ESMF_GridComp to stdout. +
+

+The arguments are: +

+
gridcomp
+
ESMF_GridComp to print. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+17.4.13 ESMF_GridCompReadRestart - Call the GridComp's read restart routine +

+ +

+ +

+
+INTERFACE: +

   recursive subroutine ESMF_GridCompReadRestart(gridcomp, &
+     importState, exportState, clock, syncflag, phase, timeout, timeoutFlag, &
+     userRc, rc)
+
ARGUMENTS: +
     type(ESMF_GridComp),  intent(inout)           :: gridcomp
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     type(ESMF_State),     intent(inout), optional :: importState
+     type(ESMF_State),     intent(inout), optional :: exportState
+     type(ESMF_Clock),     intent(inout), optional :: clock
+     type(ESMF_Sync_Flag), intent(in),    optional :: syncflag
+     integer,              intent(in),    optional :: phase
+     integer,              intent(in),    optional :: timeout
+     logical,              intent(out),   optional :: timeoutFlag
+     integer,              intent(out),   optional :: userRc
+     integer,              intent(out),   optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    5.3.0
    +
    Added argument timeout. + Added argument timeoutFlag. + The new arguments provide access to the fault-tolerant component + features. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Call the associated user read restart routine for + an ESMF_GridComp. + +

+The arguments are: +

+
gridcomp
+
ESMF_GridComp to call run routine for. + +
+
[importState]
+
ESMF_State containing import data. If not present, a dummy + argument will be passed to the user-supplied routine. The + importState argument in the user code cannot be optional. + +
+
[exportState]
+
ESMF_State containing export data. If not present, a dummy + argument will be passed to the user-supplied routine. The + exportState argument in the user code cannot be optional. + +
+
[clock]
+
External ESMF_Clock for passing in time information. + This is generally the parent component's clock, and will be treated + as read-only by the child component. The child component can maintain + a private clock for its own internal time computations. If not present, a dummy + argument will be passed to the user-supplied routine. The + clock argument in the user code cannot be optional. + +
+
[syncflag]
+
Blocking behavior of this method call. See section 54.59 + for a list of valid blocking options. Default option is + ESMF_SYNC_VASBLOCKING which blocks PETs and their spawned off threads + across each VAS but does not synchronize PETs that run in different VASs. + +
+
[phase]
+
Component providers must document whether each of their + routines are single-phase or multi-phase. + Single-phase routines require only one invocation to complete + their work. + Multi-phase routines provide multiple subroutines to accomplish + the work, accommodating components which must complete part of their + work, return to the caller and allow other processing to occur, + and then continue the original operation. + For multiple-phase child components, this is the integer phase + number to be invoked. + For single-phase child components this argument is optional. The default is + 1. + +
+
[timeout]
+
The maximum period in seconds that this call will wait in communications + with the actual component, before returning with a timeout condition. + The default is 3600, i.e. 1 hour. The timeout argument is only + supported for connected dual components. + +
+
[timeoutFlag]
+
Returns .true. if the timeout was reached, .false. otherwise. + If timeoutFlag was not provided, a timeout condition will lead + to a return code of rc \= ESMF_SUCCESS. Otherwise the + return value of timeoutFlag is the sole indicator of a timeout + condition. + +
+
[userRc]
+
Return code set by userRoutine before returning. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+17.4.14 ESMF_GridCompRun - Call the GridComp's run routine +

+ +

+ +

+
+INTERFACE: +

   recursive subroutine ESMF_GridCompRun(gridcomp, &
+     importState, exportState, clock, syncflag, phase, timeout, timeoutFlag, &
+     userRc, rc)
+
ARGUMENTS: +
     type(ESMF_GridComp),  intent(inout)           :: gridcomp
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     type(ESMF_State),     intent(inout), optional :: importState
+     type(ESMF_State),     intent(inout), optional :: exportState
+     type(ESMF_Clock),     intent(inout), optional :: clock
+     type(ESMF_Sync_Flag), intent(in),    optional :: syncflag
+     integer,              intent(in),    optional :: phase
+     integer,              intent(in),    optional :: timeout
+     logical,              intent(out),   optional :: timeoutFlag
+     integer,              intent(out),   optional :: userRc
+     integer,              intent(out),   optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    5.3.0
    +
    Added argument timeout. + Added argument timeoutFlag. + The new arguments provide access to the fault-tolerant component + features. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Call the associated user run routine for + an ESMF_GridComp. + +

+The arguments are: +

+
gridcomp
+
ESMF_GridComp to call run routine for. + +
+
[importState]
+
ESMF_State containing import data. If not present, a dummy + argument will be passed to the user-supplied routine. The + importState argument in the user code cannot be optional. + +
+
[exportState]
+
ESMF_State containing export data. If not present, a dummy + argument will be passed to the user-supplied routine. The + exportState argument in the user code cannot be optional. + +
+
[clock]
+
External ESMF_Clock for passing in time information. + This is generally the parent component's clock, and will be treated + as read-only by the child component. The child component can maintain + a private clock for its own internal time computations. If not present, a dummy + argument will be passed to the user-supplied routine. The + clock argument in the user code cannot be optional. + +
+
[syncflag]
+
Blocking behavior of this method call. See section 54.59 + for a list of valid blocking options. Default option is + ESMF_SYNC_VASBLOCKING which blocks PETs and their spawned off threads + across each VAS but does not synchronize PETs that run in different VASs. + +
+
[phase]
+
Component providers must document whether each of their + routines are single-phase or multi-phase. + Single-phase routines require only one invocation to complete + their work. + Multi-phase routines provide multiple subroutines to accomplish + the work, accommodating components which must complete part of their + work, return to the caller and allow other processing to occur, + and then continue the original operation. + For multiple-phase child components, this is the integer phase + number to be invoked. + For single-phase child components this argument is optional. The default is + 1. + +
+
[timeout]
+
The maximum period in seconds that this call will wait in communications + with the actual component, before returning with a timeout condition. + The default is 3600, i.e. 1 hour. The timeout argument is only + supported for connected dual components. + +
+
[timeoutFlag]
+
Returns .true. if the timeout was reached, .false. otherwise. + If timeoutFlag was not provided, a timeout condition will lead + to a return code of rc \= ESMF_SUCCESS. Otherwise the + return value of timeoutFlag is the sole indicator of a timeout + condition. + +
+
[userRc]
+
Return code set by userRoutine before returning. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+17.4.15 ESMF_GridCompServiceLoop - Call the GridComp's service loop routine +

+ +

+ +

+
+INTERFACE: +

   recursive subroutine ESMF_GridCompServiceLoop(gridcomp, &
+     importState, exportState, clock, syncflag, port, timeout, timeoutFlag, rc)
+
ARGUMENTS: +
     type(ESMF_GridComp),  intent(inout)           :: gridcomp
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     type(ESMF_State),     intent(inout), optional :: importState
+     type(ESMF_State),     intent(inout), optional :: exportState
+     type(ESMF_Clock),     intent(inout), optional :: clock
+     type(ESMF_Sync_Flag), intent(in),    optional :: syncflag
+     integer,              intent(in),    optional :: port
+     integer,              intent(in),    optional :: timeout
+     logical,              intent(out),   optional :: timeoutFlag
+     integer,              intent(out),   optional :: rc
+
+DESCRIPTION: +
+ +

+Call the ServiceLoop routine for an ESMF_GridComp. + This tries to establish a "component tunnel" between the actual + Component (calling this routine) and a dual Component connecting to it + through a matching SetServices call. + +

+The arguments are: +

+
gridcomp
+
ESMF_GridComp to call service loop routine for. + +
+
[importState]
+
ESMF_State containing import data for coupling. If not present, a dummy + argument will be passed to the user-supplied routine. The + importState argument in the user code cannot be optional. + +
+
[exportState]
+
ESMF_State containing export data for coupling. If not present, a dummy + argument will be passed to the user-supplied routine. The + exportState argument in the user code cannot be optional. + +
+
[clock]
+
External ESMF_Clock for passing in time information. + This is generally the parent component's clock, and will be treated + as read-only by the child component. The child component can maintain + a private clock for its own internal time computations. If not present, a dummy + argument will be passed to the user-supplied routine. The + clock argument in the user code cannot be optional. + +
+
[syncflag]
+
Blocking behavior of this method call. See section 54.59 + for a list of valid blocking options. Default option is + ESMF_SYNC_VASBLOCKING which blocks PETs and their spawned off threads + across each VAS but does not synchronize PETs that run in different VASs. + +
+
[port]
+
In case a port number is provided, the "component tunnel" is established + using sockets. The actual component side, i.e. the side that calls into + ESMF_GridCompServiceLoop(), starts to listen on the specified port + as the server. The valid port range is [1024, 65535]. + In case the port argument is not specified, the "component + tunnel" is established within the same executable using local communication + methods (e.g. MPI). + +
+
[timeout]
+
The maximum period in seconds that this call will wait for communications + with the dual component, before returning with a timeout condition. + The default is 3600, i.e. 1 hour. + (NOTE: Currently this option is only available for socket based component + tunnels.) + +
+
[timeoutFlag]
+
Returns .true. if the timeout was reached, .false. otherwise. + If timeoutFlag was not provided, a timeout condition will lead + to a return code of rc \= ESMF_SUCCESS. Otherwise the + return value of timeoutFlag is the sole indicator of a timeout + condition. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+17.4.16 ESMF_GridCompSet - Set or reset information about the GridComp +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_GridCompSet(gridcomp, grid, gridList, &
+     mesh, meshList, locstream, locstreamList, xgrid, xgridList, &
+     hconfig, config, configFile, clock, name, rc)
+
ARGUMENTS: +
     type(ESMF_GridComp),    intent(inout)         :: gridcomp
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     type(ESMF_Grid),        intent(in),  optional :: grid
+     type(ESMF_Grid),        intent(in),  optional :: gridList(:)
+     type(ESMF_Mesh),        intent(in),  optional :: mesh
+     type(ESMF_Mesh),        intent(in),  optional :: meshList(:)
+     type(ESMF_LocStream),   intent(in),  optional :: locstream
+     type(ESMF_LocStream),   intent(in),  optional :: locstreamList(:)
+     type(ESMF_XGrid),       intent(in),  optional :: xgrid
+     type(ESMF_XGrid),       intent(in),  optional :: xgridList(:)
+     type(ESMF_HConfig),     intent(in),  optional :: hconfig
+     type(ESMF_Config),      intent(in),  optional :: config
+     character(len=*),       intent(in),  optional :: configFile
+     type(ESMF_Clock),       intent(in),  optional :: clock
+     character(len=*),       intent(in),  optional :: name
+     integer,                intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    7.1.0r
    +
    Added arguments gridList, mesh, meshList, + locstream, locstreamList, xgrid, and xgridList. + These arguments add support for holding references to multiple geom objects, + either of the same type, or different type, in the same + ESMF_GridComp object. + +
    +
    8.7.0
    +
    Added argument hconfig to simplify direct usage of + ESMF_HConfig objects with Components. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Sets or resets information about an ESMF_GridComp. + +

+The arguments are: +

+
gridcomp
+
ESMF_GridComp to change. + +
+
[grid]
+
Associate an ESMF_Grid object with the gridcomp component. + This is simply a convenience feature for the user. The ESMF library code + does not access the grid object. + The grid argument is mutually exclusive with the gridList + argument. If both arguments are provided, the routine will fail, and an + error is returned in rc. + By default, i.e. if neither grid nor gridList are provided, + the ESMF_Grid association of the incoming gridcomp + component remains unchanged. + +
+
[gridList]
+
Associate a list of ESMF_Grid objects with the gridcomp + component. + This is simply a convenience feature for the user. The ESMF library code + does not access the gridList object. + The gridList argument is mutually exclusive with the grid + argument. If both arguments are provided, the routine will fail, and an + error is returned in rc. + By default, i.e. if neither grid nor gridList are provided, + the ESMF_Grid association of the incoming gridcomp + component remains unchanged. + +
+
[mesh]
+
Associate an ESMF_Mesh object with the gridcomp component. + This is simply a convenience feature for the user. The ESMF library code + does not access the mesh object. + The mesh argument is mutually exclusive with the meshList + argument. If both arguments are provided, the routine will fail, and an + error is returned in rc. + By default, i.e. if neither mesh nor meshList are provided, + the ESMF_Mesh association of the incoming gridcomp + component remains unchanged. + +
+
[meshList]
+
Associate a list of ESMF_Mesh objects with the gridcomp + component. + This is simply a convenience feature for the user. The ESMF library code + does not access the meshList object. + The meshList argument is mutually exclusive with the mesh + argument. If both arguments are provided, the routine will fail, and an + error is returned in rc. + By default, i.e. if neither mesh nor meshList are provided, + the ESMF_Mesh association of the incoming gridcomp + component remains unchanged. + +
+
[locstream]
+
Associate an ESMF_LocStream object with the gridcomp component. + This is simply a convenience feature for the user. The ESMF library code + does not access the locstream object. + The locstream argument is mutually exclusive with the + locstreamList + argument. If both arguments are provided, the routine will fail, and an + error is returned in rc. + By default, i.e. if neither locstream nor locstreamList are + provided, the ESMF_LocStream association of the incoming + gridcomp component remains unchanged. + +
+
[locstreamList]
+
Associate a list of ESMF_LocStream objects with the gridcomp + component. + This is simply a convenience feature for the user. The ESMF library code + does not access the locstreamList object. + The locstreamList argument is mutually exclusive with the + locstream + argument. If both arguments are provided, the routine will fail, and an + error is returned in rc. + By default, i.e. if neither locstream nor locstreamList are + provided, the ESMF_LocStream association of the incoming + gridcomp component remains unchanged. + +
+
[xgrid]
+
Associate an ESMF_XGrid object with the gridcomp component. + This is simply a convenience feature for the user. The ESMF library code + does not access the xgrid object. + The xgrid argument is mutually exclusive with the xgridList + argument. If both arguments are provided, the routine will fail, and an + error is returned in rc. + By default, i.e. if neither xgrid nor xgridList are provided, + the ESMF_XGrid association of the incoming gridcomp + component remains unchanged. + +
+
[xgridList]
+
Associate a list of ESMF_XGrid objects with the gridcomp + component. + This is simply a convenience feature for the user. The ESMF library code + does not access the xgridList object. + The xgridList argument is mutually exclusive with the xgrid + argument. If both arguments are provided, the routine will fail, and an + error is returned in rc. + By default, i.e. if neither xgrid nor xgridList are provided, + the ESMF_XGrid association of the incoming gridcomp + component remains unchanged. + +
+
[hconfig]
+
An already-created ESMF_HConfig object to be attached to the + component. + Only one of hconfig, config, or configFile must be + specified. + +
+
[config]
+
An already-created ESMF_Config object to be attached to the + component. + Only one of hconfig, config, or configFile must be + specified. + +
+
[configFile]
+
The filename of a config file. + If specified, a new ESMF_Config object is created and attached to the + component. The configFile file is opened and associated + with the new config object. + Only one of hconfig, config, or configFile must be + specified. + +
+
[clock]
+
Set the private clock for this ESMF_GridComp. + +
+
[name]
+
Set the name of the ESMF_GridComp. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+17.4.17 ESMF_GridCompSetEntryPoint - Set user routine as entry point for standard GridComp method +

+ +

+ +

+
+INTERFACE: +

   recursive subroutine ESMF_GridCompSetEntryPoint(gridcomp, methodflag, &
+     userRoutine, phase, rc)
+
ARGUMENTS: +
     type(ESMF_GridComp),    intent(inout)         :: gridcomp
+     type(ESMF_Method_Flag), intent(in)            :: methodflag
+     interface
+       subroutine userRoutine(gridcomp, importState, exportState, clock, rc)
+         use ESMF_CompMod
+         use ESMF_StateMod
+         use ESMF_ClockMod
+         implicit none
+         type(ESMF_GridComp)         :: gridcomp     ! must not be optional
+         type(ESMF_State)            :: importState  ! must not be optional
+         type(ESMF_State)            :: exportState  ! must not be optional
+         type(ESMF_Clock)            :: clock        ! must not be optional
+         integer, intent(out)        :: rc           ! must not be optional
+       end subroutine
+     end interface
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,                intent(in),  optional :: phase
+     integer,                intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Registers a user-supplied userRoutine as the entry point for one of the + predefined Component methodflags. After this call the userRoutine + becomes accessible via the standard Component method API. + +

+The arguments are: +

+
gridcomp
+
An ESMF_GridComp object. + +
+
methodflag
+
One of a set of predefined Component methods - e.g. + ESMF_METHOD_INITIALIZE, ESMF_METHOD_RUN, + ESMF_METHOD_FINALIZE. See section 54.44 + for a complete list of valid method options. + +
+
userRoutine
+
The user-supplied subroutine to be associated for this Component + method. Argument types, intent and order must match + the interface signature, and must not have the optional attribute. + Prior to Fortran-2008, the subroutine must be either a module scope procedure, + or an external procedure that has a matching interface block specified for it. + An internal procedure which is contained within another procedure must not be used. + From Fortran-2008 onwards, an internal procedure contained within either a main program + or a module procedure may be used. If the internal procedure is contained within a + module procedure, it is subject to initialization requirements. See: 16.4.9 + +
+
[phase]
+
The phase number for multi-phase methods. For single phase + methods the phase argument can be omitted. The default setting + is 1. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+17.4.18 ESMF_GridCompSetInternalState - Set private data block pointer +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_GridCompSetInternalState(gridcomp, wrappedDataPointer, rc)
+
ARGUMENTS: +
     type(ESMF_GridComp)             :: gridcomp
+     type(wrapper)                   :: wrappedDataPointer
+     integer,            intent(out) :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Available to be called by an ESMF_GridComp at any time, but + expected to be + most useful when called during the registration process, or initialization. + Since init, run, and finalize must be separate subroutines, data that + they need to share in common can either be module global data, or can + be allocated in a private data block and the address of that block + can be registered with the framework and retrieved by subsequent calls. + When running multiple instantiations of an ESMF_GridComp, + for example during + ensemble runs, it may be simpler to maintain private data specific to + each run with private data blocks. A corresponding + ESMF_GridCompGetInternalState call retrieves the data pointer. + +

+Only the last data block set via + ESMF_GridCompSetInternalState will be accessible. + +

+CAUTION: If you are working with a compiler that does not support Fortran 2018 + assumed-type dummy arguments, then this method does not have an explicit + Fortran interface. In this case do not specify argument keywords when calling + this method! + +

+The arguments are: +

+
gridcomp
+
An ESMF_GridComp object. + +
+
wrappedDataPointer
+
A pointer to the private data block, wrapped in a derived type which + contains only a pointer to the block. This level of indirection is + needed to reliably set and retrieve the data block no matter which + architecture or compiler is used. + +
+
rc
+
Return code; equals ESMF_SUCCESS if there are no errors. + Note: unlike most other ESMF routines, this argument is not optional + because of implementation considerations. + +
+
+ +

+ +

+ +

+17.4.19 ESMF_GridCompSetServices - Call user routine to register GridComp methods +

+ +

+ +

+
+INTERFACE: +

   recursive subroutine ESMF_GridCompSetServices(gridcomp, &
+     userRoutine, userRc, rc)
+
ARGUMENTS: +
     type(ESMF_GridComp), intent(inout)         :: gridcomp
+     interface
+       subroutine userRoutine(gridcomp, rc)
+         use ESMF_CompMod
+         implicit none
+         type(ESMF_GridComp)        :: gridcomp ! must not be optional
+         integer, intent(out)       :: rc       ! must not be optional
+       end subroutine
+     end interface
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,             intent(out), optional :: userRc
+     integer,             intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+ Call into user provided userRoutine which is responsible for + setting Component's Initialize(), Run(), and Finalize() services. + +

+The arguments are: +

+
gridcomp
+
Gridded Component. + +
+
userRoutine
+
The Component writer must supply a subroutine with the exact interface + shown above for the userRoutine argument. Arguments in userRoutine + must not be declared as optional, and the types, intent and order must match. + Prior to Fortran-2008, the subroutine must be either a module scope procedure, + or an external procedure that has a matching interface block specified for it. + An internal procedure which is contained within another procedure must not be used. + From Fortran-2008 onwards, an internal procedure contained within either a main program + or a module procedure may be used. If the internal procedure is contained within a + module procedure, it is subject to initialization requirements. See: 16.4.9 + +

+The userRoutine, when called by the framework, must make successive calls + to ESMF_GridCompSetEntryPoint() to preset callback routines for + standard Component Initialize(), Run(), and Finalize() methods. + +

+
[userRc]
+
Return code set by userRoutine before returning. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+17.4.20 ESMF_GridCompSetServices - Call user routine through name lookup, to register GridComp methods +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_GridCompSetServices()
+   recursive subroutine ESMF_GridCompSetServicesShObj(gridcomp, userRoutine, &
+     sharedObj, userRoutineFound, userRc, rc)
+
ARGUMENTS: +
     type(ESMF_GridComp), intent(inout)         :: gridcomp
+     character(len=*),    intent(in)            :: userRoutine
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     character(len=*),    intent(in),  optional :: sharedObj
+     logical,             intent(out), optional :: userRoutineFound
+     integer,             intent(out), optional :: userRc
+     integer,             intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    6.3.0r
    +
    Added argument userRoutineFound. + The new argument provides a way to test availability without + causing error conditions. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+ Call into a user provided routine which is responsible for setting + Component's Initialize(), Run(), and Finalize() services. The named + userRoutine must exist in the executable, or in the shared object + specified by sharedObj. In the latter case all of the platform + specific details about dynamic linking and loading apply. + +

+The arguments are: +

+
gridcomp
+
Gridded Component. + +
+
userRoutine
+
Name of routine to be called, specified as a character string. + The Component writer must supply a subroutine with the exact interface + shown for userRoutine below. Arguments must not be declared + as optional, and the types, intent and order must match. + Prior to Fortran-2008, the subroutine must be either a module scope procedure, + or an external procedure that has a matching interface block specified for it. + An internal procedure which is contained within another procedure must not be used. + From Fortran-2008 onwards, an internal procedure contained within either a main program + or a module procedure may be used. If the internal procedure is contained within a + module procedure, it is subject to initialization requirements. See: 16.4.9 + +

+ +

+
+INTERFACE: +

       interface
+         subroutine userRoutine(gridcomp, rc)
+           type(ESMF_GridComp)  :: gridcomp   ! must not be optional
+           integer, intent(out) :: rc         ! must not be optional
+         end subroutine
+       end interface
+
+DESCRIPTION: +
+ +

+The userRoutine, when called by the framework, must make successive calls + to ESMF_GridCompSetEntryPoint() to preset callback routines for + standard Component Initialize(), Run(), and Finalize() methods. + +

+
[sharedObj]
+
Name of shared object that contains userRoutine. The asterisk + character (*) is supported as a wildcard for the file name suffix. + When present, the asterisk is replaced by "so", "dylib", and "dll", in this + order, and the first successfully loaded object is used to search for + userRoutine. + If the sharedObj argument is not provided, the executable itself is + searched for userRoutine. + +
+
[userRoutineFound]
+
Report back whether the specified userRoutine was found and executed, + or was not available. If this argument is present, not finding the + userRoutine will not result in returning an error in rc. + The default is to return an error if the userRoutine cannot be found. + +
+
[userRc]
+
Return code set by userRoutine before returning. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+17.4.21 ESMF_GridCompSetServices - Set to serve as Dual Component for an Actual Component +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_GridCompSetServices()
+   recursive subroutine ESMF_GridCompSetServicesComp(gridcomp, &
+     actualGridcomp, rc)
+
ARGUMENTS: +
     type(ESMF_GridComp), intent(inout)         :: gridcomp
+     type(ESMF_GridComp), intent(in)            :: actualGridcomp
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,             intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Set the services of a Gridded Component to serve a "dual" Component for an + "actual" Component. The component tunnel is VM based. + +

+The arguments are: +

+
gridcomp
+
Dual Gridded Component. + +
+
actualGridcomp
+
Actual Gridded Component. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+17.4.22 ESMF_GridCompSetServices - Set to serve as Dual Component for an Actual Component through sockets +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_GridCompSetServices()
+   recursive subroutine ESMF_GridCompSetServicesSock(gridcomp, port, &
+     server, timeout, timeoutFlag, rc)
+
ARGUMENTS: +
     type(ESMF_GridComp), intent(inout)         :: gridcomp
+     integer,             intent(in)            :: port
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     character(len=*),    intent(in),  optional :: server
+     integer,             intent(in),  optional :: timeout
+     logical,             intent(out), optional :: timeoutFlag
+     integer,             intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Set the services of a Gridded Component to serve a "dual" Component for an + "actual" Component. The component tunnel is socket based. + +

+The arguments are: +

+
gridcomp
+
Dual Gridded Component. + +
+
port
+
Port number under which the actual component is being served. The valid + port range is [1024, 65535]. + +
+
[server]
+
Server name where the actual component is being served. The default, i.e. + if the server argument was not provided, is localhost. + +
+
[timeout]
+
The maximum period in seconds that this call will wait in communications + with the actual component, before returning with a timeout condition. + The default is 3600, i.e. 1 hour. + +
+
[timeoutFlag]
+
Returns .true. if the timeout was reached, .false. otherwise. + If timeoutFlag was not provided, a timeout condition will lead + to a return code of rc \= ESMF_SUCCESS. Otherwise the + return value of timeoutFlag is the sole indicator of a timeout + condition. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+17.4.23 ESMF_GridCompSetVM - Call user routine to set GridComp VM properties +

+ +

+ +

+
+INTERFACE: +

   recursive subroutine ESMF_GridCompSetVM(gridcomp, userRoutine, &
+     userRc, rc)
+
ARGUMENTS: +
     type(ESMF_GridComp), intent(inout)         :: gridcomp
+     interface
+       subroutine userRoutine(gridcomp, rc)
+         use ESMF_CompMod
+         implicit none
+         type(ESMF_GridComp)        :: gridcomp ! must not be optional
+         integer, intent(out)       :: rc       ! must not be optional
+       end subroutine
+     end interface
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,             intent(out), optional :: userRc
+     integer,             intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Optionally call into user provided userRoutine which is responsible + for setting Component's VM properties. + +

+The arguments are: +

+
gridcomp
+
Gridded Component. + +
+
userRoutine
+
The Component writer must supply a subroutine with the exact interface + shown above for the userRoutine argument. Arguments in userRoutine + must not be declared as optional, and the types, intent and order must match. + Prior to Fortran-2008, the subroutine must be either a module scope procedure, + or an external procedure that has a matching interface block specified for it. + An internal procedure which is contained within another procedure must not be used. + From Fortran-2008 onwards, an internal procedure contained within either a main program + or a module procedure may be used. If the internal procedure is contained within a + module procedure, it is subject to initialization requirements. See: 16.4.9 + +

+The subroutine, when called by the framework, is expected to use any of the + ESMF_GridCompSetVMxxx() methods to set the properties of the VM + associated with the Gridded Component. + +

+
[userRc]
+
Return code set by userRoutine before returning. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+17.4.24 ESMF_GridCompSetVM - Call user routine through name lookup, to set GridComp VM properties +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_GridCompSetVM()
+   recursive subroutine ESMF_GridCompSetVMShObj(gridcomp, userRoutine, &
+     sharedObj, userRoutineFound, userRc, rc)
+
ARGUMENTS: +
     type(ESMF_GridComp), intent(inout)         :: gridcomp
+     character(len=*),    intent(in)            :: userRoutine
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     character(len=*),    intent(in),  optional :: sharedObj
+     logical,             intent(out), optional :: userRoutineFound
+     integer,             intent(out), optional :: userRc
+     integer,             intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    8.4.0
    +
    Added argument userRoutineFound. + The new argument provides a way to test availability without + causing error conditions. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Optionally call into user provided userRoutine which is responsible + for setting Component's VM properties. The named + userRoutine must exist in the executable, or in the shared object + specified by sharedObj. In the latter case all of the platform + specific details about dynamic linking and loading apply. + +

+The arguments are: +

+
gridcomp
+
Gridded Component. + +
+
userRoutine
+
Routine to be called, specified as a character string. + The Component writer must supply a subroutine with the exact interface + shown for userRoutine below. Arguments must not be declared + as optional, and the types, intent and order must match. + Prior to Fortran-2008, the subroutine must be either a module scope procedure, + or an external procedure that has a matching interface block specified for it. + An internal procedure which is contained within another procedure must not be used. + From Fortran-2008 onwards, an internal procedure contained within either a main program + or a module procedure may be used. If the internal procedure is contained within a + module procedure, it is subject to initialization requirements. See: 16.4.9 + +

+ +

+
+INTERFACE: +

       interface
+         subroutine userRoutine(gridcomp, rc)
+           type(ESMF_GridComp)  :: gridcomp    ! must not be optional
+           integer, intent(out) :: rc          ! must not be optional
+         end subroutine
+       end interface
+
+DESCRIPTION: +
+ +

+The subroutine, when called by the framework, is expected to use any of the + ESMF_GridCompSetVMxxx() methods to set the properties of the VM + associated with the Gridded Component. + +

+
[sharedObj]
+
Name of shared object that contains userRoutine. The asterisk + character (*) is supported as a wildcard for the file name suffix. + When present, the asterisk is replaced by "so", "dylib", and "dll", in this + order, and the first successfully loaded object is used to search for + userRoutine. + If the sharedObj argument is not provided, the executable itself is + searched for userRoutine. + +
+
[userRoutineFound]
+
Report back whether the specified userRoutine was found and executed, + or was not available. If this argument is present, not finding the + userRoutine will not result in returning an error in rc. + The default is to return an error if the userRoutine cannot be found. + +
+
[userRc]
+
Return code set by userRoutine before returning. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+17.4.25 ESMF_GridCompSetVMMaxPEs - Associate PEs with PETs in GridComp VM +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_GridCompSetVMMaxPEs(gridcomp, &
+     maxPeCountPerPet, prefIntraProcess, prefIntraSsi, prefInterSsi, &
+     pthreadMinStackSize, openMpHandling, openMpNumThreads, &
+     forceChildPthreads, rc)
+
ARGUMENTS: +
     type(ESMF_GridComp), intent(inout)         :: gridcomp
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,             intent(in),  optional :: maxPeCountPerPet
+     integer,             intent(in),  optional :: prefIntraProcess
+     integer,             intent(in),  optional :: prefIntraSsi
+     integer,             intent(in),  optional :: prefInterSsi
+     integer,             intent(in),  optional :: pthreadMinStackSize
+     character(*),        intent(in),  optional :: openMpHandling
+     integer,             intent(in),  optional :: openMpNumThreads
+     logical,             intent(in),  optional :: forceChildPthreads
+     integer,             intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Set characteristics of the ESMF_VM for this ESMF_GridComp. + Attempts to associate up to maxPeCountPerPet PEs with each PET. Only + PEs that are located on the same single system image (SSI) can be associated + with the same PET. Within this constraint the call tries to get as close as + possible to the number specified by maxPeCountPerPet. + +

+The other constraint to this call is that the number of PEs is preserved. + This means that the child Component in the end is associated with as many + PEs as the parent Component provided to the child. The number of child PETs + however is adjusted according to the above rule. + +

+The typical use of ESMF_GridCompSetVMMaxPEs() is to allocate + multiple PEs per PET in a Component for user-level threading, e.g. OpenMP. + +

+The arguments are: +

+
gridcomp
+
ESMF_GridComp to set the ESMF_VM for. + +
+
[maxPeCountPerPet]
+
Maximum number of PEs on each PET. + Default for each SSI is the local number of PEs. + +
+
[prefIntraProcess]
+
Communication preference within a single process. + Currently options not documented. Use default. + +
+
[prefIntraSsi]
+
Communication preference within a single system image (SSI). + Currently options not documented. Use default. + +
+
[prefInterSsi]
+
Communication preference between different single system images (SSIs). + Currently options not documented. Use default. + +
+
[pthreadMinStackSize]
+
Minimum stack size in byte of any child PET executing as Pthread. By default + single threaded child PETs do not execute as Pthread, and their stack + size is unaffected by this argument. However, for multi-threaded child PETs, + or if forceChildPthreads is .true., child PETs execute + as Pthreads with their own private stack. + +

+For cases where OpenMP threads + are used by the user code, each thread allocates its own private stack. For + all threads other than the master, the stack size is set via the + typical OMP_STACKSIZE environment variable mechanism. The PET itself, + however, becomes the master of the OpenMP thread team, and is not + affected by OMP_STACKSIZE. It is the master's stack that can be + sized via the pthreadMinStackSize argument, and a large enough size + is often critical. + +

+When pthreadMinStackSize + is absent, the default is to use the system default + set by the limit or ulimit command. However, the stack of a + Pthread cannot be unlimited, and a shell stacksize setting of + unlimited, or any setting below the ESMF implemented minimum, + will result in setting the stack size to 20MiB (the ESMF minimum). + Depending on how much private data is used by the user code under + the master thread, the default might be too small, and + pthreadMinStackSize must be used to allocate sufficient stack space. + +

+
[openMpHandling]
+
Handling of OpenMP threads. Supported options are: + +
    +
  • "none" - OpenMP handling is completely left to the user. +
  • +
  • "set" - ESMF uses the omp_set_num_threads() API to set + the number of OpenMP threads in each team. +
  • +
  • "init" - ESMF sets the number of OpenMP threads in each team, + and triggers the instantiation of the team. +
  • +
  • "pin" (default) - ESMF sets the number of OpenMP threads in each team, + triggers the instantiation of the team, and pins each + OpenMP thread to the corresponding PE. + +
  • +
+ +
+
[openMpNumThreads]
+
Number of OpenMP threads in each OpenMP thread team. This can be any + positive number. By default, or if openMpNumThreads is negative, each + PET sets the number of OpenMP threads to its local peCount. + +
+
[forceChildPthreads]
+
For .true., force each child PET to execute in its own Pthread. + By default, .false., single PETs spawned from a parent PET + execute in the same thread (or MPI process) as the parent PET. Multiple + child PETs spawned by the same parent PET always execute as their own + Pthreads. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+17.4.26 ESMF_GridCompSetVMMaxThreads - Set multi-threaded PETs in GridComp VM +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_GridCompSetVMMaxThreads(gridcomp, &
+     maxPetCountPerVas, prefIntraProcess, prefIntraSsi, prefInterSsi, &
+     pthreadMinStackSize, forceChildPthreads, rc)
+
ARGUMENTS: +
     type(ESMF_GridComp), intent(inout)         :: gridcomp
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,             intent(in),  optional :: maxPetCountPerVas
+     integer,             intent(in),  optional :: prefIntraProcess
+     integer,             intent(in),  optional :: prefIntraSsi
+     integer,             intent(in),  optional :: prefInterSsi
+     integer,             intent(in),  optional :: pthreadMinStackSize
+     logical,             intent(in),  optional :: forceChildPthreads
+     integer,             intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Set characteristics of the ESMF_VM for this ESMF_GridComp. + Attempts to provide maxPetCountPerVas threaded PETs in each + virtual address space (VAS). Only as many threaded PETs as there are PEs + located on the single system image (SSI) can be associated with the VAS. + Within this constraint the call tries to get as close as possible to the + number specified by maxPetCountPerVas. + +

+The other constraint to this call is that the number of PETs is preserved. + This means that the child Component in the end is associated with as many + PETs as the parent Component provided to the child. The threading level of + the child PETs however is adjusted according to the above rule. + +

+The typical use of ESMF_GridCompSetVMMaxThreads() is to run a + Component multi-threaded with groups of PETs executing within a common + virtual address space. + +

+The arguments are: +

+
gridcomp
+
ESMF_GridComp to set the ESMF_VM for. + +
+
[maxPetCountPerVas]
+
Maximum number of threaded PETs in each virtual address space (VAS). + Default for each SSI is the local number of PEs. + +
+
[prefIntraProcess]
+
Communication preference within a single process. + Currently options not documented. Use default. + +
+
[prefIntraSsi]
+
Communication preference within a single system image (SSI). + Currently options not documented. Use default. + +
+
[prefInterSsi]
+
Communication preference between different single system images (SSIs). + Currently options not documented. Use default. + +
+
[pthreadMinStackSize]
+
Minimum stack size in byte of any child PET executing as Pthread. By default + single threaded child PETs do not execute as Pthread, and their stack + size is unaffected by this argument. However, for multi-threaded child PETs, + or if forceChildPthreads is .true., child PETs execute + as Pthreads with their own private stack. + +

+For cases where OpenMP threads + are used by the user code, each thread allocates its own private stack. For + all threads other than the master, the stack size is set via the + typical OMP_STACKSIZE environment variable mechanism. The PET itself, + however, becomes the master of the OpenMP thread team, and is not + affected by OMP_STACKSIZE. It is the master's stack that can be + sized via the pthreadMinStackSize argument, and a large enough size + is often critical. + +

+When pthreadMinStackSize + is absent, the default is to use the system default + set by the limit or ulimit command. However, the stack of a + Pthread cannot be unlimited, and a shell stacksize setting of + unlimited, or any setting below the ESMF implemented minimum, + will result in setting the stack size to 20MiB (the ESMF minimum). + Depending on how much private data is used by the user code under + the master thread, the default might be too small, and + pthreadMinStackSize must be used to allocate sufficient stack space. + +

+
[forceChildPthreads]
+
For .true., force each child PET to execute in its own Pthread. + By default, .false., single PETs spawned from a parent PET + execute in the same thread (or MPI process) as the parent PET. Multiple + child PETs spawned by the same parent PET always execute as their own + Pthreads. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+17.4.27 ESMF_GridCompSetVMMinThreads - Set a reduced threading level in GridComp VM +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_GridCompSetVMMinThreads(gridcomp, &
+     maxPeCountPerPet, prefIntraProcess, prefIntraSsi, prefInterSsi, &
+     pthreadMinStackSize, forceChildPthreads, rc)
+
ARGUMENTS: +
     type(ESMF_GridComp), intent(inout)         :: gridcomp
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,             intent(in),  optional :: maxPeCountPerPet
+     integer,             intent(in),  optional :: prefIntraProcess
+     integer,             intent(in),  optional :: prefIntraSsi
+     integer,             intent(in),  optional :: prefInterSsi
+     integer,             intent(in),  optional :: pthreadMinStackSize
+     logical,             intent(in),  optional :: forceChildPthreads
+     integer,             intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Set characteristics of the ESMF_VM for this ESMF_GridComp. + Reduces the number of threaded PETs in each VAS. The max argument + may be specified to limit the maximum number of PEs that a single PET + can be associated with. + +

+Several constraints apply: 1) the number of PEs cannot change, 2) PEs + cannot migrate between single system images (SSIs), 3) the number of PETs + cannot increase, only decrease, 4) PETs cannot migrate between virtual + address spaces (VASs), nor can VASs migrate between SSIs. + +

+The typical use of ESMF_GridCompSetVMMinThreads() is to run a + Component across a set of single-threaded PETs. + +

+The arguments are: +

+
gridcomp
+
ESMF_GridComp to set the ESMF_VM for. + +
+
[maxPeCountPerPet]
+
Maximum number of PEs on each PET. + Default for each SSI is the local number of PEs. + +
+
[prefIntraProcess]
+
Communication preference within a single process. + Currently options not documented. Use default. + +
+
[prefIntraSsi]
+
Communication preference within a single system image (SSI). + Currently options not documented. Use default. + +
+
[prefInterSsi]
+
Communication preference between different single system images (SSIs). + Currently options not documented. Use default. + +
+
[pthreadMinStackSize]
+
Minimum stack size in byte of any child PET executing as Pthread. By default + single threaded child PETs do not execute as Pthread, and their stack + size is unaffected by this argument. However, for multi-threaded child PETs, + or if forceChildPthreads is .true., child PETs execute + as Pthreads with their own private stack. + +

+For cases where OpenMP threads + are used by the user code, each thread allocates its own private stack. For + all threads other than the master, the stack size is set via the + typical OMP_STACKSIZE environment variable mechanism. The PET itself, + however, becomes the master of the OpenMP thread team, and is not + affected by OMP_STACKSIZE. It is the master's stack that can be + sized via the pthreadMinStackSize argument, and a large enough size + is often critical. + +

+When pthreadMinStackSize + is absent, the default is to use the system default + set by the limit or ulimit command. However, the stack of a + Pthread cannot be unlimited, and a shell stacksize setting of + unlimited, or any setting below the ESMF implemented minimum, + will result in setting the stack size to 20MiB (the ESMF minimum). + Depending on how much private data is used by the user code under + the master thread, the default might be too small, and + pthreadMinStackSize must be used to allocate sufficient stack space. + +

+
[forceChildPthreads]
+
For .true., force each child PET to execute in its own Pthread. + By default, .false., single PETs spawned from a parent PET + execute in the same thread (or MPI process) as the parent PET. Multiple + child PETs spawned by the same parent PET always execute as their own + Pthreads. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+17.4.28 ESMF_GridCompValidate - Check validity of a GridComp +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_GridCompValidate(gridcomp, rc)
+
ARGUMENTS: +
     type(ESMF_GridComp), intent(in)            :: gridcomp
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,             intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Currently all this method does is to check that the gridcomp + was created. + +

+The arguments are: +

+
gridcomp
+
ESMF_GridComp to validate. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+17.4.29 ESMF_GridCompWait - Wait for a GridComp to return +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_GridCompWait(gridcomp, syncflag, &
+     timeout, timeoutFlag, userRc, rc)
+
ARGUMENTS: +
     type(ESMF_GridComp),  intent(inout)         :: gridcomp
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     type(ESMF_Sync_Flag), intent(in),  optional :: syncflag
+     integer,              intent(in),  optional :: timeout
+     logical,              intent(out), optional :: timeoutFlag
+     integer,              intent(out), optional :: userRc
+     integer,              intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    5.3.0
    +
    Added argument timeout. + Added argument timeoutFlag. + The new arguments provide access to the fault-tolerant component + features. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+When executing asynchronously, wait for an ESMF_GridComp to return. + +

+The arguments are: +

+
gridcomp
+
ESMF_GridComp to wait for. + +
+
[syncflag]
+
Blocking behavior of this method call. See section 54.59 + for a list of valid blocking options. Default option is + ESMF_SYNC_VASBLOCKING which blocks PETs and their spawned off threads + across each VAS but does not synchronize PETs that run in different VASs. + +
+
[timeout]
+
The maximum period in seconds the actual component is allowed to execute + a previously invoked component method before it must communicate back to + the dual component. If the actual component does not communicate back in + the specified time, a timeout condition is raised on the dual side (this + side). The default is 3600, i.e. 1 hour. The timeout argument is only + supported for connected dual components. + +
+
[timeoutFlag]
+
Returns .true. if the timeout was reached, .false. otherwise. + If timeoutFlag was not provided, a timeout condition will lead + to a return code of rc \= ESMF_SUCCESS. Otherwise the + return value of timeoutFlag is the sole indicator of a timeout + condition. + +
+
[userRc]
+
Return code set by userRoutine before returning. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+17.4.30 ESMF_GridCompWriteRestart - Call the GridComp's write restart routine +

+ +

+ +

+
+INTERFACE: +

   recursive subroutine ESMF_GridCompWriteRestart(gridcomp, &
+     importState, exportState, clock, syncflag, phase, timeout, timeoutFlag, &
+     userRc, rc)
+
ARGUMENTS: +
     type(ESMF_GridComp),  intent(inout)           :: gridcomp
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     type(ESMF_State),     intent(inout), optional :: importState
+     type(ESMF_State),     intent(inout), optional :: exportState
+     type(ESMF_Clock),     intent(inout), optional :: clock
+     type(ESMF_Sync_Flag), intent(in),    optional :: syncflag
+     integer,              intent(in),    optional :: phase
+     integer,              intent(in),    optional :: timeout
+     logical,              intent(out),   optional :: timeoutFlag
+     integer,              intent(out),   optional :: userRc
+     integer,              intent(out),   optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    5.3.0
    +
    Added argument timeout. + Added argument timeoutFlag. + The new arguments provide access to the fault-tolerant component + features. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Call the associated user write restart routine for + an ESMF_GridComp. + +

+The arguments are: +

+
gridcomp
+
ESMF_GridComp to call run routine for. + +
+
[importState]
+
ESMF_State containing import data. If not present, a dummy + argument will be passed to the user-supplied routine. The + importState argument in the user code cannot be optional. + +
+
[exportState]
+
ESMF_State containing export data. If not present, a dummy + argument will be passed to the user-supplied routine. The + exportState argument in the user code cannot be optional. + +
+
[clock]
+
External ESMF_Clock for passing in time information. + This is generally the parent component's clock, and will be treated + as read-only by the child component. The child component can maintain + a private clock for its own internal time computations. If not present, a dummy + argument will be passed to the user-supplied routine. The + clock argument in the user code cannot be optional. + +
+
[syncflag]
+
Blocking behavior of this method call. See section 54.59 + for a list of valid blocking options. Default option is + ESMF_SYNC_VASBLOCKING which blocks PETs and their spawned off threads + across each VAS but does not synchronize PETs that run in different VASs. + +
+
[phase]
+
Component providers must document whether each of their + routines are single-phase or multi-phase. + Single-phase routines require only one invocation to complete + their work. + Multi-phase routines provide multiple subroutines to accomplish + the work, accommodating components which must complete part of their + work, return to the caller and allow other processing to occur, + and then continue the original operation. + For multiple-phase child components, this is the integer phase + number to be invoked. + For single-phase child components this argument is optional. The default is + 1. + +
+
[timeout]
+
The maximum period in seconds that this call will wait in communications + with the actual component, before returning with a timeout condition. + The default is 3600, i.e. 1 hour. The timeout argument is only + supported for connected dual components. + +
+
[timeoutFlag]
+
Returns .true. if the timeout was reached, .false. otherwise. + If timeoutFlag was not provided, a timeout condition will lead + to a return code of rc \= ESMF_SUCCESS. Otherwise the + return value of timeoutFlag is the sole indicator of a timeout + condition. + +
+
[userRc]
+
Return code set by userRoutine before returning. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ + +

+18 CplComp Class +

+ +

+18.1 Description +

+ +

+ +

+In a large, multi-component application such as a weather +forecasting or climate prediction system running within ESMF, +physical domains and major system functions are represented +as Gridded Components +(see Section 17.1). A Coupler Component, or +ESMF_CplComp, arranges and executes the data +transformations between the Gridded Components. Ideally, +Coupler Components should contain all the information +about inter-component communication for an application. +This enables the Gridded Components in the application to be +used in multiple contexts; that is, used in different coupled +configurations without changes to their source code. +For example, the same atmosphere might in one case be coupled +to an ocean in a hurricane prediction model, and to a +data assimilation system for numerical weather prediction in +another. A single Coupler Component can couple +two or more Gridded Components. + +

+Like Gridded Components, Coupler Components have two parts, one +that is provided by the user and another that is part of the +framework. The user-written portion of the software is the coupling +code necessary for a particular exchange between Gridded Components. +This portion of the Coupler Component code must be divided into +separately callable initialize, run, and finalize methods. The +interfaces for these methods are prescribed by ESMF. + +

+The term “user-written” is somewhat misleading here, since within +a Coupler Component the user can leverage ESMF infrastructure +software for regridding, redistribution, lower-level communications, +calendar management, and other functions. However, ESMF is unlikely +to offer all the software necessary to customize a data transfer +between Gridded Components. For instance, ESMF does not currently +offer tools for unit tranformations or time averaging operations, +so users must manage those operations themselves. + +

+The second part of a Coupler Component is the ESMF_CplComp +derived type within ESMF. The user must create one of these types +to represent a specific coupling function, such as the regular +transfer of data between a data assimilation system and an +atmospheric model. 2 +

+The user-written part of a Coupler Component is associated with an +ESMF_CplComp derived type through a routine called +ESMF_SetServices(). +This is a routine that the user must write and declare public. +Inside the ESMF_SetServices() routine the user must call +ESMF_SetEntryPoint() methods that associate a standard ESMF +operation with the name of the corresponding Fortran subroutine in +their user code. For example, a user routine called “couplerInit” +might be associated with the standard initialize routine in a +Coupler Component. + +

+18.2 Use and Examples +

+ +

+A Coupler Component manages the transformation of data between Components. +It contains a list of State objects and the operations needed to +make them compatible, including such things as regridding and unit conversion. +Coupler Components are user-written, following prescribed ESMF interfaces +and, wherever desired, using ESMF infrastructure tools. + +

+ +

+ +

+ +

+18.2.1 Implement a user-code SetServices routine +

+ +

+ +

+Every ESMF_CplComp is required to provide and document + a public set services routine. It can have any name, but must + follow the declaration below: a subroutine which takes an + ESMF_CplComp as the first argument, and + an integer return code as the second. + Both arguments are required and must not be declared as + optional. If an intent is specified in the interface it must be + intent(inout) for the first and intent(out) for the + second argument. + +

+The set services routine must call the ESMF method + ESMF_CplCompSetEntryPoint() to + register with the framework what user-code subroutines should be called + to initialize, run, and finalize the component. There are + additional routines which can be registered as well, for checkpoint + and restart functions. + +

+Note that the actual subroutines being registered do not have to be + public to this module; only the set services routine itself must + be available to be used by other code. +

+

+    ! Example Coupler Component
+    module ESMF_CouplerEx
+    
+    ! ESMF Framework module
+    use ESMF
+    implicit none
+    public CPL_SetServices
+
+    contains
+
+    subroutine CPL_SetServices(comp, rc)
+      type(ESMF_CplComp)    :: comp   ! must not be optional
+      integer, intent(out)  :: rc     ! must not be optional
+
+      ! Set the entry points for standard ESMF Component methods
+      call ESMF_CplCompSetEntryPoint(comp, ESMF_METHOD_INITIALIZE, &
+                          userRoutine=CPL_Init, rc=rc)
+      call ESMF_CplCompSetEntryPoint(comp, ESMF_METHOD_RUN, &
+                          userRoutine=CPL_Run, rc=rc)
+      call ESMF_CplCompSetEntryPoint(comp, ESMF_METHOD_FINALIZE, &
+                          userRoutine=CPL_Final, rc=rc)
+
+      rc = ESMF_SUCCESS
+    end subroutine
+
+ +

+ +

+ +

+18.2.2 Implement a user-code Initialize routine +

+ +

+ +

+When a higher level component is ready to begin using an + ESMF_CplComp, it will call its initialize routine. + +

+The component writer must supply a subroutine with the exact interface + shown below. Arguments must not be declared as optional, and the types and + order must match. + +

+At initialization time the component can allocate data space, open + data files, set up initial conditions; anything it needs to do to + prepare to run. + +

+The rc return code should be set if an error occurs, otherwise + the value ESMF_SUCCESS should be returned. +

+

+    subroutine CPL_Init(comp, importState, exportState, clock, rc)
+      type(ESMF_CplComp)    :: comp               ! must not be optional
+      type(ESMF_State)      :: importState        ! must not be optional
+      type(ESMF_State)      :: exportState        ! must not be optional
+      type(ESMF_Clock)      :: clock              ! must not be optional
+      integer, intent(out)  :: rc                 ! must not be optional
+
+      print *, "Coupler Init starting"
+    
+      ! Add whatever code here needed
+      ! Precompute any needed values, fill in any inital values
+      !  needed in Import States
+
+      rc = ESMF_SUCCESS
+
+      print *, "Coupler Init returning"
+   
+    end subroutine CPL_Init
+
+ +

+ +

+ +

+18.2.3 Implement a user-code Run routine +

+ +

+ +

+During the execution loop, the run routine may be called many times. + Each time it should read data from the importState, use the + clock to determine what the current time is in the calling + component, compute new values or process the data, + and produce any output and place it in the exportState. + +

+When a higher level component is ready to use the ESMF_CplComp + it will call its run routine. + +

+The component writer must supply a subroutine with the exact interface + shown below. Arguments must not be declared as optional, and the types and + order must match. + +

+It is expected that this is where the bulk of the model computation + or data analysis will occur. + +

+The rc return code should be set if an error occurs, otherwise + the value ESMF_SUCCESS should be returned. +

+

+    subroutine CPL_Run(comp, importState, exportState, clock, rc)
+      type(ESMF_CplComp)    :: comp              ! must not be optional
+      type(ESMF_State)      :: importState       ! must not be optional
+      type(ESMF_State)      :: exportState       ! must not be optional
+      type(ESMF_Clock)      :: clock             ! must not be optional
+      integer, intent(out)  :: rc                ! must not be optional
+
+      print *, "Coupler Run starting"
+
+      ! Add whatever code needed here to transform Export state data
+      !  into Import states for the next timestep.  
+
+      rc = ESMF_SUCCESS
+
+      print *, "Coupler Run returning"
+
+    end subroutine CPL_Run
+
+ +

+ +

+ +

+18.2.4 Implement a user-code Finalize routine +

+ +

+ +

+At the end of application execution, each ESMF_CplComp should + deallocate data space, close open files, and flush final results. + These functions should be placed in a finalize routine. + +

+The component writer must supply a subroutine with the exact interface + shown below. Arguments must not be declared as optional, and the types and + order must match. + +

+The rc return code should be set if an error occurs, otherwise + the value ESMF_SUCCESS should be returned. + +

+

+    subroutine CPL_Final(comp, importState, exportState, clock, rc)
+      type(ESMF_CplComp)    :: comp                ! must not be optional
+      type(ESMF_State)      :: importState         ! must not be optional
+      type(ESMF_State)      :: exportState         ! must not be optional
+      type(ESMF_Clock)      :: clock               ! must not be optional
+      integer, intent(out)  :: rc                  ! must not be optional
+
+      print *, "Coupler Final starting"
+    
+      ! Add whatever code needed here to compute final values and
+      !  finish the computation.
+
+      rc = ESMF_SUCCESS
+
+      print *, "Coupler Final returning"
+   
+    end subroutine CPL_Final
+
+ +

+ +

+ +

+18.2.5 Implement a user-code SetVM routine +

+ +

+ +

+Every ESMF_CplComp can optionally provide and document + a public set vm routine. It can have any name, but must + follow the declaration below: a subroutine which takes an + ESMF_CplComp as the first argument, and + an integer return code as the second. + Both arguments are required and must not be declared as + optional. If an intent is specified in the interface it must be + intent(inout) for the first and intent(out) for the + second argument. + +

+The set vm routine is the only place where the child component can + use the ESMF_CplCompSetVMMaxPEs(), or + ESMF_CplCompSetVMMaxThreads(), or + ESMF_CplCompSetVMMinThreads() call to modify aspects of its own VM. + +

+A component's VM is started up right before its set services routine is + entered. ESMF_CplCompSetVM() is executing in the parent VM, and must + be called before ESMF_CplCompSetServices(). +

+

+    subroutine GComp_SetVM(comp, rc)
+      type(ESMF_CplComp)   :: comp   ! must not be optional
+      integer, intent(out)  :: rc     ! must not be optional
+      
+      type(ESMF_VM) :: vm
+      logical :: pthreadsEnabled
+      
+      ! Test for Pthread support, all SetVM calls require it
+      call ESMF_VMGetGlobal(vm, rc=rc)
+      call ESMF_VMGet(vm, pthreadsEnabledFlag=pthreadsEnabled, rc=rc)
+
+      if (pthreadsEnabled) then
+        ! run PETs single-threaded
+        call ESMF_CplCompSetVMMinThreads(comp, rc=rc)
+      endif
+
+      rc = ESMF_SUCCESS
+
+    end subroutine
+
+    end module ESMF_CouplerEx
+
+ +

+ + +

+18.3 Restrictions and Future Work +

+ +

+ +

    +
  1. No optional arguments. User-written routines called by SetServices, +and registered for Initialize, Run and Finalize, must not declare any +of the arguments as optional. + +

    +

  2. +
  3. No Transforms. Components must exchange data through +ESMF_State objects. The input data are available at the time +the component code is called, and data to be returned to another +component are available when that code returns. + +

    +

  4. +
  5. No automatic unit conversions. The ESMF framework does not +currently contain tools for performing unit conversions, operations that +are fairly standard within Coupler Components. + +

    +

  6. +
  7. No accumulator. The ESMF does not have an accumulator tool, to +perform time averaging of fields for coupling. This is likely to be developed +in the near term. + +

    +

  8. +
+ +

+18.4 Class API +

+ +

+ +

+ +

+ +

+18.4.1 ESMF_CplCompAssignment(=) - CplComp assignment +

+ +

+ +

+
+INTERFACE: +

     interface assignment(=)
+     cplcomp1 = cplcomp2
+
ARGUMENTS: +
     type(ESMF_CplComp) :: cplcomp1
+     type(ESMF_CplComp) :: cplcomp2
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Assign cplcomp1 as an alias to the same ESMF CplComp object in memory + as cplcomp2. If cplcomp2 is invalid, then cplcomp1 will be equally invalid after + the assignment. + +

+The arguments are: +

+
cplcomp1
+
The ESMF_CplComp object on the left hand side of the assignment. + +
+
cplcomp2
+
The ESMF_CplComp object on the right hand side of the assignment. + +
+
+ +

+ +

+ +

+18.4.2 ESMF_CplCompOperator(==) - CplComp equality operator +

+ +

+ +

+
+INTERFACE: +

   interface operator(==)
+     if (cplcomp1 == cplcomp2) then ... endif
+               OR
+     result = (cplcomp1 == cplcomp2)
+
RETURN VALUE: +
     logical :: result
+
ARGUMENTS: +
     type(ESMF_CplComp), intent(in) :: cplcomp1
+     type(ESMF_CplComp), intent(in) :: cplcomp2
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Test whether cplcomp1 and cplcomp2 are valid aliases to the same ESMF + CplComp object in memory. For a more general comparison of two ESMF CplComps, + going beyond the simple alias test, the ESMF_CplCompMatch() function (not yet + implemented) must be used. + +

+The arguments are: +

+
cplcomp1
+
The ESMF_CplComp object on the left hand side of the equality + operation. + +
+
cplcomp2
+
The ESMF_CplComp object on the right hand side of the equality + operation. + +
+
+ +

+ +

+ +

+18.4.3 ESMF_CplCompOperator(/=) - CplComp not equal operator +

+ +

+ +

+
+INTERFACE: +

   interface operator(/=)
+     if (cplcomp1 /= cplcomp2) then ... endif
+               OR
+     result = (cplcomp1 /= cplcomp2)
+
RETURN VALUE: +
     logical :: result
+
ARGUMENTS: +
     type(ESMF_CplComp), intent(in) :: cplcomp1
+     type(ESMF_CplComp), intent(in) :: cplcomp2
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Test whether cplcomp1 and cplcomp2 are not valid aliases to the + same ESMF CplComp object in memory. For a more general comparison of two ESMF + CplComps, going beyond the simple alias test, the ESMF_CplCompMatch() function + (not yet implemented) must be used. + +

+The arguments are: +

+
cplcomp1
+
The ESMF_CplComp object on the left hand side of the non-equality + operation. + +
+
cplcomp2
+
The ESMF_CplComp object on the right hand side of the non-equality + operation. + +
+
+ +

+ +

+ +

+18.4.4 ESMF_CplCompCreate - Create a CplComp +

+ +

+ +

+
+INTERFACE: +

   recursive function ESMF_CplCompCreate(hconfig, config, &
+     configFile, clock, petList, devList, contextflag, name, rc)
+
RETURN VALUE: +
     type(ESMF_CplComp) :: ESMF_CplCompCreate
+
ARGUMENTS: +
 -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     type(ESMF_HConfig),      intent(in),  optional :: hconfig
+     type(ESMF_Config),       intent(in),  optional :: config
+     character(len=*),        intent(in),  optional :: configFile
+     type(ESMF_Clock),        intent(in),  optional :: clock
+     integer,                 intent(in),  optional :: petList(:)
+     integer,                 intent(in),  optional :: devList(:)
+     type(ESMF_Context_Flag), intent(in),  optional :: contextflag
+     character(len=*),        intent(in),  optional :: name
+     integer,                 intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    8.6.0
    +
    Added argument devList to support management of accelerator + devices. + +
    +
    8.7.0
    +
    Added argument hconfig to simplify direct usage of + ESMF_HConfig objects with Components. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+This interface creates an ESMF_CplComp object. By default, a + separate VM context will be created for each component. This implies + creating a new MPI communicator and allocating additional memory to + manage the VM resources. When running on a large number of processors, + creating a separate VM for each component could be both time and memory + inefficient. If the application is sequential, i.e., each component is + running on all the PETs of the global VM, it will be more efficient to use + the global VM instead of creating a new one. This can be done by setting + contextflag to ESMF_CONTEXT_PARENT_VM. + +

+The return value is the new ESMF_CplComp. + +

+The arguments are: +

+
[hconfig]
+
An already-created ESMF_HConfig object to be attached to the newly + created component. + Only one of hconfig, config, or configFile must be + specified. + +
+
[config]
+
An already-created ESMF_Config object to be attached to the newly + created component. + Only one of hconfig, config, or configFile must be + specified. + +
+
[configFile]
+
The filename of a config file. + If specified, a new ESMF_Config object is created and attached to the + newly created component. The configFile file is opened and associated + with the new config object. + Only one of hconfig, config, or configFile must be + specified. + +
+
[clock]
+
Component-specific ESMF_Clock. This clock is available to be + queried and updated by the new ESMF_CplComp as it chooses. + This should + not be the parent component clock, which should be maintained and passed + down to the initialize/run/finalize routines separately. + +
+
[petList]
+
List of parent PETs given to the created child component by the + parent component. If petList is not specified, or is empty, all of the + parent PETs are given to the child component. The order of + PETs in petList determines how the child local PETs map back to + the parent PETs. + +
+
[devList]
+
List of accelerator devices global ids DEVs to be associated with the + created child component. If devList is not specified, or is empty, + no devices are associated with the component. + +
+
[contextflag]
+
Specify the component's VM context. The default context is + ESMF_CONTEXT_OWN_VM. See section 54.10 for a + complete list of valid flags. + +
+
[name]
+
Name of the newly-created ESMF_CplComp. This name can be altered + from within the ESMF_CplComp code once the initialization routine + is called. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+18.4.5 ESMF_CplCompDestroy - Release resources associated with a CplComp +

+ +

+ +

+
+INTERFACE: +

   recursive subroutine ESMF_CplCompDestroy(cplcomp, &
+     timeout, timeoutFlag, rc)
+
ARGUMENTS: +
     type(ESMF_CplComp), intent(inout)          :: cplcomp
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,            intent(in),   optional :: timeout
+     logical,            intent(out),  optional :: timeoutFlag
+     integer,            intent(out),  optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    5.3.0
    +
    Added argument timeout. + Added argument timeoutFlag. + The new arguments provide access to the fault-tolerant component + features. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Destroys an ESMF_CplComp, releasing the resources associated + with the object. + +

+The arguments are: +

+
cplcomp
+
Release all resources associated with this ESMF_CplComp + and mark the object as invalid. It is an error to pass this + object into any other routines after being destroyed. + +
+
[timeout]
+
The maximum period in seconds that this call will wait in communications + with the actual component, before returning with a timeout condition. + The default is 3600, i.e. 1 hour. The timeout argument is only + supported for connected dual components. + +
+
[timeoutFlag]
+
Returns .true. if the timeout was reached, .false. otherwise. + If timeoutFlag was not provided, a timeout condition will lead + to a return code of rc \= ESMF_SUCCESS. Otherwise the + return value of timeoutFlag is the sole indicator of a timeout + condition. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+18.4.6 ESMF_CplCompFinalize - Call the CplComp's finalize routine +

+ +

+ +

+
+INTERFACE: +

   recursive subroutine ESMF_CplCompFinalize(cplcomp, &
+     importState, exportState, clock, syncflag, phase, timeout, timeoutFlag, &
+     userRc, rc)
+
ARGUMENTS: +
     type(ESMF_CplComp),   intent(inout)           :: cplcomp
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     type(ESMF_State),     intent(inout), optional :: importState
+     type(ESMF_State),     intent(inout), optional :: exportState
+     type(ESMF_Clock),     intent(inout), optional :: clock
+     type(ESMF_Sync_Flag), intent(in),    optional :: syncflag
+     integer,              intent(in),    optional :: phase
+     integer,              intent(in),    optional :: timeout
+     logical,              intent(out),   optional :: timeoutFlag
+     integer,              intent(out),   optional :: userRc
+     integer,              intent(out),   optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    5.3.0
    +
    Added argument timeout. + Added argument timeoutFlag. + The new arguments provide access to the fault-tolerant component + features. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Call the associated user-supplied finalization routine for + an ESMF_CplComp. + +

+The arguments are: +

+
cplcomp
+
The ESMF_CplComp to call finalize routine for. + +
+
[importState]
+
ESMF_State containing import data for coupling. If not present, a dummy + argument will be passed to the user-supplied routine. The + importState argument in the user code cannot be optional. + +
+
[exportState]
+
ESMF_State containing export data for coupling. If not present, a dummy + argument will be passed to the user-supplied routine. The + exportState argument in the user code cannot be optional. + +
+
[clock]
+
External ESMF_Clock for passing in time information. + This is generally the parent component's clock, and will be treated + as read-only by the child component. The child component can maintain + a private clock for its own internal time computations. If not present, a dummy + argument will be passed to the user-supplied routine. The + clock argument in the user code cannot be optional. + +
+
[syncflag]
+
Blocking behavior of this method call. See section 54.59 + for a list of valid blocking options. Default option is + ESMF_SYNC_VASBLOCKING which blocks PETs and their spawned off threads + across each VAS but does not synchronize PETs that run in different VASs. + +
+
[phase]
+
Component providers must document whether each of their + routines are single-phase or multi-phase. + Single-phase routines require only one invocation to complete + their work. + Multi-phase routines provide multiple subroutines to accomplish + the work, accommodating components which must complete part of their + work, return to the caller and allow other processing to occur, + and then continue the original operation. + For multiple-phase child components, this is the integer phase + number to be invoked. + For single-phase child components this argument is optional. The default is + 1. + +
+
[timeout]
+
The maximum period in seconds that this call will wait in communications + with the actual component, before returning with a timeout condition. + The default is 3600, i.e. 1 hour. The timeout argument is only + supported for connected dual components. + +
+
[timeoutFlag]
+
Returns .true. if the timeout was reached, .false. otherwise. + If timeoutFlag was not provided, a timeout condition will lead + to a return code of rc \= ESMF_SUCCESS. Otherwise the + return value of timeoutFlag is the sole indicator of a timeout + condition. + +
+
[userRc]
+
Return code set by userRoutine before returning. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+18.4.7 ESMF_CplCompGet - Get CplComp information +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_CplCompGet(cplcomp, hconfigIsPresent, hconfig, &
+     configIsPresent, config, configFileIsPresent, configFile, clockIsPresent, clock, localPet, &
+     petCount, contextflag, currentMethod, currentPhase, vmIsPresent, &
+     vm, name, rc)
+
ARGUMENTS: +
     type(ESMF_CplComp),      intent(in)            :: cplcomp
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     logical,                 intent(out), optional :: hconfigIsPresent
+     type(ESMF_HConfig),      intent(out), optional :: hconfig
+     logical,                 intent(out), optional :: configIsPresent
+     type(ESMF_Config),       intent(out), optional :: config
+     logical,                 intent(out), optional :: configFileIsPresent
+     character(len=*),        intent(out), optional :: configFile
+     logical,                 intent(out), optional :: clockIsPresent
+     type(ESMF_Clock),        intent(out), optional :: clock
+     integer,                 intent(out), optional :: localPet
+     integer,                 intent(out), optional :: petCount
+     type(ESMF_Context_Flag), intent(out), optional :: contextflag
+     type(ESMF_Method_Flag),  intent(out), optional :: currentMethod
+     integer,                 intent(out), optional :: currentPhase
+     logical,                 intent(out), optional :: vmIsPresent
+     type(ESMF_VM),           intent(out), optional :: vm
+     character(len=*),        intent(out), optional :: name
+     integer,                 intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    8.7.0
    +
    Added arguments hconfigIsPresent and hconfig to + simplify direct usage of ESMF_HConfig objects with Components. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Get information about an ESMF_CplComp object. + +

+The arguments are: +

+
cplcomp
+
The ESMF_CplComp object being queried. + +
+
[configIsPresent]
+
.true. if config was set in CplComp object, + .false. otherwise. + +
+
[hconfigIsPresent]
+
.true. if hconfig is available in the CplComp object, + .false. otherwise. + +
+
[hconfig]
+
Return the associated HConfig object. + It is an error to query for the HConfig object if none is associated with + the CplComp. If unsure, get hconfigIsPresent first to determine + the status. + +
+
[configIsPresent]
+
.true. if config is available in the CplComp object, + .false. otherwise. + +
+
[config]
+
Return the associated Config object. + It is an error to query for the Config if none is associated with + the CplComp. If unsure, get configIsPresent first to determine + the status. + +
+
[configFileIsPresent]
+
.true. if configFile is available in the CplComp object, + .false. otherwise. + +
+
[configFile]
+
Return the associated configuration filename. + It is an error to query for the configuration filename if none is associated with + the CplComp. If unsure, get configFileIsPresent first to determine + the status. + +
+
[clockIsPresent]
+
.true. if clock was set in CplComp object, + .false. otherwise. + +
+
[clock]
+
Return the associated Clock. + It is an error to query for the Clock if none is associated with + the CplComp. If unsure, get clockIsPresent first to determine + the status. + +
+
[localPet]
+
Return the local PET id within the ESMF_CplComp object. + +
+
[petCount]
+
Return the number of PETs in the the ESMF_CplComp object. + +
+
[contextflag]
+
Return the ESMF_Context_Flag for this ESMF_CplComp. + See section 54.10 for a complete list of valid flags. + +
+
[currentMethod]
+
Return the current ESMF_Method_Flag of the ESMF_CplComp execution. + See section 54.44 for a complete list of valid options. + +
+
[currentPhase]
+
Return the current phase of the ESMF_CplComp execution. + +
+
[vmIsPresent]
+
.true. if vm was set in CplComp object, + .false. otherwise. + +
+
[vm]
+
Return the associated VM. + It is an error to query for the VM if none is associated with + the CplComp. If unsure, get vmIsPresent first to determine + the status. + +
+
[name]
+
Return the name of the ESMF_CplComp. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+18.4.8 ESMF_CplCompGetInternalState - Get private data block pointer +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_CplCompGetInternalState(cplcomp, wrappedDataPointer, rc)
+
ARGUMENTS: +
     type(ESMF_CplComp)              :: cplcomp
+     type(wrapper)                   :: wrappedDataPointer
+     integer,            intent(out) :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Available to be called by an ESMF_CplComp at any time after + ESMF_CplCompSetInternalState has been called. + Since init, run, and finalize must be separate subroutines, data that + they need to share in common can either be module global data, or can + be allocated in a private data block and the address of that block + can be registered with the framework and retrieved by this call. + When running multiple instantiations of an ESMF_CplComp, + for example during ensemble runs, + it may be simpler to maintain private data specific to + each run with private data blocks. A corresponding + ESMF_CplCompSetInternalState call sets the data pointer to + this block, and this call retrieves the data pointer. + Note that the wrappedDataPointer argument needs to be a derived type + which contains only a pointer of the type of the data block defined + by the user. When making this call the pointer needs to be unassociated. + When the call returns, the pointer will now reference the original + data block which was set during the previous call to + ESMF_CplCompSetInternalState. + +

+Only the last data block set via + ESMF_CplCompSetInternalState will be accessible. + +

+CAUTION: If you are working with a compiler that does not support Fortran 2018 + assumed-type dummy arguments, then this method does not have an explicit + Fortran interface. In this case do not specify argument keywords when calling + this method! + +

+The arguments are: +

+
cplcomp
+
An ESMF_CplComp object. + +
+
wrappedDataPointer
+
A derived type (wrapper), containing only an unassociated pointer + to the private data block. + The framework will fill in the pointer. When this call returns, the + pointer is set to the same address set during the last + ESMF_CplCompSetInternalState call. + This level of indirection is needed to reliably set and retrieve + the data block no matter which architecture or compiler is used. + +
+
rc
+
Return code; equals ESMF_SUCCESS if there are no errors. + Note: unlike most other ESMF routines, this argument is not optional + because of implementation considerations. + +
+
+ +

+ +

+ +

+18.4.9 ESMF_CplCompInitialize - Call the CplComp's initialize routine +

+ +

+ +

+
+INTERFACE: +

   recursive subroutine ESMF_CplCompInitialize(cplcomp, &
+     importState, exportState, clock, syncflag, phase, timeout, timeoutFlag, &
+     userRc, rc)
+
ARGUMENTS: +
     type(ESMF_CplComp),   intent(inout)           :: cplcomp
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     type(ESMF_State),     intent(inout), optional :: importState
+     type(ESMF_State),     intent(inout), optional :: exportState
+     type(ESMF_Clock),     intent(inout), optional :: clock
+     type(ESMF_Sync_Flag), intent(in),    optional :: syncflag
+     integer,              intent(in),    optional :: phase
+     integer,              intent(in),    optional :: timeout
+     logical,              intent(out),   optional :: timeoutFlag
+     integer,              intent(out),   optional :: userRc
+     integer,              intent(out),   optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    5.3.0
    +
    Added argument timeout. + Added argument timeoutFlag. + The new arguments provide access to the fault-tolerant component + features. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Call the associated user initialization routine for + an ESMF_CplComp. + +

+The arguments are: +

+
cplcomp
+
ESMF_CplComp to call initialize routine for. + +
+
[importState]
+
ESMF_State containing import data for coupling. If not present, a dummy + argument will be passed to the user-supplied routine. The + importState argument in the user code cannot be optional. + +
+
[exportState]
+
ESMF_State containing export data for coupling. If not present, a dummy + argument will be passed to the user-supplied routine. The + exportState argument in the user code cannot be optional. + +
+
[clock]
+
External ESMF_Clock for passing in time information. + This is generally the parent component's clock, and will be treated + as read-only by the child component. The child component can maintain + a private clock for its own internal time computations. If not present, a dummy + argument will be passed to the user-supplied routine. The + clock argument in the user code cannot be optional. + +
+
[syncflag]
+
Blocking behavior of this method call. See section 54.59 + for a list of valid blocking options. Default option is + ESMF_SYNC_VASBLOCKING which blocks PETs and their spawned off threads + across each VAS but does not synchronize PETs that run in different VASs. + +
+
[phase]
+
Component providers must document whether each of their + routines are single-phase or multi-phase. + Single-phase routines require only one invocation to complete + their work. + Multi-phase routines provide multiple subroutines to accomplish + the work, accommodating components which must complete part of their + work, return to the caller and allow other processing to occur, + and then continue the original operation. + For multiple-phase child components, this is the integer phase + number to be invoked. + For single-phase child components this argument is optional. The default is + 1. + +
+
[timeout]
+
The maximum period in seconds that this call will wait in communications + with the actual component, before returning with a timeout condition. + The default is 3600, i.e. 1 hour. The timeout argument is only + supported for connected dual components. + +
+
[timeoutFlag]
+
Returns .true. if the timeout was reached, .false. otherwise. + If timeoutFlag was not provided, a timeout condition will lead + to a return code of rc \= ESMF_SUCCESS. Otherwise the + return value of timeoutFlag is the sole indicator of a timeout + condition. + +
+
[userRc]
+
Return code set by userRoutine before returning. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+18.4.10 ESMF_CplCompIsCreated - Check whether a CplComp object has been created +

+ +

+ +

+
+INTERFACE: +

   function ESMF_CplCompIsCreated(cplcomp, rc)
+
RETURN VALUE: +
     logical :: ESMF_CplCompIsCreated
+
ARGUMENTS: +
     type(ESMF_CplComp), intent(in)            :: cplcomp
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,             intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Return .true. if the cplcomp has been created. Otherwise return + .false.. If an error occurs, i.e. rc /= ESMF_SUCCESS is + returned, the return value of the function will also be .false.. + +

+The arguments are: +

+
cplcomp
+
ESMF_CplComp queried. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+18.4.11 ESMF_CplCompIsPetLocal - Inquire if this CplComp is to execute on the calling PET +

+ +

+ +

+
+INTERFACE: +

   recursive function ESMF_CplCompIsPetLocal(cplcomp, rc)
+
RETURN VALUE: +
     logical :: ESMF_CplCompIsPetLocal
+
ARGUMENTS: +
     type(ESMF_CplComp), intent(in)            :: cplcomp
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,            intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Inquire if this ESMF_CplComp object is to execute on the calling PET. + +

+The return value is .true. if the component is to execute on the + calling PET, .false. otherwise. + +

+The arguments are: +

+
cplcomp
+
ESMF_CplComp queried. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+18.4.12 ESMF_CplCompPrint - Print CplComp information +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_CplCompPrint(cplcomp, rc)
+
ARGUMENTS: +
     type(ESMF_CplComp), intent(in)            :: cplcomp
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,            intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Prints information about an ESMF_CplComp to stdout. +
+

+The arguments are: +

+
cplcomp
+
ESMF_CplComp to print. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+18.4.13 ESMF_CplCompReadRestart - Call the CplComp's read restart routine +

+ +

+ +

+
+INTERFACE: +

   recursive subroutine ESMF_CplCompReadRestart(cplcomp, &
+     importState, exportState, clock, syncflag, phase, timeout, timeoutFlag, &
+     userRc, rc)
+
ARGUMENTS: +
     type(ESMF_CplComp),   intent(inout)           :: cplcomp
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     type(ESMF_State),     intent(inout), optional :: importState
+     type(ESMF_State),     intent(inout), optional :: exportState
+     type(ESMF_Clock),     intent(inout), optional :: clock
+     type(ESMF_Sync_Flag), intent(in),    optional :: syncflag
+     integer,              intent(in),    optional :: phase
+     integer,              intent(in),    optional :: timeout
+     logical,              intent(out),   optional :: timeoutFlag
+     integer,              intent(out),   optional :: userRc
+     integer,              intent(out),   optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    5.3.0
    +
    Added argument timeout. + Added argument timeoutFlag. + The new arguments provide access to the fault-tolerant component + features. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Call the associated user read restart routine for + an ESMF_CplComp. + +

+The arguments are: +

+
cplcomp
+
ESMF_CplComp to call run routine for. + +
+
[importState]
+
ESMF_State containing import data. If not present, a dummy + argument will be passed to the user-supplied routine. The + importState argument in the user code cannot be optional. + +
+
[exportState]
+
ESMF_State containing export data. If not present, a dummy + argument will be passed to the user-supplied routine. The + exportState argument in the user code cannot be optional. + +
+
[clock]
+
External ESMF_Clock for passing in time information. + This is generally the parent component's clock, and will be treated + as read-only by the child component. The child component can maintain + a private clock for its own internal time computations. If not present, a dummy + argument will be passed to the user-supplied routine. The + clock argument in the user code cannot be optional. + +
+
[syncflag]
+
Blocking behavior of this method call. See section 54.59 + for a list of valid blocking options. Default option is + ESMF_SYNC_VASBLOCKING which blocks PETs and their spawned off threads + across each VAS but does not synchronize PETs that run in different VASs. + +
+
[phase]
+
Component providers must document whether each of their + routines are single-phase or multi-phase. + Single-phase routines require only one invocation to complete + their work. + Multi-phase routines provide multiple subroutines to accomplish + the work, accommodating components which must complete part of their + work, return to the caller and allow other processing to occur, + and then continue the original operation. + For multiple-phase child components, this is the integer phase + number to be invoked. + For single-phase child components this argument is optional. The default is + 1. + +
+
[timeout]
+
The maximum period in seconds that this call will wait in communications + with the actual component, before returning with a timeout condition. + The default is 3600, i.e. 1 hour. The timeout argument is only + supported for connected dual components. + +
+
[timeoutFlag]
+
Returns .true. if the timeout was reached, .false. otherwise. + If timeoutFlag was not provided, a timeout condition will lead + to a return code of rc \= ESMF_SUCCESS. Otherwise the + return value of timeoutFlag is the sole indicator of a timeout + condition. + +
+
[userRc]
+
Return code set by userRoutine before returning. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+18.4.14 ESMF_CplCompRun - Call the CplComp's run routine +

+ +

+ +

+
+INTERFACE: +

   recursive subroutine ESMF_CplCompRun(cplcomp, &
+     importState, exportState, clock, syncflag, phase, timeout, timeoutFlag, &
+     userRc, rc)
+
ARGUMENTS: +
     type(ESMF_CplComp),   intent(inout)           :: cplcomp
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     type(ESMF_State),     intent(inout), optional :: importState
+     type(ESMF_State),     intent(inout), optional :: exportState
+     type(ESMF_Clock),     intent(inout), optional :: clock
+     type(ESMF_Sync_Flag), intent(in),    optional :: syncflag
+     integer,              intent(in),    optional :: phase
+     integer,              intent(in),    optional :: timeout
+     logical,              intent(out),   optional :: timeoutFlag
+     integer,              intent(out),   optional :: userRc
+     integer,              intent(out),   optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    5.3.0
    +
    Added argument timeout. + Added argument timeoutFlag. + The new arguments provide access to the fault-tolerant component + features. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Call the associated user run routine for + an ESMF_CplComp. + +

+The arguments are: +

+
cplcomp
+
ESMF_CplComp to call run routine for. + +
+
[importState]
+
ESMF_State containing import data for coupling. If not present, a dummy + argument will be passed to the user-supplied routine. The + importState argument in the user code cannot be optional. + +
+
[exportState]
+
ESMF_State containing export data for coupling. If not present, a dummy + argument will be passed to the user-supplied routine. The + exportState argument in the user code cannot be optional. + +
+
[clock]
+
External ESMF_Clock for passing in time information. + This is generally the parent component's clock, and will be treated + as read-only by the child component. The child component can maintain + a private clock for its own internal time computations. If not present, a dummy + argument will be passed to the user-supplied routine. The + clock argument in the user code cannot be optional. + +
+
[syncflag]
+
Blocking behavior of this method call. See section 54.59 + for a list of valid blocking options. Default option is + ESMF_SYNC_VASBLOCKING which blocks PETs and their spawned off threads + across each VAS but does not synchronize PETs that run in different VASs. + +
+
[phase]
+
Component providers must document whether each of their + routines are single-phase or multi-phase. + Single-phase routines require only one invocation to complete + their work. + Multi-phase routines provide multiple subroutines to accomplish + the work, accommodating components which must complete part of their + work, return to the caller and allow other processing to occur, + and then continue the original operation. + For multiple-phase child components, this is the integer phase + number to be invoked. + For single-phase child components this argument is optional. The default is + 1. + +
+
[timeout]
+
The maximum period in seconds that this call will wait in communications + with the actual component, before returning with a timeout condition. + The default is 3600, i.e. 1 hour. The timeout argument is only + supported for connected dual components. + +
+
[timeoutFlag]
+
Returns .true. if the timeout was reached, .false. otherwise. + If timeoutFlag was not provided, a timeout condition will lead + to a return code of rc \= ESMF_SUCCESS. Otherwise the + return value of timeoutFlag is the sole indicator of a timeout + condition. + +
+
[userRc]
+
Return code set by userRoutine before returning. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+18.4.15 ESMF_CplCompServiceLoop - Call the CplComp's service loop routine +

+ +

+ +

+
+INTERFACE: +

   recursive subroutine ESMF_CplCompServiceLoop(cplcomp, &
+     importState, exportState, clock, syncflag, port, timeout, timeoutFlag, rc)
+
ARGUMENTS: +
     type(ESMF_CplComp),   intent(inout)           :: cplcomp
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     type(ESMF_State),     intent(inout), optional :: importState
+     type(ESMF_State),     intent(inout), optional :: exportState
+     type(ESMF_Clock),     intent(inout), optional :: clock
+     type(ESMF_Sync_Flag), intent(in),    optional :: syncflag
+     integer,              intent(in),    optional :: port
+     integer,              intent(in),    optional :: timeout
+     logical,              intent(out),   optional :: timeoutFlag
+     integer,              intent(out),   optional :: rc
+
+DESCRIPTION: +
+ +

+Call the ServiceLoop routine for an ESMF_CplComp. + This tries to establish a "component tunnel" between the actual + Component (calling this routine) and a dual Component connecting to it + through a matching SetServices call. + +

+The arguments are: +

+
cplcomp
+
ESMF_CplComp to call service loop routine for. + +
+
[importState]
+
ESMF_State containing import data for coupling. If not present, a dummy + argument will be passed to the user-supplied routine. The + importState argument in the user code cannot be optional. + +
+
[exportState]
+
ESMF_State containing export data for coupling. If not present, a dummy + argument will be passed to the user-supplied routine. The + exportState argument in the user code cannot be optional. + +
+
[clock]
+
External ESMF_Clock for passing in time information. + This is generally the parent component's clock, and will be treated + as read-only by the child component. The child component can maintain + a private clock for its own internal time computations. If not present, a dummy + argument will be passed to the user-supplied routine. The + clock argument in the user code cannot be optional. + +
+
[syncflag]
+
Blocking behavior of this method call. See section 54.59 + for a list of valid blocking options. Default option is + ESMF_SYNC_VASBLOCKING which blocks PETs and their spawned off threads + across each VAS but does not synchronize PETs that run in different VASs. + +
+
[port]
+
In case a port number is provided, the "component tunnel" is established + using sockets. The actual component side, i.e. the side that calls into + ESMF_CplCompServiceLoop(), starts to listen on the specified port + as the server. The valid port range is [1024, 65535]. + In case the port argument is not specified, the "component + tunnel" is established within the same executable using local communication + methods (e.g. MPI). + +
+
[timeout]
+
The maximum period in seconds that this call will wait for communications + with the dual component, before returning with a timeout condition. + The default is 3600, i.e. 1 hour. + (NOTE: Currently this option is only available for socket based component + tunnels.) + +
+
[timeoutFlag]
+
Returns .true. if the timeout was reached, .false. otherwise. + If timeoutFlag was not provided, a timeout condition will lead + to a return code of rc \= ESMF_SUCCESS. Otherwise the + return value of timeoutFlag is the sole indicator of a timeout + condition. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+18.4.16 ESMF_CplCompSet - Set or reset information about the CplComp +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_CplCompSet(cplcomp, hconfig, config, &
+     configFile, clock, name, rc)
+
ARGUMENTS: +
     type(ESMF_CplComp), intent(inout)         :: cplcomp
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     type(ESMF_HConfig), intent(in),  optional :: hconfig
+     type(ESMF_Config),  intent(in),  optional :: config
+     character(len=*),   intent(in),  optional :: configFile
+     type(ESMF_Clock),   intent(in),  optional :: clock
+     character(len=*),   intent(in),  optional :: name
+     integer,            intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    8.7.0
    +
    Added argument hconfig to simplify direct usage of + ESMF_HConfig objects with Components. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Sets or resets information about an ESMF_CplComp. + +

+The arguments are: +

+
cplcomp
+
ESMF_CplComp to change. + +
+
[name]
+
Set the name of the ESMF_CplComp. + +
+
[hconfig]
+
An already-created ESMF_HConfig object to be attached to the + component. + Only one of hconfig, config, or configFile must be + specified. + +
+
[config]
+
An already-created ESMF_Config object to be attached to the + component. + Only one of hconfig, config, or configFile must be + specified. + +
+
[configFile]
+
The filename of a config file. + If specified, a new ESMF_Config object is created and attached to the + component. The configFile file is opened and associated + with the new config object. + Only one of hconfig, config, or configFile must be + specified. + +
+
[clock]
+
Set the private clock for this ESMF_CplComp. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+18.4.17 ESMF_CplCompSetEntryPoint - Set user routine as entry point for standard Component method +

+ +

+ +

+
+INTERFACE: +

   recursive subroutine ESMF_CplCompSetEntryPoint(cplcomp, methodflag, &
+     userRoutine, phase, rc)
+
ARGUMENTS: +
     type(ESMF_CplComp),     intent(inout)         :: cplcomp
+     type(ESMF_Method_Flag), intent(in)            :: methodflag
+     interface
+       subroutine userRoutine(cplcomp, importState, exportState, clock, rc)
+         use ESMF_CompMod
+         use ESMF_StateMod
+         use ESMF_ClockMod
+         implicit none
+         type(ESMF_CplComp)          :: cplcomp      ! must not be optional
+         type(ESMF_State)            :: importState  ! must not be optional
+         type(ESMF_State)            :: exportState  ! must not be optional
+         type(ESMF_Clock)            :: clock        ! must not be optional
+         integer, intent(out)        :: rc           ! must not be optional
+       end subroutine
+     end interface
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,                intent(in),  optional :: phase
+     integer,                intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Registers a user-supplied userRoutine as the entry point for one of the + predefined Component methodflags. After this call the userRoutine + becomes accessible via the standard Component method API. + +

+The arguments are: +

+
cplcomp
+
An ESMF_CplComp object. + +
+
methodflag
+
One of a set of predefined Component methods - e.g. + ESMF_METHOD_INITIALIZE, ESMF_METHOD_RUN, + ESMF_METHOD_FINALIZE. See section 54.44 + for a complete list of valid method options. + +
+
userRoutine
+
The user-supplied subroutine to be associated for this methodflag. + The Component writer must supply a subroutine with the exact interface + shown above for the userRoutine argument. Arguments in userRoutine + must not be declared as optional, and the types, intent and order must match. + Prior to Fortran-2008, the subroutine must be either a module scope procedure, + or an external procedure that has a matching interface block specified for it. + An internal procedure which is contained within another procedure must not be used. + From Fortran-2008 onwards, an internal procedure contained within either a main program + or a module procedure may be used. If the internal procedure is contained within a + module procedure, it is subject to initialization requirements. See: 16.4.9 + +
+
[phase]
+
The phase number for multi-phase methods. For single phase + methods the phase argument can be omitted. The default setting + is 1. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+18.4.18 ESMF_CplCompSetInternalState - Set private data block pointer +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_CplCompSetInternalState(cplcomp, wrappedDataPointer, rc)
+
ARGUMENTS: +
     type(ESMF_CplComp)              :: cplcomp
+     type(wrapper)                   :: wrappedDataPointer
+     integer,            intent(out) :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Available to be called by an ESMF_CplComp at any time, but + expected to be + most useful when called during the registration process, or initialization. + Since init, run, and finalize must be separate subroutines data that + they need to share in common can either be module global data, or can + be allocated in a private data block and the address of that block + can be registered with the framework and retrieved by subsequent calls. + When running multiple instantiations of an ESMF_CplComp, + for example during + ensemble runs, it may be simpler to maintain private data specific to + each run with private data blocks. A corresponding + ESMF_CplCompGetInternalState call retrieves the data pointer. + +

+Only the last data block set via + ESMF_CplCompSetInternalState will be accessible. + +

+CAUTION: If you are working with a compiler that does not support Fortran 2018 + assumed-type dummy arguments, then this method does not have an explicit + Fortran interface. In this case do not specify argument keywords when calling + this method! + +

+The arguments are: +

+
cplcomp
+
An ESMF_CplComp object. + +
+
wrappedDataPointer
+
A pointer to the private data block, wrapped in a derived type which + contains only a pointer to the block. This level of indirection is + needed to reliably set and retrieve the data block no matter which + architecture or compiler is used. + +
+
rc
+
Return code; equals ESMF_SUCCESS if there are no errors. + Note: unlike most other ESMF routines, this argument is not optional + because of implementation considerations. + +
+
+ +

+ +

+ +

+18.4.19 ESMF_CplCompSetServices - Call user routine to register CplComp methods +

+ +

+ +

+
+INTERFACE: +

   recursive subroutine ESMF_CplCompSetServices(cplcomp, userRoutine, &
+      userRc, rc)
+
ARGUMENTS: +
     type(ESMF_CplComp), intent(inout)         :: cplcomp
+     interface
+       subroutine userRoutine(cplcomp, rc)
+         use ESMF_CompMod
+         implicit none
+         type(ESMF_CplComp)         :: cplcomp  ! must not be optional
+         integer, intent(out)       :: rc       ! must not be optional
+       end subroutine
+     end interface
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,            intent(out), optional :: userRc
+     integer,            intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+ Call into user provided userRoutine which is responsible + for setting Component's Initialize(), Run(), and Finalize() services. + +

+The arguments are: +

+
cplcomp
+
Coupler Component. + +
+
userRoutine
+
The Component writer must supply a subroutine with the exact interface + shown above for the userRoutine argument. Arguments in userRoutine + must not be declared as optional, and the types, intent and order must match. + Prior to Fortran-2008, the subroutine must be either a module scope procedure, + or an external procedure that has a matching interface block specified for it. + An internal procedure which is contained within another procedure must not be used. + From Fortran-2008 onwards, an internal procedure contained within either a main program + or a module procedure may be used. If the internal procedure is contained within a + module procedure, it is subject to initialization requirements. See: 16.4.9 + +

+The userRoutine, when called by the framework, must make successive calls to + ESMF_CplCompSetEntryPoint() to preset callback routines for standard + Component Initialize(), Run(), and Finalize() methods. + +

+
[userRc]
+
Return code set by userRoutine before returning. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+18.4.20 ESMF_CplCompSetServices - Call user routine through name lookup, to register CplComp methods +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_CplCompSetServices()
+   recursive subroutine ESMF_CplCompSetServicesShObj(cplcomp, userRoutine, &
+     sharedObj, userRoutineFound, userRc, rc)
+
ARGUMENTS: +
     type(ESMF_CplComp),  intent(inout)         :: cplcomp
+     character(len=*),    intent(in)            :: userRoutine
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     character(len=*),    intent(in),  optional :: sharedObj
+     logical,             intent(out), optional :: userRoutineFound
+     integer,             intent(out), optional :: userRc
+     integer,             intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    6.3.0r
    +
    Added argument userRoutineFound. + The new argument provides a way to test availability without + causing error conditions. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+ Call into a user provided routine which is responsible for setting + Component's Initialize(), Run(), and Finalize() services. The named + userRoutine must exist in the executable, or in the shared object + specified by sharedObj. In the latter case all of the platform + specific details about dynamic linking and loading apply. + +

+The arguments are: +

+
cplcomp
+
Coupler Component. + +
+
userRoutine
+
Name of routine to be called, specified as a character string. + The Component writer must supply a subroutine with the exact interface + shown for userRoutine below. Arguments must not be declared + as optional, and the types, intent and order must match. + Prior to Fortran-2008, the subroutine must be either a module scope procedure, + or an external procedure that has a matching interface block specified for it. + An internal procedure which is contained within another procedure must not be used. + From Fortran-2008 onwards, an internal procedure contained within either a main program + or a module procedure may be used. If the internal procedure is contained within a + module procedure, it is subject to initialization requirements. See: 16.4.9 + +

+ +

+
+INTERFACE: +

       interface
+         subroutine userRoutine(cplcomp, rc)
+           type(ESMF_CplComp)   :: cplcomp    ! must not be optional
+           integer, intent(out) :: rc         ! must not be optional
+         end subroutine
+       end interface
+
+DESCRIPTION: +
+ +

+The userRoutine, when called by the framework, must make successive + calls to ESMF_CplCompSetEntryPoint() to preset callback routines for + standard Component Initialize(), Run(), and Finalize() methods. + +

+
[sharedObj]
+
Name of shared object that contains userRoutine. The asterisk + character (*) is supported as a wildcard for the file name suffix. + When present, the asterisk is replaced by "so", "dylib", and "dll", in this + order, and the first successfully loaded object is used to search for + userRoutine. + If the sharedObj argument is not provided, the executable itself is + searched for userRoutine. + +
+
[userRoutineFound]
+
Report back whether the specified userRoutine was found and executed, + or was not available. If this argument is present, not finding the + userRoutine will not result in returning an error in rc. + The default is to return an error if the userRoutine cannot be found. + +
+
[userRc]
+
Return code set by userRoutine before returning. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+18.4.21 ESMF_CplCompSetServices - Set to serve as Dual Component for an Actual Component +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_CplCompSetServices()
+   recursive subroutine ESMF_CplCompSetServicesComp(cplcomp, &
+     actualCplcomp, rc)
+
ARGUMENTS: +
     type(ESMF_CplComp), intent(inout)         :: cplcomp
+     type(ESMF_CplComp), intent(in)            :: actualCplcomp
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,            intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Set the services of a Coupler Component to serve a "dual" Component for an + "actual" Component. The component tunnel is VM based. + +

+The arguments are: +

+
cplcomp
+
Dual Coupler Component. + +
+
actualCplcomp
+
Actual Coupler Component. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+18.4.22 ESMF_CplCompSetServices - Set to serve as Dual Component for an Actual Component through sockets +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_CplCompSetServices()
+   recursive subroutine ESMF_CplCompSetServicesSock(cplcomp, port, &
+     server, timeout, timeoutFlag, rc)
+
ARGUMENTS: +
     type(ESMF_CplComp), intent(inout)         :: cplcomp
+     integer,            intent(in)            :: port
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     character(len=*),   intent(in),  optional :: server
+     integer,            intent(in),  optional :: timeout
+     logical,            intent(out), optional :: timeoutFlag
+     integer,            intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Set the services of a Coupler Component to serve a "dual" Component for an + "actual" Component. The component tunnel is socket based. + +

+The arguments are: +

+
cplcomp
+
Dual Coupler Component. + +
+
port
+
Port number under which the actual component is being served. The valid + port range is [1024, 65535]. + +
+
[server]
+
Server name where the actual component is being served. The default, i.e. + if the server argument was not provided, is localhost. + +
+
[timeout]
+
The maximum period in seconds that this call will wait in communications + with the actual component, before returning with a timeout condition. + The default is 3600, i.e. 1 hour. + +
+
[timeoutFlag]
+
Returns .true. if the timeout was reached, .false. otherwise. + If timeoutFlag was not provided, a timeout condition will lead + to a return code of rc \= ESMF_SUCCESS. Otherwise the + return value of timeoutFlag is the sole indicator of a timeout + condition. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+18.4.23 ESMF_CplCompSetVM - Call user routine to set CplComp VM properties +

+ +

+ +

+
+INTERFACE: +

   recursive subroutine ESMF_CplCompSetVM(cplcomp, userRoutine, &
+     userRc, rc)
+
ARGUMENTS: +
     type(ESMF_CplComp), intent(inout)         :: cplcomp
+     interface
+       subroutine userRoutine(cplcomp, rc)
+         use ESMF_CompMod
+         implicit none
+         type(ESMF_CplComp)         :: cplcomp  ! must not be optional
+         integer, intent(out)       :: rc       ! must not be optional
+       end subroutine
+     end interface
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,            intent(out), optional :: userRc
+     integer,            intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Optionally call into user provided userRoutine which is responsible + for setting Component's VM properties. + +

+The arguments are: +

+
cplcomp
+
Coupler Component. + +
+
userRoutine
+
The Component writer must supply a subroutine with the exact interface + shown above for the userRoutine argument. Arguments in userRoutine + must not be declared as optional, and the types, intent and order must match. + Prior to Fortran-2008, the subroutine must be either a module scope procedure, + or an external procedure that has a matching interface block specified for it. + An internal procedure which is contained within another procedure must not be used. + From Fortran-2008 onwards, an internal procedure contained within either a main program + or a module procedure may be used. If the internal procedure is contained within a + module procedure, it is subject to initialization requirements. See: 16.4.9 + +

+The subroutine, when called by the framework, is expected to use any of the + ESMF_CplCompSetVMxxx() methods to set the properties of the VM + associated with the Coupler Component. + +

+
[userRc]
+
Return code set by userRoutine before returning. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+18.4.24 ESMF_CplCompSetVM - Call user routine through name lookup, to set CplComp VM properties +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_CplCompSetVM()
+   recursive subroutine ESMF_CplCompSetVMShObj(cplcomp, userRoutine, &
+     sharedObj, userRoutineFound, userRc, rc)
+
ARGUMENTS: +
     type(ESMF_CplComp),  intent(inout)         :: cplcomp
+     character(len=*),    intent(in)            :: userRoutine
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     character(len=*),    intent(in),  optional :: sharedObj
+     logical,             intent(out), optional :: userRoutineFound
+     integer,             intent(out), optional :: userRc
+     integer,             intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    8.4.0
    +
    Added argument userRoutineFound. + The new argument provides a way to test availability without + causing error conditions. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Optionally call into user provided userRoutine which is responsible + for setting Component's VM properties. The named + userRoutine must exist in the executable, or in the shared object + specified by sharedObj. In the latter case all of the platform + specific details about dynamic linking and loading apply. + +

+The arguments are: +

+
cplcomp
+
Coupler Component. + +
+
userRoutine
+
Routine to be called, specified as a character string. + The Component writer must supply a subroutine with the exact interface + shown for userRoutine below. Arguments must not be declared + as optional, and the types, intent and order must match. + Prior to Fortran-2008, the subroutine must be either a module scope procedure, + or an external procedure that has a matching interface block specified for it. + An internal procedure which is contained within another procedure must not be used. + From Fortran-2008 onwards, an internal procedure contained within either a main program + or a module procedure may be used. If the internal procedure is contained within a + module procedure, it is subject to initialization requirements. See: 16.4.9 + +

+ +

+
+INTERFACE: +

       interface
+         subroutine userRoutine(cplcomp, rc)
+           type(ESMF_CplComp)   :: cplcomp     ! must not be optional
+           integer, intent(out) :: rc          ! must not be optional
+         end subroutine
+       end interface
+
+DESCRIPTION: +
+ +

+The subroutine, when called by the framework, is expected to use any of the + ESMF_CplCompSetVMxxx() methods to set the properties of the VM + associated with the Coupler Component. + +

+
[sharedObj]
+
Name of shared object that contains userRoutine. The asterisk + character (*) is supported as a wildcard for the file name suffix. + When present, the asterisk is replaced by "so", "dylib", and "dll", in this + order, and the first successfully loaded object is used to search for + userRoutine. + If the sharedObj argument is not provided, the executable itself is + searched for userRoutine. + +
+
[userRoutineFound]
+
Report back whether the specified userRoutine was found and executed, + or was not available. If this argument is present, not finding the + userRoutine will not result in returning an error in rc. + The default is to return an error if the userRoutine cannot be found. + +
+
[userRc]
+
Return code set by userRoutine before returning. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+18.4.25 ESMF_CplCompSetVMMaxPEs - Associate PEs with PETs in CplComp VM +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_CplCompSetVMMaxPEs(cplcomp, &
+     maxPeCountPerPet, prefIntraProcess, prefIntraSsi, prefInterSsi, &
+     pthreadMinStackSize, forceChildPthreads, rc)
+
ARGUMENTS: +
     type(ESMF_CplComp),  intent(inout)         :: cplcomp
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,             intent(in),  optional :: maxPeCountPerPet
+     integer,             intent(in),  optional :: prefIntraProcess
+     integer,             intent(in),  optional :: prefIntraSsi
+     integer,             intent(in),  optional :: prefInterSsi
+     integer,             intent(in),  optional :: pthreadMinStackSize
+     logical,             intent(in),  optional :: forceChildPthreads
+     integer,             intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Set characteristics of the ESMF_VM for this ESMF_CplComp. + Attempts to associate up to maxPeCountPerPet PEs with each PET. Only + PEs that are located on the same single system image (SSI) can be associated + with the same PET. Within this constraint the call tries to get as close as + possible to the number specified by maxPeCountPerPet. + +

+The other constraint to this call is that the number of PEs is preserved. + This means that the child Component in the end is associated with as many + PEs as the parent Component provided to the child. The number of child PETs + however is adjusted according to the above rule. + +

+The typical use of ESMF_CplCompSetVMMaxPEs() is to allocate + multiple PEs per PET in a Component for user-level threading, e.g. OpenMP. + +

+The arguments are: +

+
cplcomp
+
ESMF_CplComp to set the ESMF_VM for. + +
+
[maxPeCountPerPet]
+
Maximum number of PEs on each PET. + Default for each SSI is the local number of PEs. + +
+
[prefIntraProcess]
+
Communication preference within a single process. + Currently options not documented. Use default. + +
+
[prefIntraSsi]
+
Communication preference within a single system image (SSI). + Currently options not documented. Use default. + +
+
[prefInterSsi]
+
Communication preference between different single system images (SSIs). + Currently options not documented. Use default. + +
+
[pthreadMinStackSize]
+
Minimum stack size in byte of any child PET executing as Pthread. By default + single threaded child PETs do not execute as Pthread, and their stack + size is unaffected by this argument. However, for multi-threaded child PETs, + or if forceChildPthreads is .true., child PETs execute + as Pthreads with their own private stack. + +

+For cases where OpenMP threads + are used by the user code, each thread allocates its own private stack. For + all threads other than the master, the stack size is set via the + typical OMP_STACKSIZE environment variable mechanism. The PET itself, + however, becomes the master of the OpenMP thread team, and is not + affected by OMP_STACKSIZE. It is the master's stack that can be + sized via the pthreadMinStackSize argument, and a large enough size + is often critical. + +

+When pthreadMinStackSize + is absent, the default is to use the system default + set by the limit or ulimit command. However, the stack of a + Pthread cannot be unlimited, and a shell stacksize setting of + unlimited, or any setting below the ESMF implemented minimum, + will result in setting the stack size to 20MiB (the ESMF minimum). + Depending on how much private data is used by the user code under + the master thread, the default might be too small, and + pthreadMinStackSize must be used to allocate sufficient stack space. + +

+
[forceChildPthreads]
+
For .true., force each child PET to execute in its own Pthread. + By default, .false., single PETs spawned from a parent PET + execute in the same thread (or MPI process) as the parent PET. Multiple + child PETs spawned by the same parent PET always execute as their own + Pthreads. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+18.4.26 ESMF_CplCompSetVMMaxThreads - Set multi-threaded PETs in CplComp VM +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_CplCompSetVMMaxThreads(cplcomp, &
+     maxPetCountPerVas, prefIntraProcess, prefIntraSsi, prefInterSsi, &
+     pthreadMinStackSize, forceChildPthreads, rc)
+
ARGUMENTS: +
     type(ESMF_CplComp),  intent(inout)         :: cplcomp
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,             intent(in),  optional :: maxPetCountPerVas
+     integer,             intent(in),  optional :: prefIntraProcess
+     integer,             intent(in),  optional :: prefIntraSsi
+     integer,             intent(in),  optional :: prefInterSsi
+     integer,             intent(in),  optional :: pthreadMinStackSize
+     logical,             intent(in),  optional :: forceChildPthreads
+     integer,             intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Set characteristics of the ESMF_VM for this ESMF_CplComp. + Attempts to provide maxPetCountPerVas threaded PETs in each + virtual address space (VAS). Only as many threaded PETs as there are PEs + located on the single system image (SSI) can be associated with the VAS. + Within this constraint the call tries to get as close as possible to the + number specified by maxPetCountPerVas. + +

+The other constraint to this call is that the number of PETs is preserved. + This means that the child Component in the end is associated with as many + PETs as the parent Component provided to the child. The threading level of + the child PETs however is adjusted according to the above rule. + +

+The typical use of ESMF_CplCompSetVMMaxThreads() is to run a + Component multi-threaded with groups of PETs executing within a common + virtual address space. + +

+The arguments are: +

+
cplcomp
+
ESMF_CplComp to set the ESMF_VM for. + +
+
[maxPetCountPerVas]
+
Maximum number of threaded PETs in each virtual address space (VAS). + Default for each SSI is the local number of PEs. + +
+
[prefIntraProcess]
+
Communication preference within a single process. + Currently options not documented. Use default. + +
+
[prefIntraSsi]
+
Communication preference within a single system image (SSI). + Currently options not documented. Use default. + +
+
[prefInterSsi]
+
Communication preference between different single system images (SSIs). + Currently options not documented. Use default. + +
+
[pthreadMinStackSize]
+
Minimum stack size in byte of any child PET executing as Pthread. By default + single threaded child PETs do not execute as Pthread, and their stack + size is unaffected by this argument. However, for multi-threaded child PETs, + or if forceChildPthreads is .true., child PETs execute + as Pthreads with their own private stack. + +

+For cases where OpenMP threads + are used by the user code, each thread allocates its own private stack. For + all threads other than the master, the stack size is set via the + typical OMP_STACKSIZE environment variable mechanism. The PET itself, + however, becomes the master of the OpenMP thread team, and is not + affected by OMP_STACKSIZE. It is the master's stack that can be + sized via the pthreadMinStackSize argument, and a large enough size + is often critical. + +

+When pthreadMinStackSize + is absent, the default is to use the system default + set by the limit or ulimit command. However, the stack of a + Pthread cannot be unlimited, and a shell stacksize setting of + unlimited, or any setting below the ESMF implemented minimum, + will result in setting the stack size to 20MiB (the ESMF minimum). + Depending on how much private data is used by the user code under + the master thread, the default might be too small, and + pthreadMinStackSize must be used to allocate sufficient stack space. + +

+
[forceChildPthreads]
+
For .true., force each child PET to execute in its own Pthread. + By default, .false., single PETs spawned from a parent PET + execute in the same thread (or MPI process) as the parent PET. Multiple + child PETs spawned by the same parent PET always execute as their own + Pthreads. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+18.4.27 ESMF_CplCompSetVMMinThreads - Set a reduced threading level in CplComp VM +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_CplCompSetVMMinThreads(cplcomp, &
+     maxPeCountPerPet, prefIntraProcess, prefIntraSsi, prefInterSsi, &
+     pthreadMinStackSize, forceChildPthreads, rc)
+
ARGUMENTS: +
     type(ESMF_CplComp),  intent(inout)         :: cplcomp
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,             intent(in),  optional :: maxPeCountPerPet
+     integer,             intent(in),  optional :: prefIntraProcess
+     integer,             intent(in),  optional :: prefIntraSsi
+     integer,             intent(in),  optional :: prefInterSsi
+     integer,             intent(in),  optional :: pthreadMinStackSize
+     logical,             intent(in),  optional :: forceChildPthreads
+     integer,             intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Set characteristics of the ESMF_VM for this ESMF_CplComp. + Reduces the number of threaded PETs in each VAS. The max argument + may be specified to limit the maximum number of PEs that a single PET + can be associated with. + +

+Several constraints apply: 1) the number of PEs cannot change, 2) PEs + cannot migrate between single system images (SSIs), 3) the number of PETs + cannot increase, only decrease, 4) PETs cannot migrate between virtual + address spaces (VASs), nor can VASs migrate between SSIs. + +

+The typical use of ESMF_CplCompSetVMMinThreads() is to run a + Component across a set of single-threaded PETs. + +

+The arguments are: +

+
cplcomp
+
ESMF_CplComp to set the ESMF_VM for. + +
+
[maxPeCountPerPet]
+
Maximum number of PEs on each PET. + Default for each SSI is the local number of PEs. + +
+
[prefIntraProcess]
+
Communication preference within a single process. + Currently options not documented. Use default. + +
+
[prefIntraSsi]
+
Communication preference within a single system image (SSI). + Currently options not documented. Use default. + +
+
[prefInterSsi]
+
Communication preference between different single system images (SSIs). + Currently options not documented. Use default. + +
+
[pthreadMinStackSize]
+
Minimum stack size in byte of any child PET executing as Pthread. By default + single threaded child PETs do not execute as Pthread, and their stack + size is unaffected by this argument. However, for multi-threaded child PETs, + or if forceChildPthreads is .true., child PETs execute + as Pthreads with their own private stack. + +

+For cases where OpenMP threads + are used by the user code, each thread allocates its own private stack. For + all threads other than the master, the stack size is set via the + typical OMP_STACKSIZE environment variable mechanism. The PET itself, + however, becomes the master of the OpenMP thread team, and is not + affected by OMP_STACKSIZE. It is the master's stack that can be + sized via the pthreadMinStackSize argument, and a large enough size + is often critical. + +

+When pthreadMinStackSize + is absent, the default is to use the system default + set by the limit or ulimit command. However, the stack of a + Pthread cannot be unlimited, and a shell stacksize setting of + unlimited, or any setting below the ESMF implemented minimum, + will result in setting the stack size to 20MiB (the ESMF minimum). + Depending on how much private data is used by the user code under + the master thread, the default might be too small, and + pthreadMinStackSize must be used to allocate sufficient stack space. + +

+
[forceChildPthreads]
+
For .true., force each child PET to execute in its own Pthread. + By default, .false., single PETs spawned from a parent PET + execute in the same thread (or MPI process) as the parent PET. Multiple + child PETs spawned by the same parent PET always execute as their own + Pthreads. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+18.4.28 ESMF_CplCompValidate - Ensure the CplComp is internally consistent +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_CplCompValidate(cplcomp, rc)
+
ARGUMENTS: +
     type(ESMF_CplComp), intent(in)            :: cplcomp
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,            intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Currently all this method does is to check that the cplcomp + was created. + +

+The arguments are: +

+
cplcomp
+
ESMF_CplComp to validate. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+18.4.29 ESMF_CplCompWait - Wait for a CplComp to return +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_CplCompWait(cplcomp, syncflag, &
+     timeout, timeoutFlag, userRc, rc)
+
ARGUMENTS: +
     type(ESMF_CplComp),   intent(inout)         :: cplcomp
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     type(ESMF_Sync_Flag), intent(in),  optional :: syncflag
+     integer,              intent(in),  optional :: timeout
+     logical,              intent(out), optional :: timeoutFlag
+     integer,              intent(out), optional :: userRc
+     integer,              intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    5.3.0
    +
    Added argument timeout. + Added argument timeoutFlag. + The new arguments provide access to the fault-tolerant component + features. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+When executing asynchronously, wait for an ESMF_CplComp to return. + +

+The arguments are: +

+
cplcomp
+
ESMF_CplComp to wait for. + +
+
[syncflag]
+
Blocking behavior of this method call. See section 54.59 + for a list of valid blocking options. Default option is + ESMF_SYNC_VASBLOCKING which blocks PETs and their spawned off threads + across each VAS but does not synchronize PETs that run in different VASs. + +
+
[timeout]
+
The maximum period in seconds the actual component is allowed to execute + a previously invoked component method before it must communicate back to + the dual component. If the actual component does not communicate back in + the specified time, a timeout condition is raised on the dual side (this + side). The default is 3600, i.e. 1 hour. The timeout argument is only + supported for connected dual components. + +
+
[timeoutFlag]
+
Returns .true. if the timeout was reached, .false. otherwise. + If timeoutFlag was not provided, a timeout condition will lead + to a return code of rc \= ESMF_SUCCESS. Otherwise the + return value of timeoutFlag is the sole indicator of a timeout + condition. + +
+
[userRc]
+
Return code set by userRoutine before returning. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+18.4.30 ESMF_CplCompWriteRestart - Call the CplComp's write restart routine +

+ +

+ +

+
+INTERFACE: +

   recursive subroutine ESMF_CplCompWriteRestart(cplcomp, &
+     importState, exportState, clock, syncflag, phase, timeout, timeoutFlag, &
+     userRc, rc)
+
ARGUMENTS: +
     type(ESMF_CplComp),   intent(inout)           :: cplcomp
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     type(ESMF_State),     intent(inout), optional :: importState
+     type(ESMF_State),     intent(inout), optional :: exportState
+     type(ESMF_Clock),     intent(inout), optional :: clock
+     type(ESMF_Sync_Flag), intent(in),    optional :: syncflag
+     integer,              intent(in),    optional :: phase
+     integer,              intent(in),    optional :: timeout
+     logical,              intent(out),   optional :: timeoutFlag
+     integer,              intent(out),   optional :: userRc
+     integer,              intent(out),   optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    5.3.0
    +
    Added argument timeout. + Added argument timeoutFlag. + The new arguments provide access to the fault-tolerant component + features. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Call the associated user write restart routine for + an ESMF_CplComp. + +

+The arguments are: +

+
cplcomp
+
ESMF_CplComp to call run routine for. + +
+
[importState]
+
ESMF_State containing import data. If not present, a dummy + argument will be passed to the user-supplied routine. The + importState argument in the user code cannot be optional. + +
+
[exportState]
+
ESMF_State containing export data. If not present, a dummy + argument will be passed to the user-supplied routine. The + exportState argument in the user code cannot be optional. + +
+
[clock]
+
External ESMF_Clock for passing in time information. + This is generally the parent component's clock, and will be treated + as read-only by the child component. The child component can maintain + a private clock for its own internal time computations. If not present, a dummy + argument will be passed to the user-supplied routine. The + clock argument in the user code cannot be optional. + +
+
[syncflag]
+
Blocking behavior of this method call. See section 54.59 + for a list of valid blocking options. Default option is + ESMF_SYNC_VASBLOCKING which blocks PETs and their spawned off threads + across each VAS but does not synchronize PETs that run in different VASs. + +
+
[phase]
+
Component providers must document whether each of their + routines are single-phase or multi-phase. + Single-phase routines require only one invocation to complete + their work. + Multi-phase routines provide multiple subroutines to accomplish + the work, accommodating components which must complete part of their + work, return to the caller and allow other processing to occur, + and then continue the original operation. + For multiple-phase child components, this is the integer phase + number to be invoked. + For single-phase child components this argument is optional. The default is + 1. + +
+
[timeout]
+
The maximum period in seconds that this call will wait in communications + with the actual component, before returning with a timeout condition. + The default is 3600, i.e. 1 hour. The timeout argument is only + supported for connected dual components. + +
+
[timeoutFlag]
+
Returns .true. if the timeout was reached, .false. otherwise. + If timeoutFlag was not provided, a timeout condition will lead + to a return code of rc \= ESMF_SUCCESS. Otherwise the + return value of timeoutFlag is the sole indicator of a timeout + condition. + +
+
[userRc]
+
Return code set by userRoutine before returning. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ + +

+19 SciComp Class +

+ +

+19.1 Description +

+ +

+ +

+In Earth system modeling, a particular piece of code representing a physical +domain, such as an atmospheric model or an ocean model, is typically +implemented as an ESMF Gridded Component, or ESMC_GridComp. +However, there are times when physical domains, or realms, need to be +represented, but aren't actual pieces of code, or software. These domains +can be implemented as ESMF Science Components, or ESMC_SciComp. + +

+Unlike Gridded and Coupler Components, Science Components are not associated +with software; they don't include execution routines such as initialize, +run and finalize. The main purpose of a Science Component +is to provide a container for Attributes within a Component hierarchy. + +

+19.2 Use and Examples +

+ +

+A Science Component is a container object intended to represent scientific +domains, or realms, in an Earth Science Model. It's primary purpose is to +provide a means for representing Component metadata within a hierarchy of +Components, and it does this by being a container for Attributes as well +as other Components. + +

+ +

+ +

+ +

+ +
+19.2.1 Use ESMF_SciComp and Attach Attributes +

+ +

+This example illustrates the use of the ESMF_SciComp to attach Attributes + within a Component hierarchy. The hierarchy includes Coupler, Gridded, + and Science Components and Attributes are attached to the Science Components. + For demonstrable purposes, we'll add some CIM Component attributes to + the Gridded Component. + +

+Create the top 2 levels of the Component hierarchy. This example creates + a parent Coupler Component and 2 Gridded Components as children. + +

+

+      ! Create top-level Coupler Component
+      cplcomp = ESMF_CplCompCreate(name="coupler_component", rc=rc)
+
+      ! Create Gridded Component for Atmosphere
+      atmcomp = ESMF_GridCompCreate(name="Atmosphere", rc=rc)
+
+      ! Create Gridded Component for Ocean
+      ocncomp = ESMF_GridCompCreate(name="Ocean", rc=rc)
+
+ +

+Now add CIM Attribute packages to the Component. Also, add + a CIM Component Properties package, to contain two custom attributes. + +

+

+      convCIM = 'CIM 1.5'
+      purpComp = 'ModelComp'
+      purpProp = 'CompProp'
+      purpField = 'Inputs'
+      purpPlatform = 'Platform'
+
+      convISO = 'ISO 19115'
+      purpRP = 'RespParty'
+      purpCitation = 'Citation'
+
+      ! Add CIM Attribute package to the Science Component
+      call ESMF_AttributeAdd(atmcomp, convention=convCIM, &
+        purpose=purpComp, attpack=attpack, rc=rc)
+
+ +

+The Attribute package can also be retrieved in a multi-Component + setting like this: + +

+

+      call ESMF_AttributeGetAttPack(atmcomp, convCIM, purpComp, &
+                                    attpack=attpack, rc=rc)
+
+ +

+Now, add some CIM Component attributes to the Atmosphere Grid Component. + +

+

+      !
+      ! Top-level model component attributes, set on gridded component
+      !
+      call ESMF_AttributeSet(atmcomp, 'ShortName', 'EarthSys_Atmos', &
+        attpack=attpack, rc=rc)
+
+ +

+

+      call ESMF_AttributeSet(atmcomp, 'LongName', &
+        'Earth System High Resolution Global Atmosphere Model', &
+        attpack=attpack, rc=rc)
+
+ +

+

+      call ESMF_AttributeSet(atmcomp, 'Description', &
+        'EarthSys brings together expertise from the global ' // &
+        'community in a concerted effort to develop coupled ' // &
+        'climate models with increased horizontal resolutions.  ' // &
+        'Increasing the horizontal resolution of coupled climate ' // &
+        'models will allow us to capture climate processes and ' // &
+        'weather systems in much greater detail.', &
+        attpack=attpack, rc=rc)
+
+ +

+

+      call ESMF_AttributeSet(atmcomp, 'Version', '2.0', &
+        attpack=attpack, rc=rc)
+
+ +

+

+      call ESMF_AttributeSet(atmcomp, 'ReleaseDate', '2009-01-01T00:00:00Z', &
+        attpack=attpack, rc=rc)
+
+ +

+

+      call ESMF_AttributeSet(atmcomp, 'ModelType', 'aerosol', &
+        attpack=attpack, rc=rc)
+
+ +

+

+      call ESMF_AttributeSet(atmcomp, 'URL', &
+        'www.earthsys.org', attpack=attpack, rc=rc)
+
+ +

+Now create a set of Science Components as a children of the Atmosphere + Gridded Component. The hierarchy is as follows: + +

    +
  • Atmosphere + +
      +
    • AtmosDynamicalCore + +
        +
      • AtmosAdvection + +
      • +
      +
    • +
    • AtmosRadiation + +
    • +
    +
  • +
+ After each Component is created, we need to link it with its parent + Component. We then add some standard CIM Component properties as well + as Scientific Properties to each of these components. + +

+

+    !
+    ! Atmosphere Dynamical Core Science Component
+    !
+    dc_scicomp = ESMF_SciCompCreate(name="AtmosDynamicalCore", rc=rc)
+
+ +

+

+    call ESMF_AttributeAdd(dc_scicomp,  &
+                           convention=convCIM, purpose=purpComp, &
+                           attpack=attpack, rc=rc)
+
+    call ESMF_AttributeSet(dc_scicomp, "ShortName", "AtmosDynamicalCore", &
+                           attpack=attpack, rc=rc)
+    call ESMF_AttributeSet(dc_scicomp, "LongName", &
+                           "Atmosphere Dynamical Core", &
+                           attpack=attpack, rc=rc)
+
+ +

+

+    purpSci = 'SciProp'
+
+    dc_sciPropAtt(1) = 'TopBoundaryCondition'
+    dc_sciPropAtt(2) = 'HeatTreatmentAtTop'
+    dc_sciPropAtt(3) = 'WindTreatmentAtTop'
+
+    call ESMF_AttributeAdd(dc_scicomp,  &
+                           convention=convCIM, purpose=purpSci, &
+                           attrList=dc_sciPropAtt, &
+                           attpack=attpack, rc=rc)
+
+    call ESMF_AttributeSet(dc_scicomp, 'TopBoundaryCondition', &
+                           'radiation boundary condition', &
+                           attpack=attpack, rc=rc)
+    call ESMF_AttributeSet(dc_scicomp, 'HeatTreatmentAtTop', &
+                           'some heat treatment', &
+                           attpack=attpack, rc=rc)
+    call ESMF_AttributeSet(dc_scicomp, 'WindTreatmentAtTop', &
+                           'some wind treatment', &
+                           attpack=attpack, rc=rc)
+
+ +

+

+    !
+    ! Atmosphere Advection Science Component
+    !
+    adv_scicomp = ESMF_SciCompCreate(name="AtmosAdvection", rc=rc)
+
+ +

+

+    call ESMF_AttributeAdd(adv_scicomp,  &
+                           convention=convCIM, purpose=purpComp, &
+                           attpack=attpack, rc=rc)
+
+    call ESMF_AttributeSet(adv_scicomp, "ShortName", "AtmosAdvection", &
+                           attpack=attpack, rc=rc)
+    call ESMF_AttributeSet(adv_scicomp, "LongName", "Atmosphere Advection", &
+                           attpack=attpack, rc=rc)
+
+ +

+

+    adv_sciPropAtt(1) = 'TracersSchemeName'
+    adv_sciPropAtt(2) = 'TracersSchemeCharacteristics'
+    adv_sciPropAtt(3) = 'MomentumSchemeName'
+
+    call ESMF_AttributeAdd(adv_scicomp,  &
+                           convention=convCIM, purpose=purpSci, &
+                           attrList=adv_sciPropAtt, &
+                           attpack=attpack, rc=rc)
+
+    call ESMF_AttributeSet(adv_scicomp, 'TracersSchemeName', 'Prather', &
+                           attpack=attpack, rc=rc)
+    call ESMF_AttributeSet(adv_scicomp, 'TracersSchemeCharacteristics', &
+                           'modified Euler', &
+                           attpack=attpack, rc=rc)
+    call ESMF_AttributeSet(adv_scicomp, 'MomentumSchemeName', 'Van Leer', &
+                           attpack=attpack, rc=rc)
+
+ +

+

+    !
+    ! Atmosphere Radiation Science Component
+    !
+    rad_scicomp = ESMF_SciCompCreate(name="AtmosRadiation", rc=rc)
+
+ +

+

+    call ESMF_AttributeAdd(rad_scicomp,  &
+                           convention=convCIM, purpose=purpComp, &
+                           attpack=attpack, rc=rc)
+
+    call ESMF_AttributeSet(rad_scicomp, "ShortName", "AtmosRadiation", &
+                           attpack=attpack, rc=rc)
+    call ESMF_AttributeSet(rad_scicomp, "LongName", &
+                           "Atmosphere Radiation", &
+                           attpack=attpack, rc=rc)
+
+ +

+

+    rad_sciPropAtt(1) = 'LongwaveSchemeType'
+    rad_sciPropAtt(2) = 'LongwaveSchemeMethod'
+
+    call ESMF_AttributeAdd(rad_scicomp,  &
+                           convention=convCIM, purpose=purpSci, &
+                           attrList=rad_sciPropAtt, &
+                           attpack=attpack, rc=rc)
+
+    call ESMF_AttributeSet(rad_scicomp, &
+                           'LongwaveSchemeType', &
+                           'wide-band model', &
+                           attpack=attpack, rc=rc)
+    call ESMF_AttributeSet(rad_scicomp, &
+                           'LongwaveSchemeMethod', &
+                           'two-stream', &
+                           attpack=attpack, rc=rc)
+
+ +

+Finally, destroy all of the Components. + +

+

+      call ESMF_SciCompDestroy(rad_scicomp, rc=rc)
+      call ESMF_SciCompDestroy(adv_scicomp, rc=rc)
+      call ESMF_SciCompDestroy(dc_scicomp, rc=rc)
+      call ESMF_GridCompDestroy(atmcomp, rc=rc)
+      call ESMF_GridCompDestroy(ocncomp, rc=rc)
+      call ESMF_CplCompDestroy(cplcomp, rc=rc)
+
+ +

+ + +

+19.3 Restrictions and Future Work +

+ +

+ +

    +
  1. None. + +

    +

  2. +
+ +

+19.4 Class API +

+ +

+ +

+ +

+ +

+19.4.1 ESMF_SciCompAssignment(=) - SciComp assignment +

+ +

+ +

+
+INTERFACE: +

     interface assignment(=)
+     scicomp1 = scicomp2
+
ARGUMENTS: +
     type(ESMF_SciComp) :: scicomp1
+     type(ESMF_SciComp) :: scicomp2
+
+DESCRIPTION: +
+ +

+Assign scicomp1 as an alias to the same ESMF SciComp object in memory + as scicomp2. If scicomp2 is invalid, then scicomp1 will be equally + invalid after the assignment. + +

+The arguments are: +

+
scicomp1
+
The ESMF_SciComp object on the left hand side of the assignment. + +
+
scicomp2
+
The ESMF_SciComp object on the right hand side of the assignment. + +
+
+ +

+ +

+ +

+19.4.2 ESMF_SciCompOperator(==) - SciComp equality operator +

+ +

+ +

+
+INTERFACE: +

   interface operator(==)
+     if (scicomp1 == scicomp2) then ... endif
+               OR
+     result = (scicomp1 == scicomp2)
+
RETURN VALUE: +
     logical :: result
+
ARGUMENTS: +
     type(ESMF_SciComp), intent(in) :: scicomp1
+     type(ESMF_SciComp), intent(in) :: scicomp2
+
+DESCRIPTION: +
+ +

+Test whether scicomp1 and scicomp2 are valid aliases to the same ESMF + SciComp object in memory. For a more general comparison of two ESMF + SciComps, going beyond the simple alias test, the ESMF_SciCompMatch() + function (not yet implemented) must be used. + +

+The arguments are: +

+
scicomp1
+
The ESMF_SciComp object on the left hand side of the equality + operation. + +
+
scicomp2
+
The ESMF_SciComp object on the right hand side of the equality + operation. + +
+
+ +

+ +

+ +

+19.4.3 ESMF_SciCompOperator(/=) - SciComp not equal operator +

+ +

+ +

+
+INTERFACE: +

   interface operator(/=)
+     if (scicomp1 /= scicomp2) then ... endif
+               OR
+     result = (scicomp1 /= scicomp2)
+
RETURN VALUE: +
     logical :: result
+
ARGUMENTS: +
     type(ESMF_SciComp), intent(in) :: scicomp1
+     type(ESMF_SciComp), intent(in) :: scicomp2
+
+DESCRIPTION: +
+ +

+Test whether scicomp1 and scicomp2 are not valid aliases to the + same ESMF SciComp object in memory. For a more general comparison of two + ESMF SciComps, going beyond the simple alias test, the ESMF_SciCompMatch() + function (not yet implemented) must be used. + +

+The arguments are: +

+
scicomp1
+
The ESMF_SciComp object on the left hand side of the non-equality + operation. + +
+
scicomp2
+
The ESMF_SciComp object on the right hand side of the non-equality + operation. + +
+
+ +

+ +

+ +

+19.4.4 ESMF_SciCompCreate - Create a SciComp +

+ +

+ +

+
+INTERFACE: +

   recursive function ESMF_SciCompCreate(name, rc)
+
RETURN VALUE: +
     type(ESMF_SciComp) :: ESMF_SciCompCreate
+
ARGUMENTS: +
 -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     character(len=*),        intent(in),    optional :: name
+     integer,                 intent(out),   optional :: rc
+
+DESCRIPTION: +
+ +

+This interface creates an ESMF_SciComp object. + The return value is the new ESMF_SciComp. + +

+The arguments are: +

+
[name]
+
Name of the newly-created ESMF_SciComp. This name can be altered + from within the ESMF_SciComp code once the initialization routine + is called. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+19.4.5 ESMF_SciCompDestroy - Release resources associated with a SciComp +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_SciCompDestroy(scicomp, rc)
+
ARGUMENTS: +
     type(ESMF_SciComp), intent(inout)           :: scicomp
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,             intent(out),  optional :: rc
+
+DESCRIPTION: +
+ +

+Destroys an ESMF_SciComp, releasing the resources associated + with the object. + +

+The arguments are: +

+
scicomp
+
Release all resources associated with this ESMF_SciComp + and mark the object as invalid. It is an error to pass this + object into any other routines after being destroyed. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+19.4.6 ESMF_SciCompGet - Get SciComp information +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_SciCompGet(scicomp, name, rc)
+
ARGUMENTS: +
     type(ESMF_SciComp),       intent(in)            :: scicomp
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     character(len=*),         intent(out), optional :: name
+     integer,                  intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Get information about an ESMF_SciComp object. + +

+The arguments are: +

+
scicomp
+
The ESMF_SciComp object being queried. + +
+
[name]
+
Return the name of the ESMF_SciComp. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+19.4.7 ESMF_SciCompIsCreated - Check whether a SciComp object has been created +

+ +

+ +

+
+INTERFACE: +

   function ESMF_SciCompIsCreated(scicomp, rc)
+
RETURN VALUE: +
     logical :: ESMF_SciCompIsCreated
+
ARGUMENTS: +
     type(ESMF_SciComp), intent(in)            :: scicomp
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,             intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Return .true. if the scicomp has been created. Otherwise return + .false.. If an error occurs, i.e. rc /= ESMF_SUCCESS is + returned, the return value of the function will also be .false.. + +

+The arguments are: +

+
scicomp
+
ESMF_SciComp queried. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+19.4.8 ESMF_SciCompPrint - Print SciComp information +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_SciCompPrint(scicomp, rc)
+
ARGUMENTS: +
     type(ESMF_SciComp), intent(in)             :: scicomp
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,             intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Prints information about an ESMF_SciComp to stdout. +
+

+The arguments are: +

+
scicomp
+
ESMF_SciComp to print. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+19.4.9 ESMF_SciCompSet - Set or reset information about the SciComp +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_SciCompSet(scicomp, name, rc)
+
ARGUMENTS: +
     type(ESMF_SciComp), intent(inout)          :: scicomp
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     character(len=*),    intent(in),  optional :: name
+     integer,             intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Sets or resets information about an ESMF_SciComp. + +

+The arguments are: +

+
scicomp
+
ESMF_SciComp to change. + +
+
[name]
+
Set the name of the ESMF_SciComp. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+19.4.10 ESMF_SciCompValidate - Check validity of a SciComp +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_SciCompValidate(scicomp, rc)
+
ARGUMENTS: +
     type(ESMF_SciComp), intent(in)             :: scicomp
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,             intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Currently all this method does is to check that the scicomp + was created. + +

+The arguments are: +

+
scicomp
+
ESMF_SciComp to validate. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ + +

+20 Fault-tolerant Component Tunnel +

+ +

+20.1 Description +

+ +

+ +

+For ensemble runs with many ensemble members, fault-tolerance becomes an issue of very critical practical impact. The meaning of fault-tolerance in this context refers to the ability of an ensemble application to continue with normal execution after one or more ensemble members have experienced catastrophic conditions, from which they cannot recover. ESMF implements this type of fault-tolerance on the Component level via a timeout paradigm: A timeout parameter is specified for all interactions that need to be fault-tolerant. When a connection to a component times out, maybe because it has become inaccessible due to some catastrophic condition, the driver application can react to this condition, for example by not further interacting with the component during the otherwise normal continuation of the model execution. + +

+The fault-tolerant connection between a driver application and a Component is established through a Component Tunnel. There are two sides to a Component Tunnel: the "actual" side is where the component is actually executing, and the "dual" side is the portal through which the Component becomes accessible on the driver side. Both the actual and the dual side of a Component Tunnel are implemented in form of a regular ESMF Gridded or Coupler Component. + +

+Component Tunnels between Components can be based on a number of low level implementations. The only implementation that currently provides fault-tolerance is socket based. In this case an actual Component typically runs as a separate executable, listening to a specific port for connections from the driver application. The dual Component is created on the driver side. It connects to the actual Component during the SetServices() call. + +

+20.2 Use and Examples +

+ +

+A Component Tunnel connects a dual Component to an actual Component. This connection can be based on a number of different low level implementations, e.g. VM-based or socket-based. VM-based Component Tunnels require that both dual and actual Components run within the same application (i.e. execute under the same MPI_COMM_WORLD). Fault-tolerant Component Tunnels require that dual and actual Components run in separate applications, under different MPI_COMM_WORLD communicators. This mode is implemented in the socket-based Component Tunnels. + +

+ +

+ +

+ +

+20.2.1 Creating an actual Component +

+ +

+ +

+The creation process of an actual Gridded Component, which will become + one of the two end points of a Component Tunnel, is identical to the creation + of a regular Gridded Component. On the actual side, an actual Component is + very similar to a regular Component. Here the actual Component is created + with a custom petList. +

+

+  petList = (/0,1,2/)
+  actualComp = ESMF_GridCompCreate(petList=petList, name="actual", rc=rc)
+
+ +

+ +

+20.2.2 Creating a dual Component +

+ +

+ +

+The same way an actual Component appears as a regular Component in + the context of the actual side application, a dual Component + is created as a regular Component on the dual side. + A dual Gridded Component with custom petList is created using the + regular create call. +

+

+  petList = (/4,3,5/)
+  dualComp = ESMF_GridCompCreate(petList=petList, name="dual", rc=rc)
+
+ +

+ +

+20.2.3 Setting up the actual side of a Component Tunnel +

+ +

+ +

+After creation, the regular procedure for registering the standard Component + methods is followed for the actual Gridded Component. +

+

+  call ESMF_GridCompSetServices(actualComp, userRoutine=setservices, &
+    userRc=userRc, rc=rc)
+
+ +

+So far the actualComp object is no different from a regular Gridded + Component. In order to turn it into the actual end point of a Component + Tunnel the ServiceLoop() method is called. Here the socket-based + implementation is chosen. +

+

+  call ESMF_GridCompServiceLoop(actualComp, port=61010, timeout=20, rc=rc)
+
+ +

+This call opens the actual side of the Component Tunnel in form of a + socket-based server, listening on port 61010. The timeout argument + specifies how long the actual side will wait for the dual side + to connect, before the actual side returns with a time out condition. The + time out is set to 20 seconds. + +

+At this point, before a dual Component connects to the other side of the + Component Tunnel, it is + possible to manually connect to the waiting actual Component. This can be + useful when debugging connection issues. A convenient tool for this is the + standard telnet application. Below is a transcript of such a connection. + The manually typed commands are separate from the previous responses by a + blank line. + +

+

+   $ telnet localhost 61010
+   Trying 127.0.0.1...
+   Connected to localhost.
+   Escape character is '^]'.
+   Hello from ESMF Actual Component server!
+  
+   date
+   Tue Apr  3 21:53:03 2012
+   
+   version
+   ESMF_VERSION_STRING: 5.3.0
+
+ +

+If at any point the telnet session is manually shut down, the + ServiceLoop() on the actual side will return with an error condition. + The clean way to + disconnect the telnet session, and to have the ServiceLoop() + wait for a new connection, e.g. from a dual Component, is to send the + reconnect command. This will automatically shut down the telnet + connection. + +

+

+   reconnect
+   Actual Component server will reconnect now!
+   Connection closed by foreign host.
+   $
+
+ +

+At this point the actual Component is back in listening mode, with a time out + of 20 seconds, as specified during the ServiceLoop() call. + +

+Before moving on to the dual side of the GridComp based Component Tunnel + example, it should be pointed out that the exact same procedure is used to + set up the actual side of a CplComp based Component Tunnel. Assuming + that actualCplComp is a CplComp object for which SetServices has already + been called, the actual side uses ESMF_CplCompServiceLoop() to start + listening for connections from the dual side. + +

+

+  call ESMF_CplCompServiceLoop(actualCplComp, port=61011, timeout=2, &
+    timeoutFlag=timeoutFlag, rc=rc)
+
+ +

+Here the timeoutFlag is specified in order to prevent the expected + time-out condition to be indicated through the return code. Instead, when + timeoutFlag is present, the return code is still ESMF_SUCCESS, + but timeoutFlag is set to .true. when a time-out occurs. + +

+ +

+20.2.4 Setting up the dual side of a Component Tunnel +

+ +

+ +

+On the dual side, the dualComp object needs to be connected to the + actual Component in order to complete the Component Tunnel. Instead of + registering standard Component methods locally, a special variant of the + SetServices() call is used to connect to the actual Component. +

+

+  call ESMF_GridCompSetServices(dualComp, port=61010, server="localhost", &
+    timeout=10, timeoutFlag=timeoutFlag, rc=rc)
+
+ +

+The port and server arguments are used to connect to the desired + actual Component. The time out of 10 seconds ensures that if the actual + Component is not available, a time out condition is returned instead of + resulting in a hang. The timeoutFlag argument further absorbs the time + out condition, either returning as .true. or .false.. In this mode + the standard rc will indicate success even when a time out condition + was reached. + +

+ +

+20.2.5 Invoking standard Component methods through a Component Tunnel +

+ +

+ +

+Once a Component Tunnel is established, the actual Component is fully under + the control of the dual Component. A standard Component method invoked on the + dual Component is not executed by the dual Component itself, but by the + actual Component instead. In fact, it is the entry points registered with + the actual Component that are executed when standard methods are invoked on + the dual Component. The connected dualComp object serves as a portal + through which the connected actualComp becomes accessible on the dual + side. + +

+Typically the first standard method called is the CompInitialize() + routine. +

+

+  call ESMF_GridCompInitialize(dualComp, timeout=10, timeoutFlag=timeoutFlag, &
+    userRc=userRc, rc=rc)
+
+ +

+Again, the timeout argument serves to prevent the dual side from + hanging if the actual Component application has experienced a catastrophic + condition and is no longer available, or takes longer than expected. The + presence of the timeoutFlag allows time out conditions to be caught + gracefully, so the dual side can deal with it in an orderly fashion, instead + of triggering an application abort due to an error condition. + +

+The CompRun() and CompFinalize() methods follow the same format. + +

+

+  call ESMF_GridCompRun(dualComp, timeout=10, timeoutFlag=timeoutFlag, &
+    userRc=userRc, rc=rc)
+
+ +

+

+  call ESMF_GridCompFinalize(dualComp, timeout=10, timeoutFlag=timeoutFlag, &
+    userRc=userRc, rc=rc)
+
+ +

+ +

+20.2.6 The non-blocking option to invoke standard Component methods through a Component Tunnel +

+ +

+ +

+Standard Component methods called on a connected dual Component are executed + on the actual side, across the PETs of the actual Component. By default the + dual Component PETs are blocked until the actual Component has finished + executing the invoked Component method, or until a time out condition has been + reached. In many practical applications a more loose synchronization between + dual and actual Components is useful. Having the PETs of a dual + Component return immediately from a standard Component method allows multiple + dual Component, on the same PETs, to control multiple actual Components. + If the actual Components are executing in separate executables, or the same + executable but on exclusive sets of PETs, they can execute concurrently, even + with the controlling dual Components all running on the same PETs. + The non-blocking dual side regains control over the actual Component by + synchronizing through the CompWait() call. + +

+Any of the standard Component methods can be called in non-blocking mode + by setting the optional syncflag argument to + ESMF_SYNC_NONBLOCKING. +

+

+  call ESMF_GridCompInitialize(dualComp, syncflag=ESMF_SYNC_NONBLOCKING, rc=rc)
+
+ +

+If communication between the dual and the actual Component was successful, + this call will return immediately on all of the dual Component PETs, while the + actual Component continues to execute the invoked Component method. + However, if the dual Component has difficulties reaching the actual Component, + the call will block on all dual PETs until successful contact was made, or the + default time out (3600 seconds, i.e. 1 hour) has been reached. In most cases a + shorter time out condition is desired with the non-blocking option, as shown + below. + +

+First the dual Component must wait for the outstanding method. +

+

+  call ESMF_GridCompWait(dualComp, rc=rc)
+
+ +

+Now the same non-blocking CompInitialize() call is issued again, but this time + with an explicit 10 second time out. +

+

+  call ESMF_GridCompInitialize(dualComp, syncflag=ESMF_SYNC_NONBLOCKING, &
+    timeout=10, timeoutFlag=timeoutFlag, rc=rc)
+
+ +

+This call is guaranteed to return within 10 seconds, or less, on the dual Component + PETs, either without time out condition, indicating that the actual Component + has been contacted successfully, or with time out condition, indicating that + the actual Component was unreachable at the time. Either way, the dual + Component PETs are back under user control quickly. + +

+Calling the CompWait() method on the dual Component causes the dual Component + PETs to block until the actual Component method has returned, or a time out + condition has been reached. +

+

+  call ESMF_GridCompWait(dualComp, userRc=userRc, rc=rc)
+
+ +

+The default time out for CompWait() is 3600 seconds, i.e. 1 hour, just like + for the other Component methods. However, the semantics of a time out + condition under CompWait() is different from the other Component methods. Typically the timeout is simply the + maximum time that any communication between dual and actual Component is allowed + to take before a time out condition is raised. For CompWait(), the timeout + is the maximum time that an actual Component is allowed to execute before + reporting back to the dual Component. Here, even with the default time out, + the dual Component would return from CompWait() immediately with a time out + condition if the actual Component has already been executing for over 1 hour, + and is not already waiting to report back when the dual Component calls + CompWait(). On the other hand, if it has only been 30 minutes since + CompInitialize() was called on the dual Component, then the actual Component + still has 30 minutes before CompWait() returns with a time out condition. + During this time (or until the actual Component returns) the dual Component + PETs are blocked. + +

+A standard Component method is invoked in non-blocking mode. +

+

+  call ESMF_GridCompRun(dualComp, syncflag=ESMF_SYNC_NONBLOCKING, &
+    timeout=10, timeoutFlag=timeoutFlag, rc=rc)
+
+ +

+Once the user code on the dual side is ready to regain control over the + actual Component it calls CompWait() on the dual Component. Here a + timeout of 60s is specified, meaning that the total execution time the + actual Component spends in the registered Run() routine may not exceed 60s + before CompWait() returns with a time out condition. +

+

+  call ESMF_GridCompWait(dualComp, timeout=60, userRc=userRc, rc=rc)
+
+ +

+ +

+20.2.7 Destroying a connected dual Component +

+ +

+ +

+A dual Component that is connected to an actual Component through a Component + Tunnel is destroyed the same way a regular Component is. The only + difference is that a connected dual Component may specify a timeout + argument to the CompDestroy() call. +

+

+  call ESMF_GridCompDestroy(dualComp, timeout=10, rc=rc)
+
+ +

+The timeout argument again ensures that the dual side does not hang + indefinitely in case the actual Component has become unavailable. If the + actual Component is available, the destroy call will indicate to the actual + Component that it should break out of the ServiceLoop(). Either way, + the local dual Component is destroyed. + +

+ +

+20.2.8 Destroying a connected actual Component +

+ +

+ +

+An actual Component that is in a ServiceLoop() must first return from + that call before it can be destroyed. This can either happen when a connected + dual Component calls its CompDestroy() method, or if the + ServiceLoop() reaches the specified time out condition. Either way, + once control has been returned to the user code, the actual Component is + destroyed in the same way a regular Component is, by calling the destroy + method. +

+

+  call ESMF_GridCompDestroy(actualComp, rc=rc)
+
+ +

+ + +

+20.3 Restrictions and Future Work +

+ +

+ +

    +
  1. No data flow through States. The current implementation does not support data flow (Fields, FieldBundles, etc.) between actual and dual Components. The current work-around is to employ user controlled, file based transfer methods. The next implementation phase will offer transparent data flow through the Component Tunnel, where the user code interacts with the States on the actual and dual side in the same way as if they were the same Component. + +

    +

  2. +
+ +

+21 State Class +

+ +

+21.1 Description +

+ +

+ +

+A State contains the data and metadata to be transferred between +ESMF Components. It is an important class, because it defines a +standard for how data is represented in data transfers between Earth +science components. The +State construct is a rational compromise between a fully prescribed +interface - one that would dictate what specific fields should be +transferred between components - and an interface in which data structures +are completely ad hoc. + +

+There are two types of States, import and export. +An import State contains data that is necessary for a Gridded Component +or Coupler Component to execute, and an export State contains the data +that a Gridded Component or Coupler Component can make available. + +

+States can contain Arrays, ArrayBundles, Fields, FieldBundles, +and other States. They cannot directly contain native language arrays +(i.e. Fortran or C style arrays). Objects in a State must span +the VM on which they are running. For sequentially executing components +which run on the same set of PETs this happens by calling the object +create methods on each PET, creating the object in unison. For +concurrently executing components which are running on subsets of PETs, +an additional method, called ESMF_StateReconcile(), is provided by +ESMF to broadcast information +about objects which were created in sub-components. + +

+State methods include creation and deletion, adding and retrieving +data items, adding and retrieving attributes, and performing queries. + +

+ +

+21.2 Constants +

+ +

+ +

+ +
+21.2.1 ESMF_STATEINTENT +

+ +

+DESCRIPTION: +
+Specifies whether a ESMF_State contains data to be imported +into a component or exported from a component. + +

+The type of this flag is: + +

+type(ESMF_StateIntent_Flag) + +

+The valid values are: +

+
ESMF_STATEINTENT_IMPORT
+
Contains data to be imported into a component. + +
+
ESMF_STATEINTENT_EXPORT
+
Contains data to be exported out of a component. + +
+
ESMF_STATEINTENT_INTERNAL
+
Contains data that is not exposed outside of a component. + +
+
ESMF_STATEINTENT_UNSPECIFIED
+
The intent has not been specified. +
+
+ +

+ +

+ +
+21.2.2 ESMF_STATEITEM +

+ +

+DESCRIPTION: +
+Specifies the type of object being added to or retrieved from an +ESMF_State. + +

+The type of this flag is: + +

+type(ESMF_StateItem_Flag) + +

+The valid values are: +

+
ESMF_STATEITEM_ARRAY
+
Refers to an ESMF_Array within an ESMF_State. + +
+
ESMF_STATEITEM_ARRAYBUNDLE
+
Refers to an ESMF_Array within an ESMF_State. + +
+
ESMF_STATEITEM_FIELD
+
Refers to a ESMF_Field within an ESMF_State. + +
+
ESMF_STATEITEM_FIELDBUNDLE
+
Refers to a ESMF_FieldBundle within an ESMF_State. + +
+
ESMF_STATEITEM_ROUTEHANDLE
+
Refers to a ESMF_RouteHandle within an ESMF_State. + +
+
ESMF_STATEITEM_STATE
+
Refers to a ESMF_State within an ESMF_State. +
+
+ +

+ +

+21.3 Use and Examples +

+ +

+A Gridded Component generally has one associated import +State and one export State. Generally the States +associated with a Gridded Component will be created by +the Gridded Component's parent component. +In many cases, the States will be created containing +no data. Both the empty States and the +newly created Gridded Component are passed +by the parent component into the Gridded Component's initialize +method. This is where the States get prepared for use +and the import State is first filled with data. + +

+States can be filled with data items that do not yet +have data allocated. Fields, FieldBundles, Arrays, and ArrayBundles each have +methods that support their creation without actual data +allocation - the Grid and Attributes are set up but no +Fortran array of data values is allocated. In this approach, +when a State is passed into its associated Gridded Component's +initialize method, the incomplete Arrays, Fields, FieldBundles, +and ArrayBundles within the State can allocate or reference data +inside the initialize method. + +

+States are passed through the interfaces of the Gridded +and Coupler Components' run methods in order to carry data +between the components. While we expect +a Gridded Component's import State to be filled with data +during initialization, its export State will typically be +filled over the course of its run method. At the end of +a Gridded Component's run method, the filled export State +is passed out through the argument list into a Coupler +Component's run method. We recommend the convention that +it enters the Coupler Component as the Coupler Component's +import State. Here is it transformed into a form +that another Gridded Component requires, and passed out +of the Coupler Component as its export State. It can then +be passed into the run method of a recipient Gridded Component +as that component's import State. + +

+While the above sounds complicated, the rule is simple: +a State going into a component is an import State, and a +State leaving a component is an export State. + +

+Objects inside States are normally created in unison where +each PET executing a component makes the same object create call. +If the object contains data, like a Field, each PET may have a +different local chunk of the entire dataset but each Field has +the same name and is logically one part of a single distributed +object. As States are passed between components, if any object +in a State was not created in unison on all the current PETs +then some PETs have no object to pass into a +communication method (e.g. regrid or data redistribution). +The ESMF_StateReconcile() method must be called to broadcast +information about these objects to all PETs in a component; +after which all PETs have a single uniform view of all objects and metadata. + +

+If components are running in sequential mode on all available PETs +and States are being passed between them there is no need to call +ESMF_StateReconcile since all PETs have a uniform view of the objects. +However, if components are running on a subset of the PETs, as is +usually the case when running in concurrent mode, then when States +are passed into components which contain a superset of those PETs, +for example, a Coupler Component, all PETs must call ESMF_StateReconcile +on the States before using them in any ESMF communication methods. +The reconciliation process broadcasts information about objects +which exist only on a subset of the PETs. On PETs missing those +objects it creates a proxy object which contains any +qualities of the original object plus enough information for it +to be a data source or destination for a regrid or data redistribution +operation. + +

+ +

+21.3.1 State create and destroy +

+ +

+States can be created and destroyed at any time during +application execution. The ESMF_StateCreate() routine +can take many different combinations of optional arguments. Refer +to the API description for all possible methods of creating a State. +An empty State can be created by providing only a name and type for +the intended State: + +

+state = ESMF_StateCreate(name, stateintent=ESMF_STATEINTENT_IMPORT, rc=rc) + +

+When finished with an ESMF_State, the ESMF_StateDestroy method +removes it. However, the objects inside the ESMF_State +created externally should be destroyed separately, +since objects can be added to more than one ESMF_State. + +

+ +

+ +

+ +

+21.3.2 Add items to a State +

+ +

+Creation of an empty ESMF_State, and adding an ESMF_FieldBundle + to it. Note that the ESMF_FieldBundle does not get destroyed when + the ESMF_State is destroyed; the ESMF_State only contains + a reference to the objects it contains. It also does not make a copy; + the original objects can be updated and code accessing them by using + the ESMF_State will see the updated version. +

+

+    statename = "Ocean"
+    state2 = ESMF_StateCreate(name=statename,  &
+                              stateintent=ESMF_STATEINTENT_EXPORT, rc=rc)
+
+ +

+

+    bundlename = "Temperature"
+    bundle1 = ESMF_FieldBundleCreate(name=bundlename, rc=rc)
+    print *, "FieldBundle Create returned", rc
+
+ +

+

+    call ESMF_StateAdd(state2, (/bundle1/), rc=rc)
+    print *, "StateAdd returned", rc
+
+ +

+

+    call ESMF_StateDestroy(state2, rc=rc)
+
+ +

+

+    call ESMF_FieldBundleDestroy(bundle1, rc=rc)
+
+ +

+ +

+21.3.3 Add placeholders to a State +

+ +

+If a component could potentially produce a large number of optional + items, one strategy is to add the names only of those objects to the + ESMF_State. Other components can call framework routines to + set the ESMF_NEEDED flag to indicate they require that data. + The original component can query this flag and then produce only the + data that is required by another component. +

+

+    statename = "Ocean"
+    state3 = ESMF_StateCreate(name=statename,  &
+                              stateintent=ESMF_STATEINTENT_EXPORT, rc=rc)
+
+ +

+

+    dataname = "Downward wind:needed"
+    call ESMF_AttributeSet (state3, dataname, .false., rc=rc)
+
+ +

+

+    dataname = "Humidity:needed"
+    call ESMF_AttributeSet (state3, dataname, .false., rc=rc)
+
+ +

+ +

+21.3.4 Mark an item NEEDED +

+ +

+How to set the NEEDED state of an item. +

+

+    dataname = "Downward wind:needed"
+    call ESMF_AttributeSet (state3, name=dataname, value=.true., rc=rc)
+
+ +

+ +

+21.3.5 Create a NEEDED item +

+ +

+Query an item for the NEEDED status, and creating an item on demand. + Similar flags exist for "Ready", "Valid", and "Required for Restart", + to mark each data item as ready, having been validated, or needed if the + application is to be checkpointed and restarted. The flags are supported + to help coordinate the data exchange between components. +

+

+    dataname = "Downward wind:needed"
+    call ESMF_AttributeGet (state3, dataname, value=neededFlag, rc=rc)
+
+ +

+

+    if (rc == ESMF_SUCCESS .and. neededFlag) then
+        bundlename = dataname
+        bundle2 = ESMF_FieldBundleCreate(name=bundlename, rc=rc)
+
+ +

+

+        call ESMF_StateAdd(state3, (/bundle2/), rc=rc)
+
+ +

+

+    else
+        print *, "Data not marked as needed", trim(dataname)
+    endif
+
+ +

+ + +

+ +

+ +

+ +

+21.3.6 ESMF_StateReconcile() usage +

+ +

+The set services routines are used to tell ESMF which routine + hold the user code for the initialize, run, and finalize + blocks of user level Components. + These are the separate subroutines called by the code below. +

+

+! Initialize routine which creates "field1" on PETs 0 and 1
+subroutine comp1_init(gcomp, istate, ostate, clock, rc)
+    type(ESMF_GridComp)  :: gcomp
+    type(ESMF_State)     :: istate, ostate
+    type(ESMF_Clock)     :: clock
+    integer, intent(out) :: rc
+
+    type(ESMF_Field) :: field1
+    integer :: localrc
+
+    print *, "i am comp1_init"
+
+    field1 = ESMF_FieldEmptyCreate(name="Comp1 Field", rc=localrc)
+  
+    call ESMF_StateAdd(istate, (/field1/), rc=localrc)
+    
+    rc = localrc
+
+end subroutine comp1_init
+
+! Initialize routine which creates "field2" on PETs 2 and 3
+subroutine comp2_init(gcomp, istate, ostate, clock, rc)
+    type(ESMF_GridComp)  :: gcomp
+    type(ESMF_State)     :: istate, ostate
+    type(ESMF_Clock)     :: clock
+    integer, intent(out) :: rc
+
+    type(ESMF_Field) :: field2
+    integer :: localrc
+
+    print *, "i am comp2_init"
+
+    field2 = ESMF_FieldEmptyCreate(name="Comp2 Field", rc=localrc)
+    
+    call ESMF_StateAdd(istate, (/field2/), rc=localrc)
+
+    rc = localrc
+
+end subroutine comp2_init
+
+subroutine comp_dummy(gcomp, rc)
+   type(ESMF_GridComp)  :: gcomp
+   integer, intent(out) :: rc
+
+   rc = ESMF_SUCCESS
+end subroutine comp_dummy
+
+ +

+

+! !PROGRAM: ESMF_StateReconcileEx - State reconciliation
+!
+! !DESCRIPTION:
+!
+! This program shows examples of using the State Reconcile function
+!-----------------------------------------------------------------------------
+#include "ESMF.h"
+
+    ! ESMF Framework module
+    use ESMF
+    use ESMF_TestMod
+    use ESMF_StateReconcileEx_Mod
+    implicit none
+
+    ! Local variables
+    integer :: rc, petCount
+    type(ESMF_State) :: state1
+    type(ESMF_GridComp) :: comp1, comp2
+    type(ESMF_VM) :: vm
+    character(len=ESMF_MAXSTR) :: comp1name, comp2name, statename
+
+ +

+A Component can be created which will run only on a subset of the + current PET list. +

+

+    ! Get the global VM for this job.
+    call ESMF_VMGetGlobal(vm=vm, rc=rc)
+
+    comp1name = "Atmosphere"
+    comp1 = ESMF_GridCompCreate(name=comp1name, petList=(/ 0, 1 /), rc=rc)
+    print *, "GridComp Create returned, name = ", trim(comp1name)
+
+ +

+

+    comp2name = "Ocean"
+    comp2 = ESMF_GridCompCreate(name=comp2name, petList=(/ 2, 3 /), rc=rc)
+    print *, "GridComp Create returned, name = ", trim(comp2name)
+
+ +

+

+    statename = "Ocn2Atm"
+    state1 = ESMF_StateCreate(name=statename, rc=rc)
+
+ +

+Here we register the subroutines which should be called for initialization. + Then we call ESMF_GridCompInitialize() on all PETs, but the code runs + only on the PETs given in the petList when the Component was created. + +

+Because this example is so short, we call the entry point code + directly instead of the normal procedure of nesting it in a separate + SetServices() subroutine. + +

+

+    ! This is where the VM for each component is initialized.
+    ! Normally you would call SetEntryPoint inside set services,
+    ! but to make this example very short, they are called inline below.
+    ! This is o.k. because the SetServices routine must execute from within
+    ! the parent component VM.
+    call ESMF_GridCompSetVM(comp1, comp_dummy, rc=rc)
+
+ +

+

+    call ESMF_GridCompSetVM(comp2, comp_dummy, rc=rc)
+
+ +

+

+    call ESMF_GridCompSetServices(comp1, userRoutine=comp_dummy, rc=rc)
+
+ +

+

+    call ESMF_GridCompSetServices(comp2, userRoutine=comp_dummy, rc=rc)
+
+ +

+

+    print *, "ready to set entry point 1"
+    call ESMF_GridCompSetEntryPoint(comp1, ESMF_METHOD_INITIALIZE, &
+         comp1_init, rc=rc)
+
+ +

+

+    print *, "ready to set entry point 2"
+    call ESMF_GridCompSetEntryPoint(comp2, ESMF_METHOD_INITIALIZE, &
+         comp2_init, rc=rc)
+
+ +

+

+    print *, "ready to call init for comp 1"
+    call ESMF_GridCompInitialize(comp1, exportState=state1, rc=rc)
+
+ +

+

+    print *, "ready to call init for comp 2"
+    call ESMF_GridCompInitialize(comp2, exportState=state1, rc=rc)
+
+ +

+Now we have state1 containing field1 on PETs 0 and 1, and + state1 containing field2 on PETs 2 and 3. For the code + to have a rational view of the data, we call ESMF_StateReconcile + which determines which objects are missing from any PET, and communicates + information about the object. After the call to reconcile, all + ESMF_State objects now have a consistent view of the data. +

+

+    print *, "State before calling StateReconcile()"
+    call ESMF_StatePrint(state1, rc=rc)
+
+ +

+

+    call ESMF_StateReconcile(state1, vm=vm, rc=rc)
+
+ +

+

+    print *, "State after calling StateReconcile()"
+    call ESMF_StatePrint(state1, rc=rc)
+
+ +

+

+end program ESMF_StateReconcileEx
+
+ +

+ + +

+21.4 Restrictions and Future Work +

+ +

+ +

    +
  1. No synchronization of object IDs at object create time. +Object IDs are used during the reconcile process to identify objects +which are unknown to some subset of the PETs in the currently running VM. +Object IDs are assigned in sequential order at object create time. + +

    +One important request by the user community during the ESMF object design was +that there be no communication overhead or synchronization when creating +distributed ESMF objects. As a consequence it is required to create these +objects in unison across all PETs in order to keep the ESMF object +identification in sync. + +

    +

  2. +
+ +

+ +

+21.5 Design and Implementation Notes +

+ +

+ +

    +
  1. States contain the name of the associated Component, a flag for Import +or Export, and a list of data objects, which can be a combination of +FieldBundles, Fields, and/or Arrays. The objects must be named and have +the proper attributes so they can be identified by the receiver of +the data. For example, units and other detailed information +may need to be associated with the data as an Attribute. + +

    +

  2. +
  3. Data contained in States must be created in unison on each +PET of the current VM. This allows the creation process to avoid +doing communications since each PET can compute any information +it needs to know about any remote PET (for example, the grid +distribute method can compute the decomposition of the grid on +not only the local PET but also the remote PETs since it knows +each PET is making the identical call). For all PETs to have a +consistent view of the data this means objects must be given +unique names when created, or all objects must be created in +the same order on all PETs so ESMF can generate consistent +default names for the objects. + +

    +When running components on subsets of the original VM all the +PETs can create consistent objects but then when they are put +into a State and passed to a component with a different VM and +a different set of PETs, a communication call (reconcile) must be +made to communicate the missing information to the PETs which were +not involved in the original object creation. The reconcile call +broadcasts object lists; those PETs which are missing any objects +in the total list can receive enough information to +reconstruct a proxy object which contains all necessary information +about that object, with no local data, on that PET. These proxy +objects can be queried by ESMF routines to determine the amount +of data and what PETs contain data which is destined to be moved +to the local PET (for receiving data) and conversely, can determine +which other PETs are going to receive data and how much (for +sending data). + +

    +For example, the FieldExcl system test creates 2 Gridded Components +on separate subsets of PETs. They use the option of mapping +particular, non-monotonic PETs to DEs. The following figures +illustrate how the DEs are mapped in each of the Gridded Components +in that test: + +

    +

    +
    +
    + + + +
    Figure 7: +The mapping of PETs (processors) to DEs (data) +in the source grid created by user_model1.F90 +in the FieldExcl system test.
    +\scalebox{0.9}{\includegraphics{Excl_src_grid}}
    +
    +
    +
    + +

    +

    +
    +
    + + + +
    Figure 8: +The mapping of PETs (processors) to DEs (data) +in the destination grid created by user_model2.F90 +in the FieldExcl system test.
    +\scalebox{0.9}{\includegraphics{Excl_dst_grid}}
    +
    +
    +
    + +

    +In the coupler code, all PETs must make the reconcile call before +accessing data in the State. On PETs which already contain data, +the objects are unchanged. On PETs which were not involved during +the creation of the FieldBundles or Fields, the reconcile call adds an +object to the State which contains all the same metadata associated +with the object, but creates a slightly different Grid object, +called a Proxy Grid. These PETs contain no local data, so the +Array object is empty, and the DELayout for the Grid is like this: + +

    +

    +
    +
    + + + +
    Figure 9: +The mapping of PETs (processors) to DEs (data) +in the source grid after the reconcile call in user_coupler.F90 +in the FieldExcl system test.
    +\scalebox{0.9}{\includegraphics{Excl_src_grid_cpl}}
    +
    +
    +
    + +

    +

    +
    +
    + + + +
    Figure 10: +The mapping of PETs (processors) to DEs (data) +in the destination grid after the reconcile call in user_coupler.F90 +in the FieldExcl system test.
    +\scalebox{0.9}{\includegraphics{Excl_dst_grid_cpl}}
    +
    +
    +
    + +

    +

  4. +
+ +

+21.6 Object Model +

+ +

+The following is a simplified UML diagram showing the structure of the +State class. States can contain FieldBundles, Fields, Arrays, or nested +States. See Appendix A, A Brief Introduction to UML, +for a translation table that lists the symbols in the diagram and their +meaning. + +

+

+\includegraphics{State_obj} + +
+ +

+21.7 Class API +

+ +

+ +

+ +

+ +

+21.7.1 ESMF_StateAssignment(=) - State assignment +

+ +

+ +

+
+INTERFACE: +

   interface assignment(=)
+   state1 = state2
+
ARGUMENTS: +
   type(ESMF_State) :: state1
+   type(ESMF_State) :: state2
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Assign state1 as an alias to the same ESMF State object in memory + as state2. If state2 is invalid, then state1 will be equally invalid after + the assignment. + +

+The arguments are: +

+
state1
+
The ESMF_State object on the left hand side of the assignment. + +
+
state2
+
The ESMF_State object on the right hand side of the assignment. + +
+
+ +

+ +

+ +

+21.7.2 ESMF_StateOperator(==) - State equality operator +

+ +

+ +

+
+INTERFACE: +

   interface operator(==)
+   if (state1 == state2) then ... endif
+   OR
+   result = (state1 == state2)
+
RETURN VALUE: +
   logical :: result
+
ARGUMENTS: +
   type(ESMF_State), intent(in) :: state1
+   type(ESMF_State), intent(in) :: state2
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Test whether state1 and state2 are valid aliases to the same ESMF + State object in memory. For a more general comparison of two ESMF States, + going beyond the simple alias test, the ESMF_StateMatch() function (not yet + implemented) must be used. + +

+The arguments are: +

+
state1
+
The ESMF_State object on the left hand side of the equality + operation. + +
+
state2
+
The ESMF_State object on the right hand side of the equality + operation. + +
+
+ +

+ +

+ +

+21.7.3 ESMF_StateOperator(/=) - State not equal operator +

+ +

+ +

+
+INTERFACE: +

   interface operator(/=)
+   if (state1 /= state2) then ... endif
+   OR
+   result = (state1 /= state2)
+
RETURN VALUE: +
   logical :: result
+
ARGUMENTS: +
   type(ESMF_State), intent(in) :: state1
+   type(ESMF_State), intent(in) :: state2
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Test whether state1 and state2 are not valid aliases to the + same ESMF State object in memory. For a more general comparison of two ESMF + States, going beyond the simple alias test, the ESMF_StateMatch() function + (not yet implemented) must be used. + +

+The arguments are: +

+
state1
+
The ESMF_State object on the left hand side of the non-equality + operation. + +
+
state2
+
The ESMF_State object on the right hand side of the non-equality + operation. + +
+
+ +

+ +

+ +

+21.7.4 ESMF_StateAdd - Add a list of items to a State +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_StateAdd(state, <itemList>, relaxedFlag, rc)
+
ARGUMENTS: +
   type(ESMF_State), intent(inout) :: state
+   <itemList>, see below for supported values
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+   logical, intent(in), optional :: relaxedFlag
+   integer, intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Add a list of items to a ESMF_State. It is an error if any item in + <itemlist> already matches, by name, an item already contained in state. + +

+Supported values for <itemList> are: +

+
+
type(ESMF_Array), intent(in) :: arrayList(:) + +
+
+
type(ESMF_ArrayBundle), intent(in) :: arraybundleList(:) + +
+
+
type(ESMF_Field), intent(in) :: fieldList(:) + +
+
+
type(ESMF_FieldBundle), intent(in) :: fieldbundleList(:) + +
+
+
type(ESMF_RouteHandle), intent(in) :: routehandleList(:) + +
+
+
type(ESMF_State), intent(in) :: nestedStateList(:) + +
+
+ +

+The arguments are: +

+
state
+
An ESMF_State to which the <itemList> will be added. + +
+
<itemList>
+
The list of items to be added. + This is a reference only; when + the ESMF_State is destroyed the <itemList> items contained within it will + not be destroyed. Also, the items in the <itemList> cannot be safely + destroyed before the ESMF_State is destroyed. + Since <itemList> items can be added to multiple containers, it remains + the responsibility of the user to manage their + destruction when they are no longer in use. + +
+
[relaxedflag]
+
A setting of .true. indicates a relaxed definition of "add", + where it is not an error if <itemList> contains items + with names that are found in state. The State + is left unchanged for these items. For .false. this is treated + as an error condition. The default setting is .false.. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+21.7.5 ESMF_StateAddReplace - Add or replace a list of items to a State +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_StateAddReplace(state, <itemList>, rc)
+
ARGUMENTS: +
   type(ESMF_State), intent(inout) :: state
+   <itemList>, see below for supported values
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+   integer, intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Add or replace a list of items to an ESMF_State. If an item in + <itemList> does not match any items already present in state, it is + added. Items with names already present in the state replace the + existing item. + +

+Supported values for <itemList> are: +

+
+
type(ESMF_Array), intent(in) :: arrayList(:) + +
+
+
type(ESMF_ArrayBundle), intent(in) :: arraybundleList(:) + +
+
+
type(ESMF_Field), intent(in) :: fieldList(:) + +
+
+
type(ESMF_FieldBundle), intent(in) :: fieldbundleList(:) + +
+
+
type(ESMF_RouteHandle), intent(in) :: routehandleList(:) + +
+
+
type(ESMF_State), intent(in) :: nestedStateList(:) + +
+
+ +

+The arguments are: +

+
state
+
An ESMF_State to which the <itemList> will be added or replaced. + +
+
<itemList>
+
The list of items to be added or replaced. + This is a reference only; when + the ESMF_State is destroyed the <itemList> items contained within it will + not be destroyed. Also, the items in the <itemList> cannot be safely + destroyed before the ESMF_State is destroyed. + Since <itemList> items can be added to multiple containers, it remains + the responsibility of the user to manage their + destruction when they are no longer in use. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+21.7.6 ESMF_StateCreate - Create a new State +

+ +

+ +

+
+INTERFACE: +

       function ESMF_StateCreate(stateIntent, &
+                    arrayList, arraybundleList, &
+                    fieldList, fieldbundleList, &
+                    nestedStateList, &
+                    routehandleList, name, vm, rc)
+
RETURN VALUE: +
       type(ESMF_State) :: ESMF_StateCreate
+
ARGUMENTS: +
 -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       type(ESMF_StateIntent_Flag), intent(in), optional :: stateIntent
+       type(ESMF_Array), intent(in), optional :: arrayList(:)
+       type(ESMF_ArrayBundle), intent(in), optional :: arraybundleList(:)
+       type(ESMF_Field), intent(in), optional :: fieldList(:)
+       type(ESMF_FieldBundle), intent(in), optional :: fieldbundleList(:)
+       type(ESMF_State), intent(in), optional :: nestedStateList(:)
+       type(ESMF_RouteHandle), intent(in), optional :: routehandleList(:)
+       character(len=*), intent(in), optional :: name
+       type(ESMF_VM), intent(in), optional :: vm
+       integer, intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    8.1.0
    +
    Added argument vm to support object creation on a + different VM than that of the current context. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Create a new ESMF_State, set default characteristics for + objects added to it, and optionally add initial objects to it. + +

+The arguments are: +

+
[stateIntent]
+
The intent, e.g. Import, Export, or Internal, of this ESMF_State. + Possible values are listed in Section 21.2.1. + The default is ESMF_STATEINTENT_UNSPECIFIED. + +
+
[arrayList]
+
A list (Fortran array) of ESMF_Arrays. + +
+
[arraybundleList]
+
A list (Fortran array) of ESMF_ArrayBundles. + +
+
[fieldList]
+
A list (Fortran array) of ESMF_Fields. + +
+
[fieldbundleList]
+
A list (Fortran array) of ESMF_FieldBundles. + +
+
[nestedStateList]
+
A list (Fortran array) of ESMF_States to be nested + inside the outer ESMF_State. + +
+
[routehandleList]
+
A list (Fortran array) of ESMF_RouteHandles. + +
+
[name]
+
Name of this ESMF_State object. A default name will be generated + if none is specified. + +
+
[vm]
+
If present, the State object is created on the specified + ESMF_VM object. The default is to create on the VM of the + current component context. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+21.7.7 ESMF_StateDestroy - Release resources for a State +

+ +

+ +

+
+INTERFACE: +

       recursive subroutine ESMF_StateDestroy(state, noGarbage, rc)
+
ARGUMENTS: +
       type(ESMF_State), intent(inout) :: state
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       logical, intent(in), optional :: noGarbage
+       integer, intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    8.1.0
    +
    Added argument noGarbage. + The argument provides a mechanism to override the default garbage collection + mechanism when destroying an ESMF object. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Releases resources associated with this ESMF_State. Actual + objects added to ESMF_States will not be destroyed, it + remains the responsibility of the user to destroy these objects in the correct + context. + +

+The arguments are: +

+
state
+
Destroy contents of this ESMF_State. + +
+
[noGarbage]
+
If set to .TRUE. the object will be fully destroyed and removed + from the ESMF garbage collection system. Note however that under this + condition ESMF cannot protect against accessing the destroyed object + through dangling aliases - a situation which may lead to hard to debug + application crashes. + +

+It is generally recommended to leave the noGarbage argument + set to .FALSE. (the default), and to take advantage of the ESMF + garbage collection system which will prevent problems with dangling + aliases or incorrect sequences of destroy calls. However this level of + support requires that a small remnant of the object is kept in memory + past the destroy call. This can lead to an unexpected increase in memory + consumption over the course of execution in applications that use + temporary ESMF objects. For situations where the repeated creation and + destruction of temporary objects leads to memory issues, it is + recommended to call with noGarbage set to .TRUE., fully + removing the entire temporary object from memory. + +

+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+21.7.8 ESMF_StateGet - Get object-wide information from a State +

+ +

+ +

+
+INTERFACE: +

       ! Private name; call using ESMF_StateGet()
+       subroutine ESMF_StateGetInfo(state, &
+             itemSearch, itemorderflag, nestedFlag, &
+             stateIntent, itemCount, itemNameList, itemTypeList, name, vm, rc)
+
ARGUMENTS: +
       type(ESMF_State), intent(in) :: state
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       character (len=*), intent(in), optional :: itemSearch
+       type(ESMF_ItemOrder_Flag), intent(in), optional :: itemorderflag
+       logical, intent(in), optional :: nestedFlag
+       type(ESMF_StateIntent_Flag), intent(out), optional :: stateIntent
+       integer, intent(out), optional :: itemCount
+       character (len=*), intent(out), optional :: itemNameList(:)
+       type(ESMF_StateItem_Flag), intent(out), optional :: itemTypeList(:)
+       character (len=*), intent(out), optional :: name
+       type(ESMF_VM), intent(out), optional :: vm
+       integer, intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    6.1.0
    +
    Added argument itemorderflag. + The new argument gives the user control over the order in which + the items are returned. + +
    +
    8.8.0
    +
    Added argument vm in order to offer information about the + VM on which the State was created. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Returns the requested information about this ESMF_State. + The optional itemSearch argument may specify the name of + an individual item to search for. When used in conjunction with + the nestedFlag, nested States will also be searched. + +

+Typically, an ESMF_StateGet() information request will be performed + twice. The first time, the itemCount argument will be used to + query the size of arrays that are needed. Arrays can then be allocated + to the correct size for itemNameList and itemtypeList + as needed. A second call to ESMF_StateGet() will then fill in the + values. + +

+The arguments are: +

+
state
+
An ESMF_State object to be queried. + +
+
[itemSearch]
+
Query objects by name in the State. When the nestedFlag + option is set to .true., all nested States will also be searched + for the specified name. + +
+
[itemorderflag]
+
Specifies the order of the returned items in the itemNameList + and itemTypeList. The default is ESMF_ITEMORDER_ABC. + See 54.34 for a full list of options. + +
+
[nestedFlag]
+
When set to .false., returns information at the current + State level only (default) + When set to .true., additionally returns information from + nested States + +
+
[stateIntent]
+
The intent, e.g. Import, Export, or Internal, of this ESMF_State. + Possible values are listed in Section 21.2.1. + +
+
[itemCount]
+
Count of items in this ESMF_State. + When the nestedFlag option is + set to .true., the count will include items present in nested + States. When using itemSearch, it will count the number of + items matching the specified name. + +
+
[itemNameList]
+
Array of item names in this ESMF_State. + When the nestedFlag option is + set to .true., the list will include items present in nested + States. When using itemSearch, it will return the names of + items matching the specified name. itemNameList must be at least + itemCount long. + +
+
[itemTypeList]
+
Array of possible item object types in this ESMF_State. + When the nestedFlag option is + set to .true., the list will include items present in nested + States. When using itemSearch, it will return the types of + items matching the specified name. Must be at least itemCount + long. Return values are listed in Section 21.2.2. + +
+
[name]
+
Returns the name of this ESMF_State. + +
+
[vm
+
The VM on which the State object was created. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+21.7.9 ESMF_StateGet - Get information about an item in a State by item name +

+ +

+ +

+
+INTERFACE: +

       ! Private name; call using ESMF_StateGet()
+       subroutine ESMF_StateGetItemInfo(state, itemName, itemType, rc)
+
ARGUMENTS: +
       type(ESMF_State), intent(in) :: state
+       character (len=*), intent(in) :: itemName
+       type(ESMF_StateItem_Flag), intent(out) :: itemType
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       integer, intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Returns the type for the item named + name in this ESMF_State. If no item with this name + exists, the value ESMF_STATEITEM_NOTFOUND will be returned + and the error code will not be set to an error. Thus this routine + can be used to safely query for the existence of items by name + whether or not they are expected to be there. The error code will + be set in case of other errors, for example if the ESMF_State + itself is invalid. + +

+The arguments are: +

+
state
+
ESMF_State to be queried. + +
+
itemName
+
Name of the item to return information about. + +
+
itemType
+
Returned item types for the item with the given name, including + placeholder names. Options are + listed in Section 21.2.2. If no item with the + given name is found, ESMF_STATEITEM_NOTFOUND will be returned + and rc will not be set to an error. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+21.7.10 ESMF_StateGet - Get an item from a State by item name +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_StateGet(state, itemName, <item>, rc)
+
ARGUMENTS: +
   type(ESMF_State), intent(in) :: state
+   character (len=*), intent(in) :: itemName
+   <item>, see below for supported values
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+   integer, intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Returns an <item> from an ESMF_State by item name. + If the ESMF_State contains the <item> directly, only + itemName is required. + +

+If the state contains nested ESMF_States, + the itemName argument may specify a fully qualified name + to access the desired item with a single call. This is performed + using the '/' character to separate the names of the intermediate + State names leading to the desired item. (E.g., + itemName='state1/state12/item'). + +

+Supported values for <item> are: +

+
+
type(ESMF_Array), intent(out) :: array + +
+
+
type(ESMF_ArrayBundle), intent(out) :: arraybundle + +
+
+
type(ESMF_Field), intent(out) :: field + +
+
+
type(ESMF_FieldBundle), intent(out) :: fieldbundle + +
+
+
type(ESMF_RouteHandle), intent(out) :: routehandle + +
+
+
type(ESMF_State), intent(out) :: nestedState + +
+
+ +

+The arguments are: +

+
state
+
State to query for an <item> named itemName. + +
+
itemName
+
Name of <item> to be returned. This name may be fully + qualified in order to access nested State items. + +
+
<item>
+
Returned reference to the <item>. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+21.7.11 ESMF_StateIsCreated - Check whether an State object has been created +

+ +

+ +

+
+INTERFACE: +

   function ESMF_StateIsCreated(state, rc)
+
RETURN VALUE: +
     logical :: ESMF_StateIsCreated
+
ARGUMENTS: +
     type(ESMF_State), intent(in) :: state
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer, intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Return .true. if the state has been created. Otherwise return + .false.. If an error occurs, i.e. rc /= ESMF_SUCCESS is + returned, the return value of the function will also be .false.. + +

+The arguments are: +

+
state
+
ESMF_State queried. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+21.7.12 ESMF_StateLog - Log State information +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_StateLog(state, prefix, logMsgFlag, nestedFlag, deepFlag, rc)
+
ARGUMENTS: +
     type(ESMF_State), intent(in) :: state
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     character(len=*), intent(in), optional :: prefix
+     type(ESMF_LogMsg_Flag), intent(in), optional :: logMsgFlag
+     logical, intent(in), optional :: nestedFlag
+     logical, intent(in), optional :: deepFlag
+     integer, intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Write information about state to the ESMF default Log. + +

+The arguments are: +

+
state
+
ESMF_State object logged. + +
+
[prefix]
+
String to prefix the log message. Default is no prefix. + +
+
[logMsgFlag]
+
Type of log message generated. See section 49.2.3 for + a list of valid message types. Default is ESMF_LOGMSG_INFO. + +
+
[nestedFlag]
+
When set to .false. (default), only log information about the + current State level. + When set to .true., additionally log information for each nested + State. + +
+
[deepFlag]
+
When set to .false. (default), only log top level information for + each item contained in the State. + When set to .true., additionally log information for each item. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+21.7.13 ESMF_StatePrint - Print State information +

+ +

+ +

+
+INTERFACE: +

       subroutine ESMF_StatePrint(state, options, nestedFlag, rc)
+
ARGUMENTS: +
       type(ESMF_State), intent(in) :: state
+       character(len=*), intent(in), optional :: options
+       logical, intent(in), optional :: nestedFlag
+       integer, intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Prints information about the state to stdout. + +

+The arguments are: +

+
state
+
The ESMF_State to print. + +
+
[options]
+
Print options: + " ", or "brief" - print names and types of the objects within the state (default), + "long" - print additional information, such as proxy flags + +
+
[nestedFlag]
+
When set to .false., prints information about the current + State level only (default), + When set to .true., additionally prints information from + nested States + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ + +

+ +

+ +

+ +

+21.7.14 ESMF_StateReconcile - Reconcile State across PETs +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_StateReconcile(state, vm, checkflag, rc)
+
ARGUMENTS: +
     type(ESMF_State),            intent(inout)         :: state
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     type(ESMF_VM),               intent(in),  optional :: vm
+     logical,                     intent(in),  optional :: checkflag
+     integer,                     intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Must be called for any ESMF_State which contains ESMF objects + that have not been created on all the PETs of the current VM. + For example, if a coupler component is operating on data + which was created by another component that ran on only a subset + of the coupler PETs, the coupler must make this call first + before operating with any of the objects held by the ESMF_State. + After calling ESMF_StateReconcile() all PETs will have + a common view of all objects contained in this ESMF_State. + +

+This call is collective across the specified VM. + +

+The arguments are: +

+
state
+
ESMF_State to reconcile. + +
+
[vm]
+
ESMF_VM across which to reconcile. The default is the current VM. + +
+
[checkflag]
+
If set to .TRUE. the reconciled State object is checked for + consistency across PETs before returning. Any detected issues are + indicated in rc. Set checkflag to .FALSE. in order + to achieve highest performance. The default is .FALSE.. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ + +

+ +

+ +

+ +

+21.7.15 ESMF_StateRemove - Remove an item from a State - (DEPRECATED METHOD) +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_StateRemove ()
+   subroutine ESMF_StateRemoveOneItem (state, itemName, &
+       relaxedFlag, rc)
+
ARGUMENTS: +
     type(ESMF_State), intent(inout) :: state
+     character(*), intent(in) :: itemName
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     logical, intent(in), optional :: relaxedFlag
+     integer, intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • DEPRECATED METHOD as of ESMF 5.3.1. Please use ESMF_StateRemove, section 21.7.16 instead. + Rationale: The list version is consistent with other ESMF container + operations which use lists. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Remove an existing reference to an item from a State. + +

+The arguments are: +

+
state
+
The ESMF_State within which itemName will be removed. + +
+
itemName
+
The name of the item to be removed. This is a reference only. + The item itself is unchanged. + +

+If the state contains nested ESMF_States, + the itemName argument may specify a fully qualified name + to remove the desired item with a single call. This is performed + using the "/" character to separate the names of the intermediate + State names leading to the desired item. (E.g., + itemName="state1/state12/item". + +

+Since an item could potentially be referenced by multiple containers, + it remains the responsibility of the user to manage its + destruction when it is no longer in use. + +

+
[relaxedflag]
+
A setting of .true. indicates a relaxed definition of "remove", + where it is not an error if itemName is not present in the + state. For .false. this is treated + as an error condition. The default setting is .false.. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+21.7.16 ESMF_StateRemove - Remove a list of items from a State +

+ +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_StateRemove ()
+   subroutine ESMF_StateRemoveList (state, itemNameList, relaxedFlag, rc)
+
ARGUMENTS: +
     type(ESMF_State), intent(inout) :: state
+     character(*), intent(in) :: itemNameList(:)
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     logical, intent(in), optional :: relaxedFlag
+     integer, intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.3.1. If code using this interface compiles with any version of ESMF starting with 5.3.1, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Remove existing references to items from a State. + +

+The arguments are: +

+
state
+
The ESMF_State within which itemName will be removed. + +
+
itemNameList
+
The name of the items to be removed. This is a reference only. + The items themselves are unchanged. + +

+If the state contains nested ESMF_States, + the itemName arguments may specify fully qualified names + to remove the desired items with a single call. This is performed + using the "/" character to separate the names of the intermediate + State names leading to the desired items. (E.g., + itemName="state1/state12/item". + +

+Since items could potentially be referenced by multiple containers, + it remains the responsibility of the user to manage their + destruction when they are no longer in use. + +

+
[relaxedflag]
+
A setting of .true. indicates a relaxed definition of "remove", + where it is not an error if an item in the itemNameList + is not present in the state. For .false. this is treated + as an error condition. The default setting is .false.. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+21.7.17 ESMF_StateReplace - Replace a list of items within a State +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_StateReplace(state, <itemList>, relaxedflag, rc)
+
ARGUMENTS: +
   type(ESMF_State), intent(inout) :: state
+   <itemList>, see below for supported values
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+   logical, intent(in), optional :: relaxedflag
+   integer, intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Replace a list of items with a ESMF_State. If an item in + <itemList> does not match any items already present in state, an + error is returned. + +

+Supported values for <itemList> are: +

+
+
type(ESMF_Array), intent(in) :: arrayList(:) + +
+
+
type(ESMF_ArrayBundle), intent(in) :: arraybundleList(:) + +
+
+
type(ESMF_Field), intent(in) :: fieldList(:) + +
+
+
type(ESMF_FieldBundle), intent(in) :: fieldbundleList(:) + +
+
+
type(ESMF_RouteHandle), intent(in) :: routehandleList(:) + +
+
+
type(ESMF_State), intent(in) :: nestedStateList(:) + +
+
+ +

+The arguments are: +

+
state
+
An ESMF_State within which the <itemList> items will be replaced. + +
+
<itemList>
+
The list of items to be replaced. + This is a reference only; when + the ESMF_State is destroyed the <itemList> contained in it will + not be destroyed. Also, the items in the <itemList> cannot be safely + destroyed before the ESMF_State is destroyed. + Since <itemList> items can be added to multiple containers, it remains + the responsibility of the user to manage their + destruction when they are no longer in use. + +
+
[relaxedflag]
+
A setting of .true. indicates a relaxed definition of "replace", + where it is not an error if <itemList> contains items + with names that are not found in state. The State + is left unchanged for these items. For .false. this is treated + as an error condition. The default setting is .false.. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ + +

+ +

+ +

+ +

+21.7.18 ESMF_StateSet - Set State aspects +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_StateSet(state, stateIntent, name, rc)
+
ARGUMENTS: +
     type(ESMF_State),            intent(inout)         :: state
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     type(ESMF_StateIntent_Flag), intent(in),  optional :: stateIntent
+     character(len = *),          intent(in),  optional :: name
+     integer,                     intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Set the info in the state object. + +

+he arguments are: +

+
state
+
The ESMF_State to set. + +
+
[stateIntent]
+
The intent, e.g. Import, Export, or Internal, of this ESMF_State. + Possible values are listed in Section 21.2.1. + +
+
[name]
+
The State name. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ + +

+ +

+ +

+ +

+21.7.19 ESMF_StateValidate - Check validity of a State +

+ +

+ +

+
+INTERFACE: +

       subroutine ESMF_StateValidate(state, nestedFlag, rc)
+
ARGUMENTS: +
       type(ESMF_State), intent(in) :: state
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       logical,          intent(in),  optional :: nestedFlag
+       integer,          intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Validates that the state is internally consistent. + Currently this method determines if the State is uninitialized + or already destroyed. The method returns an error code if problems + are found. + +

+The arguments are: +

+
state
+
The ESMF_State to validate. + +
+
[nestedFlag]
+
.false. - validates at the current State level only (default) + .true. - recursively validates any nested States + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ + +

+ +

+ +

+ + +

+22 Attachable Methods +

+ +

+22.1 Description +

+ +

+ESMF allows user methods to be attached to Components and States. Providing +this capability supports a more object oriented way of model design. + +

+Attachable methods on Components can be used to implement the concept of +generic Components where the specialization requires attaching methods with +well defined names. This methods are then called by the generic Component +code. + +

+Attaching methods to States can be used to supply data operations along with +the data objects inside of a State object. This can be useful where a producer +Component not only supplies a data set, but also the associated processing +functionality. This can be more efficient than providing all of the possible +sets of derived data. + +

+22.2 Use and Examples +

+ +

+The following examples demonstrate how a producer Component attaches a +user defined method to a State, and how it implements the method. The attached +method is then executed by the consumer Component. + +

+ +

+ +

+ +

+22.2.1 Producer Component attaches user defined method +

+ +

+The producer Component attaches a user defined method to exportState + during the Component's initialize method. The user defined method is + attached with label finalCalculation by which it will become + accessible to the consumer Component. +

+

+  subroutine init(gcomp, importState, exportState, clock, rc)
+    ! arguments
+    type(ESMF_GridComp):: gcomp
+    type(ESMF_State):: importState, exportState
+    type(ESMF_Clock):: clock
+    integer, intent(out):: rc
+
+    rc = ESMF_SUCCESS
+    call ESMF_MethodAdd(exportState, label="finalCalculation", &
+      userRoutine=finalCalc, rc=rc)
+    if (rc /= ESMF_SUCCESS) return
+
+    ! just for testing purposes add the same method with a crazy string label
+    call ESMF_MethodAdd(exportState, label="Somewhat of a SILLY @$^@_ label", &
+      userRoutine=finalCalc, rc=rc)
+    if (rc /= ESMF_SUCCESS) return
+
+  end subroutine !--------------------------------------------------------------
+
+ +

+ +

+22.2.2 Producer Component implements user defined method +

+ +

+The producer Component implements the attached, user defined method + finalCalc. Strict interface rules apply for the user defined + method. +

+

+  subroutine finalCalc(state, rc)
+    ! arguments
+    type(ESMF_State):: state
+    integer, intent(out):: rc
+
+    rc = ESMF_SUCCESS
+
+    ! access data objects in state and perform calculation
+    print *, "dummy output from attached method "
+
+  end subroutine !--------------------------------------------------------------
+
+ +

+ +

+22.2.3 Consumer Component executes user defined method +

+ +

+The consumer Component executes the user defined method on the + importState. + +

+

+  subroutine init(gcomp, importState, exportState, clock, rc)
+    ! arguments
+    type(ESMF_GridComp):: gcomp
+    type(ESMF_State):: importState, exportState
+    type(ESMF_Clock):: clock
+    integer, intent(out):: rc
+
+    integer:: userRc, i
+    logical:: isPresent
+    character(len=:), allocatable :: labelList(:)
+
+    rc = ESMF_SUCCESS
+
+ +

+The importState can be queried for a list of all the attached methods. +

+

+    call ESMF_MethodGet(importState, labelList=labelList, rc=rc)
+    if (rc /= ESMF_SUCCESS) return
+    
+    ! print the labels
+    do i=1, size(labelList)
+      print *, labelList(i)
+    enddo
+
+ +

+It is also possible to check the importState whether a specific method + is attached. This allows the consumer code to implement alternatives in case + the method is not available. +

+

+    call ESMF_MethodGet(importState, label="finalCalculation", &
+      isPresent=isPresent, rc=rc)
+    if (rc /= ESMF_SUCCESS) return
+
+ +

+Finally call into the attached method from the consumer side. +

+

+    call ESMF_MethodExecute(importState, label="finalCalculation", &
+      userRc=userRc, rc=rc)
+    if (rc /= ESMF_SUCCESS) return
+    rc = userRc
+    if (rc /= ESMF_SUCCESS) return
+
+  end subroutine !--------------------------------------------------------------
+
+ +

+ + +

+22.3 Restrictions and Future Work +

+ +

+ +

    +
  1. Not reconciled. +Attachable Methods are PET-local settings on an object. Currently Attachable +Methods cannot be reconciled (i.e. ignored during ESMF_StateReconcile()). +
  2. +
  3. No copy nor move. +Currently Attachable Methods cannot be copied or moved between objects. +
  4. +
+ +

+ +

+22.4 Class API +

+ +

+ +

+ +

+ +

+22.4.1 ESMF_MethodAdd - Attach user method to CplComp +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_MethodAdd()
+   subroutine ESMF_MethodCplCompAdd(cplcomp, label, index, userRoutine, rc)
+
ARGUMENTS: +
     type(ESMF_CplComp)                      :: cplcomp
+     character(len=*), intent(in)            :: label
+     integer,          intent(in),  optional :: index
+     interface
+       subroutine userRoutine(cplcomp, rc)
+         use ESMF_CompMod
+         implicit none
+         type(ESMF_CplComp)          :: cplcomp      ! must not be optional
+         integer, intent(out)        :: rc           ! must not be optional
+       end subroutine
+     end interface
+     integer,          intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Attach userRoutine. + Error out if there is a previous attached method under the same + label and index. + +

+The arguments are: +

+
cplcomp
+
The ESMF_CplComp to attach to. + +
+
label
+
Label of method. + +
+
[index]
+
Integer modifier to distinguish multiple entries with the same label. + +
+
userRoutine
+
The user-supplied subroutine to be associated with the label. + +

+The subroutine must have the exact interface shown above + for the userRoutine argument. Arguments in userRoutine + must not be declared as optional, and the types, intent and order must + match. + Prior to Fortran-2008, the subroutine must be either a module scope procedure, + or an external procedure that has a matching interface block specified for it. + An internal procedure which is contained within another procedure must not be used. + From Fortran-2008 onwards, an internal procedure contained within either a main program + or a module procedure may be used. If the internal procedure is contained within a + module procedure, it is subject to initialization requirements. See: 16.4.9 + +

+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+22.4.2 ESMF_MethodAdd - Attach user method, located in shared object, to CplComp +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_MethodAdd()
+   subroutine ESMF_MethodCplCompAddShObj(cplcomp, label, index, userRoutine, &
+     sharedObj, rc)
+
ARGUMENTS: +
     type(ESMF_CplComp)                      :: cplcomp
+     character(len=*), intent(in)            :: label
+     integer,          intent(in),  optional :: index
+     character(len=*), intent(in)            :: userRoutine
+     character(len=*), intent(in),  optional :: sharedObj
+     integer,          intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Attach userRoutine. + Error out if there is a previous attached method under the same + label and index. + +

+The arguments are: +

+
cplcomp
+
The ESMF_CplComp to attach to. + +
+
label
+
Label of method. + +
+
[index]
+
Integer modifier to distinguish multiple entries with the same label. + +
+
userRoutine
+
Name of user-supplied subroutine to be associated with the label, + specified as a character string. + +

+The subroutine must have the exact interface shown in ESMF_MethodCplCompAdd + for the userRoutine argument. Arguments in userRoutine + must not be declared as optional, and the types, intent and order must + match. + Prior to Fortran-2008, the subroutine must be either a module scope procedure, + or an external procedure that has a matching interface block specified for it. + An internal procedure which is contained within another procedure must not be used. + From Fortran-2008 onwards, an internal procedure contained within either a main program + or a module procedure may be used. If the internal procedure is contained within a + module procedure, it is subject to initialization requirements. See: 16.4.9 + +

+
[sharedObj]
+
Name of shared object that contains userRoutine. If the + sharedObj argument is not provided the executable itself will be + searched for userRoutine. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+22.4.3 ESMF_MethodAdd - Attach user method to GridComp +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_MethodAdd()
+   subroutine ESMF_MethodGridCompAdd(gcomp, label, index, userRoutine, rc)
+
ARGUMENTS: +
     type(ESMF_GridComp)                     :: gcomp
+     character(len=*), intent(in)            :: label
+     integer,          intent(in),  optional :: index
+     interface
+       subroutine userRoutine(gcomp, rc)
+         use ESMF_CompMod
+         implicit none
+         type(ESMF_GridComp)         :: gcomp        ! must not be optional
+         integer, intent(out)        :: rc           ! must not be optional
+       end subroutine
+     end interface
+     integer,          intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Attach userRoutine. + Error out if there is a previous attached method under the same + label and index. + +

+The arguments are: +

+
gcomp
+
The ESMF_GridComp to attach to. + +
+
label
+
Label of method. + +
+
[index]
+
Integer modifier to distinguish multiple entries with the same label. + +
+
userRoutine
+
The user-supplied subroutine to be associated with the label. + +

+The subroutine must have the exact interface shown above + for the userRoutine argument. Arguments in userRoutine + must not be declared as optional, and the types, intent and order must + match. + Prior to Fortran-2008, the subroutine must be either a module scope procedure, + or an external procedure that has a matching interface block specified for it. + An internal procedure which is contained within another procedure must not be used. + From Fortran-2008 onwards, an internal procedure contained within either a main program + or a module procedure may be used. If the internal procedure is contained within a + module procedure, it is subject to initialization requirements. See: 16.4.9 + +

+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+22.4.4 ESMF_MethodAdd - Attach user method, located in shared object, to GridComp +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_MethodAdd()
+   subroutine ESMF_MethodGridCompAddShObj(gcomp, label, index, userRoutine, &
+     sharedObj, rc)
+
ARGUMENTS: +
     type(ESMF_GridComp)                     :: gcomp
+     character(len=*), intent(in)            :: label
+     integer,          intent(in),  optional :: index
+     character(len=*), intent(in)            :: userRoutine
+     character(len=*), intent(in),  optional :: sharedObj
+     integer,          intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Attach userRoutine. + Error out if there is a previous attached method under the same + label and index. + +

+The arguments are: +

+
gcomp
+
The ESMF_GridComp to attach to. + +
+
label
+
Label of method. + +
+
[index]
+
Integer modifier to distinguish multiple entries with the same label. + +
+
userRoutine
+
Name of user-supplied subroutine to be associated with the label, + specified as a character string. + +

+The subroutine must have the exact interface shown in ESMF_MethodGridCompAdd + for the userRoutine argument. Arguments in userRoutine + must not be declared as optional, and the types, intent and order must + match. + Prior to Fortran-2008, the subroutine must be either a module scope procedure, + or an external procedure that has a matching interface block specified for it. + An internal procedure which is contained within another procedure must not be used. + From Fortran-2008 onwards, an internal procedure contained within either a main program + or a module procedure may be used. If the internal procedure is contained within a + module procedure, it is subject to initialization requirements. See: 16.4.9 + +

+
[sharedObj]
+
Name of shared object that contains userRoutine. If the + sharedObj argument is not provided the executable itself will be + searched for userRoutine. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+22.4.5 ESMF_MethodAdd - Attach user method to State +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_MethodAdd()
+   subroutine ESMF_MethodStateAdd(state, label, index, userRoutine, rc)
+
ARGUMENTS: +
     type(ESMF_State)                        :: state
+     character(len=*), intent(in)            :: label
+     integer,          intent(in),  optional :: index
+     interface
+       subroutine userRoutine(state, rc)
+         use ESMF_StateMod
+         implicit none
+         type(ESMF_State)            :: state        ! must not be optional
+         integer, intent(out)        :: rc           ! must not be optional
+       end subroutine
+     end interface
+     integer,          intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Attach userRoutine. + Error out if there is a previous attached method under the same + label and index. + +

+The arguments are: +

+
state
+
The ESMF_State to attach to. + +
+
label
+
Label of method. + +
+
[index]
+
Integer modifier to distinguish multiple entries with the same label. + +
+
userRoutine
+
The user-supplied subroutine to be associated with the label. + +

+The subroutine must have the exact interface shown above + for the userRoutine argument. Arguments in userRoutine + must not be declared as optional, and the types, intent and order must + match. + Prior to Fortran-2008, the subroutine must be either a module scope procedure, + or an external procedure that has a matching interface block specified for it. + An internal procedure which is contained within another procedure must not be used. + From Fortran-2008 onwards, an internal procedure contained within either a main program + or a module procedure may be used. If the internal procedure is contained within a + module procedure, it is subject to initialization requirements. See: 16.4.9 + +

+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+22.4.6 ESMF_MethodAdd - Attach user method, located in shared object, to State +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_MethodAdd()
+   subroutine ESMF_MethodStateAddShObj(state, label, index, userRoutine, &
+     sharedObj, rc)
+
ARGUMENTS: +
     type(ESMF_State)                        :: state
+     character(len=*), intent(in)            :: label
+     integer,          intent(in),  optional :: index
+     character(len=*), intent(in)            :: userRoutine
+     character(len=*), intent(in),  optional :: sharedObj
+     integer,          intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Attach userRoutine. + Error out if there is a previous attached method under the same + label and index. + +

+The arguments are: +

+
state
+
The ESMF_State to attach to. + +
+
label
+
Label of method. + +
+
[index]
+
Integer modifier to distinguish multiple entries with the same label. + +
+
userRoutine
+
Name of user-supplied subroutine to be associated with the label, + specified as a character string. + +

+The subroutine must have the exact interface shown in ESMF_MethodStateAdd + for the userRoutine argument. Arguments in userRoutine + must not be declared as optional, and the types, intent and order must + match. + Prior to Fortran-2008, the subroutine must be either a module scope procedure, + or an external procedure that has a matching interface block specified for it. + An internal procedure which is contained within another procedure must not be used. + From Fortran-2008 onwards, an internal procedure contained within either a main program + or a module procedure may be used. If the internal procedure is contained within a + module procedure, it is subject to initialization requirements. See: 16.4.9 + +

+

+
[sharedObj]
+
Name of shared object that contains userRoutine. If the + sharedObj argument is not provided the executable itself will be + searched for userRoutine. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+22.4.7 ESMF_MethodAddReplace - Attach user method to CplComp +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_MethodAddReplace()
+   subroutine ESMF_MethodCplCompAddRep(cplcomp, label, index, userRoutine, rc)
+
ARGUMENTS: +
     type(ESMF_CplComp)                      :: cplcomp
+     character(len=*), intent(in)            :: label
+     integer,          intent(in),  optional :: index
+     interface
+       subroutine userRoutine(cplcomp, rc)
+         use ESMF_CompMod
+         implicit none
+         type(ESMF_CplComp)          :: cplcomp      ! must not be optional
+         integer, intent(out)        :: rc           ! must not be optional
+       end subroutine
+     end interface
+     integer,          intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Attach userRoutine. + Replacing potential previous attached method under the same + label and index. + +

+The arguments are: +

+
cplcomp
+
The ESMF_CplComp to attach to. + +
+
label
+
Label of method. + +
+
[index]
+
Integer modifier to distinguish multiple entries with the same label. + +
+
userRoutine
+
The user-supplied subroutine to be associated with the label. + +

+The subroutine must have the exact interface shown above + for the userRoutine argument. Arguments in userRoutine + must not be declared as optional, and the types, intent and order must + match. + Prior to Fortran-2008, the subroutine must be either a module scope procedure, + or an external procedure that has a matching interface block specified for it. + An internal procedure which is contained within another procedure must not be used. + From Fortran-2008 onwards, an internal procedure contained within either a main program + or a module procedure may be used. If the internal procedure is contained within a + module procedure, it is subject to initialization requirements. See: 16.4.9 + +

+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+22.4.8 ESMF_MethodAddReplace - Attach user method, located in shared object, to CplComp +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_MethodAddReplace()
+   subroutine ESMF_MethodCplCompAddRepShObj(cplcomp, label, index, userRoutine, &
+     sharedObj, rc)
+
ARGUMENTS: +
     type(ESMF_CplComp)                      :: cplcomp
+     character(len=*), intent(in)            :: label
+     integer,          intent(in),  optional :: index
+     character(len=*), intent(in)            :: userRoutine
+     character(len=*), intent(in),  optional :: sharedObj
+     integer,          intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Attach userRoutine. + Replacing potential previous attached method under the same + label and index. + +

+The arguments are: +

+
cplcomp
+
The ESMF_CplComp to attach to. + +
+
label
+
Label of method. + +
+
[index]
+
Integer modifier to distinguish multiple entries with the same label. + +
+
userRoutine
+
Name of user-supplied subroutine to be associated with the label, + specified as a character string. + +

+The subroutine must have the exact interface shown in ESMF_MethodCplCompAdd + for the userRoutine argument. Arguments in userRoutine + must not be declared as optional, and the types, intent and order must + match. + Prior to Fortran-2008, the subroutine must be either a module scope procedure, + or an external procedure that has a matching interface block specified for it. + An internal procedure which is contained within another procedure must not be used. + From Fortran-2008 onwards, an internal procedure contained within either a main program + or a module procedure may be used. If the internal procedure is contained within a + module procedure, it is subject to initialization requirements. See: 16.4.9 + +

+
[sharedObj]
+
Name of shared object that contains userRoutine. If the + sharedObj argument is not provided the executable itself will be + searched for userRoutine. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+22.4.9 ESMF_MethodAddReplace - Attach user method to GridComp +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_MethodAddReplace()
+   subroutine ESMF_MethodGridCompAddRep(gcomp, label, index, userRoutine, rc)
+
ARGUMENTS: +
     type(ESMF_GridComp)                     :: gcomp
+     character(len=*), intent(in)            :: label
+     integer,          intent(in),  optional :: index
+     interface
+       subroutine userRoutine(gcomp, rc)
+         use ESMF_CompMod
+         implicit none
+         type(ESMF_GridComp)         :: gcomp        ! must not be optional
+         integer, intent(out)        :: rc           ! must not be optional
+       end subroutine
+     end interface
+     integer,          intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Attach userRoutine. + Replacing potential previous attached method under the same + label and index. + +

+The arguments are: +

+
gcomp
+
The ESMF_GridComp to attach to. + +
+
label
+
Label of method. + +
+
[index]
+
Integer modifier to distinguish multiple entries with the same label. + +
+
userRoutine
+
The user-supplied subroutine to be associated with the label. + +

+The subroutine must have the exact interface shown above + for the userRoutine argument. Arguments in userRoutine + must not be declared as optional, and the types, intent and order must + match. + Prior to Fortran-2008, the subroutine must be either a module scope procedure, + or an external procedure that has a matching interface block specified for it. + An internal procedure which is contained within another procedure must not be used. + From Fortran-2008 onwards, an internal procedure contained within either a main program + or a module procedure may be used. If the internal procedure is contained within a + module procedure, it is subject to initialization requirements. See: 16.4.9 + +

+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+22.4.10 ESMF_MethodAddReplace - Attach user method, located in shared object, to GridComp +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_MethodAddReplace()
+   subroutine ESMF_MethodGridCompAddRepShObj(gcomp, label, index, userRoutine, &
+     sharedObj, rc)
+
ARGUMENTS: +
     type(ESMF_GridComp)                     :: gcomp
+     character(len=*), intent(in)            :: label
+     integer,          intent(in),  optional :: index
+     character(len=*), intent(in)            :: userRoutine
+     character(len=*), intent(in),  optional :: sharedObj
+     integer,          intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Attach userRoutine. + Replacing potential previous attached method under the same + label and index. + +

+The arguments are: +

+
gcomp
+
The ESMF_GridComp to attach to. + +
+
label
+
Label of method. + +
+
[index]
+
Integer modifier to distinguish multiple entries with the same label. + +
+
userRoutine
+
Name of user-supplied subroutine to be associated with the label, + specified as a character string. + +

+The subroutine must have the exact interface shown in ESMF_MethodGridCompAdd + for the userRoutine argument. Arguments in userRoutine + must not be declared as optional, and the types, intent and order must + match. + Prior to Fortran-2008, the subroutine must be either a module scope procedure, + or an external procedure that has a matching interface block specified for it. + An internal procedure which is contained within another procedure must not be used. + From Fortran-2008 onwards, an internal procedure contained within either a main program + or a module procedure may be used. If the internal procedure is contained within a + module procedure, it is subject to initialization requirements. See: 16.4.9 + +

+
[sharedObj]
+
Name of shared object that contains userRoutine. If the + sharedObj argument is not provided the executable itself will be + searched for userRoutine. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+22.4.11 ESMF_MethodAddReplace - Attach user method to State +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_MethodAddReplace()
+   subroutine ESMF_MethodStateAddRep(state, label, index, userRoutine, rc)
+
ARGUMENTS: +
     type(ESMF_State)                        :: state
+     character(len=*), intent(in)            :: label
+     integer,          intent(in),  optional :: index
+     interface
+       subroutine userRoutine(state, rc)
+         use ESMF_StateMod
+         implicit none
+         type(ESMF_State)            :: state        ! must not be optional
+         integer, intent(out)        :: rc           ! must not be optional
+       end subroutine
+     end interface
+     integer,          intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Attach userRoutine. + Replacing potential previous attached method under the same + label and index. + +

+The arguments are: +

+
state
+
The ESMF_State to attach to. + +
+
label
+
Label of method. + +
+
[index]
+
Integer modifier to distinguish multiple entries with the same label. + +
+
userRoutine
+
The user-supplied subroutine to be associated with the label. + +

+The subroutine must have the exact interface shown above + for the userRoutine argument. Arguments in userRoutine + must not be declared as optional, and the types, intent and order must + match. + Prior to Fortran-2008, the subroutine must be either a module scope procedure, + or an external procedure that has a matching interface block specified for it. + An internal procedure which is contained within another procedure must not be used. + From Fortran-2008 onwards, an internal procedure contained within either a main program + or a module procedure may be used. If the internal procedure is contained within a + module procedure, it is subject to initialization requirements. See: 16.4.9 + +

+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+22.4.12 ESMF_MethodAddReplace - Attach user method, located in shared object, to State +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_MethodAddReplace()
+   subroutine ESMF_MethodStateAddRepShObj(state, label, index, userRoutine, &
+     sharedObj, rc)
+
ARGUMENTS: +
     type(ESMF_State)                        :: state
+     character(len=*), intent(in)            :: label
+     integer,          intent(in),  optional :: index
+     character(len=*), intent(in)            :: userRoutine
+     character(len=*), intent(in),  optional :: sharedObj
+     integer,          intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Attach userRoutine. + Replacing potential previous attached method under the same + label and index. + +

+The arguments are: +

+
state
+
The ESMF_State to attach to. + +
+
label
+
Label of method. + +
+
[index]
+
Integer modifier to distinguish multiple entries with the same label. + +
+
userRoutine
+
Name of user-supplied subroutine to be associated with the label, + specified as a character string. + +

+The subroutine must have the exact interface shown in ESMF_MethodStateAdd + for the userRoutine argument. Arguments in userRoutine + must not be declared as optional, and the types, intent and order must + match. + Prior to Fortran-2008, the subroutine must be either a module scope procedure, + or an external procedure that has a matching interface block specified for it. + An internal procedure which is contained within another procedure must not be used. + From Fortran-2008 onwards, an internal procedure contained within either a main program + or a module procedure may be used. If the internal procedure is contained within a + module procedure, it is subject to initialization requirements. See: 16.4.9 + +

+

+
[sharedObj]
+
Name of shared object that contains userRoutine. If the + sharedObj argument is not provided the executable itself will be + searched for userRoutine. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+22.4.13 ESMF_MethodExecute - Execute user method attached to CplComp +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_MethodExecute()
+   recursive subroutine ESMF_MethodCplCompExecute(cplcomp, label, index, existflag, &
+     userRc, rc)
+
ARGUMENTS: +
     type(ESMF_CplComp)                      :: cplcomp
+     character(len=*), intent(in)            :: label
+     integer,          intent(in),  optional :: index
+     logical,          intent(out), optional :: existflag
+     integer,          intent(out), optional :: userRc
+     integer,          intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Execute attached method. + +

+The arguments are: +

+
cplcomp
+
The ESMF_CplComp object holding the attachable method. + +
+
label
+
Label of method. + +
+
[index]
+
Integer modifier to distinguish multiple entries with the same label. + +
+
[existflag]
+
Returned .true. indicates that the method specified by label + exists and was executed. A return value of .false. indicates that + the method does not exist and consequently was not executed. By default, + i.e. if existflag was not specified, the latter condition will lead + to rc not equal ESMF_SUCCESS being returned. However, if + existflag was specified, a method not existing is not an error + condition. + +
+
[userRc]
+
Return code set by attached method before returning. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+22.4.14 ESMF_MethodExecute - Execute user method attached to GridComp +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_MethodExecute()
+   recursive subroutine ESMF_MethodGridCompExecute(gcomp, label, index, existflag, &
+     userRc, rc)
+
ARGUMENTS: +
     type(ESMF_GridComp)                     :: gcomp
+     character(len=*), intent(in)            :: label
+     integer,          intent(in),  optional :: index
+     logical,          intent(out), optional :: existflag
+     integer,          intent(out), optional :: userRc
+     integer,          intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Execute attached method. + +

+The arguments are: +

+
gcomp
+
The ESMF_GridComp object holding the attachable method. + +
+
label
+
Label of method. + +
+
[index]
+
Integer modifier to distinguish multiple entries with the same label. + +
+
[existflag]
+
Returned .true. indicates that the method specified by label + exists and was executed. A return value of .false. indicates that + the method does not exist and consequently was not executed. By default, + i.e. if existflag was not specified, the latter condition will lead + to rc not equal ESMF_SUCCESS being returned. However, if + existflag was specified, a method not existing is not an error + condition. + +
+
[userRc]
+
Return code set by attached method before returning. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+22.4.15 ESMF_MethodExecute - Execute user method attached to State +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_MethodExecute()
+   recursive subroutine ESMF_MethodStateExecute(state, label, index, existflag, &
+     userRc, rc)
+
ARGUMENTS: +
     type(ESMF_State)                        :: state
+     character(len=*), intent(in)            :: label
+     integer,          intent(in),  optional :: index
+     logical,          intent(out), optional :: existflag
+     integer,          intent(out), optional :: userRc
+     integer,          intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Execute attached method. + +

+The arguments are: +

+
state
+
The ESMF_State object holding the attachable method. + +
+
label
+
Label of method. + +
+
[index]
+
Integer modifier to distinguish multiple entries with the same label. + +
+
[existflag]
+
Returned .true. indicates that the method specified by label + exists and was executed. A return value of .false. indicates that + the method does not exist and consequently was not executed. By default, + i.e. if existflag was not specified, the latter condition will lead + to rc not equal ESMF_SUCCESS being returned. However, if + existflag was specified, a method not existing is not an error + condition. + +
+
[userRc]
+
Return code set by attached method before returning. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+22.4.16 ESMF_MethodGet - Get info about user method attached to CplComp +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_MethodGet()
+   subroutine ESMF_MethodCplCompGet(cplcomp, label, index, isPresent, rc)
+
ARGUMENTS: +
     type(ESMF_CplComp)                      :: cplcomp
+     character(len=*), intent(in)            :: label
+     integer,          intent(in),  optional :: index
+     logical,          intent(out), optional :: isPresent
+     integer,          intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Access information about attached method. + +

+The arguments are: +

+
cplcomp
+
The ESMF_CplComp object holding the attachable method. + +
+
label
+
Label of method. + +
+
[index]
+
Integer modifier to distinguish multiple entries with the same label. + +
+
[isPresent]
+
.true. if a method was attached for label/index. + .false. otherwise. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+22.4.17 ESMF_MethodGet - Get info about user methods attached to CplComp +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_MethodGet()
+   subroutine ESMF_MethodCplCompGetList(cplcomp, labelList, rc)
+
ARGUMENTS: +
     type(ESMF_CplComp)                                   :: cplcomp
+     character(len=:), allocatable, intent(out)           :: labelList(:)
+     integer,                       intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Access labels of all attached methods. + +

+The arguments are: +

+
cplcomp
+
The ESMF_CplComp object holding the attachable method. + +
+
labelList
+
List of labels of all the attached methods. On return, it will be + allocated with as many list elements as there are attached methods. The + length of each label in labelList is that of the largest method label + currently attached. Elements with shorter labels are padded with white + spaces. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+22.4.18 ESMF_MethodGet - Get info about user method attached to GridComp +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_MethodGet()
+   subroutine ESMF_MethodGridCompGet(gcomp, label, index, isPresent, rc)
+
ARGUMENTS: +
     type(ESMF_GridComp)                     :: gcomp
+     character(len=*), intent(in)            :: label
+     integer,          intent(in),  optional :: index
+     logical,          intent(out), optional :: isPresent
+     integer,          intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Access information about attached method. + +

+The arguments are: +

+
gcomp
+
The ESMF_GridComp object holding the attachable method. + +
+
label
+
Label of method. + +
+
[index]
+
Integer modifier to distinguish multiple entries with the same label. + +
+
[isPresent]
+
.true. if a method was attached for label/index. + .false. otherwise. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+22.4.19 ESMF_MethodGet - Get info about user methods attached to GridComp +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_MethodGet()
+   subroutine ESMF_MethodGridCompGetList(gcomp, labelList, rc)
+
ARGUMENTS: +
     type(ESMF_GridComp)                                  :: gcomp
+     character(len=:), allocatable, intent(out)           :: labelList(:)
+     integer,                       intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Access labels of all attached methods. + +

+The arguments are: +

+
gcomp
+
The ESMF_GridComp object holding the attachable method. + +
+
labelList
+
List of labels of all the attached methods. On return, it will be + allocated with as many list elements as there are attached methods. The + length of each label in labelList is that of the largest method label + currently attached. Elements with shorter labels are padded with white + spaces. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+22.4.20 ESMF_MethodGet - Get info about user method attached to State +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_MethodGet()
+   subroutine ESMF_MethodStateGet(state, label, index, isPresent, rc)
+
ARGUMENTS: +
     type(ESMF_State)                        :: state
+     character(len=*), intent(in)            :: label
+     integer,          intent(in),  optional :: index
+     logical,          intent(out), optional :: isPresent
+     integer,          intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Access information about attached method. + +

+The arguments are: +

+
state
+
The ESMF_State object holding the attachable method. + +
+
label
+
Label of method. + +
+
[index]
+
Integer modifier to distinguish multiple entries with the same label. + +
+
[isPresent]
+
.true. if a method was attached for label/index. + .false. otherwise. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+22.4.21 ESMF_MethodGet - Get info about user methods attached to State +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_MethodGet()
+   subroutine ESMF_MethodStateGetList(state, labelList, rc)
+
ARGUMENTS: +
     type(ESMF_State)                                     :: state
+     character(len=:), allocatable, intent(out)           :: labelList(:)
+     integer,                       intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Access labels of all attached methods. + +

+The arguments are: +

+
state
+
The ESMF_State object holding the attachable method. + +
+
labelList
+
List of labels of all the attached methods. On return, it will be + allocated with as many list elements as there are attached methods. The + length of each label in labelList is that of the largest method label + currently attached. Elements with shorter labels are padded with white + spaces. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+22.4.22 ESMF_MethodRemove - Remove user method attached to CplComp +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_MethodRemove()
+   subroutine ESMF_MethodCplCompRemove(cplcomp, label, index, rc)
+
ARGUMENTS: +
     type(ESMF_CplComp)                      :: cplcomp
+     character(len=*), intent(in)            :: label
+     integer,          intent(in),  optional :: index
+     integer,          intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Remove attached method. + +

+The arguments are: +

+
cplcomp
+
The ESMF_CplComp object holding the attachable method. + +
+
label
+
Label of method. + +
+
[index]
+
Integer modifier to distinguish multiple entries with the same label. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+22.4.23 ESMF_MethodRemove - Remove user method attached to GridComp +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_MethodRemove()
+   subroutine ESMF_MethodGridCompRemove(gcomp, label, index, rc)
+
ARGUMENTS: +
     type(ESMF_GridComp)                      :: gcomp
+     character(len=*),  intent(in)            :: label
+      integer,          intent(in),  optional :: index
+    integer,            intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Remove attached method. + +

+The arguments are: +

+
gcomp
+
The ESMF_GridComp object holding the attachable method. + +
+
label
+
Label of method. + +
+
[index]
+
Integer modifier to distinguish multiple entries with the same label. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+22.4.24 ESMF_MethodRemove - Remove user method attached to State +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_MethodRemove()
+   subroutine ESMF_MethodStateRemove(state, label, index, rc)
+
ARGUMENTS: +
     type(ESMF_State)                        :: state
+     character(len=*), intent(in)            :: label
+     integer,          intent(in),  optional :: index
+     integer,          intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Remove attached method. + +

+The arguments are: +

+
state
+
The ESMF_State object holding the attachable method. + +
+
label
+
Label of method. + +
+
[index]
+
Integer modifier to distinguish multiple entries with the same label. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ + +

+23 Web Services +

+ +

+23.1 Description +

+ +

+The goal of the ESMF Web Services is to provide the tools to allow ESMF Users to make +their Components available via a web service. The first step is to make the Component +a service, and then make it accessible via the Web. + +

+

+
+
+ + + +
Figure 11: +The diagram describes the ESMF Web Services software architecture. The architecture +defines a multi-tiered set of applications that provide a flexible approach for accessing +model components.
+\scalebox{0.5}{\includegraphics{webservices}}
+
+
+
+ +

+At the heart of this architecture is the Component Service; this is the +application that does the model work. The ESMF Web Services part provides a way to make +the model accessible via a network API (Application Programming Interface). ESMF provides +the tools to turn a model component into a service as well as the tools to access the +service from the network. + +

+The Process Controller is a stand-alone application that provides a control mechanism between +the end user and the Component Service. The Process Controller is responsible for managing +client information as well as restricting client access to a Component Service. +(The role of the Process Controller is expected to expand in the future.) + +

+The tomcat/axis2 application provides the access via the Web using standard SOAP +protocols. Part of this application includes the SOAP interface definition +(using a WSDL file) as well as some java code that provides the access to the Process +Controller application. + +

+Finally, the Registrar maintains a list of Component Services that are currently +available; Component Services register themselves with the Registrar when they +startup, and unregister themselves when they shutdown. The list of available services +is maintained in an XML file and is accessible from the Registrar using its network API. + +

+ +

+23.1.1 Creating a Service around a Component +

+ +

+23.1.2 Code Modifications +

+One of the goals in providing the tools to make Components into services was to make +the process as simple and easy as possible. Any model component that has been +implemented using the ESMF Component Framework can easily be turned into a +Component Services with just a minor change to the Application +driver code. (For details on the ESMF Framework, see the ESMF Developers Documentation.) + +

+The primary function in ESMF Web Services is the ESMF_WebServicesLoop routine. This +function registers the Component Service with the Registrar and then sets up a +network socket service that listens for requests from a client. It starts a loop +that waits for incoming requests and manages the routing of these requests to +all PETs. It is also responsible for making sure the appropriate ESMF +routine (ESMF_Initialize, ESMF_Run or ESMF_Finalize) is called based on the incoming +request. When the client has completed its interaction with the Component Service, +the loop will be terminated and it will unregister the Component Service from the Registrar. + +

+To make all of this happen, the Application Driver just needs to replace its calls to +ESMF_Initialize, ESMF_Run, and ESMF_Finalize with a single call to ESMF_WebServicesLoop. + +

+

+	use ESMF_WebServMod
+	....
+
+	call ESMF_WebServicesLoop(gridComponent, portNumber, returnCode)
+
+ +

+That's all there is to turning an ESMF Component into a network-accessible +ESMF Component Service. For a detailed example of an ESMF Component turned into +an ESMF Component Service, see the Examples in the Web Services section of the +Developer' Guide. + +

+ +

+23.1.3 Accessing the Service +

+Now that the Component is available as a service, it can be accessed remotely by any client +that can communicate via TCP sockets. The ESMF library, in addition to providing the +service tools, also provides the classes to create C++ clients to access the Component +Service via the socket interface. + +

+However, the goal of ESMF Web Services is to make an ESMF Component accessible through +a standard web service, which is accomplished through the Process Controller and the +Tomcat/Axis2 applications + +

+ +

+23.1.4 Client Application via C++ API +

+ +

+Interfacing to a Component service is fairly simple using the ESMF library. The following +code is a simple example of how to interface to a Component Service in C++ and request +the initialize operation (the entire sample client can be found in the Web Services examples +section of the ESMF Distribution): + +

+

+	#include "ESMCI_WebServCompSvrClient.h"
+
+	int  main(int  argc, char*  argv[])
+	{
+   	    int    portNum = 27060;
+      	    int    clientId = 101;
+   	    int    rc = ESMF_SUCCESS;
+
+   	    ESMCI::ESMCI_WebServCompSvrClient   
+                         client("localhost", portNum, clientId);
+
+   	    rc = client.init();
+   	    printf("Initialize return code: %d\n", rc);
+	}
+
+ +

+To see a complete description of the NetEsmfClient class, refer to the netesmf library +section of the Web Services Reference Manual. + +

+ +

+23.1.5 Process Controller +

+ +

+The Process Controller is basically just a instance of a C++ client application. It manages +client access to the Component Service (only 1 client can access the service at a time), +and will eventually be responsible for starting up and shutting down instances of +Component Services (planned for a future release). The Process Controller application is +built with the ESMF library and is included in the apps section of the distribution. + +

+ +

+23.1.6 Tomcat/Axis2 +

+ +

+The Tomcat/Axis2 "application" is essentially the Apache Tomcat server using +the Apache Axis2 servlet to implement web services using SOAP protocols. The web +interface is defined by a WSDL file, and its implementation is handled by the Component +Connector java code. Tomcat and Axis2 are both open source projects that should be +downloaded from the Apache web site, but the WSDL file, the Component Connector java +code, and all required software for supporting the interface can be found next to the +ESMF distribution in the web_services_server directory. This code is not included with +the ESMF distribution because they can be distributed and installed independent of each other. + +

+23.2 Use and Examples +

+ +

+The following examples demonstrate how to use ESMF Web Services. + +

+ +

+ +

+ +

+23.2.1 Making a Component available through ESMF Web Services +

+ +

+In this example, a standard ESMF Component is made available through + the Web Services interface. + +

+The first step is to make sure your callback routines for initialize, run + and finalize are setup. This is done by creating a register routine that + sets the entry points for each of these callbacks. In this example, we've + packaged it all up into a separate module. +

+

+module ESMF_WebServUserModel
+
+  ! ESMF Framework module
+  use ESMF
+
+  implicit none
+
+  public ESMF_WebServUserModelRegister
+
+  contains
+
+  !-------------------------------------------------------------------------
+  !  The Registration routine
+  !  
+  subroutine ESMF_WebServUserModelRegister(comp, rc)
+    type(ESMF_GridComp)  :: comp
+    integer, intent(out) :: rc
+
+    ! Initialize return code
+    rc = ESMF_SUCCESS
+
+    print *, "User Comp1 Register starting"
+
+    ! Register the callback routines.
+
+    call ESMF_GridCompSetEntryPoint(comp, ESMF_METHOD_INITIALIZE, &
+                                    userRoutine=user_init, rc=rc)
+    if (rc/=ESMF_SUCCESS) return ! bail out
+
+    call ESMF_GridCompSetEntryPoint(comp, ESMF_METHOD_RUN, &
+                                    userRoutine=user_run, rc=rc)
+    if (rc/=ESMF_SUCCESS) return ! bail out
+
+    call ESMF_GridCompSetEntryPoint(comp, ESMF_METHOD_FINALIZE, &
+                                    userRoutine=user_final, rc=rc)
+    if (rc/=ESMF_SUCCESS) return ! bail out
+
+    print *, "Registered Initialize, Run, and Finalize routines"
+    print *, "User Comp1 Register returning"
+
+  end subroutine
+
+  !-------------------------------------------------------------------------
+  !  The Initialization routine
+  !  
+  subroutine user_init(comp, importState, exportState, clock, rc)
+    type(ESMF_GridComp)  :: comp
+    type(ESMF_State)     :: importState, exportState
+    type(ESMF_Clock)     :: clock
+    integer, intent(out) :: rc
+
+    ! Initialize return code
+    rc = ESMF_SUCCESS
+
+    print *, "User Comp1 Init"
+
+  end subroutine user_init
+
+  !-------------------------------------------------------------------------
+  !  The Run routine
+  !  
+  subroutine user_run(comp, importState, exportState, clock, rc)
+    type(ESMF_GridComp)  :: comp
+    type(ESMF_State)     :: importState, exportState
+    type(ESMF_Clock)     :: clock
+    integer, intent(out) :: rc
+
+    ! Initialize return code
+    rc = ESMF_SUCCESS
+
+    print *, "User Comp1 Run"
+
+  end subroutine user_run
+
+  !-------------------------------------------------------------------------
+  !  The Finalization routine
+  !  
+  subroutine user_final(comp, importState, exportState, clock, rc)
+    type(ESMF_GridComp)  :: comp
+    type(ESMF_State)     :: importState, exportState
+    type(ESMF_Clock)     :: clock
+    integer, intent(out) :: rc
+
+    ! Initialize return code
+    rc = ESMF_SUCCESS
+
+    print *, "User Comp1 Final"
+
+  end subroutine user_final
+
+end module ESMF_WebServUserModel
+
+ +

+The actual driver code then becomes very simple; ESMF is initialized, + the component is created, the callback functions for the component are + registered, and the Web Service loop is started. +

+

+program WebServicesEx
+#include "ESMF.h"
+
+  ! ESMF Framework module
+  use ESMF
+  use ESMF_TestMod
+
+  use ESMF_WebServMod
+  use ESMF_WebServUserModel
+
+  implicit none
+
+  ! Local variables
+  type(ESMF_GridComp) :: comp1     !! Grid Component
+  integer             :: rc        !! Return Code
+  integer             :: finalrc  !! Final return code
+  integer             :: portNum   !! The port number for the listening socket
+
+ +

+A listening socket will be created on the local machine with the specified + port number. This socket is used by the service to + wait for and receive requests from the client. Check with your system + administrator to determine an appropriate port to use for your service. +

+

+  finalrc = ESMF_SUCCESS
+
+  call ESMF_Initialize(defaultlogfilename="WebServicesEx.Log", &
+                    logkindflag=ESMF_LOGKIND_MULTI, rc=rc)
+
+ +

+

+  ! create the grid component 
+  comp1 = ESMF_GridCompCreate(name="My Component", rc=rc)
+
+ +

+

+  ! Set up the register routine 
+  call ESMF_GridCompSetServices(comp1, &
+          userRoutine=ESMF_WebServUserModelRegister, rc=rc)
+
+ +

+

+  portNum = 27060
+
+  ! Call the Web Services Loop and wait for requests to come in
+  !call ESMF_WebServicesLoop(comp1, portNum, rc=rc)
+
+ +

+The call to ESMF_WebServicesLoop will setup the listening socket for your + service and will wait for requests from a client. As requests are received, + the Web Services software will process the requests and then return to the + loop to continue to wait. + +

+The 3 main requests processed are INIT, RUN, and FINAL. These requests + will then call the appropriate callback routine as specified in your + register routine (as specified in the ESMF_GridCompSetServices call). + In this example, when the INIT request is received, the user_init routine + found in the ESMF_WebServUserModel module is called. + +

+One other request is also processed by the Component Service, and that is + the EXIT request. When this request is received, the Web Services loop + is terminated and the remainder of the code after the ESMF_WebServicesLoop + call is executed. +

+

+  call ESMF_Finalize(rc=rc)
+
+ +

+

+end program WebServicesEx
+
+ +

+ + +

+23.3 Restrictions and Future Work +

+ +

+ +

    +
  1. Manual Control of Process. +Currently, the Component Service must be manually started and stopped. Future plans include having the Process Controller be responsible for controlling the Component Service processes. +
  2. +
  3. Data Streaming. +While data can be streamed from the web server to the client, it is not yet getting the data directly from the Component Service. Instead, the Component Service exports the data to a file which the Process Controller can read and return across the network interface. The data streaming capabilities will be a major component of future improvements to the Web Services architecture. +
  4. +
+ +

+ +

+23.4 Class API +

+ +

+ +

+ +

+ +

+ +

+23.4.1 ESMF_WebServicesLoop +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_WebServicesLoop(comp, portNum, clientId, registrarHost, rc)
+
ARGUMENTS: +
     type(ESMF_GridComp)                         :: comp
+     integer,            intent(inout), optional :: portNum
+     character(len=*),   intent(in),    optional, target :: clientId
+     character(len=*),   intent(in),    optional, target :: registrarHost
+     integer,            intent(out),   optional :: rc
+
+DESCRIPTION: +
+ +

+Encapsulates all of the functionality necessary to setup a component as + a component service. On the root PET, it registers the + component service and then enters into a loop that waits for requests on + a socket. The loop continues until an "exit" request is received, at + which point it exits the loop and unregisters the service. On + any PET other than the root PET, it sets up a process block that waits + for instructions from the root PET. Instructions will come as requests + are received from the socket. + +

+The arguments are: +

+
[comp]
+
ESMF_CplComp object that represents the Grid Component for which + routine is run. + +
+
[portNum]
+
Number of the port on which the component service is listening. + +
+
[clientId]
+
Identifier of the client responsible for this component service. If a + Process Controller application manages this component service, then the + clientId is provided to the component service application in the command + line. Otherwise, the clientId is not necessary. + +
+
[registrarHost]
+
Name of the host on which the Registrar is running. Needed so the + component service can notify the Registrar when it is ready to receive + requests from clients. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+23.4.2 ESMF_WebServicesCplCompLoop +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_WebServicesCplCompLoop(comp, portNum, clientId, registrarHost, rc)
+
ARGUMENTS: +
     type(ESMF_CplComp)                         :: comp
+     integer,           intent(inout), optional :: portNum
+     character(len=*),  intent(in),    optional, target :: clientId
+     character(len=*),  intent(in),    optional, target :: registrarHost
+     integer,           intent(out),   optional :: rc
+
+DESCRIPTION: +
+ +

+Encapsulates all of the functionality necessary to setup a component as + a component service. On the root PET, it registers the + component service and then enters into a loop that waits for requests on + a socket. The loop continues until an "exit" request is received, at + which point it exits the loop and unregisters the service. On + any PET other than the root PET, it sets up a process block that waits + for instructions from the root PET. Instructions will come as requests + are received from the socket. + +

+The arguments are: +

+
[comp]
+
ESMF_CplComp object that represents the Grid Component for which + routine is run. + +
+
[portNum]
+
Number of the port on which the component service is listening. + +
+
[clientId]
+
Identifier of the client responsible for this component service. If a + Process Controller application manages this component service, then the + clientId is provided to the component service application in the command + line. Otherwise, the clientId is not necessary. + +
+
[registrarHost]
+
Name of the host on which the Registrar is running. Needed so the + component service can notify the Registrar when it is ready to receive + requests from clients. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ + +

+ +
+esmf_support@ucar.edu +
+ + diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/node5.html b/docs/nightly/fix/reconcile-info/ESMF_refdoc/node5.html new file mode 100644 index 000000000..2e2f9aa40 --- /dev/null +++ b/docs/nightly/fix/reconcile-info/ESMF_refdoc/node5.html @@ -0,0 +1,65565 @@ + + + + + +4 Infrastructure: Fields and Grids + + + + + + + + + + + + + + + + + + + + + +Subsections + + + +
+ +

+4 Infrastructure: Fields and Grids +

+ +

+24 Overview of Data Classes +

+ +

+The ESMF infrastructure data classes are part of the framework's +hierarchy of structures for handling Earth system model data and +metadata on parallel platforms. The hierarchy is in complexity; the +simplest data class in the infrastructure represents a distributed data +array and the most complex data class represents a bundle of physical +fields that are discretized on the same grid. Data class methods +are called both from user-written code and from other classes +internal to the framework. + +

+Data classes are distributed over DEs, or Decomposition Elements. +A DE represents a piece of a decomposition. A DELayout is a collection +of DEs with some associated connectivity that describes a specific +distribution. For example, the distribution of a grid divided +into four segments in the x-dimension would be expressed in ESMF as +a DELayout with four DEs lying along an x-axis. This abstract concept +enables a data decomposition to be defined in +terms of threads, MPI processes, virtual decomposition elements, or +combinations of these without changes to user code. This is a +primary strategy for ensuring optimal performance and portability +for codes using ESMF for communications. + +

+ESMF data classes provide a standard, +convenient way for developers to collect together information +related to model or observational data. The information assembled +in a data class includes a data pointer, a set of attributes +(e.g. units, although attributes can also be user-defined), and a +description of an associated grid. The same set of information within +an ESMF data object can be used by the framework to arrange +intercomponent data transfers, to perform I/O, for communications +such as gathers and scatters, for simplification of interfaces +within user code, for debugging, and for other functions. +This unifies and organizes codes overall so that the user need not +define different representations of metadata for the same field +for I/O and for component coupling. + +

+Since it is critical that users be able to introduce ESMF into their +codes easily and incrementally, ESMF data classes can be created based +on native Fortran pointers. Likewise, there are methods for retrieving +native Fortran pointers from within ESMF data objects. This allows +the user to perform allocations using ESMF, and to retrieve Fortran +arrays later for optimized model calculations. The ESMF data classes +do not have associated differential operators or other mathematical +methods. + +

+For flexibility, it is not necessary to build an ESMF data object +all at once. For example, it's possible to create a +field but to defer allocation of the associated field data until +a later time. + +

+

+ + + + + + + + + + + + + +
+
+Key Features
Hierarchy of data structures designed specifically for the Earth +system domain and high performance, parallel computing.
Multi-use ESMF structures simplify user code overall.
Data objects support incremental construction and deferred allocation.
Native Fortran arrays can be associated with or retrieved from ESMF data +objects, for ease of adoption, convenience, and performance.
A variety of operations are provided for manipulating data in data objects +such as regridding, redistribution, halo communication, and sparse matrix multiply.
+
+ +

+The main classes that are used for model and observational data manipulation +are as follows: + +

+ +

    +
  • Array An ESMF Array contains a data pointer, +information about its associated datatype, precision, and +dimension. + +

    +Data elements in Arrays are partitioned into categories +defined by the role the data element plays in distributed halo +operations. Haloing - sometimes called ghosting - is the +practice of copying portions of array data to multiple memory +locations to ensure that data dependencies can be satisfied +quickly when performing a calculation. ESMF Arrays contain +an exclusive domain, which contains data elements +updated exclusively and definitively by a given DE; a +computational domain, which contains all data elements +with values that are updated by the DE in computations; and +a total domain, which includes both the computational +domain and data elements from other DEs which may be read +but are not updated in computations. + +

    +

  • +
  • ArrayBundle ArrayBundles are collections of +Arrays that are stored in a single object. Unlike FieldBundles, +they don't need to be distributed the same way across PETs. The +motivation for ArrayBundles is both convenience and performance. + +

    +

  • +
  • Field A Field holds model and/or observational +data together with its underlying grid or set of spatial +locations. It provides methods for configuration, +initialization, setting and retrieving data values, +data I/O, data regridding, and manipulation of attributes. + +

    +

  • +
  • FieldBundle Groups of Fields on the same underlying +physical grid can be collected into a single object called a FieldBundle. +A FieldBundle provides two major functions: it allows groups of +Fields to be manipulated using a single identifier, for example +during export or import of data between Components; and +it allows data from multiple Fields to be packed together +in memory for higher locality of reference and ease in +subsetting operations. Packing a set of Fields into a single +FieldBundle before performing a data communication allows the set +to be transferred at once rather than as a Field at a time. +This can improve performance on high-latency platforms. + +

    +FieldBundle objects contain methods for setting and retrieving constituent +fields, regridding, data I/O, and reordering of data in memory. + +

    +

  • +
+ +

+ +

+24.1 Bit-for-Bit Considerations +

+ +

+Bit-for-bit reproducibility is at the core of the regression testing +schemes of many scientific model codes. The bit-for-bit requirement makes it +easy to compare the numerical results of simulation runs using standard +binary diff tools. + +

+For the most part, ESMF methods do not modify user data numerically, and +thus have no effect on the bit-for-bit characteristics of the model code. +The exceptions are the regrid weight generation and the sparse matrix +multiplication. + +

+In the case of the regrid weight generation, user data is used to produce +interpolation weights following specific numerical schemes. The bit-for-bit +reproducibility of the generated weights depends on the implementation +details. Section 24.2 provides more details about the bit-for-bit +considerations with respect to the regrid weights generated by ESMF. + +

+In the case of the sparse matrix multiplication, which is the typical method +that is used to apply the regrid weights, user data is directly manipulated +by ESMF. In order to help users with the implementation of their bit-for-bit +requirements, while also considering the associated performance impact, +the ESMF sparse matrix implementation provides three levels of bit-for-bit +support. The strictest level ensures that the numerical results are +bit-for-bit identical, even when executing across different numbers of +PETs. In the relaxed level, bit-for-bit reproducibility is guaranteed when +running across an unchanged number of PETs. The lowest level makes no +guarantees about bit-for-bit reproducibility, however, it provides the +greatest performance potential for those cases where numerical round-off +differences are acceptable. An in-depth discussion of bit-for-bit +reproducibility, and the performance aspects of route-based communication +methods, such the sparse matrix multiplication, is given in section +37.2.1. + +

+ +

+
+24.2 Regrid +

+ +

+This section describes the regridding methods provided by ESMF. Regridding, also called remapping or interpolation, is + the process of changing the grid that underlies data values while preserving qualities of the original data. Different + kinds of transformations are appropriate for different problems. Regridding may be needed when communicating data between + Earth system model components such as land and atmosphere, or between different data sets to support operations such as visualization. + +

+Regridding can be broken into two stages. The first stage is generation of an interpolation weight matrix that describes how points in + the source grid contribute to points in the destination grid. The second stage is the multiplication of values on the source grid by the + interpolation weight matrix to produce values on the destination grid. This is implemented as a parallel sparse matrix multiplication. + +

+There are two options for accessing ESMF regridding functionality: offline and integrated. Offline regridding is a process whereby interpolation + weights are generated by a separate ESMF command line tool, not within the user code. The ESMF offline regridding tool also only generates the interpolation + matrix, the user is responsible for reading in this matrix and doing the actual interpolation (multiplication by the sparse matrix) in their code. + Please see Section 12 for a description of the offline regridding command line tool and the options it supports. For user convenience, there + is also a method interface to the offline regrid tool functionality which is described in Section 24.3.1. + In contrast to offline regridding, integrated regridding is a process whereby interpolation weights are generated via subroutine calls during the + execution of the user's code. In addition to generating the weights, integrated regridding can also produce a RouteHandle (described in Section 37.1) which allows the user to perform the parallel sparse + matrix multiplication using ESMF methods. In other words, ESMF integrated regridding allows a user to perform the whole process of interpolation within their code. + +

+To see what types of grids and other options are supported in the two types of regridding and their testing status, please see the ESMF Regridding Status +webpage for this version of ESMF. + Figure 24.2 shows a comparison of different regrid interfaces and where they can be found in the documentation. + +

+The rest of this section further describes the various options available in ESMF regridding. + +

+

+
+ + + +
Table 1: +Regrid Interfaces
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameAccess viaInputsOutputsDescription
   WeightsRouteHandle 
ESMF_FieldRegridStore()Subroutine callField objectyesyesSec. 26.6.70
ESMF_FieldBundleRegridStore()Subroutine callFieldbundle obj.noyesSec. 25.5.26
ESMF_RegridWeightGen()Subroutine callGrid filesyesnoSec. 24.3.1
ESMF_RegridWeightGenCommand Line ToolGrid filesyesnoSec. 12
+ +
+

+
+ +

+ +

+
+24.2.1 Interpolation methods: bilinear +

+ Bilinear interpolation calculates the value for the + destination point as a combination of multiple linear interpolations, one for each dimension of the Grid. Note that for ease of + use, the term bilinear interpolation is used for 3D interpolation in ESMF as well, although it should more properly be referred + to as trilinear interpolation. + +

+ +

+ +

+In 2D, ESMF supports bilinear regridding between any combination of the following: + +

    +
  • Structured grids (ESMF_Grid) composed of any number of logically rectangular tiles +
  • +
  • Unstructured meshes (ESMF_Mesh) composed of polygons with any number of sides +
  • +
  • A set of disconnected points (ESMF_LocStream) may be the destination of the regridding +
  • +
  • An exchange grid (ESMF_XGrid) + +
  • +
+ +

+ +

+ +

+In 3D, ESMF supports bilinear regridding between any combination of the following: + +

    +
  • Structured grids (ESMF_Grid) composed of a single logically rectangular tile +
  • +
  • Unstructured meshes (ESMF_Mesh) composed of hexahedrons +
  • +
  • A set of disconnected points (ESMF_LocStream) may be the destination of the regridding + +
  • +
+ +

+ +

+ +

+Restrictions: + +

    +
  • Cells which contain enough identical corners to collapse to a line or point are currently ignored +
  • +
  • Self-intersecting cells (e.g. a cell twisted into a bow tie) are not supported +
  • +
  • On a spherical grid, cells which contain an edge which extends more than half way around the sphere are not supported +
  • +
  • Source Fields built on a Grid which contains a DE of width less than 2 elements are not supported + +
  • +
+ +

+To use the bilinear method the user may create their Fields on any stagger location (e.g. ESMF_STAGGERLOC_CENTER) for a Grid, or + any Mesh location (e.g. ESMF_MESHLOC_NODE) for a Mesh. For either a Grid or a Mesh, the location upon which the Field is built + must contain coordinates. This method will also work with a destination Field built on a LocStream that contains coordinates, + or with a source or destination Field built on an XGrid. + +

+ +

+
+24.2.2 Interpolation methods: higher-order patch +

+ +

+Patch (or higher-order) interpolation is the ESMF version of a technique called “patch recovery” commonly + used in finite element modeling [25] [22]. It typically results in better approximations to + values and derivatives when compared to bilinear interpolation. + Patch interpolation works by constructing multiple polynomial patches to represent + the data in a source cell. For 2D grids, these polynomials + are currently 2nd degree 2D polynomials. One patch is constructed for each corner of the source cell, and the patch is constructed + by doing a least squares fit through the data in the cells surrounding the corner. The interpolated value at the destination point is + then a weighted average of the values of the patches at that point. + +

+The patch method has a larger stencil than the bilinear, for this reason the patch weight matrix can be correspondingly larger + than the bilinear matrix (e.g. for a quadrilateral grid the patch matrix is around 4x the size of + the bilinear matrix). This can be an issue when performing a regrid operation close to the memory + limit on a machine. + +

+The patch method does not guarantee that after regridding the range of values in the destination field is within the range of + values in the source field. For example, if the mininum value in the source field is 0.0, then it's possible that after regridding with the + patch method, the destination field will contain values less than 0.0. + +

+ +

+ +

+In 2D, ESMF supports patch regridding between any combination of the following: + +

    +
  • Structured Grids (ESMF_Grid) composed of a single logically rectangular tile +
  • +
  • Unstructured meshes (ESMF_Mesh) composed of polygons with any number of sides +
  • +
  • A set of disconnected points (ESMF_LocStream) may be the destination of the regridding +
  • +
  • An exchange grid (ESMF_XGrid) + +
  • +
+ +

+ +

+ +

+In 3D, ESMF supports patch regridding between any combination of the following: + +

    +
  • NONE + +
  • +
+ +

+ +

+ +

+Restrictions: + +

    +
  • Cells which contain enough identical corners to collapse to a line or point are currently ignored +
  • +
  • Self-intersecting cells (e.g. a cell twisted into a bow tie) are not supported +
  • +
  • On a spherical grid, cells which contain an edge which extends more than half way around the sphere are not supported +
  • +
  • Source Fields built on a Grid which contains a DE of width less than 2 elements are not supported + +
  • +
+ +

+To use the patch method the user may create their Fields on any stagger location (e.g. ESMF_STAGGERLOC_CENTER) for a Grid, or + any Mesh location (e.g. ESMF_MESHLOC_NODE) for a Mesh. For either a Grid or a Mesh, the location upon which the Field is built + must contain coordinates. This method will also work with a destination Field built on a LocStream that contains coordinates, + or with a source or destination Field built on an XGrid. + +

+ +

+
+24.2.3 Interpolation methods: nearest source to destination +

+In nearest source to destination interpolation (ESMF_REGRIDMETHOD_NEAREST_STOD) each destination point is mapped to the closest source point. A given source point may map to multiple destination points, but no destination point will receive input from more than one source point. If two points are equally close, then the point with the smallest sequence index is arbitrarily used (i.e. the point which would have the smallest index in the weight matrix). + +

+ +

+ +

+In 2D, ESMF supports nearest source to destination regridding between any combination of the following: + +

    +
  • Structured Grids (ESMF_Grid) composed of any number of logically rectangular tiles +
  • +
  • Unstructured meshes (ESMF_Mesh) composed of polygons with any number of sides +
  • +
  • A set of disconnected points (ESMF_LocStream) +
  • +
  • An exchange grid (ESMF_XGrid) + +
  • +
+ +

+ +

+ +

+In 3D, ESMF supports nearest source to destination regridding between any combination of the following: + +

    +
  • Structured Grids (ESMF_Grid) composed of any number of logically rectangular tiles +
  • +
  • Unstructured Meshes (ESMF_Mesh) composed of hexahedrons (e.g. cubes) and tetrahedrons +
  • +
  • A set of disconnected points (ESMF_LocStream) + +
  • +
+ +

+ +

+ +

+Restrictions: +
+NONE + +

+ +

+ +

+To use the nearest source to destination method the user may create their Fields on any stagger location (e.g. ESMF_STAGGERLOC_CENTER) for a Grid, or + any Mesh location (e.g. ESMF_MESHLOC_NODE) for a Mesh. For either a Grid or a Mesh, the location upon which the Field is built + must contain coordinates. This method will also work with a source or destination Field built on a LocStream that contains coordinates, or when the source +or destination Field is built on an XGrid. + +

+ +

+
+24.2.4 Interpolation methods: nearest destination to source +

+In nearest destination to source interpolation (ESMF_REGRIDMETHOD_NEAREST_DTOS) each source point is mapped to the closest destination point. A given destination point may receive input from multiple source points, but no source point will map to more than one destination point. If two points are equally close, then the point with the smallest sequence index is arbitrarily used (i.e. the point which would have the smallest index in the weight matrix). Note that with this method the unmapped destination point detection currently doesn't work, so no error will be returned even if there are destination points that don't map to any source point. + +

+ +

+ +

+In 2D, ESMF supports nearest destination to source regridding between any combination of the following: + +

    +
  • Structured Grids (ESMF_Grid) composed of any number of logically rectangular tiles +
  • +
  • Unstructured meshes (ESMF_Mesh) composed of polygons with any number of sides +
  • +
  • A set of disconnected points (ESMF_LocStream) +
  • +
  • An exchange grid (ESMF_XGrid) + +
  • +
+ +

+ +

+ +

+In 3D, ESMF supports nearest destination to source regridding between any combination of the following: + +

    +
  • Structured Grids (ESMF_Grid) composed of any number of logically rectangular tiles +
  • +
  • Unstructured Meshes (ESMF_Mesh) composed of hexahedrons (e.g. cubes) and tetrahedrons +
  • +
  • A set of disconnected points (ESMF_LocStream) + +
  • +
+ +

+ +

+ +

+Restrictions: +
+ +

    +
  • The unmapped destination point detection doesn't currently work for this method. Even if there are unmapped points, no error will be returned. +
  • +
+ +

+ +

+ +

+To use the nearest destination to source method the user may create their Fields on any stagger location (e.g. ESMF_STAGGERLOC_CENTER) for a Grid, or + any Mesh location (e.g. ESMF_MESHLOC_NODE) for a Mesh. For either a Grid or a Mesh, the location upon which the Field is built + must contain coordinates. This method will also work with a source or destination Field built on a LocStream that contains coordinates, or when the source +or destination Field is built on an XGrid. + +

+ +

+
+24.2.5 Interpolation methods: first-order conservative +

+ The goal of this method is to preserve the integral of the field across the interpolation from source to destination. + (For a more in-depth description of what this preservation of the integral (i.e. conservation) means please see section 24.2.7.) In this method the value across each source cell is treated as a constant, so it will typically have a larger + interpolation error than the bilinear or patch methods. The first-order method used here is similar to that described in the following paper [28]. + +

+In the first-order method, the values for a particular destination cell are a calculated as a combination of the values of the intersecting + source cells. The weight of a given source cell's contribution + to the total being the amount that that source cell overlaps with the destination cell. + In particular, the weight is the ratio of the area of intersection of the source and destination cells to the area of the whole destination cell. + +

+To see a description of how the different normalization options affect the values and integrals produced by the conservative methods see section 24.2.8. For Grids, Meshes, or XGrids on a sphere this method uses great circle cells, for a description of potential problems with these see 24.2.9. + +

+ +

+ +

+In 2D, ESMF supports conservative regridding between any combination of the following: + +

    +
  • Structured Grids (ESMF_Grid) composed of any number of logically rectangular tiles +
  • +
  • Unstructured meshes (ESMF_Mesh) composed of polygons with any number of sides +
  • +
  • An exchange grid (ESMF_XGrid) + +
  • +
+ +

+ +

+ +

+In 3D, ESMF supports conservative regridding between any combination of the following: + +

    +
  • Structured Grids (ESMF_Grid) composed of a single logically rectangular tile +
  • +
  • Unstructured Meshes (ESMF_Mesh) composed of hexahedrons (e.g. cubes) and tetrahedrons + +
  • +
+ +

+ +

+ +

+Restrictions: + +

    +
  • Cells which contain enough identical corners to collapse to a line or point are optionally (via a flag) either ignored or return an error +
  • +
  • Self-intersecting cells (e.g. a cell twisted into a bow tie) are not supported +
  • +
  • On a spherical grid, cells which contain an edge which extends more than half way around the sphere are not supported +
  • +
  • Source or destination Fields built on a Grid which contains a DE of width less than 2 elements are not supported + +
  • +
+ +

+ +

+ +

+To use the conservative method the user should create their Fields on the center + stagger location (ESMF_STAGGERLOC_CENTER in 2D or ESMF_STAGGERLOC_CENTER_VCENTER in 3D) for Grids or the element location (ESMF_MESHLOC_ELEMENT) for Meshes. + For Grids, the corner stagger location (ESMF_STAGGERLOC_CORNER in 2D or ESMF_STAGGERLOC_CORNER_VFACE in 3D) must contain coordinates describing the outer perimeter of the Grid cells. This method will also work when the source or destination Field is built on an XGrid. + +

+ +

+
+24.2.6 Interpolation methods: second-order conservative +

+ Like the first-order conservative method, this method's goal is to preserve the integral of the field across the interpolation from source to destination. + (For a more in-depth description of what this preservation of the integral (i.e. conservation) means please see section 24.2.7.) The difference between the first and second-order conservative methods is that the second-order takes the source gradient into account, so + it yields a smoother destination field that typically better matches the source field. This difference between the first and second-order methods + is particularly apparent when going from a coarse source grid to a finer destination grid. Another difference is that the second-order method + does not guarantee that after regridding the range of values in the destination field is within the range of + values in the source field. For example, if the mininum value in the source field is 0.0, then it's possible that after regridding with the + second-order method, the destination field will contain values less than 0.0. The implementation of this method is based on the one + described in this paper [19]. + +

+Like the first-order method, the values for a particular destination cell with the second-order method + are a combination of the values of the intersecting source cells with the weight of a given source cell's contribution to the total + being the amount that that source cell overlaps with the destination cell. + However, with the second-order conservative interpolation there are additional terms that take into account the gradient of the field + across the source cell. In particular, the value $d$ for a given destination cell is calculated as: + +

+ +$d=\sum^{intersecting-source-cells}_{i}(s_{i}+\nabla s_{i} \cdot (c_{si}-c_{d}))$ + +

+ +

+ +

+Where: +
+

+
+
$s_{i}$
+
is the intersecting source cell value. + +
+
$\nabla s_{i}$
+
is the intersecting source cell gradient. + +
+
$c_{si}$
+
is the intersecting source cell centroid. + +
+
$c_{d}$
+
is the destination cell centroid. +
+
+ +

+ +

+ +

+To see a description of how the different normalization options affect the values and integrals produced by the conservative methods see section 24.2.8. For Grids, Meshes, or XGrids on a sphere this method uses great circle cells, for a description of potential problems with these see 24.2.9. + +

+ +

+ +

+In 2D, ESMF supports second-order conservative regridding between any combination of the following: + +

    +
  • Structured Grids (ESMF_Grid) composed of any number of logically rectangular tiles +
  • +
  • Unstructured meshes (ESMF_Mesh) composed of polygons with any number of sides +
  • +
  • An exchange grid (ESMF_XGrid) + +
  • +
+ +

+ +

+ +

+In 3D, ESMF supports second-order conservative regridding between any combination of the following: + +

    +
  • NONE + +
  • +
+ +

+ +

+ +

+Restrictions: + +

    +
  • Cells which contain enough identical corners to collapse to a line or point are optionally (via a flag) either ignored or return an error +
  • +
  • Self-intersecting cells (e.g. a cell twisted into a bow tie) are not supported +
  • +
  • On a spherical grid, cells which contain an edge which extends more than half way around the sphere are not supported +
  • +
  • Source or destination Fields built on a Grid which contains a DE of width less than 2 elements are not supported + +
  • +
+ +

+ +

+ +

+To use the second-order conservative method the user should create their Fields on the center + stagger location (ESMF_STAGGERLOC_CENTER for Grids or the element location (ESMF_MESHLOC_ELEMENT) for Meshes. + For Grids, the corner stagger location (ESMF_STAGGERLOC_CORNER in 2D must contain coordinates describing the outer perimeter of the Grid cells. + This method will also work when the source or destination Field is built on an XGrid. + +

+ +

+
+24.2.7 Conservation +

+ Conservation means that the following equation will hold: +$\sum^{all-source-cells}(V_{si}*A_{si}) = \sum^{all-destination-cells}(V_{dj}*A_{dj})$, where + V is the variable being regridded and A is the area of a cell. The subscripts s and d refer to source and destination values, and the i and j are the source and destination grid cell indices (flattening the arrays to 1 dimension). + +

+If the user doesn't specify a cell areas in the involved Grids or Meshes, then the areas (A) in the above equation are calculated by ESMF. + For Cartesian grids, the area of a grid cell calculated by ESMF is the typical Cartesian area. + For grids on a sphere, cell areas are calculated by connecting the corner coordinates of each grid cell with great circles. If the user + does specify the areas in the Grid or Mesh, then the conservation will be adjusted to work for the areas + provided by the user. This means that the above equation will hold, but with the areas (A) being the ones specified by the user. + +

+The user should be aware that because of the conservation relationship between the source and destination fields, the more the total source area + differs from the total destination area the more the values of the source field will differ from the corresponding values of the destination field, + likely giving a higher interpolation error. It is best to have the total source and destination areas the same + (this will automatically be true if no user areas are specified). For source and destination grids + that only partially overlap, the overlapping regions of the source and destination should be the same. + +

+ +

+
+24.2.8 The effect of normalization options on integrals and values produced by conservative methods +

+ It is important to note that by default (i.e. using destination area normalization) +conservative regridding doesn't normalize the interpolation weights by the destination fraction. +This means that for a destination grid which only partially overlaps the source grid +the destination field that is output from the regrid operation +should be divided by the corresponding destination fraction to yield the +true interpolated values for cells which are only partially covered by the source grid. +The fraction also needs to be included when computing the total source and destination integrals. +(To include the fraction in the conservative weights, the user can specify +the fraction area normalization type. This can be done by specifying normType=ESMF_NORMTYPE_FRACAREA when +invoking ESMF_FieldRegridStore().) + +

+For weights generated using destination area normalization (either by not specifying any normalization type or by specifying normType=ESMF_NORMTYPE_DSTAREA), if a destination field extends +outside the unmasked source field, then the values of the cells which +extend partway outside the unmasked source field are decreased by the fraction they extend outside. +To correct these values, the destination field (dst_field) resulting +from the ESMF_FieldRegrid() call can be divided by the destination fraction dst_frac +from the ESMF_FieldRegridStore() call. The following pseudocode demonstrates how to do this: + +

+

+
+ for each destination element i
+    if (dst_frac(i) not equal to 0.0) then
+       dst_field(i)=dst_field(i)/dst_frac(i)
+    end if
+ end for
+
+ +

+For weights generated using destination area normalization (either by not specifying any normalization type or by specifying normType=ESMF_NORMTYPE_DSTAREA), +the following pseudo-code shows how to compute the total destination integral (dst_total) given the +destination field values (dst_field) resulting +from the ESMF_FieldRegrid() call, the destination area (dst_area) from the ESMF_FieldRegridGetArea() call, and the destination fraction (dst_frac) from the ESMF_FieldRegridStore() call. As shown in the previous paragraph, it also +shows how to adjust the destination field (dst_field) resulting from the ESMF_FieldRegrid() call by the +fraction (dst_frac) from the ESMF_FieldRegridStore() call: + +

+

+
+ dst_total=0.0
+ for each destination element i
+    if (dst_frac(i) not equal to 0.0) then
+       dst_total=dst_total+dst_field(i)*dst_area(i) 
+       dst_field(i)=dst_field(i)/dst_frac(i)
+       ! If mass computed here after dst_field adjust, would need to be:
+       ! dst_total=dst_total+dst_field(i)*dst_area(i)*dst_frac(i) 
+    end if
+ end for
+
+ +

+For weights generated using fraction area normalization (by specifying normType=ESMF_NORMTYPE_FRACAREA), +no adjustment of the destination field is necessary. The following pseudo-code shows how to compute +the total destination integral (dst_total) given the +destination field values (dst_field) resulting +from the ESMF_FieldRegrid() call, the destination area (dst_area) from the ESMF_FieldRegridGetArea() +call, and the destination fraction (dst_frac) from the ESMF_FieldRegridStore() call: + +

+

+ dst_total=0.0
+ for each destination element i
+      dst_total=dst_total+dst_field(i)*dst_area(i)*dst_frac(i) 
+ end for
+
+ +

+For both normalization types, the following pseudo-code shows how to compute the total source integral (src_total) given the source field values + (src_field), the source area (src_area) from the ESMF_FieldRegridGetArea() call, and + the source fraction (src_frac) from the ESMF_FieldRegridStore() call: + +

+

+ src_total=0.0
+ for each source element i
+    src_total=src_total+src_field(i)*src_area(i)*src_frac(i)
+ end for
+
+ +

+ +

+
+24.2.9 Great circle cells +

+ For Grids, Meshes, or XGrids on a sphere some combinations of interpolation options + (e.g. first and second-order conservative methods) use cells whose edges are great circles. This section describes some behavior + that the user may not expect from these cells and some potential solutions. + +

+A great circle edge isn't necessarily the same as a straight line in latitude longitude space. + For small edges, this difference will be small, but for long edges it + could be significant. This means if the user expects cell edges as straight lines in latitude longitude + space, they should avoid using one large cell with + long edges to compute an average over a region (e.g. over an ocean basin). + +

+Also, the user should also avoid using cells that contain one edge that runs half way or more around the earth, because the + regrid weight calculation assumes the edge follows the shorter great circle path. + There isn't a unique great circle edge defined between points on the + exact opposite side of the earth from one another (antipodal points). + However, the user can work around both of these problem by breaking the long edge into two smaller edges by inserting + an extra node, or by breaking the large target grid cells + into two or more smaller grid cells. This allows the application to resolve the ambiguity in edge direction. + +

+ +

+ +
+24.2.10 Masking +

+Masking is the process whereby parts of a Grid, Mesh, or LocStream +can be marked to be ignored during an operation, such as when they +are used in regridding. Masking can be used on a Field created from +a regridding source to indicate that certain portions should not be +used to generate regridded data. This is useful, for example, if a +portion of the source contains unusable values. Masking can also be +used on a Field created from a regridding destination to indicate +that a certain portion should not receive regridded data. This is +useful, for example, when part of the destination isn't being used +(e.g. the land portion of an ocean grid). + +

+The user may mask out points in the source +Field or destination Field or both. To do masking the user sets +mask information in the Grid (see 31.3.17), Mesh +(see 33.3.11), or LocStream (see 32.2.2) +upon which the Fields passed into the +ESMF_FieldRegridStore() call are built. The srcMaskValues +and dstMaskValues arguments to that +call can then be used to specify which values in that mask +information indicate that a location should be masked out. For +example, if dstMaskValues is set to (/1,2/), then any location that +has a value of 1 or 2 in the mask information of the Grid, Mesh or LocStream +upon which the destination Field is built will be masked out. + +

+Masking behavior differs slightly between regridding methods. For +non-conservative regridding methods (e.g. bilinear or high-order +patch), masking is done on points. For these methods, masking a +destination point means that that point won't participate in +regridding (e.g. won't be interpolated to). For these methods, +masking a source point means that the entire source cell using +that point is masked out. In other words, if any corner point +making up a source cell is masked then the cell is masked. For +conservative regridding methods (e.g. first-order conservative) +masking is done on cells. Masking a destination cell means that +the cell won't participate in regridding (e.g. won't be +interpolated to). Similarly, masking a source cell means that the +cell won't participate in regridding (e.g. won't be interpolated +from). For any type of interpolation method (conservative or +non-conservative) the masking is set on the location upon +which the Fields passed into the regridding call are built. +For example, if Fields built on ESMF_STAGGERLOC_CENTER are +passed into the ESMF_FieldRegridStore() call then the masking +should also be set on ESMF_STAGGERLOC_CENTER. + +

+ +

+
+24.2.11 Extrapolation methods: overview +

+ +

+Extrapolation in the ESMF regridding system is a way to automatically fill some or all of the +destination points left unmapped by a regridding method. Weights generated by +the extrapolation method are merged into the regridding weights to yield one set of weights or +routehandle. Currently extrapolation is not supported with conservative regridding methods, because +doing so would result in non-conservative weights. + +

+ +

+
+24.2.12 Extrapolation methods: nearest source to destination +

+In nearest source to destination extrapolation (ESMF_EXTRAPMETHOD_NEAREST_STOD) each unmapped +destination point is mapped to the closest source point. A given source point may map to +multiple destination points, but no destination point will receive input from more than one source point. +If two points are equally close, then the point with the smallest sequence index is arbitrarily used +(i.e. the point which would have the smallest index in the weight matrix). + +

+If there is at least one unmasked source point, then this method is expected to fill all unmapped points. + +

+ +

+
+24.2.13 Extrapolation methods: inverse distance weighted average +

+In inverse distance weighted average extrapolation (ESMF_EXTRAPMETHOD_NEAREST_IDAVG) each unmapped +destination point is the weighted average of the closest N source points. The weight is +the reciprocal of the distance of the source point from the destination point raised to a power P. +All the weights contributing to one destination point are normalized so that they sum to 1.0. +The user can choose N and P when using this method, but defaults are also provided. For example, when +calling ESMF_FieldRegridStore() N is specified via the argument extrapNumSrcPnts and +P is specified via the argument extrapDistExponent. + +

+If there is at least one unmasked source point, then this method is expected to fill all unmapped points. + +

+ +

+
+24.2.14 Extrapolation methods: creep fill +

+In creep fill extrapolation (ESMF_EXTRAPMETHOD_CREEP) unmapped destination points are filled by +repeatedly moving data from mapped locations to neighboring unmapped locations for a user specified +number of levels. More precisely, for each creeped point, its value is the average of the values of the +point's immediate neighbors in the previous level. For the first level, the values are the average of the +point's immediate neighbors in the destination points mapped by the regridding method. The number of creep levels +is specified by the user. For example, in ESMF_FieldRegridStore() this number of levels is specified +via the extrapNumLevels argument. + +

+Unlike some extrapolation methods, creep fill does not necessarily +fill all unmapped destination points. Unfilled destination points are still unmapped with the usual +consequences (e.g. they won't be in the resulting regridding matrix, and won't be set by the application +of the regridding weights). + +

+Because it depends on the connections in the destination grid, creep fill extrapolation is not supported when the +destination Field is built on a Location Stream (ESMF_LocStream). Also, creep fill is currently only supported for +2D Grids, Meshes, or XGrids + +

+ +

+24.2.15 Unmapped destination points +

+ If a destination point can't be mapped to a location in the source grid by the combination of regrid method and + optional follow on extrapolation method, then the user has two choices. The user may ignore those destination points + that can't be mapped by setting the unmappedaction argument to ESMF_UNMAPPEDACTION_IGNORE (Ignored points won't be included in + the sparse matrix or routeHandle). If the user needs the unmapped points, the ESMF_FieldRegridStore() method has the capability to return + a list of them using the unmappedDstList argument. In addition to ignoring them, the user also has the option to return + an error if unmapped destination points exist. This is the default behavior, so the user can either not set the unmappedaction argument + or the user can set it to ESMF_UNMAPPEDACTION_ERROR. Currently, the unmapped destination error detection doesn't + work with the nearest destination to source regrid method (ESMF_REGRIDMETHOD_NEAREST_DTOS), so with this method the regridding + behaves as if ESMF_UNMAPPEDACTION_IGNORE is always on. + +

+ +

+24.2.16 Spherical grids and poles +

+In the case that the Grid is on a sphere (coordSys=ESMF_COORDSYS_SPH_DEG or ESMF_COORDSYS_SPH_RAD) +then the coordinates given in the Grid are interpreted as latitude and longitude values. The coordinates can either be in degrees or radians as indicated by the +coordSys flag set during Grid creation. As is true with many global models, this application currently assumes the latitude and longitude refer to positions on a +perfect sphere, as opposed to a more complex and accurate representation of the Earth's true shape such as would be used in a GIS system. (ESMF's current user base doesn't +require this level of detail in representing the Earth's shape, but it could be added in the future if necessary.) + +

+For Grids on a sphere, the regridding occurs in 3D Cartesian to avoid +problems with periodicity and with the pole singularity. This library + supports four options for handling the pole region (i.e. the empty area above the top row of the source grid or below + the bottom row of the source grid). Note that all of these pole options currently only work for the Fields build on the Grid class. + +

+The first option is to leave the pole region empty (polemethod=ESMF_POLEMETHOD_NONE), in this + case if a destination point lies above or below the + top row of the source grid, it will fail to map, yielding an error (unless unmappedaction=ESMF_UNMAPPEDACTION_IGNORE is specified). + +

+With the next two options (ESMF_POLEMETHOD_ALLAVG and ESMF_POLEMETHOD_NPNTAVG), the pole region is handled by constructing + an artificial pole in the center of the top and bottom row of grid points and then filling + in the region from this pole to the edges of the source grid with triangles. + The pole is located at the average of the position of the points surrounding + it, but moved outward to be at the same radius as the rest of the points + in the grid. The difference between the two artificial pole options is what value is used at the pole. + The option (polemethod=ESMF_POLEMETHOD_ALLAVG) sets the value at the pole to be the average of the values + of all of the grid points surrounding the pole. The option (polemethod=ESMF_POLEMETHOD_NPNTAVG) allows the user to choose + a number N from 1 to the number of source grid points around the pole. The value N is set via the argument regridPoleNPnts. For + each destination point, the value at the pole is then the average of the N source points + surrounding that destination point. + +

+The last option (polemethod=ESMF_POLEMETHOD_TEETH) does not construct an artificial pole, instead the + pole region is covered by connecting points across the top and bottom row of the source Grid into triangles. As + this makes the top and bottom of the source sphere flat, for a big enough difference between the size of + the source and destination pole regions, this can still result in unmapped destination points. + Only pole option ESMF_POLEMETHOD_NONE is currently supported with the conservative interpolation methods + (e.g. regridmethod=ESMF_REGRIDMETHOD_CONSERVE) and with the nearest neighbor interpolation options (e.g. regridmethod=ESMF_REGRIDMETHOD_NEAREST_STOD). + +

+

+
+ + + +
Table 2: +Line Type Support by Regrid Method (* indicates the default)
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Regrid MethodLine Type
 ESMF_LINETYPE_CARTESMF_LINETYPE_GREAT_CIRCLE
ESMF_REGRIDMETHOD_BILINEARY*Y
ESMF_REGRIDMETHOD_PATCHY*Y
ESMF_REGRIDMETHOD_NEAREST_STODY*N
ESMF_REGRIDMETHOD_NEAREST_DTOSY*N
ESMF_REGRIDMETHOD_CONSERVEN/AY*
ESMF_REGRIDMETHOD_CONSERVE_2NDN/AY*
+ +
+

+
+ +

+Another variation in the regridding supported with spherical grids is line type. This is controlled in the +ESMF_FieldRegridStore() method by the lineType argument. This argument allows the user to select the path of the line which connects +two points on a sphere surface. This in turn controls the path along which distances are calculated and the shape of +the edges that make up a cell. Both of these quantities can influence how interpolation weights are calculated, for example in +bilinear interpolation the distances are used to calculate the weights and the cell edges are used to determine to which source +cell a destination point should be mapped. + +

+ESMF currently supports two line types: ESMF_LINETYPE_CART and ESMF_LINETYPE_GREAT_CIRCLE. The ESMF_LINETYPE_CART option +specifies that the line between two points follows a straight path through the 3D Cartesian space in which the sphere is embedded. +Distances are measured along +this 3D Cartesian line. Under this option cells are approximated by planes in 3D space, and their boundaries are 3D Cartesian lines +between their corner points. The ESMF_LINETYPE_GREAT_CIRCLE option specifies that the line between two points follows +a great circle path along the sphere surface. (A great circle is the shortest path between two points on a sphere.) +Distances are measured along the great circle path. Under this option cells are on the sphere surface, and their boundaries +are great circle paths between their corner points. + +

+Figure 24.2.16 shows which line types are supported for each regrid method as well as the defaults (indicated by *). + +

+ +

+
+24.2.17 Vector regridding +

+ +

+ESMF's initial vector regridding capability is intended to give cleaner results for 2D spherical vectors expressed in +terms of local directions (e.g. east and north) than regridding each vector component separately. To do this, it +converts the vectors to 3D Cartesian space and then does the regridding there. This allows all the vectors participating in +the regridding to have a consistent representation. After regridding, the resulting 3D vectors are then converted +back to the local direction form. This entire process is expressed in the usual weight matrix and/or routeHandle form and so +the typical ESMF_FieldRegridStore()/ESMF_FieldRegrid()/ESMF_FieldRegridRelease() regridding paradigm can be used. +However, the weight matrix will be in the format that allows it to contain tensor dimension indices (i.e. the leading +dimension of the factorIndexList will be of size 4). + +

+In this initial version, the meaning of the different entries in the vector dimension are fixed. They will be interpreted as: +
+

+
+
1st entry
+
the east component of the vector + +
+
2nd entry
+
the north component of the vector +
+
+ +

+Note that because the different components are mixed, using vector regridding with a conservative regrid method will not necessarily produce vectors whose components are conservative. + +

+ +

+24.2.18 Troubleshooting guide +

+ +

+The below is a list of problems users commonly encounter with regridding and potential solutions. + This is by no means an exhaustive list, so if none of these problems fit your case, or if the solutions + don't fix your problem, please feel free to email esmf support (esmf_support@ucar.edu). + +

+ +

+
+ +

+Problem: Regridding is too slow. + +

+ +

+
+ +

+Possible Cause: The ESMF_FieldRegridStore() method is called more than is necessary.
+The ESMF_FieldRegridStore() operation is a complex one and can be + relatively slow for some cases (large Grids, 3D grids, etc.) + +

+ +

+ +

+Solution: Reduce the number of ESMF_FieldRegridStore() calls to the minimum necessary. The + routeHandle generated by the ESMF_FieldRegridStore() call depends on only four factors: the + stagger locations that the input Fields are created on, the coordinates in the Grids the input Fields + are built on at those stagger locations, the padding of the input Fields + (specified by the totalWidth arguments in FieldCreate) and the size of the tensor + dimensions in the input Fields (specified by the ungridded arguments in FieldCreate). + For any pair of Fields which share these attributes with the Fields used in the + ESMF_FieldRegridStore call the same routeHandle can be used. Note that the data in the + Fields does NOT matter, the same routeHandle can be used no matter how the data in the Fields changes. + +

+ +

+ +

+In particular: + +

    +
  • If Grid coordinates do not change during a run, then the ESMF_FieldRegridStore() call can be + done once between a pair of Fields at the beginning and the resulting routeHandle used for each + timestep during the run. + +

    +

  • +
  • If a pair of Fields was created with exactly the same arguments to ESMF_FieldCreate() as the + pair of Fields used during an ESMF_FieldRegridStore() call, then the resulting routeHandle can + also be used between that pair of Fields. + +
  • +
+ +

+ +

+
+ +

+Problem: Distortions in destination Field at periodic boundary. + +

+ +

+
+ +

+Possible Cause: The Grid overlaps itself. With a periodic Grid, the regrid system expects + the first point to not be a repeat of the last point. In other words, + regrid constructs its own connection and overlap between the first and last points of the + periodic dimension and so the Grid doesn't need to contain these. If the Grid does, then this + can cause problems. + +

+ +

+ +

+Solution: Define the Grid so that it doesn't contain the overlap point. This typically means simply making + the Grid one point smaller in the periodic dimension. If a Field + constructed on the Grid needs to contain these overlap points then the user can use the + totalWidth arguments to include this extra padding in the Field. Note, however, + that the regrid won't update these extra points, so the user will have to do a copy to fill the points + in the overlap region in the Field. + +

+ +

+24.2.19 Restrictions and Future Work +

+This section contains restrictions that apply to the entire regridding system. For restrictions that apply to just one interpolation method, see the section corresponding to that method above. + +

+ +

    +
  • Regridding doesn't work on a Field created on a Grid with an arbitrary distribution: Using a Field built on a Grid with an arbitrary distribution will cause the regridding to stop with an error. + +

    +

  • +
+ +

+ +

+24.2.20 Design and implementation notes +

+ +

+The ESMF regrid weight calculation functionality has been designed to enable it to support a wide range +of grid and interpolation types without needing to support each individual combination of source grid type, +destination grid type, and interpolation method. To avoid the quadratic growth of the number of pairs +of grid types, all grids are converted to a common internal format and the regrid weight calculation +is performed on that format. This vastly reduces the variety of grids that need to be supported in +the weight calculations for each interpolation method. It also has the added benefit of making it +straightforward to add new grid types and to allow them to work with all the existing grid types. +To hook into the existing weight calculation code, the new type just needs to be converted to the +internal format. + +

+The internal grid format used by the ESMF regrid weight calculation is a finite element +unstructured mesh. This was chosen because it was the most general format and all the others could be +converted to it. The ESMF finite element unstructured mesh (ESMF FEM) is similar in some respects to the SIERRA [20] package +developed at Sandia National Laboratory. The ESMF code relies on some of the same underlying toolkits (e.g. Zoltan [18] library +for calculating mesh partitions) and adds a layer on top that allows the calculation of regrid weights and some mesh operations +(e.g. mesh redistribution) that ESMF needs. The ESMF FEM has similar notions to SIERRA about the basic structure of the +mesh entities, fields, iteration and a similar notion of parallel distribution. + +

+Currently we use the ESMF FEM internal mesh to hold the structure of our Mesh class and +in our regrid weight calculation. The parts of the internal FEM code that are used/tested by ESMF are the following: + +

    +
  • The creation of a mesh composed of triangles and quadrilaterals or hexahedrons and tetrahedrons. +
  • +
  • The object relations data base to store the connections between objects (e.g. which element contains which nodes). +
  • +
  • The fields to hold data (e.g. coordinates). We currently only build fields on nodes and elements (2D and 3D). +
  • +
  • Iteration to move through mesh entities. +
  • +
  • The parallel code to maintain information about the distribution of the mesh across processors and to communicate data between parts of the mesh on different processors (i.e. halos). +
  • +
+ +

+ +

+24.3 File-based Regrid API +

  + +

+ +

+ +

+ +

+24.3.1 ESMF_RegridWeightGen - Generate regrid weight file from grid files +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_RegridWeightGen()
+   subroutine ESMF_RegridWeightGenFile(srcFile, dstFile, &
+     weightFile, rhFile, regridmethod, polemethod, regridPoleNPnts, lineType, normType, &
+     extrapMethod, extrapNumSrcPnts, extrapDistExponent, extrapNumLevels, &
+     unmappedaction, ignoreDegenerate, srcFileType, dstFileType, &
+     srcRegionalFlag, dstRegionalFlag, srcMeshname, dstMeshname,  &
+     srcMissingvalueFlag, srcMissingvalueVar, &
+     dstMissingvalueFlag, dstMissingvalueVar, &
+     useSrcCoordFlag, srcCoordinateVars, &
+     useDstCoordFlag, dstCoordinateVars, &
+     useSrcCornerFlag, useDstCornerFlag, &
+     useUserAreaFlag, largefileFlag, &
+     netcdf4fileFlag, weightOnlyFlag, &
+     tileFilePath, &
+     verboseFlag, checkFlag, rc)
+
ARGUMENTS: +
 
+   character(len=*),             intent(in)            :: srcFile
+   character(len=*),             intent(in)            :: dstFile
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+   character(len=*),             intent(in),  optional :: weightFile
+   character(len=*),             intent(in),  optional :: rhFile
+   type(ESMF_RegridMethod_Flag), intent(in),  optional :: regridmethod
+   type(ESMF_PoleMethod_Flag),   intent(in),  optional :: polemethod
+   integer,                      intent(in),  optional :: regridPoleNPnts
+   type(ESMF_LineType_Flag),     intent(in),  optional :: lineType
+   type(ESMF_NormType_Flag),     intent(in),  optional :: normType
+   type(ESMF_ExtrapMethod_Flag),   intent(in),    optional :: extrapMethod
+   integer,                        intent(in),    optional :: extrapNumSrcPnts
+   real,                           intent(in),    optional :: extrapDistExponent
+   integer,                      intent(in), optional :: extrapNumLevels
+   type(ESMF_UnmappedAction_Flag),intent(in), optional :: unmappedaction
+   logical,                      intent(in),  optional :: ignoreDegenerate
+   type(ESMF_FileFormat_Flag),   intent(in),  optional :: srcFileType
+   type(ESMF_FileFormat_Flag),   intent(in),  optional :: dstFileType
+   logical,                      intent(in),  optional :: srcRegionalFlag
+   logical,                      intent(in),  optional :: dstRegionalFlag
+   character(len=*),             intent(in),  optional :: srcMeshname
+   character(len=*),             intent(in),  optional :: dstMeshname
+   logical,                      intent(in),  optional :: srcMissingValueFlag
+   character(len=*),             intent(in),  optional :: srcMissingValueVar
+   logical,                      intent(in),  optional :: dstMissingValueFlag
+   character(len=*),             intent(in),  optional :: dstMissingValueVar
+   logical,                      intent(in),  optional :: useSrcCoordFlag
+   character(len=*),             intent(in),  optional :: srcCoordinateVars(:)
+   logical,                      intent(in),  optional :: useDstCoordFlag
+   character(len=*),             intent(in),  optional :: dstCoordinateVars(:)
+   logical,                      intent(in),  optional :: useSrcCornerFlag
+   logical,                      intent(in),  optional :: useDstCornerFlag
+   logical,                      intent(in),  optional :: useUserAreaFlag
+   logical,                      intent(in),  optional :: largefileFlag
+   logical,                      intent(in),  optional :: netcdf4fileFlag
+   logical,                      intent(in),  optional :: weightOnlyFlag
+   character(len=*),             intent(in),  optional :: tileFilePath
+   logical,                      intent(in),  optional :: verboseFlag
+   logical,                      intent(in),  optional :: checkFlag
+   integer,                      intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+This subroutine provides the same function as the ESMF_RegridWeightGen application + described in Section 12. It takes two grid files in NetCDF format and writes out an + interpolation weight file also in NetCDF format. The interpolation weights can be generated with the + bilinear (24.2.1), higher-order patch (24.2.2), + or first order conservative (24.2.5) methods. The grid files can be in + one of the following four formats: + +

    +
  • The SCRIP format (12.8.1) +
  • +
  • The native ESMF format for an unstructured grid (12.8.2) +
  • +
  • The CF Convention Single Tile File format (12.8.3) +
  • +
  • The proposed CF Unstructured grid (UGRID) format (12.8.4) +
  • +
  • The GRIDSPEC Mosaic File format (12.8.5) + +
  • +
+ +

+The weight file is created in SCRIP format (12.9). + The optional arguments allow users to specify various options to control the regrid operation, + such as which pole option to use, + whether to use user-specified area in the conservative regridding, or whether ESMF should generate masks using a given + variable's missing value. There are also optional arguments specific to a certain type of the grid file. + All the optional arguments are similar to the command line arguments for the ESMF_RegridWeightGen + application (12.6). The acceptable values and the default value for the optional arguments + are listed below. + +

+The arguments are: +

+
srcFile
+
The source grid file name. + +
+
dstFile
+
The destination grid file name. + +
+
weightFile
+
The interpolation weight file name. + +
+
[rhFile]
+
The RouteHandle file name. + +
+
[regridmethod]
+
The type of interpolation. Please see Section 54.51 + for a list of valid options. If not specified, defaults to + ESMF_REGRIDMETHOD_BILINEAR. + +
+
[polemethod]
+
A flag to indicate which type of artificial pole + to construct on the source Grid for regridding. Please see + Section 54.48 for a list of valid options. + The default value varies depending on the regridding method and the grid type and format. + +
+
[regridPoleNPnts]
+
If polemethod is set to ESMF_POLEMETHOD_NPNTAVG, this argument is required to + specify how many points should be averaged over at the pole. + +
+
[lineType]
+
This argument controls the path of the line which connects two points on a sphere surface. This in + turn controls the path along which distances are calculated and the shape of the edges that make + up a cell. Both of these quantities can influence how interpolation weights are calculated. + As would be expected, this argument is only applicable when srcField and dstField are + built on grids which lie on the surface of a sphere. Section 54.36 shows a + list of valid options for this argument. If not specified, the default depends on the + regrid method. Section 54.36 has the defaults by line type. Figure 24.2.16 shows + which line types are supported for each regrid method as well as showing the default line type by regrid method. + +
+
[normType]
+
This argument controls the type of normalization used when generating conservative weights. This option + only applies to weights generated with regridmethod=ESMF_REGRIDMETHOD_CONSERVE. Please see + Section 54.45 for a + list of valid options. If not specified normType defaults to ESMF_NORMTYPE_DSTAREA. + +
+
[extrapMethod]
+
The type of extrapolation. Please see Section 54.18 + for a list of valid options. If not specified, defaults to + ESMF_EXTRAPMETHOD_NONE. + +
+
[extrapNumSrcPnts]
+
The number of source points to use for the extrapolation methods that use more than one source point + (e.g. ESMF_EXTRAPMETHOD_NEAREST_IDAVG). If not specified, defaults to 8. + +
+
[extrapDistExponent]
+
The exponent to raise the distance to when calculating weights for + the ESMF_EXTRAPMETHOD_NEAREST_IDAVG extrapolation method. A higher value reduces the influence + of more distant points. If not specified, defaults to 2.0. + +
+
[unmappedaction]
+
Specifies what should happen if there are destination points that + can't be mapped to a source cell. Please see Section 54.62 for a + list of valid options. If not specified, unmappedaction defaults to ESMF_UNMAPPEDACTION_ERROR. + +
+
[ignoreDegenerate]
+
Ignore degenerate cells when checking the input Grids or Meshes for errors. If this is set to true, then the + regridding proceeds, but degenerate cells will be skipped. If set to false, a degenerate cell produces an error. + If not specified, ignoreDegenerate defaults to false. + +
+
[srcFileType]
+
The file format of the source grid. Please see + Section 54.20 for a list of valid options. + If not specifed, the program will determine the file format automatically. + +
+
[dstFileType]
+
The file format of the destination grid. Please see Section 54.20 for a list of valid options. + If not specifed, the program will determine the file format automatically. + +
+
[srcRegionalFlag]
+
If .TRUE., the source grid is a regional grid, otherwise, + it is a global grid. The default value is .FALSE. + +
+
[dstRegionalFlag]
+
If .TRUE., the destination grid is a regional grid, otherwise, + it is a global grid. The default value is .FALSE. + +
+
[srcMeshname]
+
If the source file is in UGRID format, this argument is required + to define the dummy variable name in the grid file that contains the + mesh topology info. + +
+
[dstMeshname]
+
If the destination file is in UGRID format, this argument is required + to define the dummy variable name in the grid file that contains the + mesh topology info. + +
+
[srcMissingValueFlag]
+
If .TRUE., the source grid mask will be constructed using the missing + values of the variable defined in srcMissingValueVar. This flag is + only used for the grid defined in the GRIDSPEC or the UGRID file formats. + The default value is .FALSE.. + +
+
[srcMissingValueVar]
+
If srcMissingValueFlag is .TRUE., the argument is required to define + the variable name whose missing values will be used to construct the grid + mask. It is only used for the grid defined in the GRIDSPEC or the UGRID + file formats. + +
+
[dstMissingValueFlag]
+
If .TRUE., the destination grid mask will be constructed using the missing + values of the variable defined in dstMissingValueVar. This flag is + only used for the grid defined in the GRIDSPEC or the UGRID file formats. + The default value is .FALSE.. + +
+
[dstMissingValueVar]
+
If dstMissingValueFlag is .TRUE., the argument is required to define + the variable name whose missing values will be used to construct the grid + mask. It is only used for the grid defined in the GRIDSPEC or the UGRID + file formats. + +
+
[useSrcCoordFlag]
+
If .TRUE., the coordinate variables defined in srcCoordinateVars will + be used as the longitude and latitude variables for the source grid. + This flag is only used for the GRIDSPEC file format. The default is .FALSE. + +
+
[srcCoordinateVars]
+
If useSrcCoordFlag is .TRUE., this argument defines the longitude and + ! latitude variables in the source grid file to be used for the regrid. + This argument is only used when the grid file is in GRIDSPEC format. + srcCoordinateVars should be a array of 2 elements. + +
+
[useDstCoordFlag]
+
If .TRUE., the coordinate variables defined in dstCoordinateVars will + be used as the longitude and latitude variables for the destination grid. + This flag is only used for the GRIDSPEC file format. The default is .FALSE. + +
+
[dstCoordinateVars]
+
If useDstCoordFlag is .TRUE., this argument defines the longitude and + latitude variables in the destination grid file to be used for the regrid. + This argument is only used when the grid file is in GRIDSPEC format. + dstCoordinateVars should be a array of 2 elements. + +
+
[useSrcCornerFlag]
+
If useSrcCornerFlag is .TRUE., the corner coordinates of the source file + will be used for regridding. Otherwise, the center coordinates will be us ed. + The default is .FALSE. The corner stagger is not supported for the SCRIP formatted input + grid or multi-tile GRIDSPEC MOSAIC input grid. + +
+
[useDstCornerFlag]
+
If useDstCornerFlag is .TRUE., the corner coordinates of the destination file + will be used for regridding. Otherwise, the center coordinates will be used. + The default is .FALSE. The corner stagger is not supported for the SCRIP formatted input + grid or multi-tile GRIDSPEC MOSAIC input grid. + +
+
[useUserAreaFlag]
+
If .TRUE., the element area values defined in the grid files are used. + Only the SCRIP and ESMF format grid files have user specified areas. This flag + is only used for conservative regridding. The default is .FALSE.. + +
+
[largefileFlag]
+
If .TRUE., the output weight file is in NetCDF 64bit offset format. + The default is .FALSE.. + +
+
[netcdf4fileFlag]
+
If .TRUE., the output weight file is in NetCDF4 file format. + The default is .FALSE.. + +
+
[weightOnlyFlag]
+
If .TRUE., the output weight file only contains factorList and factorIndexList. + The default is .FALSE.. + +
+
[tileFilePath]
+
Optional argument to define the path where the tile files reside. If it + is given, it overwrites the path defined in gridlocation variable + in the mosaic file. + +
+
[verboseFlag]
+
If .TRUE., it will print summary information about the regrid parameters, + default to .FALSE.. + +
+
[checkFlag]
+
checkFlag value to pass into ESMF_FieldRegridStore(), if not provided + has same default as ESMF_FieldRegridStore() which is false. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+24.3.2 ESMF_RegridWeightGen - Generate regrid routeHandle and an optional weight file from grid files with user-specified distribution +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_RegridWeightGen()
+   subroutine ESMF_RegridWeightGenDG(srcFile, dstFile, regridRouteHandle, &
+     srcElementDistgrid, dstElementDistgrid, &
+     srcNodalDistgrid, dstNodalDistgrid, &
+     weightFile, regridmethod, lineType, normType, &
+     extrapMethod, extrapNumSrcPnts, extrapDistExponent, extrapNumLevels,&
+     unmappedaction, ignoreDegenerate, useUserAreaFlag, &
+     largefileFlag, netcdf4fileFlag, &
+     weightOnlyFlag, verboseFlag, rc)
+
ARGUMENTS: +
 
+   character(len=*),             intent(in)            :: srcFile
+   character(len=*),             intent(in)            :: dstFile
+   type(ESMF_RouteHandle),       intent(out)           :: regridRouteHandle
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+   type(ESMF_DistGrid),          intent(in),  optional :: srcElementDistgrid
+   type(ESMF_DistGrid),          intent(in),  optional :: dstElementDistgrid
+   character(len=*),             intent(in),  optional :: weightFile
+   type(ESMF_DistGrid),          intent(in),  optional :: srcNodalDistgrid
+   type(ESMF_DistGrid),          intent(in),  optional :: dstNodalDistgrid
+   type(ESMF_RegridMethod_Flag), intent(in),  optional :: regridmethod
+   type(ESMF_LineType_Flag),     intent(in),  optional :: lineType
+   type(ESMF_NormType_Flag),     intent(in),  optional :: normType
+   type(ESMF_ExtrapMethod_Flag),   intent(in),    optional :: extrapMethod
+   integer,                        intent(in),    optional :: extrapNumSrcPnts
+   real,                           intent(in),    optional :: extrapDistExponent
+   integer,                      intent(in),  optional :: extrapNumLevels
+   type(ESMF_UnmappedAction_Flag),intent(in), optional :: unmappedaction
+   logical,                      intent(in),  optional :: ignoreDegenerate
+   logical,                      intent(in),  optional :: useUserAreaFlag
+   logical,                      intent(in),  optional :: largefileFlag
+   logical,                      intent(in),  optional :: netcdf4fileFlag
+   logical,                      intent(in),  optional :: weightOnlyFlag
+   logical,                      intent(in),  optional :: verboseFlag
+   integer,                      intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+This subroutine does online regridding weight generation from files with user specified distribution. + The main differences between this API and the one in 24.3.1 are listed below: + +

    +
  • The input grids are always represented as ESMF_Mesh whether they are logically rectangular or unstructured. +
  • +
  • The input grids will be decomposed using a user-specified distribution instead of a fixed decomposition in the + other subroutine if srcElementDistgrid and dstElementDistgrid are specified. +
  • +
  • The source and destination grid files have to be in the SCRIP grid file format. +
  • +
  • This subroutine has one additional required argument regridRouteHandle and four additional optional + arguments: srcElementDistgrid, dstElementDistgrid, srcNodelDistgrid and dstNodalDistgrid. + These four arguments are of type ESMF_DistGrid, they are used to define the distribution of the source + and destination grid elements and nodes. The output regridRouteHandle allows users to regrid the field + values later in the application. +
  • +
  • The weightFile argument is optional. When it is given, a weightfile will be generated as well. + +
  • +
+ +

+ +

+The arguments are: +

+
srcFile
+
The source grid file name in SCRIP grid file format + +
+
dstFile
+
The destination grid file name in SCRIP grid file format + +
+
regridRouteHandle
+
The regrid RouteHandle returned by ESMF_FieldRegridStore() + +
+
srcElementDistgrid
+
An optional distGrid that specifies the distribution of the source grid's elements. If not + specified, a system-defined block decomposition is used. + +
+
dstElementDistgrid
+
An optional distGrid that specifies the distribution of the destination grid's elements. If + not specified, a system-defined block decomposition is used. + +
+
weightFile
+
The interpolation weight file name. If present, an output weight file will be generated. + +
+
srcNodalDistgrid
+
An optional distGrid that specifies the distribution of the source grid's nodes + +
+
dstNodalDistgrid
+
An optional distGrid that specifies the distribution of the destination grid's nodes + +
+
[regridmethod]
+
The type of interpolation. Please see Section 54.51 + for a list of valid options. If not specified, defaults to + ESMF_REGRIDMETHOD_BILINEAR. + +
+
[lineType]
+
This argument controls the path of the line which connects two points on a sphere surface. This in + turn controls the path along which distances are calculated and the shape of the edges that make + up a cell. Both of these quantities can influence how interpolation weights are calculated. + As would be expected, this argument is only applicable when srcField and dstField are + built on grids which lie on the surface of a sphere. Section 54.36 shows a + list of valid options for this argument. If not specified, the default depends on the + regrid method. Section 54.36 has the defaults by line type. Figure 24.2.16 shows + which line types are supported for each regrid method as well as showing the default line type by regrid method. + +
+
[normType]
+
This argument controls the type of normalization used when generating conservative weights. This option + only applies to weights generated with regridmethod=ESMF_REGRIDMETHOD_CONSERVE. Please see + Section 54.45 for a + list of valid options. If not specified normType defaults to ESMF_NORMTYPE_DSTAREA. + +
+
[extrapMethod]
+
The type of extrapolation. Please see Section 54.18 + for a list of valid options. If not specified, defaults to + ESMF_EXTRAPMETHOD_NONE. + +
+
[extrapNumSrcPnts]
+
The number of source points to use for the extrapolation methods that use more than one source point + (e.g. ESMF_EXTRAPMETHOD_NEAREST_IDAVG). If not specified, defaults to 8.. + +
+
[extrapDistExponent]
+
The exponent to raise the distance to when calculating weights for + the ESMF_EXTRAPMETHOD_NEAREST_IDAVG extrapolation method. A higher value reduces the influence + of more distant points. If not specified, defaults to 2.0. + +
+
[unmappedaction]
+
Specifies what should happen if there are destination points that + can't be mapped to a source cell. Please see Section 54.62 for a + list of valid options. If not specified, unmappedaction defaults to ESMF_UNMAPPEDACTION_ERROR. + +
+
[ignoreDegenerate]
+
Ignore degenerate cells when checking the input Grids or Meshes for errors. If this is set to true, then the + regridding proceeds, but degenerate cells will be skipped. If set to false, a degenerate cell produces an error. + If not specified, ignoreDegenerate defaults to false. + +
+
[useUserAreaFlag]
+
If .TRUE., the element area values defined in the grid files are used. + Only the SCRIP and ESMF format grid files have user specified areas. This flag + is only used for conservative regridding. The default is .FALSE. + +
+
[largefileFlag]
+
If .TRUE., the output weight file is in NetCDF 64bit offset format. + The default is .FALSE. + +
+
[netcdf4fileFlag]
+
If .TRUE., the output weight file is in NetCDF4 file format. + The default is .FALSE. + +
+
[weightOnlyFlag]
+
If .TRUE., the output weight file only contains factorList and factorIndexList. + The default is .FALSE. + +
+
[verboseFlag]
+
If .TRUE., it will print summary information about the regrid parameters, + default to .FALSE. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ + +

+ +

+ +

+ +

+24.3.3 ESMF_FileRegrid - Regrid variables defined in the grid files +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_FileRegrid(srcFile, dstFile, srcVarName, dstVarName, &
+     dstLoc, srcDataFile, dstDataFile, tileFilePath, &
+     dstCoordVars, regridmethod, polemethod, regridPoleNPnts, &
+     unmappedaction, ignoreDegenerate, srcRegionalFlag, dstRegionalFlag, &
+     verboseFlag, rc)
+
ARGUMENTS: +
 
+   character(len=*),             intent(in)            :: srcFile
+   character(len=*),             intent(in)            :: dstFile
+   character(len=*),             intent(in)            :: srcVarName
+   character(len=*),             intent(in)            :: dstVarName
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+   character(len=*),             intent(in),  optional :: dstLoc
+   character(len=*),             intent(in),  optional :: srcDataFile     
+   character(len=*),             intent(in),  optional :: dstDataFile     
+   character(len=*),             intent(in),  optional :: tileFilePath
+   character(len=*),             intent(in),  optional :: dstCoordVars
+   type(ESMF_RegridMethod_Flag), intent(in),  optional :: regridmethod
+   type(ESMF_PoleMethod_Flag),   intent(in),  optional :: polemethod
+   integer,                      intent(in),  optional :: regridPoleNPnts
+   type(ESMF_UnmappedAction_Flag),intent(in), optional :: unmappedaction
+   logical,                      intent(in),  optional :: ignoreDegenerate
+   logical,                      intent(in),  optional :: srcRegionalFlag
+   logical,                      intent(in),  optional :: dstRegionalFlag
+   logical,                      intent(in),  optional :: verboseFlag
+   integer,                      intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+This subroutine provides the same function as the ESMF_Regrid application + described in Section 13. It takes two grid files in NetCDF format and interpolate + the variable defined in the source grid file to the destination variable using one of the ESMF supported + regrid methods - bilinear (24.2.1), higher-order patch (24.2.2), + first order conservative (24.2.5) or nearest neighbor methods. + The grid files can be in one of the following two formats: + +

    +
  • The GRIDSPEC Tile grid file following the CF metadata convention (12.8.3) for logically rectangular grids +
  • +
  • The proposed CF Unstructured grid (UGRID) format (12.8.4) for unstructured grids. + +
  • +
+ +

+The optional arguments allow users to specify various options to control the regrid operation, + such as which pole option to use, or whether to use user-specified area in the conservative regridding. + The acceptable values and the default value for the optional arguments are listed below. + +

+The arguments are: +

+
srcFile
+
The source grid file name. + +
+
dstFile
+
The destination grid file name. + +
+
srcVarName
+
The source variable names to be regridded. If more than one, separate them by comma. + +
+
dstVarName
+
The destination variable names to be regridded to. If more than one, separate them by comma. + +
+
[dstLoc]
+
The destination variable's location, either 'node' or 'face'. This + argument is only used when the destination grid file is UGRID, the regridding method is + non-conservative and the destination variable does not exist in the destination grid file. + If not specified, default is 'face'. + +
+
[srcDataFile]
+
The input data file prefix if the srcFile is in GRIDSPEC MOSAIC + fileformat. The tilename and the file extension (.nc) will be added to + the prefix. The tilename is defined in the MOSAIC file using variable "gridtiles". + +
+
[dstDataFile]
+
The output data file prefix if the dstFile is in GRIDSPEC MOSAIC + fileformat. The tilename and the file extension (.nc) will be added to + the prefix. The tilename is defined in the MOSAIC file using variable "gridtiles". + +
+
[tileFilePath]
+
The alternative file path for the tile files and mosaic data files when either srcFile or + dstFile is a GRIDSPEC MOSAIC grid. The path can be either relative or absolute. If it is + relative, it is relative to the working directory. When specified, the gridlocation variable + defined in the Mosaic file will be ignored. + +
+
[dstCoordVars]
+
The destination coordinate variable names if the dstVarName does not exist in the dstFile + +
+
[regridmethod]
+
The type of interpolation. Please see Section 54.51 + for a list of valid options. If not specified, defaults to + ESMF_REGRIDMETHOD_BILINEAR. + +
+
[polemethod]
+
A flag to indicate which type of artificial pole + to construct on the source Grid for regridding. Please see + Section 54.48 for a list of valid options. + The default value varies depending on the regridding method and the grid type and format. + +
+
[regridPoleNPnts]
+
If polemethod is set to ESMF_POLEMETHOD_NPNTAVG, this argument is required to + specify how many points should be averaged over at the pole. + +
+
[unmappedaction]
+
Specifies what should happen if there are destination points that + can't be mapped to a source cell. Please see Section 54.62 for a + list of valid options. If not specified, unmappedaction defaults to ESMF_UNMAPPEDACTION_ERROR. + +
+
[ignoreDegenerate]
+
Ignore degenerate cells when checking the input Grids or Meshes for errors. If this is set to true, then the + regridding proceeds, but degenerate cells will be skipped. If set to false, a degenerate cell produces an error. + If not specified, ignoreDegenerate defaults to false. + +
+
[srcRegionalFlag]
+
If .TRUE., the source grid is a regional grid, otherwise, + it is a global grid. The default value is .FALSE. + +
+
[dstRegionalFlag]
+
If .TRUE., the destination grid is a regional grid, otherwise, + it is a global grid. The default value is .FALSE. + +
+
[verboseFlag]
+
If .TRUE., it will print summary information about the regrid parameters, + default to .FALSE. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ + +

+ +

+24.4 Restrictions and Future Work +

+ +
    +
  1. 32-bit index limitation: Currently all index space dimensions in an ESMF object are represented by signed 32-bit integers. This limits the number of elements in one-dimensional objects to the 32-bit limit. This limit can be crossed by higher dimensional objects, where the product space is only limited by the 64-bit sequence index representation. +
  2. +
+ +

+25 FieldBundle Class +

+ +

+25.1 Description +

+ +

+A FieldBundle functions mainly as a convenient container for storing +similar Fields. It represents “bundles” of Fields that are +discretized on the same Grid, Mesh, LocStream, or XGrid and distributed in the same manner. +The FieldBundle is an important data structure because it can be added to a State, +which is used for sending and receiving data between Components. + +

+In the common case where FieldBundle is built on top of a Grid, +Fields within a FieldBundle may be located at different locations relative +to the vertices of their common Grid. The Fields in a FieldBundle may +be of different dimensions, as long as the Grid dimensions that +are distributed are the same. For example, a surface Field on +a distributed lat/lon Grid and a 3D Field with an added vertical +dimension on the same distributed lat/lon Grid can be included +in the same FieldBundle. + +

+FieldBundles can be created and destroyed, can have Attributes +added or retrieved, and can have Fields added, removed, replaced, or retrieved. +Methods include queries that return information about the FieldBundle +itself and about the Fields that it contains. The Fortran +data pointer of a Field within a FieldBundle can be obtained +by first retrieving the Field with a call to ESMF_FieldBundleGet(), +and then using ESMF_FieldGet() to get the data. + +

+In the future FieldBundles will serve as a mechanism for performance +optimization. ESMF will take advantage of the similarities of the +Fields within a FieldBundle to optimize collective communication, +I/O, and regridding. See Section 25.3 for a +description of features that are scheduled for future work. + +

+25.2 Use and Examples +

+ +

+Examples of creating, accessing and destroying FieldBundles and their +constituent Fields are provided in this section, along with some +notes on FieldBundle methods. + +

+ +

+ +

+ +

+ +
+25.2.1 Creating a FieldBundle from a list of Fields +

+ A user can create a FieldBundle from a predefined list of Fields. In the following + example, we first create an ESMF_Grid, then build 3 different ESMF_Fields with + different names. The ESMF_FieldBundle is created from the list of 3 Fields. + +

+

+!-------------------------------------------------------------------------
+!   !  Create several Fields and add them to a new FieldBundle.
+ 
+    grid = ESMF_GridCreateNoPeriDim(minIndex=(/1,1/), maxIndex=(/100,200/), &
+                                  regDecomp=(/2,2/), name="atmgrid", rc=rc)
+
+ +

+

+    call ESMF_ArraySpecSet(arrayspec, 2, ESMF_TYPEKIND_R8, rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+    field(1) = ESMF_FieldCreate(grid, arrayspec, &
+                                staggerloc=ESMF_STAGGERLOC_CENTER, &
+                                name="temperature", rc=rc)
+
+ +

+

+    field(2) = ESMF_FieldCreate(grid, arrayspec, &
+                                staggerloc=ESMF_STAGGERLOC_CENTER, &
+                                name="pressure", rc=rc)
+
+ +

+

+    field(3) = ESMF_FieldCreate(grid, arrayspec, &
+                                staggerloc=ESMF_STAGGERLOC_CENTER, &
+                                name="heat flux", rc=rc)
+
+ +

+

+    bundle1 = ESMF_FieldBundleCreate(fieldList=field(1:3), &
+                                name="atmosphere data", rc=rc)
+
+    print *, "FieldBundle example 1 returned"
+
+ +

+ +

+ +
+25.2.2 Creating an empty FieldBundle then add one Field to it +

+ A user can create an empty FieldBundle then add Fields to the empty FieldBundle. + In the following example, we use the previously defined ESMF_Grid + to build an ESMF_Field. + An empty ESMF_FieldBundle is created, then the Field is added + to the FieldBundle. +

+

+!-------------------------------------------------------------------------
+!   !  Create an empty FieldBundle and then add a single field to it.
+
+
+    simplefield = ESMF_FieldCreate(grid, arrayspec, &
+                  staggerloc=ESMF_STAGGERLOC_CENTER, name="rh", rc=rc)
+
+ +

+

+    bundle2 = ESMF_FieldBundleCreate(name="time step 1", rc=rc)
+
+ +

+

+    call ESMF_FieldBundleAdd(bundle2, (/simplefield/), rc=rc)
+
+ +

+

+    call ESMF_FieldBundleGet(bundle2, fieldCount=fieldcount, rc=rc)
+
+    print *, "FieldBundle example 2 returned, fieldcount =", fieldcount
+
+ +

+ +

+ +
+25.2.3 Creating an empty FieldBundle then add a list of Fields to it +

+ A user can create an empty FieldBundle then add multiple + Fields to the empty FieldBundle. + In the following example, we use the previously defined ESMF_Grid + and ESMF_Fields. + An empty ESMF_FieldBundle is created, then three Fields are added + to the FieldBundle. +

+

+!-------------------------------------------------------------------------
+!   !  Create an empty FieldBundle and then add multiple fields to it.
+
+    bundle3 = ESMF_FieldBundleCreate(name="southern hemisphere", rc=rc)
+
+ +

+

+    call ESMF_FieldBundleAdd(bundle3, field(1:3), rc=rc)
+
+ +

+

+    call ESMF_FieldBundleGet(bundle3, fieldCount=fieldcount, rc=rc)
+
+    print *, "FieldBundle example 3 returned, fieldcount =", fieldcount
+
+ +

+ +

+ +
+25.2.4 Query a Field stored in the FieldBundle by name or index +

+ Users can query a Field stored in a FieldBundle by the Field's name or index. + In the following example, the pressure Field stored in FieldBundle + is queried by its name then by its index through ESMF_FieldBundleGet() + method. +

+

+!-------------------------------------------------------------------------
+!   !  Get a Field back from a FieldBundle, first by name and then by index.
+!   !  Also get the FieldBundle name.
+
+    call ESMF_FieldBundleGet(bundle1, "pressure", field=returnedfield1, rc=rc)
+
+ +

+

+    call ESMF_FieldGet(returnedfield1, name=fname1, rc=rc)
+
+ +

+

+    call ESMF_FieldBundleGet(bundle1, 2, returnedfield2, rc=rc)
+
+ +

+

+    call ESMF_FieldGet(returnedfield2, name=fname2, rc=rc)
+
+ +

+

+    call ESMF_FieldBundleGet(bundle1, name=bname1, rc=rc)
+
+    print *, "FieldBundle example 4 returned, field names = ", &
+                   trim(fname1), ", ", trim(fname2)
+    print *, "FieldBundle name = ", trim(bname1)
+
+ +

+ +

+ +
+25.2.5 Query FieldBundle for Fields list either alphabetical or in order of addition +

+ Users can query the list of Fields stored in a FieldBundle. + By default the returned list of Fields are ordered alphabetically by + the Field names. Users can also retrieve the list of Fields in the order by which + the Fields were added to the FieldBundle. +

+

+    call ESMF_FieldBundleGet(bundle1, fieldList=r_fields, rc=rc)
+
+ +

+

+    do i = 1, 3
+      call ESMF_FieldGet(r_fields(i), name=fname1, rc=rc)
+
+ +

+

+      print *, fname1
+    enddo
+
+ +

+

+    call ESMF_FieldBundleGet(bundle1, fieldList=r_fields, &
+      itemorderflag=ESMF_ITEMORDER_ADDORDER, rc=rc)
+
+ +

+

+    do i = 1, 3
+      call ESMF_FieldGet(r_fields(i), name=fname1, rc=rc)
+
+ +

+

+      print *, fname1
+    enddo
+
+ +

+ +

+ +
+25.2.6 Create a packed FieldBundle on a Grid +

+ Create a packed fieldbundle from user supplied + field names and a packed Fortran array pointer that contains + the data of the packed fields on a Grid. + +

+Create a 2D grid of 4x1 regular decomposition on 4 PETs, each PET has 10x50 elements. + The index space of the entire Grid is 40x50. +

+

+  gridxy = ESMF_GridCreateNoPeriDim(maxIndex=(/40,50/), regDecomp=(/4,1/), rc=rc)
+
+ +

+Allocate a packed Fortran array pointer containing 10 packed fields, each field has + 3 time slices and uses the 2D grid created. Note that gridToFieldMap uses the position + of the grid dimension as elements, 3rd element of the packedPtr is 10, 4th element + of the packedPtr is 50. +

+

+  allocate(packedPtr(10, 3, 10, 50)) ! fieldDim, time, y, x
+  fieldDim = 1
+  packedFB = ESMF_FieldBundleCreate(fieldNameList, packedPtr, gridxy, fieldDim, &
+  gridToFieldMap=(/3,4/), staggerloc=ESMF_Staggerloc_Center, rc=rc)
+
+ +

+ +

+ +
+25.2.7 Create a packed FieldBundle on a Mesh +

+ Similarly we could create a packed fieldbundle from user supplied + field names and a packed Fortran array pointer that contains + the data of the packed fields on a Mesh. + +

+Due to the verbosity of the MeshCreate process, the code for MeshCreate is + not shown below, user can either refer to the MeshCreate section + 33.3.1 + or examine the FieldBundleCreate example source code contained + in the ESMF source distribution directly. + A ESMF Mesh on 4 PETs with one mesh element on each PET is created. + +

+Allocate the packed Fortran array pointer, the first dimension + is fieldDim; second dimension is the data associated with mesh element, + since there is only one mesh element on each processor in this example, + the allocation is 1; last dimension is the time dimension which contains + 3 time slices. +

+

+      allocate(packedPtr3D(10, 1, 3))
+      fieldDim = 1
+      packedFB = ESMF_FieldBundleCreate(fieldNameList, packedPtr3D, meshEx, fieldDim, &
+        gridToFieldMap=(/2/), meshloc=ESMF_MESHLOC_ELEMENT, rc=rc)
+
+ +

+ +

+25.2.8 Destroy a FieldBundle +

+ +

+The user must call ESMF_FieldBundleDestroy() before + deleting any of the Fields it contains. Because Fields + can be shared by multiple FieldBundles and States, they are + not deleted by this call. +

+

+!-------------------------------------------------------------------------
+
+     call ESMF_FieldBundleDestroy(bundle1, rc=rc)
+
+ +

+ + +

+ +

+ +

+ +

+ +
+25.2.9 Redistribute data from a source FieldBundle to a destination FieldBundle +

+ +

+The ESMF_FieldBundleRedist interface can be used to redistribute data from + source FieldBundle to destination FieldBundle. This interface is overloaded by type and kind; + In the version of ESMF_FieldBundleRedist without factor argument, a default value + of factor 1 is used. + +

+In this example, we first create two FieldBundles, a source FieldBundle and a destination + FieldBundle. Then we use ESMF_FieldBundleRedist to + redistribute data from source FieldBundle to destination FieldBundle. +

+

+    ! perform redist
+    call ESMF_FieldBundleRedistStore(srcFieldBundle, dstFieldBundle, &
+         routehandle, rc=rc)
+
+ +

+

+    call ESMF_FieldBundleRedist(srcFieldBundle, dstFieldBundle, &
+         routehandle, rc=rc)
+
+ +

+ +

+ +
+25.2.10 Redistribute data from a packed source FieldBundle to a packed destination FieldBundle +

+ +

+The ESMF_FieldBundleRedist interface can be used to redistribute data from + source FieldBundle to destination FieldBundle when both Bundles are packed with same + number of fields. + +

+In this example, we first create two packed FieldBundles, a source FieldBundle and a destination + FieldBundle. Then we use ESMF_FieldBundleRedist to + redistribute data from source FieldBundle to destination FieldBundle. + +

+The same Grid is used where the source and destination packed FieldBundle are built upon. Source + and destination Bundle have different memory layout. +

+

+    allocate(srcfptr(3,5,10), dstfptr(10,5,3))
+    srcfptr = lpe
+    srcFieldBundle = ESMF_FieldBundleCreate((/'field01', 'field02', 'field03'/), &
+      srcfptr, grid, 1, gridToFieldMap=(/2,3/), rc=rc)
+
+ +

+

+    dstFieldBundle = ESMF_FieldBundleCreate((/'field01', 'field02', 'field03'/), &
+      dstfptr, grid, 3, gridToFieldMap=(/2,1/), rc=rc)
+
+ +

+

+    ! perform redist
+    call ESMF_FieldBundleRedistStore(srcFieldBundle, dstFieldBundle, &
+         routehandle, rc=rc)
+
+ +

+

+    call ESMF_FieldBundleRedist(srcFieldBundle, dstFieldBundle, &
+         routehandle, rc=rc)
+
+ +

+ + +

+ +

+ +

+ +

+ +
+25.2.11 Perform sparse matrix multiplication from a source FieldBundle + to a destination FieldBundle +

+ +

+The ESMF_FieldBundleSMM interface can be used to perform SMM from + source FieldBundle to destination FieldBundle. This interface is overloaded by type and kind; + +

+In this example, we first create two FieldBundles, a source FieldBundle and a destination + FieldBundle. Then we use ESMF_FieldBundleSMM to + perform sparse matrix multiplication from source FieldBundle to destination FieldBundle. + +

+The operation performed in this example is better illustrated in + section 26.3.33. + +

+Section 28.2.18 provides a detailed discussion of the + sparse matrix multiplication operation implemented in ESMF. +

+

+    call ESMF_VMGetCurrent(vm, rc=rc)
+
+ +

+

+    call ESMF_VMGet(vm, localPet=lpe, rc=rc)
+
+ +

+

+    ! create distgrid and grid
+    distgrid = ESMF_DistGridCreate(minIndex=(/1/), maxIndex=(/16/), &
+        regDecomp=(/4/), &
+        rc=rc)
+
+ +

+

+    grid = ESMF_GridCreate(distgrid=distgrid, &
+        gridEdgeLWidth=(/0/), gridEdgeUWidth=(/0/), &
+        name="grid", rc=rc)
+
+ +

+

+    call ESMF_ArraySpecSet(arrayspec, 1, ESMF_TYPEKIND_I4, rc=rc)
+
+ +

+

+    ! create field bundles and fields
+    srcFieldBundle = ESMF_FieldBundleCreate(rc=rc)
+
+ +

+

+    dstFieldBundle = ESMF_FieldBundleCreate(rc=rc)
+
+ +

+

+    do i = 1, 3
+        srcField(i) = ESMF_FieldCreate(grid, arrayspec, &
+            totalLWidth=(/1/), totalUWidth=(/2/), &
+            rc=rc)
+
+ +

+

+        call ESMF_FieldGet(srcField(i), localDe=0, farrayPtr=srcfptr, rc=rc)
+
+ +

+

+        srcfptr = 1
+
+        call ESMF_FieldBundleAdd(srcFieldBundle, (/srcField(i)/), rc=rc)
+
+ +

+

+        dstField(i) = ESMF_FieldCreate(grid, arrayspec, &
+            totalLWidth=(/1/), totalUWidth=(/2/), &
+            rc=rc)
+
+ +

+

+        call ESMF_FieldGet(dstField(i), localDe=0, farrayPtr=dstfptr, rc=rc)
+
+ +

+

+        dstfptr = 0
+
+        call ESMF_FieldBundleAdd(dstFieldBundle, (/dstField(i)/), rc=rc)
+
+ +

+

+    enddo
+
+    ! initialize factorList and factorIndexList
+    allocate(factorList(4))
+    allocate(factorIndexList(2,4))
+    factorList = (/1,2,3,4/)
+    factorIndexList(1,:) = (/lpe*4+1,lpe*4+2,lpe*4+3,lpe*4+4/)
+    factorIndexList(2,:) = (/lpe*4+1,lpe*4+2,lpe*4+3,lpe*4+4/)
+    call ESMF_FieldBundleSMMStore(srcFieldBundle, dstFieldBundle, &
+        routehandle, factorList, factorIndexList, rc=rc)
+
+ +

+

+    ! perform smm
+    call ESMF_FieldBundleSMM(srcFieldBundle, dstFieldBundle, routehandle, &
+          rc=rc)
+
+ +

+

+    ! release SMM route handle
+    call ESMF_FieldBundleSMMRelease(routehandle, rc=rc)
+
+ +

+ + +

+ +

+ +

+ +

+ +
+25.2.12 Perform FieldBundle halo update +

+ +

+ + ESMF_FieldBundleHalo interface can be used to perform halo updates + for all the Fields contained in the ESMF_FieldBundle. + +

+In this example, we will set up a FieldBundle for a 2D inviscid and compressible + flow problem. We will illustrate the FieldBundle halo update operation but we will + not solve the non-linear PDEs. The emphasis here is to demonstrate + how to set up halo regions, how a numerical scheme updates + the exclusive regions, and how a halo update communicates data in the halo regions. Here + are the governing equations: + +

+ +$u_t + u u_x + v u_y + \frac{1}{\rho} p_x = 0$ (conservation of momentum in x-direction) + +

+ +$v_t + u v_x + v v_y + \frac{1}{\rho} p_y = 0$ (conservation of momentum in y-direction) + +

+ +${\rho}_t + {\rho u}_x + {\rho v}_y = 0$ (conservation of mass) + +

+ +$\frac{\rho}{\rho^\gamma} + u {(\frac{p}{\rho^\gamma})}_x + v {(\frac{p}{\rho^\gamma})}_y = 0$ (conservation of energy) + +

+The four unknowns are pressure $p$, density $\rho$, velocity ($u$, $v$). The grids + are set up using Arakawa D stagger ($p$ on corner, $\rho$ at center, $u$ and $v$ on edges). + $p$, $\rho$, $u$, and $v$ are bounded by necessary boundary conditions and initial conditions. + +

+Section 28.2.15 provides a detailed discussion of the + halo operation implemented in ESMF. +

+

+    ! create distgrid and grid according to the following decomposition 
+    ! and stagger pattern, r is density.
+    !
+    ! p--------u-------+p+-------u--------p
+    ! !                 |                 |
+    ! !                 |                 |
+    ! !                 |                 |
+    ! v        r        v        r        v
+    ! !      PET 0      |      PET 1      |
+    ! !                 |                 |
+    ! !                 |                 |
+    ! p--------u-------+p+-------u--------p
+    ! !                 |                 |
+    ! !                 |                 |
+    ! !                 |                 |
+    ! v        r        v        r        v
+    ! !      PET 2      |      PET 3      |
+    ! !                 |                 |
+    ! !                 |                 |
+    ! p--------u-------+p+-------u--------p
+    !
+    distgrid = ESMF_DistGridCreate(minIndex=(/1,1/), maxIndex=(/256,256/), &
+        regDecomp=(/2,2/), &
+        rc=rc)
+
+ +

+

+    grid = ESMF_GridCreate(distgrid=distgrid, name="grid", rc=rc)
+
+ +

+

+    call ESMF_ArraySpecSet(arrayspec, 2, ESMF_TYPEKIND_R4, rc=rc)
+
+ +

+

+    ! create field bundles and fields
+    fieldBundle = ESMF_FieldBundleCreate(rc=rc)
+
+ +

+

+    ! set up exclusive/total region for the fields
+    !
+    ! halo: L/U, nDim, nField, nPet
+    ! halo configuration for pressure, and similarly for density, u, and v
+    halo(1,1,1,1) = 0
+    halo(2,1,1,1) = 0
+    halo(1,2,1,1) = 0
+    halo(2,2,1,1) = 0
+    halo(1,1,1,2) = 1   ! halo in x direction on left hand side of pet 1
+    halo(2,1,1,2) = 0
+    halo(1,2,1,2) = 0
+    halo(2,2,1,2) = 0
+    halo(1,1,1,3) = 0
+    halo(2,1,1,3) = 1   ! halo in y direction on upper side of pet 2
+    halo(1,2,1,3) = 0
+    halo(2,2,1,3) = 0
+    halo(1,1,1,4) = 1   ! halo in x direction on left hand side of pet 3
+    halo(2,1,1,4) = 1   ! halo in y direction on upper side of pet 3
+    halo(1,2,1,4) = 0
+    halo(2,2,1,4) = 0
+
+ +

+

+    ! names and staggers of the 4 unknown fields
+    names(1) = "pressure"
+    names(2) = "density"
+    names(3) = "u"
+    names(4) = "v"
+    staggers(1) = ESMF_STAGGERLOC_CORNER
+    staggers(2) = ESMF_STAGGERLOC_CENTER
+    staggers(3) = ESMF_STAGGERLOC_EDGE2
+    staggers(4) = ESMF_STAGGERLOC_EDGE1
+    
+    ! create a FieldBundle
+    lpe = lpe + 1
+    do i = 1, 4
+        field(i) = ESMF_FieldCreate(grid, arrayspec, &
+                totalLWidth=(/halo(1,1,i,lpe), halo(1,2,i,lpe)/), &
+                totalUWidth=(/halo(2,1,i,lpe), halo(2,2,i,lpe)/), &
+                staggerloc=staggers(i), name=names(i), &
+                rc=rc)
+
+ +

+

+        call ESMF_FieldBundleAdd(fieldBundle, (/field(i)/), rc=rc)
+
+ +

+

+    enddo
+
+    ! compute the routehandle
+    call ESMF_FieldBundleHaloStore(fieldBundle, routehandle=routehandle, &
+                                   rc=rc)
+
+ +

+

+    do iter = 1, 10
+        do i = 1, 4
+            call ESMF_FieldGet(field(i), farrayPtr=fptr, &
+                exclusiveLBound=excllb, exclusiveUBound=exclub, rc=rc)
+
+ +

+

+            sizes = exclub - excllb
+            ! fill the total region with 0.
+            fptr = 0.
+            ! only update the exclusive region on local PET
+            do j = excllb(1), exclub(1)
+              do k = excllb(2), exclub(2)
+                fptr(j,k) = iter * cos(2.*PI*j/sizes(1))*sin(2.*PI*k/sizes(2))
+              enddo 
+            enddo 
+        enddo
+        ! call halo execution to update the data in the halo region,
+        ! it can be verified that the halo regions change from 0. 
+        ! to non zero values.
+        call ESMF_FieldBundleHalo(fieldbundle, routehandle=routehandle, rc=rc)
+
+ +

+

+    enddo
+    ! release halo route handle
+    call ESMF_FieldBundleHaloRelease(routehandle, rc=rc)
+
+ +

+ + +

+25.3 Restrictions and Future Work +

+ +

+ +

+ +

    +
  1. No enforcement of the same Grid, Mesh, LocStream, or XGrid +restriction. +While the documentation indicates in several places (including the Design and +Implementation Notes) that a FieldBundle can only contain Fields that are built +on the same Grid, Mesh, LocStream, or XGrid, and all Fields must have the same +distribution, the actual FieldBundle implementation is more general and +supports bundling of any Fields. The documentation, however, is +in line with the long term plan of making the restrictive FieldBundle definition +the default behavior. The more general bundling option would then be retained +as a special case that requires explicit specification by the user. +There is currently no functional difference in the FieldBundle implementation +that profits from the documented restrictive approach. In addition, the general +bundling option has been supported for a long time. Note however that the +documented restrictive behavior is the anticipated long term default for +FieldBundles. + +

    +

  2. +
  3. No mathematical operators. +The FieldBundle class does not support differential or other +mathematical operators. We do not anticipate providing this +functionality in the near future. + +

    +

  4. +
  5. Limited validation and print options. +We are planning to increase the number of validity checks available +for FieldBundles as soon as possible. We also will +be working on print options. + +

    +

  6. +
  7. Packed data has limited supported. +One of the options that we are currently working on for FieldBundles is +packing. Packing means that the data from all the +Fields that comprise the FieldBundle are manipulated collectively. +This operation can be done without +destroying the original Field data. Packing is being designed to +facilitate optimized regridding, data communication, and I/O operations. +This will reduce the latency overhead of the communication. + +

    +CAUTION: For communication methods, the undistributed dimension representing +the number of fields must have identical size between source and destination packed +data. Communication methods do not permute the order of fields in the source +and destination packed FieldBundle. + +

    +

  8. +
  9. Interleaving Fields within a FieldBundle. +Data locality is important for performance on some computing +platforms. An interleave option will be added to allow the user to create +a packed FieldBundle in which Fields are either concatenated in memory +or in which Field elements are interleaved. + +

    +

  10. +
+ +

+ +

+25.4 Design and Implementation Notes +

+ +

+ +

    +
  1. Fields in a FieldBundle reference the same Grid, Mesh, LocStream, or XGrid. +In order to reduce memory requirements and ensure consistency, the +Fields within a FieldBundle all reference the same Grid, Mesh, +LocStream, or XGrid object. This restriction may be relaxed in the future. + +

    +

  2. +
+ +

+ +

+25.5 Class API: Basic FieldBundle Methods +

+ +

+ +

+ +

+ +

+25.5.1 ESMF_FieldBundleAssignment(=) - FieldBundle assignment +

+ +

+ +

+
+INTERFACE: +

   interface assignment(=)
+   fieldbundle1 = fieldbundle2
+
ARGUMENTS: +
   type(ESMF_FieldBundle) :: fieldbundle1
+   type(ESMF_FieldBundle) :: fieldbundle2
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Assign fieldbundle1 as an alias to the same ESMF fieldbundle object in memory + as fieldbundle2. If fieldbundle2 is invalid, then fieldbundle1 will be equally invalid after + the assignment. + +

+The arguments are: +

+
fieldbundle1
+
The ESMF_FieldBundle object on the left hand side of the assignment. + +
+
fieldbundle2
+
The ESMF_FieldBundle object on the right hand side of the assignment. + +
+
+ +

+ +

+ +

+25.5.2 ESMF_FieldBundleOperator(==) - FieldBundle equality operator +

+ +

+ +

+
+INTERFACE: +

   interface operator(==)
+   if (fieldbundle1 == fieldbundle2) then ... endif
+   OR
+   result = (fieldbundle1 == fieldbundle2)
+
RETURN VALUE: +
   logical :: result
+
ARGUMENTS: +
   type(ESMF_FieldBundle), intent(in) :: fieldbundle1
+   type(ESMF_FieldBundle), intent(in) :: fieldbundle2
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Test whether fieldbundle1 and fieldbundle2 are valid aliases to the same ESMF + fieldbundle object in memory. For a more general comparison of two ESMF FieldBundles, + going beyond the simple alias test, the ESMF_FieldBundleMatch() function (not yet + implemented) must be used. + +

+The arguments are: +

+
fieldbundle1
+
The ESMF_FieldBundle object on the left hand side of the equality + operation. + +
+
fieldbundle2
+
The ESMF_FieldBundle object on the right hand side of the equality + operation. + +
+
+ +

+ +

+ +

+25.5.3 ESMF_FieldBundleOperator(/=) - FieldBundle not equal operator +

+ +

+ +

+
+INTERFACE: +

   interface operator(/=)
+   if (fieldbundle1 /= fieldbundle2) then ... endif
+   OR
+   result = (fieldbundle1 /= fieldbundle2)
+
RETURN VALUE: +
   logical :: result
+
ARGUMENTS: +
   type(ESMF_FieldBundle), intent(in) :: fieldbundle1
+   type(ESMF_FieldBundle), intent(in) :: fieldbundle2
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Test whether fieldbundle1 and fieldbundle2 are not valid aliases to the + same ESMF fieldbundle object in memory. For a more general comparison of two ESMF + FieldBundles, going beyond the simple alias test, the ESMF_FieldBundleMatch() function + (not yet implemented) must be used. + +

+The arguments are: +

+
fieldbundle1
+
The ESMF_FieldBundle object on the left hand side of the non-equality + operation. + +
+
fieldbundle2
+
The ESMF_FieldBundle object on the right hand side of the non-equality + operation. + +
+
+ +

+ +

+ +

+25.5.4 ESMF_FieldBundleAdd - Add Fields to a FieldBundle +

+ +

+ +

+
+INTERFACE: +

     ! Private name; call using ESMF_FieldBundleAdd()
+     subroutine ESMF_FieldBundleAddList(fieldbundle, fieldList, &
+       multiflag, relaxedflag, rc)
+
ARGUMENTS: +
     type(ESMF_FieldBundle), intent(inout) :: fieldbundle
+     type(ESMF_Field), intent(in) :: fieldList(:)
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     logical, intent(in), optional :: multiflag
+     logical, intent(in), optional :: relaxedflag
+     integer, intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Add Field(s) to a FieldBundle. It is an error if fieldList contains + Fields that match by name Fields already contained in + fieldbundle when multiflag + is set to .false. and relaxedflag is set to .false.. + +

+

+
fieldbundle
+
ESMF_FieldBundle to be added to. + +
+
fieldList
+
List of ESMF_Field objects to be added. + +
+
[multiflag]
+
A setting of .true. allows multiple items with the same name + to be added to ESMF_FieldBundle. For .false. added items must + have unique names. The default setting is .false.. + +
+
[relaxedflag]
+
A setting of .true. indicates a relaxed definition of "add" + under multiflag=.false. mode, where it is not an error if + fieldList contains items with names that are also found in + ESMF_FieldBundle. The ESMF_FieldBundle is left unchanged for these items. + For .false. this is treated as an error condition. + The default setting is .false.. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+25.5.5 ESMF_FieldBundleAddReplace - Conditionally add or replace Fields in a FieldBundle +

+ +

+ +

+
+INTERFACE: +

     subroutine ESMF_FieldBundleAddReplace(fieldbundle, fieldList, rc)
+
ARGUMENTS: +
     type(ESMF_FieldBundle), intent(inout) :: fieldbundle
+     type(ESMF_Field), intent(in) :: fieldList(:)
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer, intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Fields in fieldList that do not match any Fields by name in + fieldbundle are added to the FieldBundle. Fields in fieldList + that match any Fields by name in fieldbundle replace those Fields. + +

+

+
fieldbundle
+
ESMF_FieldBundle to be manipulated. + +
+
fieldList
+
List of ESMF_Field objects to be added or used as replacement. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+25.5.6 ESMF_FieldBundleCreate - Create a non packed FieldBundle from a list of Fields +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_FieldBundleCreate()
+   function ESMF_FieldBundleCreateDefault(fieldList, &
+       multiflag, relaxedflag, name, rc)
+
RETURN VALUE: +
     type(ESMF_FieldBundle) :: ESMF_FieldBundleCreateDefault
+
ARGUMENTS: +
 -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     type(ESMF_Field), intent(in), optional :: fieldList(:)
+     logical, intent(in), optional :: multiflag
+     logical, intent(in), optional :: relaxedflag
+     character (len=*),intent(in), optional :: name
+     integer, intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Create an ESMF_FieldBundle object from a list of existing Fields. + +

+The creation of a FieldBundle leaves the bundled Fields unchanged, they + remain valid individual objects. a FieldBundle is a light weight container + of Field references. The actual data remains in place, there are no + data movements or duplications associated with the creation of an + FieldBundle. + +

+

+
[fieldList]
+
List of ESMF_Field objects to be bundled. + +
+
[multiflag]
+
A setting of .true. allows multiple items with the same name + to be added to fieldbundle. For .false. added items must + have unique names. The default setting is .false.. + +
+
[relaxedflag]
+
A setting of .true. indicates a relaxed definition of "add" + under multiflag=.false. mode, where it is not an error if + fieldList contains items with names that are also found in + fieldbundle. The fieldbundle is left unchanged for these items. + For .false. this is treated as an error condition. + The default setting is .false.. + +
+
[name]
+
Name of the created ESMF_FieldBundle. A default name is generated + if not specified. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+25.5.7 ESMF_FieldBundleCreate - Create a packed FieldBundle from Fortran array pointer and Grid +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_FieldBundleCreate() 
+   function ESMF_FieldBundleCreateGrid<rank><type><kind>(fieldNameList, & 
+   farrayPtr, grid, fieldDim, & 
+   indexflag, staggerLoc, & 
+   gridToFieldMap, & 
+   totalLWidth, totalUWidth, name, rc)
+
RETURN VALUE: +
   type(ESMF_FieldBundle) :: ESMF_FieldBundleCreateGridDataPtr<rank><type><kind>
+
ARGUMENTS: +
   character(len=*), intent(in) :: fieldNameList(:) 
+   <type> (ESMF_KIND_<kind>), dimension(<rank>), pointer :: farrayPtr 
+   type(ESMF_Grid), intent(in) :: grid 
+   integer, intent(in) :: fieldDim 
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+   type(ESMF_Index_Flag), intent(in), optional :: indexflag 
+   type(ESMF_StaggerLoc), intent(in), optional :: staggerloc 
+   integer, intent(in), optional :: gridToFieldMap(:) 
+   integer, intent(in), optional :: totalLWidth(:) 
+   integer, intent(in), optional :: totalUWidth(:) 
+   integer, intent(in), optional :: name 
+   integer, intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Create a packed FieldBundle from user supplied list of field names, pre-allocated + Fortran array pointer, and ESMF_Grid object. + +

+The arguments are: +

+
fieldNameList
+
A list of field names for the Fields held by the packed FieldBundle. + +
+
farrayPtr
+
Pre-allocated Fortran array pointer holding the memory of the list of Fields. + +
+
grid
+
The ESMF_Grid object on which the Fields in the packed FieldBundle are built. + +
+
fieldDim
+
The dimension in the farrayPtr that contains the indices of Fields to be packed. + +
+
[indexflag]
+
Indicate how DE-local indices are defined. See section + 54.29 for a list of valid indexflag options. + All Fields in packed FieldBundle use identical indexflag setting. + +
+
[staggerloc]
+
Stagger location of data in grid cells. For valid + predefined values see section 31.2.6. + To create a custom stagger location see section + 31.3.25. The default + value is ESMF_STAGGERLOC_CENTER. + All Fields in packed FieldBundle use identical staggerloc setting. + +
+
[gridToFieldMap]
+
List with number of elements equal to the + grid's dimCount. The list elements map each dimension + of the grid to a dimension in the farrayPtr by + specifying the appropriate farrayPtr dimension index. + The default is to + map all of the grid's dimensions against the lowest dimensions of + the farrayPtr in sequence, i.e. gridToFieldMap = (/1,2,3,.../). + The values of all gridToFieldMap entries must be greater than or equal + to one and smaller than or equal to the farrayPtr rank. + It is erroneous to specify the same gridToFieldMap entry + multiple times. The total ungridded dimensions in the field + are the total farrayPtr dimensions less + the total (distributed + undistributed) dimensions in + the grid. Ungridded dimensions must be in the same order they are + stored in the farrayPtr. Permutations of the order of + dimensions are handled via individual communication methods. For example, + an undistributed dimension can be remapped to a distributed dimension + as part of the ESMF_ArrayRedist() operation. + All Fields in packed FieldBundle use identical gridToFieldMap setting. + +
+
[totalLWidth]
+
Lower bound of halo region. The size of this array is the number + of gridded dimensions in the Field. However, ordering of the elements + needs to be the same as they appear in the farrayPtr. Values default + to 0. If values for totalLWidth are specified they must be reflected in + the size of the farrayPtr. That is, for each gridded dimension the + farrayPtr size should be max( totalLWidth + totalUWidth + + computationalCount, exclusiveCount ). + All Fields in packed FieldBundle use identical totalLWidth setting. + +
+
[totalUWidth]
+
Upper bound of halo region. The size of this array is the number + of gridded dimensions in the Field. However, ordering of the elements + needs to be the same as they appear in the farrayPtr. Values default + to 0. If values for totalUWidth are specified they must be reflected in + the size of the farrayPtr. That is, for each gridded dimension the + farrayPtr size should max( totalLWidth + totalUWidth + + computationalCount, exclusiveCount ). + All Fields in packed FieldBundle use identical totalUWidth setting. + +
+
[name]
+
FieldBundle name. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+25.5.8 ESMF_FieldBundleCreate - Create a packed FieldBundle from Fortran array pointer and Mesh +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_FieldBundleCreate() 
+   function ESMF_FieldBundleCreateMesh<rank><type><kind>(fieldNameList, & 
+   farrayPtr, Mesh, fieldDim, & 
+   meshLoc, gridToFieldMap, name, rc)
+
RETURN VALUE: +
   type(ESMF_FieldBundle) :: ESMF_FieldBundleCreateMeshDataPtr<rank><type><kind>
+
ARGUMENTS: +
   character(len=*), intent(in) :: fieldNameList(:) 
+   <type> (ESMF_KIND_<kind>), dimension(<rank>), pointer :: farrayPtr 
+   type(ESMF_Mesh), intent(in) :: mesh 
+   integer, intent(in) :: fieldDim 
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+   type(ESMF_MeshLoc), intent(in), optional:: meshloc 
+   integer, intent(in), optional :: gridToFieldMap(:) 
+   integer, intent(in), optional :: name 
+   integer, intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Create a packed FieldBundle from user supplied list of field names, pre-allocated + Fortran array pointer, and ESMF_Mesh object. + +

+The arguments are: +

+
fieldNameList
+
A list of field names for the Fields held by the packed FieldBundle. + +
+
farrayPtr
+
Pre-allocated Fortran array pointer holding the memory of the list of Fields. + +
+
mesh
+
The ESMF_Mesh object on which the Fields in the packed FieldBundle are built. + +
+
fieldDim
+
The dimension in the farrayPtr that contains the indices of Fields to be packed. + +
+
[meshloc]
+
The part of the Mesh on which to build the Field. For valid + predefined values see Section 54.41. + If not set, defaults to ESMF_MESHLOC_NODE. + +
+
[gridToFieldMap]
+
List with number of elements equal to the + mesh's dimCount. The list elements map each dimension + of the mesh to a dimension in the farrayPtr by + specifying the appropriate farrayPtr dimension index. + The default is to + map all of the mesh's dimensions against the lowest dimensions of + the farrayPtr in sequence, i.e. gridToFieldMap = (/1,2,3,.../). + The values of all gridToFieldMap entries must be greater than or equal + to one and smaller than or equal to the farrayPtr rank. + It is erroneous to specify the same gridToFieldMap entry + multiple times. The total ungridded dimensions in the field + are the total farrayPtr dimensions less + the total (distributed + undistributed) dimensions in + the mesh. Ungridded dimensions must be in the same order they are + stored in the farrayPtr. Permutations of the order of + dimensions are handled via individual communication methods. For example, + an undistributed dimension can be remapped to a distributed dimension + as part of the ESMF_ArrayRedist() operation. + All Fields in packed FieldBundle use identical gridToFieldMap setting. + +
+
[name]
+
FieldBundle name. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+25.5.9 ESMF_FieldBundleDestroy - Release resources associated with a FieldBundle +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_FieldBundleDestroy(fieldbundle, noGarbage, rc)
+
ARGUMENTS: +
     type(ESMF_FieldBundle), intent(inout) :: fieldbundle
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     logical, intent(in), optional :: noGarbage
+     integer, intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    7.0.0
    +
    Added argument noGarbage. + The argument provides a mechanism to override the default garbage collection + mechanism when destroying an ESMF object. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Destroy an ESMF_FieldBundle object. The member Fields are not + touched by this operation and remain valid objects that need to be + destroyed individually if necessary. + +

+The arguments are: +

+
fieldbundle
+
ESMF_FieldBundle object to be destroyed. + +
+
[noGarbage]
+
If set to .TRUE. the object will be fully destroyed and removed + from the ESMF garbage collection system. Note however that under this + condition ESMF cannot protect against accessing the destroyed object + through dangling aliases - a situation which may lead to hard to debug + application crashes. + +

+It is generally recommended to leave the noGarbage argument + set to .FALSE. (the default), and to take advantage of the ESMF + garbage collection system which will prevent problems with dangling + aliases or incorrect sequences of destroy calls. However this level of + support requires that a small remnant of the object is kept in memory + past the destroy call. This can lead to an unexpected increase in memory + consumption over the course of execution in applications that use + temporary ESMF objects. For situations where the repeated creation and + destruction of temporary objects leads to memory issues, it is + recommended to call with noGarbage set to .TRUE., fully + removing the entire temporary object from memory. + +

+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+25.5.10 ESMF_FieldBundleGet - Get object-wide information from a FieldBundle +

+ +

+ +

+
+INTERFACE: +

     ! Private name; call using ESMF_FieldBundleGet()
+     subroutine ESMF_FieldBundleGetListAll(fieldbundle, &
+       itemorderflag, geomtype, grid, locstream, mesh, xgrid, &
+       fieldCount, fieldList, fieldNameList, isPacked, name, vm, rc)
+
ARGUMENTS: +
     type(ESMF_FieldBundle), intent(in) :: fieldbundle
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     type(ESMF_ItemOrder_Flag), intent(in), optional :: itemorderflag
+     type(ESMF_GeomType_Flag), intent(out), optional :: geomtype
+     type(ESMF_Grid), intent(out), optional :: grid
+     type(ESMF_LocStream), intent(out), optional :: locstream
+     type(ESMF_Mesh), intent(out), optional :: mesh
+     type(ESMF_XGrid), intent(out), optional :: xgrid
+     integer, intent(out), optional :: fieldCount
+     type(ESMF_Field), intent(out), optional :: fieldList(:)
+     character(len=*), intent(out), optional :: fieldNameList(:)
+     logical, intent(out), optional :: isPacked
+     character(len=*), intent(out), optional :: name
+     type(ESMF_VM), intent(out), optional :: vm
+     integer, intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    6.1.0
    +
    Added argument itemorderflag. + The new argument gives the user control over the order in which + the items are returned. + +
    +
    8.0.0
    +
    Added argument isPacked. + The new argument allows the user to query if this is a packed FieldBundle. + +
    +
    8.8.0
    +
    Added argument vm in order to offer information about the + VM on which the FieldBundle was created. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Get the list of all Fields and field names bundled in a FieldBundle. + +

+

+
fieldbundle
+
ESMF_FieldBundle to be queried. + +
+
[itemorderflag]
+
Specifies the order of the returned items in the fieldList or the + fieldNameList. + The default is ESMF_ITEMORDER_ABC. + See 54.34 for a full list of options. + +
+
[geomtype]
+
Flag that indicates what type of geometry this FieldBundle object holds. + Can be ESMF_GEOMTYPE_GRID, ESMF_GEOMTYPE_MESH, ESMF_GEOMTYPE_LOCSTREAM, + ESMF_GEOMTYPE_XGRID + +
+
[grid]
+
The Grid object that this FieldBundle object holds. + +
+
[locstream]
+
The LocStream object that this FieldBundle object holds. + +
+
[mesh]
+
The Mesh object that this FieldBundle object holds. + +
+
[xgrid]
+
The XGrid object that this FieldBundle object holds. + +
+
[fieldCount]
+
Upon return holds the number of Fields bundled in the fieldbundle. + +
+
[fieldList]
+
Upon return holds a list of Fields bundled in ESMF_FieldBundle. The + argument must be allocated to be at least of size fieldCount. + +
+
[fieldNameList]
+
Upon return holds a list of the names of the fields bundled in + ESMF_FieldBundle. The argument must be allocated to be at least of + size fieldCount. + +
+
[isPacked]
+
Upon return holds the information if this FieldBundle is packed. + +
+
[name]
+
Name of the FieldBundle object. + +
+
[vm
+
The VM on which the FieldBundle object was created. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+25.5.11 ESMF_FieldBundleGet - Get information about a Field by name and optionally return a Field +

+ +

+ +

+
+INTERFACE: +

     ! Private name; call using ESMF_FieldBundleGet()
+     subroutine ESMF_FieldBundleGetItem(fieldbundle, fieldName, &
+       field, fieldCount, isPresent, rc)
+
ARGUMENTS: +
     type(ESMF_FieldBundle), intent(in) :: fieldbundle
+     character(len=*), intent(in) :: fieldName
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     type(ESMF_Field), intent(out), optional :: field
+     integer, intent(out), optional :: fieldCount
+     logical, intent(out), optional :: isPresent
+     integer, intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Get information about items that match fieldName in FieldBundle. + +

+

+
fieldbundle
+
ESMF_FieldBundle to be queried. + +
+
fieldName
+
Specified name. + +
+
[field]
+
Upon return holds the requested field item. It is an error if this + argument was specified and there is not exactly one field item in + ESMF_FieldBundle that matches fieldName. + +
+
[fieldCount]
+
Number of Fields with fieldName in ESMF_FieldBundle. + +
+
[isPresent]
+
Upon return indicates whether field(s) with fieldName exist + in ESMF_FieldBundle. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+25.5.12 ESMF_FieldBundleGet - Get a list of Fields by name +

+ +

+ +

+
+INTERFACE: +

     ! Private name; call using ESMF_FieldBundleGet()
+     subroutine ESMF_FieldBundleGetList(fieldbundle, fieldName, fieldList, &
+       itemorderflag, rc)
+
ARGUMENTS: +
     type(ESMF_FieldBundle), intent(in) :: fieldbundle
+     character(len=*), intent(in) :: fieldName
+     type(ESMF_Field), intent(out) :: fieldList(:)
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     type(ESMF_ItemOrder_Flag), intent(in), optional :: itemorderflag
+     integer, intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    6.1.0
    +
    Added argument itemorderflag. + The new argument gives the user control over the order in which + the items are returned. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Get the list of Fields from fieldbundle that match fieldName. + +

+

+
fieldbundle
+
ESMF_FieldBundle to be queried. + +
+
fieldName
+
Specified name. + +
+
fieldList
+
List of Fields in ESMF_FieldBundle that match fieldName. The + argument must be allocated to be at least of size fieldCount + returned for this fieldName. + +
+
[itemorderflag]
+
Specifies the order of the returned items in the fieldList. + The default is ESMF_ITEMORDER_ABC. + See 54.34 for a full list of options. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+25.5.13 ESMF_FieldBundleGet - Get Fortran array pointer from a packed FieldBundle +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_FieldBundleGet() 
+   function ESMF_FieldBundleGetDataPtr<rank><type><kind>(fieldBundle, & 
+   localDe, farrayPtr, & 
+   rc)
+
RETURN VALUE: +
   type(ESMF_FieldBundle) :: ESMF_FieldBundleGetDataPtr<rank><type><kind>
+
ARGUMENTS: +
   type(ESMF_FieldBundle), intent(in) :: fieldBundle 
+   integer, intent(in), optional :: localDe 
+   <type> (ESMF_KIND_<kind>), dimension(<rank>), pointer :: farrayPtr 
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+   integer, intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Get a Fortran pointer to DE-local memory allocation within packed FieldBundle. + It's erroneous to perform this call on a FieldBundle that's not packed. + +

+The arguments are: +

+
fieldBundle
+
ESMF_FieldBundle object. + +
+
[localDe]
+
Local DE for which information is requested. [0,..,localDeCount-1]. + For localDeCount==1 the localDe argument may be omitted, + in which case it will default to localDe=0. In the case where + packed FieldBundle is created on a Grid, the number of localDes can + be queried from the Grid attached to the FieldBundle. In the case where + packed FieldBundle is created on a Mesh, the number of localDes is 1. + +
+
farrayPtr
+
Fortran array pointer which will be pointed at DE-local memory allocation + in packed FieldBundle. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+25.5.14 ESMF_FieldBundleHalo - Execute a FieldBundle halo operation +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_FieldBundleHalo(fieldbundle, routehandle, &
+     checkflag, rc)
+
ARGUMENTS: +
         type(ESMF_FieldBundle), intent(inout) :: fieldbundle
+         type(ESMF_RouteHandle), intent(inout) :: routehandle
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+         logical, intent(in), optional :: checkflag
+         integer, intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Execute a precomputed halo operation for the Fields in fieldbundle. + The FieldBundle must match the respective FieldBundle used during + ESMF_FieldBundleHaloStore() in type, kind, and + memory layout of the gridded dimensions. However, the size, number, + and index order of ungridded dimensions may be different. See section + 37.2.5 for a more detailed discussion of RouteHandle + reusability. + +

+See ESMF_FieldBundleHaloStore() on how to precompute + routehandle. + +

+

+
fieldbundle
+
ESMF_FieldBundle with source data. The data in this + FieldBundle may be destroyed by this call. + +
+
routehandle
+
Handle to the precomputed Route. + +
+
[checkflag]
+
If set to .TRUE. the input FieldBundle pair will be checked for + consistency with the precomputed operation provided by routehandle. + If set to .FALSE. (default) only a very basic input check + will be performed, leaving many inconsistencies undetected. Set + checkflag to .FALSE. to achieve highest performance. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+25.5.15 ESMF_FieldBundleHaloRelease - Release resources associated with a FieldBundle halo operation +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_FieldBundleHaloRelease(routehandle, &
+     noGarbage, rc)
+
ARGUMENTS: +
         type(ESMF_RouteHandle), intent(inout) :: routehandle
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+         logical, intent(in), optional :: noGarbage
+         integer, intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    8.0.0
    +
    Added argument noGarbage. + The argument provides a mechanism to override the default garbage collection + mechanism when destroying an ESMF object. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Release resources associated with a FieldBundle halo operation. After this call + routehandle becomes invalid. + +

+

+
routehandle
+
Handle to the precomputed Route. + +
+
[noGarbage]
+
If set to .TRUE. the object will be fully destroyed and removed + from the ESMF garbage collection system. Note however that under this + condition ESMF cannot protect against accessing the destroyed object + through dangling aliases - a situation which may lead to hard to debug + application crashes. + +

+It is generally recommended to leave the noGarbage argument + set to .FALSE. (the default), and to take advantage of the ESMF + garbage collection system which will prevent problems with dangling + aliases or incorrect sequences of destroy calls. However this level of + support requires that a small remnant of the object is kept in memory + past the destroy call. This can lead to an unexpected increase in memory + consumption over the course of execution in applications that use + temporary ESMF objects. For situations where the repeated creation and + destruction of temporary objects leads to memory issues, it is + recommended to call with noGarbage set to .TRUE., fully + removing the entire temporary object from memory. + +

+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+25.5.16 ESMF_FieldBundleHaloStore - Precompute a FieldBundle halo operation +

+ +

+ +

+
+INTERFACE: +

     subroutine ESMF_FieldBundleHaloStore(fieldbundle, routehandle, &
+       rc)
+
ARGUMENTS: +
     type(ESMF_FieldBundle), intent(inout) :: fieldbundle
+     type(ESMF_RouteHandle), intent(inout) :: routehandle
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer, intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Store a FieldBundle halo operation over the data in fieldbundle. + By definition, all elements in the total Field regions that lie + outside the exclusive regions will be considered potential destination + elements for the halo operation. However, only those elements that have a corresponding + halo source element, i.e. an exclusive element on one of the DEs, will be + updated under the halo operation. Elements that have no associated source + remain unchanged under halo. + +

+The routine returns an ESMF_RouteHandle that can be used to call + ESMF_FieldBundleHalo() on any pair of FieldBundles that matches + srcFieldBundle and dstFieldBundle in type, kind, + and memory layout of the gridded dimensions. However, the size, + number, and index order of ungridded dimensions may be different. + See section 37.2.5 for a more detailed discussion of + RouteHandle reusability. + +

+This call is collective across the current VM. + +

+

+
fieldbundle
+
ESMF_FieldBundle containing data to be haloed. The data in this + FieldBundle may be destroyed by this call. + +
+
routehandle
+
Handle to the precomputed Route. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+25.5.17 ESMF_FieldBundleIsCreated - Check whether a FieldBundle object has been created +

+ +

+ +

+
+INTERFACE: +

   function ESMF_FieldBundleIsCreated(fieldbundle, rc)
+
RETURN VALUE: +
     logical :: ESMF_FieldBundleIsCreated
+
ARGUMENTS: +
     type(ESMF_FieldBundle), intent(in) :: fieldbundle
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer, intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Return .true. if the fieldbundle has been created. Otherwise return + .false.. If an error occurs, i.e. rc /= ESMF_SUCCESS is + returned, the return value of the function will also be .false.. + +

+The arguments are: +

+
fieldbundle
+
ESMF_FieldBundle queried. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+25.5.18 ESMF_FieldBundlePrint - Print FieldBundle information +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_FieldBundlePrint(fieldbundle, rc)
+
ARGUMENTS: +
     type(ESMF_FieldBundle), intent(in) :: fieldbundle
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer, intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Print internal information of the specified fieldbundle object. + +

+The arguments are: +

+
fieldbundle
+
ESMF_FieldBundle object. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+25.5.19 ESMF_FieldBundleRead - Read Fields to a FieldBundle from file(s) +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_FieldBundleRead(fieldbundle, fileName, &
+     singleFile, timeslice, iofmt, rc)
+
ARGUMENTS: +
     type(ESMF_FieldBundle), intent(inout) :: fieldbundle
+     character(*), intent(in) :: fileName
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     logical, intent(in), optional :: singleFile
+     integer, intent(in), optional :: timeslice
+     type(ESMF_IOFmt_Flag), intent(in), optional :: iofmt
+     integer, intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Read field data to a FieldBundle object from file(s). + For this API to be functional, the environment variable ESMF_PIO + should be set to either "internal" or "external" when the ESMF library is built. + Please see the section on Data I/O, 38.2. + +

+Limitations: + +

    +
  • For multi-tile Fields, all Fields in the FieldBundle must contain + the same number of tiles. +
  • +
  • Not supported in ESMF_COMM=mpiuni mode. + +
  • +
+ +

+The arguments are: +

+
fieldbundle
+
An ESMF_FieldBundle object. + +
+
fileName
+
The name of the file from which FieldBundle data is read. + If the FieldBundle contains multi-tile Arrays, then fileName must contain + exactly one instance of "*"; this is a placeholder that will be replaced + by the tile number, with each tile being read from a separate file. (For + example, for a fileName of "myfile*.nc", tile 1 will be read from + "myfile1.nc", tile 2 from "myfile2.nc", etc.) + (This handling of the fileName for multi-tile I/O is subject to change.) + +
+
[singleFile]
+
A logical flag, the default is .true., i.e., all Fields in the bundle + are stored in one single file. If .false., each field is stored + in separate files; these files are numbered with the name based on the + argument "file". That is, a set of files are named: [file_name]001, + [file_name]002, [file_name]003,... + +
+
[timeslice]
+
The time-slice number of the variable read from file. + +
+
[iofmt]
+
The I/O format. Please see Section 54.30 for the list + of options. If not present, defaults to ESMF_IOFMT_NETCDF. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+25.5.20 ESMF_FieldBundleRedist - Execute a FieldBundle redistribution +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_FieldBundleRedist(srcFieldBundle, dstFieldBundle, &
+     routehandle, checkflag, rc)
+
ARGUMENTS: +
         type(ESMF_FieldBundle), intent(in), optional :: srcFieldBundle
+         type(ESMF_FieldBundle), intent(inout), optional :: dstFieldBundle
+         type(ESMF_RouteHandle), intent(inout) :: routehandle
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+         logical, intent(in), optional :: checkflag
+         integer, intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Execute a precomputed redistribution from srcFieldBundle + to dstFieldBundle. + Both srcFieldBundle and dstFieldBundle must match the + respective FieldBundles used during ESMF_FieldBundleRedistStore() + in type, kind, and memory layout of the gridded + dimensions. However, the size, number, + and index order of ungridded dimensions may be different. See section + 37.2.5 for a more detailed discussion of RouteHandle + reusability. + +

+The srcFieldBundle and dstFieldBundle arguments are optional in support of + the situation where srcFieldBundle and/or dstFieldBundle are not defined on + all PETs. The srcFieldBundle and dstFieldBundle must be specified on those + PETs that hold source or destination DEs, respectively, but may be omitted + on all other PETs. PETs that hold neither source nor destination DEs may + omit both arguments. + +

+It is erroneous to specify the identical FieldBundle object for srcFieldBundle and + dstFieldBundle arguments. + +

+See ESMF_FieldBundleRedistStore() on how to precompute + routehandle. + +

+This call is collective across the current VM. + +

+For examples and associated documentation regarding this method see Section + 25.2.9. + +

+

+
[srcFieldBundle]
+
ESMF_FieldBundle with source data. + +
+
[dstFieldBundle]
+
ESMF_FieldBundle with destination data. + +
+
routehandle
+
Handle to the precomputed Route. + +
+
[checkflag]
+
If set to .TRUE. the input FieldBundle pair will be checked for + consistency with the precomputed operation provided by routehandle. + If set to .FALSE. (default) only a very basic input check + will be performed, leaving many inconsistencies undetected. Set + checkflag to .FALSE. to achieve highest performance. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+25.5.21 ESMF_FieldBundleRedistRelease - Release resources associated with a FieldBundle redistribution +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_FieldBundleRedistRelease(routehandle, &
+     noGarbage, rc)
+
ARGUMENTS: +
         type(ESMF_RouteHandle), intent(inout) :: routehandle
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+         logical, intent(in), optional :: noGarbage
+         integer, intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    8.0.0
    +
    Added argument noGarbage. + The argument provides a mechanism to override the default garbage collection + mechanism when destroying an ESMF object. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Release resources associated with a FieldBundle redistribution. After this call + routehandle becomes invalid. + +

+

+
routehandle
+
Handle to the precomputed Route. + +
+
[noGarbage]
+
If set to .TRUE. the object will be fully destroyed and removed + from the ESMF garbage collection system. Note however that under this + condition ESMF cannot protect against accessing the destroyed object + through dangling aliases - a situation which may lead to hard to debug + application crashes. + +

+It is generally recommended to leave the noGarbage argument + set to .FALSE. (the default), and to take advantage of the ESMF + garbage collection system which will prevent problems with dangling + aliases or incorrect sequences of destroy calls. However this level of + support requires that a small remnant of the object is kept in memory + past the destroy call. This can lead to an unexpected increase in memory + consumption over the course of execution in applications that use + temporary ESMF objects. For situations where the repeated creation and + destruction of temporary objects leads to memory issues, it is + recommended to call with noGarbage set to .TRUE., fully + removing the entire temporary object from memory. + +

+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+25.5.22 ESMF_FieldBundleRedistStore - Precompute a FieldBundle redistribution with local factor argument +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_FieldBundleRedistStore()
+   subroutine ESMF_FieldBundleRedistStore<type><kind>(srcFieldBundle, &
+   dstFieldBundle, routehandle, factor, &
+   ignoreUnmatchedIndicesFlag, srcToDstTransposeMap, rc)
+
ARGUMENTS: +
   type(ESMF_FieldBundle), intent(in) :: srcFieldBundle
+   type(ESMF_FieldBundle), intent(inout) :: dstFieldBundle
+   type(ESMF_RouteHandle), intent(inout) :: routehandle
+   <type>(ESMF_KIND_<kind>), intent(in) :: factor
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+   logical, intent(in), optional :: ignoreUnmatchedIndicesFlag(:)
+   integer, intent(in), optional :: srcToDstTransposeMap(:)
+   integer, intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    8.1.0
    +
    Added argument ignoreUnmatchedIndicesFlag to support cases + where source and destination side do not cover the exact same index space. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Store a FieldBundle redistribution operation from srcFieldBundle to dstFieldBundle. + PETs that + specify a factor argument must use the <type><kind> overloaded interface. Other + PETs call into the interface without factor argument. If multiple PETs specify + the factor argument its type and kind as well as its value must match across + all PETs. If none of the PETs specifies a factor argument the default will be a + factor of 1. + +

+Both srcFieldBundle and dstFieldBundle are interpreted as sequentialized + vectors. The + sequence is defined by the order of DistGrid dimensions and the order of + tiles within the DistGrid or by user-supplied arbitrary sequence indices. See + section 28.2.18 for details on the definition of sequence indices. + Redistribution corresponds to an identity mapping of the source FieldBundle vector to + the destination FieldBundle vector. + +

+Source and destination FieldBundles may be of different <type><kind>. Further source + and destination FieldBundles may differ in shape, however, the number of elements + must match. + +

+It is erroneous to specify the identical FieldBundle object for srcFieldBundle + and dstFieldBundle arguments. + +

+The routine returns an ESMF_RouteHandle that can be used to call + ESMF_FieldBundleRedist() on any pair of FieldBundles that matches + srcFieldBundle and dstFieldBundle in type, kind, + and memory layout of the gridded dimensions. However, the size, + number, and index order of ungridded dimensions may be different. + See section 37.2.5 for a more detailed discussion of + RouteHandle reusability. + +

+This method is overloaded for: +
+ ESMF_TYPEKIND_I4, ESMF_TYPEKIND_I8, +
+ ESMF_TYPEKIND_R4, ESMF_TYPEKIND_R8. +
+ +

+This call is collective across the current VM. + +

+For examples and associated documentation regarding this method see Section + 25.2.9. + +

+The arguments are: +

+
srcFieldBundle
+
ESMF_FieldBundle with source data. + +
+
dstFieldBundle
+
ESMF_FieldBundle with destination data. The data in this + FieldBundle may be destroyed by this call. + +
+
routehandle
+
Handle to the precomputed Route. + +
+
factor
+
Factor by which to multiply source data. + +
+
[ignoreUnmatchedIndicesFlag]
+
If set to .false., the default, source and destination side must + cover the identical index space, using precisely matching sequence + indices. If set to .true., mismatching sequence indices between source + and destination side are silently ignored. + The size of this array argument must either be 1 or equal the number of + Fields in the srcFieldBundle and dstFieldBundle arguments. In + the latter case, the handling of unmatched indices is specified for each + Field pair separately. If only one element is specified, it is + used for all Field pairs. + +
+
[srcToDstTransposeMap]
+
List with as many entries as there are dimensions in srcFieldBundle. Each + entry maps the corresponding srcFieldBundle dimension + against the specified dstFieldBundle + dimension. Mixing of distributed and undistributed dimensions is supported. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+25.5.23 ESMF_FieldBundleRedistStore - Precompute a FieldBundle redistribution without local factor argument +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_FieldBundleRedistStore()
+   subroutine ESMF_FieldBundleRedistStoreNF(srcFieldBundle, dstFieldBundle, &
+     routehandle, ignoreUnmatchedIndicesFlag, &
+     srcToDstTransposeMap, rc)
+
ARGUMENTS: +
     type(ESMF_FieldBundle), intent(in) :: srcFieldBundle
+     type(ESMF_FieldBundle), intent(inout) :: dstFieldBundle
+     type(ESMF_RouteHandle), intent(inout) :: routehandle
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     logical, intent(in), optional :: ignoreUnmatchedIndicesFlag(:)
+     integer, intent(in), optional :: srcToDstTransposeMap(:)
+     integer, intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    8.1.0
    +
    Added argument ignoreUnmatchedIndicesFlag to support cases + where source and destination side do not cover the exact same index space. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Store a FieldBundle redistribution operation from srcFieldBundle + to dstFieldBundle. PETs that specify non-zero matrix coefficients must use + the <type><kind> overloaded interface and provide the factorList and + factorIndexList arguments. Providing factorList and + factorIndexList arguments with size(factorList) = (/0/) and + size(factorIndexList) = (/2,0/) or (/4,0/) indicates that a + PET does not provide matrix elements. Alternatively, PETs that do not + provide matrix elements may also call into the overloaded interface + without factorList and factorIndexList arguments. + +

+Both srcFieldBundle and dstFieldBundle are interpreted as sequentialized + vectors. The + sequence is defined by the order of DistGrid dimensions and the order of + tiles within the DistGrid or by user-supplied arbitrary sequence indices. See + section 28.2.18 for details on the definition of sequence indices. + Redistribution corresponds to an identity mapping of the source FieldBundle vector to + the destination FieldBundle vector. + +

+Source and destination Fields may be of different <type><kind>. Further source + and destination Fields may differ in shape, however, the number of elements + must match. + +

+It is erroneous to specify the identical FieldBundle object for srcFieldBundle and dstFieldBundle + arguments. + +

+The routine returns an ESMF_RouteHandle that can be used to call + ESMF_FieldBundleRedist() on any pair of FieldBundles that matches + srcFieldBundle and dstFieldBundle in type, kind, + and memory layout of the gridded dimensions. However, the size, + number, and index order of ungridded dimensions may be different. + See section 37.2.5 for a more detailed discussion of + RouteHandle reusability. + +

+This call is collective across the current VM. + +

+For examples and associated documentation regarding this method see Section + 25.2.9. + +

+The arguments are: +

+
srcFieldBundle
+
ESMF_FieldBundle with source data. + +
+
dstFieldBundle
+
ESMF_FieldBundle with destination data. The data in this + FieldBundle may be destroyed by this call. + +
+
routehandle
+
Handle to the precomputed Route. + +
+
[ignoreUnmatchedIndicesFlag]
+
If set to .false., the default, source and destination side must + cover the identical index space, using precisely matching sequence + indices. If set to .true., mismatching sequence indices between source + and destination side are silently ignored. + The size of this array argument must either be 1 or equal the number of + Fields in the srcFieldBundle and dstFieldBundle arguments. In + the latter case, the handling of unmatched indices is specified for each + Field pair separately. If only one element is specified, it is + used for all Field pairs. + +
+
[srcToDstTransposeMap]
+
List with as many entries as there are dimensions in srcFieldBundle. Each + entry maps the corresponding srcFieldBundle dimension + against the specified dstFieldBundle + dimension. Mixing of distributed and undistributed dimensions is supported. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+25.5.24 ESMF_FieldBundleRegrid - Execute a FieldBundle regrid operation +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_FieldBundleRegrid(srcFieldBundle, dstFieldBundle, &
+          routehandle, zeroregion, termorderflag, checkflag, rc)
+
ARGUMENTS: +
         type(ESMF_FieldBundle), intent(in), optional :: srcFieldBundle
+         type(ESMF_FieldBundle), intent(inout), optional :: dstFieldBundle
+         type(ESMF_RouteHandle), intent(inout) :: routehandle
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+         type(ESMF_Region_Flag), intent(in), optional :: zeroregion
+         type(ESMF_TermOrder_Flag), intent(in), optional :: termorderflag(:)
+         logical, intent(in), optional :: checkflag
+         integer, intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    7.0.0
    +
    Added argument termorderflag. + The new argument gives the user control over the order in which + the src terms are summed up. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Execute a precomputed regrid from srcFieldBundle + to dstFieldBundle. + Both srcFieldBundle and dstFieldBundle must match the + respective FieldBundles used during ESMF_FieldBundleRedistStore() + in type, kind, and memory layout of the gridded + dimensions. However, the size, number, + and index order of ungridded dimensions may be different. See section + 37.2.5 for a more detailed discussion of RouteHandle + reusability. + +

+The srcFieldBundle and dstFieldBundle arguments are optional in support of + the situation where srcFieldBundle and/or dstFieldBundle are not defined on + all PETs. The srcFieldBundle and dstFieldBundle must be specified on those + PETs that hold source or destination DEs, respectively, but may be omitted + on all other PETs. PETs that hold neither source nor destination DEs may + omit both arguments. + +

+It is erroneous to specify the identical FieldBundle object for srcFieldBundle and + dstFieldBundle arguments. + +

+See ESMF_FieldBundleRegridStore() on how to precompute + routehandle. + +

+This call is collective across the current VM. + +

+

+
[srcFieldBundle]
+
ESMF_FieldBundle with source data. + +
+
[dstFieldBundle]
+
ESMF_FieldBundle with destination data. + +
+
routehandle
+
Handle to the precomputed Route. + +
+
[zeroregion]
+
If set to ESMF_REGION_TOTAL (default) the total regions of + all DEs in dstFieldBundle will be initialized to zero before updating the + elements with the results of the sparse matrix multiplication. If set to + ESMF_REGION_EMPTY the elements in dstFieldBundle will not be + modified prior to the sparse matrix multiplication and results will be + added to the incoming element values. Setting zeroregion to + ESMF_REGION_SELECT will only zero out those elements in the + destination FieldBundle that will be updated by the sparse matrix + multiplication. See section 54.50 for a complete list of + valid settings. + +
+
[termorderflag]
+
Specifies the order of the source side terms in all of the destination + sums. The termorderflag only affects the order of terms during + the execution of the RouteHandle. See the 37.2.1 section for an + in-depth discussion of all bit-for-bit reproducibility + aspects related to route-based communication methods. + See 54.60 for a full list of options. + The size of this array argument must either be 1 or equal the number of + Fields in the srcFieldBundle and dstFieldBundle arguments. In + the latter case, the term order for each Field Regrid operation is + indicated separately. If only one term order element is specified, it is + used for all Field pairs. + The default is (/ESMF_TERMORDER_FREE/), allowing maximum + flexibility in the order of terms for optimum performance. + +
+
[checkflag]
+
If set to .TRUE. the input FieldBundle pair will be checked for + consistency with the precomputed operation provided by routehandle. + If set to .FALSE. (default) only a very basic input check + will be performed, leaving many inconsistencies undetected. Set + checkflag to .FALSE. to achieve highest performance. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+25.5.25 ESMF_FieldBundleRegridRelease - Release resources associated with a FieldBundle regrid operation +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_FieldBundleRegridRelease(routehandle, &
+     noGarbage, rc)
+
ARGUMENTS: +
         type(ESMF_RouteHandle), intent(inout) :: routehandle
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+         logical, intent(in), optional :: noGarbage
+         integer, intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    8.0.0
    +
    Added argument noGarbage. + The argument provides a mechanism to override the default garbage collection + mechanism when destroying an ESMF object. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Release resources associated with a FieldBundle regrid operation. After this call + routehandle becomes invalid. + +

+

+
routehandle
+
Handle to the precomputed Route. + +
+
[noGarbage]
+
If set to .TRUE. the object will be fully destroyed and removed + from the ESMF garbage collection system. Note however that under this + condition ESMF cannot protect against accessing the destroyed object + through dangling aliases - a situation which may lead to hard to debug + application crashes. + +

+It is generally recommended to leave the noGarbage argument + set to .FALSE. (the default), and to take advantage of the ESMF + garbage collection system which will prevent problems with dangling + aliases or incorrect sequences of destroy calls. However this level of + support requires that a small remnant of the object is kept in memory + past the destroy call. This can lead to an unexpected increase in memory + consumption over the course of execution in applications that use + temporary ESMF objects. For situations where the repeated creation and + destruction of temporary objects leads to memory issues, it is + recommended to call with noGarbage set to .TRUE., fully + removing the entire temporary object from memory. + +

+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+25.5.26 ESMF_FieldBundleRegridStore - Precompute a FieldBundle regrid operation +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_FieldBundleRegridStore(srcFieldBundle, dstFieldBundle, &
+        srcMaskValues, dstMaskValues, regridmethod, polemethod, regridPoleNPnts, &
+        lineType, normType, extrapMethod, extrapNumSrcPnts, extrapDistExponent, &
+        extrapNumLevels, unmappedaction, ignoreDegenerate, srcTermProcessing, &
+        pipelineDepth, routehandle, rc)
+
ARGUMENTS: +
     type(ESMF_FieldBundle), intent(in) :: srcFieldBundle
+     type(ESMF_FieldBundle), intent(inout) :: dstFieldBundle
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer(ESMF_KIND_I4), target, intent(in), optional :: srcMaskValues(:)
+     integer(ESMF_KIND_I4), target, intent(in), optional :: dstMaskValues(:)
+     type(ESMF_RegridMethod_Flag), intent(in), optional :: regridmethod
+     type(ESMF_PoleMethod_Flag), intent(in), optional :: polemethod
+     integer, intent(in), optional :: regridPoleNPnts
+     type(ESMF_LineType_Flag), intent(in), optional :: lineType
+     type(ESMF_NormType_Flag), intent(in), optional :: normType
+     type(ESMF_ExtrapMethod_Flag), intent(in), optional :: extrapMethod
+     integer, intent(in), optional :: extrapNumSrcPnts
+     real, intent(in), optional :: extrapDistExponent
+     integer, intent(in), optional :: extrapNumLevels
+     type(ESMF_UnmappedAction_Flag),intent(in), optional :: unmappedaction
+     logical, intent(in), optional :: ignoreDegenerate
+     integer, intent(inout), optional :: srcTermProcessing
+     integer, intent(inout), optional :: pipelineDepth
+     type(ESMF_RouteHandle), intent(inout), optional :: routehandle
+     integer, intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    7.0.0
    +
    Added arguments ignoreDegenerate, lineType, + and normType. The argument ignoreDegenerate allows the user to + skip degenerate cells in the regridding instead of stopping with an error. + The argument lineType allows the user to control the path of the line + between two points on a sphere surface. This allows the user to use their + preferred line path for the calculation of distances and the shape of cells + during regrid weight calculation on a sphere. The argument normType + allows the user to control the type of normalization done during + conservative weight generation. + +
    +
    7.1.0r
    +
    Added argument srcTermProcessing. + Added argument pipelineDepth. + The new arguments provide access to the tuning parameters + affecting the performance and bit-for-bit behavior when applying + the regridding weights. + +

    +Added arguments extrapMethod, extrapNumSrcPnts, and + extrapDistExponent. These three new extrapolation arguments allow the + user to extrapolate destination points not mapped by the regrid method. + extrapMethod allows the user to choose the extrapolation method. + extrapNumSrcPnts and extrapDistExponent are parameters that + allow the user to tune the behavior of the + ESMF_EXTRAPMETHOD_NEAREST_IDAVG method. + +

    +
    8.0.0
    +
    Added argument extrapNumLevels. For level based + extrapolation methods (e.g. ESMF_EXTRAPMETHOD_CREEP) this argument + allows the user to set how many levels to extrapolate. + ! + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Store a FieldBundle regrid operation over the data in srcFieldBundle + and dstFieldBundle pair. + +

+The routine returns an ESMF_RouteHandle that can be used to call + ESMF_FieldBundleRegrid() on any pair of FieldBundles that matches + srcFieldBundle and dstFieldBundle in type, kind, + and memory layout of the gridded dimensions. However, the size, + number, and index order of ungridded dimensions may be different. + See section 37.2.5 for a more detailed discussion of + RouteHandle reusability. + +

+This call is collective across the current VM. + +

+

+
srcFieldbundle
+
Source ESMF_FieldBundle containing data to be regridded. + +
+
dstFieldbundle
+
Destination ESMF_FieldBundle. The data in this FieldBundle may be + overwritten by this call. + +
+
[srcMaskValues]
+
Mask information can be set in the Grids (see 31.3.17) + or Meshes (see 33.3.11) upon which the Fields in the + srcFieldbundle are built. The srcMaskValues argument + specifies the values in that mask information which indicate a source + point should be masked out. In other words, a location is masked if and + only if the value for that location in the mask information matches one + of the values listed in srcMaskValues. + If srcMaskValues is not specified, no masking will occur. + +
+
[dstMaskValues]
+
Mask information can be set in the Grids (see 31.3.17) or Meshes (see 33.3.11) + upon which the Fields in the dstFieldbundle are built. + The dstMaskValues argument specifies the values in that mask + information which indicate a destination point should be masked out. + In other words, a location is masked if and only if the value for that + location in the mask information matches + one of the values listed in dstMaskValues. + If dstMaskValues is not specified, no masking will occur. + +
+
[regridmethod]
+
The type of interpolation. Please see Section 54.51 for a list of + valid options. If not specified, defaults to ESMF_REGRIDMETHOD_BILINEAR. + +
+
[polemethod]
+
Which type of artificial pole + to construct on the source Grid for regridding. Please see + section 54.48 for a list of valid options. If not + specified, defaults to ESMF_POLEMETHOD_ALLAVG. + +
+
[regridPoleNPnts]
+
If polemethod is ESMF_POLEMETHOD_NPNTAVG. + This parameter indicates how many points should be averaged + over. Must be specified if polemethod is + ESMF_POLEMETHOD_NPNTAVG. + +
+
[lineType]
+
This argument controls the path of the line which connects two points on a sphere surface. This in + turn controls the path along which distances are calculated and the shape of the edges that make + up a cell. Both of these quantities can influence how interpolation weights are calculated. + As would be expected, this argument is only applicable when srcField and dstField are + built on grids which lie on the surface of a sphere. Section 54.36 shows a + list of valid options for this argument. If not specified, the default depends on the + regrid method. Section 54.36 has the defaults by line type. Figure 24.2.16 shows + which line types are supported for each regrid method as well as showing the default line type by regrid method. + +
+
[normType]
+
This argument controls the type of normalization used when generating conservative weights. This option + only applies to weights generated with regridmethod=ESMF_REGRIDMETHOD_CONSERVE. Please see + Section 54.45 for a + list of valid options. If not specified normType defaults to ESMF_NORMTYPE_DSTAREA. + +
+
[extrapMethod]
+
The type of extrapolation. Please see Section 54.18 + for a list of valid options. If not specified, defaults to + ESMF_EXTRAPMETHOD_NONE. + +
+
[extrapNumSrcPnts]
+
The number of source points to use for the extrapolation methods that use more than one source point + (e.g. ESMF_EXTRAPMETHOD_NEAREST_IDAVG). If not specified, defaults to 8. + +
+
[extrapDistExponent]
+
The exponent to raise the distance to when calculating weights for + the ESMF_EXTRAPMETHOD_NEAREST_IDAVG extrapolation method. A higher value reduces the influence + of more distant points. If not specified, defaults to 2.0. + +
+
[extrapNumLevels]
+
The number of levels to output for the extrapolation methods that fill levels + (e.g. ESMF_EXTRAPMETHOD_CREEP). When a method is used that requires this, then an error will be returned, if it + is not specified. + +
+
[unmappedaction]
+
Specifies what should happen if there are destination points that + can not be mapped to a source cell. Please see Section 54.62 for a + list of valid options. If not specified, unmappedaction defaults to ESMF_UNMAPPEDACTION_ERROR. + +
+
[ignoreDegenerate]
+
Ignore degenerate cells when checking the input Grids or Meshes for errors. If this is set to true, then the + regridding proceeds, but degenerate cells will be skipped. If set to false, a degenerate cell produces an error. + If not specified, ignoreDegenerate defaults to false. + +

+

+
[srcTermProcessing]
+
The srcTermProcessing parameter controls how many source terms, + located on the same PET and summing into the same destination element, + are summed into partial sums on the source PET before being transferred + to the destination PET. A value of 0 indicates that the entire arithmetic + is done on the destination PET; source elements are neither multiplied + by their factors nor added into partial sums before being sent off by the + source PET. A value of 1 indicates that source elements are multiplied + by their factors on the source side before being sent to the destination + PET. Larger values of srcTermProcessing indicate the maximum number + of terms in the partial sums on the source side. + +

+Note that partial sums may lead to bit-for-bit differences in the results. + See section 37.2.1 for an in-depth discussion of all + bit-for-bit reproducibility aspects related to route-based communication + methods. + +

+The ESMF_FieldRegridStore() method implements an auto-tuning scheme + for the srcTermProcessing parameter. The intent on the + srcTermProcessing argument is "inout" in order to + support both overriding and accessing the auto-tuning parameter. + If an argument $>= 0$ is specified, it is used for the + srcTermProcessing parameter, and the auto-tuning phase is skipped. + In this case the srcTermProcessing argument is not modified on + return. If the provided argument is $< 0$, the srcTermProcessing + parameter is determined internally using the auto-tuning scheme. In this + case the srcTermProcessing argument is re-set to the internally + determined value on return. Auto-tuning is also used if the optional + srcTermProcessing argument is omitted. + +

+

+
[pipelineDepth]
+
The pipelineDepth parameter controls how many messages a PET + may have outstanding during a sparse matrix exchange. Larger values + of pipelineDepth typically lead to better performance. However, + on some systems too large a value may lead to performance degradation, + or runtime errors. + +

+Note that the pipeline depth has no effect on the bit-for-bit + reproducibility of the results. However, it may affect the performance + reproducibility of the exchange. + +

+The ESMF_FieldRegridStore() method implements an auto-tuning scheme + for the pipelineDepth parameter. The intent on the + pipelineDepth argument is "inout" in order to + support both overriding and accessing the auto-tuning parameter. + If an argument $>= 0$ is specified, it is used for the + pipelineDepth parameter, and the auto-tuning phase is skipped. + In this case the pipelineDepth argument is not modified on + return. If the provided argument is $< 0$, the pipelineDepth + parameter is determined internally using the auto-tuning scheme. In this + case the pipelineDepth argument is re-set to the internally + determined value on return. Auto-tuning is also used if the optional + pipelineDepth argument is omitted. + +

+

+
[routehandle]
+
Handle to the precomputed Route. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+25.5.27 ESMF_FieldBundleRemove - Remove Fields from FieldBundle +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_FieldBundleRemove(fieldbundle, fieldNameList, &
+     multiflag, relaxedflag, rc)
+
ARGUMENTS: +
     type(ESMF_FieldBundle), intent(inout) :: fieldbundle
+     character(len=*), intent(in) :: fieldNameList(:)
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     logical, intent(in), optional :: multiflag
+     logical, intent(in), optional :: relaxedflag
+     integer, intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Remove field(s) by name from FieldBundle. In the relaxed setting it is + not an error if fieldNameList contains names that are not + found in fieldbundle. + +

+

+
fieldbundle
+
ESMF_FieldBundle from which to remove items. + +
+
fieldNameList
+
List of items to remove. + +
+
[multiflag]
+
A setting of .true. allows multiple Fields with the same name + to be removed from fieldbundle. For .false., items to be + removed must have unique names. The default setting is .false.. + +
+
[relaxedflag]
+
A setting of .true. indicates a relaxed definition of "remove" + where it is not an error if fieldNameList contains item + names that are not found in fieldbundle. For .false. this is + treated as an error condition. + Further, in multiflag=.false. mode, the relaxed definition of + "remove" also covers the case where there are multiple items in + fieldbundle that match a single entry in fieldNameList. + For relaxedflag=.false. this is treated as an error condition. + The default setting is .false.. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+25.5.28 ESMF_FieldBundleReplace - Replace Fields in FieldBundle +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_FieldBundleReplace(fieldbundle, fieldList, &
+     multiflag, relaxedflag, rc)
+
ARGUMENTS: +
     type(ESMF_FieldBundle), intent(inout) :: fieldbundle
+     type(ESMF_Field), intent(in) :: fieldList(:)
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     logical, intent(in), optional :: multiflag
+     logical, intent(in), optional :: relaxedflag
+     integer, intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Replace field(s) by name in FieldBundle. In the relaxed setting it is not + an error if fieldList contains Fields that do not match by name any + item in fieldbundle. These Fields are simply ignored in this case. + +

+

+
fieldbundle
+
ESMF_FieldBundle in which to replace items. + +
+
fieldList
+
List of items to replace. + +
+
[multiflag]
+
A setting of .true. allows multiple items with the same name + to be replaced in fieldbundle. For .false., items to be + replaced must have unique names. The default setting is .false.. + +
+
[relaxedflag]
+
A setting of .true. indicates a relaxed definition of "replace" + where it is not an error if fieldList contains items with + names that are not found in fieldbundle. These items in + fieldList are ignored in the relaxed mode. For .false. this + is treated as an error condition. + Further, in multiflag=.false. mode, the relaxed definition of + "replace" also covers the case where there are multiple items in + fieldbundle that match a single entry by name in fieldList. + For relaxedflag=.false. this is treated as an error condition. + The default setting is .false.. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+25.5.29 ESMF_FieldBundleSet - Associate a Grid with an empty FieldBundle +

+ +

+ +

+
+INTERFACE: +

       ! Private name; call using ESMF_FieldBundleSet()
+       subroutine ESMF_FieldBundleSetGrid(fieldbundle, grid, rc)
+
ARGUMENTS: +
       type(ESMF_FieldBundle), intent(inout) :: fieldbundle
+       type(ESMF_Grid), intent(in) :: grid
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       integer, intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Sets the grid for a fieldbundle. + +

+The arguments are: +

+
fieldbundle
+
An ESMF_FieldBundle object. + +
+
grid
+
The ESMF_Grid which all ESMF_Fields added to this + ESMF_FieldBundle must have. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+25.5.30 ESMF_FieldBundleSet - Associate a Mesh with an empty FieldBundle +

+ +

+ +

+
+INTERFACE: +

       ! Private name; call using ESMF_FieldBundleSet()
+       subroutine ESMF_FieldBundleSetMesh(fieldbundle, mesh, rc)
+
ARGUMENTS: +
       type(ESMF_FieldBundle), intent(inout) :: fieldbundle
+       type(ESMF_Mesh), intent(in) :: mesh
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       integer, intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Sets the mesh for a fieldbundle. + +

+The arguments are: +

+
fieldbundle
+
An ESMF_FieldBundle object. + +
+
mesh
+
The ESMF_Mesh which all ESMF_Fields added to this + ESMF_FieldBundle must have. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+25.5.31 ESMF_FieldBundleSet - Associate a LocStream with an empty FieldBundle +

+ +

+ +

+
+INTERFACE: +

       ! Private name; call using ESMF_FieldBundleSet()
+       subroutine ESMF_FieldBundleSetLS(fieldbundle, locstream, &
+         rc)
+
ARGUMENTS: +
       type(ESMF_FieldBundle), intent(inout) :: fieldbundle
+       type(ESMF_LocStream), intent(in) :: locstream
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       integer, intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Sets the locstream for a fieldbundle. + +

+The arguments are: +

+
fieldbundle
+
An ESMF_FieldBundle object. + +
+
locstream
+
The ESMF_LocStream which all ESMF_Fields added to this + ESMF_FieldBundle must have. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+25.5.32 ESMF_FieldBundleSet - Associate a XGrid with an empty FieldBundle +

+ +

+ +

+
+INTERFACE: +

       ! Private name; call using ESMF_FieldBundleSet()
+       subroutine ESMF_FieldBundleSetXGrid(fieldbundle, xgrid, &
+         rc)
+
ARGUMENTS: +
       type(ESMF_FieldBundle), intent(inout) :: fieldbundle
+       type(ESMF_XGrid), intent(in) :: xgrid
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       integer, intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Sets the xgrid for a fieldbundle + +

+The arguments are: +

+
fieldbundle
+
An ESMF_FieldBundle object. + +
+
xgrid
+
The ESMF_XGrid which all ESMF_Fields added to this + ESMF_FieldBundle must have. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+25.5.33 ESMF_FieldBundleSMM - Execute a FieldBundle sparse matrix multiplication +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_FieldBundleSMM(srcFieldBundle, dstFieldBundle, &
+     routehandle, &
+     zeroregion, & ! DEPRECATED ARGUMENT
+     zeroregionflag, termorderflag, checkflag, rc)
+
ARGUMENTS: +
     type(ESMF_FieldBundle), intent(in), optional :: srcFieldBundle
+     type(ESMF_FieldBundle), intent(inout), optional :: dstFieldBundle
+     type(ESMF_RouteHandle), intent(inout) :: routehandle
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     type(ESMF_Region_Flag), intent(in), optional :: zeroregion ! DEPRECATED ARGUMENT
+     type(ESMF_Region_Flag), intent(in), target, optional :: zeroregionflag(:)
+     type(ESMF_TermOrder_Flag), intent(in), optional :: termorderflag(:)
+     logical, intent(in), optional :: checkflag
+     integer, intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    7.0.0
    +
    Added argument termorderflag. + The new argument gives the user control over the order in which + the src terms are summed up. + +
    +
    8.1.0
    +
    Added argument zeroregionflag, and deprecated + zeroregion. The new argument allows greater flexibility + in setting the zero region for individual FieldBundle members. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Execute a precomputed sparse matrix multiplication from srcFieldBundle + to dstFieldBundle. + Both srcFieldBundle and dstFieldBundle must match the + respective FieldBundles used during ESMF_FieldBundleRedistStore() + in type, kind, and memory layout of the gridded + dimensions. However, the size, number, + and index order of ungridded dimensions may be different. See section + 37.2.5 for a more detailed discussion of RouteHandle + reusability. + +

+The srcFieldBundle and dstFieldBundle arguments are optional in support of + the situation where srcFieldBundle and/or dstFieldBundle are not defined on + all PETs. The srcFieldBundle and dstFieldBundle must be specified on those + PETs that hold source or destination DEs, respectively, but may be omitted + on all other PETs. PETs that hold neither source nor destination DEs may + omit both arguments. + +

+It is erroneous to specify the identical FieldBundle object for srcFieldBundle and + dstFieldBundle arguments. + +

+See ESMF_FieldBundleSMMStore() on how to precompute + routehandle. + +

+This call is collective across the current VM. + +

+For examples and associated documentation regarding this method see Section + 25.2.11. + +

+

+
[srcFieldBundle]
+
ESMF_FieldBundle with source data. + +
+
[dstFieldBundle]
+
ESMF_FieldBundle with destination data. + +
+
routehandle
+
Handle to the precomputed Route. + +
+
[zeroregion]
+
If set to ESMF_REGION_TOTAL (default) the total regions of + all DEs in all Fields in dstFieldBundle will be initialized to zero + before updating the elements with the results of the sparse matrix + multiplication. If set to ESMF_REGION_EMPTY the elements in the + Fields in dstFieldBundle will not be modified prior to the sparse + matrix multiplication and results will be added to the incoming element + values. Setting zeroregion to ESMF_REGION_SELECT will only + zero out those elements in the destination Fields that will be updated + by the sparse matrix multiplication. See section 54.50 + +
+
[zeroregionflag]
+
If set to ESMF_REGION_TOTAL (default) the total regions of + all DEs in the destination Field will be initialized to zero + before updating the elements with the results of the sparse matrix + multiplication. If set to ESMF_REGION_EMPTY the elements in the + destination Field will not be modified prior to the sparse + matrix multiplication and results will be added to the incoming element + values. A setting of ESMF_REGION_SELECT will only + zero out those elements in the destination Field that will be updated + by the sparse matrix multiplication. See section 54.50 + for a complete list of valid settings. + The size of this array argument must either be 1 or equal the number of + Fields in the srcFieldBundle and dstFieldBundle arguments. In + the latter case, the zero region for each Field SMM operation is + indicated separately. If only one zero region element is specified, it is + used for all Field pairs. + +
+
[termorderflag]
+
Specifies the order of the source side terms in all of the destination + sums. The termorderflag only affects the order of terms during + the execution of the RouteHandle. See the 37.2.1 section for an + in-depth discussion of all bit-for-bit reproducibility + aspects related to route-based communication methods. + See 54.60 for a full list of options. + The size of this array argument must either be 1 or equal the number of + Fields in the srcFieldBundle and dstFieldBundle arguments. In + the latter case, the term order for each Field SMM operation is + indicated separately. If only one term order element is specified, it is + used for all Field pairs. + The default is (/ESMF_TERMORDER_FREE/), allowing maximum + flexibility in the order of terms for optimum performance. + +
+
[checkflag]
+
If set to .TRUE. the input FieldBundle pair will be checked for + consistency with the precomputed operation provided by routehandle. + If set to .FALSE. (default) only a very basic input check + will be performed, leaving many inconsistencies undetected. Set + checkflag to .FALSE. to achieve highest performance. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+25.5.34 ESMF_FieldBundleSMMRelease - Release resources associated with a FieldBundle sparse matrix multiplication +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_FieldBundleSMMRelease(routehandle, &
+     noGarbage, rc)
+
ARGUMENTS: +
         type(ESMF_RouteHandle), intent(inout) :: routehandle
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+         logical, intent(in), optional :: noGarbage
+         integer, intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    8.0.0
    +
    Added argument noGarbage. + The argument provides a mechanism to override the default garbage collection + mechanism when destroying an ESMF object. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Release resources associated with a FieldBundle sparse matrix multiplication. After this call + routehandle becomes invalid. + +

+

+
routehandle
+
Handle to the precomputed Route. + +
+
[noGarbage]
+
If set to .TRUE. the object will be fully destroyed and removed + from the ESMF garbage collection system. Note however that under this + condition ESMF cannot protect against accessing the destroyed object + through dangling aliases - a situation which may lead to hard to debug + application crashes. + +

+It is generally recommended to leave the noGarbage argument + set to .FALSE. (the default), and to take advantage of the ESMF + garbage collection system which will prevent problems with dangling + aliases or incorrect sequences of destroy calls. However this level of + support requires that a small remnant of the object is kept in memory + past the destroy call. This can lead to an unexpected increase in memory + consumption over the course of execution in applications that use + temporary ESMF objects. For situations where the repeated creation and + destruction of temporary objects leads to memory issues, it is + recommended to call with noGarbage set to .TRUE., fully + removing the entire temporary object from memory. + +

+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+25.5.35 ESMF_FieldBundleSMMStore - Precompute a FieldBundle sparse matrix multiplication with local factors +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_FieldBundleSMMStore()
+   subroutine ESMF_FieldBundleSMMStore<type><kind>(srcFieldBundle, &
+   dstFieldBundle, routehandle, factorList, factorIndexList, &
+   ignoreUnmatchedIndicesFlag, srcTermProcessing, rc)
+
ARGUMENTS: +
   type(ESMF_FieldBundle), intent(in) :: srcFieldBundle
+   type(ESMF_FieldBundle), intent(inout) :: dstFieldBundle
+   type(ESMF_RouteHandle), intent(inout) :: routehandle
+   <type>(ESMF_KIND_<kind>), intent(in) :: factorList(:)
+   integer, intent(in), :: factorIndexList(:,:)
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+   logical, intent(in), optional :: ignoreUnmatchedIndicesFlag(:)
+   integer, intent(inout), optional :: srcTermProcessing(:)
+   integer, intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    7.1.0r
    +
    Added argument srcTermProcessing. + The new argument gives the user access to the tuning parameter + affecting the sparse matrix execution and bit-wise + reproducibility. + +
    +
    8.1.0
    +
    Added argument ignoreUnmatchedIndicesFlag to support cases + where the sparse matrix includes terms with source or destination sequence + indices not present in the source or destination field. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Store a FieldBundle sparse matrix multiplication operation from srcFieldBundle + to dstFieldBundle. PETs that specify non-zero matrix coefficients must use + the <type><kind> overloaded interface and provide the factorList and + factorIndexList arguments. Providing factorList and + factorIndexList arguments with + size(factorList) = (/0/) and + size(factorIndexList) = (/2,0/) or (/4,0/) indicates that a + PET does not provide matrix elements. Alternatively, PETs that do not + provide matrix elements may also call into the overloaded interface + without factorList and factorIndexList arguments. + +

+Both srcFieldBundle and dstFieldBundle are interpreted as sequentialized + vectors. The + sequence is defined by the order of DistGrid dimensions and the order of + tiles within the DistGrid or by user-supplied arbitrary sequence indices. See + section 28.2.18 for details on the definition of sequence indices. + SMM corresponds to an identity mapping of the source FieldBundle vector to + the destination FieldBundle vector. + +

+Source and destination Fields may be of different <type><kind>. Further source + and destination Fields may differ in shape, however, the number of elements + must match. + +

+It is erroneous to specify the identical FieldBundle object for srcFieldBundle + and dstFieldBundle arguments. + +

+The routine returns an ESMF_RouteHandle that can be used to call + ESMF_FieldBundleSMM() on any pair of FieldBundles that matches + srcFieldBundle and dstFieldBundle in type, kind, + and memory layout of the gridded dimensions. However, the size, + number, and index order of ungridded dimensions may be different. + See section 37.2.5 for a more detailed discussion of + RouteHandle reusability. + +

+This method is overloaded for: +
+ ESMF_TYPEKIND_I4, ESMF_TYPEKIND_I8, +
+ ESMF_TYPEKIND_R4, ESMF_TYPEKIND_R8. +
+ +

+This call is collective across the current VM. + +

+For examples and associated documentation regarding this method see Section + 25.2.11. + +

+The arguments are: +

+
srcFieldBundle
+
ESMF_FieldBundle with source data. + +
+
dstFieldBundle
+
ESMF_FieldBundle with destination data. The data in this + FieldBundle may be destroyed by this call. + +
+
routehandle
+
Handle to the precomputed Route. + +
+
factorList
+
List of non-zero coefficients. + +
+
factorIndexList
+
Pairs of sequence indices for the factors stored in factorList. + +

+The second dimension of factorIndexList steps through the list of + pairs, i.e. size(factorIndexList,2) == size(factorList). The first + dimension of factorIndexList is either of size 2 or size 4. + +

+In the size 2 format factorIndexList(1,:) specifies the + sequence index of the source element in the srcFieldBundle while + factorIndexList(2,:) specifies the sequence index of the + destination element in dstFieldBundle. For this format to be a valid + option source and destination FieldBundles must have matching number of + tensor elements (the product of the sizes of all Field tensor dimensions). + Under this condition an identity matrix can be applied within the space of + tensor elements for each sparse matrix factor. + +

+The size 4 format is more general and does not require a matching + tensor element count. Here the + +

+factorIndexList(1,:) specifies the + sequence index while factorIndexList(2,:) specifies the tensor + sequence index of the source element in the srcFieldBundle. Further + factorIndexList(3,:) specifies the sequence index and + factorIndexList(4,:) specifies the tensor sequence index of the + destination element in the dstFieldBundle. + +

+See section 28.2.18 for details on the definition of + sequence indices and tensor sequence indices. + +

+

+
[ignoreUnmatchedIndicesFlag]
+
If set to .false., the default, source and destination side must + cover all of the squence indices defined in the sparse matrix. An error + will be returned if a sequence index in the sparse matrix does not match + on either the source or destination side. + If set to .true., mismatching sequence indices are silently ignored. + The size of this array argument must either be 1 or equal the number of + Fieldss in the srcFieldBundle and dstFieldBundle arguments. In + the latter case, the handling of unmatched indices is specified for each + Field pair separately. If only one element is specified, it is + used for all Field pairs. + +

+

+
[srcTermProcessing]
+
Source term summing options for route handle creation. See + ESMF_FieldRegridStore documentation for a full parameter description. + Two forms may be provided. If a single element list is provided, this + integer value is applied across all bundle members. Otherwise, the list must + contain as many elements as there are bundle members. For the special case + of accessing the auto-tuned parameter (providing a negative integer value), + the list length must equal the bundle member count. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+25.5.36 ESMF_FieldBundleSMMStore - Precompute a FieldBundle sparse matrix multiplication +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_FieldBundleSMMStore()
+     subroutine ESMF_FieldBundleSMMStoreNF(srcFieldBundle, dstFieldBundle, &
+         routehandle, ignoreUnmatchedIndicesFlag, &
+         srcTermProcessing, rc)
+
ARGUMENTS: +
         type(ESMF_FieldBundle), intent(in) :: srcFieldBundle
+         type(ESMF_FieldBundle), intent(inout) :: dstFieldBundle
+         type(ESMF_RouteHandle), intent(inout) :: routehandle
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+         logical, intent(in), optional :: ignoreUnmatchedIndicesFlag(:)
+         integer, intent(inout), optional :: srcTermProcessing(:)
+         integer, intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    7.1.0r
    +
    Added argument srcTermProcessing. + The new argument gives the user access to the tuning parameter + affecting the sparse matrix execution and bit-wise + reproducibility. + +
    +
    8.1.0
    +
    Added argument ignoreUnmatchedIndicesFlag to support cases + where the sparse matrix includes terms with source or destination sequence + indices not present in the source or destination field. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Store a FieldBundle sparse matrix multiplication operation from srcFieldBundle + to dstFieldBundle. PETs that specify non-zero matrix coefficients must use + the <type><kind> overloaded interface and provide the factorList and + factorIndexList arguments. Providing factorList and + factorIndexList arguments with size(factorList) = (/0/) and + size(factorIndexList) = (/2,0/) or (/4,0/) indicates that a + PET does not provide matrix elements. Alternatively, PETs that do not + provide matrix elements may also call into the overloaded interface + without factorList and factorIndexList arguments. + +

+Both srcFieldBundle and dstFieldBundle are interpreted as sequentialized + vectors. The + sequence is defined by the order of DistGrid dimensions and the order of + tiles within the DistGrid or by user-supplied arbitrary sequence indices. See + section 28.2.18 for details on the definition of sequence indices. + SMM corresponds to an identity mapping of the source FieldBundle vector to + the destination FieldBundle vector. + +

+Source and destination Fields may be of different <type><kind>. Further source + and destination Fields may differ in shape, however, the number of elements + must match. + +

+It is erroneous to specify the identical FieldBundle object for srcFieldBundle and dstFieldBundle + arguments. + +

+The routine returns an ESMF_RouteHandle that can be used to call + ESMF_FieldBundleSMM() on any pair of FieldBundles that matches + srcFieldBundle and dstFieldBundle in type, kind, + and memory layout of the gridded dimensions. However, the size, + number, and index order of ungridded dimensions may be different. + See section 37.2.5 for a more detailed discussion of + RouteHandle reusability. + +

+This method is overloaded for + ESMF_TYPEKIND_I4, ESMF_TYPEKIND_I8, + ESMF_TYPEKIND_R4, ESMF_TYPEKIND_R8. + +

+This call is collective across the current VM. + +

+For examples and associated documentation regarding this method see Section + 25.2.11. + +

+The arguments are: +

+
srcFieldBundle
+
ESMF_FieldBundle with source data. + +
+
dstFieldBundle
+
ESMF_FieldBundle with destination data. The data in this + FieldBundle may be destroyed by this call. + +
+
routehandle
+
Handle to the precomputed Route. + +
+
[ignoreUnmatchedIndicesFlag]
+
If set to .false., the default, source and destination side must + cover all of the squence indices defined in the sparse matrix. An error + will be returned if a sequence index in the sparse matrix does not match + on either the source or destination side. + If set to .true., mismatching sequence indices are silently ignored. + The size of this array argument must either be 1 or equal the number of + Fieldss in the srcFieldBundle and dstFieldBundle arguments. In + the latter case, the handling of unmatched indices is specified for each + Field pair separately. If only one element is specified, it is + used for all Field pairs. + +
+
[srcTermProcessing]
+
Source term summing options for route handle creation. See + ESMF_FieldRegridStore documentation for a full parameter description. + Two forms may be provided. If a single element list is provided, this + integer value is applied across all bundle members. Otherwise, the list must + contain as many elements as there are bundle members. For the special case + of accessing the auto-tuned parameter (providing a negative integer value), + the list length must equal the bundle member count. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+25.5.37 ESMF_FieldBundleSMMStore - Precompute field bundle sparse matrix multiplication using factors read from file +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_FieldBundleSMMStore()
+     subroutine ESMF_FieldBundleSMMStoreFromFile(srcFieldBundle, dstFieldBundle, &
+       filename, routehandle, ignoreUnmatchedIndicesFlag, &
+       srcTermProcessing, rc)
+   ! ARGUMENTS:
+       type(ESMF_FieldBundle), intent(in) :: srcFieldBundle
+       type(ESMF_FieldBundle), intent(inout) :: dstFieldBundle
+       character(len=*), intent(in) :: filename
+       type(ESMF_RouteHandle), intent(inout) :: routehandle
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       logical, intent(in), optional :: ignoreUnmatchedIndicesFlag(:)
+       integer, intent(inout), optional :: srcTermProcessing(:)
+       integer, intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Compute an ESMF_RouteHandle using factors read from file. + +

+The arguments are: + +

+

+
srcFieldBundle
+
ESMF_FieldBundle with source data. + +

+

+
dstFieldBundle
+
ESMF_FieldBundle with destination data. The data in this field + bundle may be destroyed by this call. + +

+

+
filename
+
Path to the file containing weights for creating an ESMF_RouteHandle. + See (12.9) for a description of the SCRIP weight + file format. Only "row", "col", and "S" variables are required. They + must be one-dimensionsal with dimension "n_s". + +

+

+
routehandle
+
Handle to the ESMF_RouteHandle. + +

+

+
[ignoreUnmatchedIndicesFlag]
+
If set to .false., the default, source and destination side must + cover all of the squence indices defined in the sparse matrix. An error + will be returned if a sequence index in the sparse matrix does not match + on either the source or destination side. + If set to .true., mismatching sequence indices are silently ignored. + The size of this array argument must either be 1 or equal the number of + Fieldss in the srcFieldBundle and dstFieldBundle arguments. In + the latter case, the handling of unmatched indices is specified for each + Field pair separately. If only one element is specified, it is + used for all Field pairs. + +

+

+
[srcTermProcessing]
+
Source term summing options for route handle creation. See + ESMF_FieldRegridStore documentation for a full parameter description. + Two forms may be provided. If a single element list is provided, this + integer value is applied across all bundle members. Otherwise, the list must + contain as many elements as there are bundle members. For the special case + of accessing the auto-tuned parameter (providing a negative integer value), + the list length must equal the bundle member count. + +

+

+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +

+

+
+ +

+ +

+ +

+25.5.38 ESMF_FieldBundleValidate - Validate fieldbundle internals +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_FieldBundleValidate(fieldbundle, rc)
+
ARGUMENTS: +
     type(ESMF_FieldBundle), intent(in) :: fieldbundle
+     integer, intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Validates that the fieldbundle is internally consistent. + The method returns an error code if problems are found. + +

+The arguments are: +

+
fieldbundle
+
Specified ESMF_FieldBundle object. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+25.5.39 ESMF_FieldBundleWrite - Write the Fields into a file +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_FieldBundleWrite(fieldbundle, fileName, &
+       convention, purpose, singleFile, overwrite, status, timeslice, iofmt, rc)
+
ARGUMENTS: +
     type(ESMF_FieldBundle), intent(in) :: fieldbundle
+     character(*), intent(in) :: fileName
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     character(*), intent(in), optional :: convention
+     character(*), intent(in), optional :: purpose
+     logical, intent(in), optional :: singleFile
+     logical , intent(in), optional :: overwrite
+     type(ESMF_FileStatus_Flag), intent(in), optional :: status
+     integer, intent(in), optional :: timeslice
+     type(ESMF_IOFmt_Flag), intent(in), optional :: iofmt
+     integer, intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Write the Fields into a file. For this API to be functional, + the environment variable ESMF_PIO should be set to either "internal" or "external" + when the ESMF library is built. Please see the section on + Data I/O, 38.2. + +

+When convention and purpose arguments are specified, NetCDF dimension + labels and variable attributes are written from each Field in the FieldBundle + from the corresponding Attribute package. Additionally, Attributes may be + set on the FieldBundle level under the same Attribute package. This allows + the specification of global attributes within the file. + As with individual Fields, the value associated with each name may be either + a scalar character string, or a scalar or array of type integer, real, or + double precision. + +

+Limitations: + +

    +
  • For multi-tile Fields, all Fields in the FieldBundle must contain + the same number of tiles. +
  • +
  • Not supported in ESMF_COMM=mpiuni mode. + +
  • +
+ +

+The arguments are: +

+
fieldbundle
+
An ESMF_FieldBundle object. + +
+
fileName
+
The name of the output file to which field bundle data is written. + If the FieldBundle contains multi-tile Arrays, then fileName must contain + exactly one instance of "*"; this is a placeholder that will be replaced + by the tile number, with each tile being written to a separate file. (For + example, for a fileName of "myfile*.nc", tile 1 will be written to + "myfile1.nc", tile 2 to "myfile2.nc", etc.) + (This handling of the fileName for multi-tile I/O is subject to change.) + +
+
[convention]
+
Specifies an Attribute package associated with the FieldBundle, and the + contained Fields, used to create NetCDF dimension labels and attributes + in the file. When this argument is present, the purpose + argument must also be present. Use this argument only with a NetCDF + I/O format. If binary format is used, ESMF will return an error code. + +
+
[purpose]
+
Specifies an Attribute package associated with the FieldBundle, and the + contained Fields, used to create NetCDF dimension labels and attributes + in the file. When this argument is present, the convention + argument must also be present. Use this argument only with a NetCDF + I/O format. If binary format is used, ESMF will return an error code. + +
+
[singleFile]
+
A logical flag, the default is .true., i.e., all fields in the bundle + are written in one single file. If .false., each field will be written + in separate files; these files are numbered with the name based on the + argument "file". That is, a set of files are named: [file_name]001, + [file_name]002, [file_name]003,... + +
+
[overwrite]
+
A logical flag, the default is .false., i.e., existing field data may + not be overwritten. If .true., only the + data corresponding to the fields name will be + be overwritten. If the timeslice option is given, only data for + the given timeslice will be overwritten. + Note that it is always an error to attempt to overwrite a NetCDF + variable with data which has a different shape. + +
+
[status]
+
The file status. Please see Section 54.22 for + the list of options. If not present, defaults to + ESMF_FILESTATUS_UNKNOWN. + +
+
[timeslice]
+
Some I/O formats (e.g. NetCDF) support the output of data in form of + time slices. The timeslice argument provides access to this + capability. timeslice must be positive. The behavior of this + option may depend on the setting of the overwrite flag: +
+
overwrite = .false.:
+
If the timeslice value is + less than the maximum time already in the file, the write will fail. + +
+
overwrite = .true.:
+
Any positive timeslice value is valid. + +
+
+ By default, i.e. by omitting the timeslice argument, no + provisions for time slicing are made in the output file, + however, if the file already contains a time axis for the variable, + a timeslice one greater than the maximum will be written. + +
+
[iofmt]
+
The I/O format. Please see Section 54.30 for the list + of options. If not present, defaults to ESMF_IOFMT_NETCDF. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ + +

+26 Field Class +

+ +

+26.1 Description +

+ +

+An ESMF Field represents a physical field, such as temperature. +The motivation for including Fields in ESMF is that bundles of +Fields are the entities that are normally exchanged when coupling +Components. + +

+The ESMF Field class contains distributed and discretized field data, a reference +to its associated grid, and metadata. The Field class stores the grid staggering +for that physical field. +This is the relationship of how the data array of a field maps onto a grid +(e.g. one item per +cell located at the cell center, one item per cell located at the NW +corner, one item per cell vertex, etc.). This means that different Fields +which are on the same underlying ESMF Grid but have different +staggerings can share the same Grid object without needing to replicate +it multiple times. + +

+Fields can be added to States for use in inter-Component +data communications. Fields can also be added to FieldBundles, +which are groups of Fields on the same underlying Grid. +One motivation for packing Fields into FieldBundles is convenience; +another is the ability to perform optimized collective data transfers. + +

+Field communication capabilities include: data redistribution, regridding, scatter, +gather, sparse-matrix multiplication, and halo update. These are discussed +in more detail in the documentation for the specific method calls. +ESMF does not currently support vector fields, so the components of +a vector field must be stored as separate Field objects. + +

+ +

+26.1.1 Operations +

+ +

+The Field class allows the user to easily perform a number of operations on +the data stored in a Field. This section gives a brief summary of the different types of operations +and the range of their capabilities. The operations covered here are: redistribution (ESMF_FieldRedistStore()), sparse matrix multiply (ESMF_FieldSMMStore()), and regridding (ESMF_FieldRegridStore()). + +

+The redistribution operation (ESMF_FieldRedistStore()) allows the user to move data between two Fields with the same size, but different +distribution. This operation is useful, for example, to move data between two components with different distributions. +Please see Section 26.3.30 for an example of the redistribution capability. + +

+The sparse matrix multiplication operation (ESMF_FieldSMMStore()) allows the user to multiply the data in a Field by a sparse matrix. This operation is useful, for example, if the user has an interpolation matrix and wants to apply it to the data in a Field. Please see Section 26.3.33 +for an example of the sparse matrix multiply capability. + +

+The regridding operation (ESMF_FieldRegridStore()) allows the user to move data from one grid to another while maintaining certain properties +of the data. Regridding is also called interpolation or remapping. In the Field regridding operation the grids the data is being moved between +are the grids associated with the Fields storing the data. The regridding operation works on Fields built on Meshes, Grids, or Location Streams. +There are six regridding methods available: bilinear, higher-order patch, two types of nearest neighbor, first-order conservative, and second-order conservative. +Please see section 24.2 for a more indepth description of regridding including in which situations each method is supported. +Please see section 26.3.25 for a description of the regridding capability as it applies to Fields. Several sections following section 26.3.25 +contain examples of using regridding. + +

+ +

+26.2 Constants +

+ +

+ +

+ +
+26.2.1 ESMF_FIELDSTATUS +

+ +

+DESCRIPTION: +
+ +An ESMF_Field can be in different status after initialization. Field status can be queried using ESMF_FieldGet() method. + +

+The type of this flag is: + +

+type(ESMF_FieldStatus_Flag) + +

+The valid values are: +

+
ESMF_FIELDSTATUS_EMPTY
+
Field is empty without geombase or data storage. Such a Field can be added to a ESMF_State and participate ESMF_StateReconcile(). +
+
ESMF_FIELDSTATUS_GRIDSET
+
Field is partially created. It has a geombase object internally created and the geombase object associates with either a ESMF_Grid, or a ESMF_Mesh, or an ESMF_XGrid, or a ESMF_LocStream. It's an error to set another geombase object in such a Field. It can also be added to a ESMF_State and participate ESMF_StateReconcile(). +
+
ESMF_FIELDSTATUS_COMPLETE
+
Field is completely created with geombase and data storage internally allocated. +
+
+ +

+26.3 Use and Examples +

+ +

+A Field serves as an annotator of data, since it carries +a description of the grid it is associated with and metadata +such as name and units. Fields can be used in this capacity +alone, as convenient, descriptive containers into which arrays +can be placed and retrieved. However, for most codes the primary +use of Fields is in the context of import and export States, +which are the objects that carry coupling information between +Components. Fields enable data to be self-describing, and a +State holding ESMF Fields contains data in a standard format +that can be queried and manipulated. + +

+The sections below go into more detail about Field usage. + +

+ +

+26.3.1 Field create and destroy +

+ +

+Fields can be created and destroyed at any time during +application execution. However, these Field methods require +some time to complete. We do not recommend that the user +create or destroy Fields inside performance-critical +computational loops. + +

+All versions of the ESMF_FieldCreate() +routines require a Grid object as input, or require a Grid +be added before most operations involving Fields can be performed. +The Grid contains the information needed to know which +Decomposition Elements (DEs) are participating in +the processing of this Field, and which subsets of the data +are local to a particular DE. + +

+The details of how the create process happens depend +on which of the variants of the ESMF_FieldCreate() +call is used. Some of the variants are discussed below. + +

+There are versions of the ESMF_FieldCreate() interface +which create the Field based on the input Grid. The ESMF +can allocate the proper amount of +space but not assign initial values. The user code +can then get the pointer to the uninitialized buffer and +set the initial data values. + +

+Other versions of the ESMF_FieldCreate() interface +allow user code to attach arrays that have already been +allocated by the user. Empty Fields can also be created in +which case the data can be added at some later time. + +

+For versions of Create which do not specify data values, +user code can create an ArraySpec object, which +contains information about the typekind and rank of the +data values in the array. Then at Field create time, the +appropriate amount of memory is allocated to contain the +data which is local to each DE. + +

+When finished with a ESMF_Field, the ESMF_FieldDestroy method +removes it. However, the objects inside the ESMF_Field +created externally should be destroyed separately, +since objects can be added to +more than one ESMF_Field. For example, the same ESMF_Grid +can be referenced by multiple ESMF_Fields. In this case the +internal Grid is not deleted by the ESMF_FieldDestroy call. + +

+ +

+ +

+ +

+ +
+26.3.2 Get Fortran data pointer, bounds, and counts information from a Field +

+ +

+A user can get bounds and counts information from an ESMF_Field + through the ESMF_FieldGet() interface. Also available through this interface + is the intrinsic + Fortran data pointer contained in the internal ESMF_Array object + of an ESMF_Field. The bounds and counts information are DE specific + for the associated Fortran data pointer. + +

+For a better discussion of the terminologies, bounds and widths in ESMF + e.g. exclusive, computational, total bounds + for the lower and upper corner of data region, etc.., user can refer to + the explanation of these concepts for Grid and Array in their respective sections + in the Reference Manual, e.g. Section 28.2.6 on Array + and Section 31.3.19 on Grid. + +

+In this example, we first create a 3D Field based on a 3D Grid and Array. + Then we use the ESMF_FieldGet() interface to retrieve the data pointer, + potentially updating or verifying its values. We also retrieve the bounds and counts + information of the 3D Field to assist in data element iteration. + +

+

+    xdim = 180
+    ydim = 90
+    zdim = 50
+
+    ! create a 3D data Field from a Grid and Array.
+    ! first create a Grid
+    grid3d = ESMF_GridCreateNoPeriDim(minIndex=(/1,1,1/), &
+            maxIndex=(/xdim,ydim,zdim/), &
+            regDecomp=(/2,2,1/), name="grid", rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+    call ESMF_GridGet(grid=grid3d, staggerloc=ESMF_STAGGERLOC_CENTER, &
+           distgrid=distgrid3d, rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+    call ESMF_GridGetFieldBounds(grid=grid3d, localDe=0, &
+        staggerloc=ESMF_STAGGERLOC_CENTER, totalCount=fa_shape, rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+    allocate(farray(fa_shape(1), fa_shape(2), fa_shape(3)) )
+
+    ! create an Array
+    array3d = ESMF_ArrayCreate(distgrid3d, farray, &
+        indexflag=ESMF_INDEX_DELOCAL, rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+    ! create a Field
+    field = ESMF_FieldCreate(grid=grid3d, array=array3d, rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+    ! retrieve the Fortran data pointer from the Field
+    call ESMF_FieldGet(field=field, localDe=0, farrayPtr=farray1, rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+    ! retrieve the Fortran data pointer from the Field and bounds
+    call ESMF_FieldGet(field=field, localDe=0, farrayPtr=farray1, &
+        computationalLBound=compLBnd, computationalUBound=compUBnd, &
+        exclusiveLBound=exclLBnd, exclusiveUBound=exclUBnd, &
+        totalLBound=totalLBnd, totalUBound=totalUBnd, &
+        computationalCount=comp_count, &
+        exclusiveCount=excl_count, &
+        totalCount=total_count, &
+        rc=rc)
+
+
+    ! iterate through the total bounds of the field data pointer
+    do k = totalLBnd(3), totalUBnd(3)
+        do j = totalLBnd(2), totalUBnd(2)
+            do i = totalLBnd(1), totalUBnd(1)
+                farray1(i, j, k) = sin(2*i/total_count(1)*PI) + &
+                    sin(4*j/total_count(2)*PI) + &
+                    sin(8*k/total_count(2)*PI)
+            enddo
+        enddo
+    enddo
+
+ +

+ +

+ +
+26.3.3 Get Grid, Array, and other information from a Field +

+ +

+A user can get the internal ESMF_Grid and ESMF_Array + from a ESMF_Field. Note that the user should not issue any destroy command + on the retrieved grid or array object since they are referenced + from within the ESMF_Field. The retrieved objects should be used + in a read-only fashion to query additional information not directly + available through the ESMF_FieldGet() interface. + +

+

+    call ESMF_FieldGet(field, grid=grid, array=array, &
+        typekind=typekind, dimCount=dimCount, staggerloc=staggerloc, &
+        gridToFieldMap=gridToFieldMap, &
+        ungriddedLBound=ungriddedLBound, ungriddedUBound=ungriddedUBound, &
+        totalLWidth=totalLWidth, totalUWidth=totalUWidth, &
+        name=name, &
+        rc=rc)
+
+ +

+ +

+ +
+26.3.4 Create a Field with a Grid, typekind, and rank +

+ +

+A user can create an ESMF_Field from an ESMF_Grid and + typekind/rank. + This create method associates the two objects. + +

+We first create a Grid with a regular distribution that is + 10x20 index in 2x2 DEs. This version of Field create simply + associates the data with the Grid. The data is referenced + explicitly on a regular 2x2 uniform grid. + Finally we create a Field from + the Grid, typekind, rank, and a user specified StaggerLoc. + +

+This example also illustrates a typical use of this Field creation + method. By creating a Field from a Grid and typekind/rank, the + user allows the ESMF library to create a internal Array in the Field. + Then the user can use ESMF_FieldGet() to retrieve the Fortran + data array + and necessary bounds information to assign initial values to it. +

+

+    ! create a grid
+    grid = ESMF_GridCreateNoPeriDim(minIndex=(/1,1/), maxIndex=(/10,20/), &
+          regDecomp=(/2,2/), name="atmgrid", rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+    ! create a Field from the Grid and arrayspec
+    field1 = ESMF_FieldCreate(grid, typekind=ESMF_TYPEKIND_R4, &
+        indexflag=ESMF_INDEX_DELOCAL, &
+        staggerloc=ESMF_STAGGERLOC_CENTER, name="pressure", rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+    call ESMF_FieldGet(field1, localDe=0, farrayPtr=farray2dd, &
+        totalLBound=ftlb, totalUBound=ftub, totalCount=ftc, rc=rc)
+
+    do i = ftlb(1), ftub(1)
+        do j = ftlb(2), ftub(2)
+            farray2dd(i, j) = sin(i/ftc(1)*PI) * cos(j/ftc(2)*PI)
+        enddo
+    enddo
+
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+ +

+ +

+ +
+26.3.5 Create a Field with a Grid and Arrayspec +

+ +

+A user can create an ESMF_Field from an ESMF_Grid and a + ESMF_Arrayspec with corresponding rank and type. + This create method associates the two objects. + +

+We first create a Grid with a regular distribution that is + 10x20 index in 2x2 DEs. This version of Field create simply + associates the data with the Grid. The data is referenced + explicitly on a regular 2x2 uniform grid. + Then we create an ArraySpec. Finally we create a Field from + the Grid, ArraySpec, and a user specified StaggerLoc. + +

+This example also illustrates a typical use of this Field creation + method. By creating a Field from a Grid and an ArraySpec, the + user allows the ESMF library to create a internal Array in the Field. + Then the user can use ESMF_FieldGet() to retrieve the Fortran + data array + and necessary bounds information to assign initial values to it. +

+

+    ! create a grid
+    grid = ESMF_GridCreateNoPeriDim(minIndex=(/1,1/), maxIndex=(/10,20/), &
+          regDecomp=(/2,2/), name="atmgrid", rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+    ! setup arrayspec
+    call ESMF_ArraySpecSet(arrayspec, 2, ESMF_TYPEKIND_R4, rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+    ! create a Field from the Grid and arrayspec
+    field1 = ESMF_FieldCreate(grid, arrayspec, &
+         indexflag=ESMF_INDEX_DELOCAL, &
+         staggerloc=ESMF_STAGGERLOC_CENTER, name="pressure", rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+    call ESMF_FieldGet(field1, localDe=0, farrayPtr=farray2dd, &
+        totalLBound=ftlb, totalUBound=ftub, totalCount=ftc, rc=rc)
+
+    do i = ftlb(1), ftub(1)
+        do j = ftlb(2), ftub(2)
+            farray2dd(i, j) = sin(i/ftc(1)*PI) * cos(j/ftc(2)*PI)
+        enddo
+    enddo
+
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+ +

+A user can also create an ArraySpec that has a different rank + from the Grid, For example, the following code shows creation of + of 3D Field from a 2D Grid using a 3D ArraySpec. + +

+This example also demonstrates the technique to create a typical + 3D data Field that has 2 gridded dimensions and 1 ungridded + dimension. + +

+First we create a 2D grid with an index space of 180x360 equivalent to + 180x360 Grid cells (note that for a distributed memory computer, this + means each + grid cell will be on a separate PE!). In the FieldCreate call, we use gridToFieldMap + to indicate the mapping between Grid dimension and Field dimension. + For the ungridded dimension (typically the altitude), we use + ungriddedLBound and ungriddedUBound to describe its bounds. Internally + the ungridded dimension has a stride of 1, so the number of elements + of the ungridded dimension is ungriddedUBound - ungriddedLBound + 1. + +

+Note that gridToFieldMap in this specific example is (/1,2/) which + is the default value + so the user can neglect this argument for the FieldCreate call. +

+

+    grid2d = ESMF_GridCreateNoPeriDim(minIndex=(/1,1/), &
+          maxIndex=(/180,360/), regDecomp=(/2,2/), name="atmgrid", rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+    call ESMF_ArraySpecSet(arrayspec, 3, ESMF_TYPEKIND_R4, rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+    field1 = ESMF_FieldCreate(grid2d, arrayspec, &
+         indexflag=ESMF_INDEX_DELOCAL, &
+         staggerloc=ESMF_STAGGERLOC_CENTER, &
+         gridToFieldMap=(/1,2/), &
+         ungriddedLBound=(/1/), ungriddedUBound=(/50/), &
+         name="pressure", rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+ +

+ +

+ +
+26.3.6 Create a Field with a Grid and Array +

+ +

+A user can create an ESMF_Field from an ESMF_Grid and a + ESMF_Array. The Grid was created in the previous example. + +

+This example creates a 2D ESMF_Field from a 2D ESMF_Grid + and a 2D ESMF_Array. +

+

+    ! Get necessary information from the Grid
+    call ESMF_GridGet(grid, staggerloc=ESMF_STAGGERLOC_CENTER, &
+        distgrid=distgrid, rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+    ! Create a 2D ESMF_TYPEKIND_R4 arrayspec
+    call ESMF_ArraySpecSet(arrayspec, 2, ESMF_TYPEKIND_R4, rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+    ! Create a ESMF_Array from the arrayspec and distgrid
+    array2d = ESMF_ArrayCreate(arrayspec=arrayspec, &
+            distgrid=distgrid, rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+    ! Create a ESMF_Field from the grid and array
+    field4 = ESMF_FieldCreate(grid, array2d, rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+ +

+ +

+ +
+26.3.7 Create an empty Field and complete it + with FieldEmptySet and FieldEmptyComplete +

+ +

+A user can create an ESMF_Field in three steps: first create an empty + ESMF_Field; then set a ESMF_Grid on the empty ESMF_Field; + and finally complete the ESMF_Field by calling ESMF_FieldEmptyComplete. + +

+

+    ! create an empty Field
+    field3 = ESMF_FieldEmptyCreate(name="precip", rc=rc)
+
+ +

+

+    ! use FieldGet to retrieve the Field Status
+    call ESMF_FieldGet(field3, status=fstatus, rc=rc)
+
+ +

+Once the Field is created, we can verify that the status of the Field + is ESMF_FIELDSTATUS_EMPTY. +

+

+    ! Test the status of the Field
+    if (fstatus /= ESMF_FIELDSTATUS_EMPTY) then
+         call ESMF_Finalize(endflag=ESMF_END_ABORT)
+    endif
+
+ +

+Next we set a Grid on the empty Field. We use the 2D grid created in + a previous example simply to demonstrate the method. The Field data points + will be on east edge of the Grid cells with the specified + ESMF_STAGGERLOC_EDGE1. +

+

+    ! Set a grid on the Field
+    call ESMF_FieldEmptySet(field3, grid2d, &
+             staggerloc=ESMF_STAGGERLOC_EDGE1, rc=rc)
+
+ +

+

+    ! use FieldGet to retrieve the Field Status again
+    call ESMF_FieldGet(field3, status=fstatus, rc=rc)
+
+ +

+

+    ! Test the status of the Field
+    if (fstatus /= ESMF_FIELDSTATUS_GRIDSET) then
+         call ESMF_Finalize(endflag=ESMF_END_ABORT)
+    endif
+
+ +

+The partially created Field is completed by specifying the typekind of its + data storage. This method is overloaded with one of the + following parameters, arrayspec, typekind, Fortran array, or Fortran array pointer. + Additional optional arguments can be used to specify ungridded dimensions and + halo regions similar to the other Field creation methods. +

+

+    ! Complete the Field by specifying the data typekind
+    ! to be allocated internally.
+    call ESMF_FieldEmptyComplete(field3, typekind=ESMF_TYPEKIND_R8, &
+      ungriddedLBound=(/1/), ungriddedUBound=(/5/), rc=rc)
+
+ +

+

+    ! use FieldGet to retrieve the Field Status again
+    call ESMF_FieldGet(field3, status=fstatus, rc=rc)
+
+ +

+

+    ! Test the status of the Field
+    if (fstatus /= ESMF_FIELDSTATUS_COMPLETE) then
+         call ESMF_Finalize(endflag=ESMF_END_ABORT)
+    endif
+
+ +

+ +

+ +
+26.3.8 Create an empty Field and complete it with FieldEmptyComplete +

+ +

+A user can create an empty ESMF_Field. + Then the user can finalize the empty ESMF_Field from a ESMF_Grid + and an intrinsic + Fortran data array. This interface is overloaded for typekind and rank + of the Fortran data array. + +

+In this example, both the grid and the Fortran array pointer are 2 dimensional + and each dimension of the grid is mapped to the corresponding dimension of the + Fortran array pointer, i.e. 1st dimension of grid maps to 1st dimension of + Fortran array pointer, 2nd dimension of grid maps to 2nd dimension of + Fortran array pointer, so on and so forth. + +

+In order to create or complete a Field from a Grid and a Fortran array pointer, + certain rules of the Fortran array bounds must be obeyed. We will discuss these + rules as we progress in Field creation examples. We will make + frequent reference to the terminologies for bounds and widths in ESMF. + For a better discussion of + these terminologies and concepts behind them, + e.g. exclusive, computational, total bounds + for the lower and upper corner of data region, etc.., users can refer to + the explanation of these concepts for Grid and Array in their respective sections + in the Reference Manual, e.g. Section 28.2.6 on Array + and Section 31.3.19 on Grid. + The examples here are designed to help a user to get up to speed with + creating Fields for typical use. + +

+This example introduces a helper method, the ESMF_GridGetFieldBounds + interface that facilitates the computation of Fortran data array bounds + and shape to assist ESMF_FieldEmptyComplete finalizing a Field from an + intrinsic Fortran data array and a Grid. + +

+

+    ! create an empty Field
+    field3 = ESMF_FieldEmptyCreate(name="precip", rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+    ! use FieldGet to retrieve total counts
+    call ESMF_GridGetFieldBounds(grid2d, localDe=0, &
+        staggerloc=ESMF_STAGGERLOC_CENTER, totalCount=ftc, rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+    ! allocate the 2d Fortran array based on retrieved total counts
+    allocate(farray2d(ftc(1), ftc(2)))
+
+    ! finalize the Field
+    call ESMF_FieldEmptyComplete(field3, grid2d, farray2d, rc=rc)
+
+ +

+ +

+ +
+26.3.9 Create a 7D Field with a 5D Grid and 2D ungridded bounds + from a Fortran data array +

+ +

+In this example, we will show how to create a 7D Field from a 5D ESMF_Grid and 2D ungridded bounds with arbitrary halo widths and + gridToFieldMap. + +

+We first create a 5D DistGrid and a 5D Grid based on the DistGrid; then + ESMF_GridGetFieldBounds computes the shape of a 7D array in fsize. We can then + create a 7D Field from the 5D Grid and the 7D Fortran data array with + other assimilating parameters. +

+

+    ! create a 5d distgrid
+    distgrid5d = ESMF_DistGridCreate(minIndex=(/1,1,1,1,1/), &
+        maxIndex=(/10,4,10,4,6/), regDecomp=(/2,1,2,1,1/), rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+    ! Create a 5d Grid
+    grid5d = ESMF_GridCreate(distgrid=distgrid5d, name="grid", rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+    ! use FieldGet to retrieve total counts
+    call ESMF_GridGetFieldBounds(grid5d, localDe=0, ungriddedLBound=(/1,2/), &
+        ungriddedUBound=(/4,5/), &
+        totalLWidth=(/1,1,1,2,2/), totalUWidth=(/1,2,3,4,5/), &
+        gridToFieldMap=(/3,2,5,4,1/), &
+        totalCount=fsize, &
+        rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+    ! allocate the 7d Fortran array based on retrieved total counts
+    allocate(farray7d(fsize(1), fsize(2), fsize(3), fsize(4), fsize(5), &
+                        fsize(6), fsize(7)))
+
+    ! create the Field
+    field7d = ESMF_FieldCreate(grid5d, farray7d, ESMF_INDEX_DELOCAL, &
+        ungriddedLBound=(/1,2/), ungriddedUBound=(/4,5/), &
+        totalLWidth=(/1,1,1,2,2/), totalUWidth=(/1,2,3,4,5/), &
+        gridToFieldMap=(/3,2,5,4,1/), &
+        rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+ +

+A user can allocate the Fortran array in a different manner using the lower and + upper bounds returned from FieldGet through the optional totalLBound and totalUBound + arguments. In the following example, we create another 7D Field by retrieving the bounds + and allocate the Fortran array with this approach. In this scheme, indexing the + Fortran array is sometimes more convenient than using the shape directly. +

+

+    call ESMF_GridGetFieldBounds(grid5d, localDe=0, ungriddedLBound=(/1,2/), &
+        ungriddedUBound=(/4,5/), &
+        totalLWidth=(/1,1,1,2,2/), totalUWidth=(/1,2,3,4,5/), &
+        gridToFieldMap=(/3,2,5,4,1/), &
+        totalLBound=flbound, totalUBound=fubound, &
+        rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+    allocate(farray7d2(flbound(1):fubound(1), flbound(2):fubound(2), &
+                       flbound(3):fubound(3), flbound(4):fubound(4), &
+                       flbound(5):fubound(5), flbound(6):fubound(6), &
+                       flbound(7):fubound(7)) )
+
+    field7d2 = ESMF_FieldCreate(grid5d, farray7d2, ESMF_INDEX_DELOCAL, &
+        ungriddedLBound=(/1,2/), ungriddedUBound=(/4,5/), &
+        totalLWidth=(/1,1,1,2,2/), totalUWidth=(/1,2,3,4,5/), &
+        gridToFieldMap=(/3,2,5,4,1/), &
+        rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+ +

+ +

+ +
+26.3.10 Shared memory features: DE pinning, sharing, and migration +

+ +

+See 28.2.13 for a introduction of the DE pinning feature. + Here we focus on demonstrating the use of the DE pinning feature in the context of + ESMF Field. + +

+When an ESMF Field object is created, the specified underlying DistGrid indicates how + many Decomposition Elements (DEs) are created. Each DE has its own memory + allocation to hold user data. The DELayout, referenced by the DistGrid, + determines which PET is considered the owner of each of the DEs. Queried + for the local DEs, the Field object returns the list of DEs that are owned by + the local PET making the query. + +

+By default DEs are pinned to the PETs under which they were created. + The memory allocation associated with a specific DE is only defined in the + VAS of the PET to which the DE is pinned. As a consequence, only the PET + owning a DE has access to its memory allocation. + +

+On shared memory systems, however, ESMF allows DEs to be pinned to SSIs + instead of PETs. In this case the PET under which a DE was created is still + consider the owner, but now all PETs under the same SSI have access to + the DE. For this the memory allocation associated with the DE is mapped into + the VAS of all the PETs under the SSI. + +

+To create an Field with each DE pinned to SSI instead of PET, first query the + VM for the available level of support. +

+

+  call ESMF_VMGet(vm, ssiSharedMemoryEnabledFlag=ssiSharedMemoryEnabled, rc=rc)
+
+ +

+

+  if (ssiSharedMemoryEnabled) then
+
+ +

+Knowing that the SSI shared memory feature is available, it is now possible + to create an Field object with DE to SSI pinning. +

+

+    grid = ESMF_GridCreateNoPeriDim(maxIndex=(/40,10/), regDecomp=(/4,1/), &
+      coordSys = ESMF_COORDSYS_CART, &
+      rc=rc)
+
+ +

+

+    field = ESMF_FieldCreate(typekind=ESMF_TYPEKIND_R8, grid=grid, &
+      pinflag=ESMF_PIN_DE_TO_SSI, rc=rc)
+
+ +

+Just as in the cases discussed before, where the same Grid was used, a + default DELayout with as many DEs as PETs in the VM is constructed. Setting + the pinflag to ESMF_PIN_DE_TO_SSI does not change the + fact that each PET owns exactly one of the DEs. However, assuming that this + code is run on a set of PETs that are all located under the same SSI, every + PET now has access to all of the DEs. The situation can be observed by + querying for both the localDeCount, and the ssiLocalDeCount. +

+

+    call ESMF_FieldGet(field, localDeCount=localDeCount, &
+      ssiLocalDeCount=ssiLocalDeCount, rc=rc)
+
+ +

+Assuming execution on 4 PETs, all located on the same SSI, the values of the + returned variable are localDeCount==1 and ssiLocalDeCount==4 on + all of the PETs. The mapping between each PET's local DE, and the global DE + index is provided through the localDeToDeMap array argument. The amount + of mapping information returned is dependent on how large localDeToDeMap + has been sized by the user. For size(localDeToDeMap)==localDeCount, + only mapping information for those DEs owned by the local PET is filled + in. However for size(localDeToDeMap)==ssiLocalDeCount, mapping + information for all locally accessible DEs is returned, including + those owned by other PETs on the same SSI. + +

+

+    allocate(localDeToDeMap(0:ssiLocalDeCount-1))
+    call ESMF_FieldGet(field, localDeToDeMap=localDeToDeMap, rc=rc)
+
+ +

+The first localDeCount entries of localDeToDeMap are always the + global DE indices of the DEs owned by the local PET. The remaining + ssiLocalDeCount-localDeCount entries are the global DE indices of + DEs shared by other PETs. The ordering of the shared DEs is from + smallest to greatest, excluding the locally owned DEs, which were already + listed at the beginning of localDeToDeMap. For the current case, again + assuming execution on 4 PETs all located on the same SSI, we expect the + following situation: + +

+PET 0: localDeToDeMap==(/0,1,2,3/) +
+PET 1: localDeToDeMap==(/1,0,2,3/) +
+PET 2: localDeToDeMap==(/2,0,1,3/) +
+PET 3: localDeToDeMap==(/3,0,1,2/) +
+ +

+Each PET can access the memory allocations associated with all of the + DEs listed in the localDeToDeMap returned by the Field object. Direct + access to the Fortran array pointer of a specific memory allocation is + available through ESMF_FieldGet(). Here each PET queries for the + farrayPtr of localDe==2, i.e. the 2nd shared DE. +

+

+    call ESMF_FieldGet(field, farrayPtr=myFarray, localDe=2, rc=rc)
+
+ +

+Now variable myFarray on PETs 0 and 1 both point to the same + memory allocation for global DE 2. Both PETs have access to the same + piece of shared memory! The same is true for PETs 2 and 3, pointing to the + shared memory allocation of global DE 1. + +

+It is important to note that all of the typical considerations surrounding + shared memory programming apply when accessing shared DEs! Proper + synchronization between PETs accessing shared DEs is critical to avoid + race conditions. Also performance issues like false sharing + need to be considered for optimal use. + +

+For a simple demonstration, PETs 0 and 2 fill the entire memory allocation of + DE 2 and 1, respectively, to a unique value. +

+

+    if (localPet==0) then
+      myFarray = 12345.6789d0
+    else if (localPet==2) then
+      myFarray = 6789.12345d0
+    endif
+
+ +

+Here synchronization is needed before any PETs that share access to the same + DEs can safely access the data without race condition. The Field class provides + a simple synchronization method that can be used. +

+

+    call ESMF_FieldSync(field, rc=rc) ! prevent race condition
+
+ +

+Now it is safe for PETs 1 and 3 to access the shared DEs. We expect to find + the data that was set above. For simplicity of the code only the first + array element is inspected here. +

+

+    if (localPet==1) then
+      if (abs(myFarray(1,1)-12345.6789d0)>1.d10) print *, "bad data detected"
+    else if (localPet==3) then
+      if (abs(myFarray(1,1)-6789.12345d0)>1.d10) print *, "bad data detected"
+    endif
+
+ +

+

+  endif ! ending the ssiSharedMemoryEnabled conditional
+
+ +

+ + +

+ +

+ +

+ +

+ +
+26.3.11 Create a 2D Field with a 2D Grid and a Fortran data array +

+ +

+A user can create an ESMF_Field directly from an ESMF_Grid and an intrinsic + Fortran data array. This interface is overloaded for typekind and rank + of the Fortran data array. + +

+In the following example, each dimension size of the Fortran array is equal to the + exclusive bounds of its corresponding + Grid dimension queried from the Grid through ESMF_GridGet() public interface. + +

+Formally let fa_shape(i) be the shape of i-th dimension of user supplied Fortran array, + then rule 1 states: +

+   
+    (1) fa_shape(i) = exclusiveCount(i)         
+                  i = 1...GridDimCount
+
+ +

+fa_shape(i) defines the shape of i-th dimension of the Fortran array. + ExclusiveCount are the number of data elements of i-th dimension in the exclusive region queried + from ESMF_GridGet interface. Rule 1 assumes that the Grid and the Fortran intrinsic + array have same number of dimensions; and optional arguments + of FieldCreate from Fortran array are left unspecified using default setup. These assumptions + are true for most typical uses of FieldCreate from Fortran data array. This is the easiest way + to create a Field from a Grid and a Fortran intrinsic data array. + +

+Fortran array dimension sizes (called shape in most Fortran language books) are equivalent + to the bounds and counts used in this manual. The following equation holds: +

+   
+    fa_shape(i) = shape(i) = counts(i) = upper_bound(i) - lower_bound(i) + 1
+
+ +

+These typically mean the same concept unless specifically explained to mean something else. + For example, ESMF uses DimCount very often to mean number of dimensions instead of its meaning + implied in the above equation. We'll clarify the meaning of a word when ambiguity could occur. + +

+Rule 1 is most useful for a user working with Field creation from a Grid and a Fortran + data array in most scenarios. It extends to higher dimension count, 3D, 4D, etc... + Typically, as the code example demonstrates, a user first creates a Grid, + then uses ESMF_GridGet() + to retrieve the exclusive counts. Next the user calculates the shape + of each Fortran array dimension according to rule 1. The Fortran data array is allocated + and initialized based on the computed shape. A Field can either be created in one shot or + created empty and finished using ESMF_FieldEmptyComplete. + +

+There are important details that can be skipped but are good to know for ESMF_FieldEmptyComplete + and ESMF_FieldCreate from a Fortran data array. 1) these methods require each PET contains + exactly one DE. This implies that a code using FieldCreate from a data array or FieldEmptyComplete must + have the same number of DEs and PETs, formally +$n_{DE} = n_{PET}$. Violation of this condition + will cause run time failures. 2) the bounds and counts retrieved from GridGet are DE specific + or equivalently PET specific, which means that the Fortran array shape could be different from one + PET to another. + + +

+

+    grid = ESMF_GridCreateNoPeriDim(minIndex=(/1,1/), maxIndex=(/10,20/), &
+          regDecomp=(/2,2/), name="atmgrid", rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+    call ESMF_GridGet(grid, localDE=0, staggerloc=ESMF_STAGGERLOC_CENTER, &
+        exclusiveCount=gec, rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+    allocate(farray(gec(1), gec(2)) )
+
+    field = ESMF_FieldCreate(grid, farray, ESMF_INDEX_DELOCAL, rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+ +

+ +

+ +
+26.3.12 Create a 2D Field with a 2D Grid and a Fortran data pointer +

+ +

+The setup of this example is similar to the previous section except + that the Field is created from a data pointer instead of a data array. + We highlight the ability to deallocate the internal Fortran data + pointer queried from the Field. This gives a user more flexibility with + memory management. + +

+

+    allocate(farrayPtr(gec(1), gec(2)) )
+
+    field = ESMF_FieldCreate(grid, farrayPtr, rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+    call ESMF_FieldGet(field, farrayPtr=farrayPtr2, rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+    ! deallocate the retrieved Fortran array pointer
+    deallocate(farrayPtr2)
+
+ +

+ +

+ +
+26.3.13 Create a 3D Field with a 2D Grid and a 3D Fortran data array +

+ +

+This example demonstrates a typical use of ESMF_Field combining + a 2D grid and a 3D Fortran native data array. One immediate problem follows: + how does one define the bounds of the ungridded dimension? This is + solved by the optional arguments ungriddedLBound and ungriddedUBound + of the ESMF_FieldCreate interface. By definition, ungriddedLBound + and ungriddedUBound + are both 1 dimensional integer Fortran arrays. + +

+Formally, let fa_shape(j=1...FieldDimCount-GridDimCount) be the shape of the + ungridded dimensions of a Field relative to the Grid used in Field creation. + The Field dimension count is equal to the number of dimensions of the Fortran array, which + equals the number of dimensions of the resultant Field. GridDimCount is + the number of dimensions of the Grid. + +

+fa_shape(j) is computed as: +

+   
+    fa_shape(j) = ungriddedUBound(j) - ungriddedLBound(j) + 1
+
+ +

+fa_shape is easy to compute when the gridded and ungridded dimensions do not + mix. However, it's conceivable that at higher dimension count, gridded and ungridded + dimensions can interleave. To aid the computation of ungridded dimension shape + we formally introduce the mapping concept. + +

+Let +$map_{A,B}(i=1...n_A) = i_B$, and +$i_B \in [\phi, 1...n_B]$. $n_A$ is the number + of elements in set A, $n_B$ is the number of elements in set B. $map_{A,B}(i)$ defines + a mapping from i-th element of set A to $i_B$-th element in set B. $i_B = \phi$ + indicates there does not exist a mapping from i-th element of set A to set B. + +

+Suppose we have a mapping from dimension index of ungriddedLBound (or + ungriddedUBound) to Fortran array dimension index, called ugb2fa. + By definition, $n_A$ equals to the dimension count of + ungriddedLBound (or ungriddedUBound), $n_B$ equals to the dimension count of + the Fortran array. We can now formulate the computation of ungridded + dimension shape as rule 2: +

+   
+    (2) fa_shape(ugb2fa(j)) = ungriddedUBound(j) - ungriddedLBound(j) + 1 
+                          j = 1..FortranArrayDimCount - GridDimCount
+
+ +

+The mapping can be computed in linear time proportional to the + Fortran array dimension count (or rank) using the following algorithm in pseudocode: +

+  
+    map_index = 1
+    do i = 1, farray_rank
+        if i-th dimension of farray is ungridded
+            ugb2fa(map_index) = i
+            map_index = map_index + 1
+        endif
+    enddo
+
+ +

+Here we use rank and dimension count interchangeably. These 2 terminologies are typically + equivalent. But there are subtle differences + under certain conditions. Rank is the total number of dimensions of a tensor object. + Dimension count allows a finer description of the heterogeneous dimensions in that object. + For example, a Field of rank 5 can have 3 gridded dimensions and 2 ungridded dimensions. + Rank is precisely the summation of dimension count of all types of dimensions. + +

+For example, if a 5D array is used with a 3D Grid, there are 2 ungridded dimensions: + ungriddedLBound=(/1,2/) and ungriddedUBound=(/5,7/). + Suppose the distribution of dimensions looks like (O, X, O, X, O), O means gridded, + X means ungridded. Then the mapping from ungridded bounds to Fortran array is + ugb2fa=(/2, 4/). The shape of 2nd and 4th dimension of Fortran array should equal + (5, 8). + +

+Back to our 3D Field created from a 2D Grid and 3D Fortran array example, suppose the 3rd + Field dimension is ungridded, ungriddedLBound=(/3/), ungriddedUBound=(/9/). + First we use rule 1 to compute shapes of the gridded Fortran array dimension, + then we use rule 2 to compute shapes of the ungridded Fortran array dimension. + In this example, we used the exclusive bounds obtained in the previous + example. +

+

+    fa_shape(1) = gec(1) ! rule 1
+    fa_shape(2) = gec(2)
+    fa_shape(3) = 7 ! rule 2 9-3+1
+    allocate(farray3d(fa_shape(1), fa_shape(2), fa_shape(3)))
+    field = ESMF_FieldCreate(grid, farray3d, ESMF_INDEX_DELOCAL, &
+        ungriddedLBound=(/3/), ungriddedUBound=(/9/), &
+        rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+ +

+ +

+ +
+26.3.14 Create a 3D Field with a 2D Grid and a 3D Fortran data array with gridToFieldMap argument +

+ +

+Building upon the previous example, we will create a 3D Field from + a 2D grid and 3D array but with a slight twist. In this example, we + introduce the gridToFieldMap argument that allows a user to map Grid + dimension index to Field dimension index. + +

+In this example, both dimensions of the Grid are distributed and the + mapping from DistGrid to Grid is (/1,2/). We will introduce rule 3 + assuming distgridToGridMap=(/1,2,3...gridDimCount/), and distgridDimCount equals + to gridDimCount. This is a reasonable assumption in typical Field use. + +

+We apply the mapping gridToFieldMap on rule 1 to create rule 3: +

+   
+    (3) fa_shape(gridToFieldMap(i)) = exclusiveCount(i)        
+                                  i = 1,..GridDimCount.
+
+ +

+Back to our example, suppose the 2nd + Field dimension is ungridded, ungriddedLBound=(/3/), ungriddedUBound=(/9/). + gridToFieldMap=(/3,1/), meaning the 1st Grid dimension maps to 3rd Field dimension, + and 2nd Grid dimension maps to 1st Field dimension. + +

+First we use rule 3 to compute shapes of the gridded Fortran array dimension, + then we use rule 2 to compute shapes of the ungridded Fortran array dimension. + In this example, we use the exclusive bounds obtained in the previous + example. +

+

+    gridToFieldMap2d(1) = 3
+    gridToFieldMap2d(2) = 1
+    do i = 1, 2
+        fa_shape(gridToFieldMap2d(i)) = gec(i)
+    end do
+    fa_shape(2) = 7
+    allocate(farray3d(fa_shape(1), fa_shape(2), fa_shape(3)))
+    field = ESMF_FieldCreate(grid, farray3d, ESMF_INDEX_DELOCAL, &
+        ungriddedLBound=(/3/), ungriddedUBound=(/9/), &
+        gridToFieldMap=gridToFieldMap2d, &
+        rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+ +

+ +

+ +
+26.3.15 Create a 3D Field with a 2D Grid and a 3D Fortran data array with halos +

+ +

+This example is similar to example 26.3.14. + In addition, here we will show how + a user can associate different halo widths to a Fortran array to create + a Field through the totalLWidth and totalUWidth optional arguments. + A diagram of the dimension configuration from Grid, halos, and Fortran data array + is shown here. +

+
+
+ + + +
Figure 12: +Field dimension configuration from Grid, halos, and Fortran data array.
+\scalebox{0.75}{\includegraphics{FieldParameterSetup}}
+
+
+
+ +

+The ESMF_FieldCreate() interface supports creating a Field from a Grid and a + Fortran array padded with halos on the distributed dimensions of the Fortran + array. Using this technique one can avoid passing non-contiguous Fortran array + slice to FieldCreate. It guarantees the same exclusive region, + and by using halos, it also defines a bigger total region to contain + the entire contiguous memory block of the Fortran array. + +

+The elements of totalLWidth and totalUWidth are applied in the order + distributed dimensions appear in the Fortran array. By definition, + totalLWidth and totalUWidth are 1 dimensional arrays of non-negative + integer values. The size of haloWidth arrays is equal to the number of distributed + dimensions of the Fortran array, which is also equal to the number of + distributed dimensions of the Grid used in the Field creation. + +

+Because the order of totalWidth (representing both totalLWidth and + totalUWidth) element is applied to the order distributed dimensions + appear in the Fortran array dimensions, it's quite simple to compute + the shape of distributed dimensions of the Fortran array. They are done + in a similar manner when applying ungriddedLBound and ungriddedUBound + to ungridded dimensions of the Fortran array defined by rule 2. + +

+Assume we have the mapping from the dimension index of totalWidth + to the dimension index of Fortran array, called mhw2fa; and we also + have the mapping from dimension index of Fortran array to dimension + index of the Grid, called fa2g. The shape of + distributed dimensions of a Fortran array can be computed by rule 4: + +

+

+  
+    (4) fa_shape(mhw2fa(k)) = exclusiveCount(fa2g(mhw2fa(k)) + 
+                              totalUWidth(k) + totalLWidth(k)
+                          k = 1...size(totalWidth)
+
+ +

+This rule may seem confusing but algorithmically the computation + can be done by the following pseudocode: + +

+

+  
+    fa_index = 1
+    do i = 1, farray_rank
+       if i-th dimension of Fortran array is distributed
+           fa_shape(i) = exclusiveCount(fa2g(i)) + 
+                         totalUWidth(fa_index) + totalLWidth(fa_index)
+           fa_index = fa_index + 1
+       endif
+    enddo
+
+ +

+The only complication then is to figure out the mapping from Fortran + array dimension index to Grid dimension index. This process can + be done by computing the reverse mapping from Field to Grid. + +

+Typically, we don't have to consider these complications if the following + conditions are met: 1) All Grid dimensions are distributed. 2) DistGrid + in the Grid has a dimension index mapping to the Grid in the form of + natural order (/1,2,3,.../). This natural order mapping is the + default mapping between various objects throughout ESMF. 3) Grid to Field + mapping is in the form of natural order, i.e. default mapping. These + seem like a lot of conditions but they are the default case in the interaction + among DistGrid, Grid, and Field. When these conditions are met, which + is typically true, the shape of distributed dimensions of Fortran array + follows rule 5 in a simple form: + +

+

+  
+    (5) fa_shape(k) = exclusiveCount(k) + 
+                      totalUWidth(k) + totalLWidth(k) 
+                  k = 1...size(totalWidth)
+
+ +

+Let's examine an example on how to apply rule 5. Suppose we have a + 5D array and a 3D Grid that has its first 3 dimensions mapped to the first + 3 dimensions of the Fortran array. totalLWidth=(/1,2,3/), + totalUWidth=(/7,9,10/), then by rule 5, the following pseudo code + can be used to compute the shape of the first 3 dimensions of the Fortran + array. The shape of the remaining two ungridded dimensions can be + computed according to rule 2. + +

+

+  
+    do k = 1, 3
+        fa_shape(k) = exclusiveCount(k) + 
+                      totalUWidth(k) + totalLWidth(k)) 
+    enddo
+
+ +

+Suppose now gridToFieldMap=(/2,3,4/) instead which says + the first dimension of Grid maps to the 2nd dimension of Field (or + Fortran array) and so on and so forth, we can obtain a more general form + of rule 5 by introducing first_distdim_index shift when Grid to Field + map (gridToFieldMap) is in the form of (/a,a+1,a+2.../). + +

+

+  
+    (6) fa_shape(k+first_distdim_index-1) = exclusiveCount(k) +
+                                            totalUWidth(k) + totalLWidth(k)
+                                        k = 1...size(totalWidth)
+
+ +

+It's obvious that first_distdim_index=a. If the first dimension of the Fortran + array is distributed, then rule 6 degenerates into rule 5, which is + the typical case. + +

+Back to our example creating a 3D Field from a 2D Grid and a 3D intrinsic + Fortran array, we will use the Grid created from previous example + that satisfies condition 1 and 2. We'll also use a simple gridToFieldMap + (1,2) which is the default mapping that satisfies condition 3. + First we use rule 5 to compute + the shape of distributed dimensions then we use rule 2 to compute the shape + of the ungridded dimensions. +

+

+    gridToFieldMap2d(1) = 1
+    gridToFieldMap2d(2) = 2
+    totalLWidth2d(1) = 3
+    totalLWidth2d(2) = 4
+    totalUWidth2d(1) = 3
+    totalUWidth2d(2) = 5
+    do k = 1, 2
+        fa_shape(k) = gec(k) + totalLWidth2d(k) + totalUWidth2d(k)
+    end do
+    fa_shape(3) = 7          ! 9-3+1
+    allocate(farray3d(fa_shape(1), fa_shape(2), fa_shape(3)))
+    field = ESMF_FieldCreate(grid, farray3d, ESMF_INDEX_DELOCAL, &
+        ungriddedLBound=(/3/), ungriddedUBound=(/9/), &
+        totalLWidth=totalLWidth2d, totalUWidth=totalUWidth2d, &
+        gridToFieldMap=gridToFieldMap2d, &
+        rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+ +

+ +

+ +
+26.3.16 Create a Field from a LocStream, typekind, and rank +

+ +

+In this example, an ESMF_Field is created from an ESMF_LocStream + and typekind/rank. + The location stream object is uniformly distributed + in a 1 dimensional space on 4 DEs. The rank is 1 dimensional. + Please refer to LocStream examples section for more information on LocStream creation. + +

+

+    locs = ESMF_LocStreamCreate(minIndex=1, maxIndex=16, rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+    field = ESMF_FieldCreate(locs, typekind=ESMF_TYPEKIND_I4, &
+        rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+ +

+ +

+ +
+26.3.17 Create a Field from a LocStream and arrayspec +

+ +

+In this example, an ESMF_Field is created from an ESMF_LocStream + and an ESMF_Arrayspec. + The location stream object is uniformly distributed + in a 1 dimensional space on 4 DEs. The arrayspec is 1 dimensional. + Please refer to LocStream examples section for more information on LocStream creation. + +

+

+    locs = ESMF_LocStreamCreate(minIndex=1, maxIndex=16, rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+    call ESMF_ArraySpecSet(arrayspec, 1, ESMF_TYPEKIND_I4, rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+    field = ESMF_FieldCreate(locs, arrayspec, &
+        rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+ +

+ +

+ +
+26.3.18 Create a Field from a Mesh, typekind, and rank +

+ +

+In this example, an ESMF_Field is created from an ESMF_Mesh + and typekind/rank. + The mesh object is on a Euclidean surface that is partitioned to a 2x2 rectangular + space with 4 elements and 9 nodes. The nodal space is represented by + a distgrid with 9 indices. A Field is created on locally owned nodes on each PET. + Therefore, the created Field has 9 data points globally. + The mesh object can be represented by the picture + below. For more information on Mesh creation, please see Section 33.3.1. +

+                Mesh Ids
+  
+    2.0   7 ------- 8 -------- 9
+          |         |          |
+          |    3    |    4     |
+          |         |          |
+    1.0   4 ------- 5 -------- 6
+          |         |          |
+          |    1    |    2     |
+          |         |          |
+    0.0   1 ------- 2 -------- 3
+  
+         0.0       1.0        2.0 
+  
+        Node Ids at corners
+        Element Ids in centers
+   
+  
+               Mesh Owners
+  
+    2.0   2 ------- 2 -------- 3
+          |         |          |
+          |    2    |    3     |
+          |         |          |
+    1.0   0 ------- 0 -------- 1
+          |         |          |
+          |    0    |    1     |
+          |         |          |
+    0.0   0 ------- 0 -------- 1
+  
+         0.0       1.0        2.0 
+  
+        Node Owners at corners
+        Element Owners in centers
+
+ +

+

+      ! Create Mesh structure in 1 step
+      mesh=ESMF_MeshCreate(parametricDim=2,spatialDim=2, &
+             nodeIds=nodeIds, nodeCoords=nodeCoords, &
+             nodeOwners=nodeOwners, elementIds=elemIds,&
+             elementTypes=elemTypes, elementConn=elemConn, &
+             rc=rc)
+      if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+      ! Field is created on the 1 dimensional nodal distgrid. On
+      ! each PET, Field is created on the locally owned nodes.
+      field = ESMF_FieldCreate(mesh, typekind=ESMF_TYPEKIND_I4, rc=rc)
+      if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+ +

+ +

+ +
+26.3.19 Create a Field from a Mesh and arrayspec +

+ +

+In this example, an ESMF_Field is created from an ESMF_Mesh + and an ESMF_Arrayspec. + The mesh object is on a Euclidean surface that is partitioned to a 2x2 rectangular + space with 4 elements and 9 nodes. The nodal space is represented by + a distgrid with 9 indices. Field is created on locally owned nodes on each PET. + Therefore, the created Field has 9 data points globally. + The mesh object can be represented by the picture + below. For more information on Mesh creation, please see Section 33.3.1. + +

+

+      ! Create Mesh structure in 1 step
+      mesh=ESMF_MeshCreate(parametricDim=2,spatialDim=2, &
+             nodeIds=nodeIds, nodeCoords=nodeCoords, &
+             nodeOwners=nodeOwners, elementIds=elemIds,&
+             elementTypes=elemTypes, elementConn=elemConn, &
+             rc=rc)
+      if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+      call ESMF_ArraySpecSet(arrayspec, 1, ESMF_TYPEKIND_I4, rc=rc)
+      if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+      ! Field is created on the 1 dimensional nodal distgrid. On
+      ! each PET, Field is created on the locally owned nodes.
+      field = ESMF_FieldCreate(mesh, arrayspec, rc=rc)
+      if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+ +

+ +

+ +
+26.3.20 Create a Field from a Mesh and an Array +

+ +

+In this example, an ESMF_Field is created from an ESMF_Mesh + and an ESMF_Array. The mesh object is created in the previous example and + the array object is retrieved from the field created in the previous example too. + +

+

+    call ESMF_MeshGet(mesh, nodalDistgrid=distgrid, rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+    array = ESMF_ArrayCreate(distgrid=distgrid, arrayspec=arrayspec, rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+    ! query the array from the previous example
+    call ESMF_FieldGet(field, array=array, rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+    ! create a Field from a mesh and an array
+    field1 = ESMF_FieldCreate(mesh, array, rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+ +

+ +

+ +
+26.3.21 Create a Field from a Mesh and an ArraySpec with optional features +

+ +

+In this example, an ESMF_Field is created from an ESMF_Mesh + and an ESMF_ArraySpec. The mesh object is created in the previous example. + The Field is also created with optional arguments such as ungridded dimensions + and dimension mapping. + +

+In this example, the mesh is mapped to the 2nd dimension of the + ESMF_Field, with its first dimension being the ungridded dimension with bounds 1,3. + +

+

+    call ESMF_ArraySpecSet(arrayspec, 2, ESMF_TYPEKIND_I4, rc=rc)
+    field = ESMF_FieldCreate(mesh, arrayspec=arrayspec, gridToFieldMap=(/2/), &
+        ungriddedLBound=(/1/), ungriddedUBound=(/3/), rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+ +

+ + +

+ +

+ +

+ +

+ +
+26.3.22 Create a Field with replicated dimensions +

+ +

+In this example an ESMF_Field with replicated dimension is created from an ESMF_Grid and + an ESMF_Arrayspec. A user can also use other ESMF_FieldCreate() methods to create replicated + dimension Field, this example illustrates the key concepts and use of a replicated dimension Field. + +

+Normally gridToFieldMap argument in ESMF_FieldCreate() should not contain + 0 value entries. However, for a Field with replicated dimension, a 0 entry in gridToFieldMap + indicates the corresponding Grid dimension is replicated in the Field. In such a Field, + the rank of the Field is no longer necessarily greater than its Grid rank. + An example will make this clear. We will start by creating Distgrid and Grid. + +

+

+    ! create 4D distgrid
+    distgrid = ESMF_DistGridCreate(minIndex=(/1,1,1,1/), &
+        maxIndex=(/6,4,6,4/), regDecomp=(/2,1,2,1/), rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+    ! create 4D grid on top of the 4D distgrid
+    grid = ESMF_GridCreate(distgrid=distgrid, name="grid", rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+    ! create 3D arrayspec
+    call ESMF_ArraySpecSet(arrayspec, 3, ESMF_TYPEKIND_R8, rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+ +

+In this example, a user creates a 3D Field with replicated dimension + replicated along the 2nd and 4th dimension of its underlying 4D Grid. + In addition, the 2nd dimension of the Field is ungridded (why?). The 1st and + 3rd dimensions of the Field have halos. +

+

+    ! create field, 2nd and 4th dimensions of the Grid are replicated
+    field = ESMF_FieldCreate(grid, arrayspec, indexflag=ESMF_INDEX_DELOCAL, &
+        gridToFieldMap=(/1,0,2,0/), &
+        ungriddedLBound=(/1/), ungriddedUBound=(/4/), &
+        totalLWidth=(/1,1/), totalUWidth=(/4,5/), &
+        staggerloc=ESMF_STAGGERLOC_CORNER, &
+        rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+    ! get basic information from the field
+    call ESMF_FieldGet(field, grid=grid1, array=array, typekind=typekind, &
+        dimCount=dimCount, staggerloc=lstaggerloc, &
+        gridToFieldMap=lgridToFieldMap, ungriddedLBound=lungriddedLBound, &
+        ungriddedUBound=lungriddedUBound, totalLWidth=ltotalLWidth, &
+        totalUWidth=ltotalUWidth, rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+    ! get bounds information from the field
+    call ESMF_FieldGet(field, localDe=0, farrayPtr=farray, &
+        exclusiveLBound=felb, exclusiveUBound=feub, exclusiveCount=fec, &
+        computationalLBound=fclb, computationalUBound=fcub, &
+        computationalCount=fcc, totalLBound=ftlb, totalUBound=ftub, &
+        totalCount=ftc, rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+ +

+Next we verify that the field and array bounds agree with each other +

+    call ESMF_ArrayGet(array, rank=arank, dimCount=adimCount, rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+    gridrank_repdim = 0
+    do i = 1, size(gridToFieldMap)
+        if(gridToFieldMap(i) == 0) gridrank_repdim = gridrank_repdim + 1
+    enddo
+
+ +

+Number of undistributed dimension of the array X is computed from + total rank of the array A, the dimension count of its underlying distgrid + B and number of replicated dimension in the distgrid C. + We have the following formula: X = A - (B - C) +

+

+    allocate(audlb(arank-adimCount+gridrank_repdim), &
+        audub(arank-adimCount+gridrank_repdim))
+    call ESMF_ArrayGet(array, exclusiveLBound=aelb, exclusiveUBound=aeub, &
+        computationalLBound=aclb, computationalUBound=acub, &
+        totalLBound=atlb, totalUBound=atub, &
+        undistLBound=audlb, undistUBound=audub, &
+        rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+    ! verify the ungridded bounds from field match
+    ! undistributed bounds from its underlying array
+    do i = 1, arank-adimCount
+        if(lungriddedLBound(i) .ne. audlb(i) ) &
+            rc = ESMF_FAILURE
+    enddo
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+    do i = 1, arank-adimCount
+        if(lungriddedUBound(i) .ne. audub(i) ) &
+            rc = ESMF_FAILURE
+    enddo
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+ +

+We then verify the data in the replicated dimension Field can be updated and accessed. +

+

+    do ik = ftlb(3), ftub(3)
+     do ij = ftlb(2), ftub(2)
+      do ii = ftlb(1), ftub(1)
+        farray(ii,ij,ik) = ii+ij*2+ik
+      enddo
+     enddo
+    enddo
+    ! access and verify
+    call ESMF_FieldGet(field, localDe=0, farrayPtr=farray1, &
+        rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+    do ik = ftlb(3), ftub(3)
+     do ij = ftlb(2), ftub(2)
+      do ii = ftlb(1), ftub(1)
+        n = ii+ij*2+ik
+        if(farray1(ii,ij,ik) .ne. n ) rc = ESMF_FAILURE
+      enddo
+     enddo
+    enddo
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+    ! release resources
+    call ESMF_FieldDestroy(field)
+    call ESMF_GridDestroy(grid)
+    call ESMF_DistGridDestroy(distgrid)
+
+ +

+ + +

+ +

+ +

+ +

+ +
+26.3.23 Create a Field on an arbitrarily distributed Grid +

+ +

+With the introduction of Field on arbitrarily distributed Grid, Field has two kinds of dimension + count: one associated geometrical (or physical) dimensionality, the other one associated with its + memory index space representation. Field and Grid dimCount reflect the physical index + space of the objects. A new type of dimCount rank should be added to both of these entities. + The rank gives the number of dimensions of the memory index space of the objects. + This would be the dimension of the pointer pulled out of Field and the + size of the bounds vector, for example. + +

+For non-arbitrary Grids rank=dimCount, but for grids and fields with + arbitrary dimensions rank = dimCount - (number of Arb dims) + 1 + (Internally Field can use the Arb info from the grid to create the mapping + from the Field Array to the DistGrid) + +

+When creating a Field size(GridToFieldMap)=dimCount for both Arb and Non-arb grids + This array specifies the mapping of Field to Grid identically for both Arb and Nonarb grids + If a zero occurs in an entry corresponding to any arbitrary dimension, then + a zero must occur in every entry corresponding to an arbitrary dimension (i.e. + all arbitrary dimensions must either be all replicated or all not replicated, + they can't be broken apart). + +

+In this example an ESMF_Field is created from an arbitrarily distributed ESMF_Grid and + an ESMF_Arrayspec. A user can also use other ESMF_FieldCreate() methods to create + such a Field, this example illustrates the key concepts and use of Field on arbitrary distributed Grid. + +

+The Grid is 3 dimensional in physics index space but the first two dimension are collapsed into + a single memory index space. Thus the resulting Field is 3D in physics index space and 2D in memory index + space. This is made obvious with the 2D arrayspec used to create this Field. + +

+

+    ! create a 3D grid with the first 2 dimensions collapsed 
+    ! and arbitrarily distributed
+    grid3d = ESMF_GridCreateNoPeriDim(coordTypeKind=ESMF_TYPEKIND_R8, &
+      minIndex=(/1,1,1/), maxIndex=(/xdim, ydim,zdim/), &
+      arbIndexList=localArbIndex,arbIndexCount=localArbIndexCount, &
+      name="arb3dgrid", rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+    ! create a 2D arrayspec
+    call ESMF_ArraySpecSet(arrayspec2D, rank=2, typekind=ESMF_TYPEKIND_R4, &
+         rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+    ! create a 2D Field using the Grid and the arrayspec
+    field = ESMF_FieldCreate(grid3d, arrayspec2D, rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+  
+    call ESMF_FieldGet(field, rank=rank, dimCount=dimCount, &
+                       rc=rc)
+    if (myPet .eq. 0) print *, 'Field rank, dimCount', &
+                                rank, dimCount
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+  
+    ! verify that the dimension counts are correct
+    if (rank .ne. 2) correct = .false.
+    if (dimCount .ne. 3) correct = .false.
+
+ +

+ +

+ +
+26.3.24 Create a Field on an arbitrarily distributed Grid with replicated dimensions & ungridded bounds +

+ +

+The next example is slightly more complicated in + that the Field also contains one ungridded dimension and its gridded dimension + is replicated on the arbitrarily distributed dimension of the Grid. + +

+The same 3D Grid and 2D arrayspec in the previous example + are used but a gridToFieldMap argument + is supplied to the ESMF_FieldCreate() call. The first 2 entries of + the map are 0, the last (3rd) entry is 1. The 3rd dimension of the Grid is + mapped to the first dimension of the Field, this dimension is then replicated + on the arbitrarily distributed dimensions of the Grid. In addition, the + Field also has one ungridded dimension. Thus the final dimension count of the + Field is 2 in both physics and memory index space. + +

+

+    field = ESMF_FieldCreate(grid3d, arrayspec2D,gridToFieldMap=(/0,0,1/), &
+            ungriddedLBound=(/1/), ungriddedUBound=(/10/),rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+  
+    call ESMF_FieldGet(field, rank=rank, dimCount=dimCount, &
+                       rc=rc)
+    if (myPet .eq. 0) print *, 'Field rank, dimCount', &
+                                rank, dimCount
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+  
+    if (rank .ne. 2) correct = .false.
+    if (dimCount .ne. 2) correct = .false.
+
+ +

+ + +

+ +

+ +

+ +

+
+26.3.25 Field regridding +

+ +

+This section describes the Field regrid methods. For an in depth description of ESMF regridding and the options available + please see Section 24.2. + +

+The basic flow of ESMF Field regridding is as follows. First a source and destination geometry object are created, depending on + the regrid method they can be either a Grid, a Mesh, an XGrid, or a LocStream. + Next Fields are built on the source and destination grid objects. These Fields are then passed into ESMF_FieldRegridStore(). The user can either get a + sparse matrix from this call and/or a routeHandle. If the user gets the sparse matrix then they are responsible for deallocating it, but other than that + can use it as they wish. The routeHandle can be used in the ESMF_FieldRegrid() call to perform the actual interpolation of data from the source + to the destination field. This interpolation can be repeated for the same set of Fields as long as the coordinates at the staggerloc involved in the + regridding in the associated grid object don't change. The same routeHandle can also be used between any pair of Fields that matches the original + pari in type, kind, and memory layout of the gridded dimensions. However, the size, number, and index order of ungridded dimensions + may be different. See section 37.2.5 for a more detailed discussion of RouteHandle reusability. + However, if you want + the routehandle to be the same interpolation between the grid objects upon which the Fields are built as was calculated + with the original ESMF_FieldRegridStore() call, then there + are additional constraints on the grid objects. To be the same interpolation, the grid objects upon which the + Fields are build must contain the same coordinates at the stagger locations involved in the regridding as + the original source and destination Fields used in the ESMF_FieldRegridStore() call. + The routehandle represents the interpolation between the grid objects as they were during the ESMF_FieldRegridStore() call. + So if the coordinates at the stagger location in the grid objects change, a new call to ESMF_FieldRegridStore() + is necessary to compute the interpolation between that new set of coordinates. When finished with the routeHandle + ESMF_FieldRegridRelease() should be used to + free the associated memory. + +

+The following example demonstrates doing a regrid operation between two Fields. + +

+

+  ! (Create source Grid, Mesh, XGrid, or LocStream.)
+  ! (Create srcField on the above.)
+
+  ! (Create destination Grid, Mesh, XGrid, or LocStream.)
+  ! (Create dstField on the above.)
+  
+  ! Create the routeHandle which encodes the communication and
+  ! information necessary for the regrid sparse matrix multiply.
+  call ESMF_FieldRegridStore(srcField=srcField, dstField=dstField, &
+                             routeHandle=routeHandle, rc=localrc)
+
+ +

+

+ 
+  ! Can loop here regridding from srcField to dstField 
+  ! do i=1,....
+
+       ! (Put data into srcField)
+
+       ! Use the routeHandle to regrid data from srcField to dstField.
+       ! As described above, the same routeHandle can be used to 
+       ! regrid a large class of different source and destination Fields. 
+       call ESMF_FieldRegrid(srcField, dstField, routeHandle, rc=localrc)
+
+ +

+

+  !    (Use data in dstField)
+
+  ! enddo 
+
+
+  ! Free the buffers and data associated with the routeHandle. 
+  call ESMF_FieldRegridRelease(routeHandle, rc=localrc)
+
+ +

+ + +

+ +

+ +

+ +

+26.3.26 Field regrid with masking +

+ As before, to create the sparse matrix regrid operator we call the + ESMF_FieldRegridStore() routine. + However, in this case we apply masking to the regrid operation. + The mask value for each index location in the Grids may be set using + the ESMF_GridAddItem() call (see Section 31.3.17 + and Section 31.3.18). Mask values may be set independently + for the source and destination Grids. If no mask values have been set in a Grid, then it is + assumed no masking should be used for that Grid. The srcMaskValues + parameter allows the user to set the list of values which indicate + that a source location should be masked out. The dstMaskValues + parameter allows the user to set the list of values which indicate + that a destination location should be masked out. The absence of + one of these parameters indicates that no masking should be used + for that Field (e.g no srcMaskValue parameter indicates that source + masking shouldn't occur). The unmappedaction flag may be + used with or without masking and indicates what should occur + if destination points can not be mapped to a source cell. + Here the ESMF_UNMAPPEDACTION_IGNORE value indicates that unmapped + destination points are to be ignored and no sparse matrix entries should be + generated for them. +

+

+  call ESMF_FieldRegridStore(srcField=srcField, srcMaskValues=(/1/),       &
+                             dstField=dstField, dstMaskValues=(/1/),       &
+                             unmappedaction=ESMF_UNMAPPEDACTION_IGNORE, &
+                             routeHandle=routeHandle,                      &
+                             regridmethod=ESMF_REGRIDMETHOD_BILINEAR,     &
+                             rc=localrc)
+
+ +

+The ESMF_FieldRegrid and ESMF_FieldRegridRelease calls + may then be applied as in the previous example. + + +

+ +

+ +

+ +

+26.3.27 Field regrid example: Mesh to Mesh +

+ This example demonstrates the regridding process between Fields created on Meshes. First + the Meshes are created. This example omits the setup of the arrays describing the Mesh, but please see + Section 33.3.1 for examples of this. After creation Fields are constructed on the Meshes, + and then ESMF_FieldRegridStore() is called to construct a RouteHandle implementing the regrid operation. Finally, ESMF_FieldRegrid() is + called with the Fields and the RouteHandle to do the interpolation between the source Field and + destination Field. Note the coordinates of the source and destination Mesh should be in degrees. + +

+

+  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+  ! Create Source Mesh
+  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+  ! Create the Mesh structure.
+  ! For brevity's sake, the code to fill the Mesh creation 
+  ! arrays is omitted from this example. However, here
+  ! is a brief description of the arrays:
+  ! srcNodeIds    - the global ids for the src nodes
+  ! srcNodeCoords - the coordinates for the src nodes
+  ! srcNodeOwners - which PET owns each src node
+  ! srcElemIds    - the global ids of the src elements
+  ! srcElemTypes  - the topological shape of each src element
+  ! srcElemConn   - how to connect the nodes to form the elements
+  !                 in the source mesh
+  ! Several examples of setting up these arrays can be seen in
+  ! the Mesh Section "Mesh Creation". 
+  srcMesh=ESMF_MeshCreate(parametricDim=2,spatialDim=2, &
+         nodeIds=srcNodeIds, nodeCoords=srcNodeCoords, &
+         nodeOwners=srcNodeOwners, elementIds=srcElemIds,&
+         elementTypes=srcElemTypes, elementConn=srcElemConn, rc=rc)
+
+  if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+
+
+  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+  ! Create and Fill Source Field
+  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+  ! Set description of source Field
+  call ESMF_ArraySpecSet(arrayspec, 1, ESMF_TYPEKIND_R8, rc=rc)
+
+  if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+  ! Create source Field
+  srcField = ESMF_FieldCreate(srcMesh, arrayspec, &
+                        name="source", rc=rc)
+
+  if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+  ! Get source Field data pointer to put data into
+  call ESMF_FieldGet(srcField, 0, fptr1D,  rc=rc)
+
+  if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+  ! Get number of local nodes to allocate space
+  ! to hold local node coordinates
+  call ESMF_MeshGet(srcMesh, &
+         numOwnedNodes=numOwnedNodes, rc=rc)
+
+  if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+  ! Allocate space to hold local node coordinates
+  ! (spatial dimension of Mesh*number of local nodes)
+  allocate(ownedNodeCoords(2*numOwnedNodes))
+
+  ! Get local node coordinates
+  call ESMF_MeshGet(srcMesh, &
+         ownedNodeCoords=ownedNodeCoords, rc=rc)
+
+  if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+  ! Set the source Field to the function 20.0+x+y
+  do i=1,numOwnedNodes
+    ! Get coordinates
+    x=ownedNodeCoords(2*i-1)
+    y=ownedNodeCoords(2*i)
+
+   ! Set source function
+   fptr1D(i) = 20.0+x+y
+  enddo
+
+  ! Deallocate local node coordinates
+  deallocate(ownedNodeCoords)
+
+
+  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+  ! Create Destination Mesh
+  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+  ! Create the Mesh structure.
+  ! For brevity's sake, the code to fill the Mesh creation 
+  ! arrays is omitted from this example. However, here
+  ! is a brief description of the arrays:
+  ! dstNodeIds    - the global ids for the dst nodes
+  ! dstNodeCoords - the coordinates for the dst nodes
+  ! dstNodeOwners - which PET owns each dst node
+  ! dstElemIds    - the global ids of the dst elements
+  ! dstElemTypes  - the topological shape of each dst element
+  ! dstElemConn   - how to connect the nodes to form the elements
+  !                 in the destination mesh
+  ! Several examples of setting up these arrays can be seen in
+  ! the Mesh Section "Mesh Creation". 
+  dstMesh=ESMF_MeshCreate(parametricDim=2,spatialDim=2, &
+         nodeIds=dstNodeIds, nodeCoords=dstNodeCoords, &
+         nodeOwners=dstNodeOwners, elementIds=dstElemIds,&
+         elementTypes=dstElemTypes, elementConn=dstElemConn, rc=rc)
+
+  if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+
+  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+  ! Create Destination Field
+  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+  ! Set description of source Field
+  call ESMF_ArraySpecSet(arrayspec, 1, ESMF_TYPEKIND_R8, rc=rc)
+
+  if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+  ! Create destination Field
+  dstField = ESMF_FieldCreate(dstMesh, arrayspec, &
+                        name="destination", rc=rc)
+
+  if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+  ! Do Regrid
+  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+  ! Compute RouteHandle which contains the regrid operation
+  call ESMF_FieldRegridStore( &
+          srcField, &
+          dstField=dstField, &
+          routeHandle=routeHandle, &
+          regridmethod=ESMF_REGRIDMETHOD_BILINEAR, &
+          rc=rc)
+
+  if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+  ! Perform Regrid operation moving data from srcField to dstField
+  call ESMF_FieldRegrid(srcField, dstField, routeHandle, rc=rc)
+
+
+  if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+  ! dstField now contains the interpolated data.
+  ! If the Meshes don't change, then routeHandle
+  ! may be used repeatedly to interpolate from 
+  ! srcField to dstField.  
+  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+   
+  ! User code to use the routeHandle, Fields, and
+  ! Meshes goes here before they are freed below.
+
+
+  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+  ! Free the objects created in the example.
+  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+  ! Free the RouteHandle
+  call ESMF_FieldRegridRelease(routeHandle, rc=rc)
+
+  if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+  ! Free the Fields
+  call ESMF_FieldDestroy(srcField, rc=rc)
+
+  if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+  call ESMF_FieldDestroy(dstField, rc=rc)
+
+  if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+  ! Free the Meshes
+  call ESMF_MeshDestroy(dstMesh, rc=rc)
+
+  if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+  call ESMF_MeshDestroy(srcMesh, rc=rc)
+ 
+  if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+ +

+ + +

+ +

+ +

+ +

+ +
+26.3.28 Gather Field data onto root PET +

+ +

+User can use ESMF_FieldGather interface to gather Field data from multiple + PETs onto a single root PET. This interface is overloaded by type, kind, and rank. + +

+Note that the implementation of Scatter and Gather is not sequence index based. + If the Field is built on arbitrarily distributed Grid, Mesh, LocStream or XGrid, + Gather will not gather data to rootPet + from source data points corresponding to the sequence index on the rootPet. + Instead Gather will gather a contiguous memory range from source PET to + rootPet. The size of the memory range is equal to the number of + data elements on the source PET. Vice versa for the Scatter operation. + In this case, the user should use ESMF_FieldRedist to achieve + the same data operation result. For examples how to use ESMF_FieldRedist + to perform Gather and Scatter, please refer to + 26.3.32 and + 26.3.31. + +

+In this example, we first create a 2D Field, then use ESMF_FieldGather to + collect all the data in this Field into a data pointer on PET 0. +

+

+    ! Get current VM and pet number
+    call ESMF_VMGetCurrent(vm, rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+    call ESMF_VMGet(vm, localPet=lpe, rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+    ! Create a 2D Grid and use this grid to create a Field
+    ! farray is the Fortran data array that contains data on each PET.
+    grid = ESMF_GridCreateNoPeriDim(minIndex=(/1,1/), maxIndex=(/10,20/), &
+        regDecomp=(/2,2/), &
+        name="grid", rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+    field = ESMF_FieldCreate(grid, typekind=ESMF_TYPEKIND_I4, rc=localrc)
+    if (localrc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+
+    call ESMF_FieldGet(field, farrayPtr=fptr, rc=localrc)
+    if (localrc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+    !---------Initialize pet specific field data----------------
+    !    1        5         10
+    ! 1  +--------+---------+
+    !    |        |         |
+    !    |   0    |    1    |
+    !    |        |         |
+    ! 10 +--------+---------+
+    !    |        |         |
+    !    |   2    |    3    |
+    !    |        |         |
+    ! 20 +--------+---------+
+    fptr = lpe
+
+    ! allocate the Fortran data array on PET 0 to store gathered data
+    if(lpe .eq. 0) then
+      allocate (farrayDst(10,20))
+    else
+      allocate (farrayDst(0,0))
+    end if
+    call ESMF_FieldGather(field, farrayDst, rootPet=0, rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+    ! check that the values gathered on rootPet are correct
+    if(lpe .eq. 0) then
+       do i = 1, 5
+          do j = 1, 10
+             if(farrayDst(i, j) .ne. 0) localrc=ESMF_FAILURE
+          enddo
+       enddo
+      if (localrc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+       do i = 6, 10
+          do j = 1, 10
+             if(farrayDst(i, j) .ne. 1) localrc=ESMF_FAILURE
+          enddo
+       enddo
+      if (localrc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+       do i = 1, 5
+          do j = 11, 20
+             if(farrayDst(i, j) .ne. 2) localrc=ESMF_FAILURE
+          enddo
+       enddo
+      if (localrc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+       do i = 6, 10
+          do j = 11, 20
+             if(farrayDst(i, j) .ne. 3) localrc=ESMF_FAILURE
+          enddo
+       enddo
+      if (localrc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+    endif
+
+    ! destroy all objects created in this example to prevent memory leak
+    call ESMF_FieldDestroy(field, rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+    call ESMF_GridDestroy(grid, rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+    if(lpe .eq. 0) deallocate(farrayDst)
+
+ +

+ +

+ +
+26.3.29 Scatter Field data from root PET onto its set of joint PETs +

+ +

+User can use ESMF_FieldScatter interface to scatter Field data from root + PET onto its set of joint PETs. This interface is overloaded by type, kind, and rank. + +

+In this example, we first create a 2D Field, then use ESMF_FieldScatter to + scatter the data from a data array located on PET 0 onto this Field. +

+

+    ! Create a 2D Grid and use this grid to create a Field
+    ! farray is the Fortran data array that contains data on each PET.
+    grid = ESMF_GridCreateNoPeriDim(minIndex=(/1,1/), maxIndex=(/10,20/), &
+        regDecomp=(/2,2/), &
+        name="grid", rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+    field = ESMF_FieldCreate(grid, typekind=ESMF_TYPEKIND_I4, rc=localrc)
+    if (localrc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+    ! initialize values to be scattered
+    !    1        5         10
+    ! 1  +--------+---------+
+    !    |        |         |
+    !    |   0    |    1    |
+    !    |        |         |
+    ! 10 +--------+---------+
+    !    |        |         |
+    !    |   2    |    3    |
+    !    |        |         |
+    ! 20 +--------+---------+
+    if(lpe .eq. 0) then
+        allocate(farraySrc(10,20))
+        farraySrc(1:5,1:10) = 0
+        farraySrc(6:10,1:10) = 1
+        farraySrc(1:5,11:20) = 2
+        farraySrc(6:10,11:20) = 3
+    else
+      allocate (farraySrc(0,0))
+    endif
+
+    ! scatter the data onto individual PETs of the Field
+    call ESMF_FieldScatter(field, farraySrc, rootPet=0, rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+    call ESMF_FieldGet(field, localDe=0, farrayPtr=fptr, rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+    ! verify that the scattered data is properly distributed
+    do i = lbound(fptr, 1), ubound(fptr, 1)
+        do j = lbound(fptr, 2), ubound(fptr, 2)
+            if(fptr(i, j) .ne. lpe) localrc = ESMF_FAILURE
+        enddo
+        if (localrc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+    enddo
+
+    ! destroy all objects created in this example to prevent memory leak
+    call ESMF_FieldDestroy(field, rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+    call ESMF_GridDestroy(grid, rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+    if(lpe .eq. 0) deallocate(farraySrc)
+
+ +

+ + +

+ +

+ +

+ +

+ +
+26.3.30 Redistribute data from source Field to destination Field +

+ +

+User can use ESMF_FieldRedist interface to redistribute data from + source Field to destination Field. This interface is overloaded by type and kind; + In the version of ESMF_FieldRedist without factor argument, a default value + of 1 is used. + +

+In this example, we first create two 1D Fields, a source Field and a destination + Field. Then we use ESMF_FieldRedist to + redistribute data from source Field to destination Field. + +

+

+    ! Get current VM and pet number
+    call ESMF_VMGetCurrent(vm, rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+    call ESMF_VMGet(vm, localPet=localPet, rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+    ! create grid
+    distgrid = ESMF_DistGridCreate(minIndex=(/1/), maxIndex=(/16/), &
+            regDecomp=(/4/), &
+            rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+    grid = ESMF_GridCreate(distgrid=distgrid, &
+        name="grid", rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+    ! create srcField
+    ! +--------+--------+--------+--------+
+    !      0        1        2        3            ! value
+    ! 1        4        8        12       16       ! bounds
+    srcField = ESMF_FieldCreate(grid, typekind=ESMF_TYPEKIND_I4, &
+      indexflag=ESMF_INDEX_DELOCAL, rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+    call ESMF_FieldGet(srcField, farrayPtr=srcfptr, rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+    srcfptr(:) = localPet
+
+    ! create dstField
+    ! +--------+--------+--------+--------+
+    !      0        0        0        0            ! value
+    ! 1        4        8        12       16       ! bounds
+    dstField = ESMF_FieldCreate(grid, typekind=ESMF_TYPEKIND_I4, &
+      indexflag=ESMF_INDEX_DELOCAL, rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+    call ESMF_FieldGet(dstField, farrayPtr=dstfptr, rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+  
+    dstfptr(:) = 0
+
+    ! perform redist
+    ! 1. setup routehandle from source Field to destination Field
+    call ESMF_FieldRedistStore(srcField, dstField, routehandle, rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+    ! 2. use precomputed routehandle to redistribute data
+    call ESMF_FieldRedist(srcfield, dstField, routehandle, rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+    ! verify redist
+    call ESMF_FieldGet(dstField, localDe=0, farrayPtr=fptr, rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+    ! Verify that the redistributed data in dstField is correct.
+    ! Before the redist op, the dst Field contains all 0. 
+    ! The redist op reset the values to the PE value, verify this is the case.
+    do i = lbound(fptr, 1), ubound(fptr, 1)
+        if(fptr(i) .ne. localPet) localrc = ESMF_FAILURE
+    enddo
+    if (localrc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+ +

+Field redistribution can also be performed between different Field pairs that + match the original Fields in type, kind, and memory layout of the + gridded dimensions. However, the size, number, and index order of + ungridded dimensions may be different. See section 37.2.5 + for a more detailed discussion of RouteHandle reusability. +

+

+    call ESMF_ArraySpecSet(arrayspec, typekind=ESMF_TYPEKIND_I4, rank=2, rc=rc)
+
+ +

+Create two fields with ungridded dimensions using the Grid created previously. + The new Field pair has matching number of elements. The ungridded dimension + is mapped to the first dimension of either Field. +

+

+    srcFieldA = ESMF_FieldCreate(grid, arrayspec, gridToFieldMap=(/2/), &
+        ungriddedLBound=(/1/), ungriddedUBound=(/10/), rc=rc)
+
+ +

+

+    dstFieldA = ESMF_FieldCreate(grid, arrayspec, gridToFieldMap=(/2/), &
+        ungriddedLBound=(/1/), ungriddedUBound=(/10/), rc=rc)
+
+ +

+Using the previously computed routehandle, the Fields can be redistributed. +

+

+    call ESMF_FieldRedist(srcfieldA, dstFieldA, routehandle, rc=rc)
+
+ +

+

+    call ESMF_FieldRedistRelease(routehandle, rc=rc)
+
+ +

+ +

+ +
+26.3.31 FieldRedist as a form of scatter involving arbitrary distribution +

+ +

+User can use ESMF_FieldRedist interface to redistribute data from + source Field to destination Field, where the destination Field is built on + an arbitrarily distributed structure, e.g. ESMF_Mesh. The underlying mechanism is explained + in section 28.2.19. + +

+In this example, we will create 2 one dimensional Fields, the src Field has a regular decomposition + and holds all its data on a single PET, in this case PET 0. The destination Field is built on a Mesh + which is itself built on an arbitrarily distributed distgrid. Then we use ESMF_FieldRedist to + redistribute data from source Field to destination Field, similar to a traditional scatter operation. + +

+The src Field only has data on PET 0 where it is sequentially initialized, i.e. 1,2,3...This data + will be redistributed (or scattered) from PET 0 to the destination Field arbitrarily distributed on + all the PETs. +

+

+    ! a one dimensional grid whose elements are all located on PET 0
+    distgrid = ESMF_DistGridCreate(minIndex=(/1/), maxIndex=(/9/), &
+        regDecomp=(/1/), &
+        rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+    grid = ESMF_GridCreate(distgrid=distgrid, &
+        indexflag=ESMF_INDEX_DELOCAL, rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+    srcField = ESMF_FieldCreate(grid, typekind=ESMF_TYPEKIND_I4, rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+    ! initialize the source data
+    if (localPet == 0) then
+        call ESMF_FieldGet(srcField, farrayPtr=srcfptr, rc=rc)
+        if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+        do i = 1, 9
+            srcfptr(i) = i
+        enddo
+    endif
+
+ +

+For more information on Mesh creation, user can refer to Mesh examples section or Field creation + on Mesh example for more details. +

+

+      ! Create Mesh structure
+      mesh=ESMF_MeshCreate(parametricDim=2,spatialDim=2, &
+             nodeIds=nodeIds, nodeCoords=nodeCoords, &
+             nodeOwners=nodeOwners, elementIds=elemIds,&
+             elementTypes=elemTypes, elementConn=elemConn, &
+             rc=rc)
+      if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+ +

+Create the destination Field on the Mesh that is arbitrarily distributed on + all the PETs. +

+

+      dstField = ESMF_FieldCreate(mesh, typekind=ESMF_TYPEKIND_I4, rc=rc)
+      if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+ +

+Perform the redistribution from source Field to destination Field. +

+

+     call ESMF_FieldRedistStore(srcField, dstField, &
+             routehandle=routehandle, rc=rc)
+     if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+     call ESMF_FieldRedist(srcField, dstField, routehandle=routehandle, rc=rc)
+     if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+ +

+We can now verify that the sequentially initialized source data is scattered + on to the destination Field. The data has been scattered onto the destination + Field with the following distribution. +

+  
+   4 elements on PET 0:  1 2 4 5
+   2 elements on PET 1:  3 6
+   2 elements on PET 2:  7 8
+   1 element  on PET 3:  9
+
+ Because the redistribution is index based, the elements also corresponds to the + index space of Mesh in the destination Field. +

+

+    call ESMF_FieldGet(dstField, farrayPtr=dstfptr, rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+ +

+The scatter operation is successful. Since the routehandle computed with + ESMF_FieldRedistStore can be reused, user can use the same routehandle + to scatter multiple source Fields from a single PET to multiple destination + Fields distributed on all PETs. The gathering operation is just the + opposite of the demonstrated scattering operation, where a user would + redist from a source Field distributed on multiple PETs to a destination Field + that only has data storage on a single PET. + +

+Now it's time to release all the resources. +

+

+    call ESMF_FieldRedistRelease(routehandle=routehandle, rc=rc)
+
+ +

+ +

+ +
+26.3.32 FieldRedist as a form of gather involving arbitrary distribution +

+ +

+Similarly, one can use the same approach to gather the data from an arbitrary distribution + to a non-arbitrary distribution. This concept is demonstrated by using the previous Fields but + the data operation is reversed. This time data is gathered from the Field built on the mesh to the Field + that has only data allocation on rootPet. + +

+First a FieldRedist routehandle is created from the Field built on Mesh to the Field + that has only data allocation on rootPet. +

+

+    call ESMF_FieldRedistStore(dstField, srcField, routehandle=routehandle, &
+         rc=rc)
+
+ +

+Perform FieldRedist, this will gather the data points from the Field built on mesh to + the data pointer on the rootPet (default to 0) stored in the srcField. +

+

+    call ESMF_FieldRedist(dstField, srcField, routehandle=routehandle, rc=rc)
+
+ +

+Release the routehandle used for the gather operation. +

+

+    call ESMF_FieldRedistRelease(routehandle=routehandle, rc=rc)
+
+ +

+ + +

+ +

+ +

+ +

+ +
+26.3.33 Sparse matrix multiplication from source Field to destination Field +

+ +

+The ESMF_FieldSMM() interface can be used to perform sparse matrix multiplication + from + source Field to destination Field. This interface is overloaded by type and kind; + +

+In this example, we first create two 1D Fields, a source Field and a destination + Field. Then we use ESMF_FieldSMM to + perform sparse matrix multiplication from source Field to destination Field. + +

+The source and destination Field data are arranged such that each of the 4 PETs has 4 + data elements. Moreover, the source Field has all its data elements initialized to a linear + function based on local PET number. + Then collectively on each PET, a SMM according to the following formula + is preformed:
+ +$dstField(i) = i * srcField(i), i = 1 ... 4$
+
+ +

+Because source Field data are initialized to a linear function based on local PET number, + the formula predicts that + the result destination Field data on each PET is 1,2,3,4. This is verified in the + example. + +

+Section 28.2.18 provides a detailed discussion of the + sparse matrix multiplication operation implemented in ESMF. + +

+

+    ! Get current VM and pet number
+    call ESMF_VMGetCurrent(vm, rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+    call ESMF_VMGet(vm, localPet=lpe, rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+    ! create distgrid and grid
+    distgrid = ESMF_DistGridCreate(minIndex=(/1/), maxIndex=(/16/), &
+        regDecomp=(/4/), &
+        rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+    grid = ESMF_GridCreate(distgrid=distgrid, &
+        name="grid", rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+    call ESMF_GridGetFieldBounds(grid, localDe=0, totalCount=fa_shape, rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+    ! create src\_farray, srcArray, and srcField
+    ! +--------+--------+--------+--------+
+    !      1        2        3        4            ! value
+    ! 1        4        8        12       16       ! bounds
+    allocate(src_farray(fa_shape(1)) )
+    src_farray = lpe+1
+    srcArray = ESMF_ArrayCreate(distgrid, src_farray, &
+                indexflag=ESMF_INDEX_DELOCAL, rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+    srcField = ESMF_FieldCreate(grid, srcArray, rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+    ! create dst_farray, dstArray, and dstField
+    ! +--------+--------+--------+--------+
+    !      0        0        0        0            ! value
+    ! 1        4        8        12       16       ! bounds
+    allocate(dst_farray(fa_shape(1)) )
+    dst_farray = 0
+    dstArray = ESMF_ArrayCreate(distgrid, dst_farray, &
+                indexflag=ESMF_INDEX_DELOCAL, rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+    dstField = ESMF_FieldCreate(grid, dstArray, rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+    ! perform sparse matrix multiplication
+    ! 1. setup routehandle from source Field to destination Field
+    ! initialize factorList and factorIndexList
+    allocate(factorList(4))
+    allocate(factorIndexList(2,4))
+    factorList = (/1,2,3,4/)
+    factorIndexList(1,:) = (/lpe*4+1,lpe*4+2,lpe*4+3,lpe*4+4/)
+    factorIndexList(2,:) = (/lpe*4+1,lpe*4+2,lpe*4+3,lpe*4+4/)
+
+    call ESMF_FieldSMMStore(srcField, dstField, routehandle, &
+        factorList, factorIndexList, rc=localrc)
+    if (localrc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+    ! 2. use precomputed routehandle to perform SMM
+    call ESMF_FieldSMM(srcfield, dstField, routehandle, rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+    ! verify sparse matrix multiplication
+    call ESMF_FieldGet(dstField, localDe=0, farrayPtr=fptr, rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+    ! Verify that the result data in dstField is correct.
+    ! Before the SMM op, the dst Field contains all 0.
+    ! The SMM op reset the values to the index value, verify this is the case.
+    ! +--------+--------+--------+--------+
+    !  1 2 3 4  2 4 6 8  3 6 9 12  4 8 12 16       ! value
+    ! 1        4        8        12       16       ! bounds
+    do i = lbound(fptr, 1), ubound(fptr, 1)
+        if(fptr(i) /= i*(lpe+1)) rc = ESMF_FAILURE
+    enddo
+
+ +

+Field sparse matrix multiplication can also be applied between Fields + that matche the original Fields in type, kind, and + memory layout of the gridded dimensions. However, the size, number, + and index order of ungridded dimensions may be different. See section + 37.2.5 for a more detailed discussion of RouteHandle + reusability +

+    call ESMF_ArraySpecSet(arrayspec, typekind=ESMF_TYPEKIND_I4, rank=2, rc=rc)
+
+ +

+Create two fields with ungridded dimensions using the Grid created previously. + The new Field pair has matching number of elements. The ungridded dimension + is mapped to the first dimension of either Field. +

+

+    srcFieldA = ESMF_FieldCreate(grid, arrayspec, gridToFieldMap=(/2/), &
+        ungriddedLBound=(/1/), ungriddedUBound=(/10/), rc=rc)
+
+ +

+

+    dstFieldA = ESMF_FieldCreate(grid, arrayspec, gridToFieldMap=(/2/), &
+        ungriddedLBound=(/1/), ungriddedUBound=(/10/), rc=rc)
+
+ +

+Using the previously computed routehandle, the sparse matrix multiplication + can be performed between the Fields. +

+

+    call ESMF_FieldSMM(srcfieldA, dstFieldA, routehandle, rc=rc)
+
+ +

+

+    ! release route handle
+    call ESMF_FieldSMMRelease(routehandle, rc=rc)
+
+ +

+In the following discussion, we demonstrate how to set up a SMM routehandle + between a pair of Fields that are different in number of gridded dimensions + and the size of those gridded dimensions. The source Field has a 1D decomposition + with 16 total elements; the destination Field has a 2D decomposition with + 12 total elements. For ease of understanding of the actual matrix calculation, + a global indexing scheme is used. +

+

+    distgrid = ESMF_DistGridCreate(minIndex=(/1/), maxIndex=(/16/), &
+        indexflag=ESMF_INDEX_GLOBAL, &
+        regDecomp=(/4/), &
+        rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+    grid = ESMF_GridCreate(distgrid=distgrid, &
+        indexflag=ESMF_INDEX_GLOBAL, &
+        name="grid", rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+    call ESMF_GridGetFieldBounds(grid, localDe=0, totalLBound=tlb, &
+                       totalUBound=tub, rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+ +

+create 1D src_farray, srcArray, and srcField +

+   +  PET0  +  PET1  +  PET2  +  PET3  +
+   +--------+--------+--------+--------+
+        1        2        3        4            ! value
+   1        4        8        12       16       ! bounds of seq indices
+
+

+

+    allocate(src_farray2(tlb(1):tub(1)) )
+    src_farray2 = lpe+1
+    srcArray = ESMF_ArrayCreate(distgrid, src_farray2, &
+                  indexflag=ESMF_INDEX_GLOBAL, &
+      rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+    !print *, lpe, '+', tlb, tub, '+', src_farray2
+
+    srcField = ESMF_FieldCreate(grid, srcArray, rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+ +

+Create 2D dstField on the following distribution + (numbers are the sequence indices): +

+   +  PET0  +  PET1  +  PET2  +  PET3  +
+   +--------+--------+--------+--------+
+   |        |        |        |        |
+   |   1    |   4    |   7    |   10   |
+   |        |        |        |        |
+   +--------+--------+--------+--------+
+   |        |        |        |        |
+   |   2    |   5    |   8    |   11   |
+   |        |        |        |        |
+   +--------+--------+--------+--------+
+   |        |        |        |        |
+   |   3    |   6    |   9    |   12   |
+   |        |        |        |        |
+   +--------+--------+--------+--------+
+
+

+

+    ! Create the destination Grid
+    dstGrid = ESMF_GridCreateNoPeriDim(minIndex=(/1,1/), maxIndex=(/3,4/), &
+      indexflag = ESMF_INDEX_GLOBAL, &
+      regDecomp = (/1,4/), &
+      rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+    dstField = ESMF_FieldCreate(dstGrid, typekind=ESMF_TYPEKIND_R4, &
+      indexflag=ESMF_INDEX_GLOBAL, &
+      rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+ +

+Perform sparse matrix multiplication $dst_i$ = $M_{i,j}$ * $src_j$ + First setup routehandle from source Field to destination Field + with prescribed factorList and factorIndexList. + +

+The sparse matrix is of size 12x16, however only the following entries + are filled: +

+   M(3,1) = 0.1
+   M(3,10) = 0.4
+   M(8,2) = 0.25
+   M(8,16) = 0.5
+   M(12,1) = 0.3
+   M(12,16) = 0.7
+
+ +

+By the definition of matrix calculation, the 8th element on PET2 in the + dstField equals to 0.25*srcField(2) + 0.5*srcField(16) = 0.25*1+0.5*4=2.25 + For simplicity, we will load the factorList and factorIndexList on + PET 0 and 1, the SMMStore engine will load balance the parameters on all 4 + PETs internally for optimal performance. +

+

+    if(lpe == 0) then
+      allocate(factorList(3), factorIndexList(2,3))
+      factorList=(/0.1,0.4,0.25/)
+      factorIndexList(1,:)=(/1,10,2/)
+      factorIndexList(2,:)=(/3,3,8/)
+      call ESMF_FieldSMMStore(srcField, dstField, routehandle=routehandle, &
+          factorList=factorList, factorIndexList=factorIndexList, rc=localrc)
+      if (localrc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+    else if(lpe == 1) then
+      allocate(factorList(3), factorIndexList(2,3))
+      factorList=(/0.5,0.3,0.7/)
+      factorIndexList(1,:)=(/16,1,16/)
+      factorIndexList(2,:)=(/8,12,12/)
+      call ESMF_FieldSMMStore(srcField, dstField, routehandle=routehandle, &
+          factorList=factorList, factorIndexList=factorIndexList, rc=localrc)
+      if (localrc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+    else
+      call ESMF_FieldSMMStore(srcField, dstField, routehandle=routehandle, &
+          rc=localrc)
+      if (localrc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+    endif
+
+    ! 2. use precomputed routehandle to perform SMM
+    call ESMF_FieldSMM(srcfield, dstField, routehandle=routehandle, rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+ +

+ + +

+ +

+ +

+ +

+ +
+26.3.34 Field Halo solving a domain decomposed heat transfer problem +

+ +

+The ESMF_FieldHalo() interface can be used to perform halo updates for a Field. This + eases communication programming from a user perspective. By definition, the user + program only needs to update locally owned exclusive region in each domain, then call + FieldHalo to communicate the values in the halo region from/to neighboring domain elements. + In this example, we solve a 1D heat transfer problem: +$u_t = \alpha^2 u_{xx}$ with the + initial condition $u(0, x) = 20$ and boundary conditions +$u(t, 0) = 10, u(t, 1) = 40$. + The temperature field $u$ + is represented by a ESMF_Field. A finite difference explicit time stepping scheme is employed. + During each time step, FieldHalo update is called to communicate values in the halo region + to neighboring domain elements. The steady state (as +$t \rightarrow \infty$) solution + is a linear temperature profile along $x$. The numerical solution is an approximation of + the steady state solution. It can be verified to represent a linear temperature profile. + +

+Section 28.2.15 provides a discussion of the + halo operation implemented in ESMF_Array. + +

+

+! create 1D distgrid and grid decomposed according to the following diagram:
+! +------------+   +----------------+   +---------------+   +--------------+
+! |   DE 0  |  |   |  |   DE 1   |  |   |  |   DE 2  |  |   |  |   DE 3    |
+! |  1 x 16 |  |   |  |  1 x 16  |  |   |  |  1 x 16 |  |   |  |  1 x 16   |
+! |         | 1|<->|1 |          | 1|<->|1 |         | 1|<->|1 |           |
+! |         |  |   |  |          |  |   |  |         |  |   |  |           |
+! +------------+   +----------------+   +---------------+   +--------------+
+    distgrid = ESMF_DistGridCreate(minIndex=(/1/), maxIndex=(/npx/), &
+        regDecomp=(/4/), rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+    grid = ESMF_GridCreate(distgrid=distgrid, name="grid", rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+    ! set up initial condition and boundary conditions of the
+    ! temperature Field
+    if(lpe == 0) then
+        allocate(fptr(17), tmp_farray(17))
+        fptr = 20.
+        fptr(1) = 10.
+        tmp_farray(1) = 10.
+        startx = 2
+        endx = 16
+
+        field = ESMF_FieldCreate(grid, fptr, totalUWidth=(/1/), &
+                name="temperature", rc=rc)
+        if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+    else if(lpe == 3) then
+        allocate(fptr(17), tmp_farray(17))
+        fptr = 20.
+        fptr(17) = 40.
+        tmp_farray(17) = 40.
+        startx = 2
+        endx = 16
+
+        field = ESMF_FieldCreate(grid, fptr, totalLWidth=(/1/), &
+                name="temperature", rc=rc)
+        if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+    else
+        allocate(fptr(18), tmp_farray(18))
+        fptr = 20.
+        startx = 2
+        endx = 17
+
+        field = ESMF_FieldCreate(grid, fptr, &
+            totalLWidth=(/1/), totalUWidth=(/1/), name="temperature", rc=rc)
+        if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+    endif
+
+    ! compute the halo update routehandle of the decomposed temperature Field
+    call ESMF_FieldHaloStore(field, routehandle=routehandle, rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+    dt = 0.01
+    dx = 1./npx
+    alpha = 0.1
+
+    ! Employ explicit time stepping
+    ! Solution converges after about 9000 steps based on apriori knowledge.
+    ! The result is a linear temperature profile stored in field.
+    do iter = 1, 9000
+     ! only elements in the exclusive region are updated locally
+     ! in each domain
+     do i = startx, endx
+       tmp_farray(i) = &
+       fptr(i)+alpha*alpha*dt/dx/dx*(fptr(i+1)-2.*fptr(i)+fptr(i-1))
+      enddo
+      fptr = tmp_farray
+     ! call halo update to communicate the values in the halo region to
+     ! neighboring domains
+     call ESMF_FieldHalo(field, routehandle=routehandle, rc=rc)
+     if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+    enddo
+
+    ! release the halo routehandle
+    call ESMF_FieldHaloRelease(routehandle, rc=rc)
+
+ +

+ + +

+26.4 Restrictions and Future Work +

+ +

+ + + +

    +
  1. CAUTION: It depends on the specific entry point of ESMF_FieldCreate() used during Field creation, which Fortran operations are supported on the Fortran array pointer farrayPtr, returned by ESMF_FieldGet(). Only if the ESMF_FieldCreate() from pointer variant was used, will the returned farrayPtr variable contain the original bounds information, and be suitable for the Fortran deallocate() call. This limitation is a direct consequence of the Fortran 95 standard relating to the passing of array arguments. + +

    +

  2. +
  3. No mathematical operators. The Fields class does not +currently support advanced +operations on fields, such as differential or other +mathematical operators. + +

    +

  4. +
+ +

+26.5 Design and Implementation Notes +

+ +

+ +

    +
  1. Some methods which have a Field interface are actually +implemented at the underlying Grid or Array level; they +are inherited by the Field class. This allows the user +API (Application Programming Interface) to present functions at +the level which is most consistent to the application without +restricting where inside the ESMF the actual implementation +is done. + +

    +

  2. +
  3. The Field class is implemented in Fortran, and as such is +defined inside the framework by a Field derived type and a set of +subprograms (functions and subroutines) which operate on that derived type. +The Field class itself is very thin; it is a container class which +groups a Grid and an Array object together. + +

    +

  4. +
  5. Fields follow the framework-wide convention of the +unison creation and operation rule: All PETs which are +part of the currently executing VM must create the +same Fields at the same point in their execution. Since an early +user request was that global object creation not impose the overhead of +a barrier or synchronization point, Field creation does no inter-PET +communication. For this to work, each PET must query the total number +of PETs in this VM, and which local PET number it is. It can then +compute which DE(s) are part of the local decomposition, and any +global information can be computed in unison by all PETs independently +of the others. In this way the overhead of communication is avoided, +at the cost of more difficulty in diagnosing program bugs which result +from not all PETs executing the same create calls. + +

    +

  6. +
  7. Related to the item above, the user request to not impose +inter-PET communication at object creation time means that requirement +FLD 1.5.1, that all Fields will have unique names, and if not specified, +the framework will generate a unique name for it, is difficult or +impossible to support. A part of this requirement has been implemented; +a unique object counter is maintained in the Base object class, and if +a name is not given at create time a name such as "Field003" is generated +which is guaranteed to not be repeated by the framework. However, it +is impossible to error check that the user has not replicated a name, +and it is possible under certain conditions that if not all PETs have +created the same number of objects, that the counters on different PETs +may not stay synchronized. This remains an open issue. + +

    +

  8. +
+ +

+26.6 Class API +

+ +

+ +

+ +

+ +

+26.6.1 ESMF_FieldAssignment(=) - Field assignment +

+ +

+ +

+
+INTERFACE: +

   interface assignment(=)
+   field1 = field2
+
ARGUMENTS: +
   type(ESMF_Field) :: field1
+   type(ESMF_Field) :: field2
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Assign field1 as an alias to the same ESMF Field object in memory + as field2. If field2 is invalid, then field1 will be equally invalid after + the assignment. + +

+The arguments are: +

+
field1
+
The ESMF_Field object on the left hand side of the assignment. + +
+
field2
+
The ESMF_Field object on the right hand side of the assignment. + +
+
+ +

+ +

+ +

+26.6.2 ESMF_FieldOperator(==) - Field equality operator +

+ +

+ +

+
+INTERFACE: +

   interface operator(==)
+   if (field1 == field2) then ... endif
+   OR
+   result = (field1 == field2)
+
RETURN VALUE: +
   logical :: result
+
ARGUMENTS: +
   type(ESMF_Field), intent(in) :: field1
+   type(ESMF_Field), intent(in) :: field2
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Test whether field1 and field2 are valid aliases to the same ESMF + Field object in memory. For a more general comparison of two ESMF Fields, + going beyond the simple alias test, the ESMF_FieldMatch() function (not yet + implemented) must be used. + +

+The arguments are: +

+
field1
+
The ESMF_Field object on the left hand side of the equality + operation. + +
+
field2
+
The ESMF_Field object on the right hand side of the equality + operation. + +
+
+ +

+ +

+ +

+26.6.3 ESMF_FieldOperator(/=) - Field not equal operator +

+ +

+ +

+
+INTERFACE: +

   interface operator(/=)
+   if (field1 /= field2) then ... endif
+   OR
+   result = (field1 /= field2)
+
RETURN VALUE: +
   logical :: result
+
ARGUMENTS: +
   type(ESMF_Field), intent(in) :: field1
+   type(ESMF_Field), intent(in) :: field2
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Test whether field1 and field2 are not valid aliases to the + same ESMF Field object in memory. For a more general comparison of two ESMF + Fields, going beyond the simple alias test, the ESMF_FieldMatch() function + (not yet implemented) must be used. + +

+The arguments are: +

+
field1
+
The ESMF_Field object on the left hand side of the non-equality + operation. + +
+
field2
+
The ESMF_Field object on the right hand side of the non-equality + operation. + +
+
+ +

+ +

+ +

+26.6.4 ESMF_FieldCopy - Copy data from one Field object to another +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_FieldCopy(fieldOut, fieldIn, rc)
+
ARGUMENTS: +
        type(ESMF_Field), intent(inout) :: fieldOut
+        type(ESMF_Field), intent(in) :: fieldIn
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+        integer, intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Copy data from one ESMF_Field object to another. + +

+The arguments are: +

+
fieldOut
+
ESMF_Field object into which to copy the data. The incoming + fieldOut must already references a matching memory allocation. + +
+
fieldIn
+
ESMF_Field object that holds the data to be copied. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+26.6.5 ESMF_FieldCreate - Create a Field from Geom and typekind +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_FieldCreate()
+ function ESMF_FieldCreateGBTKR(geom, typekind, &
+      gridToFieldMap, ungriddedLBound, ungriddedUBound, &
+      totalLWidth, totalUWidth, pinflag, name, rc)
+
RETURN VALUE: +
     type(ESMF_Field) :: ESMF_FieldCreateGBTKR
+
ARGUMENTS: +
     type(ESMF_Geom), intent(in) :: geom
+     type(ESMF_TypeKind_Flag),intent(in) :: typekind
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer, intent(in), optional :: gridToFieldMap(:)
+     integer, intent(in), optional :: ungriddedLBound(:)
+     integer, intent(in), optional :: ungriddedUBound(:)
+     integer, intent(in), optional :: totalLWidth(:)
+     integer, intent(in), optional :: totalUWidth(:)
+     type(ESMF_Pin_Flag), intent(in), optional :: pinflag
+     character (len=*), intent(in), optional :: name
+     integer, intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Create an ESMF_Field and allocate space internally for an + ESMF_Array. Return a new ESMF_Field. For an example and + associated documentation using this method see section + 26.3.4. + +

+The arguments are: +

+
geom
+
ESMF_Geom object. + +
+
typekind
+
The typekind of the Field. See section 54.61 + for a list of valid typekind options. + +
+
[gridToFieldMap]
+
List with number of elements equal to the + grid's dimCount. The list elements map each dimension + of the grid to a dimension in the field by + specifying the appropriate field dimension index. The default is to + map all of the grid's dimensions against the lowest dimensions of + the field in sequence, i.e. gridToFieldMap = (/1,2,3,.../). + The values of all gridToFieldMap entries must be greater than or equal + to one and smaller than or equal to the field rank. + It is erroneous to specify the same gridToFieldMap entry + multiple times. The total ungridded dimensions in the field + are the total field dimensions less + the dimensions in + the grid. Ungridded dimensions must be in the same order they are + stored in the field. + If the Field dimCount is less than the Grid dimCount then the default + gridToFieldMap will contain zeros for the rightmost entries. A zero + entry in the gridToFieldMap indicates that the particular + Grid dimension will be replicating the Field across the DEs along + this direction. + +
+
[ungriddedLBound]
+
Lower bounds of the ungridded dimensions of the field. + The number of elements in the ungriddedLBound is equal to the number of ungridded + dimensions in the field. All ungridded dimensions of the + field are also undistributed. When field dimension count is + greater than grid dimension count, both ungriddedLBound and ungriddedUBound + must be specified. When both are specified the values are checked + for consistency. Note that the the ordering of + these ungridded dimensions is the same as their order in the field. + +
+
[ungriddedUBound]
+
Upper bounds of the ungridded dimensions of the field. + The number of elements in the ungriddedUBound is equal to the number of ungridded + dimensions in the field. All ungridded dimensions of the + field are also undistributed. When field dimension count is + greater than grid dimension count, both ungriddedLBound and ungriddedUBound + must be specified. When both are specified the values are checked + for consistency. Note that the the ordering of + these ungridded dimensions is the same as their order in the field. + +
+
[totalLWidth]
+
Lower bound of halo region. The size of this array is the number + of gridded dimensions in the Field. However, ordering of the elements + needs to be the same as they appear in the field. Values default + to 0. If values for totalLWidth are specified they must be reflected in + the size of the field. That is, for each gridded dimension the + field size should be max( totalLWidth + totalUWidth + + computationalCount, exclusiveCount ). + +
+
[totalUWidth]
+
Upper bound of halo region. The size of this array is the number + of gridded dimensions in the Field. However, ordering of the elements + needs to be the same as they appear in the field. Values default + to 0. If values for totalUWidth are specified they must be reflected in + the size of the field. That is, for each gridded dimension the + field size should max( totalLWidth + totalUWidth + + computationalCount, exclusiveCount ). + +
+
[pinflag]
+
Specify which type of resource DEs are pinned to. See section + 50.2.1 for a list of valid pinning options. + The default is to pin DEs to PETs, i.e. only the PET on which a DE + was created considers the DE as local. + +
+
[name]
+
Field name. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+26.6.6 ESMF_FieldCreate - Create a Field from Geom and ArraySpec +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_FieldCreate()
+   function ESMF_FieldCreateGBArraySpec(geom, arrayspec, gridToFieldMap, &
+     ungriddedLBound, ungriddedUBound, totalLWidth, totalUWidth, &
+     pinflag, name, rc)
+
RETURN VALUE: +
     type(ESMF_Field) :: ESMF_FieldCreateGBArraySpec
+
ARGUMENTS: +
     type(ESMF_Geom) :: geom
+     type(ESMF_ArraySpec), intent(in) :: arrayspec
+     integer, intent(in), optional :: gridToFieldMap(:)
+     integer, intent(in), optional :: ungriddedLBound(:)
+     integer, intent(in), optional :: ungriddedUBound(:)
+     integer, intent(in), optional :: totalLWidth(:)
+     integer, intent(in), optional :: totalUWidth(:)
+     type(ESMF_Pin_Flag), intent(in), optional :: pinflag
+     character (len=*), intent(in), optional :: name
+     integer, intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Create an ESMF_Field and allocate space internally for an + ESMF_Array. Return a new ESMF_Field. For an example and + associated documentation using this method see section + 26.3.5. + +

+The arguments are: +

+
geom
+
ESMF_Geom object. + +
+
arrayspec
+
Data type and kind specification. + +
+
[gridToFieldMap]
+
List with number of elements equal to the + grid's dimCount. The list elements map each dimension + of the grid to a dimension in the field by + specifying the appropriate field dimension index. The default is to + map all of the grid's dimensions against the lowest dimensions of + the field in sequence, i.e. gridToFieldMap = (/1,2,3,.../). + The values of all gridToFieldMap entries must be greater than or equal + to one and smaller than or equal to the field rank. + It is erroneous to specify the same gridToFieldMap entry + multiple times. The total ungridded dimensions in the field + are the total field dimensions less + the dimensions in + the grid. Ungridded dimensions must be in the same order they are + stored in the field. + +
+
[ungriddedLBound]
+
Lower bounds of the ungridded dimensions of the field. + The number of elements in the ungriddedLBound is equal to the number of ungridded + dimensions in the field. All ungridded dimensions of the + field are also undistributed. When field dimension count is + greater than grid dimension count, both ungriddedLBound and ungriddedUBound + must be specified. When both are specified the values are checked + for consistency. Note that the the ordering of + these ungridded dimensions is the same as their order in the field. + +
+
[ungriddedUBound]
+
Upper bounds of the ungridded dimensions of the field. + The number of elements in the ungriddedUBound is equal to the number of ungridded + dimensions in the field. All ungridded dimensions of the + field are also undistributed. When field dimension count is + greater than grid dimension count, both ungriddedLBound and ungriddedUBound + must be specified. When both are specified the values are checked + for consistency. Note that the the ordering of + these ungridded dimensions is the same as their order in the field. + +
+
[totalLWidth]
+
Lower bound of halo region. The size of this array is the number + of gridded dimensions in the Field. However, ordering of the elements + needs to be the same as they appear in the field. Values default + to 0. If values for totalLWidth are specified they must be reflected in + the size of the field. That is, for each gridded dimension the + field size should be max( totalLWidth + totalUWidth + + computationalCount, exclusiveCount ). + +
+
[totalUWidth]
+
Upper bound of halo region. The size of this array is the number + of gridded dimensions in the Field. However, ordering of the elements + needs to be the same as they appear in the field. Values default + to 0. If values for totalUWidth are specified they must be reflected in + the size of the field. That is, for each gridded dimension the + field size should max( totalLWidth + totalUWidth + + computationalCount, exclusiveCount ). + +
+
[pinflag]
+
Specify which type of resource DEs are pinned to. See section + 50.2.1 for a list of valid pinning options. + The default is to pin DEs to PETs, i.e. only the PET on which a DE + was created considers the DE as local. + +
+
[name]
+
Field name. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+26.6.7 ESMF_FieldCreate - Create a Field from Geom and Array +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_FieldCreate()
+   function ESMF_FieldCreateGBArray(geom, array, datacopyflag, &
+     gridToFieldMap, ungriddedLBound, ungriddedUBound, &
+     totalLWidth, totalUWidth, name, vm, rc)
+
RETURN VALUE: +
     type(ESMF_Field) :: ESMF_FieldCreateGBArray
+
ARGUMENTS: +
     type(ESMF_Geom), intent(in) :: geom
+     type(ESMF_Array), intent(in) :: array
+     type(ESMF_DataCopy_Flag), intent(in), optional :: datacopyflag
+     integer, intent(in), optional :: gridToFieldMap(:)
+     integer, intent(in), optional :: ungriddedLBound(:)
+     integer, intent(in), optional :: ungriddedUBound(:)
+     integer, intent(in), optional :: totalLWidth(:)
+     integer, intent(in), optional :: totalUWidth(:)
+     character (len = *), intent(in), optional :: name
+     type(ESMF_VM), intent(in), optional :: vm
+     integer, intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Create an ESMF_Field. This version of creation + assumes the data exists already and is being + passed in through an ESMF_Array. For an example and + associated documentation using this method see section + 26.3.6. + +

+The arguments are: +

+
geom
+
ESMF_Geom object. + +
+
array
+
ESMF_Array object. + +
+
[datacopyflag]
+
Indicates whether to copy the contents of the array or reference it directly. + For valid values see 54.13. The default is + ESMF_DATACOPY_REFERENCE. + +
+
[gridToFieldMap]
+
List with number of elements equal to the + grid's dimCount. The list elements map each dimension + of the grid to a dimension in the field by + specifying the appropriate field dimension index. The default is to + map all of the grid's dimensions against the lowest dimensions of + the field in sequence, i.e. gridToFieldMap = (/1,2,3,.../). + The values of all gridToFieldMap entries must be greater than or equal + to one and smaller than or equal to the field rank. + It is erroneous to specify the same gridToFieldMap entry + multiple times. The total ungridded dimensions in the field + are the total field dimensions less + the dimensions in + the grid. Ungridded dimensions must be in the same order they are + stored in the field. + +
+
[ungriddedLBound]
+
Lower bounds of the ungridded dimensions of the field. + The number of elements in the ungriddedLBound is equal to the number of ungridded + dimensions in the field. All ungridded dimensions of the + field are also undistributed. When field dimension count is + greater than grid dimension count, both ungriddedLBound and ungriddedUBound + must be specified. When both are specified the values are checked + for consistency. Note that the the ordering of + these ungridded dimensions is the same as their order in the field. + +
+
[ungriddedUBound]
+
Upper bounds of the ungridded dimensions of the field. + The number of elements in the ungriddedUBound is equal to the number of ungridded + dimensions in the field. All ungridded dimensions of the + field are also undistributed. When field dimension count is + greater than grid dimension count, both ungriddedLBound and ungriddedUBound + must be specified. When both are specified the values are checked + for consistency. Note that the the ordering of + these ungridded dimensions is the same as their order in the field. + +
+
[totalLWidth]
+
Lower bound of halo region. The size of this array is the number + of gridded dimensions in the Field. However, ordering of the elements + needs to be the same as they appear in the field. Values default + to 0. If values for totalLWidth are specified they must be reflected in + the size of the field. That is, for each gridded dimension the + field size should be max( totalLWidth + totalUWidth + + computationalCount, exclusiveCount ). + +
+
[totalUWidth]
+
Upper bound of halo region. The size of this array is the number + of gridded dimensions in the Field. However, ordering of the elements + needs to be the same as they appear in the field. Values default + to 0. If values for totalUWidth are specified they must be reflected in + the size of the field. That is, for each gridded dimension the + field size should max( totalLWidth + totalUWidth + + computationalCount, exclusiveCount ). + +
+
[name]
+
Field name. + +
+
[vm]
+
If present, the Field object is created on the specified + ESMF_VM object. The default is to create on the VM of the + current component context. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+26.6.8 ESMF_FieldCreate - Create a Field from Geom and Fortran array +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_FieldCreate() 
+   function ESMF_FieldCreateGBData<rank><type><kind>(geom, & 
+   farray, indexflag, datacopyflag, gridToFieldMap, ungriddedLBound, & 
+   ungriddedUBound, totalLWidth, totalUWidth, name, rc)
+
RETURN VALUE: +
   type(ESMF_Field) :: ESMF_FieldCreateGBData<rank><type><kind>
+
ARGUMENTS: +
   type(ESMF_Geom) :: geom 
+   <type> (ESMF_KIND_<kind>), dimension(<rank>), target :: farray 
+   type(ESMF_Index_Flag), intent(in) :: indexflag 
+   type(ESMF_DataCopy_Flag), intent(in), optional :: datacopyflag 
+   integer, intent(in), optional :: gridToFieldMap(:) 
+   integer, intent(in), optional :: ungriddedLBound(:) 
+   integer, intent(in), optional :: ungriddedUBound(:) 
+   integer, intent(in), optional :: totalLWidth(:) 
+   integer, intent(in), optional :: totalUWidth(:) 
+   character (len=*), intent(in), optional :: name 
+   integer, intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Create an ESMF_Field from a Fortran data array and ESMF_Geom. + The Fortran data pointer inside ESMF_Field can be queried but deallocating + the retrieved data pointer is not allowed. + The arguments are: +

+
geom
+
ESMF_Geom object. The dimCount of the + Geom must be smaller than or equal to the rank of the farray. + +
+
farray
+
Native Fortran data array to be copied/referenced in the Field + The Field dimension (dimCount) will be the same as the dimCount + for the farray. + +
+
indexflag
+
Indicate how DE-local indices are defined. See section + 54.29 for a list of valid indexflag options. + +
+
[datacopyflag]
+
Whether to copy the contents of the farray or reference it directly. + For valid values see 54.13. The default is + ESMF_DATACOPY_REFERENCE. + +
+
[gridToFieldMap]
+
List with number of elements equal to the + grid's dimCount. The list elements map each dimension + of the grid to a dimension in the farray by + specifying the appropriate farray dimension index. The default is to + map all of the grid's dimensions against the lowest dimensions of + the farray in sequence, i.e. gridToFieldMap = (/1,2,3,.../). + The values of all gridToFieldMap entries must be greater than or equal + to one and smaller than or equal to the farray rank. + It is erroneous to specify the same gridToFieldMap entry + multiple times. The total ungridded dimensions in the field + are the total farray dimensions less + the total (distributed + undistributed) dimensions in + the grid. Ungridded dimensions must be in the same order they are + stored in the farray. Permutations of the order of + dimensions are handled via individual communication methods. For example, + an undistributed dimension can be remapped to a distributed dimension + as part of the ESMF_ArrayRedist() operation. + +
+
[ungriddedLBound]
+
Lower bounds of the ungridded dimensions of the field. + The number of elements in the ungriddedLBound is equal to the number of ungridded + dimensions in the field. All ungridded dimensions of the + field are also undistributed. When field dimension count is + greater than grid dimension count, both ungriddedLBound and ungriddedUBound + must be specified. When both are specified the values are checked + for consistency. Note that the the ordering of + these ungridded dimensions is the same as their order in the farray. + +
+
[ungriddedUBound]
+
Upper bounds of the ungridded dimensions of the field. + The number of elements in the ungriddedUBound is equal to the number of ungridded + dimensions in the field. All ungridded dimensions of the + field are also undistributed. When field dimension count is + greater than grid dimension count, both ungriddedLBound and ungriddedUBound + must be specified. When both are specified the values are checked + for consistency. Note that the the ordering of + these ungridded dimensions is the same as their order in the farray. + +
+
[totalLWidth]
+
Lower bound of halo region. The size of this array is the number + of gridded dimensions in the Field. However, ordering of the elements + needs to be the same as they appear in the farray. Values default + to 0. If values for totalLWidth are specified they must be reflected in + the size of the farray. That is, for each gridded dimension the + farray size should be max( totalLWidth + totalUWidth + + computationalCount, exclusiveCount ). + +
+
[totalUWidth]
+
Upper bound of halo region. The size of this array is the number + of gridded dimensions in the Field. However, ordering of the elements + needs to be the same as they appear in the farray. Values default + to 0. If values for totalUWidth are specified they must be reflected in + the size of the farray. That is, for each gridded dimension the + farray size should max( totalLWidth + totalUWidth + + computationalCount, exclusiveCount ). + +
+
[name]
+
Field name. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+26.6.9 ESMF_FieldCreate - Create a Field from Geom and Fortran array pointer +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_FieldCreate() 
+   function ESMF_FieldCreateGBDataPtr<rank><type><kind>(geom, & 
+   farrayPtr, datacopyflag, gridToFieldMap, & 
+   totalLWidth, totalUWidth, name, rc)
+
RETURN VALUE: +
   type(ESMF_Field) :: ESMF_FieldCreateGBDataPtr<rank><type><kind>
+
ARGUMENTS: +
   type(ESMF_Geom) :: geom 
+   <type> (ESMF_KIND_<kind>), dimension(<rank>), pointer :: farrayPtr 
+   type(ESMF_DataCopy_Flag), intent(in), optional :: datacopyflag 
+   integer, intent(in), optional :: gridToFieldMap(:) 
+   integer, intent(in), optional :: totalLWidth(:) 
+   integer, intent(in), optional :: totalUWidth(:) 
+   character (len=*), intent(in), optional :: name 
+   integer, intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Create an ESMF_Field from a Fortran data pointer and ESMF_Geom. + The Fortran data pointer inside ESMF_Field can be queried and deallocated when + datacopyflag is ESMF_DATACOPY_REFERENCE. Note that the ESMF_FieldDestroy call does not + deallocate the Fortran data pointer in this case. This gives user more flexibility over memory management. + +

+The arguments are: +

+
geom
+
ESMF_Geom object. The dimCount of the + Geom must be smaller than or equal to the rank of the farrayPtr. + +
+
farrayPtr
+
Native Fortran data pointer to be copied/referenced in the Field + The Field dimension (dimCount) will be the same as the dimCount + for the farrayPtr. + +
+
[datacopyflag]
+
Whether to copy the contents of the farrayPtr or reference it directly. + For valid values see 54.13. The default is + ESMF_DATACOPY_REFERENCE. + +
+
[gridToFieldMap]
+
List with number of elements equal to the + grid's dimCount. The list elements map each dimension + of the grid to a dimension in the farrayPtr by + specifying the appropriate farrayPtr dimension index. The default is to + map all of the grid's dimensions against the lowest dimensions of + the farrayPtr in sequence, i.e. gridToFieldMap = (/1,2,3,.../). + The values of all gridToFieldMap entries must be greater than or equal + to one and smaller than or equal to the farrayPtr rank. + It is erroneous to specify the same gridToFieldMap entry + multiple times. The total ungridded dimensions in the field + are the total farrayPtr dimensions less + the total (distributed + undistributed) dimensions in + the grid. Ungridded dimensions must be in the same order they are + stored in the farrayPtr. Permutations of the order of + dimensions are handled via individual communication methods. For example, + an undistributed dimension can be remapped to a distributed dimension + as part of the ESMF_ArrayRedist() operation. + +
+
[totalLWidth]
+
Lower bound of halo region. The size of this array is the number + of gridded dimensions in the Field. However, ordering of the elements + needs to be the same as they appear in the farrayPtr. Values default + to 0. If values for totalLWidth are specified they must be reflected in + the size of the farrayPtr. That is, for each gridded dimension the + farrayPtr size should be max( totalLWidth + totalUWidth + + computationalCount, exclusiveCount ). + +
+
[totalUWidth]
+
Upper bound of halo region. The size of this array is the number + of gridded dimensions in the Field. However, ordering of the elements + needs to be the same as they appear in the farrayPtr. Values default + to 0. If values for totalUWidth are specified they must be reflected in + the size of the farrayPtr. That is, for each gridded dimension the + farrayPtr size should max( totalLWidth + totalUWidth + + computationalCount, exclusiveCount ). + +
+
[name]
+
Field name. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+26.6.10 ESMF_FieldCreate - Create a Field from Grid and typekind +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_FieldCreate()
+   function ESMF_FieldCreateGridTKR(grid, typekind, &
+     indexflag, staggerloc, gridToFieldMap, ungriddedLBound, ungriddedUBound, &
+     totalLWidth, totalUWidth, pinflag, name, rc)
+
RETURN VALUE: +
     type(ESMF_Field) :: ESMF_FieldCreateGridTKR
+
ARGUMENTS: +
     type(ESMF_Grid), intent(in) :: grid
+     type(ESMF_TypeKind_Flag),intent(in) :: typekind
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     type(ESMF_Index_Flag), intent(in), optional :: indexflag
+     type(ESMF_StaggerLoc), intent(in), optional :: staggerloc
+     integer, intent(in), optional :: gridToFieldMap(:)
+     integer, intent(in), optional :: ungriddedLBound(:)
+     integer, intent(in), optional :: ungriddedUBound(:)
+     integer, intent(in), optional :: totalLWidth(:)
+     integer, intent(in), optional :: totalUWidth(:)
+     type(ESMF_Pin_Flag), intent(in), optional :: pinflag
+     character (len=*), intent(in), optional :: name
+     integer, intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    8.1.0
    +
    Added argument pinflag to provide access to DE sharing + between PETs. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Create an ESMF_Field and allocate space internally for an + ESMF_Array. Return a new ESMF_Field. For an example and + associated documentation using this method see section + 26.3.4. + +

+The arguments are: +

+
grid
+
ESMF_Grid object. + +
+
typekind
+
The typekind of the Field. See section 54.61 + for a list of valid typekind options. + +
+
[indexflag]
+
Indicate how DE-local indices are defined. By default each DE's + exclusive region is placed to start at the local index space origin, + i.e. (1, 1, ..., 1). Alternatively the DE-local index space can be + aligned with the global index space, if a global index space is well + defined by the associated Grid. See section 54.29 + for a list of valid indexflag options. The default indexflag value is the + one stored in then ESMF_Grid object. Currently it is + erroneous to specify an indexflag + different from the one stored in the ESMF_Grid object. The default + value is ESMF_INDEX_DELOCAL + +
+
[staggerloc]
+
Stagger location of data in grid cells. For valid + predefined values see section 31.2.6. + To create a custom stagger location see section + 31.3.25. The default + value is ESMF_STAGGERLOC_CENTER. + +
+
[gridToFieldMap]
+
List with number of elements equal to the + grid's dimCount. The list elements map each dimension + of the grid to a dimension in the field by + specifying the appropriate field dimension index. The default is to + map all of the grid's dimensions against the lowest dimensions of + the field in sequence, i.e. gridToFieldMap = (/1,2,3,.../). + The values of all gridToFieldMap entries must be greater than or equal + to one and smaller than or equal to the field rank. + It is erroneous to specify the same gridToFieldMap entry + multiple times. The total ungridded dimensions in the field + are the total field dimensions less + the dimensions in + the grid. Ungridded dimensions must be in the same order they are + stored in the field. + If the Field dimCount is less than the Grid dimCount then the default + gridToFieldMap will contain zeros for the rightmost entries. A zero + entry in the gridToFieldMap indicates that the particular + Grid dimension will be replicating the Field across the DEs along + this direction. + +
+
[ungriddedLBound]
+
Lower bounds of the ungridded dimensions of the field. + The number of elements in the ungriddedLBound is equal to the number of ungridded + dimensions in the field. All ungridded dimensions of the + field are also undistributed. When field dimension count is + greater than grid dimension count, both ungriddedLBound and ungriddedUBound + must be specified. When both are specified the values are checked + for consistency. Note that the the ordering of + these ungridded dimensions is the same as their order in the field. + +
+
[ungriddedUBound]
+
Upper bounds of the ungridded dimensions of the field. + The number of elements in the ungriddedUBound is equal to the number of ungridded + dimensions in the field. All ungridded dimensions of the + field are also undistributed. When field dimension count is + greater than grid dimension count, both ungriddedLBound and ungriddedUBound + must be specified. When both are specified the values are checked + for consistency. Note that the the ordering of + these ungridded dimensions is the same as their order in the field. + +
+
[totalLWidth]
+
Lower bound of halo region. The size of this array is the number + of gridded dimensions in the Field. However, ordering of the elements + needs to be the same as they appear in the field. Values default + to 0. If values for totalLWidth are specified they must be reflected in + the size of the field. That is, for each gridded dimension the + field size should be max( totalLWidth + totalUWidth + + computationalCount, exclusiveCount ). + +
+
[totalUWidth]
+
Upper bound of halo region. The size of this array is the number + of gridded dimensions in the Field. However, ordering of the elements + needs to be the same as they appear in the field. Values default + to 0. If values for totalUWidth are specified they must be reflected in + the size of the field. That is, for each gridded dimension the + field size should max( totalLWidth + totalUWidth + + computationalCount, exclusiveCount ). + +
+
[pinflag]
+
Specify which type of resource DEs are pinned to. See section + 50.2.1 for a list of valid pinning options. + The default is to pin DEs to PETs, i.e. only the PET on which a DE + was created considers the DE as local. + +
+
[name]
+
Field name. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+26.6.11 ESMF_FieldCreate - Create a Field from Grid and ArraySpec +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_FieldCreate()
+   function ESMF_FieldCreateGridArraySpec(grid, arrayspec, &
+     indexflag, staggerloc, gridToFieldMap, ungriddedLBound, &
+     ungriddedUBound, totalLWidth, totalUWidth, pinflag, name, rc)
+
RETURN VALUE: +
     type(ESMF_Field) :: ESMF_FieldCreateGridArraySpec
+
ARGUMENTS: +
     type(ESMF_Grid), intent(in) :: grid
+     type(ESMF_ArraySpec), intent(in) :: arrayspec
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     type(ESMF_Index_Flag), intent(in), optional :: indexflag
+     type(ESMF_StaggerLoc), intent(in), optional :: staggerloc
+     integer, intent(in), optional :: gridToFieldMap(:)
+     integer, intent(in), optional :: ungriddedLBound(:)
+     integer, intent(in), optional :: ungriddedUBound(:)
+     integer, intent(in), optional :: totalLWidth(:)
+     integer, intent(in), optional :: totalUWidth(:)
+     type(ESMF_Pin_Flag), intent(in), optional :: pinflag
+     character (len=*), intent(in), optional :: name
+     integer, intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    8.1.0
    +
    Added argument pinflag to provide access to DE sharing + between PETs. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Create an ESMF_Field and allocate space internally for an + ESMF_Array. Return a new ESMF_Field. For an example and + associated documentation using this method see section + 26.3.5. + +

+The arguments are: +

+
grid
+
ESMF_Grid object. + +
+
arrayspec
+
Data type and kind specification. + +
+
[indexflag]
+
Indicate how DE-local indices are defined. By default each DE's + exclusive region is placed to start at the local index space origin, + i.e. (1, 1, ..., 1). Alternatively the DE-local index space can be + aligned with the global index space, if a global index space is well + defined by the associated Grid. See section 54.29 + for a list of valid indexflag options. The default indexflag value is the + one stored in then ESMF_Grid object. Currently it is + erroneous to specify an indexflag + different from the one stored in the ESMF_Grid object.The default + value is ESMF_INDEX_DELOCAL + +
+
[staggerloc]
+
Stagger location of data in grid cells. For valid + predefined values see section 31.2.6. + To create a custom stagger location see section + 31.3.25. The default + value is ESMF_STAGGERLOC_CENTER. + +
+
[gridToFieldMap]
+
List with number of elements equal to the + grid's dimCount. The list elements map each dimension + of the grid to a dimension in the field by + specifying the appropriate field dimension index. The default is to + map all of the grid's dimensions against the lowest dimensions of + the field in sequence, i.e. gridToFieldMap = (/1,2,3,.../). + The values of all gridToFieldMap entries must be greater than or equal + to one and smaller than or equal to the field rank. + It is erroneous to specify the same gridToFieldMap entry + multiple times. The total ungridded dimensions in the field + are the total field dimensions less + the dimensions in + the grid. Ungridded dimensions must be in the same order they are + stored in the field. + If the Field dimCount is less than the Grid dimCount then the default + gridToFieldMap will contain zeros for the rightmost entries. A zero + entry in the gridToFieldMap indicates that the particular + Grid dimension will be replicating the Field across the DEs along + this direction. + +
+
[ungriddedLBound]
+
Lower bounds of the ungridded dimensions of the field. + The number of elements in the ungriddedLBound is equal to the number of ungridded + dimensions in the field. All ungridded dimensions of the + field are also undistributed. When field dimension count is + greater than grid dimension count, both ungriddedLBound and ungriddedUBound + must be specified. When both are specified the values are checked + for consistency. Note that the the ordering of + these ungridded dimensions is the same as their order in the field. + +
+
[ungriddedUBound]
+
Upper bounds of the ungridded dimensions of the field. + The number of elements in the ungriddedUBound is equal to the number of ungridded + dimensions in the field. All ungridded dimensions of the + field are also undistributed. When field dimension count is + greater than grid dimension count, both ungriddedLBound and ungriddedUBound + must be specified. When both are specified the values are checked + for consistency. Note that the the ordering of + these ungridded dimensions is the same as their order in the field. + +
+
[totalLWidth]
+
Lower bound of halo region. The size of this array is the number + of gridded dimensions in the Field. However, ordering of the elements + needs to be the same as they appear in the field. Values default + to 0. If values for totalLWidth are specified they must be reflected in + the size of the field. That is, for each gridded dimension the + field size should be max( totalLWidth + totalUWidth + + computationalCount, exclusiveCount ). + +
+
[totalUWidth]
+
Upper bound of halo region. The size of this array is the number + of gridded dimensions in the Field. However, ordering of the elements + needs to be the same as they appear in the field. Values default + to 0. If values for totalUWidth are specified they must be reflected in + the size of the field. That is, for each gridded dimension the + field size should max( totalLWidth + totalUWidth + + computationalCount, exclusiveCount ). + +
+
[pinflag]
+
Specify which type of resource DEs are pinned to. See section + 50.2.1 for a list of valid pinning options. + The default is to pin DEs to PETs, i.e. only the PET on which a DE + was created considers the DE as local. + +
+
[name]
+
Field name. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+26.6.12 ESMF_FieldCreate - Create a Field from Grid and Array +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_FieldCreate()
+   function ESMF_FieldCreateGridArray(grid, array, datacopyflag, &
+     staggerloc, gridToFieldMap, ungriddedLBound, ungriddedUBound, &
+     totalLWidth, totalUWidth, name, vm, rc)
+
RETURN VALUE: +
     type(ESMF_Field) :: ESMF_FieldCreateGridArray
+
ARGUMENTS: +
     type(ESMF_Grid), intent(in) :: grid
+     type(ESMF_Array), intent(in) :: array
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     type(ESMF_DataCopy_Flag), intent(in), optional :: datacopyflag
+     type(ESMF_StaggerLoc), intent(in), optional :: staggerloc
+     integer, intent(in), optional :: gridToFieldMap(:)
+     integer, intent(in), optional :: ungriddedLBound(:)
+     integer, intent(in), optional :: ungriddedUBound(:)
+     integer, intent(in), optional :: totalLWidth(:)
+     integer, intent(in), optional :: totalUWidth(:)
+     character (len = *), intent(in), optional :: name
+     type(ESMF_VM), intent(in), optional :: vm
+     integer, intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    8.0.0
    +
    Added argument vm to support object creation on a + different VM than that of the current context. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Create an ESMF_Field. This version of creation + assumes the data exists already and is being + passed in through an ESMF_Array. For an example and + associated documentation using this method see section + 26.3.6. + +

+The arguments are: +

+
grid
+
ESMF_Grid object. + +
+
array
+
ESMF_Array object. + +
+
[datacopyflag]
+
Indicates whether to copy the contents of the array or reference it directly. + For valid values see 54.13. The default is + ESMF_DATACOPY_REFERENCE. + +
+
[staggerloc]
+
Stagger location of data in grid cells. For valid + predefined values see section 31.2.6. + To create a custom stagger location see section + 31.3.25. The default + value is ESMF_STAGGERLOC_CENTER. + +
+
[gridToFieldMap]
+
List with number of elements equal to the + grid's dimCount. The list elements map each dimension + of the grid to a dimension in the field by + specifying the appropriate field dimension index. The default is to + map all of the grid's dimensions against the lowest dimensions of + the field in sequence, i.e. gridToFieldMap = (/1,2,3,.../). + The values of all gridToFieldMap entries must be greater than or equal + to one and smaller than or equal to the field rank. + It is erroneous to specify the same gridToFieldMap entry + multiple times. The total ungridded dimensions in the field + are the total field dimensions less + the dimensions in + the grid. Ungridded dimensions must be in the same order they are + stored in the field. + If the Field dimCount is less than the Grid dimCount then the default + gridToFieldMap will contain zeros for the rightmost entries. A zero + entry in the gridToFieldMap indicates that the particular + Grid dimension will be replicating the Field across the DEs along + this direction. + +
+
[ungriddedLBound]
+
Lower bounds of the ungridded dimensions of the field. + The number of elements in the ungriddedLBound is equal to the number of ungridded + dimensions in the field. All ungridded dimensions of the + field are also undistributed. When field dimension count is + greater than grid dimension count, both ungriddedLBound and ungriddedUBound + must be specified. When both are specified the values are checked + for consistency. Note that the the ordering of + these ungridded dimensions is the same as their order in the field. + +
+
[ungriddedUBound]
+
Upper bounds of the ungridded dimensions of the field. + The number of elements in the ungriddedUBound is equal to the number of ungridded + dimensions in the field. All ungridded dimensions of the + field are also undistributed. When field dimension count is + greater than grid dimension count, both ungriddedLBound and ungriddedUBound + must be specified. When both are specified the values are checked + for consistency. Note that the the ordering of + these ungridded dimensions is the same as their order in the field. + +
+
[totalLWidth]
+
Lower bound of halo region. The size of this array is the number + of gridded dimensions in the Field. However, ordering of the elements + needs to be the same as they appear in the field. Values default + to 0. If values for totalLWidth are specified they must be reflected in + the size of the field. That is, for each gridded dimension the + field size should be max( totalLWidth + totalUWidth + + computationalCount, exclusiveCount ). + +
+
[totalUWidth]
+
Upper bound of halo region. The size of this array is the number + of gridded dimensions in the Field. However, ordering of the elements + needs to be the same as they appear in the field. Values default + to 0. If values for totalUWidth are specified they must be reflected in + the size of the field. That is, for each gridded dimension the + field size should max( totalLWidth + totalUWidth + + computationalCount, exclusiveCount ). + +
+
[name]
+
Field name. + +
+
[vm]
+
If present, the Field object is constructed on the specified + ESMF_VM object. The default is to construct on the VM of the + current component context. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+26.6.13 ESMF_FieldCreate - Create a Field from Grid and Fortran array +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_FieldCreate() 
+   function ESMF_FieldCreateGridData<rank><type><kind>(grid, & 
+   farray, indexflag, datacopyflag, staggerloc, & 
+   gridToFieldMap, ungriddedLBound, ungriddedUBound, & 
+   totalLWidth, totalUWidth, name, rc)
+
RETURN VALUE: +
   type(ESMF_Field) :: ESMF_FieldCreateGridData<rank><type><kind>
+
ARGUMENTS: +
   type(ESMF_Grid), intent(in) :: grid 
+   <type> (ESMF_KIND_<kind>),intent(in), target :: farray(<rank>) 
+   type(ESMF_Index_Flag), intent(in) :: indexflag 
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+   type(ESMF_DataCopy_Flag), intent(in), optional :: datacopyflag 
+   type(ESMF_StaggerLoc), intent(in), optional :: staggerloc 
+   integer, intent(in), optional :: gridToFieldMap(:) 
+   integer, intent(in), optional :: ungriddedLBound(:) 
+   integer, intent(in), optional :: ungriddedUBound(:) 
+   integer, intent(in), optional :: totalLWidth(:) 
+   integer, intent(in), optional :: totalUWidth(:) 
+   character (len=*), intent(in), optional :: name 
+   integer, intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Create an ESMF_Field from a Fortran data array and ESMF_Grid. + The Fortran data pointer inside ESMF_Field can be queried but deallocating + the retrieved data pointer is not allowed. + For examples and + associated documentation regarding this method see section + 26.3.11, + 26.3.13, + 26.3.14, + 26.3.15, and + 26.3.9. + +

+The arguments are: +

+
grid
+
ESMF_Grid object. + +
+
farray
+
Native Fortran data array to be copied/referenced in the Field + The Field dimension (dimCount) will be the same as the dimCount + for the farray. + +
+
indexflag
+
Indicate how DE-local indices are defined. See section + 54.29 for a list of valid indexflag options. + Currently it is erroneous to specify an indexflag + different from the one stored in the ESMF_Grid object. + +
+
[datacopyflag]
+
Whether to copy the contents of the farray or reference it directly. + For valid values see 54.13. The default is + ESMF_DATACOPY_REFERENCE. + +
+
[staggerloc]
+
Stagger location of data in grid cells. For valid + predefined values see section 31.2.6. + To create a custom stagger location see section + 31.3.25. The default + value is ESMF_STAGGERLOC_CENTER. + +
+
[gridToFieldMap]
+
List with number of elements equal to the + grid's dimCount. The list elements map each dimension + of the grid to a dimension in the farray by + specifying the appropriate farray dimension index. The default is to + map all of the grid's dimensions against the lowest dimensions of + the farray in sequence, i.e. gridToFieldMap = (/1,2,3,.../). + The values of all gridToFieldMap entries must be greater than or equal + to one and smaller than or equal to the farray rank. + It is erroneous to specify the same gridToFieldMap entry + multiple times. The total ungridded dimensions in the field + are the total farray dimensions less + the total (distributed + undistributed) dimensions in + the grid. Ungridded dimensions must be in the same order they are + stored in the farray. Permutations of the order of + dimensions are handled via individual communication methods. For example, + an undistributed dimension can be remapped to a distributed dimension + as part of the ESMF_ArrayRedist() operation. + If the Field dimCount is less than the Grid dimCount then the default + gridToFieldMap will contain zeros for the rightmost entries. A zero + entry in the gridToFieldMap indicates that the particular + Grid dimension will be replicating the Field across the DEs along + this direction. + +
+
[ungriddedLBound]
+
Lower bounds of the ungridded dimensions of the field. + The number of elements in the ungriddedLBound is equal to the number of ungridded + dimensions in the field. All ungridded dimensions of the + field are also undistributed. When field dimension count is + greater than grid dimension count, both ungriddedLBound and ungriddedUBound + must be specified. When both are specified the values are checked + for consistency. Note that the the ordering of + these ungridded dimensions is the same as their order in the farray. + +
+
[ungriddedUBound]
+
Upper bounds of the ungridded dimensions of the field. + The number of elements in the ungriddedUBound is equal to the number of ungridded + dimensions in the field. All ungridded dimensions of the + field are also undistributed. When field dimension count is + greater than grid dimension count, both ungriddedLBound and ungriddedUBound + must be specified. When both are specified the values are checked + for consistency. Note that the the ordering of + these ungridded dimensions is the same as their order in the farray. + +
+
[totalLWidth]
+
Lower bound of halo region. The size of this array is the number + of gridded dimensions in the Field. However, ordering of the elements + needs to be the same as they appear in the farray. Values default + to 0. If values for totalLWidth are specified they must be reflected in + the size of the farray. That is, for each gridded dimension the + farray size should be max( totalLWidth + totalUWidth + + computationalCount, exclusiveCount ). + +
+
[totalUWidth]
+
Upper bound of halo region. The size of this array is the number + of gridded dimensions in the Field. However, ordering of the elements + needs to be the same as they appear in the farray. Values default + to 0. If values for totalUWidth are specified they must be reflected in + the size of the farray. That is, for each gridded dimension the + farray size should max( totalLWidth + totalUWidth + + computationalCount, exclusiveCount ). + +
+
[name]
+
Field name. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+26.6.14 ESMF_FieldCreate - Create a Field from Grid and Fortran array pointer +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_FieldCreate() 
+   function ESMF_FieldCreateGridDataPtr<rank><type><kind>(grid, & 
+   farrayPtr, datacopyflag, staggerloc, gridToFieldMap, & 
+   totalLWidth, totalUWidth, name, rc)
+
RETURN VALUE: +
   type(ESMF_Field) :: ESMF_FieldCreateGridDataPtr<rank><type><kind>
+
ARGUMENTS: +
   type(ESMF_Grid), intent(in) :: grid 
+   <type> (ESMF_KIND_<kind>), pointer :: farrayPtr(<rank>) 
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+   type(ESMF_DataCopy_Flag), intent(in), optional :: datacopyflag 
+   type(ESMF_StaggerLoc), intent(in), optional :: staggerloc 
+   integer, intent(in), optional :: gridToFieldMap(:) 
+   integer, intent(in), optional :: totalLWidth(:) 
+   integer, intent(in), optional :: totalUWidth(:) 
+   character (len=*), intent(in), optional :: name 
+   integer, intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Create an ESMF_Field from a Fortran data pointer and ESMF_Grid. + The Fortran data pointer inside ESMF_Field can be queried and deallocated when + datacopyflag is ESMF_DATACOPY_REFERENCE. Note that the ESMF_FieldDestroy call does not + deallocate the Fortran data pointer in this case. This gives user more flexibility over memory management. + +

+For examples and + associated documentation regarding this method see section + 26.3.12, + 26.3.13, + 26.3.14, + 26.3.15, and + 26.3.9. + +

+The arguments are: +

+
grid
+
ESMF_Grid object. + +
+
farrayPtr
+
Native Fortran data pointer to be copied/referenced in the Field + The Field dimension (dimCount) will be the same as the dimCount + for the farrayPtr. + +
+
[datacopyflag]
+
Whether to copy the contents of the farrayPtr or reference it directly. + For valid values see 54.13. The default is + ESMF_DATACOPY_REFERENCE. + +
+
[staggerloc]
+
Stagger location of data in grid cells. For valid + predefined values see section 31.2.6. + To create a custom stagger location see section + 31.3.25. The default + value is ESMF_STAGGERLOC_CENTER. + +
+
[gridToFieldMap]
+
List with number of elements equal to the + grid's dimCount. The list elements map each dimension + of the grid to a dimension in the farrayPtr by + specifying the appropriate farrayPtr dimension index. The default is to + map all of the grid's dimensions against the lowest dimensions of + the farrayPtr in sequence, i.e. gridToFieldMap = (/1,2,3,.../). + The values of all gridToFieldMap entries must be greater than or equal + to one and smaller than or equal to the farrayPtr rank. + It is erroneous to specify the same gridToFieldMap entry + multiple times. The total ungridded dimensions in the field + are the total farrayPtr dimensions less + the total (distributed + undistributed) dimensions in + the grid. Ungridded dimensions must be in the same order they are + stored in the farrayPtr. Permutations of the order of + dimensions are handled via individual communication methods. For example, + an undistributed dimension can be remapped to a distributed dimension + as part of the ESMF_ArrayRedist() operation. + If the Field dimCount is less than the Grid dimCount then the default + gridToFieldMap will contain zeros for the rightmost entries. A zero + entry in the gridToFieldMap indicates that the particular + Grid dimension will be replicating the Field across the DEs along + this direction. + +
+
[totalLWidth]
+
Lower bound of halo region. The size of this array is the number + of gridded dimensions in the Field. However, ordering of the elements + needs to be the same as they appear in the farrayPtr. Values default + to 0. If values for totalLWidth are specified they must be reflected in + the size of the farrayPtr. That is, for each gridded dimension the + farrayPtr size should be max( totalLWidth + totalUWidth + + computationalCount, exclusiveCount ). + +
+
[totalUWidth]
+
Upper bound of halo region. The size of this array is the number + of gridded dimensions in the Field. However, ordering of the elements + needs to be the same as they appear in the farrayPtr. Values default + to 0. If values for totalUWidth are specified they must be reflected in + the size of the farrayPtr. That is, for each gridded dimension the + farrayPtr size should max( totalLWidth + totalUWidth + + computationalCount, exclusiveCount ). + +
+
[name]
+
Field name. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+26.6.15 ESMF_FieldCreate - Create a Field from LocStream and typekind +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_FieldCreate()
+   function ESMF_FieldCreateLSTKR(locstream, typekind, &
+     gridToFieldMap, ungriddedLBound, ungriddedUBound, pinflag, name, rc)
+
RETURN VALUE: +
     type(ESMF_Field) :: ESMF_FieldCreateLSTKR
+
ARGUMENTS: +
     type(ESMF_LocStream), intent(in) :: locstream
+     type(ESMF_TypeKind_Flag),intent(in) :: typekind
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer, intent(in), optional :: gridToFieldMap(:)
+     integer, intent(in), optional :: ungriddedLBound(:)
+     integer, intent(in), optional :: ungriddedUBound(:)
+     type(ESMF_Pin_Flag), intent(in), optional :: pinflag
+     character (len=*), intent(in), optional :: name
+     integer, intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Create an ESMF_Field and allocate space internally for an + ESMF_Array. Return a new ESMF_Field. For an example and + associated documentation using this method see section + 26.3.16. + +

+The arguments are: +

+
locstream
+
ESMF_LocStream object. + +
+
typekind
+
The typekind of the Field. See section 54.61 + for a list of valid typekind options. + +
+
[gridToFieldMap]
+
List with number of elements equal to the + grid's dimCount. The list elements map each dimension + of the grid to a dimension in the field by + specifying the appropriate field dimension index. The default is to + map all of the grid's dimensions against the lowest dimensions of + the field in sequence, i.e. gridToFieldMap = (/1,2,3,.../). + The values of all gridToFieldMap entries must be greater than or equal + to one and smaller than or equal to the field rank. + It is erroneous to specify the same gridToFieldMap entry + multiple times. The total ungridded dimensions in the field + are the total field dimensions less + the dimensions in + the grid. Ungridded dimensions must be in the same order they are + stored in the field. + If the Field dimCount is less than the LocStream dimCount then the default + gridToFieldMap will contain zeros for the rightmost entries. A zero + entry in the gridToFieldMap indicates that the particular + LocStream dimension will be replicating the Field across the DEs along + this direction. + +
+
[ungriddedLBound]
+
Lower bounds of the ungridded dimensions of the field. + The number of elements in the ungriddedLBound is equal to the number of ungridded + dimensions in the field. All ungridded dimensions of the + field are also undistributed. When field dimension count is + greater than grid dimension count, both ungriddedLBound and ungriddedUBound + must be specified. When both are specified the values are checked + for consistency. Note that the the ordering of + these ungridded dimensions is the same as their order in the field. + +
+
[ungriddedUBound]
+
Upper bounds of the ungridded dimensions of the field. + The number of elements in the ungriddedUBound is equal to the number of ungridded + dimensions in the field. All ungridded dimensions of the + field are also undistributed. When field dimension count is + greater than grid dimension count, both ungriddedLBound and ungriddedUBound + must be specified. When both are specified the values are checked + for consistency. Note that the the ordering of + these ungridded dimensions is the same as their order in the field. + +
+
[pinflag]
+
Specify which type of resource DEs are pinned to. See section + 50.2.1 for a list of valid pinning options. + The default is to pin DEs to PETs, i.e. only the PET on which a DE + was created considers the DE as local. + +
+
[name]
+
Field name. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+26.6.16 ESMF_FieldCreate - Create a Field from LocStream and ArraySpec +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_FieldCreate()
+   function ESMF_FieldCreateLSArraySpec(locstream, arrayspec, &
+     gridToFieldMap, ungriddedLBound, ungriddedUBound, pinflag, name, rc)
+
RETURN VALUE: +
     type(ESMF_Field) :: ESMF_FieldCreateLSArraySpec
+
ARGUMENTS: +
     type(ESMF_LocStream), intent(in) :: locstream
+     type(ESMF_ArraySpec), intent(in) :: arrayspec
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer, intent(in), optional :: gridToFieldMap(:)
+     integer, intent(in), optional :: ungriddedLBound(:)
+     integer, intent(in), optional :: ungriddedUBound(:)
+     type(ESMF_Pin_Flag), intent(in), optional :: pinflag
+     character (len=*), intent(in), optional :: name
+     integer, intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Create an ESMF_Field and allocate space internally for an + ESMF_Array. Return a new ESMF_Field. For an example and + associated documentation using this method see section + 26.3.17. + +

+The arguments are: +

+
locstream
+
ESMF_LocStream object. + +
+
arrayspec
+
Data type and kind specification. + +
+
[gridToFieldMap]
+
List with number of elements equal to the + grid's dimCount. The list elements map each dimension + of the grid to a dimension in the field by + specifying the appropriate field dimension index. The default is to + map all of the grid's dimensions against the lowest dimensions of + the field in sequence, i.e. gridToFieldMap = (/1,2,3,.../). + The values of all gridToFieldMap entries must be greater than or equal + to one and smaller than or equal to the field rank. + It is erroneous to specify the same gridToFieldMap entry + multiple times. The total ungridded dimensions in the field + are the total field dimensions less + the dimensions in + the grid. Ungridded dimensions must be in the same order they are + stored in the field. + If the Field dimCount is less than the LocStream dimCount then the default + gridToFieldMap will contain zeros for the rightmost entries. A zero + entry in the gridToFieldMap indicates that the particular + LocStream dimension will be replicating the Field across the DEs along + this direction. + +
+
[ungriddedLBound]
+
Lower bounds of the ungridded dimensions of the field. + The number of elements in the ungriddedLBound is equal to the number of ungridded + dimensions in the field. All ungridded dimensions of the + field are also undistributed. When field dimension count is + greater than grid dimension count, both ungriddedLBound and ungriddedUBound + must be specified. When both are specified the values are checked + for consistency. Note that the the ordering of + these ungridded dimensions is the same as their order in the field. + +
+
[ungriddedUBound]
+
Upper bounds of the ungridded dimensions of the field. + The number of elements in the ungriddedUBound is equal to the number of ungridded + dimensions in the field. All ungridded dimensions of the + field are also undistributed. When field dimension count is + greater than grid dimension count, both ungriddedLBound and ungriddedUBound + must be specified. When both are specified the values are checked + for consistency. Note that the the ordering of + these ungridded dimensions is the same as their order in the field. + +
+
[pinflag]
+
Specify which type of resource DEs are pinned to. See section + 50.2.1 for a list of valid pinning options. + The default is to pin DEs to PETs, i.e. only the PET on which a DE + was created considers the DE as local. + +
+
[name]
+
Field name. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+26.6.17 ESMF_FieldCreate - Create a Field from LocStream and Array +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_FieldCreate()
+   function ESMF_FieldCreateLSArray(locstream, array, &
+     datacopyflag, gridToFieldMap, ungriddedLBound, ungriddedUBound, &
+     name, rc)
+
RETURN VALUE: +
     type(ESMF_Field) :: ESMF_FieldCreateLSArray
+
ARGUMENTS: +
     type(ESMF_LocStream), intent(in) :: locstream
+     type(ESMF_Array), intent(in) :: array
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     type(ESMF_DataCopy_Flag), intent(in), optional :: datacopyflag
+     integer, intent(in), optional :: gridToFieldMap(:)
+     integer, intent(in), optional :: ungriddedLBound(:)
+     integer, intent(in), optional :: ungriddedUBound(:)
+     character (len = *), intent(in), optional :: name
+     integer, intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Create an ESMF_Field. This version of creation + assumes the data exists already and is being + passed in through an ESMF_Array. For an example and + associated documentation using this method see section + 26.3.6. + +

+The arguments are: +

+
locstream
+
ESMF_LocStream object. + +
+
array
+
ESMF_Array object. + +
+
[datacopyflag]
+
Indicates whether to copy the contents of the array or reference it directly. + For valid values see 54.13. The default is + ESMF_DATACOPY_REFERENCE. + +
+
[gridToFieldMap]
+
List with number of elements equal to the + grid's dimCount. The list elements map each dimension + of the grid to a dimension in the field by + specifying the appropriate field dimension index. The default is to + map all of the grid's dimensions against the lowest dimensions of + the field in sequence, i.e. gridToFieldMap = (/1,2,3,.../). + The values of all gridToFieldMap entries must be greater than or equal + to one and smaller than or equal to the field rank. + It is erroneous to specify the same gridToFieldMap entry + multiple times. The total ungridded dimensions in the field + are the total field dimensions less + the dimensions in + the grid. Ungridded dimensions must be in the same order they are + stored in the field. + If the Field dimCount is less than the LocStream dimCount then the default + gridToFieldMap will contain zeros for the rightmost entries. A zero + entry in the gridToFieldMap indicates that the particular + LocStream dimension will be replicating the Field across the DEs along + this direction. + +
+
[ungriddedLBound]
+
Lower bounds of the ungridded dimensions of the field. + The number of elements in the ungriddedLBound is equal to the number of ungridded + dimensions in the field. All ungridded dimensions of the + field are also undistributed. When field dimension count is + greater than grid dimension count, both ungriddedLBound and ungriddedUBound + must be specified. When both are specified the values are checked + for consistency. Note that the the ordering of + these ungridded dimensions is the same as their order in the field. + +
+
[ungriddedUBound]
+
Upper bounds of the ungridded dimensions of the field. + The number of elements in the ungriddedUBound is equal to the number of ungridded + dimensions in the field. All ungridded dimensions of the + field are also undistributed. When field dimension count is + greater than grid dimension count, both ungriddedLBound and ungriddedUBound + must be specified. When both are specified the values are checked + for consistency. Note that the the ordering of + these ungridded dimensions is the same as their order in the field. + +
+
[name]
+
Field name. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+26.6.18 ESMF_FieldCreate - Create a Field from LocStream and Fortran array +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_FieldCreate() 
+   function ESMF_FieldCreateLSData<rank><type><kind>(locstream, farray, & 
+   indexflag, datacopyflag, gridToFieldMap, ungriddedLBound, & 
+   ungriddedUBound, name, rc)
+
RETURN VALUE: +
   type(ESMF_Field) :: ESMF_FieldCreateLSData<rank><type><kind>
+
ARGUMENTS: +
   type(ESMF_LocStream), intent(in) :: locstream 
+   <type> (ESMF_KIND_<kind>),intent(in), target :: farray(<rank>) 
+   type(ESMF_Index_Flag), intent(in) :: indexflag 
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+   type(ESMF_DataCopy_Flag), intent(in), optional :: datacopyflag 
+   integer, intent(in), optional :: gridToFieldMap(:) 
+   integer, intent(in), optional :: ungriddedLBound(:) 
+   integer, intent(in), optional :: ungriddedUBound(:) 
+   character (len=*), intent(in), optional :: name 
+   integer, intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Create an ESMF_Field from a Fortran data array and ESMF_LocStream. + The Fortran data pointer inside ESMF_Field can be queried but deallocating + the retrieved data pointer is not allowed. + +

+The arguments are: +

+
locstream
+
ESMF_LocStream object. + +
+
farray
+
Native Fortran data array to be copied/referenced in the Field + The Field dimension (dimCount) will be the same as the dimCount + for the farray. + +
+
indexflag
+
Indicate how DE-local indices are defined. See section + 54.29 for a list of valid indexflag options. + +
+
[datacopyflag]
+
Whether to copy the contents of the farray or reference directly. + For valid values see 54.13. The default is + ESMF_DATACOPY_REFERENCE. + +
+
[gridToFieldMap]
+
List with number of elements equal to the + locstream's dimCount. The list elements map each dimension + of the locstream to a dimension in the farray by + specifying the appropriate farray dimension index. The default is to + map all of the locstream's dimensions against the lowest dimensions of + the farray in sequence, i.e. gridToFieldMap = (/1,2,3,.../). + The values of all gridToFieldMap entries must be greater than or equal + to one and smaller than or equal to the farray rank. + It is erroneous to specify the same gridToFieldMap entry + multiple times. The total ungridded dimensions in the field + are the total farray dimensions less + the total (distributed + undistributed) dimensions in + the locstream. Unlocstreamded dimensions must be in the same order they are + stored in the farray. Permutations of the order of + dimensions are handled via individual communication methods. For example, + an undistributed dimension can be remapped to a distributed dimension + as part of the ESMF_ArrayRedist() operation. + If the Field dimCount is less than the LocStream dimCount then the default + gridToFieldMap will contain zeros for the rightmost entries. A zero + entry in the gridToFieldMap indicates that the particular + LocStream dimension will be replicating the Field across the DEs along + this direction. + +
+
[ungriddedLBound]
+
Lower bounds of the ungridded dimensions of the field. + The number of elements in the ungriddedLBound is equal to the number of ungridded + dimensions in the field. All ungridded dimensions of the + field are also undistributed. When field dimension count is + greater than locstream dimension count, both ungriddedLBound and ungriddedUBound + must be specified. When both are specified the values are checked + for consistency. Note that the the ordering of + these ungridded dimensions is the same as their order in the farray. + +
+
[ungriddedUBound]
+
Upper bounds of the ungridded dimensions of the field. + The number of elements in the ungriddedUBound is equal to the number of ungridded + dimensions in the field. All ungridded dimensions of the + field are also undistributed. When field dimension count is + greater than locstream dimension count, both ungriddedLBound and ungriddedUBound + must be specified. When both are specified the values are checked + for consistency. Note that the the ordering of + these ungridded dimensions is the same as their order in the farray. + +
+
[name]
+
Field name. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+26.6.19 ESMF_FieldCreate - Create a Field from LocStream and Fortran array pointer +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_FieldCreate() 
+   function ESMF_FieldCreateLSDataPtr<rank><type><kind>(locstream, & 
+   farrayPtr, datacopyflag, gridToFieldMap, & 
+   name, rc)
+
RETURN VALUE: +
   type(ESMF_Field) :: ESMF_FieldCreateLSDataPtr<rank><type><kind>
+
ARGUMENTS: +
   type(ESMF_LocStream), intent(in) :: locstream 
+   <type> (ESMF_KIND_<kind>),pointer :: farrayPtr(<rank>) 
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+   type(ESMF_DataCopy_Flag), intent(in), optional :: datacopyflag 
+   integer, intent(in), optional :: gridToFieldMap(:) 
+   character (len=*), intent(in), optional :: name 
+   integer, intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Create an ESMF_Field from a Fortran data pointer and ESMF_LocStream. + The Fortran data pointer inside ESMF_Field can be queried and deallocated when + datacopyflag is ESMF_DATACOPY_REFERENCE. Note that the ESMF_FieldDestroy call does not + deallocate the Fortran data pointer in this case. This gives user more flexibility over memory management. + +

+The arguments are: +

+
locstream
+
ESMF_LocStream object. + +
+
farrayPtr
+
Native Fortran data pointer to be copied/referenced in the Field + The Field dimension (dimCount) will be the same as the dimCount + for the farrayPtr. + +
+
[datacopyflag]
+
Whether to copy the contents of the farrayPtr or reference it directly. + For valid values see 54.13. The default is + ESMF_DATACOPY_REFERENCE. + +
+
[gridToFieldMap]
+
List with number of elements equal to the + locstream's dimCount. The list elements map each dimension + of the locstream to a dimension in the farrayPtr by + specifying the appropriate farrayPtr dimension index. The default is to + map all of the locstream's dimensions against the lowest dimensions of + the farrayPtr in sequence, i.e. gridToFieldMap = (/1,2,3,.../). + The values of all gridToFieldMap entries must be greater than or equal + to one and smaller than or equal to the farrayPtr rank. + It is erroneous to specify the same gridToFieldMap entry + multiple times. The total ungridded dimensions in the field + are the total farrayPtr dimensions less + the total (distributed + undistributed) dimensions in + the locstream. Unlocstreamded dimensions must be in the same order they are + stored in the farrayPtr. Permutations of the order of + dimensions are handled via individual communication methods. For example, + an undistributed dimension can be remapped to a distributed dimension + as part of the ESMF_ArrayRedist() operation. + If the Field dimCount is less than the LocStream dimCount then the default + gridToFieldMap will contain zeros for the rightmost entries. A zero + entry in the gridToFieldMap indicates that the particular + LocStream dimension will be replicating the Field across the DEs along + this direction. + +
+
[name]
+
Field name. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+26.6.20 ESMF_FieldCreate - Create a Field from Mesh and typekind +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_FieldCreate()
+   function ESMF_FieldCreateMeshTKR(mesh, typekind, indexflag, &
+     meshloc, gridToFieldMap, ungriddedLBound, ungriddedUBound, &
+     pinflag, name, rc)
+
RETURN VALUE: +
     type(ESMF_Field) :: ESMF_FieldCreateMeshTKR
+
ARGUMENTS: +
     type(ESMF_Mesh), intent(in) :: mesh
+     type(ESMF_TypeKind_Flag), intent(in) :: typekind
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     type(ESMF_Index_Flag), intent(in), optional :: indexflag
+     type(ESMF_MeshLoc), intent(in), optional :: meshloc
+     integer, intent(in), optional :: gridToFieldMap(:)
+     integer, intent(in), optional :: ungriddedLBound(:)
+     integer, intent(in), optional :: ungriddedUBound(:)
+     type(ESMF_Pin_Flag), intent(in), optional :: pinflag
+     character (len=*), intent(in), optional :: name
+     integer, intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Create an ESMF_Field and allocate space internally for an + ESMF_Array. Return a new ESMF_Field. For an example and + associated documentation using this method see section + 26.3.18. + +

+The arguments are: +

+
mesh
+
ESMF_Mesh object. + +
+
typekind
+
The typekind of the Field. See section 54.61 + for a list of valid typekind options. + +
+
[indexflag]
+
Indicate how DE-local indices are defined. See section + 54.29 for a list of valid indexflag options. + +
+
[meshloc]
+
The part of the Mesh on which to build the Field. For valid + predefined values see Section 54.41. + If not set, defaults to ESMF_MESHLOC_NODE. + +
+
[gridToFieldMap]
+
List with number of elements equal to the + grid's dimCount. The list elements map each dimension + of the grid to a dimension in the field by + specifying the appropriate field dimension index. The default is to + map all of the grid's dimensions against the lowest dimensions of + the field in sequence, i.e. gridToFieldMap = (/1,2,3,.../). + The values of all gridToFieldMap entries must be greater than or equal + to one and smaller than or equal to the field rank. + It is erroneous to specify the same gridToFieldMap entry + multiple times. The total ungridded dimensions in the field + are the total field dimensions less + the dimensions in + the grid. Ungridded dimensions must be in the same order they are + stored in the field. + If the Field dimCount is less than the Mesh dimCount then the default + gridToFieldMap will contain zeros for the rightmost entries. A zero + entry in the gridToFieldMap indicates that the particular + Mesh dimension will be replicating the Field across the DEs along + this direction. + +
+
[ungriddedLBound]
+
Lower bounds of the ungridded dimensions of the field. + The number of elements in the ungriddedLBound is equal to the number of ungridded + dimensions in the field. All ungridded dimensions of the + field are also undistributed. When field dimension count is + greater than grid dimension count, both ungriddedLBound and ungriddedUBound + must be specified. When both are specified the values are checked + for consistency. Note that the the ordering of + these ungridded dimensions is the same as their order in the field. + +
+
[ungriddedUBound]
+
Upper bounds of the ungridded dimensions of the field. + The number of elements in the ungriddedUBound is equal to the number of ungridded + dimensions in the field. All ungridded dimensions of the + field are also undistributed. When field dimension count is + greater than grid dimension count, both ungriddedLBound and ungriddedUBound + must be specified. When both are specified the values are checked + for consistency. Note that the the ordering of + these ungridded dimensions is the same as their order in the field. + +
+
[pinflag]
+
Specify which type of resource DEs are pinned to. See section + 50.2.1 for a list of valid pinning options. + The default is to pin DEs to PETs, i.e. only the PET on which a DE + was created considers the DE as local. + +
+
[name]
+
Field name. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+26.6.21 ESMF_FieldCreate - Create a Field from Mesh and ArraySpec +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_FieldCreate()
+   function ESMF_FieldCreateMeshArraySpec(mesh, arrayspec, &
+     indexflag, meshloc, gridToFieldMap, ungriddedLBound, ungriddedUBound, &
+     pinflag, name, rc)
+
RETURN VALUE: +
     type(ESMF_Field) :: ESMF_FieldCreateMeshArraySpec
+
ARGUMENTS: +
     type(ESMF_Mesh), intent(in) :: mesh
+     type(ESMF_ArraySpec), intent(in) :: arrayspec
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     type(ESMF_Index_Flag),intent(in), optional :: indexflag
+     type(ESMF_MeshLoc), intent(in), optional :: meshloc
+     integer, intent(in), optional :: gridToFieldMap(:)
+     integer, intent(in), optional :: ungriddedLBound(:)
+     integer, intent(in), optional :: ungriddedUBound(:)
+     type(ESMF_Pin_Flag), intent(in), optional :: pinflag
+     character (len=*), intent(in), optional :: name
+     integer, intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Create an ESMF_Field and allocate space internally for an + ESMF_Array. Return a new ESMF_Field. For an example and + associated documentation using this method see section + 26.3.19 and + 26.3.21. + +

+The arguments are: +

+
mesh
+
ESMF_Mesh object. + +
+
arrayspec
+
Data type and kind specification. + +
+
[indexflag]
+
Indicate how DE-local indices are defined. See section + 54.29 for a list of valid indexflag options. + +
+
[meshloc]
+
The part of the Mesh on which to build the Field. For valid + predefined values see Section 54.41. + If not set, defaults to ESMF_MESHLOC_NODE. + +
+
[gridToFieldMap]
+
List with number of elements equal to the + grid's dimCount. The list elements map each dimension + of the grid to a dimension in the field by + specifying the appropriate field dimension index. The default is to + map all of the grid's dimensions against the lowest dimensions of + the field in sequence, i.e. gridToFieldMap = (/1,2,3,.../). + The values of all gridToFieldMap entries must be greater than or equal + to one and smaller than or equal to the field rank. + It is erroneous to specify the same gridToFieldMap entry + multiple times. The total ungridded dimensions in the field + are the total field dimensions less + the dimensions in + the grid. Ungridded dimensions must be in the same order they are + stored in the field. + If the Field dimCount is less than the Mesh dimCount then the default + gridToFieldMap will contain zeros for the rightmost entries. A zero + entry in the gridToFieldMap indicates that the particular + Mesh dimension will be replicating the Field across the DEs along + this direction. + +
+
[ungriddedLBound]
+
Lower bounds of the ungridded dimensions of the field. + The number of elements in the ungriddedLBound is equal to the number of ungridded + dimensions in the field. All ungridded dimensions of the + field are also undistributed. When field dimension count is + greater than grid dimension count, both ungriddedLBound and ungriddedUBound + must be specified. When both are specified the values are checked + for consistency. Note that the the ordering of + these ungridded dimensions is the same as their order in the field. + +
+
[ungriddedUBound]
+
Upper bounds of the ungridded dimensions of the field. + The number of elements in the ungriddedUBound is equal to the number of ungridded + dimensions in the field. All ungridded dimensions of the + field are also undistributed. When field dimension count is + greater than grid dimension count, both ungriddedLBound and ungriddedUBound + must be specified. When both are specified the values are checked + for consistency. Note that the the ordering of + these ungridded dimensions is the same as their order in the field. + +
+
[pinflag]
+
Specify which type of resource DEs are pinned to. See section + 50.2.1 for a list of valid pinning options. + The default is to pin DEs to PETs, i.e. only the PET on which a DE + was created considers the DE as local. + +
+
[name]
+
Field name. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+26.6.22 ESMF_FieldCreate - Create a Field from Mesh and Array +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_FieldCreate()
+   function ESMF_FieldCreateMeshArray(mesh, array, &
+     datacopyflag, meshloc, &
+     gridToFieldMap, ungriddedLBound, ungriddedUBound, &
+     name, vm, rc)
+
RETURN VALUE: +
     type(ESMF_Field) :: ESMF_FieldCreateMeshArray
+
ARGUMENTS: +
     type(ESMF_Mesh), intent(in) :: mesh
+     type(ESMF_Array), intent(in) :: array
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     type(ESMF_DataCopy_Flag), intent(in), optional :: datacopyflag
+     type(ESMF_MeshLoc), intent(in), optional :: meshloc
+     integer, intent(in), optional :: gridToFieldMap(:)
+     integer, intent(in), optional :: ungriddedLBound(:)
+     integer, intent(in), optional :: ungriddedUBound(:)
+     character (len = *), intent(in), optional :: name
+     type(ESMF_VM), intent(in), optional :: vm
+     integer, intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Create an ESMF_Field. This version of creation + assumes the data exists already and is being + passed in through an ESMF_Array. For an example and + associated documentation using this method see section + 26.3.20. + +

+The arguments are: +

+
mesh
+
ESMF_Mesh object. + +
+
array
+
ESMF_Array object. + +
+
[datacopyflag]
+
Indicates whether to copy the contents of the array or reference it directly. + For valid values see 54.13. The default is + ESMF_DATACOPY_REFERENCE. + +
+
[meshloc]
+
The part of the Mesh on which to build the Field. For valid + predefined values see Section 54.41. + If not set, defaults to ESMF_MESHLOC_NODE. + +
+
[gridToFieldMap]
+
List with number of elements equal to the + grid's dimCount. The list elements map each dimension + of the grid to a dimension in the field by + specifying the appropriate field dimension index. The default is to + map all of the grid's dimensions against the lowest dimensions of + the field in sequence, i.e. gridToFieldMap = (/1,2,3,.../). + The values of all gridToFieldMap entries must be greater than or equal + to one and smaller than or equal to the field rank. + It is erroneous to specify the same gridToFieldMap entry + multiple times. The total ungridded dimensions in the field + are the total field dimensions less + the dimensions in + the grid. Ungridded dimensions must be in the same order they are + stored in the field. + If the Field dimCount is less than the Mesh dimCount then the default + gridToFieldMap will contain zeros for the rightmost entries. A zero + entry in the gridToFieldMap indicates that the particular + Mesh dimension will be replicating the Field across the DEs along + this direction. + +
+
[ungriddedLBound]
+
Lower bounds of the ungridded dimensions of the field. + The number of elements in the ungriddedLBound is equal to the number of ungridded + dimensions in the field. All ungridded dimensions of the + field are also undistributed. When field dimension count is + greater than grid dimension count, both ungriddedLBound and ungriddedUBound + must be specified. When both are specified the values are checked + for consistency. Note that the the ordering of + these ungridded dimensions is the same as their order in the field. + +
+
[ungriddedUBound]
+
Upper bounds of the ungridded dimensions of the field. + The number of elements in the ungriddedUBound is equal to the number of ungridded + dimensions in the field. All ungridded dimensions of the + field are also undistributed. When field dimension count is + greater than grid dimension count, both ungriddedLBound and ungriddedUBound + must be specified. When both are specified the values are checked + for consistency. Note that the the ordering of + these ungridded dimensions is the same as their order in the field. + +
+
[name]
+
Field name. + +
+
[vm]
+
If present, the Field object is constructed on the specified + ESMF_VM object. The default is to construct on the VM of the + current component context. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+26.6.23 ESMF_FieldCreate - Create a Field from Mesh and Fortran array +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_FieldCreate() 
+   function ESMF_FieldCreateMeshData<rank><type><kind>(mesh, & 
+   farray, indexflag, datacopyflag, meshloc, & 
+   gridToFieldMap, ungriddedLBound, ungriddedUBound, name, rc)
+
RETURN VALUE: +
   type(ESMF_Field) :: ESMF_FieldCreateMeshData<rank><type><kind>
+
ARGUMENTS: +
   type(ESMF_Mesh), intent(in) :: mesh 
+   <type> (ESMF_KIND_<kind>),intent(in), target :: farray(<rank>) 
+   type(ESMF_Index_Flag), intent(in) :: indexflag 
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+   type(ESMF_DataCopy_Flag), intent(in), optional :: datacopyflag 
+   type(ESMF_MeshLoc), intent(in), optional :: meshloc 
+   integer, intent(in), optional :: gridToFieldMap(:) 
+   integer, intent(in), optional :: ungriddedLBound(:) 
+   integer, intent(in), optional :: ungriddedUBound(:) 
+   character (len=*), intent(in), optional :: name 
+   integer, intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Create an ESMF_Field from a Fortran data array and ESMF_Mesh. + The Fortran data pointer inside ESMF_Field can be queried but deallocating + the retrieved data pointer is not allowed. + +

+The arguments are: +

+
mesh
+
ESMF_Mesh object. + +
+
farray
+
Native Fortran data array to be copied/referenced in the Field + The Field dimension (dimCount) will be the same as the dimCount + for the farray. + +
+
indexflag
+
Indicate how DE-local indices are defined. See section + 54.29 for a list of valid indexflag options. + +
+
[datacopyflag]
+
Whether to copy the contents of the farray or reference it directly. + For valid values see 54.13. The default is + ESMF_DATACOPY_REFERENCE. + +
+
[meshloc]
+
The part of the Mesh on which to build the Field. For valid + predefined values see Section 54.41. + If not set, defaults to ESMF_MESHLOC_NODE. + +
+
[gridToFieldMap]
+
List with number of elements equal to the + mesh's dimCount. The list elements map each dimension + of the mesh to a dimension in the farray by + specifying the appropriate farray dimension index. The default is to + map all of the mesh's dimensions against the lowest dimensions of + the farray in sequence, i.e. gridToFieldMap = (/1,2,3,.../). + The values of all gridToFieldMap entries must be greater than or equal + to one and smaller than or equal to the farray rank. + It is erroneous to specify the same gridToFieldMap entry + multiple times. The total ungridded dimensions in the field + are the total farray dimensions less + the total (distributed + undistributed) dimensions in + the mesh. Unmeshded dimensions must be in the same order they are + stored in the farray. Permutations of the order of + dimensions are handled via individual communication methods. For example, + an undistributed dimension can be remapped to a distributed dimension + as part of the ESMF_ArrayRedist() operation. + If the Field dimCount is less than the Mesh dimCount then the default + gridToFieldMap will contain zeros for the rightmost entries. A zero + entry in the gridToFieldMap indicates that the particular + Mesh dimension will be replicating the Field across the DEs along + this direction. + +
+
[ungriddedLBound]
+
Lower bounds of the ungridded dimensions of the field. + The number of elements in the ungriddedLBound is equal to the number of ungridded + dimensions in the field. All ungridded dimensions of the + field are also undistributed. When field dimension count is + greater than mesh dimension count, both ungriddedLBound and ungriddedUBound + must be specified. When both are specified the values are checked + for consistency. Note that the the ordering of + these ungridded dimensions is the same as their order in the farray. + +
+
[ungriddedUBound]
+
Upper bounds of the ungridded dimensions of the field. + The number of elements in the ungriddedUBound is equal to the number of ungridded + dimensions in the field. All ungridded dimensions of the + field are also undistributed. When field dimension count is + greater than mesh dimension count, both ungriddedLBound and ungriddedUBound + must be specified. When both are specified the values are checked + for consistency. Note that the the ordering of + these ungridded dimensions is the same as their order in the farray. + +
+
[name]
+
Field name. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+26.6.24 ESMF_FieldCreate - Create a Field from Mesh and Fortran array pointer +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_FieldCreate() 
+   function ESMF_FieldCreateMeshDataPtr<rank><type><kind>(mesh, & 
+   farrayPtr, datacopyflag, meshloc, gridToFieldMap, & 
+   name, rc)
+
RETURN VALUE: +
   type(ESMF_Field) :: ESMF_FieldCreateMeshDataPtr<rank><type><kind>
+
ARGUMENTS: +
   type(ESMF_Mesh), intent(in) :: mesh 
+   <type> (ESMF_KIND_<kind>),pointer :: farrayPtr(<rank>) 
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+   type(ESMF_DataCopy_Flag), intent(in), optional :: datacopyflag 
+   type(ESMF_MeshLoc), intent(in), optional :: meshloc 
+   integer, intent(in), optional :: gridToFieldMap(:) 
+   character (len=*), intent(in), optional :: name 
+   integer, intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Create an ESMF_Field from a Fortran data pointer and ESMF_Mesh. + The Fortran data pointer inside ESMF_Field can be queried and deallocated when + datacopyflag is ESMF_DATACOPY_REFERENCE. Note that the ESMF_FieldDestroy call does not + deallocate the Fortran data pointer in this case. This gives user more flexibility over memory management. + +

+The arguments are: +

+
mesh
+
ESMF_Mesh object. + +
+
farrayPtr
+
Native Fortran data pointer to be copied/referenced in the Field + The Field dimension (dimCount) will be the same as the dimCount + for the farrayPtr. + +
+
[datacopyflag]
+
Whether to copy the contents of the farrayPtr or reference it directly. + For valid values see 54.13. The default is + ESMF_DATACOPY_REFERENCE. + +
+
[meshloc]
+
The part of the Mesh on which to build the Field. For valid + predefined values see Section 54.41. + If not set, defaults to ESMF_MESHLOC_NODE. + +
+
[gridToFieldMap]
+
List with number of elements equal to the + mesh's dimCount. The list elements map each dimension + of the mesh to a dimension in the farrayPtr by + specifying the appropriate farrayPtr dimension index. The default is to + map all of the mesh's dimensions against the lowest dimensions of + the farrayPtr in sequence, i.e. gridToFieldMap = (/1,2,3,.../). + The values of all gridToFieldMap entries must be greater than or equal + to one and smaller than or equal to the farrayPtr rank. + It is erroneous to specify the same gridToFieldMap entry + multiple times. The total ungridded dimensions in the field + are the total farrayPtr dimensions less + the total (distributed + undistributed) dimensions in + the mesh. Unmeshded dimensions must be in the same order they are + stored in the farrayPtr. Permutations of the order of + dimensions are handled via individual communication methods. For example, + an undistributed dimension can be remapped to a distributed dimension + as part of the ESMF_ArrayRedist() operation. + If the Field dimCount is less than the Mesh dimCount then the default + gridToFieldMap will contain zeros for the rightmost entries. A zero + entry in the gridToFieldMap indicates that the particular + Mesh dimension will be replicating the Field across the DEs along + this direction. + +
+
[name]
+
Field name. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+26.6.25 ESMF_FieldCreate - Create a Field from XGrid and typekind +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_FieldCreate()
+   function ESMF_FieldCreateXGTKR(xgrid, typekind, xgridside, &
+     gridindex, gridToFieldMap, ungriddedLBound, ungriddedUBound, &
+     pinflag, name, rc)
+
RETURN VALUE: +
     type(ESMF_Field) :: ESMF_FieldCreateXGTKR
+
ARGUMENTS: +
     type(ESMF_XGrid), intent(in) :: xgrid
+     type(ESMF_TypeKind_Flag), intent(in) :: typekind
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     type(ESMF_XGridSide_Flag), intent(in), optional :: xgridside
+     integer, intent(in), optional :: gridindex
+     integer, intent(in), optional :: gridToFieldMap(:)
+     integer, intent(in), optional :: ungriddedLBound(:)
+     integer, intent(in), optional :: ungriddedUBound(:)
+     type(ESMF_Pin_Flag), intent(in), optional :: pinflag
+     character (len=*), intent(in), optional :: name
+     integer, intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Create an ESMF_Field and allocate space internally for an + ESMF_Array. Return a new ESMF_Field. For an example and + associated documentation using this method see section + 26.3.16. + +

+The arguments are: +

+
xgrid
+
ESMF_XGrid object. + +
+
typekind
+
The typekind of the Field. See section 54.61 + for a list of valid typekind options. + +
+
[xgridside]
+
Which side of the XGrid to create the Field on (either ESMF_XGRIDSIDE_A, + ESMF_XGRIDSIDE_B, or ESMF_XGRIDSIDE_BALANCED). If not passed in then + defaults to ESMF_XGRIDSIDE_BALANCED. + +
+
[gridindex]
+
If xgridSide is ESMF_XGRIDSIDE_A or ESMF_XGRIDSIDE_B then this index tells which Grid on + that side to create the Field on. If not provided, defaults to 1. + +
+
[gridToFieldMap]
+
List with number of elements equal to the + grid's dimCount. The list elements map each dimension + of the grid to a dimension in the field by + specifying the appropriate field dimension index. The default is to + map all of the grid's dimensions against the lowest dimensions of + the field in sequence, i.e. gridToFieldMap = (/1,2,3,.../). + The values of all gridToFieldMap entries must be greater than or equal + to one and smaller than or equal to the field rank. + It is erroneous to specify the same gridToFieldMap entry + multiple times. The total ungridded dimensions in the field + are the total field dimensions less + the dimensions in + the grid. Ungridded dimensions must be in the same order they are + stored in the field. + If the Field dimCount is less than the XGrid dimCount then the default + gridToFieldMap will contain zeros for the rightmost entries. A zero + entry in the gridToFieldMap indicates that the particular + XGrid dimension will be replicating the Field across the DEs along + this direction. + +
+
[ungriddedLBound]
+
Lower bounds of the ungridded dimensions of the field. + The number of elements in the ungriddedLBound is equal to the number of ungridded + dimensions in the field. All ungridded dimensions of the + field are also undistributed. When field dimension count is + greater than grid dimension count, both ungriddedLBound and ungriddedUBound + must be specified. When both are specified the values are checked + for consistency. Note that the the ordering of + these ungridded dimensions is the same as their order in the field. + +
+
[ungriddedUBound]
+
Upper bounds of the ungridded dimensions of the field. + The number of elements in the ungriddedUBound is equal to the number of ungridded + dimensions in the field. All ungridded dimensions of the + field are also undistributed. When field dimension count is + greater than grid dimension count, both ungriddedLBound and ungriddedUBound + must be specified. When both are specified the values are checked + for consistency. Note that the the ordering of + these ungridded dimensions is the same as their order in the field. + +
+
[pinflag]
+
Specify which type of resource DEs are pinned to. See section + 50.2.1 for a list of valid pinning options. + The default is to pin DEs to PETs, i.e. only the PET on which a DE + was created considers the DE as local. + +
+
[name]
+
Field name. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+26.6.26 ESMF_FieldCreate - Create a Field from XGrid and ArraySpec +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_FieldCreate()
+   function ESMF_FieldCreateXGArraySpec(xgrid, arrayspec, &
+     xgridside, gridindex, gridToFieldMap, ungriddedLBound, ungriddedUBound, &
+     pinflag, name, rc)
+
RETURN VALUE: +
     type(ESMF_Field) :: ESMF_FieldCreateXGArraySpec
+
ARGUMENTS: +
     type(ESMF_XGrid), intent(in) :: xgrid
+     type(ESMF_ArraySpec), intent(in) :: arrayspec
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     type(ESMF_XGridSide_Flag), intent(in), optional :: xgridSide
+     integer, intent(in), optional :: gridIndex
+     integer, intent(in), optional :: gridToFieldMap(:)
+     integer, intent(in), optional :: ungriddedLBound(:)
+     integer, intent(in), optional :: ungriddedUBound(:)
+     type(ESMF_Pin_Flag), intent(in), optional :: pinflag
+     character (len=*), intent(in), optional :: name
+     integer, intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Create an ESMF_Field and allocate space internally for an + ESMF_Array. Return a new ESMF_Field. For an example and + associated documentation using this method see section + 26.3.17. + +

+The arguments are: +

+
xgrid
+
ESMF_XGrid object. + +
+
arrayspec
+
Data type and kind specification. + +
+
[xgridside]
+
Which side of the XGrid to create the Field on (either ESMF_XGRIDSIDE_A, + ESMF_XGRIDSIDE_B, or ESMF_XGRIDSIDE_BALANCED). If not passed in then + defaults to ESMF_XGRIDSIDE_BALANCED. + +
+
[gridindex]
+
If xgridside is ESMF_XGRIDSIDE_A or ESMF_XGRIDSIDE_B then this index tells which Grid on + that side to create the Field on. If not provided, defaults to 1. + +
+
[gridToFieldMap]
+
List with number of elements equal to the + grid's dimCount. The list elements map each dimension + of the grid to a dimension in the field by + specifying the appropriate field dimension index. The default is to + map all of the grid's dimensions against the lowest dimensions of + the field in sequence, i.e. gridToFieldMap = (/1,2,3,.../). + The values of all gridToFieldMap entries must be greater than or equal + to one and smaller than or equal to the field rank. + It is erroneous to specify the same gridToFieldMap entry + multiple times. The total ungridded dimensions in the field + are the total field dimensions less + the dimensions in + the grid. Ungridded dimensions must be in the same order they are + stored in the field. + If the Field dimCount is less than the XGrid dimCount then the default + gridToFieldMap will contain zeros for the rightmost entries. A zero + entry in the gridToFieldMap indicates that the particular + XGrid dimension will be replicating the Field across the DEs along + this direction. + +
+
[ungriddedLBound]
+
Lower bounds of the ungridded dimensions of the field. + The number of elements in the ungriddedLBound is equal to the number of ungridded + dimensions in the field. All ungridded dimensions of the + field are also undistributed. When field dimension count is + greater than grid dimension count, both ungriddedLBound and ungriddedUBound + must be specified. When both are specified the values are checked + for consistency. Note that the the ordering of + these ungridded dimensions is the same as their order in the field. + +
+
[ungriddedUBound]
+
Upper bounds of the ungridded dimensions of the field. + The number of elements in the ungriddedUBound is equal to the number of ungridded + dimensions in the field. All ungridded dimensions of the + field are also undistributed. When field dimension count is + greater than grid dimension count, both ungriddedLBound and ungriddedUBound + must be specified. When both are specified the values are checked + for consistency. Note that the the ordering of + these ungridded dimensions is the same as their order in the field. + +
+
[pinflag]
+
Specify which type of resource DEs are pinned to. See section + 50.2.1 for a list of valid pinning options. + The default is to pin DEs to PETs, i.e. only the PET on which a DE + was created considers the DE as local. + +
+
[name]
+
Field name. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+26.6.27 ESMF_FieldCreate - Create a Field from XGrid and Array +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_FieldCreate()
+   function ESMF_FieldCreateXGArray(xgrid, array, &
+     datacopyflag, xgridside, gridindex, &
+     gridToFieldMap, ungriddedLBound, ungriddedUBound, &
+     name, rc)
+
RETURN VALUE: +
     type(ESMF_Field) :: ESMF_FieldCreateXGArray
+
ARGUMENTS: +
     type(ESMF_XGrid), intent(in) :: xgrid
+     type(ESMF_Array), intent(in) :: array
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     type(ESMF_DataCopy_Flag), intent(in), optional :: datacopyflag
+     type(ESMF_XGridSide_Flag), intent(in), optional :: xgridside
+     integer, intent(in), optional :: gridindex
+     integer, intent(in), optional :: gridToFieldMap(:)
+     integer, intent(in), optional :: ungriddedLBound(:)
+     integer, intent(in), optional :: ungriddedUBound(:)
+     character (len = *), intent(in), optional :: name
+     integer, intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Create an ESMF_Field. This version of creation + assumes the data exists already and is being + passed in through an ESMF_Array. For an example and + associated documentation using this method see section + 26.3.6. + +

+The arguments are: +

+
xgrid
+
ESMF_XGrid object. + +
+
array
+
ESMF_Array object. + +
+
[datacopyflag]
+
Indicates whether to copy the contents of the array or reference it directly. + For valid values see 54.13. The default is + ESMF_DATACOPY_REFERENCE. + +
+
[xgridside]
+
Which side of the XGrid to create the Field on (either ESMF_XGRIDSIDE_A, + ESMF_XGRIDSIDE_B, or ESMF_XGRIDSIDE_BALANCED). If not passed in then + defaults to ESMF_XGRIDSIDE_BALANCED. + +
+
[gridindex]
+
If xgridSide is ESMF_XGRIDSIDE_A or ESMF_XGRIDSIDE_B then this index tells which Grid on + that side to create the Field on. If not provided, defaults to 1. + +
+
[gridToFieldMap]
+
List with number of elements equal to the + grid's dimCount. The list elements map each dimension + of the grid to a dimension in the field by + specifying the appropriate field dimension index. The default is to + map all of the grid's dimensions against the lowest dimensions of + the field in sequence, i.e. gridToFieldMap = (/1,2,3,.../). + The values of all gridToFieldMap entries must be greater than or equal + to one and smaller than or equal to the field rank. + It is erroneous to specify the same gridToFieldMap entry + multiple times. The total ungridded dimensions in the field + are the total field dimensions less + the dimensions in + the grid. Ungridded dimensions must be in the same order they are + stored in the field. + If the Field dimCount is less than the XGrid dimCount then the default + gridToFieldMap will contain zeros for the rightmost entries. A zero + entry in the gridToFieldMap indicates that the particular + XGrid dimension will be replicating the Field across the DEs along + this direction. + +
+
[ungriddedLBound]
+
Lower bounds of the ungridded dimensions of the field. + The number of elements in the ungriddedLBound is equal to the number of ungridded + dimensions in the field. All ungridded dimensions of the + field are also undistributed. When field dimension count is + greater than grid dimension count, both ungriddedLBound and ungriddedUBound + must be specified. When both are specified the values are checked + for consistency. Note that the the ordering of + these ungridded dimensions is the same as their order in the field. + +
+
[ungriddedUBound]
+
Upper bounds of the ungridded dimensions of the field. + The number of elements in the ungriddedUBound is equal to the number of ungridded + dimensions in the field. All ungridded dimensions of the + field are also undistributed. When field dimension count is + greater than grid dimension count, both ungriddedLBound and ungriddedUBound + must be specified. When both are specified the values are checked + for consistency. Note that the the ordering of + these ungridded dimensions is the same as their order in the field. + +
+
[name]
+
Field name. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+26.6.28 ESMF_FieldCreate - Create a Field from XGrid and Fortran array +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_FieldCreate() 
+   function ESMF_FieldCreateXGData<rank><type><kind>(xgrid, & 
+   farray, indexflag, datacopyflag, xgridside, gridindex, & 
+   gridToFieldMap, ungriddedLBound, ungriddedUBound, name,& 
+   rc)
+
RETURN VALUE: +
   type(ESMF_Field) :: ESMF_FieldCreateXGData<rank><type><kind>
+
ARGUMENTS: +
   type(ESMF_XGrid), intent(in) :: xgrid 
+   <type> (ESMF_KIND_<kind>), intent(in), target :: farray(<rank>) 
+   type(ESMF_Index_Flag), intent(in) :: indexflag 
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+   type(ESMF_DataCopy_Flag), intent(in), optional :: datacopyflag 
+   type(ESMF_XGridSide_Flag), intent(in), optional :: xgridside 
+   integer, intent(in), optional :: gridindex 
+   integer, intent(in), optional :: gridToFieldMap(:) 
+   integer, intent(in), optional :: ungriddedLBound(:) 
+   integer, intent(in), optional :: ungriddedUBound(:) 
+   character (len=*), intent(in), optional :: name 
+   integer, intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Create an ESMF_Field from a Fortran data array and ESMF_Xgrid. + The Fortran data pointer inside ESMF_Field can be queried but deallocating + the retrieved data pointer is not allowed. + +

+The arguments are: +

+
xgrid
+
ESMF_XGrid object. + +
+
farray
+
Native Fortran data array to be copied/referenced in the Field + The Field dimension (dimCount) will be the same as the dimCount + for the farray. + +
+
indexflag
+
Indicate how DE-local indices are defined. See section + 54.29 for a list of valid indexflag options. + +
+
[datacopyflag]
+
Whether to copy the contents of the farray or reference directly. + For valid values see 54.13. The default is + ESMF_DATACOPY_REFERENCE. + +
+
[xgridside]
+
Which side of the XGrid to create the Field on (either ESMF_XGRIDSIDE_A, + ESMF_XGRIDSIDE_B, or ESMF_XGRIDSIDE_BALANCED). If not passed in then + defaults to ESMF_XGRIDSIDE_BALANCED. + +
+
[gridindex]
+
If xgridside is ESMF_XGRIDSIDE_A or ESMF_XGRIDSIDE_B then this index tells which Grid on + that side to create the Field on. If not provided, defaults to 1. + +
+
[gridToFieldMap]
+
List with number of elements equal to the + xgrid's dimCount. The list elements map each dimension + of the xgrid to a dimension in the farray by + specifying the appropriate farray dimension index. The default is to + map all of the xgrid's dimensions against the lowest dimensions of + the farray in sequence, i.e. gridToFieldMap = (/1,2,3,.../). + The values of all gridToFieldMap entries must be greater than or equal + to one and smaller than or equal to the farray rank. + It is erroneous to specify the same gridToFieldMap entry + multiple times. The total ungridded dimensions in the field + are the total farray dimensions less + the total (distributed + undistributed) dimensions in + the xgrid. Unxgridded dimensions must be in the same order they are + stored in the farray. Permutations of the order of + dimensions are handled via individual communication methods. For example, + an undistributed dimension can be remapped to a distributed dimension + as part of the ESMF_ArrayRedist() operation. + If the Field dimCount is less than the Xgrid dimCount then the default + gridToFieldMap will contain zeros for the rightmost entries. A zero + entry in the gridToFieldMap indicates that the particular + Xgrid dimension will be replicating the Field across the DEs along + this direction. + +
+
[ungriddedLBound]
+
Lower bounds of the ungridded dimensions of the field. + The number of elements in the ungriddedLBound is equal to the number of ungridded + dimensions in the field. All ungridded dimensions of the + field are also undistributed. When field dimension count is + greater than xgrid dimension count, both ungriddedLBound and ungriddedUBound + must be specified. When both are specified the values are checked + for consistency. Note that the the ordering of + these ungridded dimensions is the same as their order in the farray. + +
+
[ungriddedUBound]
+
Upper bounds of the ungridded dimensions of the field. + The number of elements in the ungriddedUBound is equal to the number of ungridded + dimensions in the field. All ungridded dimensions of the + field are also undistributed. When field dimension count is + greater than xgrid dimension count, both ungriddedLBound and ungriddedUBound + must be specified. When both are specified the values are checked + for consistency. Note that the the ordering of + these ungridded dimensions is the same as their order in the farray. + +
+
[name]
+
Field name. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+26.6.29 ESMF_FieldCreate - Create a Field from XGrid and Fortran array pointer +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_FieldCreate() 
+   function ESMF_FieldCreateXGDataPtr<rank><type><kind>(xgrid, farrayPtr, & 
+   datacopyflag, xgridside, & 
+   gridindex, gridToFieldMap, name, rc)
+
RETURN VALUE: +
   type(ESMF_Field) :: ESMF_FieldCreateXGDataPtr<rank><type><kind>
+
ARGUMENTS: +
   type(ESMF_XGrid), intent(in) :: xgrid 
+   <type> (ESMF_KIND_<kind>), pointer :: farrayPtr(<rank>) 
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+   type(ESMF_DataCopy_Flag), intent(in), optional :: datacopyflag 
+   type(ESMF_XGridSide_Flag), intent(in), optional :: xgridside 
+   integer, intent(in), optional :: gridindex 
+   integer, intent(in), optional :: gridToFieldMap(:) 
+   character (len=*), intent(in), optional :: name 
+   integer, intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Create an ESMF_Field from a Fortran data pointer and ESMF_Xgrid. + The Fortran data pointer inside ESMF_Field can be queried and deallocated when + datacopyflag is ESMF_DATACOPY_REFERENCE. Note that the ESMF_FieldDestroy call does not + deallocate the Fortran data pointer in this case. This gives user more flexibility over memory management. + +

+The arguments are: +

+
xgrid
+
ESMF_XGrid object. + +
+
farrayPtr
+
Native Fortran data pointer to be copied/referenced in the Field + The Field dimension (dimCount) will be the same as the dimCount + for the farrayPtr. + +
+
[datacopyflag]
+
Whether to copy the contents of the farrayPtr or reference it directly. + For valid values see 54.13. The default is + ESMF_DATACOPY_REFERENCE. + +
+
[xgridside]
+
Which side of the XGrid to create the Field on (either ESMF_XGRIDSIDE_A, + ESMF_XGRIDSIDE_B, or ESMF_XGRIDSIDE_BALANCED). If not passed in then + defaults to ESMF_XGRIDSIDE_BALANCED. + +
+
[gridindex]
+
If xgridside is ESMF_XGRIDSIDE_A or ESMF_XGRIDSIDE_B then this index tells which Grid on + that side to create the Field on. If not provided, defaults to 1. + +
+
[gridToFieldMap]
+
List with number of elements equal to the + xgrid's dimCount. The list elements map each dimension + of the xgrid to a dimension in the farrayPtr by + specifying the appropriate farrayPtr dimension index. The default is to + map all of the xgrid's dimensions against the lowest dimensions of + the farrayPtr in sequence, i.e. gridToFieldMap = (/1,2,3,.../). + The values of all gridToFieldMap entries must be greater than or equal + to one and smaller than or equal to the farrayPtr rank. + It is erroneous to specify the same gridToFieldMap entry + multiple times. The total ungridded dimensions in the field + are the total farrayPtr dimensions less + the total (distributed + undistributed) dimensions in + the xgrid. Unxgridded dimensions must be in the same order they are + stored in the farrayPtr. Permutations of the order of + dimensions are handled via individual communication methods. For example, + an undistributed dimension can be remapped to a distributed dimension + as part of the ESMF_ArrayRedist() operation. + If the Field dimCount is less than the Xgrid dimCount then the default + gridToFieldMap will contain zeros for the rightmost entries. A zero + entry in the gridToFieldMap indicates that the particular + Xgrid dimension will be replicating the Field across the DEs along + this direction. + +
+
[name]
+
Field name. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+26.6.30 ESMF_FieldCreate - Create Field object from an existing Field object +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_FieldCreate()
+   function ESMF_FieldCreateFromField(field, datacopyflag, &
+     trailingUngridSlice, name, rc)
+
RETURN VALUE: +
     type(ESMF_Field) :: ESMF_FieldCreateFromField
+
ARGUMENTS: +
        type(ESMF_Field), intent(in) :: field
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+        type(ESMF_DataCopy_Flag), intent(in), optional :: datacopyflag
+        integer, intent(in), optional :: trailingUngridSlice(:)
+        character (len=*), intent(in), optional :: name
+        integer, intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Create an ESMF_Field object from an existing Field. + +

+The return value is the newly created ESMF_Field object. Supports array + slicing. + +

+The arguments are: +

+
field
+
ESMF_Field object to be used as originator. + +
+
[datacopyflag]
+
Specifies whether the created Field object references the memory + allocation provided by field directly or copies the data from + field into a new memory allocation. For valid values see + 54.13. The default is ESMF_DATACOPY_VALUE. + +
+
[trailingUngridSlice]
+
If present, the returned Field refers to a slice of field + created by removing some or all of the trailing (i.e. rightmost) + ungridded dimensions from the incoming Field object. + The number of trailing dimensions removed is equal to the size $n$ + of trailingUngridSlice, which must be less than or equal to the + total number of trailing ungridded dimensions in field. + The trailingUngridSlice argument is interpreted + as an index tuple for the $n$ trailing ungridded + dimensions in field in order, and the Field slice at that + location is returned. + +
+
[name]
+
Name of the Field object. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+26.6.31 ESMF_FieldDestroy - Release resources associated with a Field +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_FieldDestroy(field, noGarbage, rc)
+
ARGUMENTS: +
     type(ESMF_Field), intent(inout) :: field
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     logical, intent(in), optional :: noGarbage
+     integer, intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    7.0.0
    +
    Added argument noGarbage. + The argument provides a mechanism to override the default garbage collection + mechanism when destroying an ESMF object. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Destroys the ESMF_Field, releasing the resources associated with + the object. + +

+If an ESMF_Grid is associated with field, it will not be + released. + +

+By default a small remnant of the object is kept in memory in order to + prevent problems with dangling aliases. The default garbage collection + mechanism can be overridden with the noGarbage argument. + +

+The arguments are: +

+
field
+
ESMF_Field object. + +
+
[noGarbage]
+
If set to .TRUE. the object will be fully destroyed and removed + from the ESMF garbage collection system. Note however that under this + condition ESMF cannot protect against accessing the destroyed object + through dangling aliases - a situation which may lead to hard to debug + application crashes. + +

+It is generally recommended to leave the noGarbage argument + set to .FALSE. (the default), and to take advantage of the ESMF + garbage collection system which will prevent problems with dangling + aliases or incorrect sequences of destroy calls. However this level of + support requires that a small remnant of the object is kept in memory + past the destroy call. This can lead to an unexpected increase in memory + consumption over the course of execution in applications that use + temporary ESMF objects. For situations where the repeated creation and + destruction of temporary objects leads to memory issues, it is + recommended to call with noGarbage set to .TRUE., fully + removing the entire temporary object from memory. + +

+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ + +

+ +

+ +

+ +

+26.6.32 ESMF_FieldEmptyComplete - Complete a Field from arrayspec +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_FieldEmptyComplete()
+ subroutine ESMF_FieldEmptyCompAS(field, arrayspec, indexflag, &
+  gridToFieldMap, ungriddedLBound, ungriddedUBound, totalLWidth, totalUWidth, &
+  pinflag, rc)
+
ARGUMENTS: +
  type(ESMF_Field), intent(inout) :: field
+  type(ESMF_ArraySpec), intent(in) :: arrayspec
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+  type(ESMF_Index_Flag), intent(in), optional :: indexflag
+  integer, intent(in), optional :: gridToFieldMap(:)
+  integer, intent(in), optional :: ungriddedLBound(:)
+  integer, intent(in), optional :: ungriddedUBound(:)
+  integer, intent(in), optional :: totalLWidth(:)
+  integer, intent(in), optional :: totalUWidth(:)
+  type(ESMF_Pin_Flag), intent(in), optional :: pinflag
+  integer, intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    8.1.0
    +
    Added argument pinflag to provide access to DE sharing + between PETs. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Complete an ESMF_Field and allocate space internally for an + ESMF_Array based on arrayspec. + The input ESMF_Field must have a status of + ESMF_FIELDSTATUS_GRIDSET. After this call the completed ESMF_Field + has a status of ESMF_FIELDSTATUS_COMPLETE. + +

+The arguments are: +

+
field
+
The input ESMF_Field with a status of + ESMF_FIELDSTATUS_GRIDSET. + +
+
arrayspec
+
Data type and kind specification. + +
+
[indexflag]
+
Indicate how DE-local indices are defined. By default each DE's + exclusive region is placed to start at the local index space origin, + i.e. (1, 1, ..., 1). Alternatively the DE-local index space can be + aligned with the global index space, if a global index space is well + defined by the associated Grid. See section 54.29 + for a list of valid indexflag options. + +
+
[gridToFieldMap]
+
List with number of elements equal to the + grid's dimCount. The list elements map each dimension + of the grid to a dimension in the field by + specifying the appropriate field dimension index. The default is to + map all of the grid's dimensions against the lowest dimensions of + the field in sequence, i.e. gridToFieldMap = (/1,2,3,.../). + The values of all gridToFieldMap entries must be greater than or equal + to one and smaller than or equal to the field rank. + It is erroneous to specify the same gridToFieldMap entry + multiple times. The total ungridded dimensions in the field + are the total field dimensions less + the dimensions in + the grid. Ungridded dimensions must be in the same order they are + stored in the field. + If the Field dimCount is less than the Grid dimCount then the default + gridToFieldMap will contain zeros for the rightmost entries. A zero + entry in the gridToFieldMap indicates that the particular + Grid dimension will be replicating the Field across the DEs along + this direction. + +
+
[ungriddedLBound]
+
Lower bounds of the ungridded dimensions of the field. + The number of elements in the ungriddedLBound is equal to the number of ungridded + dimensions in the field. All ungridded dimensions of the + field are also undistributed. When field dimension count is + greater than grid dimension count, both ungriddedLBound and ungriddedUBound + must be specified. When both are specified the values are checked + for consistency. Note that the the ordering of + these ungridded dimensions is the same as their order in the field. + +
+
[ungriddedUBound]
+
Upper bounds of the ungridded dimensions of the field. + The number of elements in the ungriddedUBound is equal to the number of ungridded + dimensions in the field. All ungridded dimensions of the + field are also undistributed. When field dimension count is + greater than grid dimension count, both ungriddedLBound and ungriddedUBound + must be specified. When both are specified the values are checked + for consistency. Note that the the ordering of + these ungridded dimensions is the same as their order in the field. + +
+
[totalLWidth]
+
Lower bound of halo region. The size of this array is the number + of gridded dimensions in the Field. However, ordering of the elements + needs to be the same as they appear in the field. Values default + to 0. If values for totalLWidth are specified they must be reflected in + the size of the field. That is, for each gridded dimension the + field size should be max( totalLWidth + totalUWidth + + computationalCount, exclusiveCount ). + +
+
[totalUWidth]
+
Upper bound of halo region. The size of this array is the number + of gridded dimensions in the Field. However, ordering of the elements + needs to be the same as they appear in the field. Values default + to 0. If values for totalUWidth are specified they must be reflected in + the size of the field. That is, for each gridded dimension the + field size should max( totalLWidth + totalUWidth + + computationalCount, exclusiveCount ). + +
+
[pinflag]
+
Specify which type of resource DEs are pinned to. See section + 50.2.1 for a list of valid pinning options. + The default is to pin DEs to PETs, i.e. only the PET on which a DE + was created considers the DE as local. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+26.6.33 ESMF_FieldEmptyComplete - Complete a Field from typekind +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_FieldEmptyComplete()
+ subroutine ESMF_FieldEmptyCompTK(field, typekind, indexflag, &
+  gridToFieldMap, ungriddedLBound, ungriddedUBound, totalLWidth, totalUWidth, &
+  pinflag, rc)
+
ARGUMENTS: +
  type(ESMF_Field), intent(inout) :: field
+  type(ESMF_TypeKind_Flag), intent(in) :: typekind
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+  type(ESMF_Index_Flag), intent(in), optional :: indexflag
+  integer, intent(in), optional :: gridToFieldMap(:)
+  integer, intent(in), optional :: ungriddedLBound(:)
+  integer, intent(in), optional :: ungriddedUBound(:)
+  integer, intent(in), optional :: totalLWidth(:)
+  integer, intent(in), optional :: totalUWidth(:)
+  type(ESMF_Pin_Flag), intent(in), optional :: pinflag
+  integer, intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    8.1.0
    +
    Added argument pinflag to provide access to DE sharing + between PETs. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Complete an ESMF_Field and allocate space internally for an + ESMF_Array based on typekind. + The input ESMF_Field must have a status of + ESMF_FIELDSTATUS_GRIDSET. After this call the completed ESMF_Field + has a status of ESMF_FIELDSTATUS_COMPLETE. + +

+For an example and + associated documentation using this method see section + 26.3.7. + +

+The arguments are: +

+
field
+
The input ESMF_Field with a status of + ESMF_FIELDSTATUS_GRIDSET. + +
+
typekind
+
Data type and kind specification. + +
+
[indexflag]
+
Indicate how DE-local indices are defined. By default each DE's + exclusive region is placed to start at the local index space origin, + i.e. (1, 1, ..., 1). Alternatively the DE-local index space can be + aligned with the global index space, if a global index space is well + defined by the associated Grid. See section 54.29 + for a list of valid indexflag options. + +
+
[gridToFieldMap]
+
List with number of elements equal to the + grid's dimCount. The list elements map each dimension + of the grid to a dimension in the field by + specifying the appropriate field dimension index. The default is to + map all of the grid's dimensions against the lowest dimensions of + the field in sequence, i.e. gridToFieldMap = (/1,2,3,.../). + The values of all gridToFieldMap entries must be greater than or equal + to one and smaller than or equal to the field rank. + It is erroneous to specify the same gridToFieldMap entry + multiple times. The total ungridded dimensions in the field + are the total field dimensions less + the dimensions in + the grid. Ungridded dimensions must be in the same order they are + stored in the field. + If the Field dimCount is less than the Grid dimCount then the default + gridToFieldMap will contain zeros for the rightmost entries. A zero + entry in the gridToFieldMap indicates that the particular + Grid dimension will be replicating the Field across the DEs along + this direction. + +
+
[ungriddedLBound]
+
Lower bounds of the ungridded dimensions of the field. + The number of elements in the ungriddedLBound is equal to the number of ungridded + dimensions in the field. All ungridded dimensions of the + field are also undistributed. When field dimension count is + greater than grid dimension count, both ungriddedLBound and ungriddedUBound + must be specified. When both are specified the values are checked + for consistency. Note that the the ordering of + these ungridded dimensions is the same as their order in the field. + +
+
[ungriddedUBound]
+
Upper bounds of the ungridded dimensions of the field. + The number of elements in the ungriddedUBound is equal to the number of ungridded + dimensions in the field. All ungridded dimensions of the + field are also undistributed. When field dimension count is + greater than grid dimension count, both ungriddedLBound and ungriddedUBound + must be specified. When both are specified the values are checked + for consistency. Note that the the ordering of + these ungridded dimensions is the same as their order in the field. + +
+
[totalLWidth]
+
Lower bound of halo region. The size of this array is the number + of gridded dimensions in the Field. However, ordering of the elements + needs to be the same as they appear in the field. Values default + to 0. If values for totalLWidth are specified they must be reflected in + the size of the field. That is, for each gridded dimension the + field size should be max( totalLWidth + totalUWidth + + computationalCount, exclusiveCount ). + +
+
[totalUWidth]
+
Upper bound of halo region. The size of this array is the number + of gridded dimensions in the Field. However, ordering of the elements + needs to be the same as they appear in the field. Values default + to 0. If values for totalUWidth are specified they must be reflected in + the size of the field. That is, for each gridded dimension the + field size should max( totalLWidth + totalUWidth + + computationalCount, exclusiveCount ). + +
+
[pinflag]
+
Specify which type of resource DEs are pinned to. See section + 50.2.1 for a list of valid pinning options. + The default is to pin DEs to PETs, i.e. only the PET on which a DE + was created considers the DE as local. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+26.6.34 ESMF_FieldEmptyComplete - Complete a Field from Fortran array +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_FieldEmptyComplete() 
+   subroutine ESMF_FieldEmptyComp<rank><type><kind>(field, & 
+   farray, indexflag, datacopyflag, gridToFieldMap, & 
+   ungriddedLBound, ungriddedUBound, totalLWidth, totalUWidth, rc)
+
ARGUMENTS: +
   type(ESMF_Field), intent(inout) :: field 
+   <type> (ESMF_KIND_<kind>),intent(in), target :: farray(<rank>) 
+   type(ESMF_Index_Flag), intent(in) :: indexflag 
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+   type(ESMF_DataCopy_Flag), intent(in), optional :: datacopyflag 
+   integer, intent(in), optional :: gridToFieldMap(:) 
+   integer, intent(in), optional :: ungriddedLBound(:) 
+   integer, intent(in), optional :: ungriddedUBound(:) 
+   integer, intent(in), optional :: totalLWidth(:) 
+   integer, intent(in), optional :: totalUWidth(:) 
+   integer, intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Complete an ESMF_Field and allocate space internally for an + ESMF_Array based on typekind. + The input ESMF_Field must have a status of + ESMF_FIELDSTATUS_GRIDSET. After this call the completed ESMF_Field + has a status of ESMF_FIELDSTATUS_COMPLETE. + +

+The Fortran data pointer inside ESMF_Field can be queried but deallocating + the retrieved data pointer is not allowed. + +

+For an example and + associated documentation using this method see section + 26.3.8. + +

+The arguments are: +

+
field
+
The input ESMF_Field with a status of + ESMF_FIELDSTATUS_GRIDSET. + The ESMF_Field will have the same dimension + (dimCount) as the rank of the farray. + +
+
farray
+
Native Fortran data array to be copied/referenced in the field. + The field dimension (dimCount) will be the same as the dimCount + for the farray. + +
+
indexflag
+
Indicate how DE-local indices are defined. See section + 54.29 for a list of valid indexflag options. + +
+
[datacopyflag]
+
Indicates whether to copy the farray or reference it directly. + For valid values see 54.13. The default is + ESMF_DATACOPY_REFERENCE. + +
+
[gridToFieldMap]
+
List with number of elements equal to the + grid's dimCount. The list elements map each dimension + of the grid to a dimension in the farray by + specifying the appropriate farray dimension index. The + default is to map all of the grid's dimensions against the + lowest dimensions of the farray in sequence, i.e. + gridToFieldMap = (/1,2,3,.../). + Unmapped farray dimensions are undistributed Field + dimensions. + All gridToFieldMap entries must be greater than or equal + to zero and smaller than or equal to the Field dimCount. It is erroneous + to specify the same entry multiple times unless it is zero. + If the Field dimCount is less than the Grid dimCount then the default + gridToFieldMap will contain zeros for the rightmost entries. A zero + entry in the gridToFieldMap indicates that the particular + Grid dimension will be replicating the Field across the DEs along + this direction. + +
+
[ungriddedLBound]
+
Lower bounds of the ungridded dimensions of the field. + The number of elements in the ungriddedLBound is equal to the number of ungridded + dimensions in the field. All ungridded dimensions of the + field are also undistributed. When field dimension count is + greater than grid dimension count, both ungriddedLBound and ungriddedUBound + must be specified. When both are specified the values are checked + for consistency. Note that the the ordering of + these ungridded dimensions is the same as their order in the field. + +
+
[ungriddedUBound]
+
Upper bounds of the ungridded dimensions of the field. + The number of elements in the ungriddedUBound is equal to the number of ungridded + dimensions in the field. All ungridded dimensions of the + field are also undistributed. When field dimension count is + greater than grid dimension count, both ungriddedLBound and ungriddedUBound + must be specified. When both are specified the values are checked + for consistency. Note that the the ordering of + these ungridded dimensions is the same as their order in the field. + +
+
[totalLWidth]
+
Lower bound of halo region. The size of this array is the number + of gridded dimensions in the field. However, ordering of the elements + needs to be the same as they appear in the field. Values default + to 0. If values for totalLWidth are specified they must be reflected in + the size of the field. That is, for each gridded dimension the + field size should be max( totalLWidth + totalUWidth + + computationalCount, exclusiveCount ). + +
+
[totalUWidth]
+
Upper bound of halo region. The size of this array is the number + of gridded dimensions in the field. However, ordering of the elements + needs to be the same as they appear in the field. Values default + to 0. If values for totalUWidth are specified they must be reflected in + the size of the field. That is, for each gridded dimension the + field size should max( totalLWidth + totalUWidth + + computationalCount, exclusiveCount ). + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+26.6.35 ESMF_FieldEmptyComplete - Complete a Field from Fortran array pointer +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_FieldEmptyComplete() 
+   subroutine ESMF_FieldEmptyCompPtr<rank><type><kind>(field, & 
+   farrayPtr, datacopyflag, gridToFieldMap, & 
+   totalLWidth, totalUWidth, rc)
+
ARGUMENTS: +
   type(ESMF_Field), intent(inout) :: field 
+   <type> (ESMF_KIND_<kind>), pointer :: farrayPtr(<rank>) 
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+   type(ESMF_DataCopy_Flag), intent(in), optional :: datacopyflag 
+   integer, intent(in), optional :: gridToFieldMap(:) 
+   integer, intent(in), optional :: totalLWidth(:) 
+   integer, intent(in), optional :: totalUWidth(:) 
+   integer, intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Complete an ESMF_Field and allocate space internally for an + ESMF_Array based on typekind. + The input ESMF_Field must have a status of + ESMF_FIELDSTATUS_GRIDSET. After this call the completed ESMF_Field + has a status of ESMF_FIELDSTATUS_COMPLETE. + +

+The Fortran data pointer inside ESMF_Field can be queried and deallocated when + datacopyflag is ESMF_DATACOPY_REFERENCE. Note that the ESMF_FieldDestroy call does not deallocate + the Fortran data pointer in this case. This gives user more flexibility over memory management. + +

+The arguments are: +

+
field
+
The input ESMF_Field with a status of + ESMF_FIELDSTATUS_GRIDSET. + The ESMF_Field will have the same dimension + (dimCount) as the rank of the farrayPtr. + +
+
farrayPtr
+
Native Fortran data pointer to be copied/referenced in the field. + The field dimension (dimCount) will be the same as the dimCount + for the farrayPtr. + +
+
[datacopyflag]
+
Indicates whether to copy the farrayPtr or reference it directly. + For valid values see 54.13. The default is + ESMF_DATACOPY_REFERENCE. + +
+
[gridToFieldMap]
+
List with number of elements equal to the + grid's dimCount. The list elements map each dimension + of the grid to a dimension in the farrayPtr by + specifying the appropriate farrayPtr dimension index. The + default is to map all of the grid's dimensions against the + lowest dimensions of the farrayPtr in sequence, i.e. + gridToFieldMap = (/1,2,3,.../). + Unmapped farrayPtr dimensions are undistributed Field + dimensions. + All gridToFieldMap entries must be greater than or equal + to zero and smaller than or equal to the Field dimCount. It is erroneous + to specify the same entry multiple times unless it is zero. + If the Field dimCount is less than the Grid dimCount then the default + gridToFieldMap will contain zeros for the rightmost entries. A zero + entry in the gridToFieldMap indicates that the particular + Grid dimension will be replicating the Field across the DEs along + this direction. + +
+
[totalLWidth]
+
Lower bound of halo region. The size of this array is the number + of gridded dimensions in the field. However, ordering of the elements + needs to be the same as they appear in the field. Values default + to 0. If values for totalLWidth are specified they must be reflected in + the size of the field. That is, for each gridded dimension the + field size should be max( totalLWidth + totalUWidth + + computationalCount, exclusiveCount ). + +
+
[totalUWidth]
+
Upper bound of halo region. The size of this array is the number + of gridded dimensions in the field. However, ordering of the elements + needs to be the same as they appear in the field. Values default + to 0. If values for totalUWidth are specified they must be reflected in + the size of the field. That is, for each gridded dimension the + field size should max( totalLWidth + totalUWidth + + computationalCount, exclusiveCount ). + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+26.6.36 ESMF_FieldEmptyComplete - Complete a Field from Geom started with FieldEmptyCreate +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_FieldEmptyComplete() 
+   subroutine ESMF_FieldEmptyCompGB<rank><type><kind>(field, geom, & 
+   farray, indexflag, datacopyflag, gridToFieldMap, ungriddedLBound, & 
+   ungriddedUBound, totalLWidth, totalUWidth, rc)
+
ARGUMENTS: +
   type(ESMF_Field), intent(inout) :: field 
+   type(ESMF_Geom), intent(in) :: geom 
+   <type> (ESMF_KIND_<kind>), dimension(<rank>), target :: farray 
+   type(ESMF_Index_Flag), intent(in) :: indexflag 
+   type(ESMF_DataCopy_Flag), intent(in), optional :: datacopyflag 
+   integer, intent(in), optional :: gridToFieldMap(:) 
+   integer, intent(in), optional :: ungriddedLBound(:) 
+   integer, intent(in), optional :: ungriddedUBound(:) 
+   integer, intent(in), optional :: totalLWidth(:) 
+   integer, intent(in), optional :: totalUWidth(:) 
+   integer, intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+This call completes an ESMF_Field allocated with the + ESMF_FieldEmptyCreate() call. For an example and + associated documentation using this method see section + 26.3.7. + +

+The Fortran data pointer inside ESMF_Field can be queried but deallocating + the retrieved data pointer is not allowed. + +

+The arguments are: +

+
field
+
The ESMF_Field object to be completed and + committed in this call. The field will have the same dimension + (dimCount) as the rank of the farray. + +
+
geom
+
The ESMF_Geom object to complete the Field. + +
+
farray
+
Native Fortran data array to be copied/referenced in the field. + The field dimension (dimCount) will be the same as the dimCount + for the farray. + +
+
indexflag
+
Indicate how DE-local indices are defined. See section + 54.29 for a list of valid indexflag options. + +
+
[datacopyflag]
+
Indicates whether to copy the farray or reference it directly. + For valid values see 54.13. The default is + ESMF_DATACOPY_REFERENCE. + +
+
[gridToFieldMap]
+
List with number of elements equal to the + geom's dimCount. The list elements map each dimension + of the geom to a dimension in the farray by + specifying the appropriate farray dimension index. The + default is to map all of the geom's dimensions against the + lowest dimensions of the farray in sequence, i.e. + gridToFieldMap = (/1,2,3,.../). + Unmapped farray dimensions are undistributed Field + dimensions. + All gridToFieldMap entries must be greater than or equal + to zero and smaller than or equal to the Field dimCount. It is erroneous + to specify the same entry multiple times unless it is zero. + If the Field dimCount is less than the Grid dimCount then the default + gridToFieldMap will contain zeros for the rightmost entries. A zero + entry in the gridToFieldMap indicates that the particular + Grid dimension will be replicating the Field across the DEs along + this direction. + +
+
[ungriddedLBound]
+
Lower bounds of the ungridded dimensions of the field. + The number of elements in the ungriddedLBound is equal to the number of ungridded + dimensions in the field. All ungridded dimensions of the + field are also undistributed. When field dimension count is + greater than grid dimension count, both ungriddedLBound and ungriddedUBound + must be specified. When both are specified the values are checked + for consistency. Note that the the ordering of + these ungridded dimensions is the same as their order in the field. + +
+
[ungriddedUBound]
+
Upper bounds of the ungridded dimensions of the field. + The number of elements in the ungriddedUBound is equal to the number of ungridded + dimensions in the field. All ungridded dimensions of the + field are also undistributed. When field dimension count is + greater than grid dimension count, both ungriddedLBound and ungriddedUBound + must be specified. When both are specified the values are checked + for consistency. Note that the the ordering of + these ungridded dimensions is the same as their order in the field. + +
+
[totalLWidth]
+
Lower bound of halo region. The size of this array is the number + of gridded dimensions in the field. However, ordering of the elements + needs to be the same as they appear in the field. Values default + to 0. If values for totalLWidth are specified they must be reflected in + the size of the field. That is, for each gridded dimension the + field size should be max( totalLWidth + totalUWidth + + computationalCount, exclusiveCount ). + +
+
[totalUWidth]
+
Upper bound of halo region. The size of this array is the number + of gridded dimensions in the field. However, ordering of the elements + needs to be the same as they appear in the field. Values default + to 0. If values for totalUWidth are specified they must be reflected in + the size of the field. That is, for each gridded dimension the + field size should max( totalLWidth + totalUWidth + + computationalCount, exclusiveCount ). + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+26.6.37 ESMF_FieldEmptyComplete - Complete a Field from Geom started with FieldEmptyCreate +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_FieldEmptyComplete() 
+   subroutine ESMF_FieldEmptyCompGBPtr<rank><type><kind>(field, geom, & 
+   farrayPtr, datacopyflag, gridToFieldMap, & 
+   totalLWidth, totalUWidth, rc)
+
ARGUMENTS: +
   type(ESMF_Field), intent(inou) :: field 
+   type(ESMF_Geom), intent(in) :: geom 
+   <type> (ESMF_KIND_<kind>), dimension(<rank>), pointer :: farrayPtr 
+   type(ESMF_DataCopy_Flag), intent(in), optional :: datacopyflag 
+   integer, intent(in), optional :: gridToFieldMap(:) 
+   integer, intent(in), optional :: totalLWidth(:) 
+   integer, intent(in), optional :: totalUWidth(:) 
+   integer, intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+This call completes an ESMF_Field allocated with the + ESMF_FieldEmptyCreate() call. For an example and + associated documentation using this method see section + 26.3.7. + +

+The Fortran data pointer inside ESMF_Field can be queried and deallocated when + datacopyflag is ESMF_DATACOPY_REFERENCE. Note that the ESMF_FieldDestroy call does not deallocate + the Fortran data pointer in this case. This gives user more flexibility over memory management. + +

+The arguments are: +

+
field
+
The ESMF_Field object to be completed and + committed in this call. The field will have the same dimension + (dimCount) as the rank of the farrayPtr. + +
+
geom
+
The ESMF_Geom object to complete the Field. The dimCount of the + Geom must be smaller than or equal to the rank of the farrayPtr. + +
+
farrayPtr
+
Native Fortran data pointer to be copied/referenced in the field. + The field dimension (dimCount) will be the same as the dimCount + for the farrayPtr. + +
+
[datacopyflag]
+
Indicates whether to copy the farrayPtr or reference it directly. + For valid values see 54.13. The default is + ESMF_DATACOPY_REFERENCE. + +
+
[gridToFieldMap]
+
List with number of elements equal to the + geom's dimCount. The list elements map each dimension + of the geom to a dimension in the farrayPtr by + specifying the appropriate farrayPtr dimension index. The + default is to map all of the geom's dimensions against the + lowest dimensions of the farrayPtr in sequence, i.e. + gridToFieldMap = (/1,2,3,.../). + Unmapped farrayPtr dimensions are undistributed Field + dimensions. + All gridToFieldMap entries must be greater than or equal + to zero and smaller than or equal to the Field dimCount. It is erroneous + to specify the same entry multiple times unless it is zero. + If the Field dimCount is less than the Grid dimCount then the default + gridToFieldMap will contain zeros for the rightmost entries. A zero + entry in the gridToFieldMap indicates that the particular + Grid dimension will be replicating the Field across the DEs along + this direction. + +
+
[totalLWidth]
+
Lower bound of halo region. The size of this array is the number + of gridded dimensions in the field. However, ordering of the elements + needs to be the same as they appear in the field. Values default + to 0. If values for totalLWidth are specified they must be reflected in + the size of the field. That is, for each gridded dimension the + field size should be max( totalLWidth + totalUWidth + + computationalCount, exclusiveCount ). + +
+
[totalUWidth]
+
Upper bound of halo region. The size of this array is the number + of gridded dimensions in the field. However, ordering of the elements + needs to be the same as they appear in the field. Values default + to 0. If values for totalUWidth are specified they must be reflected in + the size of the field. That is, for each gridded dimension the + field size should max( totalLWidth + totalUWidth + + computationalCount, exclusiveCount ). + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+26.6.38 ESMF_FieldEmptyComplete - Complete a Field from Grid started with FieldEmptyCreate +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_FieldEmptyComplete() 
+   subroutine ESMF_FieldEmptyCompGrid<rank><type><kind>(field, grid, & 
+   farray, indexflag, datacopyflag, staggerloc, gridToFieldMap, & 
+   ungriddedLBound, ungriddedUBound, totalLWidth, totalUWidth, rc)
+
ARGUMENTS: +
   type(ESMF_Field), intent(inout) :: field 
+   type(ESMF_Grid), intent(in) :: grid 
+   <type> (ESMF_KIND_<kind>),intent(in), target :: farray(<rank>) 
+   type(ESMF_Index_Flag), intent(in) :: indexflag 
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+   type(ESMF_DataCopy_Flag), intent(in), optional :: datacopyflag 
+   type(ESMF_STAGGERLOC), intent(in), optional :: staggerloc 
+   integer, intent(in), optional :: gridToFieldMap(:) 
+   integer, intent(in), optional :: ungriddedLBound(:) 
+   integer, intent(in), optional :: ungriddedUBound(:) 
+   integer, intent(in), optional :: totalLWidth(:) 
+   integer, intent(in), optional :: totalUWidth(:) 
+   integer, intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+This call completes an ESMF_Field allocated with the + ESMF_FieldEmptyCreate() call. + +

+The Fortran data pointer inside ESMF_Field can be queried but deallocating + the retrieved data pointer is not allowed. + +

+The arguments are: +

+
field
+
The ESMF_Field object to be completed and + committed in this call. The field will have the same dimension + (dimCount) as the rank of the farray. + +
+
grid
+
The ESMF_Grid object to complete the Field. + +
+
farray
+
Native Fortran data array to be copied/referenced in the field. + The field dimension (dimCount) will be the same as the dimCount + for the farray. + +
+
indexflag
+
Indicate how DE-local indices are defined. See section + 54.29 for a list of valid indexflag options. + +
+
[datacopyflag]
+
Indicates whether to copy the farray or reference it directly. + For valid values see 54.13. The default is + ESMF_DATACOPY_REFERENCE. + +
+
[staggerloc]
+
Stagger location of data in grid cells. For valid + predefined values see section 31.2.6. + To create a custom stagger location see section + 31.3.25. The default + value is ESMF_STAGGERLOC_CENTER. + +
+
[gridToFieldMap]
+
List with number of elements equal to the + grid's dimCount. The list elements map each dimension + of the grid to a dimension in the farray by + specifying the appropriate farray dimension index. The + default is to map all of the grid's dimensions against the + lowest dimensions of the farray in sequence, i.e. + gridToFieldMap = (/1,2,3,.../). + Unmapped farray dimensions are undistributed Field + dimensions. + All gridToFieldMap entries must be greater than or equal + to zero and smaller than or equal to the Field dimCount. It is erroneous + to specify the same entry multiple times unless it is zero. + If the Field dimCount is less than the Grid dimCount then the default + gridToFieldMap will contain zeros for the rightmost entries. A zero + entry in the gridToFieldMap indicates that the particular + Grid dimension will be replicating the Field across the DEs along + this direction. + +
+
[ungriddedLBound]
+
Lower bounds of the ungridded dimensions of the field. + The number of elements in the ungriddedLBound is equal to the number of ungridded + dimensions in the field. All ungridded dimensions of the + field are also undistributed. When field dimension count is + greater than grid dimension count, both ungriddedLBound and ungriddedUBound + must be specified. When both are specified the values are checked + for consistency. Note that the the ordering of + these ungridded dimensions is the same as their order in the field. + +
+
[ungriddedUBound]
+
Upper bounds of the ungridded dimensions of the field. + The number of elements in the ungriddedUBound is equal to the number of ungridded + dimensions in the field. All ungridded dimensions of the + field are also undistributed. When field dimension count is + greater than grid dimension count, both ungriddedLBound and ungriddedUBound + must be specified. When both are specified the values are checked + for consistency. Note that the the ordering of + these ungridded dimensions is the same as their order in the field. + +
+
[totalLWidth]
+
Lower bound of halo region. The size of this array is the number + of gridded dimensions in the field. However, ordering of the elements + needs to be the same as they appear in the field. Values default + to 0. If values for totalLWidth are specified they must be reflected in + the size of the field. That is, for each gridded dimension the + field size should be max( totalLWidth + totalUWidth + + computationalCount, exclusiveCount ). + +
+
[totalUWidth]
+
Upper bound of halo region. The size of this array is the number + of gridded dimensions in the field. However, ordering of the elements + needs to be the same as they appear in the field. Values default + to 0. If values for totalUWidth are specified they must be reflected in + the size of the field. That is, for each gridded dimension the + field size should max( totalLWidth + totalUWidth + + computationalCount, exclusiveCount ). + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+26.6.39 ESMF_FieldEmptyComplete - Complete a Field from Grid started with FieldEmptyCreate +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_FieldEmptyComplete() 
+   subroutine ESMF_FieldEmptyCompGridPtr<rank><type><kind>(field, grid, & 
+   farrayPtr, datacopyflag, staggerloc, gridToFieldMap, & 
+   totalLWidth, totalUWidth, rc)
+
ARGUMENTS: +
   type(ESMF_Field), intent(inout) :: field 
+   type(ESMF_Grid), intent(in) :: grid 
+   <type> (ESMF_KIND_<kind>), pointer :: farrayPtr(<rank>) 
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+   type(ESMF_DataCopy_Flag), intent(in), optional :: datacopyflag 
+   type(ESMF_STAGGERLOC), intent(in), optional :: staggerloc 
+   integer, intent(in), optional :: gridToFieldMap(:) 
+   integer, intent(in), optional :: totalLWidth(:) 
+   integer, intent(in), optional :: totalUWidth(:) 
+   integer, intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+This call completes an ESMF_Field allocated with the + ESMF_FieldEmptyCreate() call. + +

+The Fortran data pointer inside ESMF_Field can be queried and deallocated when + datacopyflag is ESMF_DATACOPY_REFERENCE. Note that the ESMF_FieldDestroy call does not deallocate + the Fortran data pointer in this case. This gives user more flexibility over memory management. + + The Fortran data pointer inside ESMF_Field can be queried and deallocated when + +

+The arguments are: +

+
field
+
The ESMF_Field object to be completed and + committed in this call. The field will have the same dimension + (dimCount) as the rank of the farrayPtr. + +
+
grid
+
The ESMF_Grid object to complete the Field. + +
+
farrayPtr
+
Native Fortran data pointer to be copied/referenced in the field. + The field dimension (dimCount) will be the same as the dimCount + for the farrayPtr. + +
+
[datacopyflag]
+
Indicates whether to copy the farrayPtr or reference it directly. + For valid values see 54.13. The default is + ESMF_DATACOPY_REFERENCE. + +
+
[staggerloc]
+
Stagger location of data in grid cells. For valid + predefined values see section 31.2.6. + To create a custom stagger location see section + 31.3.25. The default + value is ESMF_STAGGERLOC_CENTER. + +
+
[gridToFieldMap]
+
List with number of elements equal to the + grid's dimCount. The list elements map each dimension + of the grid to a dimension in the farrayPtr by + specifying the appropriate farrayPtr dimension index. The + default is to map all of the grid's dimensions against the + lowest dimensions of the farrayPtr in sequence, i.e. + gridToFieldMap = (/1,2,3,.../). + Unmapped farrayPtr dimensions are undistributed Field + dimensions. + All gridToFieldMap entries must be greater than or equal + to zero and smaller than or equal to the Field dimCount. It is erroneous + to specify the same entry multiple times unless it is zero. + If the Field dimCount is less than the Grid dimCount then the default + gridToFieldMap will contain zeros for the rightmost entries. A zero + entry in the gridToFieldMap indicates that the particular + Grid dimension will be replicating the Field across the DEs along + this direction. + +
+
[totalLWidth]
+
Lower bound of halo region. The size of this array is the number + of gridded dimensions in the field. However, ordering of the elements + needs to be the same as they appear in the field. Values default + to 0. If values for totalLWidth are specified they must be reflected in + the size of the field. That is, for each gridded dimension the + field size should be max( totalLWidth + totalUWidth + + computationalCount, exclusiveCount ). + +
+
[totalUWidth]
+
Upper bound of halo region. The size of this array is the number + of gridded dimensions in the field. However, ordering of the elements + needs to be the same as they appear in the field. Values default + to 0. If values for totalUWidth are specified they must be reflected in + the size of the field. That is, for each gridded dimension the + field size should max( totalLWidth + totalUWidth + + computationalCount, exclusiveCount ). + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+26.6.40 ESMF_FieldEmptyComplete - Complete a Field from LocStream started with FieldEmptyCreate +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_FieldEmptyComplete() 
+   subroutine ESMF_FieldEmptyCompLS<rank><type><kind>(field, locstream, & 
+   farray, indexflag, datacopyflag, gridToFieldMap, & 
+   ungriddedLBound, ungriddedUBound, rc)
+
ARGUMENTS: +
   type(ESMF_Field), intent(inout) :: field 
+   type(ESMF_LocStream), intent(in) :: locstream 
+   <type> (ESMF_KIND_<kind>), intent(in), target :: farray(<rank>) 
+   type(ESMF_Index_Flag), intent(in) :: indexflag 
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+   type(ESMF_DataCopy_Flag), intent(in), optional :: datacopyflag 
+   integer, intent(in), optional :: gridToFieldMap(:) 
+   integer, intent(in), optional :: ungriddedLBound(:) 
+   integer, intent(in), optional :: ungriddedUBound(:) 
+   integer, intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+This call completes an ESMF_Field allocated with the + ESMF_FieldEmptyCreate() call. + +

+The Fortran data pointer inside ESMF_Field can be queried but deallocating + the retrieved data pointer is not allowed. + +

+The arguments are: +

+
field
+
The ESMF_Field object to be completed and + committed in this call. The field will have the same dimension + (dimCount) as the rank of the farray. + +
+
locstream
+
The ESMF_LocStream object to complete the Field. + +
+
farray
+
Native Fortran data array to be copied/referenced in the field. + The field dimension (dimCount) will be the same as the dimCount + for the farray. + +
+
indexflag
+
Indicate how DE-local indices are defined. See section + 54.29 for a list of valid indexflag options. + +
+
[datacopyflag]
+
Indicates whether to copy the farray or reference it directly. + For valid values see 54.13. The default is + ESMF_DATACOPY_REFERENCE. + +
+
[gridToFieldMap]
+
List with number of elements equal to the + locstream's dimCount. The list elements map each dimension + of the locstream to a dimension in the farray by + specifying the appropriate farray dimension index. The + default is to map all of the locstream's dimensions against the + lowest dimensions of the farray in sequence, i.e. + gridToFieldMap = (/1,2,3,.../). + Unmapped farray dimensions are undistributed Field + dimensions. + All gridToFieldMap entries must be greater than or equal + to zero and smaller than or equal to the Field dimCount. It is erroneous + to specify the same entry multiple times unless it is zero. + If the Field dimCount is less than the LocStream dimCount then the default + gridToFieldMap will contain zeros for the rightmost entries. A zero + entry in the gridToFieldMap indicates that the particular + LocStream dimension will be replicating the Field across the DEs along + this direction. + +
+
[ungriddedLBound]
+
Lower bounds of the ungridded dimensions of the field. + The number of elements in the ungriddedLBound is equal to the number of ungridded + dimensions in the field. All ungridded dimensions of the + field are also undistributed. When field dimension count is + greater than locstream dimension count, both ungriddedLBound and ungriddedUBound + must be specified. When both are specified the values are checked + for consistency. Note that the the ordering of + these ungridded dimensions is the same as their order in the field. + +
+
[ungriddedUBound]
+
Upper bounds of the ungridded dimensions of the field. + The number of elements in the ungriddedUBound is equal to the number of ungridded + dimensions in the field. All ungridded dimensions of the + field are also undistributed. When field dimension count is + greater than locstream dimension count, both ungriddedLBound and ungriddedUBound + must be specified. When both are specified the values are checked + for consistency. Note that the the ordering of + these ungridded dimensions is the same as their order in the field. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+26.6.41 ESMF_FieldEmptyComplete - Complete a Field from LocStream started with FieldEmptyCreate +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_FieldEmptyComplete() 
+   subroutine ESMF_FieldEmptyCompLSPtr<rank><type><kind>(field, locstream, & 
+   farrayPtr, datacopyflag, gridToFieldMap, rc)
+
ARGUMENTS: +
   type(ESMF_Field), intent(inout) :: field 
+   type(ESMF_LocStream), intent(in) :: locstream 
+   <type> (ESMF_KIND_<kind>), pointer :: farrayPtr(<rank>) 
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+   type(ESMF_DataCopy_Flag), intent(in), optional :: datacopyflag 
+   integer, intent(in), optional :: gridToFieldMap(:) 
+   integer, intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+This call completes an ESMF_Field allocated with the + ESMF_FieldEmptyCreate() call. + +

+The Fortran data pointer inside ESMF_Field can be queried and deallocated when + datacopyflag is ESMF_DATACOPY_REFERENCE. Note that the ESMF_FieldDestroy call does not deallocate + the Fortran data pointer in this case. This gives user more flexibility over memory management. + +

+The arguments are: +

+
field
+
The ESMF_Field object to be completed and + committed in this call. The field will have the same dimension + (dimCount) as the rank of the farrayPtr. + +
+
locstream
+
The ESMF_LocStream object to complete the Field. + +
+
farrayPtr
+
Native Fortran data pointer to be copied/referenced in the field. + The field dimension (dimCount) will be the same as the dimCount + for the farrayPtr. + +
+
[datacopyflag]
+
Indicates whether to copy the farrayPtr or reference it directly. + For valid values see 54.13. The default is + ESMF_DATACOPY_REFERENCE. + +
+
[gridToFieldMap]
+
List with number of elements equal to the + locstream's dimCount. The list elements map each dimension + of the locstream to a dimension in the farrayPtr by + specifying the appropriate farrayPtr dimension index. The + default is to map all of the locstream's dimensions against the + lowest dimensions of the farrayPtr in sequence, i.e. + gridToFieldMap = (/1,2,3,.../). + Unmapped farrayPtr dimensions are undistributed Field + dimensions. + All gridToFieldMap entries must be greater than or equal + to zero and smaller than or equal to the Field dimCount. It is erroneous + to specify the same entry multiple times unless it is zero. + If the Field dimCount is less than the LocStream dimCount then the default + gridToFieldMap will contain zeros for the rightmost entries. A zero + entry in the gridToFieldMap indicates that the particular + LocStream dimension will be replicating the Field across the DEs along + this direction. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+26.6.42 ESMF_FieldEmptyComplete - Complete a Field from Mesh started with FieldEmptyCreate +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_FieldEmptyComplete() 
+   subroutine ESMF_FieldEmptyCompMesh<rank><type><kind>(field, mesh, & 
+   farray, indexflag, datacopyflag, meshloc, & 
+   gridToFieldMap, ungriddedLBound, ungriddedUBound, rc)
+
ARGUMENTS: +
   type(ESMF_Field), intent(inout) :: field 
+   type(ESMF_Mesh), intent(in) :: mesh 
+   <type> (ESMF_KIND_<kind>), intent(in), target :: farray(<rank>) 
+   type(ESMF_Index_Flag), intent(in) :: indexflag 
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+   type(ESMF_DataCopy_Flag), intent(in), optional :: datacopyflag 
+   type(ESMF_MeshLoc), intent(in), optional :: meshloc 
+   integer, intent(in), optional :: gridToFieldMap(:) 
+   integer, intent(in), optional :: ungriddedLBound(:) 
+   integer, intent(in), optional :: ungriddedUBound(:) 
+   integer, intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+This call completes an ESMF_Field allocated with the + ESMF_FieldEmptyCreate() call. + +

+The Fortran data pointer inside ESMF_Field can be queried but deallocating + the retrieved data pointer is not allowed. + +

+The arguments are: +

+
field
+
The ESMF_Field object to be completed and + committed in this call. The field will have the same dimension + (dimCount) as the rank of the farray. + +
+
mesh
+
The ESMF_Mesh object to complete the Field. + +
+
farray
+
Native Fortran data array to be copied/referenced in the field. + The field dimension (dimCount) will be the same as the dimCount + for the farray. + +
+
indexflag
+
Indicate how DE-local indices are defined. See section + 54.29 for a list of valid indexflag options. + +
+
[datacopyflag]
+
Indicates whether to copy the farray or reference it directly. + For valid values see 54.13. The default is + ESMF_DATACOPY_REFERENCE. + +
+
[meshloc]
+
Which part of the mesh to build the Field on. Can be set to either + ESMF_MESHLOC_NODE or ESMF_MESHLOC_ELEMENT. If not set, + defaults to ESMF_MESHLOC_NODE. + +
+
[gridToFieldMap]
+
List with number of elements equal to the + mesh's dimCount. The list elements map each dimension + of the mesh to a dimension in the farray by + specifying the appropriate farray dimension index. The + default is to map all of the mesh's dimensions against the + lowest dimensions of the farray in sequence, i.e. + gridToFieldMap = (/1,2,3,.../). + Unmapped farray dimensions are undistributed Field + dimensions. + All gridToFieldMap entries must be greater than or equal + to zero and smaller than or equal to the Field dimCount. It is erroneous + to specify the same entry multiple times unless it is zero. + If the Field dimCount is less than the Mesh dimCount then the default + gridToFieldMap will contain zeros for the rightmost entries. A zero + entry in the gridToFieldMap indicates that the particular + Mesh dimension will be replicating the Field across the DEs along + this direction. + +
+
[ungriddedLBound]
+
Lower bounds of the ungridded dimensions of the field. + The number of elements in the ungriddedLBound is equal to the number of ungridded + dimensions in the field. All ungridded dimensions of the + field are also undistributed. When field dimension count is + greater than Mesh dimension count, both ungriddedLBound and ungriddedUBound + must be specified. When both are specified the values are checked + for consistency. Note that the the ordering of + these ungridded dimensions is the same as their order in the field. + +
+
[ungriddedUBound]
+
Upper bounds of the ungridded dimensions of the field. + The number of elements in the ungriddedUBound is equal to the number of ungridded + dimensions in the field. All ungridded dimensions of the + field are also undistributed. When field dimension count is + greater than Mesh dimension count, both ungriddedLBound and ungriddedUBound + must be specified. When both are specified the values are checked + for consistency. Note that the the ordering of + these ungridded dimensions is the same as their order in the field. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+26.6.43 ESMF_FieldEmptyComplete - Complete a Field from Mesh started with FieldEmptyCreate +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_FieldEmptyComplete() 
+   subroutine ESMF_FieldEmptyCompMeshPtr<rank><type><kind>(field, mesh, & 
+   farrayPtr, datacopyflag, meshloc, gridToFieldMap, rc)
+
ARGUMENTS: +
   type(ESMF_Field), intent(inout) :: field 
+   type(ESMF_Mesh), intent(in) :: mesh 
+   <type> (ESMF_KIND_<kind>), pointer :: farrayPtr(<rank>) 
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+   type(ESMF_DataCopy_Flag), intent(in), optional :: datacopyflag 
+   type(ESMF_MeshLoc), intent(in), optional :: meshloc 
+   integer, intent(in), optional :: gridToFieldMap(:) 
+   integer, intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+This call completes an ESMF_Field allocated with the + ESMF_FieldEmptyCreate() call. + +

+The Fortran data pointer inside ESMF_Field can be queried and deallocated when + datacopyflag is ESMF_DATACOPY_REFERENCE. Note that the ESMF_FieldDestroy call does not deallocate + the Fortran data pointer in this case. This gives user more flexibility over memory management. + +

+The arguments are: +

+
field
+
The ESMF_Field object to be completed and + committed in this call. The field will have the same dimension + (dimCount) as the rank of the farrayPtr. + +
+
mesh
+
The ESMF_Mesh object to complete the Field. + +
+
farrayPtr
+
Native Fortran data pointer to be copied/referenced in the field. + The field dimension (dimCount) will be the same as the dimCount + for the farrayPtr. + +
+
[datacopyflag]
+
Indicates whether to copy the farrayPtr or reference it directly. + For valid values see 54.13. The default is + ESMF_DATACOPY_REFERENCE. + +
+
[meshloc]
+
Which part of the mesh to build the Field on. Can be set to either + ESMF_MESHLOC_NODE or ESMF_MESHLOC_ELEMENT. If not set, + defaults to ESMF_MESHLOC_NODE. + +
+
[gridToFieldMap]
+
List with number of elements equal to the + mesh's dimCount. The list elements map each dimension + of the mesh to a dimension in the farrayPtr by + specifying the appropriate farrayPtr dimension index. The + default is to map all of the mesh's dimensions against the + lowest dimensions of the farrayPtr in sequence, i.e. + gridToFieldMap = (/1,2,3,.../). + Unmapped farrayPtr dimensions are undistributed Field + dimensions. + All gridToFieldMap entries must be greater than or equal + to zero and smaller than or equal to the Field dimCount. It is erroneous + to specify the same entry multiple times unless it is zero. + If the Field dimCount is less than the Mesh dimCount then the default + gridToFieldMap will contain zeros for the rightmost entries. A zero + entry in the gridToFieldMap indicates that the particular + Mesh dimension will be replicating the Field across the DEs along + this direction. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+26.6.44 ESMF_FieldEmptyComplete - Complete a Field from XGrid started with FieldEmptyCreate +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_FieldEmptyComplete() 
+   subroutine ESMF_FieldEmptyCompXG<rank><type><kind>(field, xgrid, & 
+   farray, indexflag, datacopyflag, xgridside, gridindex, & 
+   gridToFieldMap, & 
+   ungriddedLBound, ungriddedUBound, rc)
+
ARGUMENTS: +
   type(ESMF_Field), intent(inout) :: field 
+   type(ESMF_XGrid), intent(in) :: xgrid 
+   <type> (ESMF_KIND_<kind>), intent(in), target :: farray(<rank>) 
+   type(ESMF_Index_Flag), intent(in) :: indexflag 
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+   type(ESMF_DataCopy_Flag), intent(in), optional :: datacopyflag 
+   type(ESMF_XGridSide_Flag), intent(in), optional :: xgridside 
+   integer, intent(in), optional :: gridindex 
+   integer, intent(in), optional :: gridToFieldMap(:) 
+   integer, intent(in), optional :: ungriddedLBound(:) 
+   integer, intent(in), optional :: ungriddedUBound(:) 
+   integer, intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+This call completes an ESMF_Field allocated with the + ESMF_FieldEmptyCreate() call. + +

+The Fortran data pointer inside ESMF_Field can be queried but deallocating + the retrieved data pointer is not allowed. + +

+The arguments are: +

+
field
+
The ESMF_Field object to be completed and + committed in this call. The field will have the same dimension + (dimCount) as the rank of the farray. + +
+
xgrid
+
The ESMF_XGrid object to complete the Field. + +
+
farray
+
Native Fortran data array to be copied/referenced in the field. + The field dimension (dimCount) will be the same as the dimCount + for the farray. + +
+
indexflag
+
Indicate how DE-local indices are defined. See section + 54.29 for a list of valid indexflag options. + +
+
[datacopyflag]
+
Indicates whether to copy the farray or reference it directly. + For valid values see 54.13. The default is + ESMF_DATACOPY_REFERENCE. + +
+
[xgridside]
+
Which side of the XGrid to create the Field on (either ESMF_XGRIDSIDE_A, + ESMF_XGRIDSIDE_B, or ESMF_XGRIDSIDE_BALANCED). If not passed in then + defaults to ESMF_XGRIDSIDE_BALANCED. + +
+
[gridindex]
+
If xgridSide is ESMF_XGRIDSIDE_A or ESMF_XGRIDSIDE_B then this index tells which Grid on + that side to create the Field on. If not provided, defaults to 1. + +
+
[gridToFieldMap]
+
List with number of elements equal to the + xgrid's dimCount. The list elements map each dimension + of the xgrid to a dimension in the farray by + specifying the appropriate farray dimension index. The + default is to map all of the xgrid's dimensions against the + lowest dimensions of the farray in sequence, i.e. + gridToFieldMap = (/1,2,3,.../). + Unmapped farray dimensions are undistributed Field + dimensions. + All gridToFieldMap entries must be greater than or equal + to zero and smaller than or equal to the Field dimCount. It is erroneous + to specify the same entry multiple times unless it is zero. + If the Field dimCount is less than the XGrid dimCount then the default + gridToFieldMap will contain zeros for the rightmost entries. A zero + entry in the gridToFieldMap indicates that the particular + XGrid dimension will be replicating the Field across the DEs along + this direction. + +
+
[ungriddedLBound]
+
Lower bounds of the ungridded dimensions of the field. + The number of elements in the ungriddedLBound is equal to the number of ungridded + dimensions in the field. All ungridded dimensions of the + field are also undistributed. When field dimension count is + greater than XGrid dimension count, both ungriddedLBound and ungriddedUBound + must be specified. When both are specified the values are checked + for consistency. Note that the the ordering of + these ungridded dimensions is the same as their order in the field. + +
+
[ungriddedUBound]
+
Upper bounds of the ungridded dimensions of the field. + The number of elements in the ungriddedUBound is equal to the number of ungridded + dimensions in the field. All ungridded dimensions of the + field are also undistributed. When field dimension count is + greater than XGrid dimension count, both ungriddedLBound and ungriddedUBound + must be specified. When both are specified the values are checked + for consistency. Note that the the ordering of + these ungridded dimensions is the same as their order in the field. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+26.6.45 ESMF_FieldEmptyComplete - Complete a Field from XGrid started with FieldEmptyCreate +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_FieldEmptyComplete() 
+   subroutine ESMF_FieldEmptyCompXGPtr<rank><type><kind>(field, xgrid, & 
+   farrayPtr, xgridside, gridindex, & 
+   datacopyflag, gridToFieldMap, rc)
+
ARGUMENTS: +
   type(ESMF_Field), intent(inout) :: field 
+   type(ESMF_XGrid), intent(in) :: xgrid 
+   <type> (ESMF_KIND_<kind>), pointer :: farrayPtr(<rank>) 
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+   type(ESMF_DataCopy_Flag), intent(in), optional :: datacopyflag 
+   type(ESMF_XGridSide_Flag), intent(in), optional :: xgridside 
+   integer, intent(in), optional :: gridindex 
+   integer, intent(in), optional :: gridToFieldMap(:) 
+   integer, intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+This call completes an ESMF_Field allocated with the + ESMF_FieldEmptyCreate() call. + +

+The Fortran data pointer inside ESMF_Field can be queried and deallocated when + datacopyflag is ESMF_DATACOPY_REFERENCE. Note that the ESMF_FieldDestroy call does not deallocate + the Fortran data pointer in this case. This gives user more flexibility over memory management. + +

+The arguments are: +

+
field
+
The ESMF_Field object to be completed and + committed in this call. The field will have the same dimension + (dimCount) as the rank of the farrayPtr. + +
+
xgrid
+
The ESMF_XGrid object to complete the Field. + +
+
farrayPtr
+
Native Fortran data pointer to be copied/referenced in the field. + The field dimension (dimCount) will be the same as the dimCount + for the farrayPtr. + +
+
[datacopyflag]
+
Indicates whether to copy the farrayPtr or reference it directly. + For valid values see 54.13. The default is + ESMF_DATACOPY_REFERENCE. + +
+
[xgridside]
+
Which side of the XGrid to create the Field on (either ESMF_XGRIDSIDE_A, + ESMF_XGRIDSIDE_B, or ESMF_XGRIDSIDE_BALANCED). If not passed in then + defaults to ESMF_XGRIDSIDE_BALANCED. + +
+
[gridindex]
+
If xgridside is ESMF_XGRIDSIDE_A or ESMF_XGRIDSIDE_B then this index tells which Grid on + that side to create the Field on. If not provided, defaults to 1. + +
+
[gridToFieldMap]
+
List with number of elements equal to the + xgrid's dimCount. The list elements map each dimension + of the xgrid to a dimension in the farrayPtr by + specifying the appropriate farrayPtr dimension index. The + default is to map all of the xgrid's dimensions against the + lowest dimensions of the farrayPtr in sequence, i.e. + gridToFieldMap = (/1,2,3,.../). + Unmapped farrayPtr dimensions are undistributed Field + dimensions. + All gridToFieldMap entries must be greater than or equal + to zero and smaller than or equal to the Field dimCount. It is erroneous + to specify the same entry multiple times unless it is zero. + If the Field dimCount is less than the XGrid dimCount then the default + gridToFieldMap will contain zeros for the rightmost entries. A zero + entry in the gridToFieldMap indicates that the particular + XGrid dimension will be replicating the Field across the DEs along + this direction. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+26.6.46 ESMF_FieldEmptyCreate - Create an empty Field +

+ +

+ +

+
+INTERFACE: +

   function ESMF_FieldEmptyCreate(name, vm, rc)
+
RETURN VALUE: +
     type(ESMF_Field) :: ESMF_FieldEmptyCreate
+
ARGUMENTS: +
 -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     character (len = *), intent(in), optional :: name
+     type(ESMF_VM), intent(in), optional :: vm
+     integer, intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    8.0.0
    +
    Added argument vm to support object creation on a + different VM than that of the current context. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+This version of ESMF_FieldCreate builds an empty ESMF_Field + and depends on later calls to add an ESMF_Grid and ESMF_Array to + it. The empty ESMF_Field can be completed in one more step or two more steps by + the ESMF_FieldEmptySet and ESMF_FieldEmptyComplete methods. + Attributes can be added to an empty Field object. For an example and + associated documentation using this method see section + 26.3.8 and 26.3.7. + +

+The arguments are: +

+
[name]
+
Field name. + +
+
[vm]
+
If present, the Field object is created on the specified + ESMF_VM object. The default is to create on the VM of the + current component context. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+26.6.47 ESMF_FieldEmptySet - Set a Geom in an empty Field +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_FieldEmptySet()
+   subroutine ESMF_FieldEmptySetGeom(field, geom, vm, rc)
+
ARGUMENTS: +
   type(ESMF_Field), intent(inout) :: field
+   type(ESMF_Geom), intent(in) :: geom
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+   type(ESMF_VM), intent(in), optional :: vm
+   integer, intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Set a geom in a non-completed ESMF_Field. The + ESMF_Field must not be completed for this to succeed. After this + operation, the ESMF_Field contains + the ESMF_Geom internally but holds no data. + The status of the field changes from + ESMF_FIELDSTATUS_EMPTY to ESMF_FIELDSTATUS_GRIDSET or + stays ESMF_FIELDSTATUS_GRIDSET. + +

+For an example and + associated documentation using this method see section + 26.3.7. + +

+The arguments are: +

+
field
+
Empty ESMF_Field. After this + operation, the ESMF_Field contains + the ESMF_Grid internally but holds no data. + The status of the field changes from + ESMF_FIELDSTATUS_EMPTY to ESMF_FIELDSTATUS_GRIDSET. + +
+
geom
+
ESMF_Geom to be set in the ESMF_Field. + +
+
[vm]
+
If present, the Field object will only be accessed, and the Grid object + set, on those PETs contained in the specified ESMF_VM object. + The default is to assume the VM of the current context. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+26.6.48 ESMF_FieldEmptySet - Set a Grid in an empty Field +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_FieldEmptySet()
+   subroutine ESMF_FieldEmptySetGrid(field, grid, StaggerLoc, &
+     vm, rc)
+
ARGUMENTS: +
   type(ESMF_Field), intent(inout) :: field
+   type(ESMF_Grid), intent(in) :: grid
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+   type(ESMF_STAGGERLOC), intent(in), optional :: StaggerLoc
+   type(ESMF_VM), intent(in), optional :: vm
+   integer, intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    7.1.0r
    +
    Added argument vm to support object creation on a + different VM than that of the current context. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Set a grid and an optional staggerloc (default to center stagger + ESMF_STAGGERLOC_CENTER) in a non-completed ESMF_Field. The + ESMF_Field must not be completed for this to succeed. After this + operation, the ESMF_Field contains + the ESMF_Grid internally but holds no data. + The status of the field changes from + ESMF_FIELDSTATUS_EMPTY to ESMF_FIELDSTATUS_GRIDSET or + stays ESMF_FIELDSTATUS_GRIDSET. + +

+For an example and + associated documentation using this method see section + 26.3.7. + +

+The arguments are: +

+
field
+
Empty ESMF_Field. After this + operation, the ESMF_Field contains + the ESMF_Grid internally but holds no data. + The status of the field changes from + ESMF_FIELDSTATUS_EMPTY to ESMF_FIELDSTATUS_GRIDSET. + +
+
grid
+
ESMF_Grid to be set in the ESMF_Field. + +
+
[StaggerLoc]
+
Stagger location of data in grid cells. For valid + predefined values see section 31.2.6. + To create a custom stagger location see section + 31.3.25. The default + value is ESMF_STAGGERLOC_CENTER. + +
+
[vm]
+
If present, the Field object will only be accessed, and the Grid object + set, on those PETs contained in the specified ESMF_VM object. + The default is to assume the VM of the current context. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+26.6.49 ESMF_FieldEmptySet - Set a Mesh in an empty Field +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_FieldEmptySet()
+   subroutine ESMF_FieldEmptySetMesh(field, mesh, indexflag, meshloc, rc)
+
ARGUMENTS: +
   type(ESMF_Field), intent(inout) :: field
+   type(ESMF_Mesh), intent(in) :: mesh
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+   type(ESMF_Index_Flag),intent(in), optional :: indexflag
+   type(ESMF_MeshLoc), intent(in), optional :: meshloc
+   integer, intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Set a mesh and an optional meshloc (default to center stagger + ESMF_MESHLOC_NODE) in a non-completed ESMF_Field. The + ESMF_Field must not be completed for this to succeed. After this + operation, the ESMF_Field contains + the ESMF_Mesh internally but holds no data. + The status of the field changes from + ESMF_FIELDSTATUS_EMPTY to ESMF_FIELDSTATUS_GRIDSET or + stays ESMF_FIELDSTATUS_GRIDSET. + +

+ +

+The arguments are: +

+
field
+
Empty ESMF_Field. After this + operation, the ESMF_Field contains + the ESMF_Mesh internally but holds no data. + The status of the field changes from + ESMF_FIELDSTATUS_EMPTY to ESMF_FIELDSTATUS_GRIDSET. + +
+
mesh
+
ESMF_Mesh to be set in the ESMF_Field. + +
+
[indexflag]
+
Indicate how DE-local indices are defined. See section + 54.29 for a list of valid indexflag options. + +
+
[meshloc]
+
Which part of the mesh to build the Field on. Can be set to either + ESMF_MESHLOC_NODE or ESMF_MESHLOC_ELEMENT. If not set, + defaults to ESMF_MESHLOC_NODE. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+26.6.50 ESMF_FieldEmptySet - Set a LocStream in an empty Field +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_FieldEmptySet()
+   subroutine ESMF_FieldEmptySetLocStream(field, locstream, &
+     vm, rc)
+
ARGUMENTS: +
   type(ESMF_Field), intent(inout) :: field
+   type(ESMF_LocStream), intent(in) :: locstream
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+   type(ESMF_VM), intent(in), optional :: vm
+   integer, intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Set a ESMF_LocStream in a non-completed ESMF_Field. The + ESMF_Field must not be completed for this to succeed. After this + operation, the ESMF_Field contains + the ESMF_LocStream internally but holds no data. + The status of the field changes from + ESMF_FIELDSTATUS_EMPTY to ESMF_FIELDSTATUS_GRIDSET or + stays ESMF_FIELDSTATUS_GRIDSET. + +

+ +

+The arguments are: +

+
field
+
Empty ESMF_Field. After this + operation, the ESMF_Field contains + the ESMF_LocStream internally but holds no data. + The status of the field changes from + ESMF_FIELDSTATUS_EMPTY to ESMF_FIELDSTATUS_GRIDSET. + +
+
locstream
+
ESMF_LocStream to be set in the ESMF_Field. + +
+
[vm]
+
If present, the Field object will only be accessed, and the Grid object + set, on those PETs contained in the specified ESMF_VM object. + The default is to assume the VM of the current context. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+26.6.51 ESMF_FieldEmptySet - Set an XGrid in an empty Field +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_FieldEmptySet()
+   subroutine ESMF_FieldEmptySetXGrid(field, xgrid, xgridside, gridindex, rc)
+
ARGUMENTS: +
   type(ESMF_Field), intent(inout) :: field
+   type(ESMF_XGrid), intent(in) :: xgrid
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+   type(ESMF_XGridSide_Flag), intent(in), optional :: xgridside
+   integer, intent(in), optional :: gridindex
+   integer, intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Set a xgrid and optional xgridside (default to balanced side + ESMF_XGRIDSIDE_Balanced) and gridindex (default to 1) + in a non-complete ESMF_Field. The + ESMF_Field must not be completed for this to succeed. After this + operation, the ESMF_Field contains + the ESMF_XGrid internally but holds no data. + The status of the field changes from + ESMF_FIELDSTATUS_EMPTY to ESMF_FIELDSTATUS_GRIDSET + or stays ESMF_FIELDSTATUS_GRIDSET. + +

+ +

+The arguments are: +

+
field
+
Empty ESMF_Field. After this + operation, the ESMF_Field contains + the ESMF_XGrid internally but holds no data. + The status of the field changes from + ESMF_FIELDSTATUS_EMPTY to ESMF_FIELDSTATUS_GRIDSET. + +
+
xgrid
+
ESMF_XGrid to be set in the ESMF_Field. + +
+
[xgridside]
+
Side of XGrid to retrieve a DistGrid. For valid + predefined values see section 34.2.1. + The default value is ESMF_XGRIDSIDE_BALANCED. + +
+
[gridindex]
+
Index to specify which DistGrid when on side A or side B. + The default value is 1. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ + +

+ +

+ +

+ +

+26.6.52 ESMF_FieldFill - Fill data into a Field +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_FieldFill(field, dataFillScheme, &
+     const1, member, step, &
+     param1I4, param2I4, param3I4, &
+     param1R4, param2R4, param3R4, &
+     param1R8, param2R8, param3R8, &
+     rc)
+
ARGUMENTS: +
     type(ESMF_Field), intent(inout) :: field
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     character(len=*), intent(in), optional :: dataFillScheme
+     real(ESMF_KIND_R8), intent(in), optional :: const1
+     integer, intent(in), optional :: member
+     integer, intent(in), optional :: step
+     integer(ESMF_KIND_I4), intent(in), optional :: param1I4
+     integer(ESMF_KIND_I4), intent(in), optional :: param2I4
+     integer(ESMF_KIND_I4), intent(in), optional :: param3I4
+     real(ESMF_KIND_R4), intent(in), optional :: param1R4
+     real(ESMF_KIND_R4), intent(in), optional :: param2R4
+     real(ESMF_KIND_R4), intent(in), optional :: param3R4
+     real(ESMF_KIND_R8), intent(in), optional :: param1R8
+     real(ESMF_KIND_R8), intent(in), optional :: param2R8
+     real(ESMF_KIND_R8), intent(in), optional :: param3R8
+     integer, intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+ Fill field with data according to dataFillScheme. Depending + on the chosen fill scheme, the member and step arguments are + used to provide differing fill data patterns. + +

+The arguments are: +

+
field
+
The ESMF_Field object to fill with data. + +
+
[dataFillScheme]
+
The fill scheme. The available options are "sincos", "one", "const", + "random", "nan", and "snan". Defaults to "sincos". + +
+
[const1]
+
Constant of real type. Defaults to 0. + +
+
[member]
+
Member incrementor. Defaults to 1. + +
+
[step]
+
Step incrementor. Defaults to 1. + +
+
[param1I4]
+
Optional parameter of typekind I4. + The default depends on the specified dataFillScheme. + +
+
[param2I4]
+
Optional parameter of typekind I4. + The default depends on the specified dataFillScheme. + +
+
[param3I4]
+
Optional parameter of typekind I4. + The default depends on the specified dataFillScheme. + +
+
[param1R4]
+
Optional parameter of typekind R4. + The default depends on the specified dataFillScheme. + +
+
[param2R4]
+
Optional parameter of typekind R4. + The default depends on the specified dataFillScheme. + +
+
[param3R4]
+
Optional parameter of typekind R4. + The default depends on the specified dataFillScheme. + +
+
[param1R8]
+
Optional parameter of typekind R8. + The default depends on the specified dataFillScheme. + +
+
[param2R8]
+
Optional parameter of typekind R8. + The default depends on the specified dataFillScheme. + +
+
[param3R8]
+
Optional parameter of typekind R8. + The default depends on the specified dataFillScheme. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+26.6.53 ESMF_FieldGather - Gather a Fortran array from an ESMF_Field +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_FieldGather<rank><type><kind>(field, farray, & 
+   rootPet, tile, vm, rc)
+
ARGUMENTS: +
   type(ESMF_Field), intent(in) :: field 
+   <type>(ESMF_KIND_<kind>), intent(out), target :: farray(<rank>) 
+   integer, intent(in) :: rootPet 
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+   integer, intent(in), optional :: tile 
+   type(ESMF_VM), intent(in), optional :: vm 
+   integer, intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Gather the data of an ESMF_Field object into the farray located on + rootPET. A single DistGrid tile of array must be + gathered into farray. The optional tile + argument allows selection of the tile. For Fields defined on a single + tile DistGrid the default selection (tile 1) will be correct. The + shape of farray must match the shape of the tile in Field. + +

+If the Field contains replicating DistGrid dimensions data will be + gathered from the numerically higher DEs. Replicated data elements in + numericaly lower DEs will be ignored. + +

+The implementation of Scatter and Gather is not sequence index based. + If the Field is built on arbitrarily distributed Grid, Mesh, LocStream or XGrid, + Gather will not gather data to rootPet + from source data points corresponding to the sequence index on rootPet. + Instead Gather will gather a contiguous memory range from source PET to + rootPet. The size of the memory range is equal to the number of + data elements on the source PET. Vice versa for the Scatter operation. + In this case, the user should use ESMF_FieldRedist to achieve + the same data operation result. For examples how to use ESMF_FieldRedist + to perform Gather and Scatter, please refer to + 26.3.32 and + 26.3.31. + +

+This version of the interface implements the PET-based blocking paradigm: + Each PET of the VM must issue this call exactly once for all of its + DEs. The call will block until all PET-local data objects are accessible. + +

+For examples and associated documentation regarding this method see Section + 26.3.28. + +

+The arguments are: +

+
field
+
The ESMF_Field object from which data will be gathered. + +
+
{farray}
+
The Fortran array into which to gather data. Only root + must provide a valid farray, the other PETs may treat + farray as an optional argument. + +
+
rootPet
+
PET that holds the valid destination array, i.e. farray. + +
+
[tile]
+
The DistGrid tile in field from which to gather farray. + By default farray will be gathered from tile 1. + +
+
[vm]
+
Optional ESMF_VM object of the current context. Providing the + VM of the current context will lower the method's overhead. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ + +

+ +

+ +

+ +

+26.6.54 ESMF_FieldGet - Get object-wide Field information +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_FieldGet()
+   subroutine ESMF_FieldGetDefault(field, arrayspec, status, &
+     geomtype, geom, grid, mesh, locstream, xgrid, array, localarrayList, &
+     typekind, rank, dimCount, geomDimCount, ungriddedDimCount, &
+     replicatedDimCount, staggerloc, meshloc, xgridside, gridindex, &
+     gridToFieldMap, ungriddedLBound, ungriddedUBound, &
+     totalLWidth, totalUWidth, localDeCount, ssiLocalDeCount, &
+     localDeToDeMap, minIndex, maxIndex, elementCount, &
+     localMinIndex, localMaxIndex, localElementCount, isESMFAllocated, &
+     name, vm, rc)
+
ARGUMENTS: +
     type(ESMF_Field), intent(in) :: field
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     type(ESMF_ArraySpec), intent(out), optional :: arrayspec
+     type(ESMF_FieldStatus_Flag),intent(out), optional :: status
+     type(ESMF_GeomType_Flag), intent(out), optional :: geomtype
+     type(ESMF_Geom), intent(out), optional :: geom
+     type(ESMF_Grid), intent(out), optional :: grid
+     type(ESMF_Mesh), intent(out), optional :: mesh
+     type(ESMF_LocStream), intent(out), optional :: locstream
+     type(ESMF_XGrid), intent(out), optional :: xgrid
+     type(ESMF_Array), intent(out), optional :: array
+     type(ESMF_LocalArray), target, intent(out), optional :: localarrayList(:)
+     type(ESMF_TypeKind_Flag), intent(out), optional :: typekind
+     integer, intent(out), optional :: rank
+     integer, intent(out), optional :: dimCount
+     integer, intent(out), optional :: geomDimCount
+     integer, intent(out), optional :: ungriddedDimCount
+     integer, intent(out), optional :: replicatedDimCount
+     type(ESMF_StaggerLoc), intent(out), optional :: staggerloc
+     type(ESMF_MeshLoc), intent(out), optional :: meshloc
+     type(ESMF_XGridSide_Flag), intent(out), optional :: xgridside
+     integer, intent(out), optional :: gridindex
+     integer, intent(out), optional :: gridToFieldMap(:)
+     integer, intent(out), optional :: ungriddedLBound(:)
+     integer, intent(out), optional :: ungriddedUBound(:)
+     integer, intent(out), optional :: totalLWidth(:,:)
+     integer, intent(out), optional :: totalUWidth(:,:)
+     integer, intent(out), optional :: localDeCount
+     integer, intent(out), optional :: ssiLocalDeCount
+     integer, intent(out), optional :: localDeToDeMap(:)
+     integer, intent(out), optional :: minIndex(:)
+     integer, intent(out), optional :: maxIndex(:)
+     integer, intent(out), optional :: elementCount(:)
+     integer, intent(out), optional :: localMinIndex(:)
+     integer, intent(out), optional :: localMaxIndex(:)
+     integer, intent(out), optional :: localElementCount(:)
+     logical, intent(out), optional :: isESMFAllocated
+     character(len=*), intent(out), optional :: name
+     type(ESMF_VM), intent(out), optional :: vm
+     integer, intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r - except those arguments indicated below. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    6.3.0r
    +
    Added argument vm in order to offer information about the + VM on which the Field was created. + +
    +
    8.1.0
    +
    Added argument minIndex. + The new argument allows the user to query the global lower bounds of the field data across all PETs. +
    +Added argument maxIndex. + The new argument allows the user to query the global upper bounds of the field data across all PETs. +
    +Added argument elementCount. + The new argument allows the user to query the global number of items of the field data across all PETs. +
    +Added argument localMinIndex. + The new argument allows the user to query the PET local lower bounds globally indexed of the field data. +
    +Added argument localMaxIndex. + The new argument allows the user to query the PET local upper bounds globally indexed of the field data. +
    +Added argument localElementCount. + The new argument allows the user to query the PET local number of items of the field data. +
    +Added argument ssiLocalDeCount and localarrayList to + support DE sharing between PETs on the same single system + image (SSI). +
    +Added argument localDeToDeMap to support DE handling from + the Field level rather than require user to go to Array level. + +
    +
    8.5.0
    +
    Added argument isESMFAllocated to support user query of + whether ESMF or user is responsible for the data allocation + referenced by this object. + +
    +
    8.6.0
    +
    Added argument geom to support user query of Geom object. +
    +Added argument geomDimCount for easy access to dimension of + underlying Geom object. +
    +Added argument ungriddedDimCount for easy access to the + number of ungridded dimensions in the Field object. +
    +Added argument replicatedDimCount for easy access to the + number of dimensions across which the Field object is replicated. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Query an ESMF_Field object for various pieces of information. + All arguments after the field argument are optional. To select + individual items use the named_argument=value syntax. For an example + and associated documentation using this method see section + 26.3.3. + +

+The arguments are: +

+
field
+
ESMF_Field object to query. + +
+
[arrayspec]
+
ESMF_ArraySpec object containing the type/kind/rank information + of the Field object. + +
+
[status]
+
The status of the Field. See section 26.2.1 for a + complete list of values. + +
+
[geomtype]
+
The type of geometry on which the Field is built. See + section 54.23 for the range of values. + +
+
[geom]
+
ESMF_Geom. + +
+
[grid]
+
ESMF_Grid. + +
+
[mesh]
+
STATUS:This argument is excluded from the backward compatibility statement. +
ESMF_Mesh. + +
+
[locstream]
+
STATUS:This argument is excluded from the backward compatibility statement. +
ESMF_LocStream. + +
+
[xgrid]
+
STATUS:This argument is excluded from the backward compatibility statement. +
ESMF_XGrid. + +
+
[array]
+
ESMF_Array. + +
+
[localarrayList]
+
Upon return this holds a list of the associated ESMC_LocalArray + objects. localarrayList must be allocated to be of size + localDeCount or ssiLocalDeCount. + +
+
[typekind]
+
TypeKind specifier for Field. See section 54.61 for a + complete list of values. + +
+
[rank]
+
Number of dimensions in the physical memory of the field data. It is + identical to dimCount when the corresponding grid is a non-arbitrary grid. + It is less than dimCount when the grid is arbitrarily distributed. + For an detailed discussion of this parameter, please see + section 26.3.23 and + section 26.3.24. + +
+
[dimCount]
+
Number of geometrical dimensions in field. + For an detailed discussion of this parameter, please see + section 26.3.23 and + section 26.3.24. + +
+
[geomDimCount]
+
Number of dimensions in the underlying Geom object. + +
+
[ungriddedDimCount]
+
Number of ungridded dimensions in the Field object. + +
+
[replicatedDimCount]
+
Number of replicated dimensions in the Field object. + +
+
[staggerloc]
+
Stagger location of data in grid cells. For valid + predefined values and interpretation of results see + section 31.2.6. + +
+
[meshloc]
+
STATUS:This argument is excluded from the backward compatibility statement. +
+The part of the mesh to build the Field on. Can be either + ESMF_MESHLOC_NODE or ESMF_MESHLOC_ELEMENT. If not set, + defaults to ESMF_MESHLOC_NODE. + +
+
[xgridside]
+
STATUS:This argument is excluded from the backward compatibility statement. +
+The side of the XGrid that the Field was created on. See section + 34.2.1 for a complete list of values. + +
+
[gridIndex]
+
STATUS:This argument is excluded from the backward compatibility statement. +
+If xgridside is ESMF_XGRIDSIDE_A or ESMF_XGRIDSIDE_B + then this index tells which Grid/Mesh on that side the Field was + created on. + +
+
[gridToFieldMap]
+
List with number of elements equal to the + grid's dimCount. The list elements map each dimension + of the grid to a dimension in the field by + specifying the appropriate field dimension index. The default is to + map all of the grid's dimensions against the lowest dimensions of + the field in sequence, i.e. gridToFieldMap = (/1,2,3,.../). + The total ungridded dimensions in the field + are the total field dimensions less + the dimensions in + the grid. Ungridded dimensions must be in the same order they are + stored in the field. + +
+
[ungriddedLBound]
+
Lower bounds of the ungridded dimensions of the field. + The number of elements in the ungriddedLBound argument must be + equal or greater to ungriddedDimCount, the number of ungridded + dimensions in the field. All ungridded dimensions of the + field are also undistributed. Note that the ordering of + the ungridded dimensions is the same as their order in the field. + +
+
[ungriddedUBound]
+
Upper bounds of the ungridded dimensions of the field. + The number of elements in the ungriddedUBound argument must be + equal or greater to ungriddedDimCount, the number of ungridded + dimensions in the field. All ungridded dimensions of the + field are also undistributed. Note that the ordering of + the ungridded dimensions is the same as their order in the field. + +
+
[totalLWidth]
+
Lower bound of halo region. The size of the first dimension of this array is the number + of gridded dimensions in the field. However, ordering of the elements + needs to be the same as they appear in the field. Values default + to 0. If values for totalLWidth are specified they must be reflected in + the size of the field. That is, for each gridded dimension the + field size should be max( totalLWidth + totalUWidth + + computationalCount, exclusiveCount ). + The size of the 2nd dimension of this array is localDeCount. + +
+
[totalUWidth]
+
Upper bound of halo region. The size of the first dimension of this array is the number + of gridded dimensions in the field. However, ordering of the elements + needs to be the same as they appear in the field. Values default + to 0. If values for totalUWidth are specified they must be reflected in + the size of the field. That is, for each gridded dimension the + field size should max( totalLWidth + totalUWidth + + computationalCount, exclusiveCount ). + The size of the 2nd dimension of this array is localDeCount. + +
+
[localDeCount]
+
Upon return this holds the number of PET-local DEs defined in + the DELayout associated with the Field object. + +
+
[ssiLocalDeCount]
+
The number of DEs in the Field available to the local PET. This + includes DEs that are local to other PETs on the same SSI, that are + accessible via shared memory. + +
+
[localDeToDeMap]
+
Mapping between localDe indices and the (global) DEs associated with + the local PET. The localDe index variables are discussed in sections + 50.3.7 and 28.2.5. + The provided actual argument must be of size localDeCount, or + ssiLocalDeCount, and will be filled accordingly. + +
+
[minIndex]
+
Upon return this holds the global lower bounds of the field data across all PETs. + This information will be identical across all PETs. + minIndex must be allocated to be of size equal to the field rank. + +
+
[maxIndex]
+
Upon return this holds the global upper bounds of the field data across all PETs. + This information will be identical across all PETs. + maxIndex must be allocated to be of size equal to the field rank. + +
+
[elementCount]
+
Upon return this holds the global number of items of the field data across all PETs. + This information will be identical across all PETs. + elementCount must be allocated to be of size equal to the field rank. + +
+
[localMinIndex]
+
Upon return this holds the PET local lower bounds globally indexed of the field data. + localMinIndex must be allocated to be of size equal to the field rank. + +
+
[localMaxIndex]
+
Upon return this holds the PET local upper bounds globally indexed of the field data. + localMaxIndex must be allocated to be of size equal to the field rank. + +
+
[localElementCount]
+
Upon return this holds the PET local number of items of the field data. + localElementCount must be allocated to be of size equal to the field rank. + +
+
[isESMFAllocated]
+
Set to .true. for data allocations held by ESMF. Set to + .false. otherwise. + +
+
[name]
+
Name of the Field object. + +
+
[vm]
+
The VM on which the Field object was created. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+26.6.55 ESMF_FieldGet - Get a DE-local Fortran array pointer from a Field +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_FieldGet() 
+   subroutine ESMF_FieldGetDataPtr<rank><type><kind>(field, localDe, & 
+   farrayPtr, exclusiveLBound, exclusiveUBound, exclusiveCount, & 
+   computationalLBound, computationalUBound, computationalCount, & 
+   totalLBound, totalUBound, totalCount, rc)
+
ARGUMENTS: +
   type(ESMF_Field), intent(in) :: field 
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+   integer, intent(in), optional :: localDe 
+   <type> (ESMF_KIND_<kind>), pointer :: farrayPtr(<rank>) 
+   integer, intent(out), optional :: exclusiveLBound(:) 
+   integer, intent(out), optional :: exclusiveUBound(:) 
+   integer, intent(out), optional :: exclusiveCount(:) 
+   integer, intent(out), optional :: computationalLBound(:) 
+   integer, intent(out), optional :: computationalUBound(:) 
+   integer, intent(out), optional :: computationalCount(:) 
+   integer, intent(out), optional :: totalLBound(:) 
+   integer, intent(out), optional :: totalUBound(:) 
+   integer, intent(out), optional :: totalCount(:) 
+   integer, intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Get a Fortran pointer to DE-local memory allocation within field. + For convenience DE-local bounds can be queried at the same time. + For an example and + associated documentation using this method see section + 26.3.2. + +

+The arguments are: +

+
field
+
ESMF_Field object. + +
+
[localDe]
+
Local DE for which information is requested. [0,..,localDeCount-1]. + For localDeCount==1 the localDe argument may be omitted, + in which case it will default to localDe=0. + +
+
farrayPtr
+
Fortran array pointer which will be pointed at DE-local memory allocation. + It depends on the specific entry point + of ESMF_FieldCreate() used during field creation, which + Fortran operations are supported on the returned farrayPtr. See + 26.4 for more details. + +
+
[exclusiveLBound]
+
Upon return this holds the lower bounds of the exclusive region. + exclusiveLBound must be allocated to be of size equal to field's dimCount. + See section 28.2.6 for a description + of the regions and their associated bounds and counts. + +
+
[exclusiveUBound]
+
Upon return this holds the upper bounds of the exclusive region. + exclusiveUBound must be allocated to be of size equal to field's dimCount. + See section 28.2.6 for a description + of the regions and their associated bounds and counts. + +
+
[exclusiveCount]
+
Upon return this holds the number of items, exclusiveUBound-exclusiveLBound+1, + in the exclusive region per dimension. + exclusiveCount must + be allocated to be of size equal to field's dimCount. + See section 28.2.6 for a description + of the regions and their associated bounds and counts. + +
+
[computationalLBound]
+
Upon return this holds the lower bounds of the computational region. + computationalLBound must be allocated to be of size equal to field's dimCount. + See section 28.2.6 for a description + of the regions and their associated bounds and counts. + +
+
[computationalUBound]
+
Upon return this holds the lower bounds of the computational region. + computationalUBound must be allocated to be of size equal to field's dimCount. + See section 28.2.6 for a description + of the regions and their associated bounds and counts. + +
+
[computationalCount]
+
Upon return this holds the number of items in the computational region per dimension + (i.e. computationalUBound-computationalLBound+1). computationalCount must + be allocated to be of size equal to field's dimCount. + See section 28.2.6 for a description + of the regions and their associated bounds and counts. + +
+
[totalLBound]
+
Upon return this holds the lower bounds of the total region. + totalLBound must be allocated to be of size equal to field's dimCount. + See section 28.2.6 for a description + of the regions and their associated bounds and counts. + +
+
[totalUBound]
+
Upon return this holds the lower bounds of the total region. + totalUBound must be allocated to be of size equal to field's dimCount. + See section 28.2.6 for a description + of the regions and their associated bounds and counts. + +
+
[totalCount]
+
Upon return this holds the number of items in the total region per dimension + (i.e. totalUBound-totalLBound+1). computationalCount must + be allocated to be of size equal to field's dimCount. + See section 28.2.6 for a description + of the regions and their associated bounds and counts. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+26.6.56 ESMF_FieldGetBounds - Get DE-local Field data bounds +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_FieldGetBounds()
+   subroutine ESMF_FieldGetBounds(field, localDe, &
+     exclusiveLBound, exclusiveUBound, exclusiveCount, computationalLBound, &
+     computationalUBound, computationalCount, totalLBound, &
+     totalUBound, totalCount, rc)
+
ARGUMENTS: +
     type(ESMF_Field), intent(in) :: field
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer, intent(in), optional :: localDe
+     integer, intent(out), optional :: exclusiveLBound(:)
+     integer, intent(out), optional :: exclusiveUBound(:)
+     integer, intent(out), optional :: exclusiveCount(:)
+     integer, intent(out), optional :: computationalLBound(:)
+     integer, intent(out), optional :: computationalUBound(:)
+     integer, intent(out), optional :: computationalCount(:)
+     integer, intent(out), optional :: totalLBound(:)
+     integer, intent(out), optional :: totalUBound(:)
+     integer, intent(out), optional :: totalCount(:)
+     integer, intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+This method returns the bounds information of a field that consists of a + internal grid and a internal array. The exclusive and computational bounds + are shared between the grid and the array but the total bounds are the array + bounds plus the halo width. The count is the number of elements between each + bound pair. + +

+The arguments are: +

+
field
+
Field to get the information from. + +
+
[localDe]
+
Local DE for which information is requested. [0,..,localDeCount-1]. + For localDeCount==1 the localDe argument may be omitted, + in which case it will default to localDe=0. + +
+
[exclusiveLBound]
+
Upon return this holds the lower bounds of the exclusive region. + exclusiveLBound must be allocated to be of size equal to the field rank. + Please see section 31.3.19 for a description + of the regions and their associated bounds and counts. + +
+
[exclusiveUBound]
+
Upon return this holds the upper bounds of the exclusive region. + exclusiveUBound must be allocated to be of size equal to the field rank. + Please see section 31.3.19 for a description + of the regions and their associated bounds and counts. + +
+
[exclusiveCount]
+
Upon return this holds the number of items, exclusiveUBound-exclusiveLBound+1, + in the exclusive region per dimension. + exclusiveCount must + be allocated to be of size equal to the field rank. + Please see section 31.3.19 for a description + of the regions and their associated bounds and counts. + +
+
[computationalLBound]
+
Upon return this holds the lower bounds of the stagger region. + computationalLBound must be allocated to be of size equal to the field rank. + Please see section 31.3.19 for a description + of the regions and their associated bounds and counts. + +
+
[computationalUBound]
+
Upon return this holds the upper bounds of the stagger region. + computationalUBound must be allocated to be of size equal to the field rank. + Please see section 31.3.19 for a description + of the regions and their associated bounds and counts. + +
+
[computationalCount]
+
Upon return this holds the number of items in the computational region per dimension + (i.e. computationalUBound-computationalLBound+1). computationalCount + must be allocated to be of size equal to the field rank. + Please see section 31.3.19 for a description + of the regions and their associated bounds and counts. + +
+
[totalLBound]
+
Upon return this holds the lower bounds of the total region. + totalLBound must be allocated to be of size equal to the field rank. + +
+
[totalUBound]
+
Upon return this holds the upper bounds of the total region. + totalUBound must be allocated to be of size equal to the field rank. + +
+
[totalCount]
+
Upon return this holds the number of items in the total region per dimension + (i.e. totalUBound-totalLBound+1). totalCount must + be allocated to be of size equal to the field rank. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ + +

+ +

+ +

+ +

+26.6.57 ESMF_FieldHalo - Execute a FieldHalo operation +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_FieldHalo(field, routehandle,  &
+                             routesyncflag, finishedflag, checkflag, rc)
+
ARGUMENTS: +
     type(ESMF_Field),          intent(inout)          :: field
+     type(ESMF_RouteHandle),    intent(inout)          :: routehandle
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     type(ESMF_RouteSync_Flag), intent(in),  optional  :: routesyncflag
+     logical,                   intent(out), optional  :: finishedflag
+     logical,                   intent(in),  optional  :: checkflag
+     integer,                   intent(out), optional  :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Execute a precomputed Field halo operation for field. + The field argument must match the Field used during + ESMF_FieldHaloStore() in type, kind, and + memory layout of the gridded dimensions. However, the size, number, + and index order of ungridded dimensions may be different. See section + 37.2.5 for a more detailed discussion of RouteHandle + reusability. + +

+See ESMF_FieldHaloStore() on how to precompute routehandle. + +

+This call is collective across the current VM. + +

+

+
field
+
ESMF_Field containing data to be haloed. + +
+
routehandle
+
Handle to the precomputed Route. + +
+
[routesyncflag]
+
Indicate communication option. Default is ESMF_ROUTESYNC_BLOCKING, + resulting in a blocking operation. + See section 54.53 for a complete list of valid settings. + +
+
[finishedflag]
+
Used in combination with routesyncflag = ESMF_ROUTESYNC_NBTESTFINISH. + Returned finishedflag equal to .true. indicates that all + operations have finished. A value of .false. indicates that there + are still unfinished operations that require additional calls with + routesyncflag = ESMF_ROUTESYNC_NBTESTFINISH, or a final call with + routesyncflag = ESMF_ROUTESYNC_NBWAITFINISH. For all other routesyncflag + settings the returned value in finishedflag is always .true.. + +
+
[checkflag]
+
If set to .TRUE. the input Field pair will be checked for + consistency with the precomputed operation provided by routehandle. + If set to .FALSE. (default) only a very basic input check + will be performed, leaving many inconsistencies undetected. Set + checkflag to .FALSE. to achieve highest performance. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+26.6.58 ESMF_FieldHaloRelease - Release resources associated with a Field halo operation +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_FieldHaloRelease(routehandle, noGarbage, rc)
+
ARGUMENTS: +
     type(ESMF_RouteHandle), intent(inout)           :: routehandle
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     logical,                intent(in),   optional  :: noGarbage
+     integer,                intent(out),  optional  :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    8.0.0
    +
    Added argument noGarbage. + The argument provides a mechanism to override the default garbage collection + mechanism when destroying an ESMF object. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Release resources associated with a Field halo operation. + After this call routehandle becomes invalid. + +

+

+
routehandle
+
Handle to the precomputed Route. + +
+
[noGarbage]
+
If set to .TRUE. the object will be fully destroyed and removed + from the ESMF garbage collection system. Note however that under this + condition ESMF cannot protect against accessing the destroyed object + through dangling aliases - a situation which may lead to hard to debug + application crashes. + +

+It is generally recommended to leave the noGarbage argument + set to .FALSE. (the default), and to take advantage of the ESMF + garbage collection system which will prevent problems with dangling + aliases or incorrect sequences of destroy calls. However this level of + support requires that a small remnant of the object is kept in memory + past the destroy call. This can lead to an unexpected increase in memory + consumption over the course of execution in applications that use + temporary ESMF objects. For situations where the repeated creation and + destruction of temporary objects leads to memory issues, it is + recommended to call with noGarbage set to .TRUE., fully + removing the entire temporary object from memory. + +

+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+26.6.59 ESMF_FieldHaloStore - Store a FieldHalo operation +

+ +

+ +

+
+INTERFACE: +

     subroutine ESMF_FieldHaloStore(field, routehandle,  &
+       startregion, haloLDepth, haloUDepth, rc)
+
ARGUMENTS: +
     type(ESMF_Field),            intent(inout)           :: field
+     type(ESMF_RouteHandle),      intent(inout)           :: routehandle
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     type(ESMF_StartRegion_Flag), intent(in),    optional :: startregion
+     integer,                     intent(in),    optional :: haloLDepth(:)
+     integer,                     intent(in),    optional :: haloUDepth(:)
+     integer,                     intent(out),   optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Store a Field halo operation over the data in field. By default, + i.e. without specifying startregion, haloLDepth and + haloUDepth, all elements in the total Field region that lie outside + the exclusive region will be considered potential destination elements for + halo. However, only those elements that have a corresponding halo source + element, i.e. an exclusive element on one of the DEs, will be updated under + the halo operation. Elements that have no associated source remain + unchanged under halo. + +

+Specifying startregion allows to change the shape of the + effective halo region from the inside. Setting this flag to + ESMF_STARTREGION_COMPUTATIONAL means that only elements outside + the computational region of the Field are considered for potential + destination elements for the halo operation. The default is ESMF_STARTREGION_EXCLUSIVE. + +

+The haloLDepth and haloUDepth arguments allow to reduce + the extent of the effective halo region. Starting at the region specified + by startregion, the haloLDepth and haloUDepth + define a halo depth in each direction. Note that the maximum halo region is + limited by the total Field region, independent of the actual + haloLDepth and haloUDepth setting. The total Field region is + local DE specific. The haloLDepth and haloUDepth are interpreted + as the maximum desired extent, reducing the potentially larger region + available for the halo operation. + +

+The routine returns an ESMF_RouteHandle that can be used to call + ESMF_FieldHalo() on any Field that matches + field in type, kind, and + memory layout of the gridded dimensions. However, the size, number, + and index order of ungridded dimensions may be different. See section + 37.2.5 for a more detailed discussion of RouteHandle + reusability. + +

+This call is collective across the current VM. + +

+

+
field
+
ESMF_Field containing data to be haloed. The data in this Field may be + destroyed by this call. + +
+
routehandle
+
Handle to the precomputed Route. + +
+
[startregion]
+
The start of the effective halo region on every DE. The default + setting is ESMF_STARTREGION_EXCLUSIVE, rendering all non-exclusive + elements potential halo destination elements. + See section 54.56 for a complete list of + valid settings. + +
+
[haloLDepth]
+
This vector specifies the lower corner of the effective halo + region with respect to the lower corner of startregion. + The size of haloLDepth must equal the number of distributed Array + dimensions. + +
+
[haloUDepth]
+
This vector specifies the upper corner of the effective halo + region with respect to the upper corner of startregion. + The size of haloUDepth must equal the number of distributed Array + dimensions. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+26.6.60 ESMF_FieldIsCreated - Check whether a Field object has been created +

+ +

+ +

+
+INTERFACE: +

   function ESMF_FieldIsCreated(field, rc)
+
RETURN VALUE: +
     logical :: ESMF_FieldIsCreated
+
ARGUMENTS: +
     type(ESMF_Field), intent(in)            :: field
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,             intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Return .true. if the field has been created. Otherwise return + .false.. If an error occurs, i.e. rc /= ESMF_SUCCESS is + returned, the return value of the function will also be .false.. + +

+The arguments are: +

+
field
+
ESMF_Field queried. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+26.6.61 ESMF_FieldLog - Log Field information +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_FieldLog(field, prefix, logMsgFlag, deepFlag, rc)
+
ARGUMENTS: +
     type(ESMF_Field),       intent(in)              :: field
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     character(len=*),       intent(in),   optional  :: prefix
+     type(ESMF_LogMsg_Flag), intent(in),   optional  :: logMsgFlag
+     logical,                intent(in),   optional  :: deepFlag
+     integer, intent(out),                 optional  :: rc
+
+DESCRIPTION: +
+ +

+Write information about field to the ESMF default Log. + +

+The arguments are: +

+
field
+
The ESMF_Field object logged. + +
+
[prefix]
+
String to prefix the log message. Default is no prefix. + +
+
[logMsgFlag]
+
Type of log message generated. See section 49.2.3 for + a list of valid message types. Default is ESMF_LOGMSG_INFO. + +
+
[deepFlag]
+
When set to .false. (default), only log top level information about + the Field. + When set to .true., additionally log deep information. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ + +

+ +

+ +

+ +

+26.6.62 ESMF_FieldPrint - Print Field information +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_FieldPrint(field, rc)
+
ARGUMENTS: +
     type(ESMF_Field), intent(in)            :: field
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,          intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Prints information about the field to stdout. + This subroutine goes through the internal data members of a field + data type and prints information of each data member. + +

+The arguments are: +

+
field
+
An ESMF_Field object. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+26.6.63 ESMF_FieldRead - Read Field data from a file +

+ +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_FieldRead(field, fileName,        &
+       variableName, timeslice, iofmt, rc)
+
ARGUMENTS: +
     type(ESMF_Field),      intent(inout)          :: field
+     character(*),          intent(in)             :: fileName
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     character(*),          intent(in),  optional  :: variableName
+     integer,               intent(in),  optional  :: timeslice
+     type(ESMF_IOFmt_Flag), intent(in),  optional  :: iofmt
+     integer,               intent(out), optional  :: rc
+
+DESCRIPTION: +
+ +

+Read Field data from a file and put it into an ESMF_Field object. + For this API to be functional, the environment variable ESMF_PIO + should be set to either "internal" or "external" when the ESMF library is built. + Please see the section on Data I/O, 38.2. + +

+Limitations: + +

    +
  • Not supported in ESMF_COMM=mpiuni mode. + +
  • +
+ +

+The arguments are: +

+
field
+
The ESMF_Field object in which the read data is returned. + +
+
fileName
+
The name of the file from which Field data is read. + If the Field is a multi-tile Array, then fileName must contain + exactly one instance of "*"; this is a placeholder that will be replaced + by the tile number, with each tile being read from a separate file. (For + example, for a fileName of "myfile*.nc", tile 1 will be read from + "myfile1.nc", tile 2 from "myfile2.nc", etc.) + (This handling of the fileName for multi-tile I/O is subject to change.) + +
+
[variableName]
+
Variable name in the file; default is the "name" of Field. + Use this argument only in the I/O format (such as NetCDF) that + supports variable name. If the I/O format does not support this + (such as binary format), ESMF will return an error code. + +
+
[timeslice]
+
Number of slices to be read from file, starting from the 1st slice + +
+
[iofmt]
+
The I/O format. Please see Section 54.30 for the list + of options. If not present, defaults to ESMF_IOFMT_NETCDF. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ + +

+ +

+ +

+ +

+26.6.64 ESMF_FieldRedist - Execute a Field redistribution +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_FieldRedist(srcField, dstField, routehandle,  &
+     checkflag, rc)
+
ARGUMENTS: +
         type(ESMF_Field),       intent(in),optional     :: srcField
+         type(ESMF_Field),       intent(inout),optional  :: dstField
+         type(ESMF_RouteHandle), intent(inout)           :: routehandle
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+         logical,                intent(in),   optional  :: checkflag
+         integer,                intent(out),  optional  :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Execute a precomputed Field redistribution from srcField to + dstField. + Both srcField and dstField must match the respective Fields + used during ESMF_FieldRedistStore() in type, kind, and + memory layout of the gridded dimensions. However, the size, number, + and index order of ungridded dimensions may be different. See section + 37.2.5 for a more detailed discussion of RouteHandle + reusability. + +

+The srcField and dstField arguments are optional in support of + the situation where srcField and/or dstField are not defined on + all PETs. The srcField and dstField must be specified on those + PETs that hold source or destination DEs, respectively, but may be omitted + on all other PETs. PETs that hold neither source nor destination DEs may + omit both arguments. + +

+It is erroneous to specify the identical Field object for srcField and + dstField arguments. + +

+See ESMF_FieldRedistStore() on how to precompute + routehandle. + +

+This call is collective across the current VM. + +

+For examples and associated documentation regarding this method see Section + 26.3.30. + +

+

+
[srcField]
+
ESMF_Field with source data. + +
+
[dstField]
+
ESMF_Field with destination data. + +
+
routehandle
+
Handle to the precomputed Route. + +
+
[checkflag]
+
If set to .TRUE. the input Field pair will be checked for + consistency with the precomputed operation provided by routehandle. + If set to .FALSE. (default) only a very basic input check + will be performed, leaving many inconsistencies undetected. Set + checkflag to .FALSE. to achieve highest performance. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+26.6.65 ESMF_FieldRedistRelease - Release resources associated with Field redistribution +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_FieldRedistRelease(routehandle, noGarbage, rc)
+
ARGUMENTS: +
         type(ESMF_RouteHandle), intent(inout)           :: routehandle
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+         logical,                intent(in),   optional  :: noGarbage
+         integer,                intent(out),  optional  :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    8.0.0
    +
    Added argument noGarbage. + The argument provides a mechanism to override the default garbage collection + mechanism when destroying an ESMF object. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Release resources associated with a Field redistribution. After this call + routehandle becomes invalid. + +

+

+
routehandle
+
Handle to the precomputed Route. + +
+
[noGarbage]
+
If set to .TRUE. the object will be fully destroyed and removed + from the ESMF garbage collection system. Note however that under this + condition ESMF cannot protect against accessing the destroyed object + through dangling aliases - a situation which may lead to hard to debug + application crashes. + +

+It is generally recommended to leave the noGarbage argument + set to .FALSE. (the default), and to take advantage of the ESMF + garbage collection system which will prevent problems with dangling + aliases or incorrect sequences of destroy calls. However this level of + support requires that a small remnant of the object is kept in memory + past the destroy call. This can lead to an unexpected increase in memory + consumption over the course of execution in applications that use + temporary ESMF objects. For situations where the repeated creation and + destruction of temporary objects leads to memory issues, it is + recommended to call with noGarbage set to .TRUE., fully + removing the entire temporary object from memory. + +

+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+26.6.66 ESMF_FieldRedistStore - Precompute Field redistribution with a local factor argument +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_FieldRedistStore() 
+   subroutine ESMF_FieldRedistStore<type><kind>(srcField, dstField, & 
+          routehandle, factor, srcToDstTransposeMap, &
+          ignoreUnmatchedIndices, rc)
+
ARGUMENTS: +
     type(ESMF_Field),         intent(in)            :: srcField  
+     type(ESMF_Field),         intent(inout)         :: dstField  
+     type(ESMF_RouteHandle),   intent(inout)         :: routehandle
+     <type>(ESMF_KIND_<kind>), intent(in)            :: factor 
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,                  intent(in),  optional :: srcToDstTransposeMap(:) 
+     logical,                  intent(in),  optional :: ignoreUnmatchedIndices
+     integer,                  intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    7.0.0
    +
    Added argument ignoreUnmatchedIndices to support sparse + matrices that contain elements with indices that do not have a + match within the source or destination Array. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+ ESMF_FieldRedistStore() is a collective method across all PETs of the + current Component. The interface of the method is overloaded, allowing + - in principle - each PET to call into ESMF_FieldRedistStore() + through a different entry point. Restrictions apply as to which combinations + are sensible. All other combinations result in ESMF run time errors. The + complete semantics of the ESMF_FieldRedistStore() method, as provided + through the separate entry points shown in 26.6.66 and + 26.6.67, is described in the following paragraphs as a whole. + +

+Store a Field redistribution operation from srcField to dstField. + Interface 26.6.66 allows PETs to specify a factor + argument. PETs not specifying a factor argument call into interface + 26.6.67. If multiple PETs specify the factor argument, + its type and kind, as well as its value must match across all PETs. If none + of the PETs specify a factor argument the default will be a factor of + 1. The resulting factor is applied to all of the source data during + redistribution, allowing scaling of the data, e.g. for unit transformation. + +

+Both srcField and dstField are interpreted as sequentialized + vectors. The sequence is defined by the order of DistGrid dimensions and the + order of tiles within the DistGrid or by user-supplied arbitrary sequence + indices. See section 28.2.18 for details on the definition + of sequence indices. + +

+Source Field, destination Field, and the factor may be of different + <type><kind>. Further, source and destination Fields may differ in shape, + however, the number of elements must match. + +

+The default redistribution operation, when srcToDstTransposeMap is not + specified, corresponds to the identity mapping: each element of the + sequentialized source Field is copied to the sequentialized + destination Field element in order. + +

+If the srcToDstTransposeMap argument is provided it must be identical + across all PETs. The srcToDstTransposeMap allows source and destination + Field dimensions to be transposed during the redistribution. To support this + option, the number of source and destination Field dimensions must be equal + and the size of the associated dimensions must match. + See section 28.2.17 for more details about the + use of the srcToDstTransposeMap argument. + +

+It is erroneous to specify the identical Field object for srcField and + dstField arguments. + +

+The routine returns an ESMF_RouteHandle that can be used to call + ESMF_FieldRedist() on any pair of Fields that matches + srcField and dstField in type, kind, and + memory layout of the gridded dimensions. However, the size, number, + and index order of ungridded dimensions may be different. See section + 37.2.5 for a more detailed discussion of RouteHandle + reusability. + +

+This method is overloaded for: +
+ ESMF_TYPEKIND_I4, ESMF_TYPEKIND_I8, +
+ ESMF_TYPEKIND_R4, ESMF_TYPEKIND_R8. +
+ +

+This call is collective across the current VM. + +

+For examples and associated documentation regarding this method see Section + 26.3.30. + +

+The arguments are: +

+
srcField
+
ESMF_Field with source data. + +
+
dstField
+
ESMF_Field with destination data. The data in this Field may be + destroyed by this call. + +
+
routehandle
+
Handle to the precomputed Route. + +
+
factor
+
Factor by which to multiply data. Default is 1. See full method + description above for details on the interplay with other PETs. + +
+
[srcToDstTransposeMap]
+
A list with as many entries as there are dimensions in srcField, or + tileCount times this many entries. + Each entry maps the corresponding srcField dimension against the + specified dstField dimension. Mixing distributed and + undistributed dimensions is supported. + Negative entries reverse the order of elements along the specified + dimension when going from source to destination. + When providing +$rank \times tileCount$ elements in + srcToDstTransposeMap, each block of size rank is associated + with the corresponding tile (in order), and interpreted as the + tile-specific transpose map. + +
+
[ignoreUnmatchedIndices]
+
A logical flag that affects the behavior for when not all elements match + between the srcField and dstField side. The default setting + is .false., indicating that it is an error when such a situation is + encountered. Setting ignoreUnmatchedIndices to .true. ignores + unmatched indices. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+26.6.67 ESMF_FieldRedistStore - Precompute Field redistribution without a local factor argument +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_FieldRedistStore() 
+     subroutine ESMF_FieldRedistStoreNF(srcField, dstField, & 
+         routehandle, srcToDstTransposeMap, &
+         ignoreUnmatchedIndices, rc)
+
ARGUMENTS: +
         type(ESMF_Field),       intent(in)            :: srcField  
+         type(ESMF_Field),       intent(inout)         :: dstField  
+         type(ESMF_RouteHandle), intent(inout)         :: routehandle
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+         integer,                intent(in), optional  :: srcToDstTransposeMap(:) 
+         logical,                intent(in), optional  :: ignoreUnmatchedIndices
+         integer,                intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+ ESMF_FieldRedistStore() is a collective method across all PETs of the + current Component. The interface of the method is overloaded, allowing + - in principle - each PET to call into ESMF_FieldRedistStore() + through a different entry point. Restrictions apply as to which combinations + are sensible. All other combinations result in ESMF run time errors. The + complete semantics of the ESMF_FieldRedistStore() method, as provided + through the separate entry points shown in 26.6.66 and + 26.6.67, is described in the following paragraphs as a whole. + +

+Store a Field redistribution operation from srcField to dstField. + Interface 26.6.66 allows PETs to specify a factor + argument. PETs not specifying a factor argument call into interface + 26.6.67. If multiple PETs specify the factor argument, + its type and kind, as well as its value must match across all PETs. If none + of the PETs specify a factor argument the default will be a factor of + 1. The resulting factor is applied to all of the source data during + redistribution, allowing scaling of the data, e.g. for unit transformation. + +

+Both srcField and dstField are interpreted as sequentialized + vectors. The sequence is defined by the order of DistGrid dimensions and the + order of tiles within the DistGrid or by user-supplied arbitrary sequence + indices. See section 28.2.18 for details on the definition + of sequence indices. + +

+Source Field, destination Field, and the factor may be of different + <type><kind>. Further, source and destination Fields may differ in shape, + however, the number of elements must match. + +

+The default redistribution operation, when srcToDstTransposeMap is not + specified, corresponds to the identity mapping: each element of the + sequentialized source Field is copied to the sequentialized + destination Field element in order. + +

+If the srcToDstTransposeMap argument is provided it must be identical + across all PETs. The srcToDstTransposeMap allows source and destination + Field dimensions to be transposed during the redistribution. To support this + option, the number of source and destination Field dimensions must be equal + and the size of the associated dimensions must match. + See section 28.2.17 for more details about the + use of the srcToDstTransposeMap argument. + +

+It is erroneous to specify the identical Field object for srcField and + dstField arguments. + +

+The routine returns an ESMF_RouteHandle that can be used to call + ESMF_FieldRedist() on any pair of Fields that matches + srcField and dstField in type, kind, and + memory layout of the gridded dimensions. However, the size, number, + and index order of ungridded dimensions may be different. See section + 37.2.5 for a more detailed discussion of RouteHandle + reusability. + +

+This call is collective across the current VM. + +

+For examples and associated documentation regarding this method see Section + 26.3.30. + +

+The arguments are: +

+
srcField
+
ESMF_Field with source data. + +
+
dstField
+
ESMF_Field with destination data. The data in this Field may be + destroyed by this call. + +
+
routehandle
+
Handle to the precomputed Route. + +
+
[srcToDstTransposeMap]
+
A list with as many entries as there are dimensions in srcField, or + tileCount times this many entries. + Each entry maps the corresponding srcField dimension against the + specified dstField dimension. Mixing distributed and + undistributed dimensions is supported. + Negative entries reverse the order of elements along the specified + dimension when going from source to destination. + When providing +$rank \times tileCount$ elements in + srcToDstTransposeMap, each block of size rank is associated + with the corresponding tile (in order), and interpreted as the + tile-specific transpose map. + +
+
[ignoreUnmatchedIndices]
+
A logical flag that affects the behavior for when not all elements match + between the srcField and dstField side. The default setting + is .false., indicating that it is an error when such a situation is + encountered. Setting ignoreUnmatchedIndices to .true. ignores + unmatched indices. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ + +

+ +

+ +

+ +

+26.6.68 ESMF_FieldRegrid - Compute a regridding operation +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_FieldRegrid(srcField, dstField, routehandle, &
+     zeroregion, termorderflag, checkflag, dynamicMask, rc)
+
ARGUMENTS: +
       type(ESMF_Field),               intent(in),    optional :: srcField
+       type(ESMF_Field),               intent(inout), optional :: dstField
+       type(ESMF_RouteHandle),         intent(inout)           :: routehandle
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       type(ESMF_Region_Flag),         intent(in),    optional :: zeroregion
+       type(ESMF_TermOrder_Flag),      intent(in),    optional :: termorderflag
+       logical,                        intent(in),    optional :: checkflag
+       type(ESMF_DynamicMask), target, intent(in),    optional :: dynamicMask
+       integer,                        intent(out),   optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    6.1.0
    +
    Added argument termorderflag. + The new argument gives the user control over the order in which + the src terms are summed up. + +
    +
    7.1.0r
    +
    Added argument dynamicMask. + The new argument supports the dynamic masking feature. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Execute the precomputed regrid operation stored in routehandle to + interpolate from srcField to dstField. See ESMF_FieldRegridStore() on how to + precompute the routehandle. + +

+Both srcField and dstField must match the respective Fields + used during ESMF_FieldRegridStore() in type, kind, and + memory layout of the gridded dimensions. However, the size, number, + and index order of ungridded dimensions may be different. See section + 37.2.5 for a more detailed discussion of RouteHandle + reusability. + +

+The srcField and dstField arguments are optional in support of + the situation where srcField and/or dstField are not defined on + all PETs. The srcField and dstField must be specified on those + PETs that hold source or destination DEs, respectively, but may be omitted + on all other PETs. PETs that hold neither source nor destination DEs may + omit both arguments. + +

+It is erroneous to specify the identical Field object for srcField and + dstField arguments. + +

+This call is collective across the current VM. + +

+

+
[srcField]
+
ESMF_Field with source data. + +
+
[dstField]
+
ESMF_Field with destination data. + +
+
routehandle
+
Handle to the precomputed Route. + +
+
[zeroregion]
+
If set to ESMF_REGION_TOTAL (default) the total regions of + all DEs in dstField will be initialized to zero before updating the + elements with the results of the sparse matrix multiplication. If set to + ESMF_REGION_EMPTY the elements in dstField will not be + modified prior to the sparse matrix multiplication and results will be + added to the incoming element values. Setting zeroregion to + ESMF_REGION_SELECT will only zero out those elements in the + destination Array that will be updated by the sparse matrix + multiplication. See section 54.50 for a complete list of + valid settings. + +
+
[termorderflag]
+
Specifies the order of the source side terms in all of the destination + sums. The termorderflag only affects the order of terms during + the execution of the RouteHandle. See the 37.2.1 section for an + in-depth discussion of all bit-for-bit reproducibility + aspects related to route-based communication methods. + See 54.60 for a full list of options. + The default setting depends on whether the dynamicMask argument + is present or not. With dynamicMask argument present, the default + of termorderflag is ESMF_TERMORDER_SRCSEQ. This ensures + that all source terms are present on the destination side, and + the interpolation can be calculated as a single sum. When + dynamicMask is absent, the default of termorderflag is + ESMF_TERMORDER_FREE, allowing maximum flexibility and partial + sums for optimum performance. + +
+
[checkflag]
+
If set to .TRUE. the input Array pair will be checked for + consistency with the precomputed operation provided by routehandle. + If set to .FALSE. (default) only a very basic input check + will be performed, leaving many inconsistencies undetected. Set + checkflag to .FALSE. to achieve highest performance. + +
+
[dynamicMask]
+
Object holding dynamic masking information. + See section 37.2.6 for a discussion of dynamic masking. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+26.6.69 ESMF_FieldRegridRelease - Free resources used by a regridding operation +

+ +

+ +

+
+INTERFACE: +

       subroutine ESMF_FieldRegridRelease(routehandle, &
+         noGarbage, rc)
+
ARGUMENTS: +
       type(ESMF_RouteHandle), intent(inout)         :: routehandle
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       logical,                intent(in),  optional :: noGarbage
+       integer,                intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    8.0.0
    +
    Added argument noGarbage. + The argument provides a mechanism to override the default garbage collection + mechanism when destroying an ESMF object. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Release resources associated with a regrid operation. After this call + routehandle becomes invalid. + +

+The arguments are: +

+
routehandle
+
Handle to the precomputed Route. + +
+
[noGarbage]
+
If set to .TRUE. the object will be fully destroyed and removed + from the ESMF garbage collection system. Note however that under this + condition ESMF cannot protect against accessing the destroyed object + through dangling aliases - a situation which may lead to hard to debug + application crashes. + +

+It is generally recommended to leave the noGarbage argument + set to .FALSE. (the default), and to take advantage of the ESMF + garbage collection system which will prevent problems with dangling + aliases or incorrect sequences of destroy calls. However this level of + support requires that a small remnant of the object is kept in memory + past the destroy call. This can lead to an unexpected increase in memory + consumption over the course of execution in applications that use + temporary ESMF objects. For situations where the repeated creation and + destruction of temporary objects leads to memory issues, it is + recommended to call with noGarbage set to .TRUE., fully + removing the entire temporary object from memory. + +

+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+26.6.70 ESMF_FieldRegridStore - Precompute a Field regridding operation and return a RouteHandle and weights +

+ +

+ +

+
+INTERFACE: +

   !   Private name; call using ESMF_FieldRegridStore()
+       subroutine ESMF_FieldRegridStoreNX(srcField, dstField, &
+                     srcMaskValues, dstMaskValues, &
+                     regridmethod, &
+                     polemethod, regridPoleNPnts, & 
+                     lineType, &
+                     normType, &
+                     vectorRegrid, & 
+                     extrapMethod, &
+                     extrapNumSrcPnts, &
+                     extrapDistExponent, &
+                     extrapNumLevels, &
+                     unmappedaction, ignoreDegenerate, &
+                     srcTermProcessing, & 
+                     pipeLineDepth, &
+                     routehandle, &
+                     factorList, factorIndexList, & 
+                     weights, indices, &  ! DEPRECATED ARGUMENTS
+                     transposeRoutehandle, &
+                     srcFracField, dstFracField, &
+                     dstStatusField, &
+                     unmappedDstList, &
+                     checkFlag, &
+                     rc)
+
ARGUMENTS: +
       type(ESMF_Field),               intent(in)              :: srcField
+       type(ESMF_Field),               intent(inout)           :: dstField
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       integer(ESMF_KIND_I4),          intent(in),    optional :: srcMaskValues(:)
+       integer(ESMF_KIND_I4),          intent(in),    optional :: dstMaskValues(:)
+       type(ESMF_RegridMethod_Flag),   intent(in),    optional :: regridmethod
+       type(ESMF_PoleMethod_Flag),     intent(in),    optional :: polemethod
+       integer,                        intent(in),    optional :: regridPoleNPnts
+       type(ESMF_LineType_Flag),       intent(in),    optional :: lineType
+       type(ESMF_NormType_Flag),       intent(in),    optional :: normType
+       logical,                        intent(in),    optional :: vectorRegrid
+       type(ESMF_ExtrapMethod_Flag),   intent(in),    optional :: extrapMethod
+       integer,                        intent(in),    optional :: extrapNumSrcPnts
+       real(ESMF_KIND_R4),             intent(in),    optional :: extrapDistExponent
+       integer,                        intent(in),    optional :: extrapNumLevels
+       type(ESMF_UnmappedAction_Flag), intent(in),    optional :: unmappedaction
+       logical,                        intent(in),    optional :: ignoreDegenerate
+       integer,                        intent(inout), optional :: srcTermProcessing
+       integer,                        intent(inout), optional :: pipeLineDepth
+       type(ESMF_RouteHandle),         intent(inout), optional :: routehandle
+       real(ESMF_KIND_R8),             pointer,       optional :: factorList(:)
+       integer(ESMF_KIND_I4),          pointer,       optional :: factorIndexList(:,:)
+       real(ESMF_KIND_R8),    pointer, optional :: weights(:)   ! DEPRECATED ARG
+       integer(ESMF_KIND_I4), pointer, optional :: indices(:,:) ! DEPRECATED ARG
+       type(ESMF_RouteHandle),         intent(inout), optional :: transposeRoutehandle
+       type(ESMF_Field),               intent(inout), optional :: srcFracField
+       type(ESMF_Field),               intent(inout), optional :: dstFracField
+       type(ESMF_Field),               intent(inout), optional :: dstStatusField
+       integer(ESMF_KIND_I4),          pointer,       optional :: unmappedDstList(:)
+       logical,                        intent(in),    optional :: checkFlag
+       integer,                        intent(out),   optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    5.2.0rp1
    +
    Added arguments factorList and factorIndexList. + Started to deprecate arguments weights and indices. + This corrects an inconsistency of this interface with all + other ESMF methods that take these same arguments. + +
    +
    6.1.0
    +
    Added arguments ignoreDegenerate, srcTermProcessing, + pipelineDepth, and unmappedDstList. + The argument ignoreDegenerate allows the user to skip degenerate + cells in the regridding instead of stopping with an error. + The two arguments srcTermProcessing and pipelineDepth + provide access to the tuning parameters affecting the sparse matrix + execution. The argument unmappedDstList allows the user to + get a list of the destination items which the regridding couldn't + map to a source. + +
    +
    6.3.0r
    +
    Added argument lineType. This argument allows the user to + control the path of the line between two points on a sphere surface. + This allows the user to use their preferred line path for the calculation + of distances and the shape of cells during regrid weight calculation on + a sphere. + +
    +
    6.3.0rp1
    +
    Added argument normType. This argument allows the user to + control the type of normalization done during conservative weight generation. + +
    +
    7.1.0r
    +
    Added argument dstStatusField. This argument allows the user to + receive information about what happened to each location in the destination + Field during regridding. + +

    +Added arguments extrapMethod, extrapNumSrcPnts, and + extrapDistExponent. These three new extrapolation arguments allow the + user to extrapolate destination points not mapped by the regrid method. + extrapMethod allows the user to choose the extrapolation method. + extrapNumSrcPnts and extrapDistExponent are parameters that + allow the user to tune the behavior of the ESMF_EXTRAPMETHOD_NEAREST_IDAVG + method. + +

    +
    8.0.0
    +
    Added argument extrapNumLevels. For level based extrapolation methods + (e.g. ESMF_EXTRAPMETHOD_CREEP) this argument allows the user to + set how many levels to extrapolate. + +

    +

    +
    8.1.0
    +
    Added argument checkFlag to enable the user to turn on more + expensive error checking during regrid weight calculation. + +

    +

    +
    8.6.0
    +
    Added argument vectorRegrid to enable the user to turn on vector regridding. This + functionality treats an undistributed dimension of the input Fields as the components of a vector and + maps it through 3D Cartesian space to give more consistent results (especially near the pole) than + just regridding the components individually. + +

    +

    +
    8.8.0
    +
    Added argument transposeRoutehandle to enable the user to retrieve + a routeHandle containing the transpose of the regrid sparse matrix. + +

    +

    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Creates a sparse matrix operation (stored in routehandle) that + contains the calculations and communications necessary to interpolate + from srcField to dstField. The routehandle can then be + used in the call ESMF_FieldRegrid() to interpolate between the + Fields. The user may also get the interpolation matrix in sparse + matrix form via the optional arguments factorList and factorIndexList. + +

+The routehandle generated by this call is based just on the + coordinates in the spatial class (e.g. Grid) contained in the Fields. If those + coordinates don't change the routehandle can + be used repeatedly to interpolate from the source Field to the + destination Field. This is true even if the data in the Fields + changes. The routehandle may also be used to interpolate between any + source and destination Field which are created on the same location + in the same Grid, LocStream, XGrid, or Mesh as the original Fields. + +

+When it's no longer needed the routehandle should be destroyed by + using ESMF_FieldRegridRelease() to free the memory it's using. + +

+Note, as a side effect, that this call may change the data in dstField. If + this is undesirable, then an easy work around is to create a second temporary field + with the same structure as dstField and pass that in instead. + +

+The arguments are: +

+
srcField
+
Source Field. + +
+
dstField
+
Destination Field. The data in this Field may be overwritten by this call. + +
+
[srcMaskValues]
+
Mask information can be set in the Grid (see 31.3.17) or Mesh (see 33.3.11) + upon which the srcField is built. The srcMaskValues argument specifies the values in that + mask information which indicate a source point should be masked out. In other words, a locati on is masked if and only if the + value for that location in the mask information matches one of the values listed in srcMaskValues. + If srcMaskValues is not specified, no masking will occur. + +
+
[dstMaskValues]
+
Mask information can be set in the Grid (see 31.3.17) or Mesh (see 33.3.11) + upon which the dstField is built. The dstMaskValues argument specifies the values in that + mask information which indicate a destination point should be masked out. In other words, a location is masked if and only if the + value for that location in the mask information matches one of the values listed in dstMaskValues. + If dstMaskValues is not specified, no masking will occur. + +
+
[regridmethod]
+
The type of interpolation. Please see Section 54.51 + for a list of valid options. If not specified, defaults to + ESMF_REGRIDMETHOD_BILINEAR. + +
+
[polemethod]
+
Specifies the type of pole + to construct on the source Grid during regridding. Please see + Section 54.48 for a list of + valid options. If not specified, defaults to ESMF_POLEMETHOD_ALLAVG for non-conservative regrid methods, + and ESMF_POLEMETHOD_NONE for conservative methods. + +
+
[regridPoleNPnts]
+
If polemethod is ESMF_POLEMETHOD_NPNTAVG, + then this parameter indicates the number of points over which to average. + If polemethod is not ESMF_POLEMETHOD_NPNTAVG and regridPoleNPnts is specified, + then it will be ignored. + This subroutine will return an error if polemethod is ESMF_POLEMETHOD_NPNTAVG and + regridPoleNPnts is not specified. + +
+
[lineType]
+
This argument controls the path of the line which connects two points on a sphere surface. This in + turn controls the path along which distances are calculated and the shape of the edges that make + up a cell. Both of these quantities can influence how interpolation weights are calculated. + As would be expected, this argument is only applicable when srcField and dstField are + built on grids which lie on the surface of a sphere. Section 54.36 shows a + list of valid options for this argument. Figure 24.2.16 shows + which line types are supported for each regrid method as well as showing the default line type by regrid method. + If not specified, defaults to ESMF_LINETYPE_CART for non-conservative regrid methods, + and ESMF_LINETYPE_GREAT_CIRCLE for conservative methods. + +

+

+
[normType]
+
This argument controls the type of normalization used when generating conservative weights. This option + only applies to weights generated with regridmethod=ESMF_REGRIDMETHOD_CONSERVE or regridmethod=ESMF_REGRIDMETHOD_CONSERVE_2ND + Please see Section 54.45 for a + list of valid options. If not specified normType defaults to ESMF_NORMTYPE_DSTAREA. + +
+
[vectorRegrid]
+
If true, treat a single ungridded dimension in the source and destination Fields + as the components of a vector. If true and there is more than one ungridded dimension in either + the source or destination, then an error will be returned. Currently, only undistributed (vector) dimensions of + size 2 are supported. In the vector dimension, the first entry is interpreted as the east component and the + second as the north component. + In addition, this functionality presently only + works when both the source and destination Fields are build on a geometry (e.g. an ESMF Grid) with + a spherical coordinate system (e.g. ESMF_COORDSYS_SPH_DEG). Also, this functionality is not currently supported with conservative + regrid methods (e.g. regridmethod=ESMF_REGRIDMETHOD_CONSERVE). We expect these restrictions to be loosened over + time as new requirements come in from users. See section 24.2.17 for further + information on this functionality. If not specified, this argument defaults to false. + +
+
[extrapMethod]
+
The type of extrapolation. Please see Section 54.18 + for a list of valid options. If not specified, defaults to + ESMF_EXTRAPMETHOD_NONE. + +
+
[extrapNumSrcPnts]
+
The number of source points to use for the extrapolation methods that use more than one source point + (e.g. ESMF_EXTRAPMETHOD_NEAREST_IDAVG). If not specified, defaults to 8. + +
+
[extrapDistExponent]
+
The exponent to raise the distance to when calculating weights for + the ESMF_EXTRAPMETHOD_NEAREST_IDAVG extrapolation method. A higher value reduces the influence + of more distant points. If not specified, defaults to 2.0. + +
+
[extrapNumLevels]
+
The number of levels to output for the extrapolation methods that fill levels + (e.g. ESMF_EXTRAPMETHOD_CREEP). When a method is used that requires this, then an error will be returned, if it + is not specified. + +
+
[unmappedaction]
+
Specifies what should happen if there are destination points that + can't be mapped to a source cell. Please see Section 54.62 for a + list of valid options. If not specified, unmappedaction defaults to ESMF_UNMAPPEDACTION_ERROR. + +
+
[ignoreDegenerate]
+
Ignore degenerate cells when checking for errors. If this is set to true, then the + regridding proceeds, but degenerate cells will be skipped. If set to false, a degenerate cell produces an error. + If not specified, ignoreDegenerate defaults to false. + +
+
[srcTermProcessing]
+
The srcTermProcessing parameter controls how many source terms, + located on the same PET and summing into the same destination element, + are summed into partial sums on the source PET before being transferred + to the destination PET. A value of 0 indicates that the entire arithmetic + is done on the destination PET; source elements are neither multiplied + by their factors nor added into partial sums before being sent off by the + source PET. A value of 1 indicates that source elements are multiplied + by their factors on the source side before being sent to the destination + PET. Larger values of srcTermProcessing indicate the maximum number + of terms in the partial sums on the source side. + +

+Note that partial sums may lead to bit-for-bit differences in the results. + See section 37.2.1 for an in-depth discussion of all + bit-for-bit reproducibility aspects related to route-based communication + methods. + +

+The ESMF_FieldRegridStore() method implements an auto-tuning scheme + for the srcTermProcessing parameter. The intent on the + srcTermProcessing argument is "inout" in order to + support both overriding and accessing the auto-tuning parameter. + If an argument $>= 0$ is specified, it is used for the + srcTermProcessing parameter, and the auto-tuning phase is skipped. + In this case the srcTermProcessing argument is not modified on + return. If the provided argument is $< 0$, the srcTermProcessing + parameter is determined internally using the auto-tuning scheme. In this + case the srcTermProcessing argument is re-set to the internally + determined value on return. Auto-tuning is also used if the optional + srcTermProcessing argument is omitted. + +

+

+
[pipelineDepth]
+
The pipelineDepth parameter controls how many messages a PET + may have outstanding during a sparse matrix exchange. Larger values + of pipelineDepth typically lead to better performance. However, + on some systems too large a value may lead to performance degradation, + or runtime errors. + +

+Note that the pipeline depth has no effect on the bit-for-bit + reproducibility of the results. However, it may affect the performance + reproducibility of the exchange. + +

+The ESMF_FieldRegridStore() method implements an auto-tuning scheme + for the pipelineDepth parameter. The intent on the + pipelineDepth argument is "inout" in order to + support both overriding and accessing the auto-tuning parameter. + If an argument $>= 0$ is specified, it is used for the + pipelineDepth parameter, and the auto-tuning phase is skipped. + In this case the pipelineDepth argument is not modified on + return. If the provided argument is $< 0$, the pipelineDepth + parameter is determined internally using the auto-tuning scheme. In this + case the pipelineDepth argument is re-set to the internally + determined value on return. Auto-tuning is also used if the optional + pipelineDepth argument is omitted. + +

+
[routehandle]
+
The communication handle that implements the regrid operation and that can be used later in + the ESMF_FieldRegrid() call. The routehandle is optional so that if the + user doesn't need it, then they can indicate that by not requesting it. + The time to compute the routehandle can be a significant fraction of the time + taken by this method, so if it's not needed then not requesting it is worthwhile. + +
+
[factorList]
+
The list of coefficients for a sparse matrix which interpolates from srcField to + dstField. The array coming out of this variable is in the appropriate format to be used + in other ESMF sparse matrix multiply calls, for example ESMF_FieldSMMStore(). + The factorList array is allocated by the method and the user is responsible for + deallocating it. + +
+
[factorIndexList]
+
The indices for a sparse matrix which interpolates from srcField to + dstField. This argument is a 2D array containing pairs of source and destination + sequence indices corresponding to the coefficients in the factorList argument. + The first dimension of factorIndexList is of size 2. factorIndexList(1,:) specifies + the sequence index of the source element in the srcField. factorIndexList(2,:) specifies + the sequence index of the destination element in the dstField. The se cond dimension of + factorIndexList steps through the list of pairs, i.e. size(factorIndexList,2)==size(factorList). + The array coming out of this variable is in the appropriate format to be used + in other ESMF sparse matrix multiply calls, for example ESMF_FieldSMMStore(). + The factorIndexList array is allocated by the method and the user is responsible for deallocating it. + +
+
[weights]
+
DEPRECATED ARGUMENT! Please use the argument factorList instead. + +
+
[indices]
+
DEPRECATED ARGUMENT! Please use the argument factorIndexList instead. + +
+
transposeRoutehandle
+
A routeHandle for the transpose of the regrid sparse matrix. The + transposed operation goes from dstField to srcField. + +
+
[srcFracField]
+
The fraction of each source cell participating in the regridding. Only + valid when regridmethod is ESMF_REGRIDMETHOD_CONSERVE or regridmethod=ESMF_REGRIDMETHOD_CONSERVE_2ND. + This Field needs to be created on the same location (e.g staggerloc) + as the srcField. + +
+
[dstFracField]
+
The fraction of each destination cell participating in the regridding. Only + valid when regridmethod is ESMF_REGRIDMETHOD_CONSERVE or regridmethod=ESMF_REGRIDMETHOD_CONSERVE_2ND. + This Field needs to be created on the same location (e.g staggerloc) + as the dstField. It is important to note that the current implementation + of conservative regridding doesn't normalize the interpolation weights by the destination fraction. This means that for a destination + grid which only partially overlaps the source grid the destination field which is output from the + regrid operation should be divided by the corresponding destination fraction to yield the + true interpolated values for cells which are only partially covered by the source grid. + +
+
[dstStatusField]
+
An ESMF Field which outputs a regrid status value for each destination location. + Section 54.52 indicates the meaning of each value. The Field needs to + be built on the same location (e.g. staggerloc) in the same Grid, Mesh, XGrid, or LocStream as the dstField argument. + The Field also needs to be of typekind ESMF_TYPEKIND_I4. This option currently doesn't work with + the ESMF_REGRIDMETHOD_NEAREST_DTOS regrid method. + +
+
[unmappedDstList]
+
The list of the sequence indices for locations in dstField which couldn't be mapped the srcField. + The list on each PET only contains the unmapped locations for the piece of the dstField on that PET. + If a destination point is masked, it won't be put in this list. This option currently doesn't work with + the ESMF_REGRIDMETHOD_NEAREST_DTOS regrid method. + +
+
[checkFlag]
+
If set to .FALSE. (default) only quick error checking + will be performed. If set to .TRUE. more expensive error checking + will be performed, possibly catching more errors. Set + checkFlag to .FALSE. to achieve highest performance. + The checkFlag currently only turns on checking for conservative regrid methods + (e.g. ESMF_REGRIDMETHOD_CONSERVE). + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+26.6.71 ESMF_FieldRegridStore - Precompute a Field regridding operation between an XGrid and one of its side Grids or Meshes +

+ +

+ +

+
+INTERFACE: +

   !   Private name; call using ESMF_FieldRegridStore()
+     subroutine ESMF_FieldRegridStoreX(xgrid, srcField, dstField, &
+                     regridmethod, &
+                     srcTermProcessing, pipeLineDepth, &
+                     routehandle, &
+                     srcFracField, dstFracField, &
+                     srcMergeFracField, dstMergeFracField, rc)
+
ARGUMENTS: +
       type(ESMF_XGrid),       intent(in)                      :: xgrid
+       type(ESMF_Field),       intent(in)                      :: srcField
+       type(ESMF_Field),       intent(inout)                   :: dstField
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       type(ESMF_RegridMethod_Flag),   intent(in),    optional :: regridmethod
+       integer,                        intent(inout), optional :: srcTermProcessing
+       integer,                        intent(inout), optional :: pipeLineDepth
+       type(ESMF_RouteHandle), intent(inout), optional         :: routehandle
+       type(ESMF_Field),       intent(inout), optional         :: srcFracField
+       type(ESMF_Field),       intent(inout), optional         :: dstFracField
+       type(ESMF_Field),       intent(inout), optional         :: srcMergeFracField
+       type(ESMF_Field),       intent(inout), optional         :: dstMergeFracField
+       integer,                intent(out),   optional         :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    5.3.0
    +
    Added arguments srcFracField, dstFracField, srcMergeFracField, and dstMergeFracField. + These fraction Fields allow a user to calculate correct flux regridded through ESMF_XGrid. + +
    +
    7.1.0r
    +
    Added argument regridmethod. This new argument allows the user to choose the regrid method + to apply when computing the routehandle. + +
    +
    8.5.0
    +
    Added arguments srcTermProcessing and pipelineDepth to + provide access to the tuning parameters affecting the sparse matrix + execution. See the text for details on the impact + srcTermProcessing can have on bit-for-bit reproducibility. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+This method creates a RouteHandle to do conservative interpolation specifically between a + Field built on an XGrid and a Field build on one of the Grids or Meshes used to create that XGrid. + (To do more general interpolation use the ESMF_FieldRegridStore() method + in section 26.6.70.) The RouteHandle produced by this method can then be used in the call + ESMF_FieldRegrid() to interpolate from the srcField to the dstField. + +

+The RouteHandle generated by this call is based just on the + coordinates in the Grids, XGrids, or Meshes contained in the Fields. If those + coordinates don't change the RouteHandle can + be used repeatedly to interpolate from the source Field to the + destination Field. This is true even if the data in the Fields + changes. The RouteHandle may also be used to interpolate between any + source and destination Field which are created + on the same Grid, XGrid, or Mesh as the original Fields. + +

+When it's no longer needed the RouteHandle should be destroyed by + using ESMF_FieldRegridRelease() to free the memory it's using. + +

+Note, as a side effect, that this call may change the data in dstField. If + this is undesirable, then an easy work around is to create a second temporary Field + with the same structure as dstField and pass that in instead. + +

+The arguments are: +

+
xgrid
+
Exchange Grid. + +
+
srcField
+
Source Field built on either xgrid or one of the Grids or Meshes used to create xgrid. + +
+
dstField
+
Destination Field built on either xgrid or one of the Grids or Meshes used to create xgrid. + The data in this Field may be overwritten by this call. + +
+
[regridmethod]
+
The type of interpolation. For this method only + ESMF_REGRIDMETHOD_CONSERVE and ESMF_REGRIDMETHOD_CONSERVE_2ND are + supported. If not specified, defaults to ESMF_REGRIDMETHOD_CONSERVE. + +
+
[srcTermProcessing]
+
The srcTermProcessing parameter controls how many source terms, + located on the same PET and summing into the same destination element, + are summed into partial sums on the source PET before being transferred + to the destination PET. A value of 0 indicates that the entire arithmetic + is done on the destination PET; source elements are neither multiplied + by their factors nor added into partial sums before being sent off by the + source PET. A value of 1 indicates that source elements are multiplied + by their factors on the source side before being sent to the destination + PET. Larger values of srcTermProcessing indicate the maximum number + of terms in the partial sums on the source side. + +

+Note that partial sums may lead to bit-for-bit differences in the results. + See section 37.2.1 for an in-depth discussion of all + bit-for-bit reproducibility aspects related to route-based communication + methods. + +

+The ESMF_FieldRegridStore() method implements an auto-tuning scheme + for the srcTermProcessing parameter. The intent on the + srcTermProcessing argument is "inout" in order to + support both overriding and accessing the auto-tuning parameter. + If an argument $>= 0$ is specified, it is used for the + srcTermProcessing parameter, and the auto-tuning phase is skipped. + In this case the srcTermProcessing argument is not modified on + return. If the provided argument is $< 0$, the srcTermProcessing + parameter is determined internally using the auto-tuning scheme. In this + case the srcTermProcessing argument is re-set to the internally + determined value on return. Auto-tuning is also used if the optional + srcTermProcessing argument is omitted. + +

+

+
[pipelineDepth]
+
The pipelineDepth parameter controls how many messages a PET + may have outstanding during a sparse matrix exchange. Larger values + of pipelineDepth typically lead to better performance. However, + on some systems too large a value may lead to performance degradation, + or runtime errors. + +

+Note that the pipeline depth has no effect on the bit-for-bit + reproducibility of the results. However, it may affect the performance + reproducibility of the exchange. + +

+The ESMF_FieldRegridStore() method implements an auto-tuning scheme + for the pipelineDepth parameter. The intent on the + pipelineDepth argument is "inout" in order to + support both overriding and accessing the auto-tuning parameter. + If an argument $>= 0$ is specified, it is used for the + pipelineDepth parameter, and the auto-tuning phase is skipped. + In this case the pipelineDepth argument is not modified on + return. If the provided argument is $< 0$, the pipelineDepth + parameter is determined internally using the auto-tuning scheme. In this + case the pipelineDepth argument is re-set to the internally + determined value on return. Auto-tuning is also used if the optional + pipelineDepth argument is omitted. + +

+
[routehandle]
+
The handle that implements the regrid and that can be used in later + ESMF_FieldRegrid. + +
+
[srcFracField]
+
The fraction of each source cell participating in the regridding returned from this call. + This Field needs to be created on the same Grid and location (e.g staggerloc) + as the srcField. + +
+
[dstFracField]
+
The fraction of each destination cell participating in the regridding returned from this call. + This Field needs to be created on the same Grid and location (e.g staggerloc) + as the dstField. + +
+
[srcMergeFracField]
+
The fraction of each source cell as a result of Grid merge returned from this call. + This Field needs to be created on the same Grid and location (e.g staggerloc) + as the srcField. + +
+
[dstMergeFracField]
+
The fraction of each destination cell as a result of Grid merge returned from this call. + This Field needs to be created on the same Grid and location (e.g staggerloc) + as the dstField. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+26.6.72 ESMF_FieldRegridGetArea - Get the area of the cells used for conservative interpolation +

+ +

+ +

+
+INTERFACE: +

       subroutine ESMF_FieldRegridGetArea(areaField, rc)
+
RETURN VALUE: +
+
ARGUMENTS: +
       type(ESMF_Field), intent(inout)                 :: areaField
+       integer, intent(out), optional                  :: rc
+
+DESCRIPTION: +
+ +

+This subroutine gets the area of the cells used for conservative interpolation for the grid object + associated with areaField and puts them into areaField. If created on a 2D Grid, it must + be built on the ESMF_STAGGERLOC_CENTER stagger location. + If created on a 3D Grid, it must be built on the ESMF_STAGGERLOC_CENTER_VCENTER stagger + location. If created on a Mesh, it must be built on the ESMF_MESHLOC_ELEMENT mesh location. + +

+If the user has set the area in the Grid, Mesh, or XGrid under areaField, then that's the area that's + returned in the units that the user set it in. If the user hasn't set the area, then the area is + calculated and returned. If the Grid, Mesh, or XGrid is on the surface of a sphere, then the calculated area is in + units of square radians. If the Grid, Mesh, or XGrid is + Cartesian, then the calculated area is in square units of whatever unit the coordinates are in. + +

+The arguments are: +

+
areaField
+
The Field to put the area values in. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ + +

+ +

+ +

+ +

+26.6.73 ESMF_FieldScatter - Scatter a Fortran array across the ESMF_Field +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_FieldScatter<rank><type><kind>(field, farray, & 
+   rootPet, tile, vm, rc)
+
ARGUMENTS: +
   type(ESMF_Field), intent(inout) :: field 
+   mtype (ESMF_KIND_mtypekind),intent(in), target :: farray(mdim) 
+   integer, intent(in) :: rootPet 
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+   integer, intent(in), optional :: tile 
+   type(ESMF_VM), intent(in), optional :: vm 
+   integer, intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Scatter the data of farray located on rootPET + across an ESMF_Field object. A single farray must be + scattered across a single DistGrid tile in Field. The optional tile + argument allows selection of the tile. For Fields defined on a single + tile DistGrid the default selection (tile 1) will be correct. The + shape of farray must match the shape of the tile in Field. + +

+If the Field contains replicating DistGrid dimensions data will be + scattered across all of the replicated pieces. + +

+The implementation of Scatter and Gather is not sequence index based. + If the Field is built on arbitrarily distributed Grid, Mesh, LocStream or XGrid, + Scatter will not scatter data from rootPet + to the destination data points corresponding to the sequence index on the rootPet. + Instead Scatter will scatter a contiguous memory range from rootPet to + destination PET. The size of the memory range is equal to the number of + data elements on the destination PET. Vice versa for the Gather operation. + In this case, the user should use ESMF_FieldRedist to achieve + the same data operation result. For examples how to use ESMF_FieldRedist + to perform Gather and Scatter, please refer to + 26.3.32 and + 26.3.31. + +

+This version of the interface implements the PET-based blocking paradigm: + Each PET of the VM must issue this call exactly once for all of its + DEs. The call will block until all PET-local data objects are accessible. + +

+For examples and associated documentation regarding this method see Section + 26.3.29. + +

+The arguments are: +

+
field
+
The ESMF_Field object across which data will be scattered. + +
+
{farray}
+
The Fortran array that is to be scattered. Only root + must provide a valid farray, the other PETs may treat + farray as an optional argument. + +
+
rootPet
+
PET that holds the valid data in farray. + +
+
[tile]
+
The DistGrid tile in field into which to scatter farray. + By default farray will be scattered into tile 1. + +
+
[vm]
+
Optional ESMF_VM object of the current context. Providing the + VM of the current context will lower the method's overhead. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ + +

+ +

+ +

+ +

+26.6.74 ESMF_FieldSet - Set object-wide Field information +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_FieldSet(field, name, rc)
+
ARGUMENTS: +
     type(ESMF_Field),   intent(inout)         :: field
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     character(len = *), intent(in),  optional :: name
+     integer,            intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Sets adjustable settings in an ESMF_Field object. + +

+The arguments are: +

+
field
+
ESMF_Field object for which to set properties. + +
+
[name]
+
The Field name. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+26.6.75 ESMF_FieldSync - Synchronize DEs across the Field in case of sharing +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_FieldSync(field, rc)
+
ARGUMENTS: +
     type(ESMF_Field), intent(in)            :: field
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,          intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Synchronizes access to DEs across field to make sure PETs correctly + access the data for read and write when DEs are shared. + +

+The arguments are: +

+
field
+
Specified ESMF_Field object. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ + +

+ +

+ +

+ +

+26.6.76 ESMF_FieldSMM - Execute a Field sparse matrix multiplication +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_FieldSMM(srcField, dstField, routehandle, &
+              zeroregion, termorderflag, checkflag, rc)
+
ARGUMENTS: +
         type(ESMF_Field),          intent(in),    optional  :: srcField
+         type(ESMF_Field),          intent(inout), optional  :: dstField
+         type(ESMF_RouteHandle),    intent(inout)            :: routehandle
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+         type(ESMF_Region_Flag),    intent(in),    optional  :: zeroregion
+         type(ESMF_TermOrder_Flag), intent(in),    optional  :: termorderflag
+         logical,                   intent(in),    optional  :: checkflag
+         integer,                   intent(out),   optional  :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
    +
    6.1.0
    +
    Added argument termorderflag. + The new argument gives the user control over the order in which + the src terms are summed up. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Execute a precomputed Field sparse matrix multiplication from srcField to + dstField. + Both srcField and dstField must match the respective Fields + used during ESMF_FieldSMMStore() in type, kind, and + memory layout of the gridded dimensions. However, the size, number, + and index order of ungridded dimensions may be different. See section + 37.2.5 for a more detailed discussion of RouteHandle + reusability. + +

+The srcField and dstField arguments are optional in support of + the situation where srcField and/or dstField are not defined on + all PETs. The srcField and dstField must be specified on those + PETs that hold source or destination DEs, respectively, but may be omitted + on all other PETs. PETs that hold neither source nor destination DEs may + omit both arguments. + +

+It is erroneous to specify the identical Field object for srcField and + dstField arguments. + +

+See ESMF_FieldSMMStore() on how to precompute + routehandle. + +

+This call is collective across the current VM. + +

+For examples and associated documentation regarding this method see Section + 26.3.33. + +

+

+
[srcField]
+
ESMF_Field with source data. + +
+
[dstField]
+
ESMF_Field with destination data. + +
+
routehandle
+
Handle to the precomputed Route. + +
+
[zeroregion]
+
If set to ESMF_REGION_TOTAL (default) the total regions of + all DEs in dstField will be initialized to zero before updating the + elements with the results of the sparse matrix multiplication. If set to + ESMF_REGION_EMPTY the elements in dstField will not be + modified prior to the sparse matrix multiplication and results will be + added to the incoming element values. Setting zeroregion to + ESMF_REGION_SELECT will only zero out those elements in the + destination Field that will be updated by the sparse matrix + multiplication. See section 54.50 for a complete list of + valid settings. + +
+
[termorderflag]
+
Specifies the order of the source side terms in all of the destination + sums. The termorderflag only affects the order of terms during + the execution of the RouteHandle. See the 37.2.1 section for an + in-depth discussion of all bit-for-bit reproducibility + aspects related to route-based communication methods. + See 54.60 for a full list of options. + The default is ESMF_TERMORDER_FREE, allowing maximum flexibility + in the order of terms for optimum performance. + +
+
[checkflag]
+
If set to .TRUE. the input Field pair will be checked for + consistency with the precomputed operation provided by routehandle. + If set to .FALSE. (default) only a very basic input check + will be performed, leaving many inconsistencies undetected. Set + checkflag to .FALSE. to achieve highest performance. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+26.6.77 ESMF_FieldSMMRelease - Release resources associated with Field +

+ +

+sparse matrix multiplication + +

+ +

+
+INTERFACE: +

   subroutine ESMF_FieldSMMRelease(routehandle, noGarbage, rc)
+
ARGUMENTS: +
         type(ESMF_RouteHandle), intent(inout)           :: routehandle
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+         logical,                intent(in),   optional  :: noGarbage
+         integer,                intent(out),  optional  :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    8.0.0
    +
    Added argument noGarbage. + The argument provides a mechanism to override the default garbage collection + mechanism when destroying an ESMF object. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Release resources associated with a Field sparse matrix multiplication. After this call + routehandle becomes invalid. + +

+

+
routehandle
+
Handle to the precomputed Route. + +
+
[noGarbage]
+
If set to .TRUE. the object will be fully destroyed and removed + from the ESMF garbage collection system. Note however that under this + condition ESMF cannot protect against accessing the destroyed object + through dangling aliases - a situation which may lead to hard to debug + application crashes. + +

+It is generally recommended to leave the noGarbage argument + set to .FALSE. (the default), and to take advantage of the ESMF + garbage collection system which will prevent problems with dangling + aliases or incorrect sequences of destroy calls. However this level of + support requires that a small remnant of the object is kept in memory + past the destroy call. This can lead to an unexpected increase in memory + consumption over the course of execution in applications that use + temporary ESMF objects. For situations where the repeated creation and + destruction of temporary objects leads to memory issues, it is + recommended to call with noGarbage set to .TRUE., fully + removing the entire temporary object from memory. + +

+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+26.6.78 ESMF_FieldSMMStore - Precompute Field sparse matrix multiplication with local factors +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_FieldSMMStore() 
+   subroutine ESMF_FieldSMMStore<type><kind>(srcField, dstField, & 
+          routehandle, factorList, factorIndexList, &
+          ignoreUnmatchedIndices, srcTermProcessing, pipelineDepth, rc)
+
ARGUMENTS: +
     type(ESMF_Field),         intent(in)              :: srcField  
+     type(ESMF_Field),         intent(inout)           :: dstField  
+     type(ESMF_RouteHandle),   intent(inout)           :: routehandle
+     <type>(ESMF_KIND_<kind>), intent(in)              :: factorList(:) 
+     integer,                  intent(in),             :: factorIndexList(:,:) 
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     logical,                  intent(in),    optional :: ignoreUnmatchedIndices
+     integer,                  intent(inout), optional :: srcTermProcessing
+     integer,                  intent(inout), optional :: pipeLineDepth
+     integer,                  intent(out),   optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    6.1.0
    +
    Added arguments srcTermProcessing, pipelineDepth + The two arguments srcTermProcessing and pipelineDepth + provide access to the tuning parameters affecting the sparse matrix + execution. + +
    +
    7.0.0
    +
    Added argument transposeRoutehandle to allow a handle to + the transposed matrix operation to be returned. +
    +Added argument ignoreUnmatchedIndices to support sparse + matrices that contain elements with indices that do not have a + match within the source or destination Array. + +
    +
    7.1.0r
    +
    Removed argument transposeRoutehandle and provide it + via interface overloading instead. This allows argument + srcField to stay strictly intent(in) for this entry point. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Store a Field sparse matrix multiplication operation from srcField + to dstField. PETs that specify non-zero matrix coefficients must use + the <type><kind> overloaded interface and provide the factorList and + factorIndexList arguments. Providing factorList and + factorIndexList arguments with size(factorList) = (/0/) and + size(factorIndexList) = (/2,0/) or (/4,0/) indicates that a + PET does not provide matrix elements. Alternatively, PETs that do not + provide matrix elements may also call into the overloaded interface + without factorList and factorIndexList arguments. + +

+Both srcField and dstField are interpreted as sequentialized + vectors. The + sequence is defined by the order of DistGrid dimensions and the order of + tiles within the DistGrid or by user-supplied arbitrary sequence indices. See + section 28.2.18 for details on the definition of sequence indices. + SMM corresponds to an identity mapping of the source Field vector to + the destination Field vector. + +

+Source and destination Fields may be of different <type><kind>. Further source + and destination Fields may differ in shape, however, the number of elements + must match. + +

+It is erroneous to specify the identical Field object for srcField and dstField + arguments. + +

+The routine returns an ESMF_RouteHandle that can be used to call + ESMF_FieldSMM() on any pair of Fields that matches + srcField and dstField in type, kind, and + memory layout of the gridded dimensions. However, the size, number, + and index order of ungridded dimensions may be different. See section + 37.2.5 for a more detailed discussion of RouteHandle + reusability. + +

+This method is overloaded for: +
+ ESMF_TYPEKIND_I4, ESMF_TYPEKIND_I8, +
+ ESMF_TYPEKIND_R4, ESMF_TYPEKIND_R8. +
+ +

+This call is collective across the current VM. + +

+For examples and associated documentation regarding this method see Section + 26.3.33. + +

+The arguments are: + +

+

+
srcField
+
ESMF_Field with source data. + +

+

+
dstField
+
ESMF_Field with destination data. The data in this Field may be + destroyed by this call. + +

+

+
routehandle
+
Handle to the precomputed Route. + +

+

+
factorList
+
List of non-zero coefficients. + +

+

+
factorIndexList
+
Pairs of sequence indices for the factors stored in factorList. + +

+The second dimension of factorIndexList steps through the list of + pairs, i.e. size(factorIndexList,2) == size(factorList). The first + dimension of factorIndexList is either of size 2 or size 4. + + The second dimension of factorIndexList steps through the list of + +

+In the size 2 format factorIndexList(1,:) specifies the + sequence index of the source element in the srcField while + factorIndexList(2,:) specifies the sequence index of the + destination element in dstField. For this format to be a valid + option source and destination Fields must have matching number of + tensor elements (the product of the sizes of all Field tensor dimensions). + Under this condition an identity matrix can be applied within the space of + tensor elements for each sparse matrix factor. + +

+The size 4 format is more general and does not require a matching + tensor element count. Here the factorIndexList(1,:) specifies the + sequence index while factorIndexList(2,:) specifies the tensor + sequence index of the source element in the srcField. Further + factorIndexList(3,:) specifies the sequence index and + factorIndexList(4,:) specifies the tensor sequence index of the + destination element in the dstField. + +

+See section 28.2.18 for details on the definition of + Field sequence indices and tensor sequence indices. + +

+

+
[ignoreUnmatchedIndices]
+
A logical flag that affects the behavior for when sequence indices + in the sparse matrix are encountered that do not have a match on the + srcField or dstField side. The default setting is + .false., indicating that it is an error when such a situation is + encountered. Setting ignoreUnmatchedIndices to .true. ignores + entries with unmatched indices. + +

+

+
[srcTermProcessing]
+
The srcTermProcessing parameter controls how many source terms, + located on the same PET and summing into the same destination element, + are summed into partial sums on the source PET before being transferred + to the destination PET. A value of 0 indicates that the entire arithmetic + is done on the destination PET; source elements are neither multiplied + by their factors nor added into partial sums before being sent off by the + source PET. A value of 1 indicates that source elements are multiplied + by their factors on the source side before being sent to the destination + PET. Larger values of srcTermProcessing indicate the maximum number + of terms in the partial sums on the source side. + +

+Note that partial sums may lead to bit-for-bit differences in the results. + See section 37.2.1 for an in-depth discussion of all + bit-for-bit reproducibility aspects related to route-based communication + methods. + +

+The ESMF_FieldSMMStore() method implements an auto-tuning scheme + for the srcTermProcessing parameter. The intent on the + srcTermProcessing argument is "inout" in order to + support both overriding and accessing the auto-tuning parameter. + If an argument $>= 0$ is specified, it is used for the + srcTermProcessing parameter, and the auto-tuning phase is skipped. + In this case the srcTermProcessing argument is not modified on + return. If the provided argument is $< 0$, the srcTermProcessing + parameter is determined internally using the auto-tuning scheme. In this + case the srcTermProcessing argument is re-set to the internally + determined value on return. Auto-tuning is also used if the optional + srcTermProcessing argument is omitted. + +

+

+
[pipelineDepth]
+
The pipelineDepth parameter controls how many messages a PET + may have outstanding during a sparse matrix exchange. Larger values + of pipelineDepth typically lead to better performance. However, + on some systems too large a value may lead to performance degradation, + or runtime errors. + +

+Note that the pipeline depth has no effect on the bit-for-bit + reproducibility of the results. However, it may affect the performance + reproducibility of the exchange. + +

+The ESMF_FieldSMMStore() method implements an auto-tuning scheme + for the pipelineDepth parameter. The intent on the + pipelineDepth argument is "inout" in order to + support both overriding and accessing the auto-tuning parameter. + If an argument $>= 0$ is specified, it is used for the + pipelineDepth parameter, and the auto-tuning phase is skipped. + In this case the pipelineDepth argument is not modified on + return. If the provided argument is $< 0$, the pipelineDepth + parameter is determined internally using the auto-tuning scheme. In this + case the pipelineDepth argument is re-set to the internally + determined value on return. Auto-tuning is also used if the optional + pipelineDepth argument is omitted. + +

+

+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +

+

+
+ +

+ +

+ +

+26.6.79 ESMF_FieldSMMStore - Precompute Field sparse matrix multiplication and transpose with local factors +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_FieldSMMStore() 
+   subroutine ESMF_FieldSMMStore<type><kind>TR(srcField, dstField, & 
+          routehandle, transposeRoutehandle, factorList, factorIndexList, &
+          ignoreUnmatchedIndices, srcTermProcessing, &
+          pipelineDepth, rc)
+
ARGUMENTS: +
     type(ESMF_Field),         intent(inout)           :: srcField  
+     type(ESMF_Field),         intent(inout)           :: dstField  
+     type(ESMF_RouteHandle),   intent(inout)           :: routehandle
+     type(ESMF_RouteHandle),   intent(inout)           :: transposeRoutehandle
+     <type>(ESMF_KIND_<kind>), intent(in)              :: factorList(:) 
+     integer,                  intent(in),             :: factorIndexList(:,:) 
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     logical,                  intent(in),    optional :: ignoreUnmatchedIndices
+     integer,                  intent(inout), optional :: srcTermProcessing
+     integer,                  intent(inout), optional :: pipeLineDepth
+     integer,                  intent(out),   optional :: rc
+
+DESCRIPTION: +
+ +

+Store a Field sparse matrix multiplication operation from srcField + to dstField. PETs that specify non-zero matrix coefficients must use + the <type><kind> overloaded interface and provide the factorList and + factorIndexList arguments. Providing factorList and + factorIndexList arguments with size(factorList) = (/0/) and + size(factorIndexList) = (/2,0/) or (/4,0/) indicates that a + PET does not provide matrix elements. Alternatively, PETs that do not + provide matrix elements may also call into the overloaded interface + without factorList and factorIndexList arguments. + +

+Both srcField and dstField are interpreted as sequentialized + vectors. The + sequence is defined by the order of DistGrid dimensions and the order of + tiles within the DistGrid or by user-supplied arbitrary sequence indices. See + section 28.2.18 for details on the definition of sequence indices. + SMM corresponds to an identity mapping of the source Field vector to + the destination Field vector. + +

+Source and destination Fields may be of different <type><kind>. Further source + and destination Fields may differ in shape, however, the number of elements + must match. + +

+It is erroneous to specify the identical Field object for srcField and dstField + arguments. + +

+The routine returns an ESMF_RouteHandle that can be used to call + ESMF_FieldSMM() on any pair of Fields that matches + srcField and dstField in type, kind, and + memory layout of the gridded dimensions. However, the size, number, + and index order of ungridded dimensions may be different. See section + 37.2.5 for a more detailed discussion of RouteHandle + reusability. + +

+This method is overloaded for: +
+ ESMF_TYPEKIND_I4, ESMF_TYPEKIND_I8, +
+ ESMF_TYPEKIND_R4, ESMF_TYPEKIND_R8. +
+ +

+This call is collective across the current VM. + +

+For examples and associated documentation regarding this method see Section + 26.3.33. + +

+The arguments are: + +

+

+
srcField
+
ESMF_Field with source data. The data in this Array may be + destroyed by this call. + +

+

+
dstField
+
ESMF_Field with destination data. The data in this Field may be + destroyed by this call. + +

+

+
routehandle
+
Handle to the precomputed Route. + +

+

+
transposeRoutehandle
+
A handle to the transposed matrix operation is returned. The + transposed operation goes from dstArray to srcArray. + +

+

+
factorList
+
List of non-zero coefficients. + +

+

+
factorIndexList
+
Pairs of sequence indices for the factors stored in factorList. + +

+The second dimension of factorIndexList steps through the list of + pairs, i.e. size(factorIndexList,2) == size(factorList). The first + dimension of factorIndexList is either of size 2 or size 4. + + The second dimension of factorIndexList steps through the list of + +

+In the size 2 format factorIndexList(1,:) specifies the + sequence index of the source element in the srcField while + factorIndexList(2,:) specifies the sequence index of the + destination element in dstField. For this format to be a valid + option source and destination Fields must have matching number of + tensor elements (the product of the sizes of all Field tensor dimensions). + Under this condition an identity matrix can be applied within the space of + tensor elements for each sparse matrix factor. + +

+The size 4 format is more general and does not require a matching + tensor element count. Here the factorIndexList(1,:) specifies the + sequence index while factorIndexList(2,:) specifies the tensor + sequence index of the source element in the srcField. Further + factorIndexList(3,:) specifies the sequence index and + factorIndexList(4,:) specifies the tensor sequence index of the + destination element in the dstField. + +

+See section 28.2.18 for details on the definition of + Field sequence indices and tensor sequence indices. + +

+

+
[ignoreUnmatchedIndices]
+
A logical flag that affects the behavior for when sequence indices + in the sparse matrix are encountered that do not have a match on the + srcField or dstField side. The default setting is + .false., indicating that it is an error when such a situation is + encountered. Setting ignoreUnmatchedIndices to .true. ignores + entries with unmatched indices. + +

+

+
[srcTermProcessing]
+
The srcTermProcessing parameter controls how many source terms, + located on the same PET and summing into the same destination element, + are summed into partial sums on the source PET before being transferred + to the destination PET. A value of 0 indicates that the entire arithmetic + is done on the destination PET; source elements are neither multiplied + by their factors nor added into partial sums before being sent off by the + source PET. A value of 1 indicates that source elements are multiplied + by their factors on the source side before being sent to the destination + PET. Larger values of srcTermProcessing indicate the maximum number + of terms in the partial sums on the source side. + +

+Note that partial sums may lead to bit-for-bit differences in the results. + See section 37.2.1 for an in-depth discussion of all + bit-for-bit reproducibility aspects related to route-based communication + methods. + +

+The ESMF_FieldSMMStore() method implements an auto-tuning scheme + for the srcTermProcessing parameter. The intent on the + srcTermProcessing argument is "inout" in order to + support both overriding and accessing the auto-tuning parameter. + If an argument $>= 0$ is specified, it is used for the + srcTermProcessing parameter, and the auto-tuning phase is skipped. + In this case the srcTermProcessing argument is not modified on + return. If the provided argument is $< 0$, the srcTermProcessing + parameter is determined internally using the auto-tuning scheme. In this + case the srcTermProcessing argument is re-set to the internally + determined value on return. Auto-tuning is also used if the optional + srcTermProcessing argument is omitted. + +

+

+
[pipelineDepth]
+
The pipelineDepth parameter controls how many messages a PET + may have outstanding during a sparse matrix exchange. Larger values + of pipelineDepth typically lead to better performance. However, + on some systems too large a value may lead to performance degradation, + or runtime errors. + +

+Note that the pipeline depth has no effect on the bit-for-bit + reproducibility of the results. However, it may affect the performance + reproducibility of the exchange. + +

+The ESMF_FieldSMMStore() method implements an auto-tuning scheme + for the pipelineDepth parameter. The intent on the + pipelineDepth argument is "inout" in order to + support both overriding and accessing the auto-tuning parameter. + If an argument $>= 0$ is specified, it is used for the + pipelineDepth parameter, and the auto-tuning phase is skipped. + In this case the pipelineDepth argument is not modified on + return. If the provided argument is $< 0$, the pipelineDepth + parameter is determined internally using the auto-tuning scheme. In this + case the pipelineDepth argument is re-set to the internally + determined value on return. Auto-tuning is also used if the optional + pipelineDepth argument is omitted. + +

+

+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +

+

+
+ +

+ +

+ +

+26.6.80 ESMF_FieldSMMStore - Precompute Field sparse matrix multiplication without local factors +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_FieldSMMStore() 
+     subroutine ESMF_FieldSMMStoreNF(srcField, dstField, &
+         routehandle, ignoreUnmatchedIndices, &
+         srcTermProcessing, pipelineDepth, rc)
+
ARGUMENTS: +
         type(ESMF_Field),       intent(in)              :: srcField  
+         type(ESMF_Field),       intent(inout)           :: dstField  
+         type(ESMF_RouteHandle), intent(inout)           :: routehandle
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+         logical,                intent(in),    optional :: ignoreUnmatchedIndices
+         integer,                intent(inout), optional :: srcTermProcessing
+         integer,                intent(inout), optional :: pipeLineDepth
+         integer,                intent(out),   optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    6.1.0
    +
    Added arguments srcTermProcessing, pipelineDepth + The two arguments srcTermProcessing and pipelineDepth + provide access to the tuning parameters affecting the sparse matrix + execution. + +
    +
    7.0.0
    +
    Added argument transposeRoutehandle to allow a handle to + the transposed matrix operation to be returned. +
    +Added argument ignoreUnmatchedIndices to support sparse + matrices that contain elements with indices that do not have a + match within the source or destination Array. + +
    +
    7.1.0r
    +
    Removed argument transposeRoutehandle and provide it + via interface overloading instead. This allows argument + srcField to stay strictly intent(in) for this entry point. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Store a Field sparse matrix multiplication operation from srcField + to dstField. PETs that specify non-zero matrix coefficients must use + the <type><kind> overloaded interface and provide the factorList and + factorIndexList arguments. Providing factorList and + factorIndexList arguments with size(factorList) = (/0/) and + size(factorIndexList) = (/2,0/) or (/4,0/) indicates that a + PET does not provide matrix elements. Alternatively, PETs that do not + provide matrix elements may also call into the overloaded interface + without factorList and factorIndexList arguments. + +

+Both srcField and dstField are interpreted as sequentialized + vectors. The + sequence is defined by the order of DistGrid dimensions and the order of + tiles within the DistGrid or by user-supplied arbitrary sequence indices. See + section 28.2.18 for details on the definition of sequence indices. + SMM corresponds to an identity mapping of the source Field vector to + the destination Field vector. + +

+Source and destination Fields may be of different <type><kind>. Further source + and destination Fields may differ in shape, however, the number of elements + must match. + +

+It is erroneous to specify the identical Field object for srcField and dstField + arguments. + +

+The routine returns an ESMF_RouteHandle that can be used to call + ESMF_FieldSMM() on any pair of Fields that matches + srcField and dstField in type, kind, and + memory layout of the gridded dimensions. However, the size, number, + and index order of ungridded dimensions may be different. See section + 37.2.5 for a more detailed discussion of RouteHandle + reusability. + +

+This method is overloaded for: +
+ ESMF_TYPEKIND_I4, ESMF_TYPEKIND_I8, +
+ ESMF_TYPEKIND_R4, ESMF_TYPEKIND_R8. +
+ +

+This call is collective across the current VM. + +

+For examples and associated documentation regarding this method see Section + 26.3.33. + +

+The arguments are: + +

+

+
srcField
+
ESMF_Field with source data. + +

+

+
dstField
+
ESMF_Field with destination data. The data in this Field may be + destroyed by this call. + +

+

+
routehandle
+
Handle to the precomputed Route. + +

+

+
[ignoreUnmatchedIndices]
+
A logical flag that affects the behavior for when sequence indices + in the sparse matrix are encountered that do not have a match on the + srcField or dstField side. The default setting is + .false., indicating that it is an error when such a situation is + encountered. Setting ignoreUnmatchedIndices to .true. ignores + entries with unmatched indices. + +

+

+
[srcTermProcessing]
+
The srcTermProcessing parameter controls how many source terms, + located on the same PET and summing into the same destination element, + are summed into partial sums on the source PET before being transferred + to the destination PET. A value of 0 indicates that the entire arithmetic + is done on the destination PET; source elements are neither multiplied + by their factors nor added into partial sums before being sent off by the + source PET. A value of 1 indicates that source elements are multiplied + by their factors on the source side before being sent to the destination + PET. Larger values of srcTermProcessing indicate the maximum number + of terms in the partial sums on the source side. + +

+Note that partial sums may lead to bit-for-bit differences in the results. + See section 37.2.1 for an in-depth discussion of all + bit-for-bit reproducibility aspects related to route-based communication + methods. + +

+The ESMF_FieldSMMStore() method implements an auto-tuning scheme + for the srcTermProcessing parameter. The intent on the + srcTermProcessing argument is "inout" in order to + support both overriding and accessing the auto-tuning parameter. + If an argument $>= 0$ is specified, it is used for the + srcTermProcessing parameter, and the auto-tuning phase is skipped. + In this case the srcTermProcessing argument is not modified on + return. If the provided argument is $< 0$, the srcTermProcessing + parameter is determined internally using the auto-tuning scheme. In this + case the srcTermProcessing argument is re-set to the internally + determined value on return. Auto-tuning is also used if the optional + srcTermProcessing argument is omitted. + +

+

+
[pipelineDepth]
+
The pipelineDepth parameter controls how many messages a PET + may have outstanding during a sparse matrix exchange. Larger values + of pipelineDepth typically lead to better performance. However, + on some systems too large a value may lead to performance degradation, + or runtime errors. + +

+Note that the pipeline depth has no effect on the bit-for-bit + reproducibility of the results. However, it may affect the performance + reproducibility of the exchange. + +

+The ESMF_FieldSMMStore() method implements an auto-tuning scheme + for the pipelineDepth parameter. The intent on the + pipelineDepth argument is "inout" in order to + support both overriding and accessing the auto-tuning parameter. + If an argument $>= 0$ is specified, it is used for the + pipelineDepth parameter, and the auto-tuning phase is skipped. + In this case the pipelineDepth argument is not modified on + return. If the provided argument is $< 0$, the pipelineDepth + parameter is determined internally using the auto-tuning scheme. In this + case the pipelineDepth argument is re-set to the internally + determined value on return. Auto-tuning is also used if the optional + pipelineDepth argument is omitted. + +

+

+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +

+

+
+ +

+ +

+ +

+26.6.81 ESMF_FieldSMMStore - Precompute Field sparse matrix multiplication and transpose without local factors +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_FieldSMMStore() 
+     subroutine ESMF_FieldSMMStoreNFTR(srcField, dstField, &
+         routehandle, transposeRoutehandle, ignoreUnmatchedIndices, &
+         srcTermProcessing, pipelineDepth, rc)
+
ARGUMENTS: +
         type(ESMF_Field),       intent(inout)           :: srcField  
+         type(ESMF_Field),       intent(inout)           :: dstField  
+         type(ESMF_RouteHandle), intent(inout)           :: routehandle
+         type(ESMF_RouteHandle), intent(inout)           :: transposeRoutehandle
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+         logical,                intent(in),    optional :: ignoreUnmatchedIndices
+         integer,                intent(inout), optional :: srcTermProcessing
+         integer,                intent(inout), optional :: pipeLineDepth
+         integer,                intent(out),   optional :: rc
+
+DESCRIPTION: +
+ +

+Store a Field sparse matrix multiplication operation from srcField + to dstField. PETs that specify non-zero matrix coefficients must use + the <type><kind> overloaded interface and provide the factorList and + factorIndexList arguments. Providing factorList and + factorIndexList arguments with size(factorList) = (/0/) and + size(factorIndexList) = (/2,0/) or (/4,0/) indicates that a + PET does not provide matrix elements. Alternatively, PETs that do not + provide matrix elements may also call into the overloaded interface + without factorList and factorIndexList arguments. + +

+Both srcField and dstField are interpreted as sequentialized + vectors. The + sequence is defined by the order of DistGrid dimensions and the order of + tiles within the DistGrid or by user-supplied arbitrary sequence indices. See + section 28.2.18 for details on the definition of sequence indices. + SMM corresponds to an identity mapping of the source Field vector to + the destination Field vector. + +

+Source and destination Fields may be of different <type><kind>. Further source + and destination Fields may differ in shape, however, the number of elements + must match. + +

+It is erroneous to specify the identical Field object for srcField and dstField + arguments. + +

+The routine returns an ESMF_RouteHandle that can be used to call + ESMF_FieldSMM() on any pair of Fields that matches + srcField and dstField in type, kind, and + memory layout of the gridded dimensions. However, the size, number, + and index order of ungridded dimensions may be different. See section + 37.2.5 for a more detailed discussion of RouteHandle + reusability. + +

+This method is overloaded for: +
+ ESMF_TYPEKIND_I4, ESMF_TYPEKIND_I8, +
+ ESMF_TYPEKIND_R4, ESMF_TYPEKIND_R8. +
+ +

+This call is collective across the current VM. + +

+For examples and associated documentation regarding this method see Section + 26.3.33. + +

+The arguments are: + +

+

+
srcField
+
ESMF_Field with source data. The data in this Field may be + destroyed by this call. + +

+

+
dstField
+
ESMF_Field with destination data. The data in this Field may be + destroyed by this call. + +

+

+
routehandle
+
Handle to the precomputed Route. + +

+

+
transposeRoutehandle
+
A handle to the transposed matrix operation is returned. The + transposed operation goes from dstArray to srcArray. + +

+

+
[ignoreUnmatchedIndices]
+
A logical flag that affects the behavior for when sequence indices + in the sparse matrix are encountered that do not have a match on the + srcField or dstField side. The default setting is + .false., indicating that it is an error when such a situation is + encountered. Setting ignoreUnmatchedIndices to .true. ignores + entries with unmatched indices. + +

+

+
[srcTermProcessing]
+
The srcTermProcessing parameter controls how many source terms, + located on the same PET and summing into the same destination element, + are summed into partial sums on the source PET before being transferred + to the destination PET. A value of 0 indicates that the entire arithmetic + is done on the destination PET; source elements are neither multiplied + by their factors nor added into partial sums before being sent off by the + source PET. A value of 1 indicates that source elements are multiplied + by their factors on the source side before being sent to the destination + PET. Larger values of srcTermProcessing indicate the maximum number + of terms in the partial sums on the source side. + +

+Note that partial sums may lead to bit-for-bit differences in the results. + See section 37.2.1 for an in-depth discussion of all + bit-for-bit reproducibility aspects related to route-based communication + methods. + +

+The ESMF_FieldSMMStore() method implements an auto-tuning scheme + for the srcTermProcessing parameter. The intent on the + srcTermProcessing argument is "inout" in order to + support both overriding and accessing the auto-tuning parameter. + If an argument $>= 0$ is specified, it is used for the + srcTermProcessing parameter, and the auto-tuning phase is skipped. + In this case the srcTermProcessing argument is not modified on + return. If the provided argument is $< 0$, the srcTermProcessing + parameter is determined internally using the auto-tuning scheme. In this + case the srcTermProcessing argument is re-set to the internally + determined value on return. Auto-tuning is also used if the optional + srcTermProcessing argument is omitted. + +

+

+
[pipelineDepth]
+
The pipelineDepth parameter controls how many messages a PET + may have outstanding during a sparse matrix exchange. Larger values + of pipelineDepth typically lead to better performance. However, + on some systems too large a value may lead to performance degradation, + or runtime errors. + +

+Note that the pipeline depth has no effect on the bit-for-bit + reproducibility of the results. However, it may affect the performance + reproducibility of the exchange. + +

+The ESMF_FieldSMMStore() method implements an auto-tuning scheme + for the pipelineDepth parameter. The intent on the + pipelineDepth argument is "inout" in order to + support both overriding and accessing the auto-tuning parameter. + If an argument $>= 0$ is specified, it is used for the + pipelineDepth parameter, and the auto-tuning phase is skipped. + In this case the pipelineDepth argument is not modified on + return. If the provided argument is $< 0$, the pipelineDepth + parameter is determined internally using the auto-tuning scheme. In this + case the pipelineDepth argument is re-set to the internally + determined value on return. Auto-tuning is also used if the optional + pipelineDepth argument is omitted. + +

+

+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +

+

+
+ +

+ +

+ +

+26.6.82 ESMF_FieldSMMStore - Precompute sparse matrix multiplication using factors read from file +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_FieldSMMStore()
+     subroutine ESMF_FieldSMMStoreFromFile(srcField, dstField, filename, &
+       routehandle, ignoreUnmatchedIndices, &
+       srcTermProcessing, pipelineDepth, rc)
+ 
+   ! ARGUMENTS:
+       type(ESMF_Field),       intent(in)              :: srcField  
+       type(ESMF_Field),       intent(inout)           :: dstField
+       character(len=*),       intent(in)              :: filename
+       type(ESMF_RouteHandle), intent(inout)           :: routehandle
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       logical,                intent(in),    optional :: ignoreUnmatchedIndices
+       integer,                intent(inout), optional :: srcTermProcessing
+       integer,                intent(inout), optional :: pipeLineDepth
+       integer,                intent(out),   optional :: rc
+
+DESCRIPTION: +
+ +

+Compute an ESMF_RouteHandle using factors read from file. + +

+The arguments are: + +

+

+
srcField
+
ESMF_Field with source data. + +

+

+
dstField
+
ESMF_Field with destination data. The data in this Field may be + destroyed by this call. + +

+

+
filename
+
Path to the file containing weights for creating an ESMF_RouteHandle. + See (12.9) for a description of the SCRIP weight + file format. Only "row", "col", and "S" variables are required. They + must be one-dimensionsal with dimension "n_s". + +

+

+
routehandle
+
Handle to the ESMF_RouteHandle. + +

+

+
[ignoreUnmatchedIndices]
+
A logical flag that affects the behavior for when sequence indices + in the sparse matrix are encountered that do not have a match on the + srcField or dstField side. The default setting is + .false., indicating that it is an error when such a situation is + encountered. Setting ignoreUnmatchedIndices to .true. ignores + entries with unmatched indices. + +

+

+
[srcTermProcessing]
+
The srcTermProcessing parameter controls how many source terms, + located on the same PET and summing into the same destination element, + are summed into partial sums on the source PET before being transferred + to the destination PET. A value of 0 indicates that the entire arithmetic + is done on the destination PET; source elements are neither multiplied + by their factors nor added into partial sums before being sent off by the + source PET. A value of 1 indicates that source elements are multiplied + by their factors on the source side before being sent to the destination + PET. Larger values of srcTermProcessing indicate the maximum number + of terms in the partial sums on the source side. + +

+Note that partial sums may lead to bit-for-bit differences in the results. + See section 37.2.1 for an in-depth discussion of all + bit-for-bit reproducibility aspects related to route-based communication + methods. + +

+The ESMF_FieldSMMStore() method implements an auto-tuning scheme + for the srcTermProcessing parameter. The intent on the + srcTermProcessing argument is "inout" in order to + support both overriding and accessing the auto-tuning parameter. + If an argument $>= 0$ is specified, it is used for the + srcTermProcessing parameter, and the auto-tuning phase is skipped. + In this case the srcTermProcessing argument is not modified on + return. If the provided argument is $< 0$, the srcTermProcessing + parameter is determined internally using the auto-tuning scheme. In this + case the srcTermProcessing argument is re-set to the internally + determined value on return. Auto-tuning is also used if the optional + srcTermProcessing argument is omitted. + +

+

+
[pipelineDepth]
+
The pipelineDepth parameter controls how many messages a PET + may have outstanding during a sparse matrix exchange. Larger values + of pipelineDepth typically lead to better performance. However, + on some systems too large a value may lead to performance degradation, + or runtime errors. + +

+Note that the pipeline depth has no effect on the bit-for-bit + reproducibility of the results. However, it may affect the performance + reproducibility of the exchange. + The ESMF_FieldSMMStore() method implements an auto-tuning scheme + for the pipelineDepth parameter. The intent on the + pipelineDepth argument is "inout" in order to + support both overriding and accessing the auto-tuning parameter. + If an argument $>= 0$ is specified, it is used for the + pipelineDepth parameter, and the auto-tuning phase is skipped. + In this case the pipelineDepth argument is not modified on + return. If the provided argument is $< 0$, the pipelineDepth + parameter is determined internally using the auto-tuning scheme. In this + case the pipelineDepth argument is re-set to the internally + determined value on return. Auto-tuning is also used if the optional + pipelineDepth argument is omitted. + +

+

+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +

+

+
+ +

+ +

+ +

+26.6.83 ESMF_FieldSMMStore - Precompute sparse matrix multiplication and transpose using factors read from file +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_FieldSMMStore()
+     subroutine ESMF_FieldSMMStoreFromFileTR(srcField, dstField, filename, &
+       routehandle, transposeRoutehandle, &
+       ignoreUnmatchedIndices, srcTermProcessing, pipelineDepth, rc)
+ 
+   ! ARGUMENTS:
+       type(ESMF_Field),       intent(inout)           :: srcField  
+       type(ESMF_Field),       intent(inout)           :: dstField
+       character(len=*),       intent(in)              :: filename
+       type(ESMF_RouteHandle), intent(inout)           :: routehandle
+       type(ESMF_RouteHandle), intent(inout)           :: transposeRoutehandle
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       logical,                intent(in),    optional :: ignoreUnmatchedIndices
+       integer,                intent(inout), optional :: srcTermProcessing
+       integer,                intent(inout), optional :: pipeLineDepth
+       integer,                intent(out),   optional :: rc
+
+DESCRIPTION: +
+ +

+Compute an ESMF_RouteHandle using factors read from file. + +

+The arguments are: + +

+

+
srcField
+
ESMF_Field with source data. The data in this Array may be + destroyed by this call. + +

+

+
dstField
+
ESMF_Field with destination data. The data in this Field may be + destroyed by this call. + +

+

+
filename
+
Path to the file containing weights for creating an ESMF_RouteHandle. + See (12.9) for a description of the SCRIP weight + file format. Only "row", "col", and "S" variables are required. They + must be one-dimensionsal with dimension "n_s". + +

+

+
routehandle
+
Handle to the ESMF_RouteHandle. + +

+

+
transposeRoutehandle
+
A handle to the transposed matrix operation is returned. The + transposed operation goes from dstArray to srcArray. + +

+

+
[ignoreUnmatchedIndices]
+
A logical flag that affects the behavior for when sequence indices + in the sparse matrix are encountered that do not have a match on the + srcField or dstField side. The default setting is + .false., indicating that it is an error when such a situation is + encountered. Setting ignoreUnmatchedIndices to .true. ignores + entries with unmatched indices. + +

+

+
[srcTermProcessing]
+
The srcTermProcessing parameter controls how many source terms, + located on the same PET and summing into the same destination element, + are summed into partial sums on the source PET before being transferred + to the destination PET. A value of 0 indicates that the entire arithmetic + is done on the destination PET; source elements are neither multiplied + by their factors nor added into partial sums before being sent off by the + source PET. A value of 1 indicates that source elements are multiplied + by their factors on the source side before being sent to the destination + PET. Larger values of srcTermProcessing indicate the maximum number + of terms in the partial sums on the source side. + +

+Note that partial sums may lead to bit-for-bit differences in the results. + See section 37.2.1 for an in-depth discussion of all + bit-for-bit reproducibility aspects related to route-based communication + methods. + +

+The ESMF_FieldSMMStore() method implements an auto-tuning scheme + for the srcTermProcessing parameter. The intent on the + srcTermProcessing argument is "inout" in order to + support both overriding and accessing the auto-tuning parameter. + If an argument $>= 0$ is specified, it is used for the + srcTermProcessing parameter, and the auto-tuning phase is skipped. + In this case the srcTermProcessing argument is not modified on + return. If the provided argument is $< 0$, the srcTermProcessing + parameter is determined internally using the auto-tuning scheme. In this + case the srcTermProcessing argument is re-set to the internally + determined value on return. Auto-tuning is also used if the optional + srcTermProcessing argument is omitted. + +

+

+
[pipelineDepth]
+
The pipelineDepth parameter controls how many messages a PET + may have outstanding during a sparse matrix exchange. Larger values + of pipelineDepth typically lead to better performance. However, + on some systems too large a value may lead to performance degradation, + or runtime errors. + +

+Note that the pipeline depth has no effect on the bit-for-bit + reproducibility of the results. However, it may affect the performance + reproducibility of the exchange. + The ESMF_FieldSMMStore() method implements an auto-tuning scheme + for the pipelineDepth parameter. The intent on the + pipelineDepth argument is "inout" in order to + support both overriding and accessing the auto-tuning parameter. + If an argument $>= 0$ is specified, it is used for the + pipelineDepth parameter, and the auto-tuning phase is skipped. + In this case the pipelineDepth argument is not modified on + return. If the provided argument is $< 0$, the pipelineDepth + parameter is determined internally using the auto-tuning scheme. In this + case the pipelineDepth argument is re-set to the internally + determined value on return. Auto-tuning is also used if the optional + pipelineDepth argument is omitted. + +

+

+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +

+

+
+ +

+ + +

+ +

+ +

+ +

+26.6.84 ESMF_FieldValidate - Check validity of a Field +

+ +

+ +

+
+INTERFACE: +

       subroutine ESMF_FieldValidate(field, rc)
+
ARGUMENTS: +
       type(ESMF_Field), intent(in)            :: field 
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       integer,          intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Validates that the field is internally consistent. + Currently this method determines if the field is uninitialized + or already destroyed. It validates the contained array and grid objects. + The code also checks if the array and grid sizes agree. + This check compares the distgrid contained in array and grid; + then it proceeds to compare the computational bounds contained + in array and grid. + +

+The method returns an error code if problems are found. + +

+The arguments are: +

+
field
+
ESMF_Field to validate. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if the field + is valid. + +
+
+ +

+ + +

+ +

+ +

+ +

+26.6.85 ESMF_FieldWrite - Write Field data into a file +

+ +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_FieldWrite(field, fileName,   &
+       variableName, convention, purpose, overwrite, status, timeslice, iofmt, rc)
+
ARGUMENTS: +
     type(ESMF_Field),           intent(in)             :: field 
+     character(*),               intent(in)             :: fileName
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     character(*),               intent(in),  optional  :: variableName
+     character(*),               intent(in),  optional  :: convention
+     character(*),               intent(in),  optional  :: purpose
+     logical,                    intent(in),  optional  :: overwrite
+     type(ESMF_FileStatus_Flag), intent(in),  optional  :: status
+     integer,                    intent(in),  optional  :: timeslice
+     type(ESMF_IOFmt_Flag),      intent(in),  optional  :: iofmt
+     integer,                    intent(out), optional  :: rc
+
+DESCRIPTION: +
+ +

+Write Field data into a file. For this API to be functional, the + environment variable ESMF_PIO should be set to either "internal" or "external" when + the ESMF library is built. Please see the section on + Data I/O, 38.2. + +

+When convention and purpose arguments are specified, + a NetCDF variable can be created with user-specified dimension labels and + attributes. Dimension labels may be defined for both gridded and + ungridded dimensions. Dimension labels for gridded dimensions are specified + at the Grid level by attaching an ESMF Attribute package to it. The Attribute + package must contain an attribute named by the pre-defined ESMF parameter + ESMF_ATT_GRIDDED_DIM_LABELS. The corresponding value is an array of + character strings specifying the desired names of the dimensions. Likewise, + for ungridded dimensions, an Attribute package is attached at the Field level. + The name of the name must be ESMF_ATT_UNGRIDDED_DIM_LABELS. + +

+NetCDF attributes for the variable can also be specified. As with dimension labels, + an Attribute package is added to the Field with the desired names and values. + A value may be either a scalar character string, or a scalar or array of type + integer, real, or double precision. Dimension label attributes can co-exist with + variable attributes within a common Attribute package. + +

+Limitations: + +

    +
  • Not supported in ESMF_COMM=mpiuni mode. + +
  • +
+ +

+The arguments are: +

+
field
+
The ESMF_Field object that contains data to be written. + +
+
fileName
+
The name of the output file to which Field data is written. + If the Field is a multi-tile Array, then fileName must contain + exactly one instance of "*"; this is a placeholder that will be replaced + by the tile number, with each tile being written to a separate file. (For + example, for a fileName of "myfile*.nc", tile 1 will be written to + "myfile1.nc", tile 2 to "myfile2.nc", etc.) + (This handling of the fileName for multi-tile I/O is subject to change.) + +
+
[variableName]
+
Variable name in the output file; default is the "name" of field. + Use this argument only in the I/O format (such as NetCDF) that + supports variable name. If the I/O format does not support this + (such as binary format), ESMF will return an error code. + +
+
[convention]
+
Specifies an Attribute package associated with the Field, used to create NetCDF + dimension labels and attributes for the variable in the file. When this argument is present, + the purpose argument must also be present. Use this argument only with a NetCDF + I/O format. If binary format is used, ESMF will return an error code. + +
+
[purpose]
+
Specifies an Attribute package associated with the Field, used to create NetCDF + dimension labels and attributes for the variable in the file. When this argument is present, + the convention argument must also be present. Use this argument only with a NetCDF + I/O format. If binary format is used, ESMF will return an error code. + +
+
[overwrite]
+
A logical flag, the default is .false., i.e., existing field data may + not be overwritten. If .true., only the data corresponding to the field's name + will be overwritten. + Note that it is always an error to attempt to overwrite a NetCDF + variable with data which has a different shape. + +
+
[status]
+
The file status. Please see Section 54.22 for + the list of options. If not present, defaults to + ESMF_FILESTATUS_UNKNOWN. + +
+
[timeslice]
+
Some I/O formats (e.g. NetCDF) support the output of data in form of + time slices. An unlimited dimension called time is defined in the + file variable for this capability. + The timeslice argument provides access to the time dimension, + and must have a positive value. The behavior of this + option may depend on the setting of the overwrite flag: +
+
overwrite = .false.:
+
If the timeslice value is + less than the maximum time already in the file, the write will fail. + +
+
overwrite = .true.:
+
Any positive timeslice value is valid. + +
+
+ By default, i.e. by omitting the timeslice argument, no + provisions for time slicing are made in the output file, + however, if the file already contains a time axis for the variable, + a timeslice one greater than the maximum will be written. + +
+
[iofmt]
+
The I/O format. Please see Section 54.30 for the list + of options. If not present, defaults to ESMF_IOFMT_NETCDF. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ + +

+26.7 Class API: Field Utilities +

+ +

+ +

+ +

+ +

+26.7.1 ESMF_GridGetFieldBounds - Get precomputed DE-local Fortran data array bounds for creating a Field from a Grid and Fortran array +

+ +

+ +

+
+INTERFACE: +

     subroutine ESMF_GridGetFieldBounds(grid, &
+         localDe, staggerloc, gridToFieldMap, &
+         ungriddedLBound, ungriddedUBound, &
+         totalLWidth, totalUWidth, &
+         totalLBound, totalUBound, totalCount, rc)
+
ARGUMENTS: +
     type(ESMF_Grid),       intent(in)            :: grid     
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,               intent(in),  optional :: localDe
+     type(ESMF_StaggerLoc), intent(in),  optional :: staggerloc 
+     integer,               intent(in),  optional :: gridToFieldMap(:)    
+     integer,               intent(in),  optional :: ungriddedLBound(:)
+     integer,               intent(in),  optional :: ungriddedUBound(:)
+     integer,               intent(in),  optional :: totalLWidth(:)
+     integer,               intent(in),  optional :: totalUWidth(:)
+     integer,               intent(out), optional :: totalLBound(:)
+     integer,               intent(out), optional :: totalUBound(:)
+     integer,               intent(out), optional :: totalCount(:)
+     integer,               intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Compute the lower and upper bounds of Fortran data array that can later + be used in FieldCreate interface to create a ESMF_Field from a + ESMF_Grid and the Fortran data array. For an example and + associated documentation using this method see section + 26.3.9. + +

+The arguments are: +

+
grid
+
ESMF_Grid. + +
+
[localDe]
+
Local DE for which information is requested. [0,..,localDeCount-1]. + For localDeCount==1 the localDe argument may be omitted, + in which case it will default to localDe=0. + +
+
[staggerloc]
+
Stagger location of data in grid cells. For valid + predefined values and interpretation of results see + section 31.2.6. + +
+
[gridToFieldMap]
+
List with number of elements equal to the + grid|s dimCount. The list elements map each dimension + of the grid to a dimension in the field by + specifying the appropriate field dimension index. The default is to + map all of the grid|s dimensions against the lowest dimensions of + the field in sequence, i.e. gridToFieldMap = (/1,2,3,.../). + The values of all gridToFieldMap entries must be greater than or equal + to one and smaller than or equal to the field rank. + It is erroneous to specify the same gridToFieldMap entry + multiple times. The total ungridded dimensions in the field + are the total field dimensions less + the dimensions in + the grid. Ungridded dimensions must be in the same order they are + stored in the field. + +
+
[ungriddedLBound]
+
Lower bounds of the ungridded dimensions of the field. + The number of elements in the ungriddedLBound is equal to the number of ungridded + dimensions in the field. All ungridded dimensions of the + field are also undistributed. When field dimension count is + greater than grid dimension count, both ungriddedLBound and ungriddedUBound + must be specified. When both are specified the values are checked + for consistency. Note that the the ordering of + these ungridded dimensions is the same as their order in the field. + +
+
[ungriddedUBound]
+
Upper bounds of the ungridded dimensions of the field. + The number of elements in the ungriddedUBound is equal to the number of ungridded + dimensions in the field. All ungridded dimensions of the + field are also undistributed. When field dimension count is + greater than grid dimension count, both ungriddedLBound and ungriddedUBound + must be specified. When both are specified the values are checked + for consistency. Note that the the ordering of + these ungridded dimensions is the same as their order in the field. + +
+
[totalLWidth]
+
Lower bound of halo region. The size of this array is the number + of dimensions in the grid. However, ordering of the elements + needs to be the same as they appear in the field. Values default + to 0. If values for totalLWidth are specified they must be reflected in + the size of the field. That is, for each gridded dimension the + field size should be max( totalLWidth + totalUWidth + + computationalCount, exclusiveCount ). + +
+
[totalUWidth]
+
Upper bound of halo region. The size of this array is the number + of dimensions in the grid. However, ordering of the elements + needs to be the same as they appear in the field. Values default + to 0. If values for totalUWidth are specified they must be reflected in + the size of the field. That is, for each gridded dimension the + field size should max( totalLWidth + totalUWidth + + computationalCount, exclusiveCount ). + +
+
[totalLBound]
+
The relative lower bounds of Fortran data array to be used + later in ESMF_FieldCreate from ESMF_Grid and Fortran data array. + This is an output variable from this user interface. + + The relative lower bounds of Fortran data array to be used + +
+
[totalUBound]
+
The relative upper bounds of Fortran data array to be used + later in ESMF_FieldCreate from ESMF_Grid and Fortran data array. + This is an output variable from this user interface. + +
+
[totalCount]
+
Number of elements need to be allocated for Fortran data array to be used + later in ESMF_FieldCreate from ESMF_Grid and Fortran data array. + This is an output variable from this user interface. + +

+

+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+26.7.2 ESMF_LocStreamGetFieldBounds - Get precomputed DE-local Fortran data array bounds for creating a Field from a LocStream and Fortran array +

+ +

+ +

+
+INTERFACE: +

     subroutine ESMF_LocStreamGetFieldBounds(locstream, &
+         localDe, gridToFieldMap, &
+         ungriddedLBound, ungriddedUBound, &
+         totalLBound, totalUBound, totalCount, rc)
+
ARGUMENTS: +
     type(ESMF_LocStream), intent(in)            :: locstream     
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,              intent(in),  optional :: localDe
+     integer,              intent(in),  optional :: gridToFieldMap(:)    
+     integer,              intent(in),  optional :: ungriddedLBound(:)
+     integer,              intent(in),  optional :: ungriddedUBound(:)
+     integer,              intent(out), optional :: totalLBound(:)
+     integer,              intent(out), optional :: totalUBound(:)
+     integer,              intent(out), optional :: totalCount(:)
+     integer,              intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Compute the lower and upper bounds of Fortran data array that can later + be used in FieldCreate interface to create a ESMF_Field from a + ESMF_LocStream and the Fortran data array. For an example and + associated documentation using this method see section + 26.3.9. + +

+The arguments are: +

+
locstream
+
ESMF_LocStream. + +
+
[localDe]
+
Local DE for which information is requested. [0,..,localDeCount-1]. + For localDeCount==1 the localDe argument may be omitted, + in which case it will default to localDe=0. + +
+
[gridToFieldMap]
+
List with number of elements equal to 1. + The list elements map the dimension + of the locstream to a dimension in the field by + specifying the appropriate field dimension index. The default is to + map the locstream|s dimension against the lowest dimension of + the field in sequence, i.e. gridToFieldMap = (/1/). + The values of all gridToFieldMap entries must be greater than or equal + to one and smaller than or equal to the field rank. + The total ungridded dimensions in the field + are the total field dimensions less + the dimensions in + the grid. Ungridded dimensions must be in the same order they are + stored in the field. + +
+
[ungriddedLBound]
+
Lower bounds of the ungridded dimensions of the field. + The number of elements in the ungriddedLBound is equal to the number of ungridded + dimensions in the field. All ungridded dimensions of the + field are also undistributed. When field dimension count is + greater than 1, both ungriddedLBound and ungriddedUBound + must be specified. When both are specified the values are checked + for consistency. Note that the the ordering of + these ungridded dimensions is the same as their order in the field. + +
+
[ungriddedUBound]
+
Upper bounds of the ungridded dimensions of the field. + The number of elements in the ungriddedUBound is equal to the number of ungridded + dimensions in the field. All ungridded dimensions of the + field are also undistributed. When field dimension count is + greater than 1, both ungriddedLBound and ungriddedUBound + must be specified. When both are specified the values are checked + for consistency. Note that the the ordering of + these ungridded dimensions is the same as their order in the field. + +
+
[totalLBound]
+
The relative lower bounds of Fortran data array to be used + later in ESMF_FieldCreate from ESMF_LocStream and Fortran data array. + This is an output variable from this user interface. + +
+
[totalUBound]
+
The relative upper bounds of Fortran data array to be used + later in ESMF_FieldCreate from ESMF_LocStream and Fortran data array. + This is an output variable from this user interface. + +
+
[totalCount]
+
Number of elements need to be allocated for Fortran data array to be used + later in ESMF_FieldCreate from ESMF_LocStream and Fortran data array. + This is an output variable from this user interface. + +

+

+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+26.7.3 ESMF_MeshGetFieldBounds - Get precomputed DE-local Fortran data array bounds for creating a Field from a Mesh and a Fortran array +

+ +

+ +

+
+INTERFACE: +

     subroutine ESMF_MeshGetFieldBounds(mesh, &
+         meshloc, &
+         localDe, gridToFieldMap, &
+         ungriddedLBound, ungriddedUBound, &
+         totalLBound, totalUBound, totalCount, rc)
+
ARGUMENTS: +
     type(ESMF_Mesh), intent(in)            :: mesh     
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     type(ESMF_MeshLoc),intent(in),optional :: meshloc
+     integer,         intent(in),  optional :: localDe
+     integer,         intent(in),  optional :: gridToFieldMap(:)    
+     integer,         intent(in),  optional :: ungriddedLBound(:)
+     integer,         intent(in),  optional :: ungriddedUBound(:)
+     integer,         intent(out), optional :: totalLBound(:)
+     integer,         intent(out), optional :: totalUBound(:)
+     integer,         intent(out), optional :: totalCount(:)
+     integer,         intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Compute the lower and upper bounds of Fortran data array that can later + be used in FieldCreate interface to create a ESMF_Field from a + ESMF_Mesh and the Fortran data array. For an example and + associated documentation using this method see section + 26.3.9. + +

+The arguments are: +

+
mesh
+
ESMF_Mesh. + +
+
[meshloc]
+
Which part of the mesh to build the Field on. Can be set to either + ESMF_MESHLOC_NODE or ESMF_MESHLOC_ELEMENT. If not set, + defaults to ESMF_MESHLOC_NODE. + +
+
[localDe]
+
Local DE for which information is requested. [0,..,localDeCount-1]. + For localDeCount==1 the localDe argument may be omitted, + in which case it will default to localDe=0. + +
+
[gridToFieldMap]
+
List with number of elements equal to the + grid|s dimCount. The list elements map each dimension + of the grid to a dimension in the field by + specifying the appropriate field dimension index. The default is to + map all of the grid|s dimensions against the lowest dimensions of + the field in sequence, i.e. gridToFieldMap = (/1,2,3,.../). + The values of all gridToFieldMap entries must be greater than or equal + to one and smaller than or equal to the field rank. + It is erroneous to specify the same gridToFieldMap entry + multiple times. The total ungridded dimensions in the field + are the total field dimensions less + the dimensions in + the grid. Ungridded dimensions must be in the same order they are + stored in the field. + +
+
[ungriddedLBound]
+
Lower bounds of the ungridded dimensions of the field. + The number of elements in the ungriddedLBound is equal to the number of ungridded + dimensions in the field. All ungridded dimensions of the + field are also undistributed. When field dimension count is + greater than grid dimension count, both ungriddedLBound and ungriddedUBound + must be specified. When both are specified the values are checked + for consistency. Note that the the ordering of + these ungridded dimensions is the same as their order in the field. + +
+
[ungriddedUBound]
+
Upper bounds of the ungridded dimensions of the field. + The number of elements in the ungriddedUBound is equal to the number of ungridded + dimensions in the field. All ungridded dimensions of the + field are also undistributed. When field dimension count is + greater than grid dimension count, both ungriddedLBound and ungriddedUBound + must be specified. When both are specified the values are checked + for consistency. Note that the the ordering of + these ungridded dimensions is the same as their order in the field. + +
+
[totalLBound]
+
The relative lower bounds of Fortran data array to be used + later in ESMF_FieldCreate from ESMF_Mesh and Fortran data array. + This is an output variable from this user interface. + +
+
[totalUBound]
+
The relative upper bounds of Fortran data array to be used + later in ESMF_FieldCreate from ESMF_Mesh and Fortran data array. + This is an output variable from this user interface. + +
+
[totalCount]
+
Number of elements need to be allocated for Fortran data array to be used + later in ESMF_FieldCreate from ESMF_Mesh and Fortran data array. + This is an output variable from this user interface. + +

+

+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+26.7.4 ESMF_XGridGetFieldBounds - Get precomputed DE-local Fortran data array bounds for creating a Field from an XGrid and a Fortran array +

+ +

+ +

+
+INTERFACE: +

     subroutine ESMF_XGridGetFieldBounds(xgrid, &
+         xgridside, gridindex, localDe, gridToFieldMap, &
+         ungriddedLBound, ungriddedUBound, &
+         totalLBound, totalUBound, totalCount, rc)
+
ARGUMENTS: +
     type(ESMF_XGrid),          intent(in)            :: xgrid
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     type(ESMF_XGridSide_Flag), intent(in),  optional :: xgridside
+     integer,                   intent(in),  optional :: gridindex
+     integer,                   intent(in),  optional :: localDe
+     integer,                   intent(in),  optional :: gridToFieldMap(:)    
+     integer,                   intent(in),  optional :: ungriddedLBound(:)
+     integer,                   intent(in),  optional :: ungriddedUBound(:)
+     integer,                   intent(out), optional :: totalLBound(:)
+     integer,                   intent(out), optional :: totalUBound(:)
+     integer,                   intent(out), optional :: totalCount(:)
+     integer,                   intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Compute the lower and upper bounds of Fortran data array that can later + be used in FieldCreate interface to create a ESMF_Field from a + ESMF_XGrid and the Fortran data array. For an example and + associated documentation using this method see section + 26.3.9. + +

+The arguments are: +

+
xgrid
+
ESMF_XGrid object. + +
+
[xgridside]
+
Which side of the XGrid to create the Field on (either ESMF_XGRIDSIDE_A, + ESMF_XGRIDSIDE_B, or ESMF_XGRIDSIDE_BALANCED). If not passed in then + defaults to ESMF_XGRIDSIDE_BALANCED. + +
+
[gridindex]
+
If xgridside is ESMF_XGRIDSIDE_A or ESMF_XGRIDSIDE_B then this index tells which Grid on + that side to create the Field on. If not provided, defaults to 1. + +
+
[localDe]
+
Local DE for which information is requested. [0,..,localDeCount-1]. + For localDeCount==1 the localDe argument may be omitted, + in which case it will default to localDe=0. + +
+
[gridToFieldMap]
+
List with number of elements equal to 1. + The list elements map the dimension + of the locstream to a dimension in the field by + specifying the appropriate field dimension index. The default is to + map the locstream|s dimension against the lowest dimension of + the field in sequence, i.e. gridToFieldMap = (/1/). + The values of all gridToFieldMap entries must be greater than or equal + to one and smaller than or equal to the field rank. + The total ungridded dimensions in the field + are the total field dimensions less + the dimensions in + the grid. Ungridded dimensions must be in the same order they are + stored in the field. + +
+
[ungriddedLBound]
+
Lower bounds of the ungridded dimensions of the field. + The number of elements in the ungriddedLBound is equal to the number of ungridded + dimensions in the field. All ungridded dimensions of the + field are also undistributed. When field dimension count is + greater than 1, both ungriddedLBound and ungriddedUBound + must be specified. When both are specified the values are checked + for consistency. Note that the the ordering of + these ungridded dimensions is the same as their order in the field. + +
+
[ungriddedUBound]
+
Upper bounds of the ungridded dimensions of the field. + The number of elements in the ungriddedUBound is equal to the number of ungridded + dimensions in the field. All ungridded dimensions of the + field are also undistributed. When field dimension count is + greater than 1, both ungriddedLBound and ungriddedUBound + must be specified. When both are specified the values are checked + for consistency. Note that the the ordering of + these ungridded dimensions is the same as their order in the field. + +
+
[totalLBound]
+
The relative lower bounds of Fortran data array to be used + later in ESMF_FieldCreate from ESMF_LocStream and Fortran data array. + This is an output variable from this user interface. + +
+
[totalUBound]
+
The relative upper bounds of Fortran data array to be used + later in ESMF_FieldCreate from ESMF_LocStream and Fortran data array. + This is an output variable from this user interface. + +
+
[totalCount]
+
Number of elements need to be allocated for Fortran data array to be used + later in ESMF_FieldCreate from ESMF_LocStream and Fortran data array. + This is an output variable from this user interface. + +

+

+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ + +

+27 ArrayBundle Class +

+ +

+27.1 Description +

+ +

+The ESMF_ArrayBundle class allows a set of Arrays to be bundled into a +single object. The Arrays in an ArrayBundle may be of different type, kind, +rank and distribution. Besides ease of use resulting from bundling, the +ArrayBundle class offers the opportunity for performance optimization when +operating on a bundle of Arrays as a single entity. Communication methods are +especially good candidates for performance optimization. Best optimization +results are expected for ArrayBundles that contain Arrays that share a common +distribution, i.e. DistGrid, and are of same type, kind and rank. + +

+ArrayBundles are one of the data objects that can be added to States, +which are used for providing to or receiving data from other Components. + +

+27.2 Use and Examples +

+ +

+Examples of creating, destroying and accessing ArrayBundles and their +constituent Arrays are provided in this section, along with some +notes on ArrayBundle methods. + +

+ +

+ +

+ +

+27.2.1 Creating an ArrayBundle from a list of Arrays +

+ +

+An ArrayBundle is created from a list of ESMF_Array objects. +

+

+  call ESMF_ArraySpecSet(arrayspec, typekind=ESMF_TYPEKIND_R8, rank=2, rc=rc)
+
+ +

+

+  distgrid = ESMF_DistGridCreate(minIndex=(/1,1/), maxIndex=(/5,5/), &
+    regDecomp=(/2,3/), rc=rc)
+
+ +

+

+  allocate(arrayList(2))
+  arrayList(1) = ESMF_ArrayCreate(arrayspec=arrayspec, distgrid=distgrid, &
+                 rc=rc)
+
+ +

+

+  arrayList(2) = ESMF_ArrayCreate(arrayspec=arrayspec, distgrid=distgrid, &
+                 rc=rc)
+
+ +

+Now arrayList is used to create an ArrayBundle object. +

+

+  arraybundle = ESMF_ArrayBundleCreate(arrayList=arrayList, &
+    name="MyArrayBundle", rc=rc)
+
+ +

+Here the temporary arrayList can be deallocated. This will not affect + the ESMF Array objects inside the ArrayBundle. However, the Array objects + must not be deallocated while the ArrayBundle references them. +

+

+  deallocate(arrayList)
+
+ +

+ +

+27.2.2 Adding, removing, replacing Arrays in the ArrayBundle +

+ +

+Individual Arrays can be added using the Fortran array constructor syntax + (/ ... /). Here an ESMF_Array is created on the fly and immediately + added to the ArrayBundle. +

+

+  call ESMF_ArrayBundleAdd(arraybundle, arrayList=(/ &
+    ESMF_ArrayCreate(arrayspec=arrayspec, distgrid=distgrid, name="AonFly")/), &
+    rc=rc)
+
+ +

+Items in the ArrayBundle can be replaced by items with the same name. +

+

+  call ESMF_ArraySpecSet(arrayspec2, typekind=ESMF_TYPEKIND_R4, rank=2, rc=rc)
+
+ +

+

+  call ESMF_ArrayBundleReplace(arraybundle, arrayList=(/ &
+    ESMF_ArrayCreate(arrayspec=arrayspec2, distgrid=distgrid, name="AonFly")/), &
+    rc=rc)
+
+ +

+Items can be removed from the ArrayBundle by providing their name. +

+

+  call ESMF_ArrayBundleRemove(arraybundle, arrayNameList=(/"AonFly"/), rc=rc)
+
+ +

+The ArrayBundle AddReplace() method can be used to conveniently add an + item to the ArrayBundle, or replacing an existing item of the same name. +

+

+  call ESMF_ArrayBundleAddReplace(arraybundle, arrayList=(/ &
+    ESMF_ArrayCreate(arrayspec=arrayspec2, distgrid=distgrid, name="AonFly")/), &
+    rc=rc)
+
+ +

+The ArrayBundle object can be printed at any time to list its contents by name. +

+

+  call ESMF_ArrayBundlePrint(arraybundle, rc=rc)
+
+ +

+ +

+27.2.3 Accessing Arrays inside the ArrayBundle +

+ +

+Individual items in the ArrayBundle can be accessed directly by their + name. +

+

+  call ESMF_ArrayBundleGet(arraybundle, arrayName="AonFly", array=arrayOut, &
+    rc=rc)
+
+ +

+A list containing all of the Arrays in the ArrayBundle can also be requested + in a single call. + This requires that a large enough list argument is passed into the + ESMF_ArrayBundleGet() method. The exact number of items in the + ArrayBundle can be queried using the arrayCount argument first. +

+

+  call ESMF_ArrayBundleGet(arraybundle, arrayCount=arrayCount, rc=rc)
+
+ +

+Then use arrayCount to correctly allocate the arrayList + variable for a second call to ESMF_ArrayBundleGet(). + +

+

+  allocate(arrayList(arrayCount))
+  call ESMF_ArrayBundleGet(arraybundle, arrayList=arrayList, rc=rc)
+
+ +

+Now the arrayList variable can be used to access the individual Arrays, + e.g. to print them. +

+

+  do i=1, arrayCount
+    call ESMF_ArrayPrint(arrayList(i), rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+  enddo
+
+ +

+By default the arrayList returned by ESMF_ArrayBundleGet() + contains the items in alphabetical order. To instead return the items in the + same order in which they were added to the ArrayBundle, the + itemorderflag argument is passed with a value of + ESMF_ITEMORDER_ADDORDER. + +

+ +

+

+  call ESMF_ArrayBundleGet(arraybundle, arrayList=arrayList, &
+    itemorderflag=ESMF_ITEMORDER_ADDORDER, rc=rc)
+
+ +

+ +

+27.2.4 Destroying an ArrayBundle and its constituents +

+ +

+Destroying an ArrayBundle does not destroy the Arrays. In fact, it leaves the + Arrays totally unchanged. +

+

+  call ESMF_ArrayBundleDestroy(arraybundle, rc=rc)
+
+ +

+The Arrays must be destroyed separately. +

+

+  call ESMF_ArrayDestroy(arrayList(1), rc=rc)
+
+ +

+

+  call ESMF_ArrayDestroy(arrayList(2), rc=rc)
+
+ +

+

+  deallocate(arrayList)
+  
+  call ESMF_DistGridDestroy(distgrid, rc=rc)
+
+ +

+ + +

+ +

+ +

+ +

+27.2.5 Halo communication +

+ +

+One of the most fundamental communication pattern in domain decomposition + codes is the halo operation. The ESMF Array class supports halos + by allowing memory for extra elements to be allocated on each DE. See + section 28.2.15 for a discussion of the Array level halo operation. + The ArrayBundle level extents the Array halo operation to bundles of Arrays. + +

+First create an ESMF_ArrayBundle object containing a set of ESMF + Arrays. +

+

+  arraybundle = ESMF_ArrayBundleCreate(arrayList=arrayList, &
+    name="MyArrayBundle", rc=rc)
+
+ +

+The ArrayBundle object can be treated as a single entity. The + ESMF_ArrayBundleHaloStore() call determines the most efficient + halo exchange pattern for all Arrays that are part of + arraybundle. +

+

+  call ESMF_ArrayBundleHaloStore(arraybundle=arraybundle, &
+    routehandle=haloHandle, rc=rc)
+
+ +

+The halo exchange pattern stored in haloHandle can now be applied to + the arraybundle object, or any other ArrayBundle that is compatible + to the one used during the ESMF_ArrayBundleHaloStore() call. +

+

+  call ESMF_ArrayBundleHalo(arraybundle=arraybundle, routehandle=haloHandle, &
+    rc=rc)
+
+ +

+Finally, when no longer needed, the resources held by haloHandle need + to be returned to the system by calling ESMF_ArrayBundleHaloRelease(). +

+

+  call ESMF_ArrayBundleHaloRelease(routehandle=haloHandle, rc=rc)
+
+ +

+Finally the ArrayBundle object can be destroyed. +

+

+  call ESMF_ArrayBundleDestroy(arraybundle, rc=rc)
+
+ +

+ + +

+27.3 Restrictions and Future Work +

+ +

+ +

    +
  • Non-blocking ArrayBundle communications option is not yet implemented. In the future this functionality will be provided via the +routesyncflag option. + +

    +

  • +
+ +

+27.4 Design and Implementation Notes +

+ +

+The following is a list of implementation specific details about the current ESMF ArrayBundle. + +

+ +

    +
  • Implementation language is C++. +
  • +
  • All precomputed communication methods are based on sparse matrix +multiplication. +
  • +
+ +

+27.5 Class API +

+ +

+ +

+ +

+ +

+27.5.1 ESMF_ArrayBundleAssignment(=) - ArrayBundle assignment +

+ +

+ +

+
+INTERFACE: +

     interface assignment(=)
+     arraybundle1 = arraybundle2
+
ARGUMENTS: +
     type(ESMF_ArrayBundle) :: arraybundle1
+     type(ESMF_ArrayBundle) :: arraybundle2
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Assign arraybundle1 as an alias to the same ESMF ArrayBundle object in memory + as arraybundle2. If arraybundle2 is invalid, then arraybundle1 will be equally invalid after + the assignment. + +

+The arguments are: +

+
arraybundle1
+
The ESMF_ArrayBundle object on the left hand side of the assignment. + +
+
arraybundle2
+
The ESMF_ArrayBundle object on the right hand side of the assignment. + +
+
+ +

+ +

+ +

+27.5.2 ESMF_ArrayBundleOperator(==) - ArrayBundle equality operator +

+ +

+ +

+
+INTERFACE: +

   interface operator(==)
+     if (arraybundle1 == arraybundle2) then ... endif
+               OR
+     result = (arraybundle1 == arraybundle2)
+
RETURN VALUE: +
     logical :: result
+
ARGUMENTS: +
     type(ESMF_ArrayBundle), intent(in) :: arraybundle1
+     type(ESMF_ArrayBundle), intent(in) :: arraybundle2
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Test whether arraybundle1 and arraybundle2 are valid aliases to the same ESMF + ArrayBundle object in memory. For a more general comparison of two ESMF ArrayBundles, + going beyond the simple alias test, the ESMF_ArrayBundleMatch() function (not yet + implemented) must be used. + +

+The arguments are: +

+
arraybundle1
+
The ESMF_ArrayBundle object on the left hand side of the equality + operation. + +
+
arraybundle2
+
The ESMF_ArrayBundle object on the right hand side of the equality + operation. + +
+
+ +

+ +

+ +

+27.5.3 ESMF_ArrayBundleOperator(/=) - ArrayBundle not equal operator +

+ +

+ +

+
+INTERFACE: +

   interface operator(/=)
+     if (arraybundle1 /= arraybundle2) then ... endif
+               OR
+     result = (arraybundle1 /= arraybundle2)
+
RETURN VALUE: +
     logical :: result
+
ARGUMENTS: +
     type(ESMF_ArrayBundle), intent(in) :: arraybundle1
+     type(ESMF_ArrayBundle), intent(in) :: arraybundle2
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Test whether arraybundle1 and arraybundle2 are not valid aliases to the + same ESMF ArrayBundle object in memory. For a more general comparison of two ESMF + ArrayBundles, going beyond the simple alias test, the ESMF_ArrayBundleMatch() function + (not yet implemented) must be used. + +

+The arguments are: +

+
arraybundle1
+
The ESMF_ArrayBundle object on the left hand side of the non-equality + operation. + +
+
arraybundle2
+
The ESMF_ArrayBundle object on the right hand side of the non-equality + operation. + +
+
+ +

+ +

+ +

+27.5.4 ESMF_ArrayBundleAdd - Add Arrays to an ArrayBundle +

+ +

+ +

+
+INTERFACE: +

     subroutine ESMF_ArrayBundleAdd(arraybundle, arrayList, &
+       multiflag, relaxedflag, rc)
+
ARGUMENTS: +
     type(ESMF_ArrayBundle), intent(inout)         :: arraybundle
+     type(ESMF_Array),       intent(in)            :: arrayList(:)
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     logical,                intent(in),  optional :: multiflag
+     logical,                intent(in),  optional :: relaxedflag
+     integer,                intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Add Array(s) to an ArrayBundle. It is an error if arrayList contains + Arrays that match by name Arrays already contained in arraybundle. + +

+

+
arraybundle
+
ESMF_ArrayBundle to be added to. + +
+
arrayList
+
List of ESMF_Array objects to be added. + +
+
[multiflag]
+
A setting of .true. allows multiple items with the same name + to be added to arraybundle. For .false. added items must + have unique names. The default setting is .false.. + +
+
[relaxedflag]
+
A setting of .true. indicates a relaxed definition of "add" + under multiflag=.false. mode, where it is not an error if + arrayList contains items with names that are also found in + arraybundle. The arraybundle is left unchanged for these items. + For .false. this is treated as an error condition. + The default setting is .false.. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+27.5.5 ESMF_ArrayBundleAddReplace - Conditionally add or replace Arrays in an ArrayBundle +

+ +

+ +

+
+INTERFACE: +

     subroutine ESMF_ArrayBundleAddReplace(arraybundle, arrayList, rc)
+
ARGUMENTS: +
     type(ESMF_ArrayBundle), intent(inout)         :: arraybundle
+     type(ESMF_Array),       intent(in)            :: arrayList(:)
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,                intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Arrays in arrayList that do not match any Arrays by name in + arraybundle are added to the ArrayBundle. Arrays in arraybundle + that match by name Arrays in arrayList are replaced by those Arrays. + +

+

+
arraybundle
+
ESMF_ArrayBundle to be manipulated. + +
+
arrayList
+
List of ESMF_Array objects to be added or used as replacement. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+27.5.6 ESMF_ArrayBundleCreate - Create an ArrayBundle from a list of Arrays +

+ +

+ +

+
+INTERFACE: +

   function ESMF_ArrayBundleCreate(arrayList, multiflag, &
+     relaxedflag, name, rc)
+
RETURN VALUE: +
     type(ESMF_ArrayBundle) :: ESMF_ArrayBundleCreate
+
ARGUMENTS: +
 -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     type(ESMF_Array), intent(in),  optional :: arrayList(:)
+     logical,          intent(in),  optional :: multiflag
+     logical,          intent(in),  optional :: relaxedflag
+     character(len=*), intent(in),  optional :: name
+     integer,          intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Create an ESMF_ArrayBundle object from a list of existing Arrays. + +

+The creation of an ArrayBundle leaves the bundled Arrays unchanged, they + remain valid individual objects. An ArrayBundle is a light weight container + of Array references. The actual data remains in place, there are no + data movements or duplications associated with the creation of an + ArrayBundle. + +

+

+
[arrayList]
+
List of ESMF_Array objects to be bundled. + +
+
[multiflag]
+
A setting of .true. allows multiple items with the same name + to be added to arraybundle. For .false. added items must + have unique names. The default setting is .false.. + +
+
[relaxedflag]
+
A setting of .true. indicates a relaxed definition of "add" + under multiflag=.false. mode, where it is not an error if + arrayList contains items with names that are also found in + arraybundle. The arraybundle is left unchanged for these items. + For .false. this is treated as an error condition. + The default setting is .false.. + +
+
[name]
+
Name of the created ESMF_ArrayBundle. A default name is generated + if not specified. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+27.5.7 ESMF_ArrayBundleDestroy - Release resources associated with an ArrayBundle +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_ArrayBundleDestroy(arraybundle, noGarbage, rc)
+
ARGUMENTS: +
     type(ESMF_ArrayBundle), intent(inout)           :: arraybundle
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     logical,                intent(in),   optional  :: noGarbage
+     integer,                intent(out),  optional  :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    7.0.0
    +
    Added argument noGarbage. + The argument provides a mechanism to override the default garbage collection + mechanism when destroying an ESMF object. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Destroys an ESMF_ArrayBundle object. The member Arrays are not + touched by this operation and remain valid objects that need to be + destroyed individually if necessary. + +

+By default a small remnant of the object is kept in memory in order to + prevent problems with dangling aliases. The default garbage collection + mechanism can be overridden with the noGarbage argument. + +

+The arguments are: +

+
arraybundle
+
ESMF_ArrayBundle object to be destroyed. + +
+
[noGarbage]
+
If set to .TRUE. the object will be fully destroyed and removed + from the ESMF garbage collection system. Note however that under this + condition ESMF cannot protect against accessing the destroyed object + through dangling aliases - a situation which may lead to hard to debug + application crashes. + +

+It is generally recommended to leave the noGarbage argument + set to .FALSE. (the default), and to take advantage of the ESMF + garbage collection system which will prevent problems with dangling + aliases or incorrect sequences of destroy calls. However this level of + support requires that a small remnant of the object is kept in memory + past the destroy call. This can lead to an unexpected increase in memory + consumption over the course of execution in applications that use + temporary ESMF objects. For situations where the repeated creation and + destruction of temporary objects leads to memory issues, it is + recommended to call with noGarbage set to .TRUE., fully + removing the entire temporary object from memory. + +

+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+27.5.8 ESMF_ArrayBundleGet - Get object-wide information from an ArrayBundle +

+ +

+ +

+
+INTERFACE: +

     ! Private name; call using ESMF_ArrayBundleGet()
+     subroutine ESMF_ArrayBundleGetListAll(arraybundle, &
+       itemorderflag, arrayCount, arrayList, arrayNameList, name, vm, rc)
+
ARGUMENTS: +
     type(ESMF_ArrayBundle),    intent(in)            :: arraybundle
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     type(ESMF_ItemOrder_Flag), intent(in),  optional :: itemorderflag
+     integer,                   intent(out), optional :: arrayCount
+     type(ESMF_Array),          intent(out), optional :: arrayList(:)
+     character(len=*),          intent(out), optional :: arrayNameList(:)
+     character(len=*),          intent(out), optional :: name
+     type(ESMF_VM),             intent(out), optional :: vm
+     integer,                   intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    6.1.0
    +
    Added argument itemorderflag. + The new argument gives the user control over the order in which + the items are returned. + +
    +
    8.8.0
    +
    Added argument vm in order to offer information about the + VM on which the ArrayBundle was created. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Get general, i.e. not Array name specific information from the ArrayBundle. + +

+

+
arraybundle
+
ESMF_ArrayBundle to be queried. + +
+
[itemorderflag]
+
Specifies the order of the returned items in the arrayList and + arrayNameList. + The default is ESMF_ITEMORDER_ABC. + See 54.34 for a full list of options. + +
+
[arrayCount]
+
Upon return holds the number of Arrays bundled in the ArrayBundle. + +
+
[arrayList]
+
Upon return holds a list of Arrays bundled in arraybundle. The + argument must be allocated to be at least of size arrayCount. + +
+
[arrayNameList]
+
Upon return holds a list of the names of the Arrays bundled in + arraybundle. The argument must be allocated to be at least of + size arrayCount. + +
+
[name]
+
Name of the ArrayBundle object. + +
+
[vm
+
The VM on which the ArrayBundle object was created. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+27.5.9 ESMF_ArrayBundleGet - Get information about an Array by name and optionally return an Array +

+ +

+ +

+
+INTERFACE: +

     ! Private name; call using ESMF_ArrayBundleGet()   
+     subroutine ESMF_ArrayBundleGetItem(arraybundle, arrayName, &
+       array, arrayCount, isPresent, rc)
+
ARGUMENTS: +
     type(ESMF_ArrayBundle), intent(in)            :: arraybundle
+     character(len=*),       intent(in)            :: arrayName
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     type(ESMF_Array),       intent(out), optional :: array
+     integer,                intent(out), optional :: arrayCount
+     logical,                intent(out), optional :: isPresent
+     integer,                intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Get information about items that match arrayName in ArrayBundle. + +

+

+
arraybundle
+
ESMF_ArrayBundle to be queried. + +
+
arrayName
+
Specified name. + +
+
[array]
+
Upon return holds the requested Array item. It is an error if this + argument was specified and there is not exactly one Array item in + arraybundle that matches arrayName. + +
+
[arrayCount]
+
Number of Arrays with arrayName in arraybundle. + +
+
[isPresent]
+
Upon return indicates whether Array(s) with arrayName exist + in arraybundle. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+27.5.10 ESMF_ArrayBundleGet - Get a list of Arrays by name +

+ +

+ +

+
+INTERFACE: +

     ! Private name; call using ESMF_ArrayBundleGet()   
+     subroutine ESMF_ArrayBundleGetList(arraybundle, arrayName, arrayList, &
+       itemorderflag, rc)
+
ARGUMENTS: +
     type(ESMF_ArrayBundle),    intent(in)            :: arraybundle
+     character(len=*),          intent(in)            :: arrayName
+     type(ESMF_Array),          intent(out)           :: arrayList(:)
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     type(ESMF_ItemOrder_Flag), intent(in),  optional :: itemorderflag
+     integer,                   intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    6.1.0
    +
    Added argument itemorderflag. + The new argument gives the user control over the order in which + the items are returned. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Get the list of Arrays from ArrayBundle that match arrayName. + +

+

+
arraybundle
+
ESMF_ArrayBundle to be queried. + +
+
arrayName
+
Specified name. + +
+
arrayList
+
List of Arrays in arraybundle that match arrayName. The + argument must be allocated to be at least of size arrayCount + returned for this arrayName. + +
+
[itemorderflag]
+
Specifies the order of the returned items in the arrayList. + The default is ESMF_ITEMORDER_ABC. + See 54.34 for a full list of options. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+27.5.11 ESMF_ArrayBundleHalo - Execute an ArrayBundle halo operation +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_ArrayBundleHalo(arraybundle, routehandle, &
+     checkflag, rc)
+
ARGUMENTS: +
     type(ESMF_ArrayBundle), intent(inout)          :: arraybundle
+     type(ESMF_RouteHandle), intent(inout)          :: routehandle
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     logical,                intent(in),   optional :: checkflag
+     integer,                intent(out),  optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Execute a precomputed ArrayBundle halo operation for the Arrays in + arrayBundle. + +

+See ESMF_ArrayBundleHaloStore() on how to precompute + routehandle. + +

+This call is collective across the current VM. + +

+

+
arraybundle
+
ESMF_ArrayBundle containing data to be haloed. + +
+
routehandle
+
Handle to the precomputed Route. + +
+
[checkflag]
+
If set to .TRUE. the input Array pairs will be checked for + consistency with the precomputed operation provided by routehandle. + If set to .FALSE. (default) only a very basic input check + will be performed, leaving many inconsistencies undetected. Set + checkflag to .FALSE. to achieve highest performance. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+27.5.12 ESMF_ArrayBundleHaloRelease - Release resources associated with an ArrayBundle halo operation +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_ArrayBundleHaloRelease(routehandle, &
+     noGarbage, rc)
+
ARGUMENTS: +
     type(ESMF_RouteHandle), intent(inout)          :: routehandle
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     logical,                intent(in),   optional :: noGarbage
+     integer,                intent(out),  optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    8.0.0
    +
    Added argument noGarbage. + The argument provides a mechanism to override the default garbage collection + mechanism when destroying an ESMF object. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Release resources associated with an ArrayBundle halo operation. + After this call routehandle becomes invalid. + +

+

+
routehandle
+
Handle to the precomputed Route. + +
+
[noGarbage]
+
If set to .TRUE. the object will be fully destroyed and removed + from the ESMF garbage collection system. Note however that under this + condition ESMF cannot protect against accessing the destroyed object + through dangling aliases - a situation which may lead to hard to debug + application crashes. + +

+It is generally recommended to leave the noGarbage argument + set to .FALSE. (the default), and to take advantage of the ESMF + garbage collection system which will prevent problems with dangling + aliases or incorrect sequences of destroy calls. However this level of + support requires that a small remnant of the object is kept in memory + past the destroy call. This can lead to an unexpected increase in memory + consumption over the course of execution in applications that use + temporary ESMF objects. For situations where the repeated creation and + destruction of temporary objects leads to memory issues, it is + recommended to call with noGarbage set to .TRUE., fully + removing the entire temporary object from memory. + +

+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+27.5.13 ESMF_ArrayBundleHaloStore - Precompute an ArrayBundle halo operation +

+ +

+ +

+
+INTERFACE: +

     subroutine ESMF_ArrayBundleHaloStore(arraybundle, routehandle, &
+       startregion, haloLDepth, haloUDepth, rc)
+
ARGUMENTS: +
     type(ESMF_ArrayBundle),     intent(inout)         :: arraybundle
+     type(ESMF_RouteHandle),     intent(inout)         :: routehandle
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     type(ESMF_StartRegion_Flag),intent(in),  optional :: startregion
+     integer,                    intent(in),  optional :: haloLDepth(:)
+     integer,                    intent(in),  optional :: haloUDepth(:)
+     integer,                    intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Store an ArrayBundle halo operation over the data in arraybundle. By + default, i.e. without specifying startregion, haloLDepth + and haloUDepth, all elements in the total Array regions that lie + outside the exclusive regions will be considered potential destination + elements for the halo operation. However, only those elements that have a corresponding + halo source element, i.e. an exclusive element on one of the DEs, will be + updated under the halo operation. Elements that have no associated source + remain unchanged under halo. + +

+Specifying startregion allows to change the shape of the + effective halo region from the inside. Setting this flag to + ESMF_STARTREGION_COMPUTATIONAL means that only elements outside + the computational region for each Array are considered for potential + destination elements for the halo operation. The default is + ESMF_STARTREGION_EXCLUSIVE. + +

+The haloLDepth and haloUDepth arguments allow to reduce + the extent of the effective halo region. Starting at the region specified + by startregion, the haloLDepth and haloUDepth + define a halo depth in each direction. Note that the maximum halo region is + limited by the total region for each Array, independent of the actual + haloLDepth and haloUDepth setting. The total Array regions are + local DE specific. The haloLDepth and haloUDepth are interpreted + as the maximum desired extent, reducing the potentially larger region + available for the halo operation. + +

+The routine returns an ESMF_RouteHandle that can be used to call + ESMF_ArrayBundleHalo() on any pair of ArrayBundles that matches + srcArrayBundle and dstArrayBundle in type, kind, + and memory layout of the distributed dimensions. However, the size, + number, and index order of undistributed dimensions may be different. + See section 37.2.5 for a more detailed discussion of + RouteHandle reusability. + +

+This call is collective across the current VM. + +

+

+
arraybundle
+
ESMF_ArrayBundle containing data to be haloed. The data in the halo + regions may be destroyed by this call. + +
+
routehandle
+
Handle to the precomputed Route. + +
+
[startregion]
+
The start of the effective halo region on every DE. The default + setting is ESMF_STARTREGION_EXCLUSIVE, rendering all non-exclusive + elements potential halo destination elements. + See section 54.56 for a complete list of + valid settings. + +
+
[haloLDepth]
+
This vector specifies the lower corner of the effective halo + region with respect to the lower corner of startregion. + The size of haloLDepth must equal the number of distributed Array + dimensions. + +
+
[haloUDepth]
+
This vector specifies the upper corner of the effective halo + region with respect to the upper corner of startregion. + The size of haloUDepth must equal the number of distributed Array + dimensions. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+27.5.14 ESMF_ArrayBundleIsCreated - Check whether an ArrayBundle object has been created +

+ +

+ +

+
+INTERFACE: +

   function ESMF_ArrayBundleIsCreated(arraybundle, rc)
+
RETURN VALUE: +
     logical :: ESMF_ArrayBundleIsCreated
+
ARGUMENTS: +
     type(ESMF_ArrayBundle), intent(in)            :: arraybundle
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,                intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Return .true. if the arraybundle has been created. Otherwise return + .false.. If an error occurs, i.e. rc /= ESMF_SUCCESS is + returned, the return value of the function will also be .false.. + +

+The arguments are: +

+
arraybundle
+
ESMF_ArrayBundle queried. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+27.5.15 ESMF_ArrayBundleLog - Log ArrayBundle information +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_ArrayBundleLog(arraybundle, prefix, logMsgFlag, deepFlag, rc)
+
ARGUMENTS: +
     type(ESMF_ArrayBundle), intent(in)              :: arraybundle
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     character(len=*),       intent(in),   optional  :: prefix
+     type(ESMF_LogMsg_Flag), intent(in),   optional  :: logMsgFlag
+     logical,                intent(in),   optional  :: deepFlag
+     integer, intent(out),                 optional  :: rc
+
+DESCRIPTION: +
+ +

+Write information about arraybundle to the ESMF default Log. + +

+The arguments are: +

+
arraybundle
+
ESMF_ArrayBundle object logged. + +
+
[prefix]
+
String to prefix the log message. Default is no prefix. + +
+
[logMsgFlag]
+
Type of log message generated. See section 49.2.3 for + a list of valid message types. Default is ESMF_LOGMSG_INFO. + +
+
[deepFlag]
+
When set to .false. (default), only log top level information for + each item contained in the ArrayBundle. + When set to .true., additionally log information for each item. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+27.5.16 ESMF_ArrayBundlePrint - Print ArrayBundle information +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_ArrayBundlePrint(arraybundle, rc)
+
ARGUMENTS: +
     type(ESMF_ArrayBundle), intent(in)            :: arraybundle
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,                intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Print internal information of the specified ESMF_ArrayBundle + object to stdout. +
+

+The arguments are: +

+
arraybundle
+
ESMF_ArrayBundle object. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+27.5.17 ESMF_ArrayBundleRead - Read Arrays to an ArrayBundle from file(s) +

+ +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_ArrayBundleRead(arraybundle, fileName, &
+     singleFile, timeslice, iofmt, rc)
+
ARGUMENTS: +
     type(ESMF_ArrayBundle), intent(inout)          :: arraybundle
+     character(*),           intent(in)             :: fileName
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     logical,                intent(in),  optional  :: singleFile
+     integer,                intent(in),  optional  :: timeslice
+     type(ESMF_IOFmt_Flag),  intent(in),  optional  :: iofmt
+     integer,                intent(out), optional  :: rc
+
+DESCRIPTION: +
+ +

+Read Array data to an ArrayBundle object from file(s). + For this API to be functional, the environment variable ESMF_PIO + should be set to either "internal" or "external" when the ESMF library is built. + Please see the section on Data I/O, 38.2. + +

+Limitations: + +

    +
  • For multi-tile Arrays, all Arrays in the ArrayBundle must contain + the same number of tiles. +
  • +
  • Not supported in ESMF_COMM=mpiuni mode. + +
  • +
+ +

+The arguments are: +

+
arraybundle
+
An ESMF_ArrayBundle object. + +
+
fileName
+
The name of the file from which ArrayBundle data is read. + If the ArrayBundle contains multi-tile Arrays, then fileName must contain + exactly one instance of "*"; this is a placeholder that will be replaced + by the tile number, with each tile being read from a separate file. (For + example, for a fileName of "myfile*.nc", tile 1 will be read from + "myfile1.nc", tile 2 from "myfile2.nc", etc.) + (This handling of the fileName for multi-tile I/O is subject to change.) + +
+
[singleFile]
+
A logical flag, the default is .true., i.e., all Arrays in the bundle + are stored in one single file. If .false., each Array is stored + in separate files; these files are numbered with the name based on the + argument "file". That is, a set of files are named: [file_name]001, + [file_name]002, [file_name]003,... + +
+
[timeslice]
+
The time-slice number of the variable read from file. + +
+
[iofmt]
+
The I/O format. Please see Section 54.30 for the list + of options. If not present, defaults to ESMF_IOFMT_NETCDF. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+27.5.18 ESMF_ArrayBundleRedist - Execute an ArrayBundle redistribution +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_ArrayBundleRedist(srcArrayBundle, dstArrayBundle, &
+     routehandle, checkflag, rc)
+
ARGUMENTS: +
     type(ESMF_ArrayBundle), intent(in),    optional :: srcArrayBundle
+     type(ESMF_ArrayBundle), intent(inout), optional :: dstArrayBundle
+     type(ESMF_RouteHandle), intent(inout)           :: routehandle
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     logical,                intent(in),    optional :: checkflag
+     integer,                intent(out),   optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Execute a precomputed ArrayBundle redistribution from the Arrays in + srcArrayBundle to the Arrays in dstArrayBundle. + +

+The srcArrayBundle and dstArrayBundle arguments are optional in + support of the situation where srcArrayBundle and/or + dstArrayBundle are not defined on all PETs. The srcArrayBundle + and dstArrayBundle must be specified on those PETs that hold source + or destination DEs, respectively, but may be omitted on all other PETs. + PETs that hold neither source nor destination DEs may omit both arguments. + +

+This call is collective across the current VM. + +

+

+
[srcArrayBundle]
+
ESMF_ArrayBundle with source data. + +
+
[dstArrayBundle]
+
ESMF_ArrayBundle with destination data. + +
+
routehandle
+
Handle to the precomputed Route. + +
+
[checkflag]
+
If set to .TRUE. the input Array pairs will be checked for + consistency with the precomputed operation provided by routehandle. + If set to .FALSE. (default) only a very basic input check + will be performed, leaving many inconsistencies undetected. Set + checkflag to .FALSE. to achieve highest performance. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+27.5.19 ESMF_ArrayBundleRedistRelease - Release resources associated with ArrayBundle redistribution +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_ArrayBundleRedistRelease(routehandle, &
+     noGarbage, rc)
+
ARGUMENTS: +
     type(ESMF_RouteHandle), intent(inout)          :: routehandle
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     logical,                intent(in),   optional :: noGarbage
+     integer,                intent(out),  optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    8.0.0
    +
    Added argument noGarbage. + The argument provides a mechanism to override the default garbage collection + mechanism when destroying an ESMF object. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Release resources associated with an ArrayBundle redistribution. + After this call routehandle becomes invalid. + +

+

+
routehandle
+
Handle to the precomputed Route. + +
+
[noGarbage]
+
If set to .TRUE. the object will be fully destroyed and removed + from the ESMF garbage collection system. Note however that under this + condition ESMF cannot protect against accessing the destroyed object + through dangling aliases - a situation which may lead to hard to debug + application crashes. + +

+It is generally recommended to leave the noGarbage argument + set to .FALSE. (the default), and to take advantage of the ESMF + garbage collection system which will prevent problems with dangling + aliases or incorrect sequences of destroy calls. However this level of + support requires that a small remnant of the object is kept in memory + past the destroy call. This can lead to an unexpected increase in memory + consumption over the course of execution in applications that use + temporary ESMF objects. For situations where the repeated creation and + destruction of temporary objects leads to memory issues, it is + recommended to call with noGarbage set to .TRUE., fully + removing the entire temporary object from memory. + +

+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+27.5.20 ESMF_ArrayBundleRedistStore - Precompute an ArrayBundle redistribution with local factor argument +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_ArrayBundleRedistStore()
+   subroutine ESMF_ArrayBundleRedistStore<type><kind>(srcArrayBundle, &
+     dstArrayBundle, routehandle, factor, ignoreUnmatchedIndicesFlag, &
+     srcToDstTransposeMap, rc)
+
ARGUMENTS: +
     type(ESMF_ArrayBundle),  intent(in)            :: srcArrayBundle
+     type(ESMF_ArrayBundle),  intent(inout)         :: dstArrayBundle
+     type(ESMF_RouteHandle),  intent(inout)         :: routehandle
+     <type>(ESMF_KIND_<kind>),intent(in)            :: factor
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     logical,                 intent(in),  optional :: ignoreUnmatchedIndicesFlag(:)
+     integer,                 intent(in),  optional :: srcToDstTransposeMap(:)
+     integer,                 intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    8.1.0
    +
    Added argument ignoreUnmatchedIndicesFlag to support cases + where source and destination side do not cover the exact same index space. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Store an ArrayBundle redistribution operation from + srcArrayBundle to dstArrayBundle. The redistribution + between ArrayBundles is defined as the sequence of + individual Array redistributions over all source and + destination Array pairs in sequence. The method requires that + srcArrayBundle and dstArrayBundle reference an identical + number of ESMF_Array objects. + +

+The effect of this method on ArrayBundles that contain aliased members is + undefined. + +

+PETs that specify a factor argument must use the + <type><kind> overloaded interface. Other PETs call into the interface + without factor argument. If multiple PETs specify the factor + argument its type and kind as well as its value must match across all + PETs. If none of the PETs specifies a factor argument the default + will be a factor of 1. + +

+See the description of method ESMF_ArrayRedistStore() for + the definition of the Array based operation. + +

+The routine returns an ESMF_RouteHandle that can be used to call + ESMF_ArrayBundleRedist() on any pair of ArrayBundles that matches + srcArrayBundle and dstArrayBundle in type, kind, + and memory layout of the distributed dimensions. However, the size, + number, and index order of undistributed dimensions may be different. + See section 37.2.5 for a more detailed discussion of + RouteHandle reusability. + +

+This method is overloaded for: +
+ ESMF_TYPEKIND_I4, ESMF_TYPEKIND_I8, +
+ ESMF_TYPEKIND_R4, ESMF_TYPEKIND_R8. +
+ +

+This call is collective across the current VM. + +

+

+
srcArrayBundle
+
ESMF_ArrayBundle with source data. + +
+
dstArrayBundle
+
ESMF_ArrayBundle with destination data. The data in these Arrays + may be destroyed by this call. + +
+
routehandle
+
Handle to the precomputed Route. + +
+
factor
+
Factor by which to multiply source data. + +
+
[ignoreUnmatchedIndicesFlag]
+
If set to .false., the default, source and destination side must + cover the identical index space, using precisely matching sequence + indices. If set to .true., mismatching sequence indices between source + and destination side are silently ignored. + The size of this array argument must either be 1 or equal the number of + Arrays in the srcArrayBundle and dstArrayBundle arguments. In + the latter case, the handling of unmatched indices is specified for each + Array pair separately. If only one element is specified, it is + used for all Array pairs. + +
+
[srcToDstTransposeMap]
+
List with as many entries as there are dimensions in the Arrays in + srcArrayBundle. Each + entry maps the corresponding source Array dimension against the + specified destination Array dimension. Mixing of distributed and + undistributed dimensions is supported. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+27.5.21 ESMF_ArrayBundleRedistStore - Precompute an ArrayBundle redistribution without local factor argument +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_ArrayBundleRedistStore()
+   subroutine ESMF_ArrayBundleRedistStoreNF(srcArrayBundle, dstArrayBundle, &
+     routehandle, ignoreUnmatchedIndicesFlag, &
+     srcToDstTransposeMap, rc)
+
ARGUMENTS: +
     type(ESMF_ArrayBundle), intent(in)            :: srcArrayBundle
+     type(ESMF_ArrayBundle), intent(inout)         :: dstArrayBundle
+     type(ESMF_RouteHandle), intent(inout)         :: routehandle
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     logical,                intent(in),  optional :: ignoreUnmatchedIndicesFlag(:)
+     integer,                intent(in),  optional :: srcToDstTransposeMap(:)
+     integer,                intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    8.1.0
    +
    Added argument ignoreUnmatchedIndicesFlag to support cases + where source and destination side do not cover the exact same index space. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Store an ArrayBundle redistribution operation from + srcArrayBundle to dstArrayBundle. The redistribution + between ArrayBundles is defined as the sequence of + individual Array redistributions over all source and + destination Array pairs in sequence. The method requires that + srcArrayBundle and dstArrayBundle reference an identical + number of ESMF_Array objects. + +

+The effect of this method on ArrayBundles that contain aliased members is + undefined. + +

+PETs that specify a factor argument must use the + <type><kind> overloaded interface. Other PETs call into the interface + without factor argument. If multiple PETs specify the factor + argument its type and kind as well as its value must match across all + PETs. If none of the PETs specifies a factor argument the default + will be a factor of 1. + +

+See the description of method ESMF_ArrayRedistStore() for + the definition of the Array based operation. + +

+The routine returns an ESMF_RouteHandle that can be used to call + ESMF_ArrayBundleRedist() on any pair of ArrayBundles that matches + srcArrayBundle and dstArrayBundle in type, kind, + and memory layout of the distributed dimensions. However, the size, + number, and index order of undistributed dimensions may be different. + See section 37.2.5 for a more detailed discussion of + RouteHandle reusability. + +

+This call is collective across the current VM. + +

+

+
srcArrayBundle
+
ESMF_ArrayBundle with source data. + +
+
dstArrayBundle
+
ESMF_ArrayBundle with destination data. The data in these Arrays + may be destroyed by this call. + +
+
routehandle
+
Handle to the precomputed Route. + +
+
[ignoreUnmatchedIndicesFlag]
+
If set to .false., the default, source and destination side must + cover the identical index space, using precisely matching sequence + indices. If set to .true., mismatching sequence indices between source + and destination side are silently ignored. + The size of this array argument must either be 1 or equal the number of + Arrays in the srcArrayBundle and dstArrayBundle arguments. In + the latter case, the handling of unmatched indices is specified for each + Array pair separately. If only one element is specified, it is + used for all Array pairs. + +
+
[srcToDstTransposeMap]
+
List with as many entries as there are dimensions in the Arrays in + srcArrayBundle. Each + entry maps the corresponding source Array dimension against the + specified destination Array dimension. Mixing of distributed and + undistributed dimensions is supported. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+27.5.22 ESMF_ArrayBundleRemove - Remove Arrays from ArrayBundle +

+ +

+ +

+
+INTERFACE: +

     subroutine ESMF_ArrayBundleRemove(arraybundle, arrayNameList, &
+       multiflag, relaxedflag, rc)
+
ARGUMENTS: +
     type(ESMF_ArrayBundle), intent(inout)         :: arraybundle
+     character(len=*),       intent(in)            :: arrayNameList(:)
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     logical,                intent(in),  optional :: multiflag
+     logical,                intent(in),  optional :: relaxedflag
+     integer,                intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Remove Array(s) by name from ArrayBundle. In the relaxed setting it is + not an error if arrayNameList contains names that are not + found in arraybundle. + +

+

+
arraybundle
+
ESMF_ArrayBundle from which to remove items. + +
+
arrayNameList
+
List of items to remove. + +
+
[multiflag]
+
A setting of .true. allows multiple Arrays with the same name + to be removed from arraybundle. For .false., items to be + removed must have unique names. The default setting is .false.. + +
+
[relaxedflag]
+
A setting of .true. indicates a relaxed definition of "remove" + where it is not an error if arrayNameList contains item + names that are not found in arraybundle. For .false. this is + treated as an error condition. + Further, in multiflag=.false. mode, the relaxed definition of + "remove" also covers the case where there are multiple items in + arraybundle that match a single entry in arrayNameList. + For relaxedflag=.false. this is treated as an error condition. + The default setting is .false.. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+27.5.23 ESMF_ArrayBundleReplace - Replace Arrays in ArrayBundle +

+ +

+ +

+
+INTERFACE: +

     subroutine ESMF_ArrayBundleReplace(arraybundle, arrayList, &
+       multiflag, relaxedflag, rc)
+
ARGUMENTS: +
     type(ESMF_ArrayBundle), intent(inout)         :: arraybundle
+     type(ESMF_Array),       intent(in)            :: arrayList(:)
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     logical,                intent(in),  optional :: multiflag
+     logical,                intent(in),  optional :: relaxedflag
+     integer,                intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Replace Array(s) by name in ArrayBundle. In the relaxed setting it is not + an error if arrayList contains Arrays that do not match by name any + item in arraybundle. These Arrays are simply ignored in this case. + +

+

+
arraybundle
+
ESMF_ArrayBundle in which to replace items. + +
+
arrayList
+
List of items to replace. + +
+
[multiflag]
+
A setting of .true. allows multiple items with the same name + to be replaced in arraybundle. For .false., items to be + replaced must have unique names. The default setting is .false.. + +
+
[relaxedflag]
+
A setting of .true. indicates a relaxed definition of "replace" + where it is not an error if arrayList contains items with + names that are not found in arraybundle. These items in + arrayList are ignored in the relaxed mode. For .false. this + is treated as an error condition. + Further, in multiflag=.false. mode, the relaxed definition of + "replace" also covers the case where there are multiple items in + arraybundle that match a single entry by name in arrayList. + For relaxedflag=.false. this is treated as an error condition. + The default setting is .false.. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+27.5.24 ESMF_ArrayBundleSMM - Execute an ArrayBundle sparse matrix multiplication +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_ArrayBundleSMM(srcArrayBundle, dstArrayBundle, &
+     routehandle, &
+     zeroregion, & ! DEPRECATED ARGUMENT
+     zeroregionflag, termorderflag, checkflag, rc)
+
ARGUMENTS: +
     type(ESMF_ArrayBundle),    intent(in),         optional :: srcArrayBundle
+     type(ESMF_ArrayBundle),    intent(inout),      optional :: dstArrayBundle
+     type(ESMF_RouteHandle),    intent(inout)                :: routehandle
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     type(ESMF_Region_Flag),    intent(in), optional :: zeroregion ! DEPRECATED ARGUMENT
+     type(ESMF_Region_Flag),    intent(in), target, optional :: zeroregionflag(:)
+     type(ESMF_TermOrder_Flag), intent(in), target, optional :: termorderflag(:)
+     logical,                   intent(in),         optional :: checkflag
+     integer,                   intent(out),        optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    7.0.0
    +
    Added argument termorderflag. + The new argument gives the user control over the order in which + the src terms are summed up. + +
    +
    8.1.0
    +
    Added argument zeroregionflag, and deprecated + zeroregion. The new argument allows greater flexibility + in setting the zero region for individual ArrayBundle members. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Execute a precomputed ArrayBundle sparse matrix multiplication from the + Arrays in srcArrayBundle to the Arrays in dstArrayBundle. + +

+The srcArrayBundle and dstArrayBundle arguments are optional in + support of the situation where srcArrayBundle and/or + dstArrayBundle are not defined on all PETs. The srcArrayBundle + and dstArrayBundle must be specified on those PETs that hold source + or destination DEs, respectively, but may be omitted on all other PETs. + PETs that hold neither source nor destination DEs may omit both arguments. + +

+This call is collective across the current VM. + +

+

+
[srcArrayBundle]
+
ESMF_ArrayBundle with source data. + +
+
[dstArrayBundle]
+
ESMF_ArrayBundle with destination data. + +
+
routehandle
+
Handle to the precomputed Route. + +
+
[zeroregion]
+
If set to ESMF_REGION_TOTAL (default) the total regions of + all DEs in all Arrays in dstArrayBundle will be initialized to zero + before updating the elements with the results of the sparse matrix + multiplication. If set to ESMF_REGION_EMPTY the elements in the + Arrays in dstArrayBundle will not be modified prior to the sparse + matrix multiplication and results will be added to the incoming element + values. Setting zeroregion to ESMF_REGION_SELECT will only + zero out those elements in the destination Arrays that will be updated + by the sparse matrix multiplication. See section 54.50 + for a complete list of valid settings. + +
+
[zeroregionflag]
+
If set to ESMF_REGION_TOTAL (default) the total regions of + all DEs in the destination Array will be initialized to zero + before updating the elements with the results of the sparse matrix + multiplication. If set to ESMF_REGION_EMPTY the elements in the + destination Array will not be modified prior to the sparse + matrix multiplication and results will be added to the incoming element + values. A setting of ESMF_REGION_SELECT will only + zero out those elements in the destination Array that will be updated + by the sparse matrix multiplication. See section 54.50 + for a complete list of valid settings. + The size of this array argument must either be 1 or equal the number of + Arrays in the srcArrayBundle and dstArrayBundle arguments. In + the latter case, the zero region for each Array SMM operation is + indicated separately. If only one zero region element is specified, it is + used for all Array pairs. + +
+
[termorderflag]
+
Specifies the order of the source side terms in all of the destination + sums. The termorderflag only affects the order of terms during + the execution of the RouteHandle. See the 37.2.1 section for an + in-depth discussion of all bit-for-bit reproducibility + aspects related to route-based communication methods. + See 54.60 for a full list of options. + The size of this array argument must either be 1 or equal the number of + Arrays in the srcArrayBundle and dstArrayBundle arguments. In + the latter case, the term order for each Array SMM operation is + indicated separately. If only one term order element is specified, it is + used for all Array pairs. + The default is (/ESMF_TERMORDER_FREE/), allowing maximum + flexibility in the order of terms for optimum performance. + +
+
[checkflag]
+
If set to .TRUE. the input Array pairs will be checked for + consistency with the precomputed operation provided by routehandle. + If set to .FALSE. (default) only a very basic input check + will be performed, leaving many inconsistencies undetected. Set + checkflag to .FALSE. to achieve highest performance. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+27.5.25 ESMF_ArrayBundleSMMRelease - Release resources associated with ArrayBundle sparse matrix multiplication +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_ArrayBundleSMMRelease(routehandle, &
+     noGarbage, rc)
+
ARGUMENTS: +
     type(ESMF_RouteHandle), intent(inout)          :: routehandle
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     logical,                intent(in),   optional :: noGarbage
+     integer,                intent(out),  optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    8.0.0
    +
    Added argument noGarbage. + The argument provides a mechanism to override the default garbage collection + mechanism when destroying an ESMF object. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Release resources associated with an ArrayBundle sparse matrix multiplication. + After this call routehandle becomes invalid. + +

+

+
routehandle
+
Handle to the precomputed Route. + +
+
[noGarbage]
+
If set to .TRUE. the object will be fully destroyed and removed + from the ESMF garbage collection system. Note however that under this + condition ESMF cannot protect against accessing the destroyed object + through dangling aliases - a situation which may lead to hard to debug + application crashes. + +

+It is generally recommended to leave the noGarbage argument + set to .FALSE. (the default), and to take advantage of the ESMF + garbage collection system which will prevent problems with dangling + aliases or incorrect sequences of destroy calls. However this level of + support requires that a small remnant of the object is kept in memory + past the destroy call. This can lead to an unexpected increase in memory + consumption over the course of execution in applications that use + temporary ESMF objects. For situations where the repeated creation and + destruction of temporary objects leads to memory issues, it is + recommended to call with noGarbage set to .TRUE., fully + removing the entire temporary object from memory. + +

+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+27.5.26 ESMF_ArrayBundleSMMStore - Precompute an ArrayBundle sparse matrix multiplication with local factors +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_ArrayBundleSMMStore()
+   subroutine ESMF_ArrayBundleSMMStore<type><kind>(srcArrayBundle, &
+     dstArrayBundle, routehandle, factorList, factorIndexList, &
+     ignoreUnmatchedIndicesFlag, srcTermProcessing, rc)
+
ARGUMENTS: +
     type(ESMF_ArrayBundle),           intent(in)    :: srcArrayBundle
+     type(ESMF_ArrayBundle),           intent(inout) :: dstArrayBundle
+     type(ESMF_RouteHandle),           intent(inout) :: routehandle
+     <type>(ESMF_KIND_<kind>), target, intent(in)    :: factorList(:)
+     integer,                          intent(in)    :: factorIndexList(:,:)
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     logical,                intent(in),    optional :: ignoreUnmatchedIndicesFlag(:)
+     integer,                intent(inout), optional :: srcTermProcessing(:)
+     integer,                intent(out),   optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    7.1.0r
    +
    Added argument srcTermProcessing. + The new argument gives the user access to the tuning parameter + affecting the sparse matrix execution and bit-wise + reproducibility. + +
    +
    8.1.0
    +
    Added argument ignoreUnmatchedIndicesFlag to support cases + where the sparse matrix includes terms with source or destination sequence + indices not present in the source or destination array. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Store an ArrayBundle sparse matrix multiplication operation from + srcArrayBundle to dstArrayBundle. The sparse matrix + multiplication between ArrayBundles is defined as the sequence of + individual Array sparse matrix multiplications over all source and + destination Array pairs in sequence. The method requires that + srcArrayBundle and dstArrayBundle reference an identical + number of ESMF_Array objects. + +

+The effect of this method on ArrayBundles that contain aliased members is + undefined. + +

+PETs that specify non-zero matrix coefficients must use + the <type><kind> overloaded interface and provide the factorList and + factorIndexList arguments. Providing factorList and + factorIndexList arguments with size(factorList) = (/0/) and + size(factorIndexList) = (/2,0/) or (/4,0/) indicates that a + PET does not provide matrix elements. Alternatively, PETs that do not + provide matrix elements may also call into the overloaded interface + without factorList and factorIndexList arguments. + +

+See the description of method ESMF_ArraySMMStore() for + the definition of the Array based operation. + +

+The routine returns an ESMF_RouteHandle that can be used to call + ESMF_ArrayBundleSMM() on any pair of ArrayBundles that matches + srcArrayBundle and dstArrayBundle in type, kind, + and memory layout of the distributed dimensions. However, the size, + number, and index order of undistributed dimensions may be different. + See section 37.2.5 for a more detailed discussion of + RouteHandle reusability. + +

+This method is overloaded for: +
+ ESMF_TYPEKIND_I4, ESMF_TYPEKIND_I8, +
+ ESMF_TYPEKIND_R4, ESMF_TYPEKIND_R8. +
+ +

+This call is collective across the current VM. + +

+

+
srcArrayBundle
+
ESMF_ArrayBundle with source data. + +
+
dstArrayBundle
+
ESMF_ArrayBundle with destination data. The data in these Arrays + may be destroyed by this call. + +
+
routehandle
+
Handle to the precomputed Route. + +
+
factorList
+
List of non-zero coefficients. + +
+
factorIndexList
+
Pairs of sequence indices for the factors stored in factorList. + +

+The second dimension of factorIndexList steps through the list of + pairs, i.e. size(factorIndexList,2) == size(factorList). The first + dimension of factorIndexList is either of size 2 or size 4. + +

+In the size 2 format factorIndexList(1,:) specifies the + sequence index of the source element in the source Array while + factorIndexList(2,:) specifies the sequence index of the + destination element in the destination Array. For this format to be a + valid option source and destination Arrays must have matching number of + tensor elements (the product of the sizes of all Array tensor dimensions). + Under this condition an identity matrix can be applied within the space of + tensor elements for each sparse matrix factor. + +

+The size 4 format is more general and does not require a matching + tensor element count. Here the factorIndexList(1,:) specifies the + sequence index while factorIndexList(2,:) specifies the tensor + sequence index of the source element in the source Array. Further + factorIndexList(3,:) specifies the sequence index and + factorIndexList(4,:) specifies the tensor sequence index of the + destination element in the destination Array. + +

+See section 28.2.18 for details on the definition of + Array sequence indices and tensor sequence indices. + +

+

+
[ignoreUnmatchedIndicesFlag]
+
If set to .false., the default, source and destination side must + cover all of the squence indices defined in the sparse matrix. An error + will be returned if a sequence index in the sparse matrix does not match + on either the source or destination side. + If set to .true., mismatching sequence indices are silently ignored. + The size of this array argument must either be 1 or equal the number of + Arrays in the srcArrayBundle and dstArrayBundle arguments. In + the latter case, the handling of unmatched indices is specified for each + Array pair separately. If only one element is specified, it is + used for all Array pairs. + +

+

+
[srcTermProcessing]
+
Source term summing options for route handle creation. See + ESMF_ArraySMMStore documentation for a full parameter description. + Two forms may be provided. If a single element list is provided, this + integer value is applied across all bundle members. Otherwise, the list must + contain as many elements as there are bundle members. For the special case + of accessing the auto-tuned parameter (providing a negative integer value), + the list length must equal the bundle member count. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+27.5.27 ESMF_ArrayBundleSMMStore - Precompute an ArrayBundle sparse matrix multiplication without local factors +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_ArrayBundleSMMStore()
+   subroutine ESMF_ArrayBundleSMMStoreNF(srcArrayBundle, dstArrayBundle, &
+     routehandle, ignoreUnmatchedIndicesFlag, srcTermProcessing, rc)
+
ARGUMENTS: +
     type(ESMF_ArrayBundle),  intent(in)              :: srcArrayBundle
+     type(ESMF_ArrayBundle),  intent(inout)           :: dstArrayBundle
+     type(ESMF_RouteHandle),  intent(inout)           :: routehandle
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     logical,                 intent(in),    optional :: ignoreUnmatchedIndicesFlag(:)
+     integer,                 intent(inout), optional :: srcTermProcessing(:)
+     integer,                 intent(out),   optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    7.1.0r
    +
    Added argument srcTermProcessing. + The new argument gives the user access to the tuning parameter + affecting the sparse matrix execution and bit-wise + reproducibility. + +
    +
    8.1.0
    +
    Added argument ignoreUnmatchedIndicesFlag to support cases + where the sparse matrix includes terms with source or destination sequence + indices not present in the source or destination array. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Store an ArrayBundle sparse matrix multiplication operation from + srcArrayBundle to dstArrayBundle. The sparse matrix + multiplication between ArrayBundles is defined as the sequence of + individual Array sparse matrix multiplications over all source and + destination Array pairs in sequence. The method requires that + srcArrayBundle and dstArrayBundle reference an identical + number of ESMF_Array objects. + +

+The effect of this method on ArrayBundles that contain aliased members is + undefined. + +

+PETs that specify non-zero matrix coefficients must use + the <type><kind> overloaded interface and provide the factorList and + factorIndexList arguments. Providing factorList and + factorIndexList arguments with size(factorList) = (/0/) and + size(factorIndexList) = (/2,0/) or (/4,0/) indicates that a + PET does not provide matrix elements. Alternatively, PETs that do not + provide matrix elements may also call into the overloaded interface + without factorList and factorIndexList arguments. + +

+See the description of method ESMF_ArraySMMStore() for + the definition of the Array based operation. + +

+The routine returns an ESMF_RouteHandle that can be used to call + ESMF_ArrayBundleSMM() on any pair of ArrayBundles that matches + srcArrayBundle and dstArrayBundle in type, kind, + and memory layout of the distributed dimensions. However, the size, + number, and index order of undistributed dimensions may be different. + See section 37.2.5 for a more detailed discussion of + RouteHandle reusability. + +

+This call is collective across the current VM. + +

+

+
srcArrayBundle
+
ESMF_ArrayBundle with source data. + +
+
dstArrayBundle
+
ESMF_ArrayBundle with destination data. The data in these Arrays + may be destroyed by this call. + +
+
routehandle
+
Handle to the precomputed Route. + +

+

+
[ignoreUnmatchedIndicesFlag]
+
If set to .false., the default, source and destination side must + cover all of the squence indices defined in the sparse matrix. An error + will be returned if a sequence index in the sparse matrix does not match + on either the source or destination side. + If set to .true., mismatching sequence indices are silently ignored. + The size of this array argument must either be 1 or equal the number of + Arrays in the srcArrayBundle and dstArrayBundle arguments. In + the latter case, the handling of unmatched indices is specified for each + Array pair separately. If only one element is specified, it is + used for all Array pairs. + +

+

+
[srcTermProcessing]
+
Source term summing options for route handle creation. See + ESMF_ArraySMMStore documentation for a full parameter description. + Two forms may be provided. If a single element list is provided, this + integer value is applied across all bundle members. Otherwise, the list must + contain as many elements as there are bundle members. For the special case + of accessing the auto-tuned parameter (providing a negative integer value), + the list length must equal the bundle member count. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+27.5.28 ESMF_ArrayBundleWrite - Write the Arrays into a file +

+ +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_ArrayBundleWrite(arraybundle, fileName, &
+     convention, purpose, singleFile, overwrite, status, timeslice, iofmt, rc)
+
ARGUMENTS: +
     type(ESMF_ArrayBundle),     intent(in)              :: arraybundle
+     character(*),               intent(in)              :: fileName
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     character(*),               intent(in),  optional  :: convention
+     character(*),               intent(in),  optional  :: purpose
+     logical,                    intent(in),  optional  :: singleFile
+     logical,                    intent(in),  optional  :: overwrite
+     type(ESMF_FileStatus_Flag), intent(in),  optional  :: status
+     integer,                    intent(in),  optional  :: timeslice
+     type(ESMF_IOFmt_Flag),      intent(in),  optional  :: iofmt
+     integer,                    intent(out), optional  :: rc
+
+DESCRIPTION: +
+ +

+Write the Arrays into a file. For this API to be functional, + the environment variable ESMF_PIO should be set to either "internal" or "external" + when the ESMF library is built. Please see the section on + Data I/O, 38.2. + +

+When convention and purpose arguments are specified, NetCDF dimension + labels and variable attributes are written from each Array in the ArrayBundle + from the corresponding Attribute package. Additionally, Attributes may be + set on the ArrayBundle level under the same Attribute package. This allows + the specification of global attributes within the file. + As with individual Arrays, the value associated with each name may be either + a scalar character string, or a scalar or array of type integer, real, or + double precision. + +

+Limitations: + +

    +
  • For multi-tile Arrays,all Arrays in the ArrayBundle must contain + the same number of tiles. +
  • +
  • Not supported in ESMF_COMM=mpiuni mode. + +
  • +
+ +

+The arguments are: +

+
arraybundle
+
An ESMF_ArrayBundle object. + +
+
fileName
+
The name of the output file to which array bundle data is written. + If the ArrayBundle contains multi-tile Arrays, then fileName must contain + exactly one instance of "*"; this is a placeholder that will be replaced + by the tile number, with each tile being written to a separate file. (For + example, for a fileName of "myfile*.nc", tile 1 will be written to + "myfile1.nc", tile 2 to "myfile2.nc", etc.) + (This handling of the fileName for multi-tile I/O is subject to change.) + +
+
[convention]
+
Specifies an Attribute package associated with the ArrayBundle, and the + contained Arrays, used to create NetCDF dimension labels and attributes + in the file. When this argument is present, the purpose + argument must also be present. Use this argument only with a NetCDF + I/O format. If binary format is used, ESMF will return an error code. + +
+
[purpose]
+
Specifies an Attribute package associated with the ArrayBundle, and the + contained Arrays, used to create NetCDF dimension labels and attributes + in the file. When this argument is present, the convention + argument must also be present. Use this argument only with a NetCDF + I/O format. If binary format is used, ESMF will return an error code. + +
+
[singleFile]
+
A logical flag, the default is .true., i.e., all arrays in the bundle + are written in one single file. If .false., each array will be written + in separate files; these files are numbered with the name based on the + argument "file". That is, a set of files are named: [file_name]001, + [file_name]002, [file_name]003,... + +
+
[overwrite]
+
A logical flag, the default is .false., i.e., existing Array data may + not be overwritten. If .true., only the + data corresponding to each Array's name will be + be overwritten. If the timeslice option is given, only data for + the given timeslice may be overwritten. + Note that it is always an error to attempt to overwrite a NetCDF + variable with data which has a different shape. + +
+
[status]
+
The file status. Please see Section 54.22 for + the list of options. If not present, defaults to + ESMF_FILESTATUS_UNKNOWN. + +
+
[timeslice]
+
Some I/O formats (e.g. NetCDF) support the output of data in form of + time slices. The timeslice argument provides access to this + capability. timeslice must be positive. The behavior of this + option may depend on the setting of the overwrite flag: +
+
overwrite = .false.:
+
If the timeslice value is + less than the maximum time already in the file, the write will fail. + +
+
overwrite = .true.:
+
Any positive timeslice value is valid. + +
+
+ By default, i.e. by omitting the timeslice argument, no + provisions for time slicing are made in the output file, + however, if the file already contains a time axis for the variable, + a timeslice one greater than the maximum will be written. + +
+
[iofmt]
+
The I/O format. Please see Section 54.30 for the list + of options. If not present, defaults to ESMF_IOFMT_NETCDF. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ + +

+28 Array Class +

+ +

+28.1 Description +

+ +

+The Array class is an alternative to the Field class for representing +distributed, structured data. Unlike Fields, which are built to carry +grid coordinate information, Arrays only carry information about the +indices associated with grid cells. Since they do not have coordinate +information, Arrays cannot be used to calculate interpolation weights. +However, if the user supplies interpolation weights, the Array sparse +matrix multiply (SMM) operation can be used to apply the weights and transfer +data to the new grid. Arrays carry enough information to perform +redistribution, scatter, and gather communication operations. + +

+Like Fields, Arrays can be added to a State and used in inter-Component +data communications. Arrays can also be grouped together into ArrayBundles, +allowing operations to be performed collectively on the whole group. One +motivation for this is convenience; another is the ability to schedule +optimized, collective data transfers. + +

+From a technical standpoint, the ESMF Array class is an index space based, +distributed data storage class. Its purpose is to hold distributed user data. +Each decompositon element (DE) is associated with its own memory allocation. The +index space relationship between DEs is described by the ESMF DistGrid class. +DEs, and their associated memory allocation, are pinned either to a specific +perisistent execution thread (PET), virtual address space (VAS), or a single +system image (SSI). This aspect is managed by the ESMF DELayout class. Pinning +to PET is the most common mode and is the default. + +

+The Array class offers common communication patterns within the index space +formalism. All RouteHandle based communication methods of the Field, +FieldBundle, and ArrayBundle layers are implemented via the Array SMM operation. + +

+28.2 Use and Examples +

+ +

+An ESMF_Array is a distributed object that must exist on all PETs of the current context. Each PET-local instance of an Array object contains memory allocations for all PET-local DEs. There may be 0, 1, or more DEs per PET and the number of DEs per PET can differ between PETs for the same Array object. Memory allocations may be provided for each PET by the user during Array creation or can be allocated as part of the Array create call. Many of the concepts of the ESMF_Array class are illustrated by the following examples. + +

+ +

+ +

+ +

+ +
+28.2.1 Array from native Fortran array with 1 DE per PET +

+ +

+The create call of the ESMF_Array class has been overloaded + extensively to facilitate the need for generality while keeping simple + cases simple. The following program demonstrates one of the simpler + cases, where existing local Fortran arrays are to be used to provide + the PET-local memory allocations for the Array object. + +

+

+program ESMF_ArrayFarrayEx
+
+ +

+

+  use ESMF
+  use ESMF_TestMod
+  
+  implicit none
+
+ +

+The Fortran language provides a variety of ways to define and allocate + an array. Actual Fortran array objects must either be explicit-shape or + deferred-shape. In the first case the memory allocation and deallocation is + automatic from the user's perspective and the details of the allocation + (static or dynamic, heap or stack) are left to the compiler. (Compiler flags + may be used to control some of the details). In the second case, i.e. for + deferred-shape actual objects, the array definition must include the pointer + or allocatable attribute and it is the user's responsibility to allocate + memory. While it is also the user's responsibility to deallocate memory for + arrays with the pointer attribute the compiler will automatically deallocate + allocatable arrays under certain circumstances defined by the Fortran + standard. + +

+The ESMF_ArrayCreate() interface has been written to accept native + Fortran arrays of any flavor as a means to allow user-controlled memory + management. The Array create call will check on each PET if sufficient + memory has been provided by the specified Fortran arrays and will indicate + an error if a problem is detected. However, the Array create call cannot + validate the lifetime of the provided memory allocations. If, for instance, + an Array object was created in a subroutine from an automatic explicit-shape + array or an allocatable array, the memory allocations referenced by the Array + object will be automatically deallocated on return from the subroutine unless + provisions are made by the application writer to prevent such behavior. The + Array object cannot control when memory that has been provided by the user + during Array creation becomes deallocated, however, the Array will indicate + an error if its memory references have been invalidated. + +

+The easiest, portable way to provide safe native Fortran memory allocations + to Array create is to use arrays with the pointer attribute. Memory allocated + for an array pointer will not be deallocated automatically. However, in this + case the possibility of memory leaks becomes an issue of concern. The + deallocation of memory provided to an Array in form of a native Fortran + allocation will remain the users responsibility. + +

+None of the concerns discussed above are an issue in this example where the + native Fortran array farray is defined in the main program. All + different types of array memory allocation are demonstrated in this example. + First farrayE is defined as a 2D explicit-shape array on each PET which + will automatically provide memory for $10\times 10$ elements. +

+

+  ! local variables
+  real(ESMF_KIND_R8)       :: farrayE(10,10)  ! explicit shape Fortran array
+
+ +

+Then an allocatable array farrayA is declared which will be used + to show user-controlled dynamic memory allocation. +

+

+  real(ESMF_KIND_R8), allocatable :: farrayA(:,:) ! allocatable Fortran array
+
+ +

+Finally an array with pointer attribute farrayP is declared, also used + for user-controlled dynamic memory allocation. +

+

+  real(ESMF_KIND_R8), pointer :: farrayP(:,:)   ! Fortran array pointer
+
+ +

+A matching array pointer must also be available to gain access to the arrays + held by an Array object. +

+

+  real(ESMF_KIND_R8), pointer :: farrayPtr(:,:) ! matching Fortran array ptr 
+  type(ESMF_DistGrid)         :: distgrid       ! DistGrid object
+  type(ESMF_Array)            :: array          ! Array object
+  integer                     :: rc
+
+ +

+

+  call ESMF_Initialize(defaultlogfilename="ArrayFarrayEx.Log", &
+                    logkindflag=ESMF_LOGKIND_MULTI, rc=rc)
+  if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+ +

+On each PET farrayE can be accessed directly to initialize the entire + PET-local array. +

+

+  farrayE = 12.45d0 ! initialize to some value
+
+ +

+In order to create an Array object a DistGrid must first be created that + describes the total index space and how it is decomposed and distributed. + In the simplest case only the minIndex and maxIndex of the + total space must be provided. +

+

+  distgrid = ESMF_DistGridCreate(minIndex=(/1,1/), maxIndex=(/40,10/), rc=rc)
+
+ +

+This example is assumed to run on 4 PETs. The default 2D decomposition will + then be into 4 x 1 DEs as to ensure 1 DE per PET. + +

+Now the Array object can be created using the farrayE and the DistGrid + just created. +

+

+  array = ESMF_ArrayCreate(farray=farrayE, distgrid=distgrid, &
+    indexflag=ESMF_INDEX_DELOCAL, rc=rc)
+
+ +

+The 40 x 10 index space defined by the minIndex and maxIndex + arguments paired with the default decomposition will result in the following + distributed Array. + +

+

+  
+         +---------------------------> 2nd dimension
+         |   (1,1)-------+
+         |     |         |
+         |     |   DE 0  |   <--- farray on PET 0
+         |     |         |
+         |     +------(10,10)
+         |  (11,1)-------+
+         |     |         |
+         |     |   DE 1  |   <--- farray on PET 1
+         |     |         |
+         |     +------(20,10)
+         |  (21,1)-------+
+         |     |         |
+         |     |   DE 2  |   <--- farray on PET 2
+         |     |         |
+         |     +------(30,10)
+         |  (31,1)-------+
+         |     |         |
+         |     |   DE 3  |   <--- farray on PET 3
+         |     |         |
+         |     +------(40,10)
+         v
+       1st dimension
+
+ +

+Providing farrayE during Array creation does not change anything about + the actual farrayE object. This means that each PET can use its + local farrayE directly to access the memory referenced by the Array + object. +

+

+  print *, farrayE
+
+ +

+Another way of accessing the memory associated with an Array object is to + use ArrayGet() to obtain an Fortran pointer that references the + PET-local array. +

+

+  call ESMF_ArrayGet(array, farrayPtr=farrayPtr, rc=rc)
+
+ +

+

+  print *, farrayPtr
+
+ +

+Finally the Array object must be destroyed. The PET-local memory of the + farrayEs will remain in user control and will not be altered by + ArrayDestroy(). +

+

+  call ESMF_ArrayDestroy(array, rc=rc)
+
+ +

+Since the memory allocation for each farrayE is automatic there is + nothing more to do. + +

+The interaction between farrayE and the Array class is representative + also for the two other cases farrayA and farrayP. The only + difference is in the handling of memory allocations. +

+

+  allocate(farrayA(10,10))    ! user controlled allocation
+  farrayA = 23.67d0           ! initialize to some value
+  array = ESMF_ArrayCreate(farray=farrayA, distgrid=distgrid, &
+    indexflag=ESMF_INDEX_DELOCAL, rc=rc)
+
+ +

+

+  print *, farrayA            ! print PET-local farrayA directly
+  call ESMF_ArrayGet(array, farrayPtr=farrayPtr, rc=rc)! obtain array pointer
+  print *, farrayPtr          ! print PET-local piece of Array through pointer
+  call ESMF_ArrayDestroy(array, rc=rc) ! destroy the Array
+  deallocate(farrayA)         ! user controlled de-allocation
+
+ +

+The farrayP case is identical. +

+

+  allocate(farrayP(10,10))    ! user controlled allocation
+  farrayP = 56.81d0           ! initialize to some value
+  array = ESMF_ArrayCreate(farray=farrayP, distgrid=distgrid, &
+    indexflag=ESMF_INDEX_DELOCAL, rc=rc)
+
+ +

+

+  print *, farrayP            ! print PET-local farrayA directly
+  call ESMF_ArrayGet(array, farrayPtr=farrayPtr, rc=rc)! obtain array pointer
+  print *, farrayPtr          ! print PET-local piece of Array through pointer
+  call ESMF_ArrayDestroy(array, rc=rc) ! destroy the Array
+  deallocate(farrayP)         ! user controlled de-allocation
+
+ +

+To wrap things up the DistGrid object is destroyed and ESMF can be finalized. +

+

+  call ESMF_DistGridDestroy(distgrid, rc=rc) ! destroy the DistGrid
+
+ +

+

+  call ESMF_Finalize(rc=rc)
+
+ +

+

+end program
+
+ +

+ + +

+ +

+ +

+ +

+ +
+28.2.2 Array from native Fortran array with extra elements for halo or padding +

+ +

+The example of the previous section showed how easy it is to create an Array + object from existing PET-local Fortran arrays. The example did, however, not + define any halo elements around the DE-local regions. The following code + demonstrates how an Array object with space for a halo can be set up. +

+

+program ESMF_ArrayFarrayHaloEx
+
+ +

+

+  use ESMF
+  use ESMF_TestMod
+  
+  implicit none
+
+ +

+The allocatable array farrayA will be used to provide the PET-local + Fortran array for this example. +

+

+  ! local variables
+  real(ESMF_KIND_R8), allocatable :: farrayA(:,:) ! allocatable Fortran array
+  real(ESMF_KIND_R8), pointer :: farrayPtr(:,:)   ! matching Fortran array ptr
+  type(ESMF_DistGrid)         :: distgrid         ! DistGrid object
+  type(ESMF_Array)            :: array            ! Array object
+  integer                     :: rc, i, j
+  real(ESMF_KIND_R8)          :: localSum
+
+ +

+

+  call ESMF_Initialize(defaultlogfilename="ArrayFarrayHaloEx.Log", &
+                    logkindflag=ESMF_LOGKIND_MULTI, rc=rc)
+  if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+ +

+The Array is to cover the exact same index space as in the previous + example. Furthermore decomposition and distribution are also kept the same. + Hence the same DistGrid object will be created and it is expected to + execute this example with 4 PETs. + +

+

+  distgrid = ESMF_DistGridCreate(minIndex=(/1,1/), maxIndex=(/40,10/), rc=rc)
+
+ +

+This DistGrid describes a 40 x 10 index space that will be decomposed into + 4 DEs when executed on 4 PETs, associating 1 DE per PET. Each DE-local + exclusive region contains 10 x 10 elements. The DistGrid also stores and provides + information about the relationship between DEs in index space, however, + DistGrid does not contain information about halos. Arrays contain halo + information and it is possible to create multiple Arrays covering the same + index space with identical decomposition and distribution using the same + DistGrid object, while defining different, Array-specific halo regions. + +

+The extra memory required to cover the halo in the Array object must be + taken into account when allocating the PET-local farrayA arrays. For + a halo of 2 elements in each direction the following allocation will suffice. +

+

+  allocate(farrayA(14,14))    ! Fortran array with halo: 14 = 10 + 2 * 2
+
+ +

+The farrayA can now be used to create an Array object with enough space + for a two element halo in each direction. The Array creation method checks for + each PET that the local Fortran array can accommodate the requested regions. + +

+The default behavior of ArrayCreate() is to center the exclusive region within + the total region. Consequently the following call will provide the 2 extra + elements on each side of the exclusive 10 x 10 region without having to specify + any additional arguments. +

+

+  array = ESMF_ArrayCreate(farray=farrayA, distgrid=distgrid, &
+    indexflag=ESMF_INDEX_DELOCAL, rc=rc)
+
+ +

+The exclusive Array region on each PET can be accessed through a suitable + Fortran array pointer. See section 28.2.6 + for more details on Array regions. +

+

+  call ESMF_ArrayGet(array, farrayPtr=farrayPtr, rc=rc)
+
+ +

+Following Array bounds convention, which by default puts the beginning of + the exclusive region at (1, 1, ...), the following loop will add up the + values of the local exclusive region for each DE, regardless of how the bounds + were chosen for the original PET-local farrayA arrays. +

+

+  localSum = 0.
+  do j=1, 10
+    do i=1, 10
+      localSum = localSum + farrayPtr(i, j)
+    enddo
+  enddo
+
+ +

+Elements with $i$ or $j$ in the [-1,0] or [11,12] ranges are located outside the + exclusive region and may be used to define extra computational points or + halo operations. + +

+Cleanup and shut down ESMF. +

+

+  call ESMF_ArrayDestroy(array, rc=rc)
+
+ +

+

+  deallocate(farrayA)
+  call ESMF_DistGridDestroy(distgrid, rc=rc)
+
+ +

+

+  call ESMF_Finalize(rc=rc)
+
+ +

+

+end program
+
+ +

+ + +

+ +

+ +

+ +

+ +
+28.2.3 Array from ESMF_LocalArray +

+ +

+Alternative to the direct usage of Fortran arrays during Array creation + it is also possible to first create an ESMF_LocalArray and create the + Array from it. While this may seem more burdensome for the 1 DE per PET cases + discussed in the previous sections it allows a straightforward + generalization to the multiple DE per PET case. The following example first + recaptures the previous example using an ESMF_LocalArray and then + expands to the multiple DE per PET case. + +

+

+program ESMF_ArrayLarrayEx
+
+ +

+

+  use ESMF
+  use ESMF_TestMod
+  
+  implicit none
+
+ +

+The current ESMF_LocalArray interface requires Fortran arrays to be + defined with pointer attribute. +

+

+  ! local variables
+  real(ESMF_KIND_R8), pointer :: farrayP(:,:)   ! Fortran array pointer
+  real(ESMF_KIND_R8), pointer :: farrayPtr(:,:) ! matching Fortran array ptr 
+  type(ESMF_LocalArray)       :: larray         ! ESMF_LocalArray object
+  type(ESMF_LocalArray)       :: larrayRef      ! ESMF_LocalArray object
+  type(ESMF_DistGrid)         :: distgrid       ! DistGrid object
+  type(ESMF_Array)            :: array          ! Array object
+  integer                     :: rc, i, j, de
+  real(ESMF_KIND_R8)          :: localSum
+  type(ESMF_LocalArray), allocatable :: larrayList(:) ! LocalArray object list
+  type(ESMF_LocalArray), allocatable :: larrayRefList(:)!LocalArray obj. list
+  
+  type(ESMF_VM):: vm
+  integer:: localPet, petCount
+
+ +

+

+  call ESMF_Initialize(vm=vm, defaultlogfilename="ArrayLarrayEx.Log", &
+                    logkindflag=ESMF_LOGKIND_MULTI, rc=rc)
+  if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+  call ESMF_VMGet(vm, localPet=localPet, petCount=petCount, rc=rc)
+  if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+  
+  if (petCount /= 4) then
+    finalrc = ESMF_FAILURE
+    goto 10
+  endif
+
+ +

+DistGrid and array allocation remains unchanged. + +

+

+  distgrid = ESMF_DistGridCreate(minIndex=(/1,1/), maxIndex=(/40,10/), rc=rc)
+
+ +

+

+  allocate(farrayP(14,14))    ! allocate Fortran array on each PET with halo
+
+ +

+Now instead of directly creating an Array object using the PET-local + farrayPs an ESMF_LocalArray object will be created on each PET. +

+

+  larray = ESMF_LocalArrayCreate(farrayP, &
+               datacopyflag=ESMF_DATACOPY_REFERENCE, rc=rc)
+
+ +

+The Array object can now be created from larray. The Array + creation method checks for each PET that the LocalArray can + accommodate the requested regions. +

+

+  array = ESMF_ArrayCreate(localarrayList=(/larray/), distgrid=distgrid, rc=rc)
+
+ +

+Once created there is no difference in how the Array object can be used. + The exclusive Array region on each PET can be accessed through a suitable + Fortran array pointer as before. +

+

+  call ESMF_ArrayGet(array, farrayPtr=farrayPtr, rc=rc)
+
+ +

+Alternatively it is also possible (independent of how the Array object was + created) to obtain the reference to the array allocation held by Array in + form of an ESMF_LocalArray object. The farrayPtr can then be + extracted using LocalArray methods. +

+

+  call ESMF_ArrayGet(array, localarray=larrayRef, rc=rc)
+
+ +

+

+  call ESMF_LocalArrayGet(larrayRef, farrayPtr, rc=rc)
+
+ +

+Either way the farrayPtr reference can be used now to add up the values + of the local exclusive region for each DE. The following loop + works regardless of how the bounds were chosen for the original PET-local + farrayP arrays and consequently the PET-local larray objects. +

+

+  localSum = 0.
+  do j=1, 10
+    do i=1, 10
+      localSum = localSum + farrayPtr(i, j)
+    enddo
+  enddo
+  print *, "localSum=", localSum
+
+ +

+Cleanup. +

+

+  call ESMF_ArrayDestroy(array, rc=rc)
+  call ESMF_LocalArrayDestroy(larray, rc=rc)
+  deallocate(farrayP)   ! use the pointer that was used in allocate statement
+  call ESMF_DistGridDestroy(distgrid, rc=rc)
+
+ +

+While the usage of LocalArrays is unnecessarily cumbersome for 1 DE per PET + Arrays, it provides a straightforward path for extending the interfaces + to multiple DEs per PET. + +

+In the following example a 8 x 8 index space will be decomposed into + 2 x 4 = 8 DEs. The situation is captured by the following DistGrid object. +

+

+  distgrid = ESMF_DistGridCreate(minIndex=(/1,1/), maxIndex=(/8,8/), &
+    regDecomp=(/2,4/), rc=rc)
+
+ +

+The distgrid object created in this manner will contain 8 DEs no + matter how many PETs are available during execution. Assuming an execution + on 4 PETs will result in the following distribution of the decomposition. + +

+

+   
+    +---------------------------------------> 2nd dimension
+    |  (1,1)
+    |    +-----------+-----------+-----------+-----------+
+    |    | DE0, PET0 | DE2, PET1 | DE4, PET2 | DE6, PET3 |
+    |    |  *    *   |  *    *   |  *    *   |  *    *   |
+    |    |           |           |           |           |
+    |    |  *    *   |  *    *   |  *    *   |  *    *   |
+    |    |           |           |           |           |
+    |    |  *    *   |  *    *   |  *    *   |  *    *   |
+    |    |           |           |           |           |
+    |    |  *    *   |  *    *   |  *    *   |  *    *   |
+    |    +-----------+-----------+-----------+-----------+
+    |    | DE1, PET0 | DE3, PET1 | DE5, PET2 | DE7, PET3 |
+    |    |  *    *   |  *    *   |  *    *   |  *    *   |
+    |    |           |           |           |           |
+    |    |  *    *   |  *    *   |  *    *   |  *    *   |
+    |    |           |           |           |           |
+    |    |  *    *   |  *    *   |  *    *   |  *    *   |
+    |    |           |           |           |           |
+    |    |  *    *   |  *    *   |  *    *   |  *    *   |
+    |    +-----------+-----------+-----------+-----------+
+    |                                                    (8,8)
+    v 
+   1st dimension
+
+ +

+Obviously each PET is associated with 2 DEs. Each PET must allocate enough + space for all its DEs. This is done by allocating + as many DE-local arrays as there are DEs on the PET. The reference to these + array allocations is passed into ArrayCreate via a LocalArray list argument + that holds as many elements as there are DEs on the PET. Here each PET must + allocate for two DEs. + +

+

+  allocate(larrayList(2))   ! 2 DEs per PET
+  allocate(farrayP(4, 2))   ! without halo each DE is of size 4 x 2 
+  farrayP = 123.456d0
+  larrayList(1) = ESMF_LocalArrayCreate(farrayP, &
+    datacopyflag=ESMF_DATACOPY_REFERENCE, rc=rc) !1st DE
+  allocate(farrayP(4, 2))   ! without halo each DE is of size 4 x 2 
+  farrayP = 456.789d0
+  larrayList(2) = ESMF_LocalArrayCreate(farrayP, &
+    datacopyflag=ESMF_DATACOPY_REFERENCE, rc=rc) !2nd DE
+
+ +

+Notice that it is perfectly fine to re-use farrayP for all + allocations of DE-local Fortran arrays. The allocated memory can be + deallocated at the end using the array pointer contained in the + larrayList. + +

+With this information an Array object can be created. The distgrid + object indicates 2 DEs for each PET and ArrayCreate() expects to find two + LocalArray elements in larrayList. +

+

+  array = ESMF_ArrayCreate(localarrayList=larrayList, distgrid=distgrid, rc=rc)
+
+ +

+Usage of a LocalArray list is the only way to provide a list of variable + length of Fortran array allocations to ArrayCreate() for each PET. The + array object created by the above call is an ESMF distributed + object. As such it must follow the ESMF convention that requires that + the call to ESMF_ArrayCreate() must be issued in unison by all + PETs of the current context. Each PET only calls ArrayCreate() once, even if + there are multiple DEs per PET. + +

+The ArrayGet() method provides access to the list of LocalArrays on each PET. +

+

+  allocate(larrayRefList(2))
+  call ESMF_ArrayGet(array, localarrayList=larrayRefList, rc=rc)
+
+ +

+Finally, access to the actual Fortran pointers is done on a per DE basis. + Generally each PET will loop over its DEs. +

+

+  do de=1, 2
+    call ESMF_LocalArrayGet(larrayRefList(de), farrayPtr, rc=rc)
+    localSum = 0.
+    do j=1, 2
+      do i=1, 4
+        localSum = localSum + farrayPtr(i, j)
+      enddo
+    enddo
+    print *, "localSum=", localSum
+  enddo
+
+ +

+Note: If the VM associates multiple PEs with a PET the application writer + may decide to use OpenMP loop parallelization on the de loop. + +

+Cleanup requires that the PET-local deallocations are done before the + pointers to the actual Fortran arrays are lost. Notice that larrayList + is used to obtain the pointers used in the deallocate statement. Pointers + obtained from the larrayRefList, while pointing to the same data, + cannot be used to deallocate the array allocations! +

+

+  do de=1, 2
+    call ESMF_LocalArrayGet(larrayList(de), farrayPtr, rc=rc)
+
+ +

+

+    deallocate(farrayPtr)
+    call ESMF_LocalArrayDestroy(larrayList(de), rc=rc)
+
+ +

+

+  enddo
+  deallocate(larrayList)
+  deallocate(larrayRefList)
+  call ESMF_ArrayDestroy(array, rc=rc)
+  if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+  call ESMF_DistGridDestroy(distgrid, rc=rc)
+  if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+ +

+With that ESMF can be shut down cleanly. +

+

+  call ESMF_Finalize(rc=rc)
+
+ +

+

+end program
+
+ +

+ + +

+ +

+ +

+ +

+28.2.4 Create Array with automatic memory allocation +

+ +

+In the examples of the previous sections the user provided memory allocations + for each of the DE-local regions for an Array object. The user was able to + use any of the Fortran methods to allocate memory, or go through + the ESMF_LocalArray interfaces to obtain memory allocations before + passing them into ArrayCreate(). Alternatively ESMF offers methods that + handle Array memory allocations inside the library. + +

+As before, to create an ESMF_Array object an ESMF_DistGrid + must be created. The DistGrid object holds information about the entire + index space and how it is decomposed into DE-local exclusive regions. The + following line of code creates a DistGrid for a 5x5 global index space that + is decomposed into 2 x 3 = 6 DEs. +

+

+  distgrid = ESMF_DistGridCreate(minIndex=(/1,1/), maxIndex=(/5,5/), &
+    regDecomp=(/2,3/), rc=rc)
+
+ +

+The following is a representation of the index space and its decomposition into + DEs. Each asterisk (*) represents a single element. + +

+

+   
+    +---------------------------------------> 2nd dimension
+    |  (1,1)
+    |    +-----------+-----------+------+
+    |    | DE 0      | DE 2      | DE 4 |
+    |    |           |           |      |
+    |    |  *    *   |  *    *   |  *   |
+    |    |           |           |      |
+    |    |  *    *   |  *    *   |  *   |
+    |    |           |           |      |
+    |    |  *    *   |  *    *   |  *   |
+    |    +-----------+-----------+------+
+    |    |           |           |      |
+    |    | DE 1      | DE 3      | DE 5 |
+    |    |           |           |      |
+    |    |  *    *   |  *    *   |  *   |
+    |    |           |           |      |
+    |    |  *    *   |  *    *   |  *   |
+    |    +-----------+-----------+------+
+    |                                 (5,5)
+    v 
+   1st dimension
+
+ +

+Besides the DistGrid it is the type, kind and rank information, + "tkr" for short, that is required to create an Array object. It turns out that + the rank of the Array object is fully determined by the DistGrid and other + (optional) arguments passed into ArrayCreate(), so that explicit + specification of the Array rank is redundant. + +

+The simplest way to supply the type and kind information of the Array is + directly through the typekind argument. Here a double precision Array + is created on the previously created DistGrid. Since no other arguments are + specified that could alter the rank of the Array it becomes equal to the + dimCount of the DistGrid, i.e a 2D Array is created on top of the DistGrid. +

+

+  array = ESMF_ArrayCreate(typekind=ESMF_TYPEKIND_R8, distgrid=distgrid, rc=rc)
+
+ +

+The different methods on how an Array object is created have no effect on + the use of ESMF_ArrayDestroy(). +

+

+  call ESMF_ArrayDestroy(array, rc=rc)
+
+ +

+Alternatively the same Array can be created specifying the "tkr" information + in form of an ArraySpec variable. The ArraySpec explicitly contains the + Array rank and thus results in an over specification on the ArrayCreate() + interface. ESMF checks all input information for consistency and returns + appropriate error codes in case any inconsistencies are found. +

+

+  call ESMF_ArraySpecSet(arrayspec, typekind=ESMF_TYPEKIND_R8, rank=2, rc=rc)
+
+ +

+

+  array = ESMF_ArrayCreate(arrayspec=arrayspec, distgrid=distgrid, rc=rc)
+
+ +

+The Array object created by the above call is an ESMF distributed + object. As such it must follow the ESMF convention that requires that + the call to ESMF_ArrayCreate() must be issued in unison by all + PETs of the current context. + +

+ +

+ +
+28.2.5 Native language memory access +

+ +

+There are two different methods by which the user can access the data held + inside an ESMF Array object. The first method provides direct access to a + native language array object. Specifically, the farrayPtr argument + returned by ESMF_ArrayGet() is a Fortran array pointer that can be + used to access the PET-local data inside the Array object. + +

+Many applications work in the 1 DE per PET mode, with exactly one DE on + every PET. Accessing the Array memory on each PET for this situation is + especially simple as is shown in section 28.2.1. + However, the Array class is not restricted to the special 1 DE per PET case, + but supports multiple separate memory allocations on each PET. + The number of such PET-local allocations is given by the localDeCount, + i.e. there is one memory allocation for every DE that is associated with the + local PET. + +

+Access to a specific local memory allocation of an Array object is still + accomplished by returning the farrayPtr argument. However, for + +$localDeCount > 1 $ the formally optional localDe argument to + ESMF_ArrayGet() turns into a practically required argument. While + in general the localDe in ESMF is simply a local index variable that + enumerates the DEs that are associated with the local PET (e.g. see section + 50.3.7), the bounds of this index variable are + strictly defined as [0,...,localDeCount-1] when it is used as an + input argument. The following code demonstrates this. + +

+First query the Array for localDeCount. This number may be different + on each PET and indicates how many DEs are mapped against the local PET. +

+

+  call ESMF_ArrayGet(array, localDeCount=localDeCount, rc=rc)
+
+ +

+Looping the localDe index variable from 0 to localDeCount-1 allows + access to each of the local memory allocations of the Array object: +

+

+  do localDe=0, localDeCount-1
+    call ESMF_ArrayGet(array, farrayPtr=myFarray, localDe=localDe, rc=rc)
+
+ +

+

+    ! use myFarray to access local DE data
+  enddo
+
+ +

+The second method to access the memory allocations in an Array object is to + go through the ESMF LocalArray object. To this end the Array is queried + for a list of PET-local LocalArray objects. The LocalArray objects in the list + correspond to the DEs on the local PET. Here the localDe argument is + solely a user level index variable, and in principle the lower bound can be + chosen freely. However, for better alignment with the previous case (where + localDe served as an input argument to an ESMF method) the following + example again fixes the lower bound at zero. +

+

+  allocate(larrayList(0:localDeCount-1))
+  call ESMF_ArrayGet(array, localarrayList=larrayList, rc=rc)
+
+ +

+

+  do localDe=0, localDeCount-1
+    call ESMF_LocalArrayGet(larrayList(localDe), myFarray, &
+       datacopyflag=ESMF_DATACOPY_REFERENCE, rc=rc)
+
+ +

+

+    ! use myFarray to access local DE data
+  enddo
+
+ +

+See section 28.2.3 for more on LocalArray usage in Array. + In most cases memory access through a LocalArray list is less convenient than + the direct farrayPtr method because it adds an extra object level + between the ESMF Array and the native language array. + +

+ +

+ +
+28.2.6 Regions and default bounds +

+ +

+Each ESMF_Array object is decomposed into DEs as specified by the + associated ESMF_DistGrid object. Each piece of this decomposition, i.e. + each DE, holds a chunk of the Array data in its own local piece of memory. + The details of the Array decomposition are described in the following + paragraphs. + +

+At the center of the Array decomposition is the ESMF_DistGrid class. + The DistGrid object specified during Array creation contains three essential + pieces of information: + +

    +
  • The extent and topology of the global domain covered by the Array object + in terms of indexed elements. The total extent may be a composition of + smaller logically rectangular (LR) domain pieces called tiles. +
  • +
  • The decomposition of the entire domain into "element exclusive" DE-local + LR chunks. Element exclusive means that there is no element overlap + between DE-local chunks. This, however, does not exclude degeneracies + on edge boundaries for certain topologies (e.g. bipolar). +
  • +
  • The layout of DEs over the available PETs and thus the distribution of + the Array data. + +
  • +
+ +

+Each element of an Array is associated with a single DE. The union of + elements associated with a DE, as defined by the DistGrid above, corresponds + to a LR chunk of index space, called the exclusive region of the DE. + +

+There is a hierarchy of four regions that can be identified for each DE in an + Array object. Their definition and relationship to each other is as follows: + +

    +
  • Interior Region: Region that only contains local elements that are + not mapped into the halo of any other DE. The shape and size of + this region for a particular DE depends non-locally on the halos defined + by other DEs and may change during computation as halo operations are + precomputed and released. Knowledge of the interior elements may be used + to improve performance by overlapping communications with ongoing + computation for a DE. +
  • +
  • Exclusive Region: Elements for which a DE claims exclusive + ownership. Practically this means that the DE will be the sole source + for these elements in halo and reduce operations. There are exceptions + to this in some topologies. The exclusive region includes all elements + of the interior region. +
  • +
  • Computational Region: Region that can be set arbitrarily within + the bounds of the total region (defined next). The typical use of the + computation region is to define bounds that only include elements that + are updated by a DE-local computation kernel. The computational region + does not need to include all exclusive elements and it may also contain + elements that lie outside the exclusive region. +
  • +
  • Total (Memory) Region: Total of all DE-locally allocated elements. + The size and shape of the total memory region must accommodate the + union of exclusive and computational region but may contain + additional elements. Elements outside the exclusive region may overlap + with the exclusive region of another DE which makes them potential + receivers for Array halo operations. Elements outside the exclusive + region that do not overlap with the exclusive region of another DE + can be used to set boundary conditions and/or serve as extra memory + padding. + +
  • +
+ +

+

+  
+     +-totalLBound(:)----------------------------------+
+     |\                                                |
+     | \ <--- totalLWidth(:)                           |
+     |  \                                              |
+     |   +-computationalLBound(:)------------------+   |
+     |   |\                                        |   |
+     |   | \ <--- computationalLWidth(:)           |   |
+     |   |  \                                      |   |
+     |   |   +-exclusiveLBound(:)-------------+    |   |
+     |   |   |                                |    |   |
+     |   |   |     +------+      +-----+      |    |   |
+     |   |   |     |      |      |     |      |    |   |
+     |   |   |     |      +------+     |      |    |   |
+     |   |   |     | "Interior Region" |      |    |   |
+     |   |   |     +-----+             |      |    |   |
+     |   |   |           |             |      |    |   |
+     |   |   |           +-------------+      |    |   |
+     |   |   |                                |    |   |
+     |   |   | "Exclusive Region"             |    |   |
+     |   |   +-------------exclusiveUBound(:)-+    |   |
+     |   |                                     \   |   |
+     |   |           computationalUWidth(:) --> \  |   |
+     |   |                                       \ |   |
+     |   | "Computational Region"                 \|   |
+     |   +------------------computationalUBound(:)-+   |
+     |                                              \  | 
+     |                             totalUWidth(:) -> \ | 
+     | "Total Region"                                 \| 
+     +--------------------------------- totalUBound(:)-+
+
+ +

+With the following definitions: +

+  
+   computationalLWidth(:) = exclusiveLBound(:) - computationalLBound(:)
+   computationalUWidth(:) = computationalUBound(:) - exclusiveUBound(:)
+
+ and +
+  
+   totalLWidth(:) = exclusiveLBound(:) - totalLBound(:)
+   totalUWidth(:) = totalUBound(:) - exclusiveUBound(:)
+
+ +

+The exclusive region is determined during Array creation by the + DistGrid argument. Optional arguments may be used to specify the + computational region when the Array is created, by default it will be + set equal to the exclusive region. The total region, i.e. the actual + memory allocation for each DE, is also determined during Array creation. When + creating the Array object from existing Fortran arrays the total region is + set equal to the memory provided by the Fortran arrays. Otherwise the + default is to allocate as much memory as is needed to accommodate the union + of the DE-local exclusive and computational region. Finally it is also + possible to use optional arguments to the ArrayCreate() call to specify the + total region of the object explicitly. + +

+The ESMF_ArrayCreate() call checks that the input parameters are + consistent and will result in an Array that fulfills all of the above + mentioned requirements for its DE-local regions. + +

+Once an Array object has been created the exclusive and total regions are + fixed. The computational region, however, may be adjusted within the limits + of the total region using the ArraySet() call. + +

+The interior region is very different from the other regions in that + it cannot be specified. The interior region for each DE is a consequence of the choices made for the other regions collectively across + all DEs into which an Array object is decomposed. An Array object can be + queried for its DE-local interior regions as to offer additional + information to the user necessary to write more efficient code. + +

+By default the bounds of each DE-local total region are defined as + to put the start of the DE-local exclusive region at the "origin" of + the local index space, i.e. at (1, 1, ..., 1). With that definition the + following loop will access each element of the DE-local memory segment for + each PET-local DE of the Array object used in the previous sections and + print its content. +

+

+  do localDe=0, localDeCount-1
+    call ESMF_LocalArrayGet(larrayList(localDe), myFarray, &
+       datacopyflag=ESMF_DATACOPY_REFERENCE, rc=rc)
+    do i=1, size(myFarray, 1)
+      do j=1, size(myFarray, 2)
+        print *, "localPET=", localPet, " localDE=", &
+            localDe, ": array(",i,",",j,")=", myFarray(i,j)
+      enddo
+    enddo
+  enddo
+
+ +

+ +

+28.2.7 Array bounds +

+ +

+The loop over Array elements at the end of the last section only works + correctly because of the default definition of the computational and + total regions used in the example. In general, without such specific + knowledge about an Array object, it is necessary to use a more formal approach + to access its regions with DE-local indices. + +

+The DE-local exclusive region takes a central role in the definition + of Array bounds. Even as the computational region may adjust during + the course of execution the exclusive region remains unchanged. + The exclusive region provides a unique reference frame + for the index space of all Arrays associated with the same DistGrid. + +

+There is a choice between two indexing options that needs to be made during + Array creation. By default each DE-local exclusive region starts at + (1, 1, ..., 1). However, for some computational kernels it may be more + convenient to choose the index bounds of the DE-local exclusive regions to + match the index space coordinates as they are defined in the corresponding + DistGrid object. The second option is only available if the DistGrid object + does not contain any non-contiguous decompositions (such as cyclically + decomposed dimensions). + +

+The following example code demonstrates the safe way of dereferencing the + DE-local exclusive regions of the previously created array object. + +

+

+  allocate(exclusiveUBound(2, 0:localDeCount-1))  ! dimCount=2
+  allocate(exclusiveLBound(2, 0:localDeCount-1))  ! dimCount=2
+  call ESMF_ArrayGet(array, indexflag=indexflag, &
+    exclusiveLBound=exclusiveLBound, exclusiveUBound=exclusiveUBound, rc=rc)
+  if (indexflag == ESMF_INDEX_DELOCAL) then
+    ! this is the default
+!    print *, "DE-local exclusive regions start at (1,1)"
+    do localDe=0, localDeCount-1
+      call ESMF_LocalArrayGet(larrayList(localDe), myFarray, &
+          datacopyflag=ESMF_DATACOPY_REFERENCE, rc=rc)
+      do i=1, exclusiveUBound(1, localDe)
+        do j=1, exclusiveUBound(2, localDe)
+!          print *, "DE-local exclusive region for localDE=", localDe, &
+!            ": array(",i,",",j,")=", myFarray(i,j)
+        enddo
+      enddo
+    enddo
+  else if (indexflag == ESMF_INDEX_GLOBAL) then
+    ! only if set during ESMF_ArrayCreate()
+!    print *, "DE-local exclusive regions of this Array have global bounds"
+    do localDe=0, localDeCount-1
+      call ESMF_LocalArrayGet(larrayList(localDe), myFarray, &
+         datacopyflag=ESMF_DATACOPY_REFERENCE, rc=rc)
+      do i=exclusiveLBound(1, localDe), exclusiveUBound(1, localDe)
+        do j=exclusiveLBound(2, localDe), exclusiveUBound(2, localDe)
+!          print *, "DE-local exclusive region for localDE=", localDe, &
+!            ": array(",i,",",j,")=", myFarray(i,j)
+        enddo
+      enddo
+    enddo
+  endif
+  call ESMF_ArrayDestroy(array, rc=rc) ! destroy the array object
+
+ +

+Obviously the second branch of this simple code will work for either case, + however, if a complex computational kernel was written assuming + ESMF_INDEX_DELOCAL type bounds the second branch would simply be + used to indicate the problem and bail out. + +

+The advantage of the ESMF_INDEX_GLOBAL index option is that + the Array bounds directly contain information on where the DE-local + Array piece is located in a global index space sense. When the + ESMF_INDEX_DELOCAL option is used the correspondence between local + and global index space must be made by querying the associated DistGrid for + the DE-local indexList arguments. + +

+ +

+ +
+28.2.8 Computational region and extra elements for halo or padding +

+ +

+In the previous examples the computational region of array was chosen + by default to be identical to the exclusive region defined by the DistGrid + argument during Array creation. In the following the same arrayspec and + distgrid objects as before will be used to create an Array but now a + larger computational region shall be defined around each DE-local exclusive + region. Furthermore, extra space will be defined around the computational + region of each DE to accommodate a halo and/or serve as memory padding. + +

+In this example the indexflag argument is set to + ESMF_INDEX_GLOBAL indicating that the bounds of the exclusive region + correspond to the index space coordinates as they are defined by the DistGrid + object. + +

+The same arrayspec and distgrid objects as before are used + which also allows the reuse of the already allocated larrayList + variable. +

+

+  array = ESMF_ArrayCreate(arrayspec=arrayspec, distgrid=distgrid, &
+    computationalLWidth=(/0,3/), computationalUWidth=(/1,1/), &
+    totalLWidth=(/1,4/), totalUWidth=(/3,1/), &
+    indexflag=ESMF_INDEX_GLOBAL, rc=rc)
+
+ +

+Obtain the larrayList on every PET. +

+

+  allocate(localDeToDeMap(0:localDeCount-1))
+  call ESMF_ArrayGet(array, localarrayList=larrayList, &
+    localDeToDeMap=localDeToDeMap, rc=rc)
+
+ +

+The bounds of DE 1 for array are shown in the following + diagram to illustrate the situation. Notice that the totalLWidth and + totalUWidth arguments in the ArrayCreate() call define the total region + with respect to the exclusive region given for each DE by the distgrid + argument. + +

+

+        +-(3,-3)---------------------------------+ 
+        |\                                       | 
+        | +-(4,-2)-+-(4,1)--------------------+--+ 
+        | |        |                          |  | 
+        | |        |                          |  | 
+        | |        |          DE 1            |  | 
+        | |        |                          |  | 
+        | |        |                          |  | 
+        | |        | Exclusive Region         |  | 
+        | |        +--------------------(5,2)-+  | 
+        | | Computational Region                 | 
+        | +-------------------------------(6,3)--+ 
+        |                                        | 
+        | Total Region                           | 
+        +---------------------------------(8,3)--+
+
+ +

+When working with this array it is possible for the computational + kernel to overstep the exclusive region for both read/write access + (computational region) and potentially read-only access into the total region + outside of the computational region, if a halo operation provides valid + entries for these elements. + +

+The Array object can be queried for absolute bounds +

+

+  allocate(computationalLBound(2, 0:localDeCount-1))  ! dimCount=2
+  allocate(computationalUBound(2, 0:localDeCount-1))  ! dimCount=2
+  allocate(totalLBound(2, 0:localDeCount-1))          ! dimCount=2
+  allocate(totalUBound(2, 0:localDeCount-1))          ! dimCount=2
+  call ESMF_ArrayGet(array, exclusiveLBound=exclusiveLBound, &
+    exclusiveUBound=exclusiveUBound, &
+    computationalLBound=computationalLBound, &
+    computationalUBound=computationalUBound, &
+    totalLBound=totalLBound, &
+    totalUBound=totalUBound, rc=rc)
+
+ +

+or for the relative widths. +

+

+  allocate(computationalLWidth(2, 0:localDeCount-1))  ! dimCount=2
+  allocate(computationalUWidth(2, 0:localDeCount-1))  ! dimCount=2
+  allocate(totalLWidth(2, 0:localDeCount-1))          ! dimCount=2
+  allocate(totalUWidth(2, 0:localDeCount-1))          ! dimCount=2
+  call ESMF_ArrayGet(array, computationalLWidth=computationalLWidth, &
+    computationalUWidth=computationalUWidth, totalLWidth=totalLWidth, &
+    totalUWidth=totalUWidth, rc=rc)
+
+ +

+Either way the dereferencing of Array data is centered around the DE-local + exclusive region: +

+

+  do localDe=0, localDeCount-1
+    call ESMF_LocalArrayGet(larrayList(localDe), myFarray, &
+       datacopyflag=ESMF_DATACOPY_REFERENCE, rc=rc)
+    ! initialize the DE-local array
+    myFarray = 0.1d0 * localDeToDeMap(localDe)
+    ! first time through the total region of array    
+!    print *, "myFarray bounds for DE=", localDeToDeMap(localDe), &
+!      lbound(myFarray),  ubound(myFarray)
+    do j=exclusiveLBound(2, localDe), exclusiveUBound(2, localDe)
+      do i=exclusiveLBound(1, localDe), exclusiveUBound(1, localDe)
+!        print *, "Excl region DE=", localDeToDeMap(localDe), &
+!        ": array(",i,",",j,")=",  myFarray(i,j)
+      enddo
+    enddo
+    do j=computationalLBound(2, localDe), computationalUBound(2, localDe)
+      do i=computationalLBound(1, localDe), computationalUBound(1, localDe)
+!        print *, "Excl region DE=", localDeToDeMap(localDe), &
+!        ": array(",i,",",j,")=", myFarray(i,j)
+      enddo
+    enddo
+    do j=totalLBound(2, localDe), totalUBound(2, localDe)
+      do i=totalLBound(1, localDe), totalUBound(1, localDe)
+!        print *, "Total region DE=", localDeToDeMap(localDe), &
+!        ": array(",i,",",j,")=", myFarray(i,j)
+      enddo
+    enddo
+
+    ! second time through the total region of array    
+    do j=exclusiveLBound(2, localDe)-totalLWidth(2, localDe), &
+      exclusiveUBound(2, localDe)+totalUWidth(2, localDe)
+      do i=exclusiveLBound(1, localDe)-totalLWidth(1, localDe), &
+        exclusiveUBound(1, localDe)+totalUWidth(1, localDe)
+!        print *, "Excl region DE=", localDeToDeMap(localDe), &
+!        ": array(",i,",",j,")=", myFarray(i,j)
+      enddo
+    enddo
+  enddo
+
+ +

+ +

+28.2.9 Create 1D and 3D Arrays +

+ +

+All previous examples were written for the 2D case. There is, however, no + restriction within the Array or DistGrid class that limits the dimensionality + of Array objects beyond the language-specific limitations (7D for Fortran). + +

+In order to create an n-dimensional Array the rank indicated by both + the arrayspec and the distgrid arguments specified during Array + create must be equal to n. A 1D Array of double precision real data + hence requires the following arrayspec. +

+

+  call ESMF_ArraySpecSet(arrayspec, typekind=ESMF_TYPEKIND_R8, rank=1, rc=rc)
+
+ +

+The index space covered by the Array and the decomposition description is + provided to the Array create method by the distgrid argument. The index + space in this example has 16 elements and covers the interval $[-10, 5]$. It is + decomposed into as many DEs as there are PETs in the current context. +

+

+  distgrid1D = ESMF_DistGridCreate(minIndex=(/-10/), maxIndex=(/5/), &
+    regDecomp=(/petCount/), rc=rc)
+
+ +

+A 1D Array object with default regions can now be created. +

+

+  array1D = ESMF_ArrayCreate(arrayspec=arrayspec, distgrid=distgrid1D, rc=rc)
+
+ +

+The creation of a 3D Array proceeds analogous to the 1D case. The rank of the + arrayspec must be changed to 3 +

+  call ESMF_ArraySpecSet(arrayspec, typekind=ESMF_TYPEKIND_R8, rank=3, rc=rc)
+
+ +

+and an appropriate 3D DistGrid object must be created +

+  distgrid3D = ESMF_DistGridCreate(minIndex=(/1,1,1/), &
+    maxIndex=(/16,16,16/), regDecomp=(/4,4,4/), rc=rc)
+
+ +

+before an Array object can be created. +

+

+  array3D = ESMF_ArrayCreate(arrayspec=arrayspec, distgrid=distgrid3D, rc=rc)
+
+ +

+The distgrid3D object decomposes the 3-dimensional index space into + +$4\times 4\times 4 = 64$ DEs. These DEs are laid out across the computational + resources (PETs) of the current component according to a default DELayout that + is created during the DistGrid create call. Notice that in the index space + proposal a DELayout does not have a sense of dimensionality. The DELayout + function is simply to map DEs to PETs. The DistGrid maps chunks of index space + against DEs and thus its rank is equal to the number of index space + dimensions. + +

+The previously defined DistGrid and the derived Array object decompose + the index space along all three dimension. It is, however, not a requirement + that the decomposition be along all dimensions. An Array with the same 3D + index space could as well be decomposed along just one or along two of the + dimensions. The following example shows how for the same index space only the + last two dimensions are decomposed while the first Array dimension has full + extent on all DEs. +

+

+  call ESMF_ArrayDestroy(array3D, rc=rc)
+  call ESMF_DistGridDestroy(distgrid3D, rc=rc)
+  distgrid3D = ESMF_DistGridCreate(minIndex=(/1,1,1/), &
+    maxIndex=(/16,16,16/), regDecomp=(/1,4,4/), rc=rc)
+  array3D = ESMF_ArrayCreate(arrayspec=arrayspec, distgrid=distgrid3D, rc=rc)
+
+ +

+ +

+28.2.10 Working with Arrays of different rank +

+ Assume a computational kernel that involves the array3D object as it was + created at the end of the previous section. Assume further that the kernel + also involves a 2D Array on a 16x16 index space where each point (j,k) was + interacting with each (i,j,k) column of the 3D Array. An efficient formulation + would require that the decomposition of the 2D Array must match that of the 3D + Array and further the DELayout be identical. The following code shows how this + can be accomplished. +

+

+  call ESMF_DistGridGet(distgrid3D, delayout=delayout, rc=rc) ! get DELayout
+  distgrid2D = ESMF_DistGridCreate(minIndex=(/1,1/), maxIndex=(/16,16/), &
+    regDecomp=(/4,4/), delayout=delayout, rc=rc)
+  call ESMF_ArraySpecSet(arrayspec, typekind=ESMF_TYPEKIND_R8, rank=2, rc=rc)
+  array2D = ESMF_ArrayCreate(arrayspec=arrayspec, distgrid=distgrid2D, rc=rc)
+
+ +

+Now the following kernel is sure to work with array3D and array2D. +

+

+  call ESMF_DELayoutGet(delayout, localDeCount=localDeCount, rc=rc)
+  allocate(larrayList1(0:localDeCount-1))
+  call ESMF_ArrayGet(array3D, localarrayList=larrayList1, rc=rc)
+  allocate(larrayList2(0:localDeCount-1))
+  call ESMF_ArrayGet(array2D, localarrayList=larrayList2, rc=rc)
+  do localDe=0, localDeCount-1
+    call ESMF_LocalArrayGet(larrayList1(localDe), myFarray3D, &
+      datacopyflag=ESMF_DATACOPY_REFERENCE, rc=rc)
+    myFarray3D = 0.1d0 * localDe ! initialize
+    call ESMF_LocalArrayGet(larrayList2(localDe), myFarray2D, &
+      datacopyflag=ESMF_DATACOPY_REFERENCE, rc=rc)
+    myFarray2D = 0.5d0 * localDe ! initialize
+    do k=1, 4
+      do j=1, 4
+        dummySum = 0.d0
+        do i=1, 16
+          dummySum = dummySum + myFarray3D(i,j,k) ! sum up the (j,k) column
+        enddo
+        dummySum = dummySum * myFarray2D(j,k) ! multiply with local 2D element
+!        print *, "dummySum(",j,k,")=",dummySum
+      enddo
+    enddo
+  enddo
+
+ +

+ +

+ +
+28.2.11 Arrays with undistributed dimensions +

+ +

+Except for the special Array create interface that implements a copy from + an existing Array object all other Array create interfaces require the + specification of at least two arguments: farray and distgrid, + larrayList and distgrid, or arrayspec and distgrid. + In all these cases both required arguments contain a sense of dimensionality. + The relationship between these two arguments deserves extra attention. + +

+The first argument, farray, larrayList or arrayspec, + determines the rank of the created Array object, i.e. the dimensionality + of the actual data storage. The rank of a native language array, extracted + from an Array object, is equal to the rank specified by either of these + arguments. So is the rank that is returned by the ESMF_ArrayGet() + call. + +

+The rank specification contained in the distgrid argument, which is of + type ESMF_DistGrid, on the other hand has no effect on the + rank of the Array. The dimCount specified by the DistGrid object, + which may be equal, greater or less than the Array rank, determines the + dimensionality of the decomposition. + +

+While there is no constraint between DistGrid dimCount and Array + rank, there is an important relationship between the two, resulting in + the concept of index space dimensionality. Array dimensions can be + arbitrarily mapped against DistGrid dimension, rendering them decomposed + dimensions. The index space dimensionality is equal to the number of + decomposed Array dimensions. + +

+Array dimensions that are not mapped to DistGrid dimensions are the + undistributed dimensions of the Array. They are not part + of the index space. The mapping is specified during ESMF_ArrayCreate() + via the distgridToArrayMap argument. DistGrid dimensions that have + not been associated with Array dimensions are replicating dimensions. + The Array will be replicated across the DEs that lie along replication + DistGrid dimensions. + +

+Undistributed Array dimensions can be used to store multi-dimensional data for + each Array index space element. One application of this is to store the + components of a vector quantity in a single Array. The same 2D distgrid + object as before will be used. +

+

+  distgrid = ESMF_DistGridCreate(minIndex=(/1,1/), maxIndex=(/5,5/), &
+    regDecomp=(/2,3/), rc=rc)
+
+ +

+The rank in the arrayspec argument, however, must change from 2 to 3 in + order to provide for the extra Array dimension. +

+

+  call ESMF_ArraySpecSet(arrayspec, typekind=ESMF_TYPEKIND_R8, rank=3, rc=rc)
+
+ +

+During Array creation with extra dimension(s) it is necessary to specify the + bounds of these undistributed dimension(s). This requires two additional + arguments, undistLBound and undistUBound, which are vectors in + order to accommodate multiple undistributed dimensions. The other arguments + remain unchanged and apply across all undistributed components. + +

+

+  array = ESMF_ArrayCreate(arrayspec=arrayspec, distgrid=distgrid, &
+    totalLWidth=(/0,1/), totalUWidth=(/0,1/), &
+    undistLBound=(/1/), undistUBound=(/2/), rc=rc)
+  if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+ +

+This will create array with 2+1 dimensions. The 2D DistGrid is used + to describe decomposition into DEs with 2 Array dimensions mapped to the + DistGrid dimensions resulting in a 2D index space. The extra Array dimension + provides storage for multi component user data within the Array object. + +

+By default the distgrid dimensions are associated + with the first Array dimensions in sequence. For the example above this means + that the first 2 Array dimensions are decomposed according to the provided 2D + DistGrid. The 3rd Array dimension does not have an associated DistGrid + dimension, rendering it an undistributed Array dimension. + +

+Native language access to an Array with undistributed dimensions is in + principle the same as without extra dimensions. +

+

+  call ESMF_ArrayGet(array, localDeCount=localDeCount, rc=rc)
+  allocate(larrayList(0:localDeCount-1))
+  call ESMF_ArrayGet(array, localarrayList=larrayList, rc=rc)
+
+ +

+The following loop shows how a Fortran pointer to the DE-local data chunks + can be obtained and used to set data values in the exclusive regions. The + myFarray3D variable must be of rank 3 to match the Array rank of + array. However, variables such as exclusiveUBound that store the + information about the decomposition, remain to be allocated for the 2D + index space. +

+

+  call ESMF_ArrayGet(array, exclusiveLBound=exclusiveLBound, &
+    exclusiveUBound=exclusiveUBound, rc=rc)
+  do localDe=0, localDeCount-1
+    call ESMF_LocalArrayGet(larrayList(localDe), myFarray3D, &
+       datacopyflag=ESMF_DATACOPY_REFERENCE, rc=rc)
+    myFarray3D = 0.0 ! initialize
+    myFarray3D(exclusiveLBound(1,localDe):exclusiveUBound(1,localDe), &
+      exclusiveLBound(2,localDe):exclusiveUBound(2,localDe), &
+      1) = 5.1 ! dummy assignment
+    myFarray3D(exclusiveLBound(1,localDe):exclusiveUBound(1,localDe), &
+      exclusiveLBound(2,localDe):exclusiveUBound(2,localDe), &
+      2) = 2.5 ! dummy assignment
+  enddo
+  deallocate(larrayList)
+
+ +

+For some applications the default association rules between DistGrid and Array + dimensions may not satisfy the user's needs. The optional distgridToArrayMap + argument can be used during Array creation to explicitly specify the mapping + between DistGrid and Array dimensions. To demonstrate this the following lines + of code reproduce the above example but with rearranged dimensions. Here the + distgridToArrayMap argument is a list with two elements corresponding to + the DistGrid dimCount of 2. The first element indicates which Array + dimension the first DistGrid dimension is mapped against. Here the + 1st DistGrid dimension maps against the 3rd Array dimension and the 2nd + DistGrid dimension maps against the 1st Array dimension. This leaves the 2nd + Array dimension to be the extra and undistributed dimension in the resulting + Array object. +

+

+  call ESMF_ArrayDestroy(array, rc=rc)
+  array = ESMF_ArrayCreate(arrayspec=arrayspec, distgrid=distgrid, &
+    distgridToArrayMap=(/3, 1/), totalLWidth=(/0,1/), totalUWidth=(/0,1/), &
+    undistLBound=(/1/), undistUBound=(/2/), rc=rc)
+
+ +

+Operations on the Array object as a whole are unchanged by the different + mapping of dimensions. + +

+When working with Arrays that contain explicitly mapped Array and DistGrid + dimensions it is critical to know the order in which the entries of + width and bound arguments that are associated with distributed + Array dimensions are specified. The size of these arguments is equal to the + DistGrid dimCount, because the maximum number of distributed Array + dimensions is given by the dimensionality of the index space. + +

+The order of dimensions in these arguments, however, is not that of + the associated DistGrid. Instead each entry corresponds to the distributed + Array dimensions in sequence. In the example above the entries in + totalLWidth and totalUWidth correspond to Array dimensions 1 and + 3 in this sequence. + +

+The distgridToArrrayMap argument optionally provided during Array create + indicates how the DistGrid dimensions map to Array dimensions. The inverse + mapping, i.e. Array to DistGrid dimensions, is just as important. The + ESMF_ArrayGet() call offers both mappings as distgridToArrrayMap + and arrayToDistGridMap, respectively. The number of elements in + arrayToDistGridMap is equal to the rank of the Array. Each element + corresponds to an Array dimension and indicates the associated DistGrid + dimension by an integer number. An entry of "0" in arrayToDistGridMap + indicates that the corresponding Array dimension is undistributed. + +

+Correct understanding about the association between Array and DistGrid + dimensions becomes critical for correct data access into the Array. +

+

+  allocate(arrayToDistGridMap(3))  ! arrayRank = 3
+  call ESMF_ArrayGet(array, arrayToDistGridMap=arrayToDistGridMap, &
+    exclusiveLBound=exclusiveLBound, exclusiveUBound=exclusiveUBound, &
+    localDeCount=localDeCount, rc=rc)  
+  if (arrayToDistGridMap(2) /= 0) then   ! check if extra dimension at 
+    ! expected index indicate problem and bail out
+  endif
+  ! obtain larrayList for local DEs
+  allocate(larrayList(0:localDeCount-1))
+  call ESMF_ArrayGet(array, localarrayList=larrayList, rc=rc)
+  do localDe=0, localDeCount-1
+    call ESMF_LocalArrayGet(larrayList(localDe), myFarray3D, &
+       datacopyflag=ESMF_DATACOPY_REFERENCE, rc=rc)
+    myFarray3D(exclusiveLBound(1,localDe):exclusiveUBound(1,localDe), &
+      1, exclusiveLBound(2,localDe):exclusiveUBound(2, &
+      localDe)) = 10.5 !dummy assignment
+    myFarray3D(exclusiveLBound(1,localDe):exclusiveUBound(1,localDe), &
+      2, exclusiveLBound(2,localDe):exclusiveUBound(2, &
+      localDe)) = 23.3 !dummy assignment
+  enddo
+  deallocate(exclusiveLBound, exclusiveUBound)
+  deallocate(arrayToDistGridMap)
+  deallocate(larrayList)
+  call ESMF_ArrayDestroy(array, rc=rc)
+  if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+ +

+ +

+ +
+28.2.12 Arrays with replicated dimensions +

+ +

+Thus far most examples demonstrated cases where the DistGrid dimCount + was equal to the Array rank. The previous section introduced the + concept of Array tensor dimensions when dimCount < rank. In this + section dimCount and rank are assumed completely unconstrained and + the relationship to distgridToArrayMap and arrayToDistGridMap will + be discussed. + +

+The Array class allows completely arbitrary mapping between Array and + DistGrid dimensions. Most cases considered in the previous sections used + the default mapping which assigns the DistGrid dimensions in sequence to the + lower Array dimensions. Extra Array dimensions, if present, are considered + non-distributed tensor dimensions for which the optional undistLBound + and undistUBound arguments must be specified. + +

+The optional distgridToArrayMap argument provides the option to override + the default DistGrid to Array dimension mapping. The entries of the + distgridToArrayMap array correspond to the DistGrid dimensions in + sequence and assign a unique Array dimension to each DistGrid dimension. + DistGrid and Array dimensions are indexed starting at 1 for the lowest + dimension. A value of "0" in the distgridToArrayMap array + indicates that the respective DistGrid dimension is not mapped against + any Array dimension. What this means is that the Array will be replicated + along this DistGrid dimension. + +

+As a first example consider the case where a 1D Array +

+  call ESMF_ArraySpecSet(arrayspec, typekind=ESMF_TYPEKIND_R8, rank=1, rc=rc)
+
+ +

+is created on the 2D DistGrid used during the previous section. +

+

+  array = ESMF_ArrayCreate(arrayspec=arrayspec, distgrid=distgrid, rc=rc)
+
+ +

+Here the default DistGrid to Array dimension mapping is used which assigns + the Array dimensions in sequence to the DistGrid dimensions starting with + dimension "1". Extra DistGrid dimensions are considered replicator dimensions + because the Array will be replicated along those dimensions. In the above + example the 2nd DistGrid dimension will cause 1D Array pieces to be + replicated along the DEs of the 2nd DistGrid dimension. Replication in the + context of ESMF_ArrayCreate() does not mean that data values are + communicated and replicated between different DEs, but it means that different + DEs provide memory allocations for identical exclusive elements. + +

+Access to the data storage of an Array that has been replicated along + DistGrid dimensions is the same as for Arrays without replication. +

+

+  call ESMF_ArrayGet(array, localDeCount=localDeCount, rc=rc)
+
+ +

+

+  allocate(larrayList(0:localDeCount-1))
+  allocate(localDeToDeMap(0:localDeCount-1))
+  call ESMF_ArrayGet(array, localarrayList=larrayList, &
+    localDeToDeMap=localDeToDeMap, rc=rc)
+
+ +

+The array object was created without additional padding which means + that the bounds of the Fortran array pointer correspond to the bounds of + the exclusive region. The following loop will cycle through all local DEs, + print the DE number as well as the Fortran array pointer bounds. The bounds + should be: +

+            lbound       ubound
+  
+   DE 0:      1            3         --+
+   DE 2:      1            3         --|  1st replication set
+   DE 4:      1            3         --+
+  
+   DE 1:      1            2         --+
+   DE 3:      1            2         --|  2nd replication set
+   DE 5:      1            2         --+
+
+

+

+  do localDe=0, localDeCount-1
+    call ESMF_LocalArrayGet(larrayList(localDe), myFarray1D, &
+      datacopyflag=ESMF_DATACOPY_REFERENCE, rc=rc)
+
+ +

+

+    print *, "localPet: ", localPet, "DE ",localDeToDeMap(localDe)," [", &
+      lbound(myFarray1D), ubound(myFarray1D),"]"
+  enddo
+  deallocate(larrayList)
+  deallocate(localDeToDeMap)
+  call ESMF_ArrayDestroy(array, rc=rc)
+
+ +

+The Fortran array pointer in the above loop was of rank 1 because the + Array object was of rank 1. However, the distgrid object associated + with array is 2-dimensional! Consequently DistGrid based information + queried from array will be 2D. The distgridToArrayMap and + arrayToDistGridMap + arrays provide the necessary mapping to correctly associate DistGrid based + information with Array dimensions. + +

+The next example creates a 2D Array +

+  call ESMF_ArraySpecSet(arrayspec, typekind=ESMF_TYPEKIND_R8, rank=2, rc=rc)
+
+ +

+on the previously used 2D DistGrid. By default, i.e. without the + distgridToArrayMap + argument, both DistGrid dimensions would be associated with the two Array + dimensions. However, the distgridToArrayMap specified in the following + call will only associate the second DistGrid dimension with the first Array + dimension. This will render the first DistGrid dimension a replicator + dimension and the second Array dimension a tensor dimension for which 1D + undistLBound and undistUBound arguments must be supplied. +

+

+  array = ESMF_ArrayCreate(arrayspec=arrayspec, distgrid=distgrid, &
+    distgridToArrayMap=(/0,1/), undistLBound=(/11/), &
+    undistUBound=(/14/), rc=rc)
+
+ +

+

+  call ESMF_ArrayDestroy(array, rc=rc)
+
+ +

+Finally, the same arrayspec and distgrid arguments are used to + create a 2D Array that is fully replicated in both dimensions of the DistGrid. + Both Array dimensions are now tensor dimensions and both DistGrid dimensions + are replicator dimensions. +

+

+  array = ESMF_ArrayCreate(arrayspec=arrayspec, distgrid=distgrid, &
+    distgridToArrayMap=(/0,0/), undistLBound=(/11,21/), &
+    undistUBound=(/14,22/), rc=rc)
+
+ +

+The result will be an Array with local lower bound (/11,21/) and upper bound + (/14,22/) on all 6 DEs of the DistGrid. +

+

+  call ESMF_ArrayDestroy(array, rc=rc)
+
+ +

+

+  call ESMF_DistGridDestroy(distgrid, rc=rc)
+
+ +

+Replicated Arrays can also be created from existing local Fortran arrays. + The following Fortran array allocation will provide a 3 x 10 array on each + PET. +

+

+  allocate(myFarray2D(3,10))
+
+ +

+Assuming a petCount of 4 the following DistGrid defines a 2D index space + that is distributed across the PETs along the first dimension. +

+

+  distgrid = ESMF_DistGridCreate(minIndex=(/1,1/), maxIndex=(/40,10/), rc=rc)
+
+ +

+The following call creates an Array object on the above distgrid using + the locally existing myFarray2D Fortran arrays. The difference + compared to the case with automatic memory allocation is that instead of + arrayspec the Fortran array is provided as argument. Furthermore, + the undistLBound and undistUBound arguments can be omitted, + defaulting into Array tensor dimension lower bound of 1 and an upper + bound equal to the size of the respective Fortran array dimension. +

+

+  array = ESMF_ArrayCreate(farray=myFarray2D, distgrid=distgrid, &
+    indexflag=ESMF_INDEX_DELOCAL, distgridToArrayMap=(/0,2/), rc=rc)
+
+ +

+The array object associates the 2nd DistGrid dimension with the 2nd + Array dimension. The first DistGrid dimension is not associated with any + Array dimension and will lead to replication of the Array along the DEs of + this direction. +

+

+  call ESMF_ArrayDestroy(array, rc=rc)
+
+ +

+

+  call ESMF_DistGridDestroy(distgrid, rc=rc)
+
+ +

+ +

+ +
+28.2.13 Shared memory features: DE pinning, sharing, and migration +

+ +

+Practically all modern computer systems today utilize multi-core processors, + supporting the concurrent execution of multiple hardware threads. + A number of these multi-core processors are commonly packaged into the same + compute node, having access to the same physical memory. Under ESMF each + hardware thread (or core) is identified as a unique Processing Element (PE). + The collection of PEs that share the same physical memory (i.e. compute node) + is referred to as a Single System Image (SSI). The ESMF Array class implements + features that allow the user to leverage the shared memory within each SSI to + efficiently exchange data without copies or explicit communication calls. + +

+The software threads executing an ESMF application on the hardware, and that + ESMF is aware of, are referred to as Persistent Execution Threads (PETs). In + practice a PET can typically be thought of as an MPI rank, i.e. an OS process, + defining its own private virtual address space (VAS). + The ESMF Virtual Machine (VM) class keeps track of the mapping between PETs + and PEs, and their location on the available SSIs. + +

+When an ESMF Array object is created, the specified DistGrid indicates how + many Decomposition Elements (DEs) are created. Each DE has its own memory + allocation to hold user data. The DELayout, referenced by the DistGrid, + determines which PET is considered the owner of each of the DEs. Queried + for the local DEs, the Array object returns the list of DEs that are owned by + the local PET making the query. + +

+By default DEs are pinned to the PETs under which they were created. + The memory allocation associated with a specific DE is only defined in the + VAS of the PET to which the DE is pinned. As a consequence, only the PET + owning a DE has access to its memory allocation. + +

+On shared memory systems, however, ESMF allows DEs to be pinned to SSIs + instead of PETs. In this case the PET under which a DE was created is still + consider the owner, but now all PETs under the same SSI have access to + the DE. For this the memory allocation associated with the DE is mapped into + the VAS of all the PETs under the SSI. + +

+To create an Array with each DE pinned to SSI instead of PET, first query the + VM for the available level of support. +

+

+  call ESMF_VMGet(vm, ssiSharedMemoryEnabledFlag=ssiSharedMemoryEnabled, rc=rc)
+
+ +

+

+  if (ssiSharedMemoryEnabled) then
+
+ +

+Knowing that the SSI shared memory feature is available, it is now possible + to create an Array object with DE to SSI pinning. +

+

+    distgrid = ESMF_DistGridCreate(minIndex=(/1,1/), maxIndex=(/40,10/), rc=rc)
+
+ +

+

+    array = ESMF_ArrayCreate(typekind=ESMF_TYPEKIND_R8, distgrid=distgrid, &
+      pinflag=ESMF_PIN_DE_TO_SSI, rc=rc)
+
+ +

+Just as in the cases discussed before, where the same DistGrid was used, a + default DELayout with as many DEs as PETs in the VM is constructed. Setting + the pinflag to ESMF_PIN_DE_TO_SSI does not change the + fact that each PET owns exactly one of the DEs. However, assuming that this + code is run on a set of PETs that are all located under the same SSI, every + PET now has access to all of the DEs. The situation can be observed by + querying for both the localDeCount, and the ssiLocalDeCount. +

+

+    call ESMF_ArrayGet(array, localDeCount=localDeCount, &
+      ssiLocalDeCount=ssiLocalDeCount, rc=rc)
+
+ +

+Assuming execution on 4 PETs, all located on the same SSI, the values of the + returned variable are localDeCount==1 and ssiLocalDeCount==4 on + all of the PETs. The mapping between each PET's local DE, and the global DE + index is provided through the localDeToDeMap array argument. The amount + of mapping information returned is dependent on how large localDeToDeMap + has been sized by the user. For size(localDeToDeMap)==localDeCount, + only mapping information for those DEs owned by the local PET is filled + in. However for size(localDeToDeMap)==ssiLocalDeCount, mapping + information for all locally accessible DEs is returned, including + those owned by other PETs on the same SSI. + +

+

+    allocate(localDeToDeMap(0:ssiLocalDeCount-1))
+    call ESMF_ArrayGet(array, localDeToDeMap=localDeToDeMap, rc=rc)
+
+ +

+The first localDeCount entries of localDeToDeMap are always the + global DE indices of the DEs owned by the local PET. The remaining + ssiLocalDeCount-localDeCount entries are the global DE indices of + DEs shared by other PETs. The ordering of the shared DEs is from + smallest to greatest, excluding the locally owned DEs, which were already + listed at the beginning of localDeToDeMap. For the current case, again + assuming execution on 4 PETs all located on the same SSI, we expect the + following situation: + +

+PET 0: localDeToDeMap==(/0,1,2,3/) +
+PET 1: localDeToDeMap==(/1,0,2,3/) +
+PET 2: localDeToDeMap==(/2,0,1,3/) +
+PET 3: localDeToDeMap==(/3,0,1,2/) +
+ +

+Each PET can access the memory allocations associated with all of the + DEs listed in the localDeToDeMap returned by the Array object. Direct + access to the Fortran array pointer of a specific memory allocation is + available through ESMF_ArrayGet(). Here each PET queries for the + farrayPtr of localDe==2, i.e. the 2nd shared DE. +

+

+    call ESMF_ArrayGet(array, farrayPtr=myFarray, localDe=2, rc=rc)
+
+ +

+Now variable myFarray on PETs 0 and 1 both point to the same + memory allocation for global DE 2. Both PETs have access to the same + piece of shared memory! The same is true for PETs 2 and 3, pointing to the + shared memory allocation of global DE 1. + +

+It is important to note that all of the typical considerations surrounding + shared memory programming apply when accessing shared DEs! Proper + synchronization between PETs accessing shared DEs is critical to avoid + race conditions. Also performance issues like false sharing + need to be considered for optimal use. + +

+For a simple demonstration, PETs 0 and 2 fill the entire memory allocation of + DE 2 and 1, respectively, to a unique value. +

+

+    if (localPet==0) then
+      myFarray = 12345.6789d0
+    else if (localPet==2) then
+      myFarray = 6789.12345d0
+    endif
+
+ +

+Here synchronization is needed before any PETs that share access to the same + DEs can safely access the data without race condition. The Array class provides + a simple synchronization method that can be used. +

+

+    call ESMF_ArraySync(array, rc=rc) ! prevent race condition
+
+ +

+Now it is safe for PETs 1 and 3 to access the shared DEs. We expect to find + the data that was set above. For simplicity of the code only the first + array element is inspected here. +

+

+    if (localPet==1) then
+      if (abs(myFarray(1,1)-12345.6789d0)>1.d10) print *, "bad data detected"
+    else if (localPet==3) then
+      if (abs(myFarray(1,1)-6789.12345d0)>1.d10) print *, "bad data detected"
+    endif
+
+ +

+Working with shared DEs requires additional bookkeeping on the user code + level. In some situations, however, DE sharing is simply used as a mechanism + to move DEs between PETs without requiring data copies. One practical + application of this case is the transfer of an Array between two components, + both of which use the same PEs, but run with different number of PETs. + These would typically be sequential components that use OpenMP on the user + level with varying threading levels. + +

+DEs that are pinned to SSI can be moved or migrated to any PET within + the SSI. This is accomplished by creating a new Array object from an + existing Array that was created with pinflag=ESMF_PIN_DE_TO_SSI. + The information of how the DEs are to migrate between the old and the new + Array is provided through a DELayout object. This object must have the + same number of DEs and describes how they map to the PETs on the current VM. + If this is in the context of a different component, the number of PETs might + differ from the original VM under which the existing Array was created. This + situation is explicitly supported, still the number of DEs must match. + +

+Here a simple DELayout is created on the same 4 PETs, but with rotated + DE ownerships: + +

+DE 0 -> PET 1 (old PET 0) +
+DE 1 -> PET 2 (old PET 1) +
+DE 2 -> PET 3 (old PET 2) +
+DE 3 -> PET 0 (old PET 3) +
+

+    delayout = ESMF_DELayoutCreate(petMap=(/1,2,3,0/), rc=rc) ! DE->PET mapping
+
+ +

+The creation of the new Array is done by reference, i.e. + datacopyflag=ESMF_DATACOPY_REFERENCE, since the new Array does + not create its own memory allocations. Instead the new Array references the + shared memory resources held by the incoming Array object. +

+

+    arrayMigrated = ESMF_ArrayCreate(array, delayout=delayout, &
+      datacopyflag=ESMF_DATACOPY_REFERENCE, rc=rc)
+
+ +

+Querying arrayMigrated for the number of local DEs will return 1 on + each PET. Sizing the localDeToDeMap accordingly and querying for it. +

+

+    deallocate(localDeToDeMap) ! free previous allocation
+    allocate(localDeToDeMap(0:1))
+    call ESMF_ArrayGet(arrayMigrated, localDeToDeMap=localDeToDeMap, rc=rc)
+
+ +

+This yields the following expected outcome: + +

+PET 0: localDeToDeMap==(/1/) +
+PET 1: localDeToDeMap==(/2/) +
+PET 2: localDeToDeMap==(/3/) +
+PET 3: localDeToDeMap==(/0/) +
+ +

+On each PET the respective Fortran array pointer is returned by the Array. +

+

+    call ESMF_ArrayGet(arrayMigrated, farrayPtr=myFarray, rc=rc)
+
+ +

+The same situation could have been achieved with the original array. + However, it would have required first finding the correct local DE + for the target global DE on each PET, and then querying array + accordingly. If needed more repeatedly, this bookkeeping would need to be + kept in a user code data structure. The DE migration feature on the other + hand provides a formal way to create a standard ESMF Array object that can be + used directly in any Array level method as usual, letting ESMF handle the + extra bookkeeping needed. + +

+Before destroying an Array whose DEs are shared between PETs, it is + advisable to issue one more synchronization. This prevents cases where a + PET still might be accessing a shared DE, while the owner PET is already + destroying the Array, therefore deallocating the shared memory resource. +

+

+    call ESMF_ArraySync(array, rc=rc) ! prevent race condition
+
+ +

+

+    call ESMF_ArrayDestroy(array, rc=rc)
+
+ +

+Remember that arrayMigrated shares the same memory allocations that were + held by array. Array arrayMigrated must therefore not be used + beyond the life time of array. Best to destroy it now. +

+

+    call ESMF_ArrayDestroy(arrayMigrated, rc=rc)
+
+ +

+

+  endif ! ending the ssiSharedMemoryEnabled conditional
+
+ +

+ + +

+ +

+ +

+ +

+ +
+28.2.14 Communication - Scatter and Gather +

+ +

+It is a common situation, particularly in legacy code, that an ESMF Array + object must be filled with data originating from a large Fortran array stored + on a single PET. +

+

+  if (localPet == 0) then
+    allocate(farray(10,20,30))
+    do k=1, 30
+      do j=1, 20
+        do i=1, 10
+          farray(i, j, k) = k*1000 + j*100 +  i
+        enddo
+      enddo
+    enddo
+  else
+    allocate(farray(0,0,0))
+  endif
+
+ +

+

+  distgrid = ESMF_DistGridCreate(minIndex=(/1,1,1/), maxIndex=(/10,20,30/), &
+    rc=rc)
+
+ +

+

+  call ESMF_ArraySpecSet(arrayspec, typekind=ESMF_TYPEKIND_I4, rank=3, rc=rc)
+
+ +

+

+  array = ESMF_ArrayCreate(arrayspec=arrayspec, distgrid=distgrid, rc=rc)
+
+ +

+The ESMF_ArrayScatter() method provides a convenient way of scattering + array data from a single root PET across the DEs of an ESMF Array object. +

+

+  call ESMF_ArrayScatter(array, farray=farray, rootPet=0, rc=rc)
+
+ +

+

+  deallocate(farray)
+
+ +

+The destination of the ArrayScatter() operation are all the DEs of a single + tile. For multi-tile Arrays the destination tile can be specified. The + shape of the scattered Fortran array must match the shape of the destination + tile in the ESMF Array. + +

+Gathering data decomposed and distributed across the DEs of an ESMF Array + object into a single Fortran array on root PET is accomplished by calling + ESMF_ArrayGather(). +

+

+  if (localPet == 3) then
+    allocate(farray(10,20,30))
+  else
+    allocate(farray(0,0,0))
+  endif
+  
+  call ESMF_ArrayGather(array, farray=farray, rootPet=3, rc=rc)
+
+ +

+

+  deallocate(farray)
+
+ +

+The source of the ArrayGather() operation are all the DEs of a single + tile. For multi-tile Arrays the source tile can be specified. The + shape of the gathered Fortran array must match the shape of the source + tile in the ESMF Array. + +

+The ESMF_ArrayScatter() operation allows to fill entire replicated + Array objects with data coming from a single root PET. +

+

+  distgrid = ESMF_DistGridCreate(minIndex=(/1,1/), maxIndex=(/5,5/), &
+    regDecomp=(/2,3/), rc=rc)
+
+ +

+

+  call ESMF_ArraySpecSet(arrayspec, typekind=ESMF_TYPEKIND_R8, rank=2, rc=rc)
+
+ +

+

+  array = ESMF_ArrayCreate(arrayspec=arrayspec, distgrid=distgrid, &
+    distgridToArrayMap=(/0,0/), undistLBound=(/11,21/), &
+    undistUBound=(/14,22/), rc=rc)
+
+ +

+The shape of the Fortran source array used in the Scatter() call must be + that of the contracted Array, i.e. contracted DistGrid dimensions do not + count. For the array just created this means that the source array + on rootPet must be of shape 4 x 2. +

+

+  if (localPet == 0) then
+    allocate(myFarray2D(4,2))
+    do j=1,2
+      do i=1,4
+        myFarray2D(i,j) = i * 100.d0 + j * 1.2345d0 ! initialize
+      enddo
+    enddo
+  else
+    allocate(myFarray2D(0,0))
+  endif
+  
+  call ESMF_ArrayScatter(array, farray=myFarray2D, rootPet=0, rc=rc)
+
+ +

+

+  deallocate(myFarray2D)
+
+ +

+This will have filled each local 4 x 2 Array piece with the replicated + data of myFarray2D. +

+

+  call ESMF_ArrayDestroy(array, rc=rc)
+
+ +

+

+  call ESMF_DistGridDestroy(distgrid, rc=rc)
+
+ +

+As a second example for the use of Scatter() and Gather() consider the + following replicated Array created from existing local Fortran arrays. +

+

+  allocate(myFarray2D(3,10))
+  distgrid = ESMF_DistGridCreate(minIndex=(/1,1/), maxIndex=(/40,10/), rc=rc)
+
+ +

+

+  array = ESMF_ArrayCreate(farray=myFarray2D, distgrid=distgrid, &
+    indexflag=ESMF_INDEX_DELOCAL, distgridToArrayMap=(/0,2/), rc=rc)
+
+ +

+The array object associates the 2nd DistGrid dimension with the 2nd + Array dimension. The first DistGrid dimension is not associated with any + Array dimension and will lead to replication of the Array along the DEs of + this direction. Still, the local arrays that comprise the array + object refer to independent pieces of memory and can be initialized + independently. +

+

+  myFarray2D = localPet ! initialize
+
+ +

+However, the notion of replication becomes visible when an array of shape + 3 x 10 on root PET 0 is scattered across the Array object. +

+

+  if (localPet == 0) then
+    allocate(myFarray2D2(5:7,11:20))
+  
+    do j=11,20
+      do i=5,7
+        myFarray2D2(i,j) = i * 100.d0 + j * 1.2345d0 ! initialize
+      enddo
+    enddo
+  else
+    allocate(myFarray2D2(0,0))
+  endif
+  
+  call ESMF_ArrayScatter(array, farray=myFarray2D2, rootPet=0, rc=rc)
+
+ +

+

+  deallocate(myFarray2D2)
+
+ +

+The Array pieces on every DE will receive the same source data, resulting + in a replication of data along DistGrid dimension 1. + +

+When the inverse operation, i.e. ESMF_ArrayGather(), is applied to + a replicated Array an intrinsic ambiguity needs to be considered. ESMF + defines the gathering of data of a replicated Array as the collection of data + originating from the numerically higher DEs. This means that data in + replicated elements associated with numerically lower DEs will be ignored + during ESMF_ArrayGather(). For the current example this means that + changing the Array contents on PET 1, which here corresponds to DE 1, +

+

+  if (localPet == 1) then
+    myFarray2D = real(1.2345, ESMF_KIND_R8)
+  endif
+
+ +

+will not affect the result of +

+  allocate(myFarray2D2(3,10))
+  myFarray2D2 = 0.d0    ! initialize to a known value
+  call ESMF_ArrayGather(array, farray=myFarray2D2, rootPet=0, rc=rc)
+
+ +

+The result remains completely defined by the unmodified values of Array in + DE 3, the numerically highest DE. However, overriding the DE-local Array + piece on DE 3 +

+  if (localPet==3) then
+    myFarray2D = real(5.4321, ESMF_KIND_R8)
+  endif
+
+ +

+will change the outcome of +

+  call ESMF_ArrayGather(array, farray=myFarray2D2, rootPet=0, rc=rc)
+
+ +

+as expected. +

+

+  deallocate(myFarray2D2)
+
+  call ESMF_ArrayDestroy(array, rc=rc)
+
+ +

+

+  call ESMF_DistGridDestroy(distgrid, rc=rc)
+
+ +

+ + +

+ +

+ +

+ +

+ +
+28.2.15 Communication - Halo +

+ +

+One of the most fundamental communication pattern in domain decomposition + codes is the halo operation. The ESMF Array class supports halos + by allowing memory for extra elements to be allocated on each DE. See + sections 28.2.2 and 28.2.8 for examples and + details on how to create an Array with extra DE-local elements. + +

+Here we consider an Array object that is created on a DistGrid that + defines a 10 x 20 index space, decomposed into 4 DEs using a regular + 2 x 2 decomposition. +

+

+  distgrid = ESMF_DistGridCreate(minIndex=(/1,1/), maxIndex=(/10,20/), &
+    regDecomp=(/2,2/), rc=rc)
+
+ +

+The Array holds 2D double precision float data. +

+

+  call ESMF_ArraySpecSet(arrayspec, typekind=ESMF_TYPEKIND_R8, rank=2, rc=rc)
+
+ +

+The totalLWidth and totalUWidth arguments are used during Array + creation to allocate 2 extra elements along every direction outside the + exclusive region defined by the DistGrid for every DE. (The indexflag + set to ESMF_INDEX_GLOBAL in this example does not affect the halo + behavior of Array. The setting is simply more convenient for the following + code.) +

+

+  array = ESMF_ArrayCreate(arrayspec=arrayspec, distgrid=distgrid, &
+    totalLWidth=(/2,2/), totalUWidth=(/2,2/), indexflag=ESMF_INDEX_GLOBAL, &
+    rc=rc)
+
+ +

+Without the explicit definition of boundary conditions in the DistGrid + the following inner connections are defined. + +

+

+   
+            +-------------------+       +-------------------+
+            | \       2       / |       | \       2       / |
+            |  +-------------+  |       |  +-------------+  |
+            |  |     DE 0    |  |       |  |     DE 2    |  |
+            |  |             |  |       |  |             |  |
+            |2 |    5 x 10   | 2|  <->  |2 |    5 x 10   | 2|
+            |  |             |  |       |  |             |  |
+            |  |             |  |       |  |             |  |
+            |  +-------------+  |       |  +-------------+  |
+            | /       2       \ |       | /       2       \ |
+            +-------------------+       +-------------------+
+  
+                      ^            \/             ^
+                      |            /\             |
+                      v                           v
+  
+            +-------------------+       +-------------------+
+            | \       2       / |       | \       2       / |
+            |  +-------------+  |       |  +-------------+  |
+            |  |     DE 1    |  |       |  |     DE 3    |  |
+            |  |             |  |       |  |             |  |
+            |2 |    5 x 10   | 2|  <->  |2 |    5 x 10   | 2|
+            |  |             |  |       |  |             |  |
+            |  |             |  |       |  |             |  |
+            |  +-------------+  |       |  +-------------+  |
+            | /       2       \ |       | /       2       \ |
+            +-------------------+       +-------------------+
+
+ +

+The exclusive region on each DE is of shape 5 x 10, while the total region + on each DE is of shape (5+2+2) x (10+2+2) = 9 x 14. In a typical application + the elements in the exclusive region are updated exclusively by the PET that + owns the DE. In this example the exclusive elements on every DE are + initialized to the value $f(i,j)$ of the geometric function +
+

+ + + + + +
\begin{displaymath}
+f(i,j) = \sin(\alpha i)\cos(\beta j),
+\end{displaymath} +(1)
+

+where +
+
+ + + + + +
\begin{displaymath}
+\alpha = 2\pi/N_i, i=1,...N_i
+\end{displaymath} +(2)
+

+and +
+
+ + + + + +
\begin{displaymath}
+\beta = 2\pi/N_j, j=1,...N_j,
+\end{displaymath} +(3)
+

+with $N_i = 10$ and $N_j = 20$. +

+

+  a = 2. * 3.14159 / 10.
+  b = 2. * 3.14159 / 20.
+  
+  call ESMF_ArrayGet(array, farrayPtr=farrayPtr, rc=rc)
+
+ +

+

+  
+  call ESMF_ArrayGet(array, exclusiveLBound=eLB, exclusiveUBound=eUB, rc=rc)
+
+ +

+

+  
+  do j=eLB(2,1), eUB(2,1)
+    do i=eLB(1,1), eUB(1,1)
+      farrayPtr(i,j) = sin(a*i) * cos(b*j)  ! test function
+    enddo
+  enddo
+
+ +

+The above loop only initializes the exclusive elements on each DE. The extra + elements, outside the exclusive region, are left untouched, holding undefined + values. Elements outside the exclusive region that correspond to + exclusive elements in neighboring DEs can be filled with the data values + in those neighboring elements. This is the definition of the halo operation. + +

+In ESMF the halo communication pattern is first precomputed and stored in + a RouteHandle object. This RouteHandle can then be used repeatedly to + perform the same halo operation in the most efficient way. + +

+The default halo operation for an Array is precomputed by the following call. +

+

+  call ESMF_ArrayHaloStore(array=array, routehandle=haloHandle, rc=rc)
+
+ +

+The haloHandle now holds the default halo operation for array, + which matches as many elements as possible outside the exclusive region to + their corresponding halo source elements in neighboring DEs. Elements that + could not be matched, e.g. at the edge of the global domain with open + boundary conditions, will not be updated by the halo operation. + +

+The haloHandle is applied through the ESMF_ArrayHalo() method. +

+

+  call ESMF_ArrayHalo(array=array, routehandle=haloHandle, rc=rc)
+
+ +

+Finally the resources held by haloHandle need to be released. +

+

+  call ESMF_ArrayHaloRelease(routehandle=haloHandle, rc=rc)
+
+ +

+The array object created above defines a 2 element wide rim around the + exclusive region on each DE. Consequently the default halo operation used + above will have resulted in updating both elements along the inside edges. + For simple numerical kernels often a single halo element is + sufficient. One way to achieve this would be to reduce the size of the + rim surrounding the exclusive region to 1 element along each direction. + However, if the same Array object is also used for higher order kernels + during a different phase of the calculation, a larger element rim is + required. For this case ESMF_ArrayHaloStore() offers two optional + arguments haloLDepth and haloUDepth. Using these arguments a + reduced halo depth can be specified. +

+

+  call ESMF_ArrayHaloStore(array=array, routehandle=haloHandle, &
+    haloLDepth=(/1,1/), haloUDepth=(/1,1/), rc=rc)
+
+ +

+This halo operation with a depth of 1 is sufficient to support a simple + quadratic differentiation kernel. +

+

+  allocate(farrayTemp(eLB(1,1):eUB(1,1), eLB(2,1):eUB(2,1)))
+
+  do step=1, 4
+    call ESMF_ArrayHalo(array=array, routehandle=haloHandle, rc=rc)
+
+ +

+

+    do j=eLB(2,1), eUB(2,1)
+      do i=eLB(1,1), eUB(1,1)
+        if (i==1) then
+          ! global edge
+          farrayTemp(i,j) = 0.5 * (-farrayPtr(i+2,j) + 4.*farrayPtr(i+1,j) &
+            - 3.*farrayPtr(i,j)) / a
+        else if (i==10) then
+          ! global edge
+          farrayTemp(i,j) = 0.5 * (farrayPtr(i-2,j) - 4.*farrayPtr(i-1,j) &
+            + 3.*farrayPtr(i,j)) / a
+        else
+          farrayTemp(i,j) = 0.5 * (farrayPtr(i+1,j) - farrayPtr(i-1,j)) / a
+        endif
+      enddo
+    enddo
+    farrayPtr(eLB(1,1):eUB(1,1), eLB(2,1):eUB(2,1)) = farrayTemp
+  enddo
+  
+  deallocate(farrayTemp)
+
+  call ESMF_ArrayHaloRelease(routehandle=haloHandle, rc=rc)
+
+ +

+The special treatment of the global edges in the above kernel is due to the + fact that the underlying DistGrid object does not define any special + boundary conditions. By default open global boundaries are assumed which + means that the rim elements on the global edges are untouched during + the halo operation, and cannot be used in the symmetric numerical derivative + formula. The kernel can be simplified (and the calculation is more precise) + with periodic boundary conditions along the first Array dimension. + +

+First destroy the current Array and DistGrid objects. +

+

+  call ESMF_ArrayDestroy(array, rc=rc)
+
+ +

+

+  call ESMF_DistGridDestroy(distgrid, rc=rc)
+
+ +

+Create a DistGrid with periodic boundary condition along the first dimension. +

+

+  allocate(connectionList(1))  ! one connection
+  call ESMF_DistGridConnectionSet(connection=connectionList(1), &
+     tileIndexA=1, tileIndexB=1, positionVector=(/10, 0/), rc=rc)
+
+ +

+

+  distgrid = ESMF_DistGridCreate(minIndex=(/1,1/), maxIndex=(/10,20/), &
+    regDecomp=(/2,2/), connectionList=connectionList, rc=rc)
+
+ +

+

+  deallocate(connectionList)
+  array = ESMF_ArrayCreate(arrayspec=arrayspec, distgrid=distgrid, &
+    totalLWidth=(/2,2/), totalUWidth=(/2,2/), indexflag=ESMF_INDEX_GLOBAL, &
+    rc=rc)
+
+ +

+Initialize the exclusive elements to the same geometric function as before. +

+

+  call ESMF_ArrayGet(array, farrayPtr=farrayPtr, rc=rc)
+
+ +

+

+  
+  call ESMF_ArrayGet(array, exclusiveLBound=eLB, exclusiveUBound=eUB, rc=rc)
+
+ +

+

+  
+  do j=eLB(2,1), eUB(2,1)
+    do i=eLB(1,1), eUB(1,1)
+      farrayPtr(i,j) = sin(a*i) * cos(b*j)  ! test function
+    enddo
+  enddo
+
+ +

+The numerical kernel only operates along the first dimension. An + asymmetric halo depth can be used to take this fact into account. +

+

+  call ESMF_ArrayHaloStore(array=array, routehandle=haloHandle, &
+    haloLDepth=(/1,0/), haloUDepth=(/1,0/), rc=rc)
+
+ +

+Now the same numerical kernel can be used without special treatment of + global edge elements. The symmetric derivative formula can be used for + all exclusive elements. +

+

+  allocate(farrayTemp(eLB(1,1):eUB(1,1), eLB(2,1):eUB(2,1)))
+
+  do step=1, 4
+    call ESMF_ArrayHalo(array=array, routehandle=haloHandle, rc=rc)
+
+ +

+

+    do j=eLB(2,1), eUB(2,1)
+      do i=eLB(1,1), eUB(1,1)
+        farrayTemp(i,j) = 0.5 * (farrayPtr(i+1,j) - farrayPtr(i-1,j)) / a
+      enddo
+    enddo
+    farrayPtr(eLB(1,1):eUB(1,1), eLB(2,1):eUB(2,1)) = farrayTemp
+  enddo
+
+ +

+The precision of the above kernel can be improved by going to + a higher order interpolation. Doing so requires that the halo depth must be + increased. The following code resets the exclusive Array elements + to the test function, precomputes a RouteHandle for a halo operation + with depth 2 along the first dimension, and finally uses the deeper halo + in the higher order kernel. +

+

+  
+  do j=eLB(2,1), eUB(2,1)
+    do i=eLB(1,1), eUB(1,1)
+      farrayPtr(i,j) = sin(a*i) * cos(b*j)  ! test function
+    enddo
+  enddo
+
+  call ESMF_ArrayHaloStore(array=array, routehandle=haloHandle2, &
+    haloLDepth=(/2,0/), haloUDepth=(/2,0/), rc=rc)
+
+ +

+

+  do step=1, 4
+    call ESMF_ArrayHalo(array=array, routehandle=haloHandle2, rc=rc)
+
+ +

+

+    do j=eLB(2,1), eUB(2,1)
+      do i=eLB(1,1), eUB(1,1)
+        farrayTemp(i,j) = (-farrayPtr(i+2,j) + 8.*farrayPtr(i+1,j) &
+          - 8.*farrayPtr(i-1,j) + farrayPtr(i-2,j)) / (12.*a)
+      enddo
+    enddo
+    farrayPtr(eLB(1,1):eUB(1,1), eLB(2,1):eUB(2,1)) = farrayTemp
+  enddo
+  
+  deallocate(farrayTemp)
+
+ +

+ESMF supports having multiple halo operations defined on the same Array + object at the same time. Each operation can be accessed through its unique + RouteHandle. The above kernel could have made ESMF_ArrayHalo() calls + with a depth of 1 along the first dimension using the previously precomputed + haloHandle if it needed to. Both RouteHandles need to release their + resources when no longer used. +

+

+  
+
+  call ESMF_ArrayHaloRelease(routehandle=haloHandle, rc=rc)
+
+ +

+

+  call ESMF_ArrayHaloRelease(routehandle=haloHandle2, rc=rc)
+
+ +

+Finally the Array and DistGrid objects can be destroyed. +

+

+  call ESMF_ArrayDestroy(array, rc=rc)
+
+ +

+

+  call ESMF_DistGridDestroy(distgrid, rc=rc)
+
+ +

+ + +

+ +

+ +

+ +

+ +
+28.2.16 Communication - Halo for arbitrary distribution +

+ +

+In the previous section the Array halo operation was demonstrated + for regularly decomposed ESMF Arrays. However, the ESMF halo operation + is not restricted to regular decompositions. The same Array halo methods + apply unchanged to Arrays that are created on arbitrarily distributed + DistGrids. This includes the non-blocking features discussed in section + 28.2.20. + +

+All of the examples in this section are based on the same arbitrarily + distributed DistGrid. Section 36.3.5 discusses + DistGrids with user-supplied, arbitrary sequence indices in detail. Here + a global index space range from 1 through 20 is decomposed across 4 DEs. + There are 4 PETs in this example with 1 DE per PET. Each PET constructs + its local seqIndexList variable. +

+

+  do i=1, 5
+#ifdef TEST_I8RANGE_on
+    seqIndexList(i) = localPet + (i - 1) * petCount + 1 + seqIndexOffset
+#else
+    seqIndexList(i) = localPet + (i - 1) * petCount + 1
+#endif
+  enddo
+
+ +

+This results in the following cyclic distribution scheme: +

+   DE 0 on PET 0: seqIndexList = (/1, 5, 9, 13, 17/)
+   DE 1 on PET 1: seqIndexList = (/2, 6, 10, 14, 18/)
+   DE 2 on PET 2: seqIndexList = (/3, 7, 11, 15, 19/)
+   DE 3 on PET 3: seqIndexList = (/4, 8, 12, 16, 20/)
+
+ +

+The local seqIndexList variables are then used to create a + DistGrid with the indicated arbitrary distribution pattern. +

+

+  distgrid = ESMF_DistGridCreate(arbSeqIndexList=seqIndexList, rc=rc)
+
+ +

+The resulting DistGrid is one-dimensional, although the user code may + interpret the sequence indices as a 1D map into a problem of higher + dimensionality. + +

+In this example the local DE on each PET is associated with a 5 element + exclusive region. Providing seqIndexList of different size on the + different PETs is supported and would result in different number of + exclusive elements on each PET. + +

+ +

+28.2.16.1 Halo for a 1D Array from existing memory allocation, created on + the 1D arbitrary DistGrid. +

+ +
+

+Creating an ESMF Array on top of a DistGrid with arbitrary sequence indices + is in principle no different from creating an Array on a regular DistGrid. + However, while an Array that was created on a regular DistGrid automatically + inherits the index space topology information that is contained within the + DistGrid object, there is no such topology information available for + DistGrid objects with arbitrary sequence indices. As a consequence of + this, Arrays created on arbitrary DistGrids do not automatically have + the information that is required to associated halo elements with the + exclusive elements across DEs. Instead the user must supply this information + explicitly during Array creation. + +

+Multiple ArrayCreate() interfaces exist that allow the creation of an Array + on a DistGrid with arbitrary sequence indices. The sequence indices for the + halo region of the local DE are supplied through an additional argument + with dummy name haloSeqIndexList. As in the regular case, the + ArrayCreate() interfaces differ in the way that the memory allocations for + the Array elements are passed into the call. The following code shows how + an ESMF Array can be wrapped around existing PET-local memory allocations. + The allocations are of different size on each PET as to accommodate the correct + number of local Array elements (exclusive region + halo region). +

+

+  allocate(farrayPtr1d(5+localPet+1)) !use explicit Fortran allocate statement
+  
+  if (localPet==0) then
+    allocate(haloList(1))
+#ifdef TEST_I8RANGE_on
+    haloList(:)=(/1099511627782_ESMF_KIND_I8/)
+#else    
+    haloList(:)=(/6/)
+#endif
+    array = ESMF_ArrayCreate(distgrid, farrayPtr1d, &
+      haloSeqIndexList=haloList, rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+  endif
+  if (localPet==1) then
+    allocate(haloList(2))
+#ifdef TEST_I8RANGE_on
+    haloList(:)=(/1099511627777_ESMF_KIND_I8,&
+                  1099511627795_ESMF_KIND_I8/)
+#else
+    haloList(:)=(/1,19/)
+#endif
+    array = ESMF_ArrayCreate(distgrid, farrayPtr1d, &
+      haloSeqIndexList=haloList, rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+  endif
+  if (localPet==2) then
+    allocate(haloList(3))
+#ifdef TEST_I8RANGE_on
+    haloList(:)=(/1099511627792_ESMF_KIND_I8,&
+                  1099511627782_ESMF_KIND_I8,&
+                  1099511627785_ESMF_KIND_I8/)
+#else
+    haloList(:)=(/16,6,9/)
+#endif
+    array = ESMF_ArrayCreate(distgrid, farrayPtr1d, &
+      haloSeqIndexList=haloList, rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+  endif
+  if (localPet==3) then
+    allocate(haloList(4))
+#ifdef TEST_I8RANGE_on
+    haloList(:)=(/1099511627777_ESMF_KIND_I8,&
+                  1099511627779_ESMF_KIND_I8,&
+                  1099511627777_ESMF_KIND_I8,&
+                  1099511627780_ESMF_KIND_I8/)
+#else
+    haloList(:)=(/1,3,1,4/)
+#endif
+    array = ESMF_ArrayCreate(distgrid, farrayPtr1d, &
+      haloSeqIndexList=haloList, rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+  endif
+
+ +

+The haloSeqIndexList arguments are 1D arrays of sequence indices. + It is through this argument that the user associates the halo elements with + exclusive Array elements covered by the DistGrid. In this example there + are different number of halo elements on each DE. They are associated + with exclusive elements as follows: + +

+

+   halo on DE 0 on PET 0: <seqIndex=6>  2nd exclusive element on DE 1
+   halo on DE 1 on PET 1: <seqIndex=1>  1st exclusive element on DE 0
+                          <seqIndex=19> 5th exclusive element on DE 2
+   halo on DE 2 on PET 2: <seqIndex=16> 4th exclusive element on DE 3
+                          <seqIndex=6>  2nd exclusive element on DE 1
+                          <seqIndex=9>  3rd exclusive element on DE 0
+   halo on DE 3 on PET 3: <seqIndex=1>  1st exclusive element on DE 0
+                          <seqIndex=3>  1st exclusive element on DE 2
+                          <seqIndex=1>  1st exclusive element on DE 0
+                          <seqIndex=4>  1st exclusive element on DE 3
+
+ +

+The above haloSeqIndexList arguments were constructed very artificially + in order to show the following general features: + +

    +
  • There is no restriction on the order in which the indices in a + haloSeqIndexList can appear. +
  • +
  • The same sequence index may appear in multiple haloSeqIndexList + arguments. +
  • +
  • The same sequence index may appear multiple times in the same + haloSeqIndexList argument. +
  • +
  • A local sequence index may appear in a haloSeqIndexList argument. + +
  • +
+ +

+The ArrayCreate() call checks that the provided Fortran memory allocation + is correctly sized to hold the exclusive elements, as indicated by the + DistGrid object, plus the halo elements as indicated by the local + haloSeqIndexList argument. The size of the Fortran allocation must + match exactly or a runtime error will be returned. + +

+Analogous to the case of Arrays on regular DistGrids, it is the exclusive + region of the local DE that is typically modified by the code running on + each PET. All of the ArrayCreate() calls that accept the + haloSeqIndexList argument place the exclusive region at the beginning + of the memory allocation on each DE and use the remaining space for the halo + elements. The following loop demonstrates this by filling the exclusive + elements on each DE with initial values. Remember that in this example each + DE holds 5 exclusive elements associated with different arbitrary sequence + indices. +

+

+  farrayPtr1d = 0 ! initialize
+  do i=1, 5
+    farrayPtr1d(i) = real(seqIndexList(i), ESMF_KIND_R8)
+  enddo
+  print *, "farrayPtr1d: ", farrayPtr1d
+
+ +

+Now the exclusive elements of array are initialized on each DE, however, + the halo elements remain unchanged. A RouteHandle can be set up that encodes + the required communication pattern for a halo exchange. The halo exchange + is precomputed according to the arbitrary sequence indices specified for the + exclusive elements by the DistGrid and the sequence indices provided by the + user for each halo element on the local DE in form of the + haloSeqIndexList argument during ArrayCreate(). + +

+

+  call ESMF_ArrayHaloStore(array, routehandle=haloHandle, rc=rc)
+
+ +

+Executing this halo operation will update the local halo elements according + to the associated sequence indices. +

+

+  call ESMF_ArrayHalo(array, routehandle=haloHandle, rc=rc)
+
+ +

+As always it is good practice to release the RouteHandle when done with it. +

+

+  call ESMF_ArrayHaloRelease(haloHandle, rc=rc)
+
+ +

+Also the Array object should be destroyed when no longer needed. +

+

+  call ESMF_ArrayDestroy(array, rc=rc)
+
+ +

+Further, since the memory allocation was done explicitly using the Fortran + allocate() statement, it is necessary to explicitly deallocate in order + to prevent memory leaks in the user application. +

+

+  deallocate(farrayPtr1d)
+
+ +

+ +

+28.2.16.2 Halo for a 1D Array with ESMF managed memory allocation, created on + the 1D arbitrary DistGrid. +

+ +
+

+Alternatively the exact same Array can be created where ESMF does the + memory allocation and deallocation. In this case the typekind of the + Array must be specified explicitly. +

+

+  if (localPet==0) then
+    array = ESMF_ArrayCreate(distgrid=distgrid, typekind=ESMF_TYPEKIND_R8, &
+      haloSeqIndexList=haloList, rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+  endif
+  if (localPet==1) then
+    array = ESMF_ArrayCreate(distgrid=distgrid, typekind=ESMF_TYPEKIND_R8, &
+      haloSeqIndexList=haloList, rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+  endif
+  if (localPet==2) then
+    array = ESMF_ArrayCreate(distgrid=distgrid, typekind=ESMF_TYPEKIND_R8, &
+      haloSeqIndexList=haloList, rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+  endif
+  if (localPet==3) then
+    array = ESMF_ArrayCreate(distgrid=distgrid, typekind=ESMF_TYPEKIND_R8, &
+      haloSeqIndexList=haloList, rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+  endif
+
+ +

+Use ESMF_ArrayGet() to gain access to the local memory allocation. +

+

+  call ESMF_ArrayGet(array, farrayPtr=farrayPtr1d, rc=rc)
+
+ +

+The returned Fortran pointer can now be used to initialize the exclusive + elements on each DE as in the previous case. +

+

+  do i=1, 5
+    farrayPtr1d(i) = real(seqIndexList(i),ESMF_KIND_R8) / 10.d0
+  enddo
+
+ +

+Identical halo operations are constructed and used. +

+

+  call ESMF_ArrayHaloStore(array, routehandle=haloHandle, rc=rc)
+
+ +

+

+  call ESMF_ArrayHalo(array, routehandle=haloHandle, rc=rc)
+
+ +

+

+  call ESMF_ArrayHaloRelease(haloHandle, rc=rc)
+
+ +

+

+  call ESMF_ArrayDestroy(array, rc=rc)
+
+ +

+ +

+28.2.16.3 Halo for an Array with undistributed dimensions, created on + the 1D arbitrary DistGrid, with default Array to DistGrid dimension mapping. +

+ +
+

+A current limitation of the Array implementation restricts DistGrids that + contain user-specified, arbitrary sequence indices to be exactly 1D + when used to create Arrays. See section 28.3 for a list of + current implementation restrictions. However, an Array created on such a + 1D arbitrary DistGrid is allowed to have undistributed dimensions. The + following example creates an Array on the same arbitrary DistGrid, with the + same arbitrary sequence indices for the halo elements as before, but with + one undistributed dimension with a size of 3. +

+

+  if (localPet==0) then
+    array = ESMF_ArrayCreate(distgrid=distgrid, typekind=ESMF_TYPEKIND_R8, &
+      haloSeqIndexList=haloList, undistLBound=(/1/), undistUBound=(/3/), rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+  endif
+  if (localPet==1) then
+    array = ESMF_ArrayCreate(distgrid=distgrid, typekind=ESMF_TYPEKIND_R8, &
+      haloSeqIndexList=haloList, undistLBound=(/1/), undistUBound=(/3/), rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+  endif
+  if (localPet==2) then
+    array = ESMF_ArrayCreate(distgrid=distgrid, typekind=ESMF_TYPEKIND_R8, &
+      haloSeqIndexList=haloList, undistLBound=(/1/), undistUBound=(/3/), rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+  endif
+  if (localPet==3) then
+    array = ESMF_ArrayCreate(distgrid=distgrid, typekind=ESMF_TYPEKIND_R8, &
+      haloSeqIndexList=haloList, undistLBound=(/1/), undistUBound=(/3/), rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+  endif
+
+ +

+By default the DistGrid dimension is mapped to the first Array dimension, + associating the remaining Array dimensions with the undistributed dimensions + in sequence. The dimension order is important when accessing the individual + Array elements. Here the same initialization as before is extended to + cover the undistributed dimension. +

+

+  call ESMF_ArrayGet(array, farrayPtr=farrayPtr2d, rc=rc)
+
+ +

+

+  do j=1, 3
+    do i=1, 5
+      farrayPtr2d(i,j) = real(seqIndexList(i),ESMF_KIND_R8) / 10.d0 + 100.d0*j
+    enddo
+  enddo
+
+ +

+In the context of the Array halo operation additional undistributed dimensions + are treated in a simple factorized manner. The same halo association between + elements that is encoded in the 1D arbitrary sequence index scheme is + applied to each undistributed element separately. This is completely + transparent on the user level and the same halo methods are used as before. +

+

+  call ESMF_ArrayHaloStore(array, routehandle=haloHandle, rc=rc)
+
+ +

+

+  call ESMF_ArrayHalo(array, routehandle=haloHandle, rc=rc)
+
+ +

+

+  call ESMF_ArrayHaloRelease(haloHandle, rc=rc)
+
+ +

+

+  call ESMF_ArrayDestroy(array, rc=rc)
+
+ +

+ +

+28.2.16.4 Halo for an Array with undistributed dimensions, created on + the 1D arbitrary DistGrid, mapping the undistributed dimension first. +

+ +
+

+In some situations it is more convenient to associate some or all of + the undistributed dimensions with the first Array dimensions. This can be + done easily by explicitly mapping the DistGrid dimension to an Array dimension + other than the first one. The distgridToArrayMap argument is used to + provide this information. The following code creates essentially the same + Array as before, but with swapped dimension order - now the first Array + dimension is the undistributed one. +

+

+  if (localPet==0) then
+    array = ESMF_ArrayCreate(distgrid=distgrid, typekind=ESMF_TYPEKIND_R8, &
+      distgridToArrayMap=(/2/), haloSeqIndexList=haloList, &
+      undistLBound=(/1/), undistUBound=(/3/), rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+  endif
+  if (localPet==1) then
+    array = ESMF_ArrayCreate(distgrid=distgrid, typekind=ESMF_TYPEKIND_R8, &
+      distgridToArrayMap=(/2/), haloSeqIndexList=haloList, &
+      undistLBound=(/1/), undistUBound=(/3/), rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+  endif
+  if (localPet==2) then
+    array = ESMF_ArrayCreate(distgrid=distgrid, typekind=ESMF_TYPEKIND_R8, &
+      distgridToArrayMap=(/2/), haloSeqIndexList=haloList, &
+      undistLBound=(/1/), undistUBound=(/3/), rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+  endif
+  if (localPet==3) then
+#ifdef TEST_I8RANGE_on
+    haloList(:)=(/1099511627777_ESMF_KIND_I8,&
+                  1099511627780_ESMF_KIND_I8,&
+                  1099511627779_ESMF_KIND_I8,&
+                  1099511627778_ESMF_KIND_I8/)
+#else
+    haloList(:)=(/1,3,5,4/)
+#endif
+    array = ESMF_ArrayCreate(distgrid=distgrid, typekind=ESMF_TYPEKIND_R8, &
+      distgridToArrayMap=(/2/), haloSeqIndexList=haloList, &
+      undistLBound=(/1/), undistUBound=(/3/), rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+  endif
+
+ +

+Notice that the haloList constructed on PET 3 is different from the + previous examples. All other PETs reuse the same haloList as before. + In the previous examples the list loaded into PET 3's + haloSeqIndexList argument contained a duplicate sequence index. + However, now that the undistributed dimension is placed first, the + ESMF_ArrayHaloStore() call will try to optimize the data exchange by + vectorizing it. Duplicate sequence indices are currently not supported + during vectorization. + +

+When accessing the Array elements, the swapped dimension order results in + a swapping of i and j. This can be seen in the following + initialization loop. +

+

+  call ESMF_ArrayGet(array, farrayPtr=farrayPtr2d, rc=rc)
+
+ +

+

+  do j=1, 3
+    do i=1, 5
+      farrayPtr2d(j,i) = real(seqIndexList(i),ESMF_KIND_R8) / 10.d0 + 100.d0*j
+    enddo
+  enddo
+
+ +

+Once set up, there is no difference in how the the halo operations are applied. +

+

+  call ESMF_ArrayHaloStore(array, routehandle=haloHandle, rc=rc)
+
+ +

+

+  call ESMF_ArrayHalo(array, routehandle=haloHandle, rc=rc)
+
+ +

+

+  call ESMF_ArrayDestroy(array, rc=rc)
+
+ +

+ +

+28.2.16.5 Halo for an Array with undistributed dimensions, created on + the 1D arbitrary DistGrid, re-using the RouteHandle. +

+ +
+

+Arrays can reuse the same RouteHandle, saving the overhead that is caused by + the precompute step. In order to demonstrate this the RouteHandle of the + previous halo call was not yet released and will be applied to a new Array. + +

+The following code creates an Array that is compatible to the + previous Array by using the same input information as before, only that + the size of the undistributed dimension is now 6 instead of 3. +

+

+  if (localPet==0) then
+    array2 = ESMF_ArrayCreate(distgrid=distgrid, typekind=ESMF_TYPEKIND_R8, &
+      distgridToArrayMap=(/2/), haloSeqIndexList=haloList, &
+      undistLBound=(/1/), undistUBound=(/6/), rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+  endif
+  if (localPet==1) then
+    array2 = ESMF_ArrayCreate(distgrid=distgrid, typekind=ESMF_TYPEKIND_R8, &
+      distgridToArrayMap=(/2/), haloSeqIndexList=haloList, &
+      undistLBound=(/1/), undistUBound=(/6/), rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+  endif
+  if (localPet==2) then
+    array2 = ESMF_ArrayCreate(distgrid=distgrid, typekind=ESMF_TYPEKIND_R8, &
+      distgridToArrayMap=(/2/), haloSeqIndexList=haloList, &
+      undistLBound=(/1/), undistUBound=(/6/), rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+  endif
+  if (localPet==3) then
+    array2 = ESMF_ArrayCreate(distgrid=distgrid, typekind=ESMF_TYPEKIND_R8, &
+      distgridToArrayMap=(/2/), haloSeqIndexList=haloList, &
+      undistLBound=(/1/), undistUBound=(/6/), rc=rc)
+    if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+  endif
+
+ +

+Again the exclusive Array elements must be initialized. +

+

+  call ESMF_ArrayGet(array2, farrayPtr=farrayPtr2d, rc=rc)
+
+ +

+

+  do j=1, 6
+    do i=1, 5
+      farrayPtr2d(j,i) = real(seqIndexList(i),ESMF_KIND_R8) / 10.d0 + 100.d0*j
+    enddo
+  enddo
+
+ +

+Now the haloHandle that was previously pre-computed for array can + be used directly for array2. +

+

+  call ESMF_ArrayHalo(array2, routehandle=haloHandle, rc=rc)
+
+ +

+Release the RouteHandle after its last use and clean up the remaining + Array and DistGrid objects. +

+

+  call ESMF_ArrayHaloRelease(haloHandle, rc=rc)
+
+ +

+

+  call ESMF_ArrayDestroy(array2, rc=rc)
+
+ +

+

+  call ESMF_DistGridDestroy(distgrid, rc=rc)
+
+ +

+ + +

+ +

+ +

+ +

+ +
+28.2.17 Communication - Redist +

+ +

+Arrays used in different models often cover the same index space region, + however, the distribution of the Arrays may be different, e.g. the models + run on exclusive sets of PETs. Even if the Arrays are defined on the same + list of PETs the decomposition may be different. +

+

+  srcDistgrid = ESMF_DistGridCreate(minIndex=(/1,1/), maxIndex=(/10,20/), &
+    regDecomp=(/4,1/), rc=rc)
+
+ +

+

+  dstDistgrid = ESMF_DistGridCreate(minIndex=(/1,1/), maxIndex=(/10,20/), &
+    regDecomp=(/1,4/), rc=rc)
+
+ +

+The number of elements covered by srcDistgrid is identical to the number + of elements covered by dstDistgrid - in fact the index space regions + covered by both DistGrid objects are congruent. However, the decomposition + defined by regDecomp, and consequently the distribution of source and + destination, are different. +

+

+  call ESMF_ArraySpecSet(arrayspec, typekind=ESMF_TYPEKIND_R8, rank=2, rc=rc)
+
+ +

+

+  srcArray = ESMF_ArrayCreate(arrayspec=arrayspec, distgrid=srcDistgrid, rc=rc)
+
+ +

+

+  dstArray = ESMF_ArrayCreate(arrayspec=arrayspec, distgrid=dstDistgrid, rc=rc)
+
+ +

+ +

+ +
+28.2.17.1 Default Mode +

+ +

+By construction srcArray and dstArray are of identical type and + kind. Further the number of exclusive elements matches between both Arrays. + These are the prerequisites for the application of an Array redistribution + in default mode. In order to increase performance of the actual + redistribution the communication pattern is precomputed once, and stored in + an ESMF_RouteHandle object. +

+

+  call ESMF_ArrayRedistStore(srcArray=srcArray, dstArray=dstArray, &
+    routehandle=redistHandle, rc=rc)
+
+ +

+The redistHandle can now be used repeatedly to transfer data from + srcArray to dstArray. +

+

+  call ESMF_ArrayRedist(srcArray=srcArray, dstArray=dstArray, &
+    routehandle=redistHandle, rc=rc)
+
+ +

+The use of the precomputed redistHandle is not restricted to + the (srcArray, dstArray) pair. Instead the redistHandle + can be used to redistribute data between any two Arrays that are compatible + with the Array pair used during precomputation. I.e. any pair of Arrays that + matches srcArray and dstArray in type, kind, and + memory layout of the distributed dimensions. However, the size, number, + and index order of undistributed dimensions may be different. + See section 37.2.5 for a more detailed discussion of + RouteHandle reusability. + +

+The transferability of RouteHandles between Array pairs can greatly reduce + the number of communication store calls needed. + In a typical application Arrays are often defined on the same decomposition, + typically leading to congruent distributed dimensions. For these Arrays, while + they may not have the same shape or size in the undistributed dimensions, + RouteHandles are reusable. + +

+For the current case, the redistHandle was precomputed for simple 2D + Arrays without undistributed dimensions. The RouteHandle transferability + rule allows us to use this same RouteHandle to redistribute between two + 3D Array that are built on the same 2D DistGrid, but have an undistributed + dimension. Note that the undistributed dimension does not have to be in the + same position on source and destination. Here the undistributed dimension is + in position 2 for srcArray1, and in position 1 for dstArray1. +

+

+  call ESMF_ArraySpecSet(arrayspec3d, typekind=ESMF_TYPEKIND_R8, rank=3, rc=rc)
+
+ +

+

+  srcArray1 = ESMF_ArrayCreate(arrayspec=arrayspec3d, distgrid=srcDistgrid, &
+    distgridToArrayMap=(/1,3/), undistLBound=(/1/), undistUBound=(/10/), rc=rc)
+
+ +

+

+  dstArray1 = ESMF_ArrayCreate(arrayspec=arrayspec3d, distgrid=dstDistgrid, &
+    distgridToArrayMap=(/2,3/), undistLBound=(/1/), undistUBound=(/10/), rc=rc)
+
+ +

+

+  call ESMF_ArrayRedist(srcArray=srcArray1, dstArray=dstArray1, &
+    routehandle=redistHandle, rc=rc)
+
+ +

+The following variation of the code shows that the same RouteHandle can be + applied to an Array pair even when the number of undistributed dimensions does + not match between source and destination Array, as long as to the total + number of undistributed elements matches. + +

+We prepare a source Array with two undistributed dimensions, in position + 1 and 3, of size $2$ and $5$, respectively. Thus there are $2 \times 5=10$ + undistributed source elements. The destination array is the same as before + with only a single undistributed dimension in position 1 + of size $10$. +

+

+  call ESMF_ArraySpecSet(arrayspec4d, typekind=ESMF_TYPEKIND_R8, rank=4, rc=rc)
+
+ +

+

+  srcArray2 = ESMF_ArrayCreate(arrayspec=arrayspec4d, distgrid=srcDistgrid, &
+    distgridToArrayMap=(/2,4/), undistLBound=(/1,1/), undistUBound=(/2,5/), &
+    rc=rc)
+
+ +

+

+  call ESMF_ArrayRedist(srcArray=srcArray2, dstArray=dstArray1, &
+    routehandle=redistHandle, rc=rc)
+
+ +

+When done, the resources held by redistHandle need to be deallocated + by the user code before the RouteHandle becomes inaccessible. +

+

+  call ESMF_ArrayRedistRelease(routehandle=redistHandle, rc=rc)
+
+ +

+ +

+ +
+28.2.17.2 Transpose Mode +

+ +

+In default mode, i.e. without providing the optional + srcToDstTransposeMap argument, ESMF_ArrayRedistStore() does not + require equal number of dimensions in source and destination Array. Only the + total number of elements must match. + Specifying srcToDstTransposeMap switches ESMF_ArrayRedistStore() + into transpose mode. In this mode each dimension of srcArray + is uniquely associated with a dimension in dstArray, and the sizes of + associated dimensions must match for each pair. + + +

+

+  dstDistgrid = ESMF_DistGridCreate(minIndex=(/1,1/), maxIndex=(/20,10/), &
+      rc=rc)
+
+ +

+

+  dstArray = ESMF_ArrayCreate(arrayspec=arrayspec, distgrid=dstDistgrid, rc=rc)
+
+ +

+This dstArray object covers a 20 x 10 index space while the + srcArray, defined further up, covers a 10 x 20 index space. Setting + srcToDstTransposeMap = (/2,1/) will associate the first and second + dimension of srcArray with the second and first dimension of + dstArray, respectively. This corresponds to a transpose of dimensions. + Since the decomposition and distribution of dimensions may be different for + source and destination redistribution may occur at the same time. +

+

+  call ESMF_ArrayRedistStore(srcArray=srcArray, dstArray=dstArray, &
+    routehandle=redistHandle, srcToDstTransposeMap=(/2,1/), rc=rc)
+
+ +

+

+  call ESMF_ArrayRedist(srcArray=srcArray, dstArray=dstArray, &
+    routehandle=redistHandle, rc=rc)
+
+ +

+The transpose mode of ESMF_ArrayRedist() is not limited to + distributed dimensions of Arrays. The srcToDstTransposeMap argument + can be used to transpose undistributed dimensions in the same manner. + Furthermore transposing distributed and undistributed dimensions between + Arrays is also supported. + +

+The srcArray used in the following examples is of rank 4 with 2 + distributed and 2 undistributed dimensions. The distributed dimensions + are the two first dimensions of the Array and are distributed according to the + srcDistgrid which describes a total index space region of 100 x 200 + elements. The last two Array dimensions are undistributed dimensions of size + 2 and 3, respectively. +

+

+  call ESMF_ArraySpecSet(arrayspec, typekind=ESMF_TYPEKIND_R8, rank=4, rc=rc)
+
+ +

+

+  srcDistgrid = ESMF_DistGridCreate(minIndex=(/1,1/), maxIndex=(/100,200/), &
+    rc=rc)
+
+ +

+

+  srcArray = ESMF_ArrayCreate(arrayspec=arrayspec, distgrid=srcDistgrid, &
+    undistLBound=(/1,1/), undistUBound=(/2,3/), rc=rc)
+
+ +

+The first dstArray to consider is defined on a DistGrid that also + describes a 100 x 200 index space region. The distribution indicated + by dstDistgrid may be different from the source distribution. Again + the first two Array dimensions are associated with the DistGrid dimensions in + sequence. Furthermore, the last two Array dimensions are undistributed + dimensions, however, the sizes are 3 and 2, respectively. +

+

+  dstDistgrid = ESMF_DistGridCreate(minIndex=(/1,1/), maxIndex=(/100,200/), &
+    rc=rc)
+
+ +

+

+  dstArray = ESMF_ArrayCreate(arrayspec=arrayspec, distgrid=dstDistgrid, &
+    undistLBound=(/1,1/), undistUBound=(/3,2/), rc=rc)
+
+ +

+The desired mapping between srcArray and dstArray dimensions + is expressed by srcToDstTransposeMap = (/1,2,4,3/), transposing only + the two undistributed dimensions. +

+

+  call ESMF_ArrayRedistStore(srcArray=srcArray, dstArray=dstArray, &
+    routehandle=redistHandle, srcToDstTransposeMap=(/1,2,4,3/), rc=rc)
+
+ +

+

+  call ESMF_ArrayRedist(srcArray=srcArray, dstArray=dstArray, &
+    routehandle=redistHandle, rc=rc)
+
+ +

+Next consider a dstArray that is defined on the same dstDistgrid, + but with a different order of Array dimensions. The desired order is + specified during Array creation using the argument + distgridToArrayMap = (/2,3/). This map associates the first and second + DistGrid dimensions with the second and third Array dimensions, respectively, + leaving Array dimensions one and four undistributed. +

+

+  dstArray = ESMF_ArrayCreate(arrayspec=arrayspec, distgrid=dstDistgrid, &
+    distgridToArrayMap=(/2,3/), undistLBound=(/1,1/), undistUBound=(/3,2/), &
+    rc=rc)
+
+ +

+Again the sizes of the undistributed dimensions are chosen in reverse order + compared to srcArray. The desired transpose mapping in this case will + be srcToDstTransposeMap = (/2,3,4,1/). +

+

+  call ESMF_ArrayRedistStore(srcArray=srcArray, dstArray=dstArray, &
+    routehandle=redistHandle, srcToDstTransposeMap=(/2,3,4,1/), rc=rc)
+
+ +

+

+  call ESMF_ArrayRedist(srcArray=srcArray, dstArray=dstArray, &
+    routehandle=redistHandle, rc=rc)
+
+ +

+Finally consider the case where dstArray is constructed on a + 200 x 3 index space and where the undistributed dimensions are of size + 100 and 2. +

+

+  dstDistgrid = ESMF_DistGridCreate(minIndex=(/1,1/), maxIndex=(/200,3/), &
+    rc=rc)
+
+ +

+

+  dstArray = ESMF_ArrayCreate(arrayspec=arrayspec, distgrid=dstDistgrid, &
+    undistLBound=(/1,1/), undistUBound=(/100,2/), rc=rc)
+
+ +

+By construction srcArray and dstArray hold the same number of + elements, albeit in a very different layout. Nevertheless, with a + srcToDstTransposeMap that maps matching dimensions from source to + destination, the following Array redistribution becomes a well defined + operation between srcArray and dstArray. +

+

+  call ESMF_ArrayRedistStore(srcArray=srcArray, dstArray=dstArray, &
+    routehandle=redistHandle, srcToDstTransposeMap=(/3,1,4,2/), rc=rc)
+
+ +

+

+  call ESMF_ArrayRedist(srcArray=srcArray, dstArray=dstArray, &
+    routehandle=redistHandle, rc=rc)
+
+ +

+The srcToDstTransposeMap mechanism supports negative map entries. + Negative entries indicate that the order of elements is to be reversed when + going from source to destination. + Using the same srcArray and dstArray objects as in the previous + example, the following code maps the first srcArray dimension to the + third dstArray dimension, as before. However, the ordering of + the elements along this dimension is reversed between source and destination. +

+

+  call ESMF_ArrayRedistStore(srcArray=srcArray, dstArray=dstArray, &
+    routehandle=redistHandle, srcToDstTransposeMap=(/-3,1,4,2/), rc=rc)
+
+ +

+

+  call ESMF_ArrayRedist(srcArray=srcArray, dstArray=dstArray, &
+    routehandle=redistHandle, rc=rc)
+
+ +

+Redistribution of multi-tile Arrays is supported, although not shown as an + example here. In default mode, the + index space defined by both source and destination Arrays must match, + regardless of how it is comprised by tiles. In particular, there is no + restriction on the number of source and desination tiles, as long as both + sides define the same global index space. + +

+The situation is different in transpose mode. Here the number of source + and destination tiles must match. In this case, the redistribution is defined + tile-by-tile in order. If the provided + srcToDstTransposeMap is of size rank, it is used for all of the + tiles. The other supported option is where srcToDstTransposeMap is of + size +$rank \times tileCount$. In that case each source-destination tile-pair + has its own transpose map. + + +

+ +

+ +

+ +

+ +
+28.2.18 Communication - SparseMatMul +

+ +

+Sparse matrix multiplication is a fundamental Array communication method. One + frequently used application of this method is the interpolation between pairs + of Arrays. The principle is this: the value of each element in the exclusive + region of the destination Array is expressed as a linear combination of potentially all the exclusive elements of the source Array. Naturally most of + the coefficients of these linear combinations will be zero and it is more + efficient to store explicit information about the non-zero elements than to + keep track of all the coefficients. + +

+There is a choice to be made with respect to the format in which to store the + information about the non-zero elements. One option is to store the value + of each coefficient together with the corresponding destination element index + and source element index. Destination and source indices could be expressed in + terms of the corresponding DistGrid tile index together with the coordinate + tuple within the tile. While this format may be the most natural way to + express elements in the source and destination Array, it has two major drawbacks. + First the coordinate tuple is dimCount specific and second the format + is extremely bulky. For 2D source and destination Arrays it would require 6 + integers to store the source and destination element information for each + non-zero coefficient and matters get worse for higher dimensions. + +

+Both problems can be circumvented by interpreting source and destination + Arrays as sequentialized strings or vectors of elements. This is done + by assigning a unique sequence index to each exclusive element in both + Arrays. With that the operation of updating the elements in the destination Array + as linear combinations of source Array elements takes the form of a sparse + matrix multiplication. + +

+The default sequence index rule assigns index $1$ to the minIndex corner + element of the first tile of the DistGrid on which the Array is defined. It then + increments the sequence index by $1$ for each element running through the + DistGrid dimensions by order. The index space position of the DistGrid tiles + does not affect the sequence labeling of elements. The default sequence indices + for +

+  srcDistgrid = ESMF_DistGridCreate(minIndex=(/-1,0/), maxIndex=(/1,3/), rc=rc)
+
+ +

+for each element are: +

+     -------------------------------------> 2nd dim
+     |
+     |   +------+------+------+------+
+     |   |(-1,0)|      |      |(-1,3)|
+     |   |      |      |      |      |
+     |   |   1  |   4  |   7  |  10  |
+     |   +------+------+------+------+
+     |   |      |      |      |      |
+     |   |      |      |      |      |
+     |   |   2  |   5  |   8  |  11  |
+     |   +------+------+------+------+
+     |   | (1,0)|      |      | (1,3)|
+     |   |      |      |      |      |
+     |   |   3  |   6  |   9  |  12  |
+     |   +------+------+------+------+
+     |
+     v
+    1st dim
+
+ +

+The assigned sequence indices are decomposition and distribution invariant by + construction. Furthermore, when an Array is created with extra elements per DE on + a DistGrid the sequence indices (which only cover the exclusive elements) remain + unchanged. +

+

+  call ESMF_ArraySpecSet(arrayspec, typekind=ESMF_TYPEKIND_R8, rank=2, rc=rc)
+
+ +

+

+  srcArray = ESMF_ArrayCreate(arrayspec=arrayspec, distgrid=srcDistgrid, &
+    totalLWidth=(/1,1/), totalUWidth=(/1,1/), indexflag=ESMF_INDEX_GLOBAL, &
+    rc=rc)
+
+ +

+The extra padding of 1 element in each direction around the exclusive elements on + each DE are "invisible" to the Array sparse matrix multiplication method. These + extra elements are either updated by the computational kernel or by Array halo + operations. + +

+An alternative way to assign sequence indices to all the elements in the tiles + covered by a DistGrid object is to use a special ESMF_DistGridCreate() + call. This call has been specifically designed for 1D cases with arbitrary, + user-supplied sequence indices. +

+

+  seqIndexList(1) = localPet*10
+  seqIndexList(2) = localPet*10 + 1
+  dstDistgrid = ESMF_DistGridCreate(arbSeqIndexList=seqIndexList, rc=rc)
+
+ +

+This call to ESMF_DistGridCreate() is collective across the current VM. + The arbSeqIndexList argument specifies the PET-local arbitrary sequence + indices that need to be covered by the local DE. The resulting DistGrid has + one local DE per PET which covers the entire PET-local index range. The user + supplied sequence indices must be unique, but the sequence may be interrupted. + The four DEs of dstDistgrid have the following local 1D index space + coordinates (given between "()") and sequence indices: +

+    covered by DE 0    covered by DE 1   covered by DE 2   covered by DE 3
+    on PET 0           on PET 1          on PET 2          on PET 3
+    ----------------------------------------------------------------------
+    (1) : 0            (1) : 10          (1) : 20          (1) : 30
+    (2) : 1            (2) : 11          (2) : 21          (2) : 31
+
+ +

+Again the DistGrid object provides the sequence index labeling for the + exclusive elements of an Array created on the DistGrid regardless of extra, + non-exclusive elements. +

+

+  dstArray = ESMF_ArrayCreate(arrayspec=arrayspec, distgrid=dstDistgrid, rc=rc)
+
+ +

+With the definition of sequence indices, either by the default rule or as user + provided arbitrary sequence indices, it is now possible to uniquely identify + each exclusive element in the source and destination Array by a single integer + number. Specifying a pair of source and destination elements takes two integer + number regardless of the number of dimensions. + +

+The information required to carry out a sparse matrix multiplication are the + pair of source and destination sequence indices and the associated + multiplication factor for each pair. ESMF requires this information in form of + two Fortran arrays. The factors are stored in a 1D array of the appropriate + type and kind, e.g. real(ESMF_KIND_R8)::factorList(:). Array sparse + matrix multiplications are supported between Arrays of different type and + kind. The type and kind of the factors can also be chosen freely. The + sequence index pairs associated with the factors provided by factorList + are stored in a 2D Fortran array of default integer kind of the shape integer::factorIndexList(2,:). The sequence indices of the source Array elements + are stored in the first row of factorIndexList while the sequence indices of the destination Array elements are + stored in the second row. + +

+Each PET in the current VM must call into ESMF_ArraySMMStore() + to precompute and store the communication pattern for the sparse matrix + multiplication. The multiplication factors may be provided in parallel, i.e. + multiple PETs may specify factorList and factorIndexList arguments + when calling into ESMF_ArraySMMStore(). PETs that do not + provide factors either call with factorList and factorIndexList + arguments containing zero elements or issue the call omitting both arguments. +

+

+  if (localPet == 0) then
+    allocate(factorList(1))               ! PET 0 specifies 1 factor
+    allocate(factorIndexList(2,1))
+    factorList = (/0.2/)                  ! factors
+    factorIndexList(1,:) = (/5/)          ! seq indices into srcArray
+    factorIndexList(2,:) = (/30/)         ! seq indices into dstArray
+    
+    call ESMF_ArraySMMStore(srcArray=srcArray, dstArray=dstArray, &
+      routehandle=sparseMatMulHandle, factorList=factorList, &
+      factorIndexList=factorIndexList, rc=rc)
+
+ +

+

+      
+    deallocate(factorList)
+    deallocate(factorIndexList)
+  else if (localPet == 1) then
+    allocate(factorList(3))               ! PET 1 specifies 3 factor
+    allocate(factorIndexList(2,3))
+    factorList = (/0.5, 0.5, 0.8/)        ! factors
+    factorIndexList(1,:) = (/8, 2, 12/)   ! seq indices into srcArray
+    factorIndexList(2,:) = (/11, 11, 30/) ! seq indices into dstArray
+    
+    call ESMF_ArraySMMStore(srcArray=srcArray, dstArray=dstArray, &
+      routehandle=sparseMatMulHandle, factorList=factorList, &
+      factorIndexList=factorIndexList, rc=rc)
+
+ +

+

+      
+    deallocate(factorList)
+    deallocate(factorIndexList)
+  else
+    ! PETs 2 and 3 do not provide factors
+    
+    call ESMF_ArraySMMStore(srcArray=srcArray, dstArray=dstArray, &
+      routehandle=sparseMatMulHandle, rc=rc)
+
+ +

+

+      
+  endif
+
+ +

+The RouteHandle object sparseMatMulHandle produced by + ESMF_ArraySMMStore() can now be used to call ESMF_ArraySMM() collectively across all PETs of the current VM to + perform +

+     dstArray = 0.0
+     do n=1, size(combinedFactorList)
+         dstArray(combinedFactorIndexList(2, n)) += 
+           combinedFactorList(n) * srcArray(combinedFactorIndexList(1, n))
+     enddo
+
+ in parallel. Here combinedFactorList and combinedFactorIndexList + are the combined lists defined by the respective local lists provided by + PETs 0 and 1 in parallel. For this example +
+  call ESMF_ArraySMM(srcArray=srcArray, dstArray=dstArray, &
+    routehandle=sparseMatMulHandle, rc=rc)
+
+ +

+will initialize the entire dstArray to 0.0 and then update two elements: + +

+

+   on DE 1:
+   dstArray(2) = 0.5 * srcArray(0,0)  +  0.5 * srcArray(0,2)
+
+ +

+and + +

+

+   on DE 3:
+   dstArray(1) = 0.2 * srcArray(0,1)  +  0.8 * srcArray(1,3).
+
+ +

+The call to ESMF_ArraySMM() does provide the option to turn + the default dstArray initialization off. If argument zeroregion + is set to ESMF_REGION_EMPTY +

+

+  call ESMF_ArraySMM(srcArray=srcArray, dstArray=dstArray, &
+    routehandle=sparseMatMulHandle, zeroregion=ESMF_REGION_EMPTY, rc=rc)
+
+ +

+skips the initialization and elements in dstArray are updated according to: + +

+

+     do n=1, size(combinedFactorList)
+         dstArray(combinedFactorIndexList(2, n)) += 
+           combinedFactorList(n) * srcArray(combinedFactorIndexList(1, n)).
+     enddo
+
+ +

+The ESMF_RouteHandle object returned by ESMF_ArraySMMStore() + can be applied to any src/dst Array pairs that is compatible with the + Array pair used during precomputation, i.e. any pair of Arrays that matches + srcArray and dstArray in type, kind, and + memory layout of the distributed dimensions. However, the size, number, + and index order of undistributed dimensions may be different. + See section 37.2.5 for a more detailed discussion of + RouteHandle reusability. + +

+The resources held by sparseMatMulHandle need to be deallocated by the + user code before the handle becomes inaccessible. +

+

+  call ESMF_ArraySMMRelease(routehandle=sparseMatMulHandle, rc=rc)
+
+ +

+The Array sparse matrix multiplication also applies to Arrays with + undistributed dimensions. The undistributed dimensions are interpreted + in a sequentialized manner, much like the distributed dimensions, + introducing a second sequence index for source and destination elements. + Sequence index 1 is assigned to the first element in the first + (i.e. fastest varying in memory) undistributed dimension. The following + undistributed elements are labeled in consecutive order as they are stored in + memory. + +

+In the simplest case the Array sparse matrix multiplication will apply an + identity matrix to the vector of sequentialized undistributed Array elements + for every non-zero element in the sparse matrix. The requirement in this case + is that the total undistributed element count, i.e. the product of the sizes + of all undistributed dimensions, be the same for source and destination Array. +

+

+  call ESMF_ArraySpecSet(arrayspec, typekind=ESMF_TYPEKIND_R8, rank=3, rc=rc)
+  srcArray = ESMF_ArrayCreate(arrayspec=arrayspec, distgrid=srcDistgrid, &
+    totalLWidth=(/1,1/), totalUWidth=(/1,1/), indexflag=ESMF_INDEX_GLOBAL, &
+    distgridToArrayMap=(/1,2/), undistLBound=(/1/), undistUBound=(/2/), rc=rc)
+
+ +

+

+  call ESMF_ArraySpecSet(arrayspec, typekind=ESMF_TYPEKIND_R8, rank=2, rc=rc)
+  dstArray = ESMF_ArrayCreate(arrayspec=arrayspec, distgrid=dstDistgrid, &
+    distgridToArrayMap=(/2/), undistLBound=(/1/), undistUBound=(/2/), rc=rc)
+
+ +

+Setting up factorList and factorIndexList is identical to the + case for Arrays without undistributed dimensions. Also the call to + ESMF_ArraySMMStore() remains unchanged. Internally, however, + the source and destination Arrays are checked to make sure the total + undistributed element count matches. +

+

+  if (localPet == 0) then
+    allocate(factorList(1))               ! PET 0 specifies 1 factor
+    allocate(factorIndexList(2,1))
+    factorList = (/0.2/)                  ! factors
+    factorIndexList(1,:) = (/5/)          ! seq indices into srcArray
+    factorIndexList(2,:) = (/30/)         ! seq indices into dstArray
+    
+    call ESMF_ArraySMMStore(srcArray=srcArray, dstArray=dstArray, &
+      routehandle=sparseMatMulHandle, factorList=factorList, &
+      factorIndexList=factorIndexList, rc=rc)
+
+ +

+

+      
+    deallocate(factorList)
+    deallocate(factorIndexList)
+  else if (localPet == 1) then
+    allocate(factorList(3))               ! PET 1 specifies 3 factor
+    allocate(factorIndexList(2,3))
+    factorList = (/0.5, 0.5, 0.8/)        ! factors
+    factorIndexList(1,:) = (/8, 2, 12/)   ! seq indices into srcArray
+    factorIndexList(2,:) = (/11, 11, 30/) ! seq indices into dstArray
+    
+    call ESMF_ArraySMMStore(srcArray=srcArray, dstArray=dstArray, &
+      routehandle=sparseMatMulHandle, factorList=factorList, &
+      factorIndexList=factorIndexList, rc=rc)
+
+ +

+

+      
+    deallocate(factorList)
+    deallocate(factorIndexList)
+  else
+    ! PETs 2 and 3 do not provide factors
+    
+    call ESMF_ArraySMMStore(srcArray=srcArray, dstArray=dstArray, &
+      routehandle=sparseMatMulHandle, rc=rc)
+
+ +

+

+  endif
+
+ +

+The call into the ESMF_ArraySMM() operation is completely + transparent with respect to whether source and/or destination Arrays contain + undistributed dimensions. +

+

+  call ESMF_ArraySMM(srcArray=srcArray, dstArray=dstArray, &
+    routehandle=sparseMatMulHandle, rc=rc)
+
+ +

+This operation will initialize the entire dstArray to 0.0 and then + update four elements: + +

+

+   on DE 1:
+   dstArray[1](2) = 0.5 * srcArray(0,0)[1]  +  0.5 * srcArray(0,2)[1],
+   dstArray[2](2) = 0.5 * srcArray(0,0)[2]  +  0.5 * srcArray(0,2)[2]
+
+ +

+and + +

+

+   on DE 3:
+   dstArray[1](1) = 0.2 * srcArray(0,1)[1]  +  0.8 * srcArray(1,3)[1],
+   dstArray[2](1) = 0.2 * srcArray(0,1)[2]  +  0.8 * srcArray(1,3)[2].
+
+ +

+Here indices between "()" refer to distributed dimensions while indices + between "[]" correspond to undistributed dimensions. + +

+In a more general version of the Array sparse matrix multiplication the + total undistributed element count, i.e. the product of the sizes + of all undistributed dimensions, need not be the same for source and + destination Array. In this formulation each non-zero element of the sparse + matrix is identified with a unique element in the source and destination + Array. This requires a generalization of the factorIndexList argument + which now must contain four integer numbers for each element. These numbers + in sequence are the sequence index of the distributed dimensions and the + sequence index of the undistributed dimensions of the element in the source + Array, followed by the sequence index of the distributed dimensions and + the sequence index of the undistributed dimensions of the element in the + destination Array. +

+

+  call ESMF_ArraySpecSet(arrayspec, typekind=ESMF_TYPEKIND_R8, rank=3, rc=rc)
+  srcArray = ESMF_ArrayCreate(arrayspec=arrayspec, distgrid=srcDistgrid, &
+    totalLWidth=(/1,1/), totalUWidth=(/1,1/), indexflag=ESMF_INDEX_GLOBAL, &
+    distgridToArrayMap=(/1,2/), undistLBound=(/1/), undistUBound=(/2/), rc=rc)
+
+ +

+

+  call ESMF_ArraySpecSet(arrayspec, typekind=ESMF_TYPEKIND_R8, rank=2, rc=rc)
+  dstArray = ESMF_ArrayCreate(arrayspec=arrayspec, distgrid=dstDistgrid, &
+    distgridToArrayMap=(/2/), undistLBound=(/1/), undistUBound=(/4/), rc=rc)
+
+ +

+Setting up factorList is identical to the previous cases since there is + still only one value associated with each non-zero matrix element. However, + each entry in factorIndexList now has 4 instead of just 2 components. +

+

+  if (localPet == 0) then
+    allocate(factorList(1))               ! PET 0 specifies 1 factor
+    allocate(factorIndexList(4,1))
+    factorList = (/0.2/)                  ! factors
+    factorIndexList(1,:) = (/5/)          ! seq indices into srcArray
+    factorIndexList(2,:) = (/1/)          ! undistr. seq indices into srcArray
+    factorIndexList(3,:) = (/30/)         ! seq indices into dstArray
+    factorIndexList(4,:) = (/2/)          ! undistr. seq indices into dstArray
+    
+    call ESMF_ArraySMMStore(srcArray=srcArray, dstArray=dstArray, &
+      routehandle=sparseMatMulHandle, factorList=factorList, &
+      factorIndexList=factorIndexList, rc=rc)
+
+ +

+

+      
+    deallocate(factorList)
+    deallocate(factorIndexList)
+  else if (localPet == 1) then
+    allocate(factorList(3))               ! PET 1 specifies 3 factor
+    allocate(factorIndexList(4,3))
+    factorList = (/0.5, 0.5, 0.8/)        ! factors
+    factorIndexList(1,:) = (/8, 2, 12/)   ! seq indices into srcArray
+    factorIndexList(2,:) = (/2, 1, 1/)    ! undistr. seq indices into srcArray
+    factorIndexList(3,:) = (/11, 11, 30/) ! seq indices into dstArray
+    factorIndexList(4,:) = (/4, 4, 2/)    ! undistr. seq indices into dstArray
+    
+    call ESMF_ArraySMMStore(srcArray=srcArray, dstArray=dstArray, &
+      routehandle=sparseMatMulHandle, factorList=factorList, &
+      factorIndexList=factorIndexList, rc=rc)
+
+ +

+

+      
+    deallocate(factorList)
+    deallocate(factorIndexList)
+  else
+    ! PETs 2 and 3 do not provide factors
+    
+    call ESMF_ArraySMMStore(srcArray=srcArray, dstArray=dstArray, &
+      routehandle=sparseMatMulHandle, rc=rc)
+
+ +

+

+  endif
+
+ +

+The call into the ESMF_ArraySMM() operation remains + unchanged. +

+

+  call ESMF_ArraySMM(srcArray=srcArray, dstArray=dstArray, &
+    routehandle=sparseMatMulHandle, rc=rc)
+
+ +

+This operation will initialize the entire dstArray to 0.0 and then + update two elements: + +

+

+   on DE 1:
+   dstArray[4](2) = 0.5 * srcArray(0,0)[1]  +  0.5 * srcArray(0,2)[2],
+
+ +

+and + +

+

+   on DE 3:
+   dstArray[2](1) = 0.2 * srcArray(0,1)[1]  +  0.8 * srcArray(1,3)[1],
+
+ +

+Here indices in $()$ refer to distributed dimensions while indices in $[]$ + correspond to undistributed dimensions. + + +

+ +

+ +

+ +

+ +
+28.2.19 Communication - Scatter and Gather, revisited +

+ +

+The ESMF_ArrayScatter() and ESMF_ArrayGather() calls, + introduced in section 28.2.14, provide a convenient + way of communicating data between a Fortran array and all of the DEs of + a single Array tile. A key requirement of ESMF_ArrayScatter() + and ESMF_ArrayGather() is that the shape of the Fortran array + and the Array tile must match. This means that the dimCount must be + equal, and that the size of each dimension must match. Element reordering + during scatter and gather is only supported on a per dimension level, + based on the decompflag option available during DistGrid creation. + +

+While the ESMF_ArrayScatter() and ESMF_ArrayGather() methods + cover a broad, and important spectrum of cases, there are situations that + require a different set of rules to scatter and gather data between a + Fortran array and an ESMF Array object. For instance, it is often convenient + to create an Array on a DistGrid that was created with arbitrary, + user-supplied sequence indices. See section 36.3.5 + for more background on DistGrids with arbitrary sequence indices. +

+

+  allocate(arbSeqIndexList(10))   ! each PET will have 10 elements
+  
+  do i=1, 10
+    arbSeqIndexList(i) = (i-1)*petCount + localPet+1 ! initialize unique 
+                                                     ! seq. indices
+  enddo
+  
+  distgrid = ESMF_DistGridCreate(arbSeqIndexList=arbSeqIndexList, rc=rc)
+
+ +

+

+  deallocate(arbSeqIndexList)
+  
+  call ESMF_ArraySpecSet(arrayspec, typekind=ESMF_TYPEKIND_I4, rank=1, rc=rc)
+
+ +

+

+  array = ESMF_ArrayCreate(arrayspec=arrayspec, distgrid=distgrid, rc=rc)
+
+ +

+This array object holds 10 elements on each DE, and there is one DE + per PET, for a total element count of 10 x petCount. The + arbSeqIndexList, used during DistGrid creation, was constructed cyclic + across all DEs. DE 0, for example, on a 4 PET run, would hold sequence + indices 1, 5, 9, ... . DE 1 would hold 2, 6, 10, ..., and so on. + +

+The usefulness of the user-specified arbitrary sequence indices becomes + clear when they are interpreted as global element ids. The ArrayRedist() + and ArraySMM() communication methods are based on sequence index mapping + between source and destination Arrays. Other than providing a canonical + sequence index order via the default sequence scheme, outlined in + 28.2.18, ESMF does not place any restrictions on the + sequence indices. Objects that were not created with user supplied + sequence indices default to the ESMF sequence index order. + +

+A common, and useful interpretation of the arbitrary sequence indices, + specified during DistGrid creation, is that of relating them to the + canonical ESMF sequence index order of another data object. Within this + interpretation the array object created above could be viewed as an + arbitrary distribution of a (petCount x 10) 2D array. + +

+

+  if (localPet == 0) then
+    allocate(farray(petCount,10)) ! allocate 2D Fortran array petCount x 10
+    do j=1, 10
+      do i=1, petCount
+        farray(i,j) = 100 + (j-1)*petCount + i    ! initialize to something
+      enddo
+    enddo
+  else
+    allocate(farray(0,0)) ! must allocate an array of size 0 on all other PETs
+  endif
+
+ +

+For a 4 PET run, farray on PET 0 now holds the following data. +

+     -----1----2----3------------10-----> j
+     |
+     1   101, 105, 109, ....  , 137
+     |
+     2   102, 106, 110, ....  , 138
+     |
+     3   103, 107, 111, ....  , 139
+     |
+     4   104, 108, 112, ....  , 140
+     |
+     |
+     v
+    i
+
+ +

+On all other PETs farray has a zero size allocation. + +

+Following the sequence index interpretation from above, scattering the data + contained in farray on PET 0 across the array object created + further up, seems like a well defined operation. Looking at it a bit closer, + it becomes clear that it is in fact more of a redistribution than a simple + scatter operation. The general rule for such a "redist-scatter" operation, + of a Fortran array, located on a single PET, into an ESMF Array, is to + use the canonical ESMF sequence index scheme to label the elements of the + Fortran array, and to send the data to the Array element with the same + sequence index. + +

+The just described "redist-scatter" operation is much more general than + the standard ESMF_ArrayScatter() method. It does not require shape + matching, and supports full element reordering based on the sequence indices. + Before farray can be scattered across array in the described way, + it must be wrapped into an ESMF Array object itself, essentially labeling the + array elements according to the canonical sequence index scheme. + +

+

+  distgridAux = ESMF_DistGridCreate(minIndex=(/1,1/), &
+    maxIndex=(/petCount,10/), &
+    regDecomp=(/1,1/), rc=rc) ! DistGrid with only 1 DE
+
+ +

+The first step is to create a DistGrid object with only a single DE. This + DE must be located on the PET on which the Fortran data array resides. + In this example farray holds data on PET 0, which is where the default + DELayout will place the single DE defined in the DistGrid. If the farray + was setup on a different PET, an explicit DELayout would need to be created + first, mapping the only DE to the PET on which the data is defined. + +

+Next the Array wrapper object can be created from the farray and the + just created DistGrid object. +

+

+  arrayAux = ESMF_ArrayCreate(farray=farray, distgrid=distgridAux, &
+    indexflag=ESMF_INDEX_DELOCAL, rc=rc)
+
+ +

+At this point all of the pieces are in place to use ESMF_ArrayRedist() + to do the "redist-scatter" operation. The typical store/execute/release + pattern must be followed. +

+

+  call ESMF_ArrayRedistStore(srcArray=arrayAux, dstArray=array, &
+    routehandle=scatterHandle, rc=rc)
+
+ +

+

+  call ESMF_ArrayRedist(srcArray=arrayAux, dstArray=array, &
+    routehandle=scatterHandle, rc=rc)
+
+ +

+In this example, after ESMF_ArrayRedist() was called, the content + of array on a 4 PET run would look like this: +

+    PET 0:   101, 105, 109, ....  , 137
+    PET 1:   102, 106, 110, ....  , 138
+    PET 2:   103, 107, 111, ....  , 139
+    PET 3:   104, 108, 112, ....  , 140
+
+ +

+Once set up, scatterHandle can be used repeatedly to scatter data + from farray on PET 0 to all the DEs of array. All of the + resources should be released once scatterHandle is no longer needed. +

+

+  call ESMF_ArrayRedistRelease(routehandle=scatterHandle, rc=rc)
+
+ +

+The opposite operation, i.e. gathering of the array data + into farray on PET 0, follows a very similar setup. In fact, the + arrayAux object already constructed for the scatter direction, can + directly be re-used. The only thing that is different for the "redist-gather", + are the srcArray and dstArray argument assignments, reflecting + the opposite direction of data movement. +

+

+  call ESMF_ArrayRedistStore(srcArray=array, dstArray=arrayAux, &
+    routehandle=gatherHandle, rc=rc)
+
+ +

+

+  call ESMF_ArrayRedist(srcArray=array, dstArray=arrayAux, &
+    routehandle=gatherHandle, rc=rc)
+
+ +

+Just as for the scatter case, the gatherHandle can be used repeatedly + to gather data from array into farray on PET 0. All of the + resources should be released once gatherHandle is no longer needed. +

+

+  call ESMF_ArrayRedistRelease(routehandle=gatherHandle, rc=rc)
+
+ +

+Finally the wrapper Array arrayAux and the associated DistGrid object + can also be destroyed. +

+

+  call ESMF_ArrayDestroy(arrayAux, rc=rc)
+
+ +

+

+  call ESMF_DistGridDestroy(distgridAux, rc=rc)
+
+ +

+Further, the primary data objects of this example must be deallocated + and destroyed. +

+

+  deallocate(farray)
+  
+  call ESMF_ArrayDestroy(array, rc=rc)
+
+ +

+

+  call ESMF_DistGridDestroy(distgrid, rc=rc)
+
+ +

+ + +

+ +

+ +

+ +

+ +
+28.2.20 Non-blocking Communications +

+ +

+All ESMF_RouteHandle based communication methods, like + ESMF_ArrayRedist(), ESMF_ArrayHalo() and ESMF_ArraySMM(), + can be executed in blocking or non-blocking mode. The non-blocking feature is + useful, for example, to overlap computation with communication, or to + implement a more loosely synchronized inter-Component interaction scheme than + is possible with the blocking communication mode. + +

+Access to the non-blocking execution mode is provided uniformly across all + RouteHandle based communication calls. Every such call contains the optional + routesyncflag argument of type ESMF_RouteSync_Flag. Section + 54.53 lists all of the valid settings for this flag. + +

+It is an execution time decision to select whether to invoke a precomputed + communication pattern, stored in a RouteHandle, in the blocking or + non-blocking mode. Neither requires specifically precomputed RouteHandles + - i.e. a RouteHandle is neither specifically blocking nor specifically + non-blocking. +

+

+  call ESMF_ArrayRedistStore(srcArray=srcArray, dstArray=dstArray, &
+    routehandle=routehandle, rc=rc)
+
+ +

+The returned RouteHandle routehandle can be used in blocking or + non-blocking execution calls. The application is free to switch between + both modes for the same RouteHandle. + +

+By default routesyncflag is set to ESMF_ROUTESYNC_BLOCKING in all of the + RouteHandle execution methods, and the behavior is that of the VM-wide + collective communication calls described in the previous sections. In the + blocking mode the user must assume that the communication call will not + return until all PETs have exchanged the precomputed information. On the + other hand, the user has no guarantee about the exact synchronization + behavior, and it is unsafe to make specific assumptions. What is guaranteed + in the blocking communication mode is that when the call returns on the + local PET, all data exchanges associated with all local DEs have finished. + This means that all in-bound data elements are valid and that all out-bound + data elements can safely be overwritten by the user. +

+

+  call ESMF_ArrayRedist(srcArray=srcArray, dstArray=dstArray, &
+    routehandle=routehandle, routesyncflag=ESMF_ROUTESYNC_BLOCKING, rc=rc)
+
+ +

+The same exchange pattern, that is encoded in routehandle, can be + executed in non-blocking mode, simply by setting the appropriate + routesyncflag when calling into ESMF_ArrayRedist(). + +

+At first sight there are obvious similarities between the non-blocking + RouteHandle based execution paradigm and the non-blocking message passing + calls provided by MPI. However, there are significant differences in + the behavior of the non-blocking point-to-point calls that MPI defines and + the non-blocking mode of the collective exchange patterns described by ESMF + RouteHandles. + +

+Setting routesyncflag to ESMF_ROUTESYNC_NBSTART in any RouteHandle + execution call returns immediately after all out-bound data has been moved + into ESMF internal transfer buffers and the exchange has been initiated. +

+

+  call ESMF_ArrayRedist(srcArray=srcArray, dstArray=dstArray, &
+    routehandle=routehandle, routesyncflag=ESMF_ROUTESYNC_NBSTART, rc=rc)
+
+ +

+Once a call with routesyncflag = ESMF_ROUTESYNC_NBSTART returns, it is safe + to modify the out-bound data elements in the srcArray object. However, + no guarantees are made for the in-bound data elements in dstArray at + this phase of the non-blocking execution. It is unsafe to access these + elements until the exchange has finished locally. + +

+One way to ensure that the exchange has finished locally is to call + with routesyncflag set to ESMF_ROUTESYNC_NBWAITFINISH. + +

+

+  call ESMF_ArrayRedist(srcArray=srcArray, dstArray=dstArray, &
+    routehandle=routehandle, routesyncflag=ESMF_ROUTESYNC_NBWAITFINISH, rc=rc)
+
+ +

+Calling with routesyncflag = ESMF_ROUTESYNC_NBWAITFINISH instructs the + communication method to wait and block until the previously started + exchange has finished, and has been processed locally according to + the RouteHandle. Once the call returns, it is safe to access both in-bound + and out-bound data elements in dstArray and srcArray, + respectively. + +

+Some situations require more flexibility than is provided by the + ESMF_ROUTESYNC_NBSTART - ESMF_ROUTESYNC_NBWAITFINISH pair. For + instance, a Component that needs to interact with several other Components, + virtually simultaneously, would initiated several different exchanges with + ESMF_ROUTESYNC_NBSTART. Calling with ESMF_ROUTESYNC_NBWAITFINISH for + any of the outstanding exchanges may potentially block for a long time, + lowering the throughput. In the worst case a dead lock situation may arise. + Calling with routesyncflag = ESMF_ROUTESYNC_NBTESTFINISH addresses this problem. + +

+

+  call ESMF_ArrayRedist(srcArray=srcArray, dstArray=dstArray, &
+    routehandle=routehandle, routesyncflag=ESMF_ROUTESYNC_NBTESTFINISH, &
+    finishedflag=finishflag, rc=rc)
+
+ +

+This call tests the locally outstanding data transfer operation in + routehandle, and finishes the exchange as much as currently possible. + It does not block until the entire exchange has finished locally, instead + it returns immediately after one round of testing has been + completed. The optional return argument finishedflag is set to + .true. if the exchange is completely finished locally, and set to + .false. otherwise. + +

+The user code must decide, depending on the value of the returned + finishedflag, whether additional calls are required to finish an + outstanding non-blocking exchange. If so, it can be done by + calling ESMF_ArrayRedist() repeatedly with + ESMF_ROUTESYNC_NBTESTFINISH until + finishedflag comes back with a value of .true.. Such a loop + allows other pieces of user code to be executed between the calls. + A call with ESMF_ROUTESYNC_NBWAITFINISH can alternatively be used to + block until the exchange has locally finished. + +

+Noteworthy property. + It is allowable to invoke a RouteHandle based communication call + with routesyncflag set to + ESMF_ROUTESYNC_NBTESTFINISH or + ESMF_ROUTESYNC_NBWAITFINISH on a specific RouteHandle without there + being an outstanding non-blocking exchange. As a matter of fact, it is not + required that there was ever a call made with ESMF_ROUTESYNC_NBSTART for + the RouteHandle. In these cases the calls made with + ESMF_ROUTESYNC_NBTESTFINISH or ESMF_ROUTESYNC_NBWAITFINISH will + simply return immediately (with finishedflag set to .true.). + +

+Noteworthy property. + It is fine to mix blocking and non-blocking invocations of the same + RouteHandle based communication call across the PETs. This means that it is + fine for some PETs to issue the call with ESMF_ROUTESYNC_BLOCKING + (or using the default), while other PETs call the same communication call + with ESMF_ROUTESYNC_NBSTART. + +

+Noteworthy restriction. + A RouteHandle that is currently involved in an outstanding non-blocking + exchange may not be used to start any further exchanges, neither + blocking nor non-blocking. This restriction is independent of whether the + newly started RouteHandle based exchange is made for the same or for + different data objects. + +

+ + +

+28.3 Restrictions and Future Work +

+ +

+ + + +

    +
  • CAUTION: Depending on the specific ESMF_ArrayCreate() entry point used during Array creation, certain Fortran operations are not supported on the Fortran array pointer farrayPtr, returned by ESMF_ArrayGet(). Only if the ESMF_ArrayCreate() from pointer variant was used, will the returned farrayPtr variable contain the original bounds information, and be suitable for the Fortran deallocate() call. This limitation is a direct consequence of the Fortran 95 standard relating to the passing of array arguments. Fortran array pointers returned from an Array that was created through the assumed shape array variant of ESMF_ArrayCreate() will have bounds that are consistent with the other arguments specified during Array creation. These pointers are not suitable for deallocation in accordance to the Fortran 95 standard. + +

    +

  • +
  • 1D limit: ArrayHalo(), ArrayRedist() and ArraySMM() operations on Arrays created on DistGrids with arbitrary sequence indices are currently limited to 1D arbitrary DistGrids. There is no restriction on the number, size +and mapping of undistributed Array dimensions in the presence of such a 1D +arbitrary DistGrid. + +

    +

  • +
+ +

+28.4 Design and Implementation Notes +

+ +

+The Array class is part of the ESMF index space layer and is built on top of the DistGrid and DELayout classes. The DELayout class introduces the notion of +decomposition elements (DEs) and their layout across the available PETs. The DistGrid describes how index space is decomposed by assigning logically rectangular index space pieces or DE-local tiles to the DEs. The Array finally associates a local memory allocation with each local DE. + +

+The following is a list of implementation specific details about the current ESMF Array. + +

+ +

    +
  • Implementation language is C++. +
  • +
  • Local memory allocations are internally held in ESMF_LocalArray +objects. +
  • +
  • All precomputed communication methods are based on sparse matrix +multiplication. +
  • +
+ +

+28.5 Class API +

+ +

+ +

+ +

+ +

+28.5.1 ESMF_ArrayAssignment(=) - Array assignment +

+ +

+ +

+
+INTERFACE: +

   interface assignment(=)
+   array1 = array2
+
ARGUMENTS: +
   type(ESMF_Array) :: array1
+   type(ESMF_Array) :: array2
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Assign array1 as an alias to the same ESMF Array object in memory + as array2. If array2 is invalid, then array1 will be equally invalid after + the assignment. + +

+The arguments are: +

+
array1
+
The ESMF_Array object on the left hand side of the assignment. + +
+
array2
+
The ESMF_Array object on the right hand side of the assignment. + +
+
+ +

+ +

+ +

+28.5.2 ESMF_ArrayOperator(==) - Array equality operator +

+ +

+ +

+
+INTERFACE: +

   interface operator(==)
+   if (array1 == array2) then ... endif
+   OR
+   result = (array1 == array2)
+
RETURN VALUE: +
   logical :: result
+
ARGUMENTS: +
   type(ESMF_Array), intent(in) :: array1
+   type(ESMF_Array), intent(in) :: array2
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Test whether array1 and array2 are valid aliases to the same ESMF + Array object in memory. For a more general comparison of two ESMF Arrays, + going beyond the simple alias test, the ESMF_ArrayMatch() function (not yet + implemented) must be used. + +

+The arguments are: +

+
array1
+
The ESMF_Array object on the left hand side of the equality + operation. + +
+
array2
+
The ESMF_Array object on the right hand side of the equality + operation. + +
+
+ +

+ +

+ +

+28.5.3 ESMF_ArrayOperator(/=) - Array not equal operator +

+ +

+ +

+
+INTERFACE: +

   interface operator(/=)
+   if (array1 /= array2) then ... endif
+   OR
+   result = (array1 /= array2)
+
RETURN VALUE: +
   logical :: result
+
ARGUMENTS: +
   type(ESMF_Array), intent(in) :: array1
+   type(ESMF_Array), intent(in) :: array2
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Test whether array1 and array2 are not valid aliases to the + same ESMF Array object in memory. For a more general comparison of two ESMF + Arrays, going beyond the simple alias test, the ESMF_ArrayMatch() function + (not yet implemented) must be used. + +

+The arguments are: +

+
array1
+
The ESMF_Array object on the left hand side of the non-equality + operation. + +
+
array2
+
The ESMF_Array object on the right hand side of the non-equality + operation. + +
+
+ +

+ +

+ +

+28.5.4 ESMF_ArrayCopy - Copy data from one Array object to another +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_ArrayCopy(arrayOut, arrayIn, rc)
+
ARGUMENTS: +
        type(ESMF_Array), intent(inout) :: arrayOut
+        type(ESMF_Array), intent(in) :: arrayIn
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+        integer, intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Copy data from one ESMF_Array object to another. + +

+The arguments are: +

+
arrayOut
+
ESMF_Array object into which to copy the data. The incoming + arrayOut must already references a matching memory allocation. + +
+
arrayIn
+
ESMF_Array object that holds the data to be copied. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+28.5.5 ESMF_ArrayCreate - Create Array object from Fortran array pointer +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_ArrayCreate() 
+   function ESMF_ArrayCreateFrmPtr<rank><type><kind>(distgrid, farrayPtr, & 
+   datacopyflag, distgridToArrayMap, computationalEdgeLWidth, & 
+   computationalEdgeUWidth, computationalLWidth, & 
+   computationalUWidth, totalLWidth, & 
+   totalUWidth, name, rc)
+
RETURN VALUE: +
   type(ESMF_Array) :: ESMF_ArrayCreateDataPtr<rank><type><kind>
+
ARGUMENTS: +
   type(ESMF_DistGrid), intent(in) :: distgrid 
+   <type> (ESMF_KIND_<kind>), pointer :: farrayPtr(<rank>) 
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+   type(ESMF_DataCopy_Flag), intent(in), optional :: datacopyflag 
+   integer, intent(in), optional :: distgridToArrayMap(:) 
+   integer, intent(in), optional :: computationalEdgeLWidth(:) 
+   integer, intent(in), optional :: computationalEdgeUWidth(:) 
+   integer, intent(in), optional :: computationalLWidth(:) 
+   integer, intent(in), optional :: computationalUWidth(:) 
+   integer, intent(in), optional :: totalLWidth(:) 
+   integer, intent(in), optional :: totalUWidth(:) 
+   character (len=*), intent(in), optional :: name 
+   integer, intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Create an ESMF_Array object from existing local native Fortran + arrays with pointer attribute. The decomposition and distribution is + specified by the distgrid argument. Each PET must issue this call + with identical arguments in order to create a consistent Array object. + The only exception is the farrayPtr argument which will be different + on each PET. The bounds of the local arrays are preserved by this call and + determine the bounds of the total region of the + resulting Array object. Bounds of the DE-local exclusive regions are set + to be consistent with the total regions and the specified distgrid + argument. Bounds for Array dimensions that are not distributed are + automatically set to the bounds provided by farrayPtr. + +

+This interface requires a 1 DE per PET decomposition. The Array object will + not be created and an error will be returned if this condition is not met. + +

+The not distributed Array dimensions form a tensor of rank = array.rank - + distgrid.dimCount. The widths of the computational region are set to + the provided value, or zero by default, for all tensor elements. Use + ESMF_ArraySet() to change these default settings after the + Array object has been created. + +

+The return value is the newly created ESMF_Array object. + +

+The arguments are: +

+
distgrid
+
ESMF_DistGrid object that describes how the array is decomposed and + distributed over DEs. The dimCount of distgrid must be smaller or equal + to the rank of farrayPtr. + +
+
farrayPtr
+
Valid native Fortran array with pointer attribute. Memory must be + associated with the actual argument. The type/kind/rank information of + farrayPtr will be used to set Array's properties + accordingly. The shape of farrayPtr will be checked against the + information contained in the distgrid. The bounds of + farrayPtr will be preserved by this call and the bounds of the + resulting Array object are set accordingly. + +
+
[datacopyflag]
+
Specifies whether the Array object will reference the memory allocation + provided by farrayPtr directly or will copy the data from + farrayPtr into a new memory allocation. For valid values see + 54.13. The default is ESMF_DATACOPY_REFERENCE. + Note that the ESMF_DATACOPY_REFERENCE option may not be safe + when providing an array slice in farrayPtr. + +
+
[distgridToArrayMap]
+
List that contains as many elements as is indicated by + distgrids's dimCount. The list elements map each dimension of + the DistGrid object to a dimension in farrayPtr by specifying the + appropriate Array dimension index. The default is to map all of + distgrid's dimensions against the lower dimensions of the + farrayPtr argument in sequence, i.e. distgridToArrayMap = + (/1, 2, .../). + Unmapped farrayPtr dimensions are not decomposed dimensions and + form a tensor of rank = Array.rank - DistGrid.dimCount. + All distgridToArrayMap entries must be greater than or equal + to zero and smaller than or equal to the Array rank. It is erroneous + to specify the same entry multiple times unless it is zero. + If the Array rank is less than the DistGrid dimCount then the default + distgridToArrayMap will contain zeros for the dimCount - rank + rightmost entries. A zero entry in the distgridToArrayMap + indicates that the particular DistGrid dimension will be replicating + the Array across the DEs along this direction. + +
+
[computationalEdgeLWidth]
+
This vector argument must have dimCount elements, where dimCount is + specified in distgrid. It specifies the lower corner of the computational + region with respect to the lower corner of the exclusive region for DEs + that are located on the edge of a tile. + The default is a zero vector. + +
+
[computationalEdgeUWidth]
+
This vector argument must have dimCount elements, where dimCount is + specified in distgrid. It specifies the upper corner of the computational + region with respect to the upper corner of the exclusive region for DEs + that are located on the edge of a tile. + The default is a zero vector. + +
+
[computationalLWidth]
+
This vector argument must have dimCount elements, where dimCount is + specified in distgrid. It specifies the lower corner of the computational + region with respect to the lower corner of the exclusive region. + The default is a zero vector. + +
+
[computationalUWidth]
+
This vector argument must have dimCount elements, where dimCount is + specified in distgrid. It specifies the upper corner of the computational + region with respect to the upper corner of the exclusive region. + The default is a zero vector. + +
+
[totalLWidth]
+
This vector argument must have dimCount elements, where dimCount is + specified in distgrid. It specifies the lower corner of the total memory + region with respect to the lower corner of the exclusive region. + The default is to accommodate the union of exclusive and computational + region exactly. + +
+
[totalUWidth]
+
This vector argument must have dimCount elements, where dimCount is + specified in distgrid. It specifies the upper corner of the total memory + region with respect to the upper corner of the exclusive region. + The default is a vector that contains the remaining number of elements + in each direction as to fit the union of exclusive and computational + region into the memory region provided by the farrayPtr argument. + +
+
[name]
+
Name of the Array object. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+28.5.6 ESMF_ArrayCreate - Create Array object from Fortran array pointer w/ arbitrary seqIndices for halo +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_ArrayCreate() 
+   function ESMF_ArrayCreateFrmPtrArb<indexkind><rank><type><kind>(distgrid, & 
+   farrayPtr, haloSeqIndexList, datacopyflag, & 
+   distgridToArrayMap, name, rc)
+
RETURN VALUE: +
   type(ESMF_Array) :: ESMF_ArrayCreateDataPtrArb<rank><type><kind>
+
ARGUMENTS: +
   type(ESMF_DistGrid), intent(in) :: distgrid 
+   <type> (ESMF_KIND_<kind>), pointer :: farrayPtr(<rank>) 
+   integer(ESMF_KIND_<indexkind>), intent(in) :: haloSeqIndexList(:) 
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+   type(ESMF_DataCopy_Flag), intent(in), optional :: datacopyflag 
+   integer, intent(in), optional :: distgridToArrayMap(:) 
+   character (len=*), intent(in), optional :: name 
+   integer, intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Create an ESMF_Array object from existing local native Fortran + arrays with pointer attribute, according to distgrid. Besides + farrayPtr each PET must issue this call with identical arguments in + order to create a consistent Array object. The bounds of the local arrays + are preserved by this call and determine the bounds of the total region of + the resulting Array object. Bounds of the DE-local exclusive regions are + set to be consistent with the total regions and the specified distgrid + argument. Bounds for Array dimensions that are not distributed are + automatically set to the bounds provided by farrayPtr. + +

+This interface requires a 1 DE per PET decomposition. The Array object will + not be created and an error will be returned if this condition is not met. + +

+The not distributed Array dimensions form a tensor of rank = array.rank - + distgrid.dimCount. The widths of the computational region are set to + the provided value, or zero by default, for all tensor elements. Use + ESMF_ArraySet() to change these default settings after the + Array object has been created. + +

+The return value is the newly created ESMF_Array object. + +

+The arguments are: +

+
distgrid
+
ESMF_DistGrid object that describes how the array is decomposed and + distributed over DEs. The dimCount of distgrid must be smaller or equal + to the rank of farrayPtr. + +
+
farrayPtr
+
Valid native Fortran array with pointer attribute. Memory must be + associated with the actual argument. The type/kind/rank information of + farrayPtr will be used to set Array's properties + accordingly. The shape of farrayPtr will be checked against the + information contained in the distgrid. The bounds of + farrayPtr will be preserved by this call and the bounds of the + resulting Array object are set accordingly. + +
+
haloSeqIndexList
+
One dimensional array containing sequence indices of local halo region. + The size (and content) of haloSeqIndexList can (and typically will) + be different on each PET. + The haloSeqIndexList argument is of integer type, but can be of + different kind in order to support both 32-bit (ESMF_KIND_I4) + and 64-bit (ESMF_KIND_I8) indexing. + +
+
[datacopyflag]
+
Specifies whether the Array object will reference the memory allocation + provided by farrayPtr directly or will copy the data from + farrayPtr into a new memory allocation. For valid values see + 54.13. The default is ESMF_DATACOPY_REFERENCE. + Note that the ESMF_DATACOPY_REFERENCE option may not be safe + when providing an array slice in farrayPtr. + +
+
[distgridToArrayMap]
+
List that contains as many elements as is indicated by + distgrids's dimCount. The list elements map each dimension of + the DistGrid object to a dimension in farrayPtr by specifying the + appropriate Array dimension index. The default is to map all of + distgrid's dimensions against the lower dimensions of the + farrayPtr argument in sequence, i.e. distgridToArrayMap = + (/1, 2, .../). + Unmapped farrayPtr dimensions are not decomposed dimensions and + form a tensor of rank = Array.rank - DistGrid.dimCount. + All distgridToArrayMap entries must be greater than or equal + to zero and smaller than or equal to the Array rank. It is erroneous + to specify the same entry multiple times unless it is zero. + If the Array rank is less than the DistGrid dimCount then the default + distgridToArrayMap will contain zeros for the dimCount - rank + rightmost entries. A zero entry in the distgridToArrayMap + indicates that the particular DistGrid dimension will be replicating + the Array across the DEs along this direction. + +
+
[name]
+
Name of the Array object. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+28.5.7 ESMF_ArrayCreate - Create Array object from Fortran array +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_ArrayCreate() 
+   function ESMF_ArrayCreateAsmdSp<rank><type><kind>(distgrid, farray, & 
+   indexflag, datacopyflag, distgridToArrayMap, & 
+   computationalEdgeLWidth, computationalEdgeUWidth, computationalLWidth, & 
+   computationalUWidth, totalLWidth, & 
+   totalUWidth, undistLBound, undistUBound, name, rc)
+
RETURN VALUE: +
   type(ESMF_Array) :: ESMF_ArrayCreateDataAssmdShape<rank><type><kind>
+
ARGUMENTS: +
   type(ESMF_DistGrid), intent(in) :: distgrid 
+   <type> (ESMF_KIND_<kind>), intent(in), target :: farray(<rank>) 
+   type(ESMF_Index_Flag), intent(in) :: indexflag 
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+   type(ESMF_DataCopy_Flag), intent(in), optional :: datacopyflag 
+   integer, intent(in), optional :: distgridToArrayMap(:) 
+   integer, intent(in), optional :: computationalEdgeLWidth(:) 
+   integer, intent(in), optional :: computationalEdgeUWidth(:) 
+   integer, intent(in), optional :: computationalLWidth(:) 
+   integer, intent(in), optional :: computationalUWidth(:) 
+   integer, intent(in), optional :: totalLWidth(:) 
+   integer, intent(in), optional :: totalUWidth(:) 
+   integer, intent(in), optional :: undistLBound(:) 
+   integer, intent(in), optional :: undistUBound(:) 
+   character (len=*), intent(in), optional :: name 
+   integer, intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Create an ESMF_Array object from an existing local native Fortran + array. The decomposition and distribution is + specified by the distgrid argument. Each PET must issue this call + with identical arguments in order to create a consistent Array object. + The only exception is the farray argument which will be different + on each PET. The local arrays provided must be dimensioned according to + the DE-local total region. Bounds of the exclusive regions are set as + specified in the distgrid argument. Bounds for Array dimensions + that are not distributed can be chosen freely using the + undistLBound and undistUBound arguments. + +

+This interface requires a 1 DE per PET decomposition. The Array object will + not be created and an error will be returned if this condition is not met. + +

+The not distributed Array dimensions form a tensor of rank = array.rank - + distgrid.dimCount. The widths of the computational region are set to + the provided value, or zero by default, for all tensor elements. Use + ESMF_ArraySet() to change these default settings after the + Array object has been created. + +

+The return value is the newly created ESMF_Array object. + +

+The arguments are: +

+
distgrid
+
ESMF_DistGrid object that describes how the array is decomposed and + distributed over DEs. The dimCount of distgrid must be smaller or equal + to the rank of farray. + +
+
farray
+
Valid native Fortran array, i.e. memory must be associated with the + actual argument. The type/kind/rank information of farray will be + used to set Array's properties accordingly. The shape of + farray will be checked against the information contained in the + distgrid. + +
+
indexflag
+
Indicate how DE-local indices are defined. See section + 54.29 for a list of valid indexflag options. + +
+
[datacopyflag]
+
Specifies whether the Array object will reference the memory allocation + provided by farray directly or will copy the data from + farray into a new memory allocation. For valid values see + 54.13. The default is ESMF_DATACOPY_REFERENCE. + Note that the ESMF_DATACOPY_REFERENCE option may not be safe + when providing an array slice in farray. + +
+
[distgridToArrayMap]
+
List that contains as many elements as is indicated by + distgrids's dimCount. The list elements map each dimension of + the DistGrid object to a dimension in farray by specifying the + appropriate Array dimension index. The default is to map all of + distgrid's dimensions against the lower dimensions of the + farray argument in sequence, i.e. distgridToArrayMap = + (/1, 2, .../). + Unmapped farray dimensions are not decomposed dimensions and + form a tensor of rank = Array.rank - DistGrid.dimCount. + All distgridToArrayMap entries must be greater than or equal + to zero and smaller than or equal to the Array rank. It is erroneous + to specify the same entry multiple times unless it is zero. + If the Array rank is less than the DistGrid dimCount then the default + distgridToArrayMap will contain zeros for the dimCount - rank + rightmost entries. A zero entry in the distgridToArrayMap + indicates that the particular DistGrid dimension will be replicating + the Array across the DEs along this direction. + +
+
[computationalEdgeLWidth]
+
This vector argument must have dimCount elements, where dimCount is + specified in distgrid. It specifies the lower corner of the computational + region with respect to the lower corner of the exclusive region for DEs + that are located on the edge of a tile. + The default is a zero vector. + +
+
[computationalEdgeUWidth]
+
This vector argument must have dimCount elements, where dimCount is + specified in distgrid. It specifies the upper corner of the computational + region with respect to the upper corner of the exclusive region for DEs + that are located on the edge of a tile. + The default is a zero vector. + +
+
[computationalLWidth]
+
This vector argument must have dimCount elements, where dimCount is + specified in distgrid. It specifies the lower corner of the computational + region with respect to the lower corner of the exclusive region. + The default is a zero vector. + +
+
[computationalUWidth]
+
This vector argument must have dimCount elements, where dimCount is + specified in distgrid. It specifies the upper corner of the computational + region with respect to the upper corner of the exclusive region. + The default is a zero vector. + +
+
[totalLWidth]
+
This vector argument must have dimCount elements, where dimCount is + specified in distgrid. It specifies the lower corner of the total memory + region with respect to the lower corner of the exclusive region. + The default is to accommodate the union of exclusive and computational + region exactly. + +
+
[totalUWidth]
+
This vector argument must have dimCount elements, where dimCount is + specified in distgrid. It specifies the upper corner of the total memory + region with respect to the upper corner of the exclusive region. + The default is a vector that contains the remaining number of elements + in each direction as to fit the union of exclusive and computational + region into the memory region provided by the farray argument. + +
+
[undistLBound]
+
Lower bounds for the array dimensions that are not distributed. + By default lbound is 1. + +
+
[undistUBound]
+
Upper bounds for the array dimensions that are not distributed. + By default ubound is equal to the extent of the corresponding + dimension in farray. + +
+
[name]
+
Name of the Array object. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+28.5.8 ESMF_ArrayCreate - Create Array object from Fortran array w/ arbitrary seqIndices for halo +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_ArrayCreate() 
+   function ESMF_ArrayCreateAsmdSpArb<indexkind><rank><type><kind>(distgrid, & 
+   farray, indexflag, haloSeqIndexList, datacopyflag, & 
+   distgridToArrayMap, computationalEdgeLWidth, computationalEdgeUWidth, & 
+   computationalLWidth, computationalUWidth, totalLWidth, totalUWidth, & 
+   undistLBound, undistUBound, name, rc)
+
RETURN VALUE: +
   type(ESMF_Array) :: ESMF_ArrayCreateDataAssmdShapeArb<rank><type><kind>
+
ARGUMENTS: +
   type(ESMF_DistGrid), intent(in) :: distgrid 
+   <type> (ESMF_KIND_<kind>), intent(in), target :: farray(<rank>) 
+   type(ESMF_Index_Flag), intent(in) :: indexflag 
+   integer(ESMF_KIND_<indexkind>), intent(in) :: haloSeqIndexList(:) 
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+   type(ESMF_DataCopy_Flag), intent(in), optional :: datacopyflag 
+   integer, intent(in), optional :: distgridToArrayMap(:) 
+   integer, intent(in), optional :: computationalEdgeLWidth(:) 
+   integer, intent(in), optional :: computationalEdgeUWidth(:) 
+   integer, intent(in), optional :: computationalLWidth(:) 
+   integer, intent(in), optional :: computationalUWidth(:) 
+   integer, intent(in), optional :: totalLWidth(:) 
+   integer, intent(in), optional :: totalUWidth(:) 
+   integer, intent(in), optional :: undistLBound(:) 
+   integer, intent(in), optional :: undistUBound(:) 
+   character (len=*), intent(in), optional :: name 
+   integer, intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Create an ESMF_Array object from an existing local native Fortran + array. The decomposition and distribution is + specified by the distgrid argument. Each PET must issue this call + with identical arguments in order to create a consistent Array object. + The only exception is the farray argument which will be different + on each PET. The local arrays provided must be dimensioned according to + the DE-local total region. Bounds of the exclusive regions are set as + specified in the distgrid argument. Bounds for Array dimensions + that are not distributed can be chosen freely using the + undistLBound and undistUBound arguments. + +

+This interface requires a 1 DE per PET decomposition. The Array object will + not be created and an error will be returned if this condition is not met. + +

+The not distributed Array dimensions form a tensor of rank = array.rank - + distgrid.dimCount. The widths of the computational region are set to + the provided value, or zero by default, for all tensor elements. Use + ESMF_ArraySet() to change these default settings after the + Array object has been created. + +

+The return value is the newly created ESMF_Array object. + +

+The arguments are: +

+
distgrid
+
ESMF_DistGrid object that describes how the array is decomposed and + distributed over DEs. The dimCount of distgrid must be smaller or equal + to the rank of farray. + +
+
farray
+
Valid native Fortran array, i.e. memory must be associated with the + actual argument. The type/kind/rank information of farray will be + used to set Array's properties accordingly. The shape of + farray will be checked against the information contained in the + distgrid. + +
+
indexflag
+
Indicate how DE-local indices are defined. See section + 54.29 for a list of valid indexflag options. + +
+
haloSeqIndexList
+
One dimensional array containing sequence indices of local halo region. + The size (and content) of haloSeqIndexList can (and typically will) + be different on each PET. + The haloSeqIndexList argument is of integer type, but can be of + different kind in order to support both 32-bit (ESMF_KIND_I4) + and 64-bit (ESMF_KIND_I8) indexing. + +
+
[datacopyflag]
+
Specifies whether the Array object will reference the memory allocation + provided by farray directly or will copy the data from + farray into a new memory allocation. For valid values see + 54.13. The default is ESMF_DATACOPY_REFERENCE. + Note that the ESMF_DATACOPY_REFERENCE option may not be safe + when providing an array slice in farray. + +
+
[distgridToArrayMap]
+
List that contains as many elements as is indicated by + distgrids's dimCount. The list elements map each dimension of + the DistGrid object to a dimension in farray by specifying the + appropriate Array dimension index. The default is to map all of + distgrid's dimensions against the lower dimensions of the + farray argument in sequence, i.e. distgridToArrayMap = + (/1, 2, .../). + Unmapped farray dimensions are not decomposed dimensions and + form a tensor of rank = Array.rank - DistGrid.dimCount. + All distgridToArrayMap entries must be greater than or equal + to zero and smaller than or equal to the Array rank. It is erroneous + to specify the same entry multiple times unless it is zero. + If the Array rank is less than the DistGrid dimCount then the default + distgridToArrayMap will contain zeros for the dimCount - rank + rightmost entries. A zero entry in the distgridToArrayMap + indicates that the particular DistGrid dimension will be replicating + the Array across the DEs along this direction. + +
+
[computationalEdgeLWidth]
+
This vector argument must have dimCount elements, where dimCount is + specified in distgrid. It specifies the lower corner of the computational + region with respect to the lower corner of the exclusive region for DEs + that are located on the edge of a tile. + The default is a zero vector. + +
+
[computationalEdgeUWidth]
+
This vector argument must have dimCount elements, where dimCount is + specified in distgrid. It specifies the upper corner of the computational + region with respect to the upper corner of the exclusive region for DEs + that are located on the edge of a tile. + The default is a zero vector. + +
+
[computationalLWidth]
+
This vector argument must have dimCount elements, where dimCount is + specified in distgrid. It specifies the lower corner of the computational + region with respect to the lower corner of the exclusive region. + The default is a zero vector. + +
+
[computationalUWidth]
+
This vector argument must have dimCount elements, where dimCount is + specified in distgrid. It specifies the upper corner of the computational + region with respect to the upper corner of the exclusive region. + The default is a zero vector. + +
+
[totalLWidth]
+
This vector argument must have dimCount elements, where dimCount is + specified in distgrid. It specifies the lower corner of the total memory + region with respect to the lower corner of the exclusive region. + The default is to accommodate the union of exclusive and computational + region exactly. + +
+
[totalUWidth]
+
This vector argument must have dimCount elements, where dimCount is + specified in distgrid. It specifies the upper corner of the total memory + region with respect to the upper corner of the exclusive region. + The default is a vector that contains the remaining number of elements + in each direction as to fit the union of exclusive and computational + region into the memory region provided by the farray argument. + +
+
[undistLBound]
+
Lower bounds for the array dimensions that are not distributed. + By default lbound is 1. + +
+
[undistUBound]
+
Upper bounds for the array dimensions that are not distributed. + By default ubound is equal to the extent of the corresponding + dimension in farray. + +
+
[name]
+
Name of the Array object. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+28.5.9 ESMF_ArrayCreate - Create Array object from a list of LocalArray objects +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_ArrayCreate()
+   function ESMF_ArrayCreateLocalArray(distgrid, localarrayList, &
+     indexflag, datacopyflag, distgridToArrayMap, computationalEdgeLWidth, &
+     computationalEdgeUWidth, computationalLWidth, computationalUWidth, &
+     totalLWidth, totalUWidth, undistLBound, undistUBound, name, rc)
+
RETURN VALUE: +
     type(ESMF_Array) :: ESMF_ArrayCreateLocalArray
+
ARGUMENTS: +
        type(ESMF_DistGrid), intent(in) :: distgrid
+        type(ESMF_LocalArray), intent(in) :: localarrayList(:)
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+        type(ESMF_Index_Flag), intent(in), optional :: indexflag
+        type(ESMF_DataCopy_Flag),intent(in), optional :: datacopyflag
+        integer, intent(in), optional :: distgridToArrayMap(:)
+        integer, intent(in), optional :: computationalEdgeLWidth(:)
+        integer, intent(in), optional :: computationalEdgeUWidth(:)
+        integer, intent(in), optional :: computationalLWidth(:)
+        integer, intent(in), optional :: computationalUWidth(:)
+        integer, intent(in), optional :: totalLWidth(:)
+        integer, intent(in), optional :: totalUWidth(:)
+        integer, intent(in), optional :: undistLBound(:)
+        integer, intent(in), optional :: undistUBound(:)
+        character (len=*), intent(in), optional :: name
+        integer, intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Create an ESMF_Array object from existing ESMF_LocalArray + objects. The decomposition and distribution is + specified by the distgrid argument. Each PET must issue this call + with identical arguments in order to create a consistent Array object. + The only exception is the localarrayList argument which will be + different on each PET. The local arrays provided must be dimensioned + according to the DE-local total region. Bounds of the exclusive regions + are set as specified in the distgrid argument. Bounds for Array + dimensions that are not distributed can be chosen freely using the + undistLBound and undistUBound arguments. + +

+This interface is able to handle multiple DEs per PET. + +

+The not distributed Array dimensions form a tensor of rank = array.rank - + distgrid.dimCount. The widths of the computational region are set to + the provided value, or zero by default, for all tensor elements. Use + ESMF_ArraySet() to change these default settings after the + Array object has been created. + +

+The return value is the newly created ESMF_Array object. + +

+The arguments are: +

+
distgrid
+
ESMF_DistGrid object that describes how the array is decomposed and + distributed over DEs. The dimCount of distgrid must be smaller or equal + to the rank specified in arrayspec, otherwise a runtime ESMF error will be + raised. + +
+
localarrayList
+
List of valid ESMF_LocalArray objects, i.e. memory must be + associated with the actual arguments. The type/kind/rank information of + all localarrayList elements must be identical and will + be used to set Array's properties accordingly. The shape of each + localarrayList element will be checked against the information + contained in the distgrid. + +
+
[indexflag]
+
Indicate how DE-local indices are defined. By default, the exclusive + region of each DE is placed to start at the local index space origin, + i.e. (1, 1, ..., 1). Alternatively the DE-local index space can be + aligned with the global index space, if a global index space is well + defined by the associated DistGrid. See section 54.29 + for a list of valid indexflag options. + +
+
[datacopyflag]
+
Specifies whether the Array object will reference the memory allocation + of the arrays provided in localarrayList directly, or will copy + the actual data into new memory allocations. For valid values see + 54.13. The default is ESMF_DATACOPY_REFERENCE. + +
+
[distgridToArrayMap]
+
List that contains as many elements as is indicated by + distgrids's dimCount. The list elements map each dimension of + the DistGrid object to a dimension in the localarrayList elements + by specifying the appropriate Array dimension index. The default is + to map all of distgrid's dimensions against the lower dimensions + of the localarrayList elements in sequence, i.e. + distgridToArrayMap = (/1, 2, .../). + Unmapped dimensions in the localarrayList elements are not + decomposed dimensions and form a tensor of + rank = Array.rank - DistGrid.dimCount. + All distgridToArrayMap entries must be greater than or equal + to zero and smaller than or equal to the Array rank. It is erroneous + to specify the same entry multiple times unless it is zero. + If the Array rank is less than the DistGrid dimCount then the default + distgridToArrayMap will contain zeros for the dimCount - rank + rightmost entries. A zero entry in the distgridToArrayMap + indicates that the particular DistGrid dimension will be replicating + the Array across the DEs along this direction. + +
+
[computationalEdgeLWidth]
+
This vector argument must have dimCount elements, where dimCount is + specified in distgrid. It specifies the lower corner of the computational + region with respect to the lower corner of the exclusive region for DEs + that are located on the edge of a tile. + +
+
[computationalEdgeUWidth]
+
This vector argument must have dimCount elements, where dimCount is + specified in distgrid. It specifies the upper corner of the computational + region with respect to the upper corner of the exclusive region for DEs + that are located on the edge of a tile. + +
+
[computationalLWidth]
+
This vector argument must have dimCount elements, where dimCount is + specified in distgrid. It specifies the lower corner of the computational + region with respect to the lower corner of the exclusive region. + The default is a zero vector. + +
+
[computationalUWidth]
+
This vector argument must have dimCount elements, where dimCount is + specified in distgrid. It specifies the upper corner of the computational + region with respect to the upper corner of the exclusive region. + The default is a zero vector. + +
+
[totalLWidth]
+
This vector argument must have dimCount elements, where dimCount is + specified in distgrid. It specifies the lower corner of the total memory + region with respect to the lower corner of the exclusive region. + The default is to accommodate the union of exclusive and computational + region exactly. + +
+
[totalUWidth]
+
This vector argument must have dimCount elements, where dimCount is + specified in distgrid. It specifies the upper corner of the total memory + region with respect to the upper corner of the exclusive region. + The default is a vector that contains the remaining number of elements + in each direction as to fit the union of exclusive and computational + region into the memory region provided by the localarrayList argument. + +
+
[undistLBound]
+
Lower bounds for the array dimensions that are not distributed. + By default lbound is 1. + +
+
[undistUBound]
+
Upper bounds for the array dimensions that are not distributed. + By default ubound is equal to the extent of the corresponding + dimension in localarrayList. + +
+
[name]
+
Name of the Array object. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+28.5.10 ESMF_ArrayCreate - Create Array object from a list of LocalArray objects w/ arbitrary seqIndices for halo +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_ArrayCreate()
+   function ESMF_ArrayCreateLocalArrayArb<indexkind>(distgrid, localarrayList, &
+   haloSeqIndexList, indexflag, datacopyflag, &
+   distgridToArrayMap, computationalEdgeLWidth, computationalEdgeUWidth, &
+   computationalLWidth, computationalUWidth, &
+   totalLWidth, totalUWidth, undistLBound, undistUBound, name, rc)
+
RETURN VALUE: +
   type(ESMF_Array) :: ESMF_ArrayCreateLocalArrayArb
+
ARGUMENTS: +
   type(ESMF_DistGrid), intent(in) :: distgrid
+   type(ESMF_LocalArray), intent(in) :: localarrayList(:)
+   integer(ESMF_KIND_<indexkind>), intent(in) :: haloSeqIndexList(:)
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+   type(ESMF_Index_Flag), intent(in), optional :: indexflag
+   type(ESMF_DataCopy_Flag),intent(in), optional :: datacopyflag
+   integer, intent(in), optional :: distgridToArrayMap(:)
+   integer, intent(in), optional :: computationalEdgeLWidth(:)
+   integer, intent(in), optional :: computationalEdgeUWidth(:)
+   integer, intent(in), optional :: computationalLWidth(:)
+   integer, intent(in), optional :: computationalUWidth(:)
+   integer, intent(in), optional :: totalLWidth(:)
+   integer, intent(in), optional :: totalUWidth(:)
+   integer, intent(in), optional :: undistLBound(:)
+   integer, intent(in), optional :: undistUBound(:)
+   character (len=*), intent(in), optional :: name
+   integer, intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    7.0.0
    +
    Added arguments indexflag, computationalEdgeLWidth, + computationalEdgeUWidth, computationalLWidth, + computationalUWidth, totalLWidth, totalUWidth. These + arguments were missed in previous versions by mistake. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Create an ESMF_Array object from existing ESMF_LocalArray + objects according to distgrid. Each PET must issue this call in unison + in order to create a consistent Array object. The local arrays provided must + be dimensioned according to the DE-local total region. Bounds of the + exclusive regions are set as specified in the distgrid argument. Bounds + for array dimensions that are not distributed can be chosen freely using + the undistLBound and undistUBound arguments. + +

+The return value is the newly created ESMF_Array object. + +

+The arguments are: +

+
distgrid
+
ESMF_DistGrid object that describes how the array is decomposed and + distributed over DEs. The dimCount of distgrid must be smaller or equal + to the rank specified in arrayspec, otherwise a runtime ESMF error will be + raised. + +
+
localarrayList
+
List of valid ESMF_LocalArray objects, i.e. memory must be + associated with the actual arguments. The type/kind/rank information of + all localarrayList elements must be identical and will + be used to set Array's properties accordingly. The shape of each + localarrayList element will be checked against the information + contained in the distgrid. + +
+
haloSeqIndexList
+
One dimensional array containing sequence indices of local halo region. + The size (and content) of haloSeqIndexList can (and typically will) + be different on each PET. + The haloSeqIndexList argument is of integer type, but can be of + different kind in order to support both 32-bit (ESMF_KIND_I4) + and 64-bit (ESMF_KIND_I8) indexing. + +
+
[indexflag]
+
Indicate how DE-local indices are defined. By default, the exclusive + region of each DE is placed to start at the local index space origin, + i.e. (1, 1, ..., 1). Alternatively the DE-local index space can be + aligned with the global index space, if a global index space is well + defined by the associated DistGrid. See section 54.29 + for a list of valid indexflag options. + +
+
[datacopyflag]
+
Specifies whether the Array object will reference the memory allocation + of the arrays provided in localarrayList directly, or will copy + the actual data into new memory allocations. For valid values see + 54.13. The default is ESMF_DATACOPY_REFERENCE. + +
+
[distgridToArrayMap]
+
List that contains as many elements as is indicated by + distgrids's dimCount. The list elements map each dimension of + the DistGrid object to a dimension in the localarrayList elements + by specifying the appropriate Array dimension index. The default is + to map all of distgrid's dimensions against the lower dimensions + of the localarrayList elements in sequence, i.e. + distgridToArrayMap = (/1, 2, .../). + Unmapped dimensions in the localarrayList elements are not + decomposed dimensions and form a tensor of + rank = Array.rank - DistGrid.dimCount. + All distgridToArrayMap entries must be greater than or equal + to zero and smaller than or equal to the Array rank. It is erroneous + to specify the same entry multiple times unless it is zero. + If the Array rank is less than the DistGrid dimCount then the default + distgridToArrayMap will contain zeros for the dimCount - rank + rightmost entries. A zero entry in the distgridToArrayMap + indicates that the particular DistGrid dimension will be replicating + the Array across the DEs along this direction. + +
+
[computationalEdgeLWidth]
+
This vector argument must have dimCount elements, where dimCount is + specified in distgrid. It specifies the lower corner of the computational + region with respect to the lower corner of the exclusive region for DEs + that are located on the edge of a tile. + +
+
[computationalEdgeUWidth]
+
This vector argument must have dimCount elements, where dimCount is + specified in distgrid. It specifies the upper corner of the computational + region with respect to the upper corner of the exclusive region for DEs + that are located on the edge of a tile. + +
+
[computationalLWidth]
+
This vector argument must have dimCount elements, where dimCount is + specified in distgrid. It specifies the lower corner of the computational + region with respect to the lower corner of the exclusive region. + The default is a zero vector. + +
+
[computationalUWidth]
+
This vector argument must have dimCount elements, where dimCount is + specified in distgrid. It specifies the upper corner of the computational + region with respect to the upper corner of the exclusive region. + The default is a zero vector. + +
+
[totalLWidth]
+
This vector argument must have dimCount elements, where dimCount is + specified in distgrid. It specifies the lower corner of the total memory + region with respect to the lower corner of the exclusive region. + The default is to accommodate the union of exclusive and computational + region exactly. + +
+
[totalUWidth]
+
This vector argument must have dimCount elements, where dimCount is + specified in distgrid. It specifies the upper corner of the total memory + region with respect to the upper corner of the exclusive region. + The default is a vector that contains the remaining number of elements + in each direction as to fit the union of exclusive and computational + region into the memory region provided by the localarrayList argument. + +
+
[undistLBound]
+
Lower bounds for the array dimensions that are not distributed. + By default lbound is 1. + +
+
[undistUBound]
+
Upper bounds for the array dimensions that are not distributed. + By default ubound is equal to the extent of the corresponding + dimension in localarrayList. + +
+
[name]
+
Name of the Array object. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+28.5.11 ESMF_ArrayCreate - Create Array object from typekind (allocate memory) +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_ArrayCreate()
+   function ESMF_ArrayCreateAllocate(distgrid, typekind, &
+     indexflag, pinflag, distgridToArrayMap, computationalEdgeLWidth, &
+     computationalEdgeUWidth, computationalLWidth, computationalUWidth, &
+     totalLWidth, totalUWidth, undistLBound, undistUBound, name, vm, rc)
+
RETURN VALUE: +
     type(ESMF_Array) :: ESMF_ArrayCreateAllocate
+
ARGUMENTS: +
        type(ESMF_DistGrid), intent(in) :: distgrid
+        type(ESMF_TypeKind_Flag), intent(in) :: typekind
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+        type(ESMF_Index_Flag), intent(in), optional :: indexflag
+        type(ESMF_Pin_Flag), intent(in), optional :: pinflag
+        integer, intent(in), optional :: distgridToArrayMap(:)
+        integer, intent(in), optional :: computationalEdgeLWidth(:)
+        integer, intent(in), optional :: computationalEdgeUWidth(:)
+        integer, intent(in), optional :: computationalLWidth(:)
+        integer, intent(in), optional :: computationalUWidth(:)
+        integer, intent(in), optional :: totalLWidth(:)
+        integer, intent(in), optional :: totalUWidth(:)
+        integer, intent(in), optional :: undistLBound(:)
+        integer, intent(in), optional :: undistUBound(:)
+        character (len=*), intent(in), optional :: name
+        type(ESMF_VM), intent(in), optional :: vm
+        integer, intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    6.3.0r
    +
    Added argument vm to support object creation on a + different VM than that of the current context. + +
    +
    8.0.0
    +
    Added argument pinflag to provide access to DE sharing + between PETs. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Create an ESMF_Array object and allocate uninitialized data space + according to typekind and distgrid. The Array rank is indirectly determined + by the incoming information. Each PET must issue this call in unison in order + to create a consistent Array object. DE-local allocations are made according + to the total region defined by the distgrid and the optional Width + arguments. + +

+The return value is the newly created ESMF_Array object. + +

+The arguments are: +

+
distgrid
+
ESMF_DistGrid object that describes how the array is decomposed and + distributed over DEs. The dimCount of distgrid must be smaller or equal + to the rank specified in arrayspec, otherwise a runtime ESMF error will be + raised. + +
+
typekind
+
The typekind of the Array. See section 54.61 + for a list of valid typekind options. + +
+
[indexflag]
+
Indicate how DE-local indices are defined. By default, the exclusive + region of each DE is placed to start at the local index space origin, + i.e. (1, 1, ..., 1). Alternatively the DE-local index space can be + aligned with the global index space, if a global index space is well + defined by the associated DistGrid. See section 54.29 + for a list of valid indexflag options. + +
+
[pinflag]
+
Specify which type of resource DEs are pinned to. See section + 50.2.1 for a list of valid pinning options. + The default is to pin DEs to PETs, i.e. only the PET on which a DE + was created considers the DE as local. + +
+
[distgridToArrayMap]
+
List that contains as many elements as is indicated by + distgrids's dimCount. The list elements map each dimension of + the DistGrid object to a dimension in the newly allocated Array object + by specifying the appropriate Array dimension index. The default is + to map all of distgrid's dimensions against the lower dimensions + of the Array object in sequence, i.e. distgridToArrayMap = + (/1, 2, .../). + Unmapped dimensions in the Array object are not decomposed dimensions + and form a tensor of rank = Array.rank - DistGrid.dimCount. + All distgridToArrayMap entries must be greater than or equal + to zero and smaller than or equal to the Array rank. It is erroneous + to specify the same entry multiple times unless it is zero. + If the Array rank is less than the DistGrid dimCount then the default + distgridToArrayMap will contain zeros for the dimCount - rank + rightmost entries. A zero entry in the distgridToArrayMap + indicates that the particular DistGrid dimension will be replicating + the Array across the DEs along this direction. + +
+
[computationalEdgeLWidth]
+
This vector argument must have dimCount elements, where dimCount is + specified in distgrid. It specifies the lower corner of the computational + region with respect to the lower corner of the exclusive region for DEs + that are located on the edge of a tile. + +
+
[computationalEdgeUWidth]
+
This vector argument must have dimCount elements, where dimCount is + specified in distgrid. It specifies the upper corner of the computational + region with respect to the upper corner of the exclusive region for DEs + that are located on the edge of a tile. + +
+
[computationalLWidth]
+
This vector argument must have dimCount elements, where dimCount is + specified in distgrid. It specifies the lower corner of the computational + region with respect to the lower corner of the exclusive region. + The default is a zero vector. + +
+
[computationalUWidth]
+
This vector argument must have dimCount elements, where dimCount is + specified in distgrid. It specifies the upper corner of the computational + region with respect to the upper corner of the exclusive region. + The default is a zero vector. + +
+
[totalLWidth]
+
This vector argument must have dimCount elements, where dimCount is + specified in distgrid. It specifies the lower corner of the total memory + region with respect to the lower corner of the exclusive region. + The default is to accommodate the union of exclusive and computational + region. + +
+
[totalUWidth]
+
This vector argument must have dimCount elements, where dimCount is + specified in distgrid. It specifies the upper corner of the total memory + region with respect to the upper corner of the exclusive region. + The default is to accommodate the union of exclusive and computational + region. + +
+
[undistLBound]
+
Lower bounds for the array dimensions that are not distributed. + +
+
[undistUBound]
+
Upper bounds for the array dimensions that are not distributed. + +
+
[name]
+
Name of the Array object. + +
+
[vm]
+
If present, the Array object is created on the specified + ESMF_VM object. The default is to create on the VM of the + current context. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+28.5.12 ESMF_ArrayCreate - Create Array object from typekind (allocate memory) w/ arbitrary seqIndices for halo +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_ArrayCreate()
+   function ESMF_ArrayCreateAllocateArb<indexkind>(distgrid, typekind, &
+   haloSeqIndexList, pinflag, distgridToArrayMap, &
+   undistLBound, undistUBound, name, rc)
+
RETURN VALUE: +
   type(ESMF_Array) :: ESMF_ArrayCreateAllocateArb
+
ARGUMENTS: +
   type(ESMF_DistGrid), intent(in) :: distgrid
+   type(ESMF_TypeKind_Flag), intent(in) :: typekind
+   integer(ESMF_KIND_<indexkind>), intent(in) :: haloSeqIndexList(:)
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+   type(ESMF_Pin_Flag), intent(in), optional :: pinflag
+   integer, intent(in), optional :: distgridToArrayMap(:)
+   integer, intent(in), optional :: undistLBound(:)
+   integer, intent(in), optional :: undistUBound(:)
+   character (len=*), intent(in), optional :: name
+   integer, intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    8.0.0
    +
    Added argument pinflag to provide access to DE sharing + between PETs. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Create an ESMF_Array object and allocate uninitialized data space + according to typekind and distgrid. The Array rank is indirectly determined + by the incoming information. Each PET must issue this call in unison in order + to create a consistent Array object. DE-local allocations are made according + to the total region defined by the distgrid and haloSeqIndexList + arguments. + +

+The return value is the newly created ESMF_Array object. + +

+The arguments are: +

+
distgrid
+
ESMF_DistGrid object that describes how the array is decomposed and + distributed over DEs. The dimCount of distgrid must be smaller or equal + to the rank specified in arrayspec, otherwise a runtime ESMF error will be + raised. + +
+
typekind
+
The typekind of the Array. See section 54.61 + for a list of valid typekind options. + +
+
haloSeqIndexList
+
One dimensional array containing sequence indices of local halo region. + The size (and content) of haloSeqIndexList can (and typically will) + be different on each PET. + The haloSeqIndexList argument is of integer type, but can be of + different kind in order to support both 32-bit (ESMF_KIND_I4) + and 64-bit (ESMF_KIND_I8) indexing. + +
+
[pinflag]
+
Specify which type of resource DEs are pinned to. See section + 50.2.1 for a list of valid pinning options. + The default is to pin DEs to PETs, i.e. only the PET on which a DE + was created considers the DE as local. + +
+
[distgridToArrayMap]
+
List that contains as many elements as is indicated by + distgrids's dimCount. The list elements map each dimension of + the DistGrid object to a dimension in the newly allocated Array object + by specifying the appropriate Array dimension index. The default is + to map all of distgrid's dimensions against the lower dimensions + of the Array object in sequence, i.e. distgridToArrayMap = + (/1, 2, .../). + Unmapped dimensions in the Array object are not decomposed dimensions + and form a tensor of rank = Array.rank - DistGrid.dimCount. + All distgridToArrayMap entries must be greater than or equal + to zero and smaller than or equal to the Array rank. It is erroneous + to specify the same entry multiple times unless it is zero. + If the Array rank is less than the DistGrid dimCount then the default + distgridToArrayMap will contain zeros for the dimCount - rank + rightmost entries. A zero entry in the distgridToArrayMap + indicates that the particular DistGrid dimension will be replicating + the Array across the DEs along this direction. + +
+
[undistLBound]
+
Lower bounds for the array dimensions that are not distributed. + +
+
[undistUBound]
+
Upper bounds for the array dimensions that are not distributed. + +
+
[name]
+
Name of the Array object. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+28.5.13 ESMF_ArrayCreate - Create Array object from ArraySpec (allocate memory) +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_ArrayCreate()
+   function ESMF_ArrayCreateAllocateAS(distgrid, arrayspec, &
+     indexflag, pinflag, distgridToArrayMap, computationalEdgeLWidth, &
+     computationalEdgeUWidth, computationalLWidth, computationalUWidth, &
+     totalLWidth, totalUWidth, undistLBound, undistUBound, name, vm, rc)
+
RETURN VALUE: +
     type(ESMF_Array) :: ESMF_ArrayCreateAllocateAS
+
ARGUMENTS: +
        type(ESMF_DistGrid), intent(in) :: distgrid
+        type(ESMF_ArraySpec), intent(in) :: arrayspec
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+        type(ESMF_Index_Flag), intent(in), optional :: indexflag
+        type(ESMF_Pin_Flag), intent(in), optional :: pinflag
+        integer, intent(in), optional :: distgridToArrayMap(:)
+        integer, intent(in), optional :: computationalEdgeLWidth(:)
+        integer, intent(in), optional :: computationalEdgeUWidth(:)
+        integer, intent(in), optional :: computationalLWidth(:)
+        integer, intent(in), optional :: computationalUWidth(:)
+        integer, intent(in), optional :: totalLWidth(:)
+        integer, intent(in), optional :: totalUWidth(:)
+        integer, intent(in), optional :: undistLBound(:)
+        integer, intent(in), optional :: undistUBound(:)
+        character (len=*), intent(in), optional :: name
+        type(ESMF_VM), intent(in), optional :: vm
+        integer, intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    6.3.0r
    +
    Added argument vm to support object creation on a + different VM than that of the current context. + +
    +
    8.0.0
    +
    Added argument pinflag to provide access to DE sharing + between PETs. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Create an ESMF_Array object and allocate uninitialized data space + according to arrayspec and distgrid. Each PET must issue + this call with identical arguments in order to create a consistent Array + object. DE-local allocations are made according to the total region defined + by the arguments to this call: distgrid and the optional Width + arguments. + +

+The return value is the newly created ESMF_Array object. + +

+The arguments are: +

+
distgrid
+
ESMF_DistGrid object that describes how the array is decomposed and + distributed over DEs. The dimCount of distgrid must be smaller or equal + to the rank specified in arrayspec, otherwise a runtime ESMF error will be + raised. + +
+
arrayspec
+
ESMF_ArraySpec object containing the type/kind/rank information. + +
+
[indexflag]
+
Indicate how DE-local indices are defined. By default, the exclusive + region of each DE is placed to start at the local index space origin, + i.e. (1, 1, ..., 1). Alternatively the DE-local index space can be + aligned with the global index space, if a global index space is well + defined by the associated DistGrid. See section 54.29 + for a list of valid indexflag options. + +
+
[pinflag]
+
Specify which type of resource DEs are pinned to. See section + 50.2.1 for a list of valid pinning options. + The default is to pin DEs to PETs, i.e. only the PET on which a DE + was created considers the DE as local. + +
+
[distgridToArrayMap]
+
List that contains as many elements as is indicated by + distgrids's dimCount. The list elements map each dimension of + the DistGrid object to a dimension in the newly allocated Array object + by specifying the appropriate Array dimension index. The default is + to map all of distgrid's dimensions against the lower dimensions + of the Array object in sequence, i.e. distgridToArrayMap = + (/1, 2, .../). + Unmapped dimensions in the Array object are not decomposed dimensions + and form a tensor of rank = Array.rank - DistGrid.dimCount. + All distgridToArrayMap entries must be greater than or equal + to zero and smaller than or equal to the Array rank. It is erroneous + to specify the same entry multiple times unless it is zero. + If the Array rank is less than the DistGrid dimCount then the default + distgridToArrayMap will contain zeros for the dimCount - rank + rightmost entries. A zero entry in the distgridToArrayMap + indicates that the particular DistGrid dimension will be replicating + the Array across the DEs along this direction. + +
+
[computationalEdgeLWidth]
+
This vector argument must have dimCount elements, where dimCount is + specified in distgrid. It specifies the lower corner of the computational + region with respect to the lower corner of the exclusive region for DEs + that are located on the edge of a tile. + +
+
[computationalEdgeUWidth]
+
This vector argument must have dimCount elements, where dimCount is + specified in distgrid. It specifies the upper corner of the computational + region with respect to the upper corner of the exclusive region for DEs + that are located on the edge of a tile. + +
+
[computationalLWidth]
+
This vector argument must have dimCount elements, where dimCount is + specified in distgrid. It specifies the lower corner of the computational + region with respect to the lower corner of the exclusive region. + The default is a zero vector. + +
+
[computationalUWidth]
+
This vector argument must have dimCount elements, where dimCount is + specified in distgrid. It specifies the upper corner of the computational + region with respect to the upper corner of the exclusive region. + The default is a zero vector. + +
+
[totalLWidth]
+
This vector argument must have dimCount elements, where dimCount is + specified in distgrid. It specifies the lower corner of the total memory + region with respect to the lower corner of the exclusive region. + The default is to accommodate the union of exclusive and computational + region. + +
+
[totalUWidth]
+
This vector argument must have dimCount elements, where dimCount is + specified in distgrid. It specifies the upper corner of the total memory + region with respect to the upper corner of the exclusive region. + The default is to accommodate the union of exclusive and computational + region. + +
+
[undistLBound]
+
Lower bounds for the array dimensions that are not distributed. + +
+
[undistUBound]
+
Upper bounds for the array dimensions that are not distributed. + +
+
[name]
+
Name of the Array object. + +
+
[vm]
+
If present, the Array object is created on the specified + ESMF_VM object. The default is to create on the VM of the + current context. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+28.5.14 ESMF_ArrayCreate - Create Array object from ArraySpec (allocate memory) w/ arbitrary seqIndices for halo +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_ArrayCreate()
+   function ESMF_ArrayCreateAllocateASArb<indexkind>(distgrid, arrayspec, &
+   haloSeqIndexList, pinflag, distgridToArrayMap, &
+   undistLBound, undistUBound, name, rc)
+
RETURN VALUE: +
   type(ESMF_Array) :: ESMF_ArrayCreateAllocateASArb
+
ARGUMENTS: +
   type(ESMF_DistGrid), intent(in) :: distgrid
+   type(ESMF_ArraySpec), intent(in) :: arrayspec
+   integer(ESMF_KIND_<indexkind>), intent(in) :: haloSeqIndexList(:)
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+   type(ESMF_Pin_Flag), intent(in), optional :: pinflag
+   integer, intent(in), optional :: distgridToArrayMap(:)
+   integer, intent(in), optional :: undistLBound(:)
+   integer, intent(in), optional :: undistUBound(:)
+   character (len=*), intent(in), optional :: name
+   integer, intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    8.0.0
    +
    Added argument pinflag to provide access to DE sharing + between PETs. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Create an ESMF_Array object and allocate uninitialized data space + according to arrayspec and distgrid. Each PET must issue this call in unison + in order to create a consistent Array object. DE-local allocations are made + according to the total region defined by the arguments to this call: + distgrid and haloSeqIndexList arguments. + +

+The return value is the newly created ESMF_Array object. + +

+The arguments are: +

+
distgrid
+
ESMF_DistGrid object that describes how the array is decomposed and + distributed over DEs. The dimCount of distgrid must be smaller or equal + to the rank specified in arrayspec, otherwise a runtime ESMF error will be + raised. + +
+
arrayspec
+
ESMF_ArraySpec object containing the type/kind/rank information. + +
+
haloSeqIndexList
+
One dimensional array containing sequence indices of local halo region. + The size (and content) of haloSeqIndexList can (and typically will) + be different on each PET. + The haloSeqIndexList argument is of integer type, but can be of + different kind in order to support both 32-bit (ESMF_KIND_I4) + and 64-bit (ESMF_KIND_I8) indexing. + +
+
[pinflag]
+
Specify which type of resource DEs are pinned to. See section + 50.2.1 for a list of valid pinning options. + The default is to pin DEs to PETs, i.e. only the PET on which a DE + was created considers the DE as local. + +
+
[distgridToArrayMap]
+
List that contains as many elements as is indicated by + distgrids's dimCount. The list elements map each dimension of + the DistGrid object to a dimension in the newly allocated Array object + by specifying the appropriate Array dimension index. The default is + to map all of distgrid's dimensions against the lower dimensions + of the Array object in sequence, i.e. distgridToArrayMap = + (/1, 2, .../). + Unmapped dimensions in the Array object are not decomposed dimensions + and form a tensor of rank = Array.rank - DistGrid.dimCount. + All distgridToArrayMap entries must be greater than or equal + to zero and smaller than or equal to the Array rank. It is erroneous + to specify the same entry multiple times unless it is zero. + If the Array rank is less than the DistGrid dimCount then the default + distgridToArrayMap will contain zeros for the dimCount - rank + rightmost entries. A zero entry in the distgridToArrayMap + indicates that the particular DistGrid dimension will be replicating + the Array across the DEs along this direction. + +
+
[undistLBound]
+
Lower bounds for the array dimensions that are not distributed. + +
+
[undistUBound]
+
Upper bounds for the array dimensions that are not distributed. + +
+
[name]
+
Name of the Array object. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+28.5.15 ESMF_ArrayCreate - Create Array object from an existing Array object +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_ArrayCreate()
+   function ESMF_ArrayCreateFromArray(array, datacopyflag, delayout, &
+     trailingUndistSlice, name, rc)
+
RETURN VALUE: +
     type(ESMF_Array) :: ESMF_ArrayCreateFromArray
+
ARGUMENTS: +
        type(ESMF_Array), intent(in) :: array
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+        type(ESMF_DataCopy_Flag), intent(in), optional :: datacopyflag
+        type(ESMF_DELayout), intent(in), optional :: delayout
+        integer, intent(in), optional :: trailingUndistSlice(:)
+        character (len=*), intent(in), optional :: name
+        integer, intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    8.1.0
    +
    Added argument datacopyflag to select between different + data copy options. +
    +Added argument delayout to create Array with different localDe -> DE + mapping. This is identical to a change in DE -> PET mapping. + +
    +
    8.6.0
    +
    Added argument trailingUndistSlice to allow slicing of + arrays. +
    +Added argument name to allow specification during creation. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Create an ESMF_Array object from an existing Array. Supports array + slicing. + +

+The return value is the newly created ESMF_Array object. + +

+The arguments are: +

+
array
+
ESMF_Array object to be used as originator. + +
+
[datacopyflag]
+
Specifies whether the created Array object references the memory + allocation provided by array directly or copies the data from + array into a new memory allocation. For valid values see + 54.13. The default is ESMF_DATACOPY_VALUE. + +
+
[delayout]
+
If present, override the DELayout of the incoming distgrid. + By default use the DELayout defined in distgrid. + +
+
[trailingUndistSlice]
+
If present, the returned Array refers to a slice of array + created by removing some or all of the trailing (i.e. rightmost) + undistributed dimensions from the incoming Array object. + The number of trailing dimensions removed is equal to the size $n$ + of trailingUndistSlice, which must be less than or equal to the + total number of trailing undistributed dimensions in array. + The trailingUndistSlice argument is interpreted + as an index tuple for the $n$ trailing undistributed + dimensions in array in order, and the Array slice at that + location is returned. + +
+
[name]
+
Name of the Array object. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+28.5.16 ESMF_ArrayDestroy - Release resources associated with an Array object +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_ArrayDestroy(array, noGarbage, rc)
+
ARGUMENTS: +
     type(ESMF_Array), intent(inout) :: array
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     logical, intent(in), optional :: noGarbage
+     integer, intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    7.0.0
    +
    Added argument noGarbage. + The argument provides a mechanism to override the default garbage collection + mechanism when destroying an ESMF object. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Destroy an ESMF_Array, releasing the resources associated with + the object. + +

+By default a small remnant of the object is kept in memory in order to + prevent problems with dangling aliases. The default garbage collection + mechanism can be overridden with the noGarbage argument. + +

+The arguments are: +

+
array
+
ESMF_Array object to be destroyed. + +
+
[noGarbage]
+
If set to .TRUE. the object will be fully destroyed and removed + from the ESMF garbage collection system. Note however that under this + condition ESMF cannot protect against accessing the destroyed object + through dangling aliases - a situation which may lead to hard to debug + application crashes. + +

+It is generally recommended to leave the noGarbage argument + set to .FALSE. (the default), and to take advantage of the ESMF + garbage collection system which will prevent problems with dangling + aliases or incorrect sequences of destroy calls. However this level of + support requires that a small remnant of the object is kept in memory + past the destroy call. This can lead to an unexpected increase in memory + consumption over the course of execution in applications that use + temporary ESMF objects. For situations where the repeated creation and + destruction of temporary objects leads to memory issues, it is + recommended to call with noGarbage set to .TRUE., fully + removing the entire temporary object from memory. + +

+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ + +

+ +

+ +

+ +

+28.5.17 ESMF_ArrayGather - Gather a Fortran array from an ESMF_Array +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_ArrayGather(array, farray, rootPet, tile, vm, rc)
+
ARGUMENTS: +
   type(ESMF_Array), intent(in) :: array 
+   <type>(ESMF_KIND_<kind>), intent(out), target :: farray(<rank>) 
+   integer, intent(in) :: rootPet 
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+   integer, intent(in), optional :: tile 
+   type(ESMF_VM), intent(in), optional :: vm 
+   integer, intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Gather the data of an ESMF_Array object into the farray located on + rootPET. A single DistGrid tile of array must be + gathered into farray. The optional tile + argument allows selection of the tile. For Arrays defined on a single + tile DistGrid the default selection (tile 1) will be correct. The + shape of farray must match the shape of the tile in Array. + +

+If the Array contains replicating DistGrid dimensions data will be + gathered from the numerically higher DEs. Replicated data elements in + numerically lower DEs will be ignored. + +

+This version of the interface implements the PET-based blocking paradigm: + Each PET of the VM must issue this call exactly once for all of its + DEs. The call will block until all PET-local data objects are accessible. + +

+The arguments are: +

+
array
+
The ESMF_Array object from which data will be gathered. + +
+
{farray}
+
The Fortran array into which to gather data. Only root + must provide a valid farray, the other PETs may treat + farray as an optional argument. + +
+
rootPet
+
PET that holds the valid destination array, i.e. farray. + +
+
[tile]
+
The DistGrid tile in array from which to gather farray. + By default farray will be gathered from tile 1. + +
+
[vm]
+
Optional ESMF_VM object of the current context. Providing the + VM of the current context will lower the method's overhead. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ + +

+ +

+ +

+ +

+28.5.18 ESMF_ArrayGet - Get object-wide Array information +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_ArrayGet()
+ subroutine ESMF_ArrayGetDefault(array, arrayspec, typekind, &
+     rank, localarrayList, indexflag, distgridToArrayMap, &
+     distgridToPackedArrayMap, arrayToDistGridMap, undistLBound, &
+     undistUBound, exclusiveLBound, exclusiveUBound, computationalLBound, &
+     computationalUBound, totalLBound, totalUBound, computationalLWidth, &
+     computationalUWidth, totalLWidth, totalUWidth, distgrid, &
+     dimCount, undistDimCount, replicatedDimCount, &
+     tileCount, minIndexPTile, maxIndexPTile, deToTileMap, indexCountPDe, &
+     delayout, deCount, localDeCount, ssiLocalDeCount, localDeToDeMap, &
+     localDeList, & ! DEPRECATED ARGUMENT
+     isESMFAllocated, name, vm, rc)
+
ARGUMENTS: +
     type(ESMF_Array), intent(in) :: array
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     type(ESMF_ArraySpec), intent(out), optional :: arrayspec
+     type(ESMF_TypeKind_Flag), intent(out), optional :: typekind
+     integer, intent(out), optional :: rank
+     type(ESMF_LocalArray), target, intent(out), optional :: localarrayList(:)
+     type(ESMF_Index_Flag), intent(out), optional :: indexflag
+     integer, target, intent(out), optional :: distgridToArrayMap(:)
+     integer, target, intent(out), optional :: distgridToPackedArrayMap(:)
+     integer, target, intent(out), optional :: arrayToDistGridMap(:)
+     integer, target, intent(out), optional :: undistLBound(:)
+     integer, target, intent(out), optional :: undistUBound(:)
+     integer, target, intent(out), optional :: exclusiveLBound(:,:)
+     integer, target, intent(out), optional :: exclusiveUBound(:,:)
+     integer, target, intent(out), optional :: computationalLBound(:,:)
+     integer, target, intent(out), optional :: computationalUBound(:,:)
+     integer, target, intent(out), optional :: totalLBound(:,:)
+     integer, target, intent(out), optional :: totalUBound(:,:)
+     integer, target, intent(out), optional :: computationalLWidth(:,:)
+     integer, target, intent(out), optional :: computationalUWidth(:,:)
+     integer, target, intent(out), optional :: totalLWidth(:,:)
+     integer, target, intent(out), optional :: totalUWidth(:,:)
+     type(ESMF_DistGrid), intent(out), optional :: distgrid
+     integer, intent(out), optional :: dimCount
+     integer, intent(out), optional :: undistDimCount
+     integer, intent(out), optional :: replicatedDimCount
+     integer, intent(out), optional :: tileCount
+     integer, intent(out), optional :: minIndexPTile(:,:)
+     integer, intent(out), optional :: maxIndexPTile(:,:)
+     integer, intent(out), optional :: deToTileMap(:)
+     integer, intent(out), optional :: indexCountPDe(:,:)
+     type(ESMF_DELayout), intent(out), optional :: delayout
+     integer, intent(out), optional :: deCount
+     integer, intent(out), optional :: localDeCount
+     integer, intent(out), optional :: ssiLocalDeCount
+     integer, intent(out), optional :: localDeToDeMap(:)
+     integer, intent(out), optional :: localDeList(:) ! DEPRECATED ARGUMENT
+     logical, intent(out), optional :: isESMFAllocated
+     character(len=*), intent(out), optional :: name
+     type(ESMF_VM), intent(out), optional :: vm
+     integer, intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    5.2.0rp1
    +
    Added argument localDeToDeMap. + Started to deprecate argument localDeList. + The new argument name correctly uses the Map suffix and + better describes the returned information. + This was pointed out by user request. + +
    +
    8.0.0
    +
    Added argument ssiLocalDeCount to support DE sharing + between PETs on the same single system image (SSI). +
    +Added argument vm in order to offer information about the + VM on which the Array was created. + +
    +
    8.5.0
    +
    Added argument isESMFAllocated to support user query of + whether ESMF or user is responsible for the data allocation + referenced by this object. + +
    +
    8.6.0
    +
    Added argument undistDimCount to support direct user + query of the number of undistributed dimensions in the Array + object. +
    +Added argument replicatedDimCount to support direct user + query of the number of replicated dimensions in the Array + object. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Get internal information. + +

+This interface works for any number of DEs per PET. + +

+The arguments are: +

+
array
+
Queried ESMF_Array object. + +
+
[arrayspec]
+
ESMF_ArraySpec object containing the type/kind/rank information + of the Array object. + +
+
[typekind]
+
TypeKind of the Array object. + +
+
[rank]
+
Rank of the Array object. + +
+
[localarrayList]
+
Upon return this holds a list of the associated ESMC_LocalArray + objects. localarrayList must be allocated to be of size + localDeCount or ssiLocalDeCount. + +
+
[indexflag]
+
Upon return this flag indicates how the DE-local indices are defined. + See section 54.29 for a list of possible return values. + +
+
[distgridToArrayMap]
+
Upon return this list holds the Array dimensions against which the + DistGrid dimensions are mapped. distgridToArrayMap must be allocated + to be of size dimCount. An entry of zero indicates that the + respective DistGrid dimension is replicating the Array across the DEs + along this direction. + +
+
[distgridToPackedArrayMap]
+
Upon return this list holds the indices of the Array dimensions in packed + format against which the DistGrid dimensions are mapped. + distgridToPackedArrayMap must be allocated to be of size + dimCount. An entry of zero indicates that the respective DistGrid + dimension is replicating the Array across the DEs along this direction. + +
+
[arrayToDistGridMap]
+
Upon return this list holds the DistGrid dimensions against which the + Array dimensions are mapped. arrayToDistGridMap must be allocated + to be of size rank. An entry of zero indicates that the respective + Array dimension is not decomposed, rendering it a tensor dimension. + +
+
[undistLBound]
+
Upon return this array holds the lower bounds of the undistributed + dimensions of the Array. UndistLBound must be allocated to be + of size rank-dimCount. + +
+
[undistUBound]
+
Upon return this array holds the upper bounds of the undistributed + dimensions of the Array. UndistUBound must be allocated to be + of size rank-dimCount. + +
+
[exclusiveLBound]
+
Upon return this holds the lower bounds of the exclusive regions for + all PET-local DEs. exclusiveLBound must be allocated to be + of size (dimCount, localDeCount) or + (dimCount, ssiLocalDeCount). + +
+
[exclusiveUBound]
+
Upon return this holds the upper bounds of the exclusive regions for + all PET-local DEs. exclusiveUBound must be allocated to be + of size (dimCount, localDeCount) or + (dimCount, ssiLocalDeCount). + +
+
[computationalLBound]
+
Upon return this holds the lower bounds of the computational regions for + all PET-local DEs. computationalLBound must be allocated to be + of size (dimCount, localDeCount) or + (dimCount, ssiLocalDeCount). + +
+
[computationalUBound]
+
Upon return this holds the upper bounds of the computational regions for + all PET-local DEs. computationalUBound must be allocated to be + of size (dimCount, localDeCount) or + (dimCount, ssiLocalDeCount). + +
+
[totalLBound]
+
Upon return this holds the lower bounds of the total regions for + all PET-local DEs. totalLBound must be allocated to be + of size (dimCount, localDeCount) or + (dimCount, ssiLocalDeCount). + +
+
[totalUBound]
+
Upon return this holds the upper bounds of the total regions for + all PET-local DEs. totalUBound must be allocated to be + of size (dimCount, localDeCount) or + (dimCount, ssiLocalDeCount). + +
+
[computationalLWidth]
+
Upon return this holds the lower width of the computational regions for + all PET-local DEs. computationalLWidth must be allocated to be + of size (dimCount, localDeCount) or + (dimCount, ssiLocalDeCount). + +
+
[computationalUWidth]
+
Upon return this holds the upper width of the computational regions for + all PET-local DEs. computationalUWidth must be allocated to be + of size (dimCount, localDeCount) or + (dimCount, ssiLocalDeCount). + +
+
[totalLWidth]
+
Upon return this holds the lower width of the total memory regions for + all PET-local DEs. totalLWidth must be allocated to be + of size (dimCount, localDeCount) or + (dimCount, ssiLocalDeCount). + +
+
[totalUWidth]
+
Upon return this holds the upper width of the total memory regions for + all PET-local DEs. totalUWidth must be allocated to be + of size (dimCount, localDeCount) or + (dimCount, ssiLocalDeCount). + +
+
[distgrid]
+
Upon return this holds the associated ESMF_DistGrid object. + +
+
[dimCount]
+
Number of dimensions (rank) of distgrid. + +
+
[undistDimCount]
+
Number of undistributed dimensions in the Array. (See + Section 28.2.11 for an explanation + of undistributed Array dimensions.) + +
+
[replicatedDimCount]
+
Number of replicated dimensions in the Array. (See + Section 28.2.12 for an explanation of + replicated Array dimensions.) + +
+
[tileCount]
+
Number of tiles in distgrid. + +
+
[minIndexPTile]
+
Lower index space corner per dim, per tile, with + size(minIndexPTile) == (/dimCount, tileCount/). + +
+
[maxIndexPTile]
+
Upper index space corner per dim, per tile, with + size(maxIndexPTile) == (/dimCount, tileCount/). + +
+
[deToTileMap]
+
List of tile id numbers, one for each DE, with + size(deToTileMap) == (/deCount/) + +
+
[indexCountPDe]
+
Array of extents per dim, per de, with + size(indexCountPDe) == (/dimCount, deCount/). + +
+
[delayout]
+
The associated ESMF_DELayout object. + +
+
[deCount]
+
The total number of DEs in the Array. + +
+
[localDeCount]
+
The number of DEs in the Array associated with the local PET. + +
+
[ssiLocalDeCount]
+
The number of DEs in the Array available to the local PET. This + includes DEs that are local to other PETs on the same SSI, that are + accessible via shared memory. + +
+
[localDeToDeMap]
+
Mapping between localDe indices and the (global) DEs associated with + the local PET. The localDe index variables are discussed in sections + 50.3.7 and 28.2.5. + The provided actual argument must be of size localDeCount, or + ssiLocalDeCount, and will be filled accordingly. + +
+
[localDeList]
+
DEPRECATED ARGUMENT! Please use the argument localDeToDeMap instead. + +
+
[isESMFAllocated]
+
Set to .true. for data allocations held by ESMF. Set to + .false. otherwise. + +
+
[name]
+
Name of the Array object. + +
+
[vm
+
The VM on which the Array object was created. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+28.5.19 ESMF_ArrayGet - Get DE-local Array information for a specific dimension +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_ArrayGet()
+   subroutine ESMF_ArrayGetPLocalDePDim(array, dim, localDe, &
+     indexCount, indexList, rc)
+
ARGUMENTS: +
     type(ESMF_Array), intent(in) :: array
+     integer, intent(in) :: dim
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer, intent(in), optional :: localDe
+     integer, intent(out), optional :: indexCount
+     integer, intent(out), optional :: indexList(:)
+     integer, intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Get internal information per local DE, per dim. + +

+This interface works for any number of DEs per PET. + +

+The arguments are: +

+
array
+
Queried ESMF_Array object. + +
+
dim
+
Dimension for which information is requested. [1,..,dimCount] + +
+
[localDe]
+
Local DE for which information is requested. [0,..,localDeCount-1]. + For localDeCount==1 the localDe argument may be omitted, + in which case it will default to localDe=0. + +
+
[indexCount]
+
DistGrid indexCount associated with localDe, dim. + +
+
[indexList]
+
List of DistGrid tile-local indices for localDe along dimension + dim. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+28.5.20 ESMF_ArrayGet - Get a DE-local Fortran array pointer from an Array +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_ArrayGet() 
+   subroutine ESMF_ArrayGetFPtr<rank><type><kind>(array, localDe, & 
+   farrayPtr, rc)
+
ARGUMENTS: +
   type(ESMF_Array), intent(in) :: array 
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+   integer, intent(in), optional :: localDe 
+   <type> (ESMF_KIND_<kind>), pointer :: farrayPtr(<rank>) 
+   integer, intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Access Fortran array pointer to the specified DE-local memory allocation of + the Array object. + +

+The arguments are: +

+
array
+
Queried ESMF_Array object. + +
+
[localDe]
+
Local DE for which information is requested. [0,..,localDeCount-1]. + For localDeCount==1 the localDe argument may be omitted, + in which case it will default to localDe=0. + +
+
farrayPtr
+
Upon return, farrayPtr points to the DE-local data allocation of + localDe in array. It depends on the specific entry point + of ESMF_ArrayCreate() used during array creation, which + Fortran operations are supported on the returned farrayPtr. See + 28.3 for more details. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+28.5.21 ESMF_ArrayGet - Get a DE-local LocalArray object from an Array +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_ArrayGet()
+   subroutine ESMF_ArrayGetLocalArray(array, localDe, localarray, rc)
+
ARGUMENTS: +
     type(ESMF_Array), intent(in) :: array
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer, intent(in), optional :: localDe
+     type(ESMF_LocalArray), intent(inout) :: localarray
+     integer, intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Provide access to ESMF_LocalArray object that holds data for + the specified local DE. + +

+The arguments are: +

+
array
+
Queried ESMF_Array object. + +
+
[localDe]
+
Local DE for which information is requested. [0,..,localDeCount-1]. + For localDeCount==1 the localDe argument may be omitted, + in which case it will default to localDe=0. + +
+
localarray
+
Upon return localarray refers to the DE-local data allocation of + array. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ + +

+ +

+ +

+ +

+28.5.22 ESMF_ArrayHalo - Execute an Array halo operation +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_ArrayHalo(array, routehandle, &
+     routesyncflag, finishedflag, cancelledflag, checkflag, rc)
+
ARGUMENTS: +
     type(ESMF_Array),          intent(inout)         :: array
+     type(ESMF_RouteHandle),    intent(inout)         :: routehandle
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     type(ESMF_RouteSync_Flag), intent(in),  optional :: routesyncflag
+     logical,                   intent(out), optional :: finishedflag
+     logical,                   intent(out), optional :: cancelledflag
+     logical,                   intent(in),  optional :: checkflag
+     integer,                   intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Execute a precomputed Array halo operation for array. + The array argument must match the respective Array + used during ESMF_ArrayHaloStore() in type, kind, and + memory layout of the distributed dimensions. However, the size, + number, and index order of undistributed dimensions may be different. + See section 37.2.5 for a more detailed discussion of + RouteHandle reusability. + +

+See ESMF_ArrayHaloStore() on how to precompute routehandle. + +

+This call is collective across the current VM. + +

+

+
array
+
ESMF_Array containing data to be haloed. + +
+
routehandle
+
Handle to the precomputed Route. + +
+
[routesyncflag]
+
Indicate communication option. Default is ESMF_ROUTESYNC_BLOCKING, + resulting in a blocking operation. + See section 54.53 for a complete list of valid settings. + +
+
[finishedflag]
+
Used in combination with routesyncflag = ESMF_ROUTESYNC_NBTESTFINISH. + Returned finishedflag equal to .true. indicates that all + operations have finished. A value of .false. indicates that there + are still unfinished operations that require additional calls with + routesyncflag = ESMF_ROUTESYNC_NBTESTFINISH, or a final call with + routesyncflag = ESMF_ROUTESYNC_NBWAITFINISH. For all other routesyncflag + settings the returned value in finishedflag is always .true.. + +
+
[cancelledflag]
+
A value of .true. indicates that were cancelled communication + operations. In this case the data in the dstArray must be considered + invalid. It may have been partially modified by the call. A value of + .false. indicates that none of the communication operations was + cancelled. The data in dstArray is valid if finishedflag + returns equal .true.. + +
+
[checkflag]
+
If set to .TRUE. the input Array pair will be checked for + consistency with the precomputed operation provided by routehandle. + If set to .FALSE. (default) only a very basic input check + will be performed, leaving many inconsistencies undetected. Set + checkflag to .FALSE. to achieve highest performance. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+28.5.23 ESMF_ArrayHaloRelease - Release resources associated with Array halo operation +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_ArrayHaloRelease(routehandle, noGarbage, rc)
+
ARGUMENTS: +
     type(ESMF_RouteHandle), intent(inout)         :: routehandle
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     logical,                intent(in),  optional :: noGarbage
+     integer,                intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    8.0.0
    +
    Added argument noGarbage. + The argument provides a mechanism to override the default garbage collection + mechanism when destroying an ESMF object. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Release resources associated with an Array halo operation. + After this call routehandle becomes invalid. + +

+

+
routehandle
+
Handle to the precomputed Route. + +
+
[noGarbage]
+
If set to .TRUE. the object will be fully destroyed and removed + from the ESMF garbage collection system. Note however that under this + condition ESMF cannot protect against accessing the destroyed object + through dangling aliases - a situation which may lead to hard to debug + application crashes. + +

+It is generally recommended to leave the noGarbage argument + set to .FALSE. (the default), and to take advantage of the ESMF + garbage collection system which will prevent problems with dangling + aliases or incorrect sequences of destroy calls. However this level of + support requires that a small remnant of the object is kept in memory + past the destroy call. This can lead to an unexpected increase in memory + consumption over the course of execution in applications that use + temporary ESMF objects. For situations where the repeated creation and + destruction of temporary objects leads to memory issues, it is + recommended to call with noGarbage set to .TRUE., fully + removing the entire temporary object from memory. + +

+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+28.5.24 ESMF_ArrayHaloStore - Precompute an Array halo operation +

+ +

+ +

+
+INTERFACE: +

     subroutine ESMF_ArrayHaloStore(array, routehandle, &
+       startregion, haloLDepth, haloUDepth, pipelineDepth, rc)
+
ARGUMENTS: +
     type(ESMF_Array),            intent(inout)           :: array
+     type(ESMF_RouteHandle),      intent(inout)           :: routehandle
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     type(ESMF_StartRegion_Flag), intent(in),    optional :: startregion
+     integer,                     intent(in),    optional :: haloLDepth(:)
+     integer,                     intent(in),    optional :: haloUDepth(:)
+     integer,                     intent(inout), optional :: pipelineDepth
+     integer,                     intent(out),   optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    6.1.0
    +
    Added argument pipelineDepth. + The new argument provide access to the tuning parameter + affecting the sparse matrix execution. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Store an Array halo operation over the data in array. By default, + i.e. without specifying startregion, haloLDepth and + haloUDepth, all elements in the total Array region that lie outside + the exclusive region will be considered potential destination elements for + halo. However, only those elements that have a corresponding halo source + element, i.e. an exclusive element on one of the DEs, will be updated under + the halo operation. Elements that have no associated source remain + unchanged under halo. + +

+Specifying startregion allows the shape of the effective halo region + to be changed from the inside. Setting this flag to + ESMF_STARTREGION_COMPUTATIONAL means that only elements outside + the computational region of the Array are considered for potential + destination elements for the halo operation. The default is + ESMF_STARTREGION_EXCLUSIVE. + +

+The haloLDepth and haloUDepth arguments allow to reduce + the extent of the effective halo region. Starting at the region specified + by startregion, the haloLDepth and haloUDepth + define a halo depth in each direction. Note that the maximum halo region is + limited by the total Array region, independent of the actual + haloLDepth and haloUDepth setting. The total Array region is + local DE specific. The haloLDepth and haloUDepth are interpreted + as the maximum desired extent, reducing the potentially larger region + available for the halo operation. + +

+The routine returns an ESMF_RouteHandle that can be used to call + ESMF_ArrayHalo() on any Array that matches + array in type, kind, and + memory layout of the distributed dimensions. However, the size, + number, and index order of undistributed dimensions may be different. + See section 37.2.5 for a more detailed discussion of + RouteHandle reusability. + +

+This call is collective across the current VM. + +

+

+
array
+
ESMF_Array containing data to be haloed. The data in the halo + region may be destroyed by this call. + +
+
routehandle
+
Handle to the precomputed Route. + +
+
[startregion]
+
The start of the effective halo region on every DE. The default + setting is ESMF_STARTREGION_EXCLUSIVE, rendering all non-exclusive + elements potential halo destination elements. + See section 54.56 for a complete list of + valid settings. + +
+
[haloLDepth]
+
This vector specifies the lower corner of the effective halo + region with respect to the lower corner of startregion. + The size of haloLDepth must equal the number of distributed Array + dimensions. + +
+
[haloUDepth]
+
This vector specifies the upper corner of the effective halo + region with respect to the upper corner of startregion. + The size of haloUDepth must equal the number of distributed Array + dimensions. + +
+
[pipelineDepth]
+
The pipelineDepth parameter controls how many messages a PET + may have outstanding during a halo exchange. Larger values + of pipelineDepth typically lead to better performance. However, + on some systems too large a value may lead to performance degradation, + or runtime errors. + +

+Note that the pipeline depth has no effect on the bit-for-bit + reproducibility of the results. However, it may affect the performance + reproducibility of the exchange. + +

+The ESMF_ArraySMMStore() method implements an auto-tuning scheme + for the pipelineDepth parameter. The intent on the + pipelineDepth argument is "inout" in order to + support both overriding and accessing the auto-tuning parameter. + If an argument $>= 0$ is specified, it is used for the + pipelineDepth parameter, and the auto-tuning phase is skipped. + In this case the pipelineDepth argument is not modified on + return. If the provided argument is $< 0$, the pipelineDepth + parameter is determined internally using the auto-tuning scheme. In this + case the pipelineDepth argument is re-set to the internally + determined value on return. Auto-tuning is also used if the optional + pipelineDepth argument is omitted. + +

+

+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+28.5.25 ESMF_ArrayIsCreated - Check whether an Array object has been created +

+ +

+ +

+
+INTERFACE: +

   function ESMF_ArrayIsCreated(array, rc)
+
RETURN VALUE: +
     logical :: ESMF_ArrayIsCreated
+
ARGUMENTS: +
     type(ESMF_Array), intent(in)            :: array
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,          intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Return .true. if the array has been created. Otherwise return + .false.. If an error occurs, i.e. rc /= ESMF_SUCCESS is + returned, the return value of the function will also be .false.. + +

+The arguments are: +

+
array
+
ESMF_Array queried. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+28.5.26 ESMF_ArrayLog - Log Array information +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_ArrayLog(array, prefix, logMsgFlag, deepFlag, rc)
+
ARGUMENTS: +
     type(ESMF_Array),       intent(in)              :: array
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     character(len=*),       intent(in),   optional  :: prefix
+     type(ESMF_LogMsg_Flag), intent(in),   optional  :: logMsgFlag
+     logical,                intent(in),   optional  :: deepFlag
+     integer, intent(out),                 optional  :: rc
+
+DESCRIPTION: +
+ +

+Write information about array to the ESMF default Log. + +

+The arguments are: +

+
array
+
The ESMF_Array object logged. + +
+
[prefix]
+
String to prefix the log message. Default is no prefix. + +
+
[logMsgFlag]
+
Type of log message generated. See section 49.2.3 for + a list of valid message types. Default is ESMF_LOGMSG_INFO. + +
+
[deepFlag]
+
When set to .false. (default), only log top level information about + the Array. + When set to .true., additionally log deep information. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+28.5.27 ESMF_ArrayPrint - Print Array information +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_ArrayPrint(array, rc)
+
ARGUMENTS: +
     type(ESMF_Array), intent(in)            :: array
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,          intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Print internal information of the specified ESMF_Array object. +
+

+The arguments are: +

+
array
+
ESMF_Array object. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+28.5.28 ESMF_ArrayRead - Read Array data from a file +

+ +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_ArrayRead(array, fileName, variableName, &
+     timeslice, iofmt, rc)
+
ARGUMENTS: +
     type(ESMF_Array),      intent(inout)         :: array
+     character(*),          intent(in)            :: fileName
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     character(*),          intent(in),  optional :: variableName
+     integer,               intent(in),  optional :: timeslice
+     type(ESMF_IOFmt_Flag), intent(in),  optional :: iofmt
+     integer,               intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Read Array data from file and put it into an ESMF_Array object. + For this API to be functional, the environment variable ESMF_PIO + should be set to either "internal" or "external" when the ESMF library is built. + Please see the section on Data I/O, 38.2. + +

+Limitations: + +

    +
  • Not supported in ESMF_COMM=mpiuni mode. + +
  • +
+ +

+The arguments are: +

+
array
+
The ESMF_Array object in which the read data is returned. + +
+
fileName
+
The name of the file from which Array data is read. + If this is a multi-tile Array, then fileName must contain + exactly one instance of "*"; this is a placeholder that will be replaced + by the tile number, with each tile being read from a separate file. (For + example, for a fileName of "myfile*.nc", tile 1 will be read from + "myfile1.nc", tile 2 from "myfile2.nc", etc.) + (This handling of the fileName for multi-tile I/O is subject to change.) + +
+
[variableName]
+
Variable name in the file; default is the "name" of Array. + Use this argument only in the I/O format (such as NetCDF) that + supports variable name. If the I/O format does not support this + (such as binary format), ESMF will return an error code. + +
+
[timeslice]
+
The time-slice number of the variable read from file. + +
+
[iofmt]
+
The I/O format. Please see Section 54.30 for the list + of options. If not present, defaults to ESMF_IOFMT_NETCDF. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+28.5.29 ESMF_ArrayRedist - Execute an Array redistribution +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_ArrayRedist(srcArray, dstArray, routehandle, &
+     routesyncflag, finishedflag, cancelledflag, zeroregion, checkflag, rc)
+
ARGUMENTS: +
     type(ESMF_Array),          intent(in),    optional :: srcArray
+     type(ESMF_Array),          intent(inout), optional :: dstArray
+     type(ESMF_RouteHandle),    intent(inout)           :: routehandle
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     type(ESMF_RouteSync_Flag), intent(in),    optional :: routesyncflag
+     logical,                   intent(out),   optional :: finishedflag
+     logical,                   intent(out),   optional :: cancelledflag
+     type(ESMF_Region_Flag),    intent(in),    optional :: zeroregion
+     logical,                   intent(in),    optional :: checkflag
+     integer,                   intent(out),   optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    7.1.0r
    +
    Added argument zeroregion to allow user to control + how the destination array is zero'ed out. This is especially + useful in cases where the source and destination arrays do not + cover the identical index space. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Execute a precomputed Array redistribution from srcArray + to dstArray. + Both srcArray and dstArray must match the respective Arrays + used during ESMF_ArrayRedisttore() in type, kind, and + memory layout of the distributed dimensions. However, the size, + number, and index order of undistributed dimensions may be different. + See section 37.2.5 for a more detailed discussion of + RouteHandle reusability. + +

+The srcArray and dstArray arguments are optional in support of + the situation where srcArray and/or dstArray are not defined on + all PETs. The srcArray and dstArray must be specified on those + PETs that hold source or destination DEs, respectively, but may be omitted + on all other PETs. PETs that hold neither source nor destination DEs may + omit both arguments. + +

+It is erroneous to specify the identical Array object for srcArray and + dstArray arguments. + +

+See ESMF_ArrayRedistStore() on how to precompute + routehandle. + +

+This call is collective across the current VM. + +

+

+
[srcArray]
+
ESMF_Array with source data. + +
+
[dstArray]
+
ESMF_Array with destination data. + +
+
routehandle
+
Handle to the precomputed Route. + +
+
[routesyncflag]
+
Indicate communication option. Default is ESMF_ROUTESYNC_BLOCKING, + resulting in a blocking operation. + See section 54.53 for a complete list of valid settings. + +
+
[finishedflag]
+
Used in combination with routesyncflag = ESMF_ROUTESYNC_NBTESTFINISH. + Returned finishedflag equal to .true. indicates that all + operations have finished. A value of .false. indicates that there + are still unfinished operations that require additional calls with + routesyncflag = ESMF_ROUTESYNC_NBTESTFINISH, or a final call with + routesyncflag = ESMF_ROUTESYNC_NBWAITFINISH. For all other routesyncflag + settings the returned value in finishedflag is always .true.. + +
+
[cancelledflag]
+
A value of .true. indicates that were cancelled communication + operations. In this case the data in the dstArray must be considered + invalid. It may have been partially modified by the call. A value of + .false. indicates that none of the communication operations was + cancelled. The data in dstArray is valid if finishedflag + returns equal .true.. + +
+
[zeroregion]
+
If set to ESMF_REGION_TOTAL the total regions of + all DEs in dstArray will be initialized to zero before updating the + elements with the results of the sparse matrix multiplication. If set to + ESMF_REGION_EMPTY the elements in dstArray will not be + modified prior to the sparse matrix multiplication and results will be + added to the incoming element values. Setting zeroregion to + ESMF_REGION_SELECT will only zero out those elements in the + destination Array that will be updated by the sparse matrix + multiplication. See section 54.50 for a complete list of + valid settings. The default is ESMF_REGION_SELECT. + +
+
[checkflag]
+
If set to .TRUE. the input Array pair will be checked for + consistency with the precomputed operation provided by routehandle. + If set to .FALSE. (default) only a very basic input check + will be performed, leaving many inconsistencies undetected. Set + checkflag to .FALSE. to achieve highest performance. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+28.5.30 ESMF_ArrayRedistRelease - Release resources associated with Array redistribution +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_ArrayRedistRelease(routehandle, noGarbage, rc)
+
ARGUMENTS: +
     type(ESMF_RouteHandle), intent(inout)         :: routehandle
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     logical,                intent(in),  optional :: noGarbage
+     integer,                intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    8.0.0
    +
    Added argument noGarbage. + The argument provides a mechanism to override the default garbage collection + mechanism when destroying an ESMF object. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Release resources associated with an Array redistribution. After this call + routehandle becomes invalid. + +

+

+
routehandle
+
Handle to the precomputed Route. + +
+
[noGarbage]
+
If set to .TRUE. the object will be fully destroyed and removed + from the ESMF garbage collection system. Note however that under this + condition ESMF cannot protect against accessing the destroyed object + through dangling aliases - a situation which may lead to hard to debug + application crashes. + +

+It is generally recommended to leave the noGarbage argument + set to .FALSE. (the default), and to take advantage of the ESMF + garbage collection system which will prevent problems with dangling + aliases or incorrect sequences of destroy calls. However this level of + support requires that a small remnant of the object is kept in memory + past the destroy call. This can lead to an unexpected increase in memory + consumption over the course of execution in applications that use + temporary ESMF objects. For situations where the repeated creation and + destruction of temporary objects leads to memory issues, it is + recommended to call with noGarbage set to .TRUE., fully + removing the entire temporary object from memory. + +

+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+28.5.31 ESMF_ArrayRedistStore - Precompute Array redistribution with local factor argument +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_ArrayRedistStore()
+   subroutine ESMF_ArrayRedistStore<type><kind>(srcArray, dstArray, &
+     routehandle, factor, srcToDstTransposeMap, &
+     ignoreUnmatchedIndices, pipelineDepth, rc)
+
ARGUMENTS: +
     type(ESMF_Array),       intent(in)              :: srcArray
+     type(ESMF_Array),       intent(inout)           :: dstArray
+     type(ESMF_RouteHandle), intent(inout)           :: routehandle
+     <type>(ESMF_KIND_<kind>),intent(in)             :: factor
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,                intent(in),    optional :: srcToDstTransposeMap(:)
+     logical,                intent(in),    optional :: ignoreUnmatchedIndices
+     integer,                intent(inout), optional :: pipelineDepth
+     integer,                intent(out),   optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    6.1.0
    +
    Added argument pipelineDepth. + The new argument provide access to the tuning parameter + affecting the sparse matrix execution. + +
    +
    7.0.0
    +
    Added argument transposeRoutehandle to allow a handle to + the transposed redist operation to be returned. +
    +Added argument ignoreUnmatchedIndices to support situations + where not all elements between source and destination Arrays + match. + +
    +
    7.1.0r
    +
    Removed argument transposeRoutehandle and provide it + via interface overloading instead. This allows argument + srcArray to stay strictly intent(in) for this entry point. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+ ESMF_ArrayRedistStore() is a collective method across all PETs of the + current Component. The interface of the method is overloaded, allowing + - in principle - each PET to call into ESMF_ArrayRedistStore() + through a different entry point. Restrictions apply as to which combinations + are sensible. All other combinations result in ESMF run time errors. The + complete semantics of the ESMF_ArrayRedistStore() method, as provided + through the separate entry points shown in 28.5.31 and + 28.5.33, is described in the following paragraphs as a whole. + +

+Store an Array redistribution operation from srcArray to dstArray. + Interface 28.5.31 allows PETs to specify a factor + argument. PETs not specifying a factor argument call into interface + 28.5.33. If multiple PETs specify the factor argument, + its type and kind, as well as its value must match across all PETs. If none + of the PETs specify a factor argument the default will be a factor of + 1. The resulting factor is applied to all of the source data during + redistribution, allowing scaling of the data, e.g. for unit transformation. + +

+Both srcArray and dstArray are interpreted as sequentialized + vectors. The sequence is defined by the order of DistGrid dimensions and the + order of tiles within the DistGrid or by user-supplied arbitrary sequence + indices. See section 28.2.18 for details on the definition + of sequence indices. + +

+Source Array, destination Array, and the factor may be of different + <type><kind>. Further, source and destination Arrays may differ in shape, + however, the number of elements must match. + +

+The default redistribution operation, when srcToDstTransposeMap is not + specified, corresponds to the identity mapping: each element of the + sequentialized source Array is copied to the sequentialized + destination Array element in order. + +

+If the srcToDstTransposeMap argument is provided it must be identical + across all PETs. The srcToDstTransposeMap allows source and destination + Array dimensions to be transposed during the redistribution. To support this + option, the number of source and destination Array dimensions must be equal + and the size of the associated dimensions must match. + See section 28.2.17 for more details about the + use of the srcToDstTransposeMap argument. + +

+It is erroneous to specify the identical Array object for srcArray and + dstArray arguments. + +

+The routine returns an ESMF_RouteHandle that can be used to call + ESMF_ArrayRedist() on any pair of Arrays that matches + srcArray and dstArray in type, kind, and + memory layout of the distributed dimensions. However, the size, + number, and index order of undistributed dimensions may be different. + See section 37.2.5 for a more detailed discussion of + RouteHandle reusability. + +

+This method is overloaded for: +
+ ESMF_TYPEKIND_I4, ESMF_TYPEKIND_I8, +
+ ESMF_TYPEKIND_R4, ESMF_TYPEKIND_R8. +
+ +

+This call is collective across the current VM. + +

+

+
srcArray
+
ESMF_Array with source data. + +

+

+
dstArray
+
ESMF_Array with destination data. The data in this Array may be + destroyed by this call. + +

+

+
routehandle
+
Handle to the precomputed Route. + +

+

+
factor
+
Factor by which to multiply source data. + +

+

+
[srcToDstTransposeMap]
+
A list with as many entries as there are dimensions in srcArray, or + tileCount times this many entries. + Each entry maps the corresponding srcArray dimension against the + specified dstArray dimension. Mixing distributed and + undistributed dimensions is supported. + Negative entries reverse the order of elements along the specified + dimension when going from source to destination. + When providing +$rank \times tileCount$ elements in + srcToDstTransposeMap, each block of size rank is associated + with the corresponding tile (in order), and interpreted as the + tile-specific transpose map. + +

+

+
[ignoreUnmatchedIndices]
+
A logical flag that affects the behavior for when not all elements match + between the srcArray and dstArray side. The default setting + is .false., indicating that it is an error when such a situation is + encountered. Setting ignoreUnmatchedIndices to .true. ignores + unmatched indices. + +

+

+
[pipelineDepth]
+
The pipelineDepth parameter controls how many messages a PET + may have outstanding during a redist exchange. Larger values + of pipelineDepth typically lead to better performance. However, + on some systems too large a value may lead to performance degradation, + or runtime errors. + +

+Note that the pipeline depth has no effect on the bit-for-bit + reproducibility of the results. However, it may affect the performance + reproducibility of the exchange. + +

+The ESMF_ArraySMMStore() method implements an auto-tuning scheme + for the pipelineDepth parameter. The intent on the + pipelineDepth argument is "inout" in order to + support both overriding and accessing the auto-tuning parameter. + If an argument $>= 0$ is specified, it is used for the + pipelineDepth parameter, and the auto-tuning phase is skipped. + In this case the pipelineDepth argument is not modified on + return. If the provided argument is $< 0$, the pipelineDepth + parameter is determined internally using the auto-tuning scheme. In this + case the pipelineDepth argument is re-set to the internally + determined value on return. Auto-tuning is also used if the optional + pipelineDepth argument is omitted. + +

+

+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+28.5.32 ESMF_ArrayRedistStore - Precompute Array redistribution and transpose with local factor argument +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_ArrayRedistStore()
+   subroutine ESMF_ArrayRedistStore<type><kind>TP(srcArray, dstArray, &
+     routehandle, transposeRoutehandle, factor, &
+     srcToDstTransposeMap, ignoreUnmatchedIndices, pipelineDepth, rc)
+
ARGUMENTS: +
     type(ESMF_Array),       intent(inout)           :: srcArray
+     type(ESMF_Array),       intent(inout)           :: dstArray
+     type(ESMF_RouteHandle), intent(inout)           :: routehandle
+     type(ESMF_RouteHandle), intent(inout)           :: transposeRoutehandle
+     <type>(ESMF_KIND_<kind>),intent(in)             :: factor
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,                intent(in),    optional :: srcToDstTransposeMap(:)
+     logical,                intent(in),    optional :: ignoreUnmatchedIndices
+     integer,                intent(inout), optional :: pipelineDepth
+     integer,                intent(out),   optional :: rc
+
+DESCRIPTION: +
+ +

+ ESMF_ArrayRedistStore() is a collective method across all PETs of the + current Component. The interface of the method is overloaded, allowing + - in principle - each PET to call into ESMF_ArrayRedistStore() + through a different entry point. Restrictions apply as to which combinations + are sensible. All other combinations result in ESMF run time errors. The + complete semantics of the ESMF_ArrayRedistStore() method, as provided + through the separate entry points shown in 28.5.32 and + 28.5.34, is described in the following paragraphs as a whole. + +

+Store an Array redistribution operation from srcArray to dstArray. + Interface 28.5.32 allows PETs to specify a factor + argument. PETs not specifying a factor argument call into interface + 28.5.34. If multiple PETs specify the factor argument, + its type and kind, as well as its value must match across all PETs. If none + of the PETs specify a factor argument the default will be a factor of + 1. The resulting factor is applied to all of the source data during + redistribution, allowing scaling of the data, e.g. for unit transformation. + +

+Both srcArray and dstArray are interpreted as sequentialized + vectors. The sequence is defined by the order of DistGrid dimensions and the + order of tiles within the DistGrid or by user-supplied arbitrary sequence + indices. See section 28.2.18 for details on the definition + of sequence indices. + +

+Source Array, destination Array, and the factor may be of different + <type><kind>. Further, source and destination Arrays may differ in shape, + however, the number of elements must match. + +

+The default redistribution operation, when srcToDstTransposeMap is not + specified, corresponds to the identity mapping: each element of the + sequentialized source Array is copied to the sequentialized + destination Array element in order. + +

+If the srcToDstTransposeMap argument is provided it must be identical + across all PETs. The srcToDstTransposeMap allows source and destination + Array dimensions to be transposed during the redistribution. To support this + option, the number of source and destination Array dimensions must be equal + and the size of the associated dimensions must match. + See section 28.2.17 for more details about the + use of the srcToDstTransposeMap argument. + +

+It is erroneous to specify the identical Array object for srcArray and + dstArray arguments. + +

+The routine returns an ESMF_RouteHandle that can be used to call + ESMF_ArrayRedist() on any pair of Arrays that matches + srcArray and dstArray in type, kind, and + memory layout of the distributed dimensions. However, the size, + number, and index order of undistributed dimensions may be different. + See section 37.2.5 for a more detailed discussion of + RouteHandle reusability. + +

+This method is overloaded for: +
+ ESMF_TYPEKIND_I4, ESMF_TYPEKIND_I8, +
+ ESMF_TYPEKIND_R4, ESMF_TYPEKIND_R8. +
+ +

+This call is collective across the current VM. + +

+

+
srcArray
+
ESMF_Array with source data. The data in this Array may be + destroyed by this call. + +

+

+
dstArray
+
ESMF_Array with destination data. The data in this Array may be + destroyed by this call. + +

+

+
routehandle
+
Handle to the precomputed Route. + +

+

+
transposeRoutehandle
+
Handle to the transposed matrix operation. The transposed operation goes + from dstArray to srcArray. + +

+

+
factor
+
Factor by which to multiply source data. + +

+

+
[srcToDstTransposeMap]
+
A list with as many entries as there are dimensions in srcArray, or + tileCount times this many entries. + Each entry maps the corresponding srcArray dimension against the + specified dstArray dimension. Mixing distributed and + undistributed dimensions is supported. + Negative entries reverse the order of elements along the specified + dimension when going from source to destination. + When providing +$rank \times tileCount$ elements in + srcToDstTransposeMap, each block of size rank is associated + with the corresponding tile (in order), and interpreted as the + tile-specific transpose map. + +

+

+
[ignoreUnmatchedIndices]
+
A logical flag that affects the behavior for when not all elements match + between the srcArray and dstArray side. The default setting + is .false., indicating that it is an error when such a situation is + encountered. Setting ignoreUnmatchedIndices to .true. ignores + unmatched indices. + +

+

+
[pipelineDepth]
+
The pipelineDepth parameter controls how many messages a PET + may have outstanding during a redist exchange. Larger values + of pipelineDepth typically lead to better performance. However, + on some systems too large a value may lead to performance degradation, + or runtime errors. + +

+Note that the pipeline depth has no effect on the bit-for-bit + reproducibility of the results. However, it may affect the performance + reproducibility of the exchange. + +

+The ESMF_ArraySMMStore() method implements an auto-tuning scheme + for the pipelineDepth parameter. The intent on the + pipelineDepth argument is "inout" in order to + support both overriding and accessing the auto-tuning parameter. + If an argument $>= 0$ is specified, it is used for the + pipelineDepth parameter, and the auto-tuning phase is skipped. + In this case the pipelineDepth argument is not modified on + return. If the provided argument is $< 0$, the pipelineDepth + parameter is determined internally using the auto-tuning scheme. In this + case the pipelineDepth argument is re-set to the internally + determined value on return. Auto-tuning is also used if the optional + pipelineDepth argument is omitted. + +

+

+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+28.5.33 ESMF_ArrayRedistStore - Precompute Array redistribution without local factor argument +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_ArrayRedistStore()
+   subroutine ESMF_ArrayRedistStoreNF(srcArray, dstArray, routehandle, &
+     srcToDstTransposeMap, ignoreUnmatchedIndices, &
+     pipelineDepth, rc)
+
ARGUMENTS: +
     type(ESMF_Array),       intent(in)              :: srcArray
+     type(ESMF_Array),       intent(inout)           :: dstArray
+     type(ESMF_RouteHandle), intent(inout)           :: routehandle
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,                intent(in),    optional :: srcToDstTransposeMap(:)
+     logical,                intent(in),    optional :: ignoreUnmatchedIndices
+     integer,                intent(inout), optional :: pipelineDepth
+     integer,                intent(out),   optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    6.1.0
    +
    Added argument pipelineDepth. + The new argument provide access to the tuning parameter + affecting the sparse matrix execution. + +
    +
    7.0.0
    +
    Added argument transposeRoutehandle to allow a handle to + the transposed redist operation to be returned. +
    +Added argument ignoreUnmatchedIndices to support situations + where not all elements between source and destination Arrays + match. + +
    +
    7.1.0r
    +
    Removed argument transposeRoutehandle and provide it + via interface overloading instead. This allows argument + srcArray to stay strictly intent(in) for this entry point. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+ ESMF_ArrayRedistStore() is a collective method across all PETs of the + current Component. The interface of the method is overloaded, allowing + - in principle - each PET to call into ESMF_ArrayRedistStore() + through a different entry point. Restrictions apply as to which combinations + are sensible. All other combinations result in ESMF run time errors. The + complete semantics of the ESMF_ArrayRedistStore() method, as provided + through the separate entry points shown in 28.5.31 and + 28.5.33, is described in the following paragraphs as a whole. + +

+Store an Array redistribution operation from srcArray to dstArray. + Interface 28.5.31 allows PETs to specify a factor + argument. PETs not specifying a factor argument call into interface + 28.5.33. If multiple PETs specify the factor argument, + its type and kind, as well as its value must match across all PETs. If none + of the PETs specify a factor argument the default will be a factor of + 1. The resulting factor is applied to all of the source data during + redistribution, allowing scaling of the data, e.g. for unit transformation. + +

+Both srcArray and dstArray are interpreted as sequentialized + vectors. The sequence is defined by the order of DistGrid dimensions and the + order of tiles within the DistGrid or by user-supplied arbitrary sequence + indices. See section 28.2.18 for details on the definition + of sequence indices. + +

+Source Array, destination Array, and the factor may be of different + <type><kind>. Further, source and destination Arrays may differ in shape, + however, the number of elements must match. + +

+The default redistribution operation, when srcToDstTransposeMap is not + specified, corresponds to the identity mapping: each element of the + sequentialized source Array is copied to the sequentialized + destination Array element in order. + +

+If the srcToDstTransposeMap argument is provided it must be identical + across all PETs. The srcToDstTransposeMap allows source and destination + Array dimensions to be transposed during the redistribution. To support this + option, the number of source and destination Array dimensions must be equal + and the size of the associated dimensions must match. + See section 28.2.17 for more details about the + use of the srcToDstTransposeMap argument. + +

+It is erroneous to specify the identical Array object for srcArray and + dstArray arguments. + +

+The routine returns an ESMF_RouteHandle that can be used to call + ESMF_ArrayRedist() on any pair of Arrays that matches + srcArray and dstArray in type, kind, and + memory layout of the distributed dimensions. However, the size, + number, and index order of undistributed dimensions may be different. + See section 37.2.5 for a more detailed discussion of + RouteHandle reusability. + +

+This call is collective across the current VM. + +

+

+
srcArray
+
ESMF_Array with source data. + +

+

+
dstArray
+
ESMF_Array with destination data. The data in this Array may be + destroyed by this call. + +

+

+
routehandle
+
Handle to the precomputed Route. + +

+

+
[srcToDstTransposeMap]
+
A list with as many entries as there are dimensions in srcArray, or + tileCount times this many entries. + Each entry maps the corresponding srcArray dimension against the + specified dstArray dimension. Mixing distributed and + undistributed dimensions is supported. + Negative entries reverse the order of elements along the specified + dimension when going from source to destination. + When providing +$rank \times tileCount$ elements in + srcToDstTransposeMap, each block of size rank is associated + with the corresponding tile (in order), and interpreted as the + tile-specific transpose map. + +

+

+
[ignoreUnmatchedIndices]
+
A logical flag that affects the behavior for when not all elements match + between the srcArray and dstArray side. The default setting + is .false., indicating that it is an error when such a situation is + encountered. Setting ignoreUnmatchedIndices to .true. ignores + unmatched indices. + +

+

+
[pipelineDepth]
+
The pipelineDepth parameter controls how many messages a PET + may have outstanding during a redist exchange. Larger values + of pipelineDepth typically lead to better performance. However, + on some systems too large a value may lead to performance degradation, + or runtime errors. + +

+Note that the pipeline depth has no effect on the bit-for-bit + reproducibility of the results. However, it may affect the performance + reproducibility of the exchange. + +

+The ESMF_ArraySMMStore() method implements an auto-tuning scheme + for the pipelineDepth parameter. The intent on the + pipelineDepth argument is "inout" in order to + support both overriding and accessing the auto-tuning parameter. + If an argument $>= 0$ is specified, it is used for the + pipelineDepth parameter, and the auto-tuning phase is skipped. + In this case the pipelineDepth argument is not modified on + return. If the provided argument is $< 0$, the pipelineDepth + parameter is determined internally using the auto-tuning scheme. In this + case the pipelineDepth argument is re-set to the internally + determined value on return. Auto-tuning is also used if the optional + pipelineDepth argument is omitted. + +

+

+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+28.5.34 ESMF_ArrayRedistStore - Precompute Array redistribution and transpose without local factor argument +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_ArrayRedistStore()
+   subroutine ESMF_ArrayRedistStoreNFTP(srcArray, dstArray, routehandle, &
+     transposeRoutehandle, srcToDstTransposeMap, &
+     ignoreUnmatchedIndices, pipelineDepth, rc)
+
ARGUMENTS: +
     type(ESMF_Array),       intent(inout)           :: srcArray
+     type(ESMF_Array),       intent(inout)           :: dstArray
+     type(ESMF_RouteHandle), intent(inout)           :: routehandle
+     type(ESMF_RouteHandle), intent(inout)           :: transposeRoutehandle
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,                intent(in),    optional :: srcToDstTransposeMap(:)
+     logical,                intent(in),    optional :: ignoreUnmatchedIndices
+     integer,                intent(inout), optional :: pipelineDepth
+     integer,                intent(out),   optional :: rc
+
+DESCRIPTION: +
+ +

+ ESMF_ArrayRedistStore() is a collective method across all PETs of the + current Component. The interface of the method is overloaded, allowing + - in principle - each PET to call into ESMF_ArrayRedistStore() + through a different entry point. Restrictions apply as to which combinations + are sensible. All other combinations result in ESMF run time errors. The + complete semantics of the ESMF_ArrayRedistStore() method, as provided + through the separate entry points shown in 28.5.32 and + 28.5.34, is described in the following paragraphs as a whole. + +

+Store an Array redistribution operation from srcArray to dstArray. + Interface 28.5.32 allows PETs to specify a factor + argument. PETs not specifying a factor argument call into interface + 28.5.34. If multiple PETs specify the factor argument, + its type and kind, as well as its value must match across all PETs. If none + of the PETs specify a factor argument the default will be a factor of + 1. The resulting factor is applied to all of the source data during + redistribution, allowing scaling of the data, e.g. for unit transformation. + +

+Both srcArray and dstArray are interpreted as sequentialized + vectors. The sequence is defined by the order of DistGrid dimensions and the + order of tiles within the DistGrid or by user-supplied arbitrary sequence + indices. See section 28.2.18 for details on the definition + of sequence indices. + +

+Source Array, destination Array, and the factor may be of different + <type><kind>. Further, source and destination Arrays may differ in shape, + however, the number of elements must match. + +

+The default redistribution operation, when srcToDstTransposeMap is not + specified, corresponds to the identity mapping: each element of the + sequentialized source Array is copied to the sequentialized + destination Array element in order. + +

+If the srcToDstTransposeMap argument is provided it must be identical + across all PETs. The srcToDstTransposeMap allows source and destination + Array dimensions to be transposed during the redistribution. To support this + option, the number of source and destination Array dimensions must be equal + and the size of the associated dimensions must match. + See section 28.2.17 for more details about the + use of the srcToDstTransposeMap argument. + +

+It is erroneous to specify the identical Array object for srcArray and + dstArray arguments. + +

+The routine returns an ESMF_RouteHandle that can be used to call + ESMF_ArrayRedist() on any pair of Arrays that matches + srcArray and dstArray in type, kind, and + memory layout of the distributed dimensions. However, the size, + number, and index order of undistributed dimensions may be different. + See section 37.2.5 for a more detailed discussion of + RouteHandle reusability. + +

+This call is collective across the current VM. + +

+

+
srcArray
+
ESMF_Array with source data. The data in this Array may be + destroyed by this call. + +

+

+
dstArray
+
ESMF_Array with destination data. The data in this Array may be + destroyed by this call. + +

+

+
routehandle
+
Handle to the precomputed Route. + +

+

+
transposeRoutehandle
+
Handle to the transposed matrix operation. The transposed operation goes + from dstArray to srcArray. + +

+

+
[srcToDstTransposeMap]
+
A list with as many entries as there are dimensions in srcArray, or + tileCount times this many entries. + Each entry maps the corresponding srcArray dimension against the + specified dstArray dimension. Mixing distributed and + undistributed dimensions is supported. + Negative entries reverse the order of elements along the specified + dimension when going from source to destination. + When providing +$rank \times tileCount$ elements in + srcToDstTransposeMap, each block of size rank is associated + with the corresponding tile (in order), and interpreted as the + tile-specific transpose map. + +

+

+
[ignoreUnmatchedIndices]
+
A logical flag that affects the behavior for when not all elements match + between the srcArray and dstArray side. The default setting + is .false., indicating that it is an error when such a situation is + encountered. Setting ignoreUnmatchedIndices to .true. ignores + unmatched indices. + +

+

+
[pipelineDepth]
+
The pipelineDepth parameter controls how many messages a PET + may have outstanding during a redist exchange. Larger values + of pipelineDepth typically lead to better performance. However, + on some systems too large a value may lead to performance degradation, + or runtime errors. + +

+Note that the pipeline depth has no effect on the bit-for-bit + reproducibility of the results. However, it may affect the performance + reproducibility of the exchange. + +

+The ESMF_ArraySMMStore() method implements an auto-tuning scheme + for the pipelineDepth parameter. The intent on the + pipelineDepth argument is "inout" in order to + support both overriding and accessing the auto-tuning parameter. + If an argument $>= 0$ is specified, it is used for the + pipelineDepth parameter, and the auto-tuning phase is skipped. + In this case the pipelineDepth argument is not modified on + return. If the provided argument is $< 0$, the pipelineDepth + parameter is determined internally using the auto-tuning scheme. In this + case the pipelineDepth argument is re-set to the internally + determined value on return. Auto-tuning is also used if the optional + pipelineDepth argument is omitted. + +

+

+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ + +

+ +

+ +

+ +

+28.5.35 ESMF_ArrayScatter - Scatter a Fortran array across the ESMF_Array +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_ArrayScatter(array, farray, rootPet, tile, vm, rc)
+
ARGUMENTS: +
   type(ESMF_Array), intent(inout) :: array 
+   <type> (ESMF_KIND_<kind>), intent(in), target :: farray(<rank>) 
+   integer, intent(in) :: rootPet 
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+   integer, intent(in), optional :: tile 
+   type(ESMF_VM), intent(in), optional :: vm 
+   integer, intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Scatter the data of farray located on rootPET + across an ESMF_Array object. A single farray must be + scattered across a single DistGrid tile in Array. The optional tile + argument allows selection of the tile. For Arrays defined on a single + tile DistGrid the default selection (tile 1) will be correct. The + shape of farray must match the shape of the tile in Array. + +

+If the Array contains replicating DistGrid dimensions data will be + scattered across all of the replicated pieces. + +

+This version of the interface implements the PET-based blocking paradigm: + Each PET of the VM must issue this call exactly once for all of its + DEs. The call will block until all PET-local data objects are accessible. + +

+The arguments are: +

+
array
+
The ESMF_Array object across which data will be scattered. + +
+
{farray}
+
The Fortran array that is to be scattered. Only root + must provide a valid farray, the other PETs may treat + farray as an optional argument. + +
+
rootPet
+
PET that holds the valid data in farray. + +
+
[tile]
+
The DistGrid tile in array into which to scatter farray. + By default farray will be scattered into tile 1. + +
+
[vm]
+
Optional ESMF_VM object of the current context. Providing the + VM of the current context will lower the method's overhead. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ + +

+ +

+ +

+ +

+28.5.36 ESMF_ArraySet - Set object-wide Array information +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_ArraySet()
+   subroutine ESMF_ArraySetDefault(array, computationalLWidth, &
+     computationalUWidth, name, rc)
+
ARGUMENTS: +
     type(ESMF_Array),   intent(inout)         :: array
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,            intent(in),  optional :: computationalLWidth(:,:)
+     integer,            intent(in),  optional :: computationalUWidth(:,:)
+     character(len = *), intent(in),  optional :: name
+     integer,            intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Sets adjustable settings in an ESMF_Array object. Arrays with + tensor dimensions will set values for all tensor components. + +

+The arguments are: +

+
array
+
ESMF_Array object for which to set properties. + +
+
[computationalLWidth]
+
This argument must have of size (dimCount, localDeCount). + computationalLWidth specifies the lower corner of the + computational region with respect to the lower corner of the exclusive + region for all local DEs. + +
+
[computationalUWidth]
+
This argument must have of size (dimCount, localDeCount). + computationalUWidth specifies the upper corner of the + computational region with respect to the upper corner of the exclusive + region for all local DEs. + +
+
[name]
+
The Array name. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+28.5.37 ESMF_ArraySet - Set DE-local Array information +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_ArraySet()
+   subroutine ESMF_ArraySetPLocalDe(array, localDe, rimSeqIndex, rc)
+
ARGUMENTS: +
     type(ESMF_Array),   intent(inout)         :: array
+     integer,            intent(in)            :: localDe
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,            intent(in),  optional :: rimSeqIndex(:)
+     integer,            intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Sets adjustable settings in an ESMF_Array object for a specific + localDe. + +

+The arguments are: +

+
array
+
ESMF_Array object for which to set properties. + +
+
localDe
+
Local DE for which to set values. + +
+
[rimSeqIndex]
+
Sequence indices in the halo rim of localDe. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+28.5.38 ESMF_ArraySMM - Execute an Array sparse matrix multiplication +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_ArraySMM(srcArray, dstArray, routehandle, &
+     routesyncflag, finishedflag, cancelledflag, zeroregion, termorderflag, &
+     checkflag, dynamicMask, rc)
+
ARGUMENTS: +
     type(ESMF_Array),               intent(in),    optional :: srcArray
+     type(ESMF_Array),               intent(inout), optional :: dstArray
+     type(ESMF_RouteHandle),         intent(inout)           :: routehandle
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     type(ESMF_RouteSync_Flag),      intent(in),    optional :: routesyncflag
+     logical,                        intent(out),   optional :: finishedflag
+     logical,                        intent(out),   optional :: cancelledflag
+     type(ESMF_Region_Flag),         intent(in),    optional :: zeroregion
+     type(ESMF_TermOrder_Flag),      intent(in),    optional :: termorderflag
+     logical,                        intent(in),    optional :: checkflag
+     type(ESMF_DynamicMask), target, intent(in),    optional :: dynamicMask
+     integer,                        intent(out),   optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    6.1.0
    +
    Added argument termorderflag. + The new argument gives the user control over the order in which + the src terms are summed up. + +
    +
    7.1.0r
    +
    Added argument dynamicMask. + The new argument supports the dynamic masking feature. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Execute a precomputed Array sparse matrix multiplication from srcArray + to dstArray. + Both srcArray and dstArray must match the respective Arrays + used during ESMF_ArraySMMStore() in type, kind, and + memory layout of the distributed dimensions. However, the size, + number, and index order of undistributed dimensions may be different. See section + 37.2.5 for a more detailed discussion of RouteHandle + reusability. + +

+The srcArray and dstArray arguments are optional in support of + the situation where srcArray and/or dstArray are not defined on + all PETs. The srcArray and dstArray must be specified on those + PETs that hold source or destination DEs, respectively, but may be omitted + on all other PETs. PETs that hold neither source nor destination DEs may + omit both arguments. + +

+It is erroneous to specify the identical Array object for srcArray and + dstArray arguments. + +

+See ESMF_ArraySMMStore() on how to precompute + routehandle. See section 28.2.18 for details on the + operation ESMF_ArraySMM() performs. + +

+This call is collective across the current VM. + +

+

+
[srcArray]
+
ESMF_Array with source data. + +
+
[dstArray]
+
ESMF_Array with destination data. + +
+
routehandle
+
Handle to the precomputed Route. + +
+
[routesyncflag]
+
Indicate communication option. Default is ESMF_ROUTESYNC_BLOCKING, + resulting in a blocking operation. + See section 54.53 for a complete list of valid settings. + +
+
[finishedflag]
+
Used in combination with routesyncflag = ESMF_ROUTESYNC_NBTESTFINISH. + Returned finishedflag equal to .true. indicates that all + operations have finished. A value of .false. indicates that there + are still unfinished operations that require additional calls with + routesyncflag = ESMF_ROUTESYNC_NBTESTFINISH, or a final call with + routesyncflag = ESMF_ROUTESYNC_NBWAITFINISH. For all other routesyncflag + settings the returned value in finishedflag is always .true.. + +
+
[cancelledflag]
+
A value of .true. indicates that were cancelled communication + operations. In this case the data in the dstArray must be considered + invalid. It may have been partially modified by the call. A value of + .false. indicates that none of the communication operations was + cancelled. The data in dstArray is valid if finishedflag + returns equal .true.. + +
+
[zeroregion]
+
If set to ESMF_REGION_TOTAL (default) the total regions of + all DEs in dstArray will be initialized to zero before updating the + elements with the results of the sparse matrix multiplication. If set to + ESMF_REGION_EMPTY the elements in dstArray will not be + modified prior to the sparse matrix multiplication and results will be + added to the incoming element values. Setting zeroregion to + ESMF_REGION_SELECT will only zero out those elements in the + destination Array that will be updated by the sparse matrix + multiplication. See section 54.50 for a complete list of + valid settings. + +
+
[termorderflag]
+
Specifies the order of the source side terms in all of the destination + sums. The termorderflag only affects the order of terms during + the execution of the RouteHandle. See the 37.2.1 section for an + in-depth discussion of all bit-for-bit reproducibility + aspects related to route-based communication methods. + See 54.60 for a full list of options. + The default setting depends on whether the dynamicMask argument + is present or not. With dynamicMask argument present, the default + of termorderflag is ESMF_TERMORDER_SRCSEQ. This ensures + that all source terms are present on the destination side, and + the interpolation can be calculated as a single sum. When + dynamicMask is absent, the default of termorderflag is + ESMF_TERMORDER_FREE, allowing maximum flexibility and partial + sums for optimum performance. + +
+
[checkflag]
+
If set to .TRUE. the input Array pair will be checked for + consistency with the precomputed operation provided by routehandle. + If set to .FALSE. (default) only a very basic input check + will be performed, leaving many inconsistencies undetected. Set + checkflag to .FALSE. to achieve highest performance. + +
+
[dynamicMask]
+
Object holding dynamic masking information. + See section 37.2.6 for a discussion of dynamic masking. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+28.5.39 ESMF_ArraySMMRelease - Release resources associated with Array sparse matrix multiplication +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_ArraySMMRelease(routehandle, noGarbage, rc)
+
ARGUMENTS: +
     type(ESMF_RouteHandle), intent(inout)         :: routehandle
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     logical,                intent(in),  optional :: noGarbage
+     integer,                intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    8.0.0
    +
    Added argument noGarbage. + The argument provides a mechanism to override the default garbage collection + mechanism when destroying an ESMF object. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Release resources associated with an Array sparse matrix multiplication. + After this call routehandle becomes invalid. + +

+

+
routehandle
+
Handle to the precomputed Route. + +
+
[noGarbage]
+
If set to .TRUE. the object will be fully destroyed and removed + from the ESMF garbage collection system. Note however that under this + condition ESMF cannot protect against accessing the destroyed object + through dangling aliases - a situation which may lead to hard to debug + application crashes. + +

+It is generally recommended to leave the noGarbage argument + set to .FALSE. (the default), and to take advantage of the ESMF + garbage collection system which will prevent problems with dangling + aliases or incorrect sequences of destroy calls. However this level of + support requires that a small remnant of the object is kept in memory + past the destroy call. This can lead to an unexpected increase in memory + consumption over the course of execution in applications that use + temporary ESMF objects. For situations where the repeated creation and + destruction of temporary objects leads to memory issues, it is + recommended to call with noGarbage set to .TRUE., fully + removing the entire temporary object from memory. + +

+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+28.5.40 ESMF_ArraySMMStore - Precompute Array sparse matrix multiplication with local factors +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_ArraySMMStore()
+   subroutine ESMF_ArraySMMStore<type><kind>(srcArray, dstArray, &
+     routehandle, factorList, factorIndexList, &
+     ignoreUnmatchedIndices, srcTermProcessing, pipelineDepth, rc)
+
ARGUMENTS: +
     type(ESMF_Array),          intent(in)              :: srcArray
+     type(ESMF_Array),          intent(inout)           :: dstArray
+     type(ESMF_RouteHandle),    intent(inout)           :: routehandle
+     <type>(ESMF_KIND_<kind>), target, intent(in)       :: factorList(:)
+     integer(ESMF_KIND_<kind>), intent(in)              :: factorIndexList(:,:)
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     logical,                   intent(in),    optional :: ignoreUnmatchedIndices
+     integer,                   intent(inout), optional :: srcTermProcessing
+     integer,                   intent(inout), optional :: pipelineDepth
+     integer,                   intent(out),   optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    6.1.0
    +
    Added argument srcTermProcessing. + Added argument pipelineDepth. + The new arguments provide access to the tuning parameters + affecting the sparse matrix execution. + +
    +
    7.0.0
    +
    Added argument transposeRoutehandle to allow a handle to + the transposed matrix operation to be returned. +
    +Added argument ignoreUnmatchedIndices to support sparse + matrices that contain elements with indices that do not have a + match within the source or destination Array. + +
    +
    7.1.0r
    +
    Removed argument transposeRoutehandle and provide it + via interface overloading instead. This allows argument + srcArray to stay strictly intent(in) for this entry point. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+ ESMF_ArraySMMStore() is a collective method across all PETs of the + current Component. The interface of the method is overloaded, allowing + - in principle - each PET to call into ESMF_ArraySMMStore() + through a different entry point. Restrictions apply as to which combinations + are sensible. All other combinations result in ESMF run time errors. The + complete semantics of the ESMF_ArraySMMStore() method, as provided + through the separate entry points shown in 28.5.40 and + 28.5.42, is described in the following paragraphs as a whole. + +

+Store an Array sparse matrix multiplication operation from srcArray + to dstArray. PETs that specify non-zero matrix coefficients must use + the <type><kind> overloaded interface and provide the factorList and + factorIndexList arguments. Providing factorList and + factorIndexList arguments with size(factorList) = (/0/) and + size(factorIndexList) = (/2,0/) or (/4,0/) indicates that a + PET does not provide matrix elements. Alternatively, PETs that do not + provide matrix elements may also call into the overloaded interface + without factorList and factorIndexList arguments. + +

+Both srcArray and dstArray are interpreted as sequentialized + vectors. The sequence is defined by the order of DistGrid dimensions and + the order of tiles within the DistGrid or by user-supplied arbitrary + sequence indices. See section 28.2.18 for details on the + definition of sequence indices. + +

+Source and destination Arrays, as well as the supplied factorList + argument, may be of different <type><kind>. Further source and + destination Arrays may differ in shape and number of elements. + +

+It is erroneous to specify the identical Array object for srcArray and + dstArray arguments. + +

+The routine returns an ESMF_RouteHandle that can be used to call + ESMF_ArraySMM() on any pair of Arrays that matches + srcArray and dstArray in type, kind, and + memory layout of the distributed dimensions. However, the size, + number, and index order of undistributed dimensions may be different. + See section 37.2.5 for a more detailed discussion of + RouteHandle reusability. + +

+This method is overloaded for: +
+ ESMF_TYPEKIND_I4, ESMF_TYPEKIND_I8, +
+ ESMF_TYPEKIND_R4, ESMF_TYPEKIND_R8. + +

+This call is collective across the current VM. + +

+

+
srcArray
+
ESMF_Array with source data. + +

+

+
dstArray
+
ESMF_Array with destination data. The data in this Array may be + destroyed by this call. + +

+

+
routehandle
+
Handle to the precomputed Route. + +

+

+
factorList
+
List of non-zero coefficients. + +

+

+
factorIndexList
+
Pairs of sequence indices for the factors stored in factorList. + +

+The second dimension of factorIndexList steps through the list of + pairs, i.e. size(factorIndexList,2) == size(factorList). The first + dimension of factorIndexList is either of size 2 or size 4. + +

+In the size 2 format factorIndexList(1,:) specifies the + sequence index of the source element in the srcArray while + factorIndexList(2,:) specifies the sequence index of the + destination element in dstArray. For this format to be a valid + option source and destination Arrays must have matching number of + tensor elements (the product of the sizes of all Array tensor dimensions). + Under this condition an identity matrix can be applied within the space of + tensor elements for each sparse matrix factor. + +

+The size 4 format is more general and does not require a matching + tensor element count. Here the factorIndexList(1,:) specifies the + sequence index while factorIndexList(2,:) specifies the tensor + sequence index of the source element in the srcArray. Further + factorIndexList(3,:) specifies the sequence index and + factorIndexList(4,:) specifies the tensor sequence index of the + destination element in the dstArray. + +

+See section 28.2.18 for details on the definition of + Array sequence indices and tensor sequence indices. + +

+

+
[ignoreUnmatchedIndices]
+
A logical flag that affects the behavior for when sequence indices + in the sparse matrix are encountered that do not have a match on the + srcArray or dstArray side. The default setting is + .false., indicating that it is an error when such a situation is + encountered. Setting ignoreUnmatchedIndices to .true. ignores + entries with unmatched indices. + +

+

+
[srcTermProcessing]
+
The srcTermProcessing parameter controls how many source terms, + located on the same PET and summing into the same destination element, + are summed into partial sums on the source PET before being transferred + to the destination PET. A value of 0 indicates that the entire arithmetic + is done on the destination PET; source elements are neither multiplied + by their factors nor added into partial sums before being sent off by the + source PET. A value of 1 indicates that source elements are multiplied + by their factors on the source side before being sent to the destination + PET. Larger values of srcTermProcessing indicate the maximum number + of terms in the partial sums on the source side. + +

+Note that partial sums may lead to bit-for-bit differences in the results. + See section 37.2.1 for an in-depth discussion of all + bit-for-bit reproducibility aspects related to route-based communication + methods. + +

+The ESMF_ArraySMMStore() method implements an auto-tuning scheme + for the srcTermProcessing parameter. The intent on the + srcTermProcessing argument is "inout" in order to + support both overriding and accessing the auto-tuning parameter. + If an argument $>= 0$ is specified, it is used for the + srcTermProcessing parameter, and the auto-tuning phase is skipped. + In this case the srcTermProcessing argument is not modified on + return. If the provided argument is $< 0$, the srcTermProcessing + parameter is determined internally using the auto-tuning scheme. In this + case the srcTermProcessing argument is re-set to the internally + determined value on return. Auto-tuning is also used if the optional + srcTermProcessing argument is omitted. + +

+

+
[pipelineDepth]
+
The pipelineDepth parameter controls how many messages a PET + may have outstanding during a sparse matrix exchange. Larger values + of pipelineDepth typically lead to better performance. However, + on some systems too large a value may lead to performance degradation, + or runtime errors. + +

+Note that the pipeline depth has no effect on the bit-for-bit + reproducibility of the results. However, it may affect the performance + reproducibility of the exchange. + +

+The ESMF_ArraySMMStore() method implements an auto-tuning scheme + for the pipelineDepth parameter. The intent on the + pipelineDepth argument is "inout" in order to + support both overriding and accessing the auto-tuning parameter. + If an argument $>= 0$ is specified, it is used for the + pipelineDepth parameter, and the auto-tuning phase is skipped. + In this case the pipelineDepth argument is not modified on + return. If the provided argument is $< 0$, the pipelineDepth + parameter is determined internally using the auto-tuning scheme. In this + case the pipelineDepth argument is re-set to the internally + determined value on return. Auto-tuning is also used if the optional + pipelineDepth argument is omitted. + +

+

+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+28.5.41 ESMF_ArraySMMStore - Precompute Array sparse matrix multiplication and transpose with local factors +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_ArraySMMStore()
+   subroutine ESMF_ArraySMMStore<type><kind>TP(srcArray, dstArray, &
+     routehandle, transposeRoutehandle, factorList, factorIndexList, &
+     ignoreUnmatchedIndices, srcTermProcessing, pipelineDepth, &
+     rc)
+
ARGUMENTS: +
     type(ESMF_Array),          intent(inout)           :: srcArray
+     type(ESMF_Array),          intent(inout)           :: dstArray
+     type(ESMF_RouteHandle),    intent(inout)           :: routehandle
+     type(ESMF_RouteHandle),    intent(inout)           :: transposeRoutehandle
+     <type>(ESMF_KIND_<kind>), target, intent(in)       :: factorList(:)
+     integer(ESMF_KIND_<kind>), intent(in)              :: factorIndexList(:,:)
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     logical,                   intent(in),    optional :: ignoreUnmatchedIndices
+     integer,                   intent(inout), optional :: srcTermProcessing
+     integer,                   intent(inout), optional :: pipelineDepth
+     integer,                   intent(out),   optional :: rc
+
+DESCRIPTION: +
+ +

+ ESMF_ArraySMMStore() is a collective method across all PETs of the + current Component. The interface of the method is overloaded, allowing + - in principle - each PET to call into ESMF_ArraySMMStore() + through a different entry point. Restrictions apply as to which combinations + are sensible. All other combinations result in ESMF run time errors. The + complete semantics of the ESMF_ArraySMMStore() method, as provided + through the separate entry points shown in 28.5.41 and + 28.5.43, is described in the following paragraphs as a whole. + +

+Store an Array sparse matrix multiplication operation from srcArray + to dstArray. PETs that specify non-zero matrix coefficients must use + the <type><kind> overloaded interface and provide the factorList and + factorIndexList arguments. Providing factorList and + factorIndexList arguments with size(factorList) = (/0/) and + size(factorIndexList) = (/2,0/) or (/4,0/) indicates that a + PET does not provide matrix elements. Alternatively, PETs that do not + provide matrix elements may also call into the overloaded interface + without factorList and factorIndexList arguments. + +

+Both srcArray and dstArray are interpreted as sequentialized + vectors. The sequence is defined by the order of DistGrid dimensions and + the order of tiles within the DistGrid or by user-supplied arbitrary + sequence indices. See section 28.2.18 for details on the + definition of sequence indices. + +

+Source and destination Arrays, as well as the supplied factorList + argument, may be of different <type><kind>. Further source and + destination Arrays may differ in shape and number of elements. + +

+It is erroneous to specify the identical Array object for srcArray and + dstArray arguments. + +

+The routine returns an ESMF_RouteHandle that can be used to call + ESMF_ArraySMM() on any pair of Arrays that matches + srcArray and dstArray in type, kind, and + memory layout of the distributed dimensions. However, the size, + number, and index order of undistributed dimensions may be different. + See section 37.2.5 for a more detailed discussion of + RouteHandle reusability. + +

+This method is overloaded for: +
+ ESMF_TYPEKIND_I4, ESMF_TYPEKIND_I8, +
+ ESMF_TYPEKIND_R4, ESMF_TYPEKIND_R8. + +

+This call is collective across the current VM. + +

+

+
srcArray
+
ESMF_Array with source data. The data in this Array may be + destroyed by this call. + +

+

+
dstArray
+
ESMF_Array with destination data. The data in this Array may be + destroyed by this call. + +

+

+
routehandle
+
Handle to the precomputed Route. + +

+

+
[transposeRoutehandle]
+
Handle to the transposed matrix operation. The transposed operation goes + from dstArray to srcArray. + +

+

+
factorList
+
List of non-zero coefficients. + +

+

+
factorIndexList
+
Pairs of sequence indices for the factors stored in factorList. + +

+The second dimension of factorIndexList steps through the list of + pairs, i.e. size(factorIndexList,2) == size(factorList). The first + dimension of factorIndexList is either of size 2 or size 4. + +

+In the size 2 format factorIndexList(1,:) specifies the + sequence index of the source element in the srcArray while + factorIndexList(2,:) specifies the sequence index of the + destination element in dstArray. For this format to be a valid + option source and destination Arrays must have matching number of + tensor elements (the product of the sizes of all Array tensor dimensions). + Under this condition an identity matrix can be applied within the space of + tensor elements for each sparse matrix factor. + +

+The size 4 format is more general and does not require a matching + tensor element count. Here the factorIndexList(1,:) specifies the + sequence index while factorIndexList(2,:) specifies the tensor + sequence index of the source element in the srcArray. Further + factorIndexList(3,:) specifies the sequence index and + factorIndexList(4,:) specifies the tensor sequence index of the + destination element in the dstArray. + +

+See section 28.2.18 for details on the definition of + Array sequence indices and tensor sequence indices. + +

+

+
[ignoreUnmatchedIndices]
+
A logical flag that affects the behavior for when sequence indices + in the sparse matrix are encountered that do not have a match on the + srcArray or dstArray side. The default setting is + .false., indicating that it is an error when such a situation is + encountered. Setting ignoreUnmatchedIndices to .true. ignores + entries with unmatched indices. + +

+

+
[srcTermProcessing]
+
The srcTermProcessing parameter controls how many source terms, + located on the same PET and summing into the same destination element, + are summed into partial sums on the source PET before being transferred + to the destination PET. A value of 0 indicates that the entire arithmetic + is done on the destination PET; source elements are neither multiplied + by their factors nor added into partial sums before being sent off by the + source PET. A value of 1 indicates that source elements are multiplied + by their factors on the source side before being sent to the destination + PET. Larger values of srcTermProcessing indicate the maximum number + of terms in the partial sums on the source side. + +

+Note that partial sums may lead to bit-for-bit differences in the results. + See section 37.2.1 for an in-depth discussion of all + bit-for-bit reproducibility aspects related to route-based communication + methods. + +

+The ESMF_ArraySMMStore() method implements an auto-tuning scheme + for the srcTermProcessing parameter. The intent on the + srcTermProcessing argument is "inout" in order to + support both overriding and accessing the auto-tuning parameter. + If an argument $>= 0$ is specified, it is used for the + srcTermProcessing parameter, and the auto-tuning phase is skipped. + In this case the srcTermProcessing argument is not modified on + return. If the provided argument is $< 0$, the srcTermProcessing + parameter is determined internally using the auto-tuning scheme. In this + case the srcTermProcessing argument is re-set to the internally + determined value on return. Auto-tuning is also used if the optional + srcTermProcessing argument is omitted. + +

+

+
[pipelineDepth]
+
The pipelineDepth parameter controls how many messages a PET + may have outstanding during a sparse matrix exchange. Larger values + of pipelineDepth typically lead to better performance. However, + on some systems too large a value may lead to performance degradation, + or runtime errors. + +

+Note that the pipeline depth has no effect on the bit-for-bit + reproducibility of the results. However, it may affect the performance + reproducibility of the exchange. + +

+The ESMF_ArraySMMStore() method implements an auto-tuning scheme + for the pipelineDepth parameter. The intent on the + pipelineDepth argument is "inout" in order to + support both overriding and accessing the auto-tuning parameter. + If an argument $>= 0$ is specified, it is used for the + pipelineDepth parameter, and the auto-tuning phase is skipped. + In this case the pipelineDepth argument is not modified on + return. If the provided argument is $< 0$, the pipelineDepth + parameter is determined internally using the auto-tuning scheme. In this + case the pipelineDepth argument is re-set to the internally + determined value on return. Auto-tuning is also used if the optional + pipelineDepth argument is omitted. + +

+

+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+28.5.42 ESMF_ArraySMMStore - Precompute Array sparse matrix multiplication without local factors +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_ArraySMMStore()
+   subroutine ESMF_ArraySMMStoreNF(srcArray, dstArray, routehandle, &
+     ignoreUnmatchedIndices, srcTermProcessing, pipelineDepth, &
+     rc)
+
ARGUMENTS: +
     type(ESMF_Array),       intent(in)              :: srcArray
+     type(ESMF_Array),       intent(inout)           :: dstArray
+     type(ESMF_RouteHandle), intent(inout)           :: routehandle
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     logical,                intent(in),    optional :: ignoreUnmatchedIndices
+     integer,                intent(inout), optional :: srcTermProcessing
+     integer,                intent(inout), optional :: pipelineDepth
+     integer,                intent(out),   optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    6.1.0
    +
    Added argument srcTermProcessing. + Added argument pipelineDepth. + The new arguments provide access to the tuning parameters + affecting the sparse matrix execution. + +
    +
    7.0.0
    +
    Added argument transposeRoutehandle to allow a handle to + the transposed matrix operation to be returned. +
    +Added argument ignoreUnmatchedIndices to support sparse + matrices that contain elements with indices that do not have a + match within the source or destination Array. + +
    +
    7.1.0r
    +
    Removed argument transposeRoutehandle and provide it + via interface overloading instead. This allows argument + srcArray to stay strictly intent(in) for this entry point. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+ ESMF_ArraySMMStore() is a collective method across all PETs of the + current Component. The interface of the method is overloaded, allowing + - in principle - each PET to call into ESMF_ArraySMMStore() + through a different entry point. Restrictions apply as to which combinations + are sensible. All other combinations result in ESMF run time errors. The + complete semantics of the ESMF_ArraySMMStore() method, as provided + through the separate entry points shown in 28.5.40 and + 28.5.42, is described in the following paragraphs as a whole. + +

+Store an Array sparse matrix multiplication operation from srcArray + to dstArray. PETs that specify non-zero matrix coefficients must use + the <type><kind> overloaded interface and provide the factorList and + factorIndexList arguments. Providing factorList and + factorIndexList arguments with size(factorList) = (/0/) and + size(factorIndexList) = (/2,0/) or (/4,0/) indicates that a + PET does not provide matrix elements. Alternatively, PETs that do not + provide matrix elements may also call into the overloaded interface + without factorList and factorIndexList arguments. + +

+Both srcArray and dstArray are interpreted as sequentialized + vectors. The sequence is defined by the order of DistGrid dimensions and + the order of tiles within the DistGrid or by user-supplied arbitrary + sequence indices. See section 28.2.18 for details on the + definition of sequence indices. + +

+Source and destination Arrays, as well as the supplied factorList + argument, may be of different <type><kind>. Further source and + destination Arrays may differ in shape and number of elements. + +

+It is erroneous to specify the identical Array object for srcArray and + dstArray arguments. + +

+The routine returns an ESMF_RouteHandle that can be used to call + ESMF_ArraySMM() on any pair of Arrays that matches + srcArray and dstArray in type, kind, and + memory layout of the distributed dimensions. However, the size, + number, and index order of undistributed dimensions may be different. + See section 37.2.5 for a more detailed discussion of + RouteHandle reusability. + +

+This call is collective across the current VM. + +

+

+
srcArray
+
ESMF_Array with source data. + +

+

+
dstArray
+
ESMF_Array with destination data. The data in this Array may be + destroyed by this call. + +

+

+
routehandle
+
Handle to the precomputed Route. + +

+

+
[ignoreUnmatchedIndices]
+
A logical flag that affects the behavior for when sequence indices + in the sparse matrix are encountered that do not have a match on the + srcArray or dstArray side. The default setting is + .false., indicating that it is an error when such a situation is + encountered. Setting ignoreUnmatchedIndices to .true. ignores + entries with unmatched indices. + +

+

+
[srcTermProcessing]
+
The srcTermProcessing parameter controls how many source terms, + located on the same PET and summing into the same destination element, + are summed into partial sums on the source PET before being transferred + to the destination PET. A value of 0 indicates that the entire arithmetic + is done on the destination PET; source elements are neither multiplied + by their factors nor added into partial sums before being sent off by the + source PET. A value of 1 indicates that source elements are multiplied + by their factors on the source side before being sent to the destination + PET. Larger values of srcTermProcessing indicate the maximum number + of terms in the partial sums on the source side. + +

+Note that partial sums may lead to bit-for-bit differences in the results. + See section 37.2.1 for an in-depth discussion of all + bit-for-bit reproducibility aspects related to route-based communication + methods. + +

+The ESMF_ArraySMMStore() method implements an auto-tuning scheme + for the srcTermProcessing parameter. The intent on the + srcTermProcessing argument is "inout" in order to + support both overriding and accessing the auto-tuning parameter. + If an argument $>= 0$ is specified, it is used for the + srcTermProcessing parameter, and the auto-tuning phase is skipped. + In this case the srcTermProcessing argument is not modified on + return. If the provided argument is $< 0$, the srcTermProcessing + parameter is determined internally using the auto-tuning scheme. In this + case the srcTermProcessing argument is re-set to the internally + determined value on return. Auto-tuning is also used if the optional + srcTermProcessing argument is omitted. + +

+

+
[pipelineDepth]
+
The pipelineDepth parameter controls how many messages a PET + may have outstanding during a sparse matrix exchange. Larger values + of pipelineDepth typically lead to better performance. However, + on some systems too large a value may lead to performance degradation, + or runtime errors. + +

+Note that the pipeline depth has no effect on the bit-for-bit + reproducibility of the results. However, it may affect the performance + reproducibility of the exchange. + +

+The ESMF_ArraySMMStore() method implements an auto-tuning scheme + for the pipelineDepth parameter. The intent on the + pipelineDepth argument is "inout" in order to + support both overriding and accessing the auto-tuning parameter. + If an argument $>= 0$ is specified, it is used for the + pipelineDepth parameter, and the auto-tuning phase is skipped. + In this case the pipelineDepth argument is not modified on + return. If the provided argument is $< 0$, the pipelineDepth + parameter is determined internally using the auto-tuning scheme. In this + case the pipelineDepth argument is re-set to the internally + determined value on return. Auto-tuning is also used if the optional + pipelineDepth argument is omitted. + +

+

+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+28.5.43 ESMF_ArraySMMStore - Precompute Array sparse matrix multiplication and transpose without local factors +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_ArraySMMStore()
+   subroutine ESMF_ArraySMMStoreNFTP(srcArray, dstArray, routehandle, &
+     transposeRoutehandle, ignoreUnmatchedIndices, &
+     srcTermProcessing, pipelineDepth, rc)
+
ARGUMENTS: +
     type(ESMF_Array),       intent(inout)           :: srcArray
+     type(ESMF_Array),       intent(inout)           :: dstArray
+     type(ESMF_RouteHandle), intent(inout)           :: routehandle
+     type(ESMF_RouteHandle), intent(inout)           :: transposeRoutehandle
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     logical,                intent(in),    optional :: ignoreUnmatchedIndices
+     integer,                intent(inout), optional :: srcTermProcessing
+     integer,                intent(inout), optional :: pipelineDepth
+     integer,                intent(out),   optional :: rc
+
+DESCRIPTION: +
+ +

+ ESMF_ArraySMMStore() is a collective method across all PETs of the + current Component. The interface of the method is overloaded, allowing + - in principle - each PET to call into ESMF_ArraySMMStore() + through a different entry point. Restrictions apply as to which combinations + are sensible. All other combinations result in ESMF run time errors. The + complete semantics of the ESMF_ArraySMMStore() method, as provided + through the separate entry points shown in 28.5.41 and + 28.5.43, is described in the following paragraphs as a whole. + +

+Store an Array sparse matrix multiplication operation from srcArray + to dstArray. PETs that specify non-zero matrix coefficients must use + the <type><kind> overloaded interface and provide the factorList and + factorIndexList arguments. Providing factorList and + factorIndexList arguments with size(factorList) = (/0/) and + size(factorIndexList) = (/2,0/) or (/4,0/) indicates that a + PET does not provide matrix elements. Alternatively, PETs that do not + provide matrix elements may also call into the overloaded interface + without factorList and factorIndexList arguments. + +

+Both srcArray and dstArray are interpreted as sequentialized + vectors. The sequence is defined by the order of DistGrid dimensions and + the order of tiles within the DistGrid or by user-supplied arbitrary + sequence indices. See section 28.2.18 for details on the + definition of sequence indices. + +

+Source and destination Arrays, as well as the supplied factorList + argument, may be of different <type><kind>. Further source and + destination Arrays may differ in shape and number of elements. + +

+It is erroneous to specify the identical Array object for srcArray and + dstArray arguments. + +

+The routine returns an ESMF_RouteHandle that can be used to call + ESMF_ArraySMM() on any pair of Arrays that matches + srcArray and dstArray in type, kind, and + memory layout of the distributed dimensions. However, the size, + number, and index order of undistributed dimensions may be different. + See section 37.2.5 for a more detailed discussion of + RouteHandle reusability. + +

+This call is collective across the current VM. + +

+

+
srcArray
+
ESMF_Array with source data. The data in this Array may be + destroyed by this call. + +

+

+
dstArray
+
ESMF_Array with destination data. The data in this Array may be + destroyed by this call. + +

+

+
routehandle
+
Handle to the precomputed Route. + +

+

+
[transposeRoutehandle]
+
Handle to the transposed matrix operation. The transposed operation goes + from dstArray to srcArray. + +

+

+
[ignoreUnmatchedIndices]
+
A logical flag that affects the behavior for when sequence indices + in the sparse matrix are encountered that do not have a match on the + srcArray or dstArray side. The default setting is + .false., indicating that it is an error when such a situation is + encountered. Setting ignoreUnmatchedIndices to .true. ignores + entries with unmatched indices. + +

+

+
[srcTermProcessing]
+
The srcTermProcessing parameter controls how many source terms, + located on the same PET and summing into the same destination element, + are summed into partial sums on the source PET before being transferred + to the destination PET. A value of 0 indicates that the entire arithmetic + is done on the destination PET; source elements are neither multiplied + by their factors nor added into partial sums before being sent off by the + source PET. A value of 1 indicates that source elements are multiplied + by their factors on the source side before being sent to the destination + PET. Larger values of srcTermProcessing indicate the maximum number + of terms in the partial sums on the source side. + +

+Note that partial sums may lead to bit-for-bit differences in the results. + See section 37.2.1 for an in-depth discussion of all + bit-for-bit reproducibility aspects related to route-based communication + methods. + +

+The ESMF_ArraySMMStore() method implements an auto-tuning scheme + for the srcTermProcessing parameter. The intent on the + srcTermProcessing argument is "inout" in order to + support both overriding and accessing the auto-tuning parameter. + If an argument $>= 0$ is specified, it is used for the + srcTermProcessing parameter, and the auto-tuning phase is skipped. + In this case the srcTermProcessing argument is not modified on + return. If the provided argument is $< 0$, the srcTermProcessing + parameter is determined internally using the auto-tuning scheme. In this + case the srcTermProcessing argument is re-set to the internally + determined value on return. Auto-tuning is also used if the optional + srcTermProcessing argument is omitted. + +

+

+
[pipelineDepth]
+
The pipelineDepth parameter controls how many messages a PET + may have outstanding during a sparse matrix exchange. Larger values + of pipelineDepth typically lead to better performance. However, + on some systems too large a value may lead to performance degradation, + or runtime errors. + +

+Note that the pipeline depth has no effect on the bit-for-bit + reproducibility of the results. However, it may affect the performance + reproducibility of the exchange. + +

+The ESMF_ArraySMMStore() method implements an auto-tuning scheme + for the pipelineDepth parameter. The intent on the + pipelineDepth argument is "inout" in order to + support both overriding and accessing the auto-tuning parameter. + If an argument $>= 0$ is specified, it is used for the + pipelineDepth parameter, and the auto-tuning phase is skipped. + In this case the pipelineDepth argument is not modified on + return. If the provided argument is $< 0$, the pipelineDepth + parameter is determined internally using the auto-tuning scheme. In this + case the pipelineDepth argument is re-set to the internally + determined value on return. Auto-tuning is also used if the optional + pipelineDepth argument is omitted. + +

+

+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+28.5.44 ESMF_ArraySMMStore - Precompute sparse matrix multiplication using factors read from file. +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_ArraySMMStore()
+   subroutine ESMF_ArraySMMStoreFromFile(srcArray, dstArray, filename, &
+     routehandle, ignoreUnmatchedIndices, &
+     srcTermProcessing, pipelineDepth, rc)
+ 
+   ! ARGUMENTS:
+     type(ESMF_Array),       intent(in)              :: srcArray
+     type(ESMF_Array),       intent(inout)           :: dstArray
+     character(len=*),       intent(in)              :: filename
+     type(ESMF_RouteHandle), intent(inout)           :: routehandle
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     logical,                intent(in),    optional :: ignoreUnmatchedIndices
+     integer,                intent(inout), optional :: srcTermProcessing
+     integer,                intent(inout), optional :: pipeLineDepth
+     integer,                intent(out),   optional :: rc
+
+DESCRIPTION: +
+ +

+Compute an ESMF_RouteHandle using factors read from file. + +

+The arguments are: + +

+

+
srcArray
+
ESMF_Array with source data. + +

+

+
dstArray
+
ESMF_Array with destination data. The data in this Array may be + destroyed by this call. + +

+

+
filename
+
Path to the file containing weights for creating an ESMF_RouteHandle. + See (12.9) for a description of the SCRIP weight + file format. Only "row", "col", and "S" variables are required. They + must be one-dimensionsal with dimension "n_s". + +

+

+
routehandle
+
Handle to the ESMF_RouteHandle. + +

+

+
[ignoreUnmatchedIndices]
+
A logical flag that affects the behavior for when sequence indices + in the sparse matrix are encountered that do not have a match on the + srcArray or dstArray side. The default setting is + .false., indicating that it is an error when such a situation is + encountered. Setting ignoreUnmatchedIndices to .true. ignores + entries with unmatched indices. + +

+

+
[srcTermProcessing]
+
The srcTermProcessing parameter controls how many source terms, + located on the same PET and summing into the same destination element, + are summed into partial sums on the source PET before being transferred + to the destination PET. A value of 0 indicates that the entire arithmetic + is done on the destination PET; source elements are neither multiplied + by their factors nor added into partial sums before being sent off by the + source PET. A value of 1 indicates that source elements are multiplied + by their factors on the source side before being sent to the destination + PET. Larger values of srcTermProcessing indicate the maximum number + of terms in the partial sums on the source side. + +

+Note that partial sums may lead to bit-for-bit differences in the results. + See section 37.2.1 for an in-depth discussion of all + bit-for-bit reproducibility aspects related to route-based communication + methods. + +

+The ESMF_ArraySMMStore() method implements an auto-tuning scheme + for the srcTermProcessing parameter. The intent on the + srcTermProcessing argument is "inout" in order to + support both overriding and accessing the auto-tuning parameter. + If an argument $>= 0$ is specified, it is used for the + srcTermProcessing parameter, and the auto-tuning phase is skipped. + In this case the srcTermProcessing argument is not modified on + return. If the provided argument is $< 0$, the srcTermProcessing + parameter is determined internally using the auto-tuning scheme. In this + case the srcTermProcessing argument is re-set to the internally + determined value on return. Auto-tuning is also used if the optional + srcTermProcessing argument is omitted. + +

+

+
[pipelineDepth]
+
The pipelineDepth parameter controls how many messages a PET + may have outstanding during a sparse matrix exchange. Larger values + of pipelineDepth typically lead to better performance. However, + on some systems too large a value may lead to performance degradation, + or runtime errors. + +

+Note that the pipeline depth has no effect on the bit-for-bit + reproducibility of the results. However, it may affect the performance + reproducibility of the exchange. + The ESMF_ArraySMMStore() method implements an auto-tuning scheme + for the pipelineDepth parameter. The intent on the + pipelineDepth argument is "inout" in order to + support both overriding and accessing the auto-tuning parameter. + If an argument $>= 0$ is specified, it is used for the + pipelineDepth parameter, and the auto-tuning phase is skipped. + In this case the pipelineDepth argument is not modified on + return. If the provided argument is $< 0$, the pipelineDepth + parameter is determined internally using the auto-tuning scheme. In this + case the pipelineDepth argument is re-set to the internally + determined value on return. Auto-tuning is also used if the optional + pipelineDepth argument is omitted. + +

+

+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +

+

+
+ +

+ +

+ +

+28.5.45 ESMF_ArraySMMStore - Precompute sparse matrix multiplication and transpose using factors read from file. +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_ArraySMMStore()
+   subroutine ESMF_ArraySMMStoreFromFileTP(srcArray, dstArray, filename, &
+     routehandle, transposeRoutehandle, ignoreUnmatchedIndices,&
+     srcTermProcessing, pipelineDepth, rc)
+ 
+   ! ARGUMENTS:
+     type(ESMF_Array),       intent(inout)           :: srcArray
+     type(ESMF_Array),       intent(inout)           :: dstArray
+     character(len=*),       intent(in)              :: filename
+     type(ESMF_RouteHandle), intent(inout)           :: routehandle
+     type(ESMF_RouteHandle), intent(inout)           :: transposeRoutehandle
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     logical,                intent(in),    optional :: ignoreUnmatchedIndices
+     integer,                intent(inout), optional :: srcTermProcessing
+     integer,                intent(inout), optional :: pipeLineDepth
+     integer,                intent(out),   optional :: rc
+
+DESCRIPTION: +
+ +

+Compute an ESMF_RouteHandle using factors read from file. + +

+The arguments are: + +

+

+
srcArray
+
ESMF_Array with source data. The data in this Array may be + destroyed by this call. + +

+

+
dstArray
+
ESMF_Array with destination data. The data in this Array may be + destroyed by this call. + +

+

+
filename
+
Path to the file containing weights for creating an ESMF_RouteHandle. + See (12.9) for a description of the SCRIP weight + file format. Only "row", "col", and "S" variables are required. They + must be one-dimensionsal with dimension "n_s". + +

+

+
routehandle
+
Handle to the ESMF_RouteHandle. + +

+

+
[transposeRoutehandle]
+
Handle to the transposed matrix operation. The transposed operation goes + from dstArray to srcArray. + +

+

+
[ignoreUnmatchedIndices]
+
A logical flag that affects the behavior for when sequence indices + in the sparse matrix are encountered that do not have a match on the + srcArray or dstArray side. The default setting is + .false., indicating that it is an error when such a situation is + encountered. Setting ignoreUnmatchedIndices to .true. ignores + entries with unmatched indices. + +

+

+
[srcTermProcessing]
+
The srcTermProcessing parameter controls how many source terms, + located on the same PET and summing into the same destination element, + are summed into partial sums on the source PET before being transferred + to the destination PET. A value of 0 indicates that the entire arithmetic + is done on the destination PET; source elements are neither multiplied + by their factors nor added into partial sums before being sent off by the + source PET. A value of 1 indicates that source elements are multiplied + by their factors on the source side before being sent to the destination + PET. Larger values of srcTermProcessing indicate the maximum number + of terms in the partial sums on the source side. + +

+Note that partial sums may lead to bit-for-bit differences in the results. + See section 37.2.1 for an in-depth discussion of all + bit-for-bit reproducibility aspects related to route-based communication + methods. + +

+The ESMF_ArraySMMStore() method implements an auto-tuning scheme + for the srcTermProcessing parameter. The intent on the + srcTermProcessing argument is "inout" in order to + support both overriding and accessing the auto-tuning parameter. + If an argument $>= 0$ is specified, it is used for the + srcTermProcessing parameter, and the auto-tuning phase is skipped. + In this case the srcTermProcessing argument is not modified on + return. If the provided argument is $< 0$, the srcTermProcessing + parameter is determined internally using the auto-tuning scheme. In this + case the srcTermProcessing argument is re-set to the internally + determined value on return. Auto-tuning is also used if the optional + srcTermProcessing argument is omitted. + +

+

+
[pipelineDepth]
+
The pipelineDepth parameter controls how many messages a PET + may have outstanding during a sparse matrix exchange. Larger values + of pipelineDepth typically lead to better performance. However, + on some systems too large a value may lead to performance degradation, + or runtime errors. + +

+Note that the pipeline depth has no effect on the bit-for-bit + reproducibility of the results. However, it may affect the performance + reproducibility of the exchange. + The ESMF_ArraySMMStore() method implements an auto-tuning scheme + for the pipelineDepth parameter. The intent on the + pipelineDepth argument is "inout" in order to + support both overriding and accessing the auto-tuning parameter. + If an argument $>= 0$ is specified, it is used for the + pipelineDepth parameter, and the auto-tuning phase is skipped. + In this case the pipelineDepth argument is not modified on + return. If the provided argument is $< 0$, the pipelineDepth + parameter is determined internally using the auto-tuning scheme. In this + case the pipelineDepth argument is re-set to the internally + determined value on return. Auto-tuning is also used if the optional + pipelineDepth argument is omitted. + +

+

+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +

+

+
+ +

+ +

+ +

+28.5.46 ESMF_ArraySync - Synchronize DEs across the Array in case of sharing +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_ArraySync(array, rc)
+
ARGUMENTS: +
     type(ESMF_Array), intent(in)            :: array
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,          intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Synchronizes access to DEs across array to make sure PETs correctly + access the data for read and write when DEs are shared. + +

+The arguments are: +

+
array
+
Specified ESMF_Array object. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+28.5.47 ESMF_ArrayValidate - Validate object-wide Array information +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_ArrayValidate(array, rc)
+
ARGUMENTS: +
     type(ESMF_Array), intent(in)            :: array
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,          intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Validates that the Array is internally consistent. + The method returns an error code if problems are found. + +

+The arguments are: +

+
array
+
Specified ESMF_Array object. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+28.5.48 ESMF_ArrayWrite - Write Array data into a file +

+ +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_ArrayWrite(array, fileName, &
+       variableName, convention, purpose,  &
+       overwrite, status, timeslice, iofmt, rc)
+
ARGUMENTS: +
     type(ESMF_Array),           intent(in)            :: array
+     character(*),               intent(in)            :: fileName
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     character(*),               intent(in),  optional :: variableName
+     character(*),               intent(in),  optional :: convention
+     character(*),               intent(in),  optional :: purpose
+     logical,                    intent(in),  optional :: overwrite
+     type(ESMF_FileStatus_Flag), intent(in),  optional :: status
+     integer,                    intent(in),  optional :: timeslice
+     type(ESMF_IOFmt_Flag),      intent(in),  optional :: iofmt
+     integer,                    intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Write Array data into a file. For this API to be functional, the + environment variable ESMF_PIO should be set to either "internal" or "external" when + the ESMF library is built. Please see the section on + Data I/O, 38.2. + +

+When convention and purpose arguments are specified, + a NetCDF variable can be created with user-specified dimension labels and + attributes. Dimension labels may be defined for both gridded and + ungridded dimensions. Dimension labels for gridded dimensions are specified + at the DistGrid level by attaching an ESMF Attribute package to it. The Attribute + package must contain an attribute named by the pre-defined ESMF parameter + ESMF_ATT_GRIDDED_DIM_LABELS. The corresponding value is an array of + character strings specifying the desired names of the dimensions. Likewise, + for ungridded dimensions, an Attribute package is attached at the Array level. + The name of the name must be ESMF_ATT_UNGRIDDED_DIM_LABELS. + +

+NetCDF attributes for the variable can also be specified. As with dimension labels, + an Attribute package is added to the Array with the desired names and values. + A value may be either a scalar character string, or a scalar or array of type + integer, real, or double precision. Dimension label attributes can co-exist with + variable attributes within a common Attribute package. + +

+Limitations: + +

    +
  • Not supported in ESMF_COMM=mpiuni mode. + +
  • +
+ +

+The arguments are: +

+
array
+
The ESMF_Array object that contains data to be written. + +
+
fileName
+
The name of the output file to which Array data is written. + If this is a multi-tile Array, then fileName must contain + exactly one instance of "*"; this is a placeholder that will be replaced + by the tile number, with each tile being written to a separate file. (For + example, for a fileName of "myfile*.nc", tile 1 will be written to + "myfile1.nc", tile 2 to "myfile2.nc", etc.) + (This handling of the fileName for multi-tile I/O is subject to change.) + +
+
[variableName]
+
Variable name in the output file; default is the "name" of Array. + Use this argument only in the I/O format (such as NetCDF) that + supports variable name. If the I/O format does not support this + (such as binary format), ESMF will return an error code. + +
+
[convention]
+
Specifies an Attribute package associated with the Array, used to create NetCDF + dimension labels and attributes for the variable in the file. When this argument is present, + the purpose argument must also be present. Use this argument only with a NetCDF + I/O format. If binary format is used, ESMF will return an error code. + +
+
[purpose]
+
Specifies an Attribute package associated with the Array, used to create NetCDF + dimension labels and attributes for the variable in the file. When this argument is present, + the convention argument must also be present. Use this argument only with a NetCDF + I/O format. If binary format is used, ESMF will return an error code. + +
+
[overwrite]
+
A logical flag, the default is .false., i.e., existing Array data may + not be overwritten. If .true., only the + data corresponding to the Array's name will be + be overwritten. If the timeslice option is given, only data for + the given timeslice may be overwritten. + Note that it is always an error to attempt to overwrite a NetCDF + variable with data which has a different shape. + +
+
[status]
+
The file status. Please see Section 54.22 for + the list of options. If not present, defaults to + ESMF_FILESTATUS_UNKNOWN. + +
+
[timeslice]
+
Some I/O formats (e.g. NetCDF) support the output of data in form of + time slices. An unlimited dimension called time is defined in the + file variable for this capability. + The timeslice argument provides access to the time dimension, + and must have a positive value. The behavior of this + option may depend on the setting of the overwrite flag: +
+
overwrite = .false.:
+
If the timeslice value is + less than the maximum time already in the file, the write will fail. + +
+
overwrite = .true.:
+
Any positive timeslice value is valid. + +
+
+ By default, i.e. by omitting the timeslice argument, no + provisions for time slicing are made in the output file, + however, if the file already contains a time axis for the variable, + a timeslice one greater than the maximum will be written. + +
+
[iofmt]
+
The I/O format. Please see Section 54.30 for the list + of options. If not present, defaults to ESMF_IOFMT_NETCDF. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ + +

+ +

+ +

+ +

+28.5.49 ESMF_SparseMatrixWrite - Write a sparse matrix to file +

+ +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_SparseMatrixWrite(factorList, factorIndexList, fileName, &
+     rc)
+
ARGUMENTS: +
     real(ESMF_KIND_R8),    intent(in)            :: factorList(:)
+     integer(ESMF_KIND_I4), intent(in)            :: factorIndexList(:,:)
+     character(*),          intent(in)            :: fileName
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,               intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Write the factorList and factorIndexList into a NetCDF file. + The data is stored in SCRIP format documented under section + (12.9). + +

+Limitations: + +

    +
  • Only real(ESMF_KIND_R8) factorList and + integer(ESMF_KIND_I4) factorIndexList supported. +
  • +
  • Not supported in ESMF_COMM=mpiuni mode. + +
  • +
+ +

+The arguments are: +

+
factorList
+
The sparse matrix factors to be written. + +
+
factorIndexList
+
The sparse matrix sequence indices to be written. + +
+
fileName
+
The name of the output file to be written. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ + +

+ +
+28.6 Class API: DynamicMask Methods +

+ +

+ +

+ +

+ +

+28.6.1 ESMF_DynamicMaskSetR8R8R8 - Set DynamicMask for R8R8R8 +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_DynamicMaskSetR8R8R8(dynamicMask, dynamicMaskRoutine, &
+     handleAllElements, dynamicSrcMaskValue, &
+     dynamicDstMaskValue, rc)
+
ARGUMENTS: +
     type(ESMF_DynamicMask), intent(out)           :: dynamicMask
+     procedure(ESMF_DynamicMaskRoutineR8R8R8)      :: dynamicMaskRoutine
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     logical,                intent(in),  optional :: handleAllElements
+     real(ESMF_KIND_R8),     intent(in),  optional :: dynamicSrcMaskValue
+     real(ESMF_KIND_R8),     intent(in),  optional :: dynamicDstMaskValue
+     integer,                intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+ Set an ESMF_DynamicMask object suitable for + destination element typekind ESMF_TYPEKIND_R8, + factor typekind ESMF_TYPEKIND_R8, and + source element typekind ESMF_TYPEKIND_R8. + +

+All values in dynamicMask will be reset by this call. + +

+See section 37.2.6 for a general discussion of dynamic masking. + +

+The arguments are: +

+
dynamicMask
+
DynamicMask object. + +
+
dynamicMaskRoutine
+
The routine responsible for handling dynamically masked source and + destination elements. See section 37.2.6 for the precise + definition of the dynamicMaskRoutine procedure interface. + The routine is only called on PETs where at least one interpolation + element is identified for special handling. + +
+
[handleAllElements]
+
If set to .true., all local elements, regardless of their dynamic + masking status, are made available to dynamicMaskRoutine for + handling. This option can be used to implement fully customized + interpolations based on the information provided by ESMF. + The default is .false., meaning that only elements affected by + dynamic masking will be handed to dynamicMaskRoutine. + +
+
[dynamicSrcMaskValue]
+
The value for which a source element is considered dynamically + masked. + The default is to not consider any source elements as + dynamically masked. + +
+
[dynamicDstMaskValue]
+
The value for which a destination element is considered dynamically + masked. + The default is to not consider any destination elements as + dynamically masked. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+28.6.2 ESMF_DynamicMaskSetR8R8R8V - Set DynamicMask for R8R8R8 with vectorization +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_DynamicMaskSetR8R8R8V(dynamicMask, dynamicMaskRoutine, &
+     handleAllElements, dynamicSrcMaskValue, &
+     dynamicDstMaskValue, rc)
+
ARGUMENTS: +
     type(ESMF_DynamicMask), intent(out)           :: dynamicMask
+     procedure(ESMF_DynamicMaskRoutineR8R8R8V)     :: dynamicMaskRoutine
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     logical,                intent(in),  optional :: handleAllElements
+     real(ESMF_KIND_R8),     intent(in),  optional :: dynamicSrcMaskValue
+     real(ESMF_KIND_R8),     intent(in),  optional :: dynamicDstMaskValue
+     integer,                intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+ Set an ESMF_DynamicMask object suitable for + destination element typekind ESMF_TYPEKIND_R8, + factor typekind ESMF_TYPEKIND_R8, and + source element typekind ESMF_TYPEKIND_R8. + +

+All values in dynamicMask will be reset by this call. + +

+See section 37.2.6 for a general discussion of dynamic masking. + +

+The arguments are: +

+
dynamicMask
+
DynamicMask object. + +
+
dynamicMaskRoutine
+
The routine responsible for handling dynamically masked source and + destination elements. See section 37.2.6 for the precise + definition of the dynamicMaskRoutine procedure interface. + The routine is only called on PETs where at least one interpolation + element is identified for special handling. + +
+
[handleAllElements]
+
If set to .true., all local elements, regardless of their dynamic + masking status, are made available to dynamicMaskRoutine for + handling. This option can be used to implement fully customized + interpolations based on the information provided by ESMF. + The default is .false., meaning that only elements affected by + dynamic masking will be handed to dynamicMaskRoutine. + +
+
[dynamicSrcMaskValue]
+
The value for which a source element is considered dynamically + masked. + The default is to not consider any source elements as + dynamically masked. + +
+
[dynamicDstMaskValue]
+
The value for which a destination element is considered dynamically + masked. + The default is to not consider any destination elements as + dynamically masked. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+28.6.3 ESMF_DynamicMaskSetR4R8R4 - Set DynamicMask for R4R8R4 +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_DynamicMaskSetR4R8R4(dynamicMask, dynamicMaskRoutine, &
+     handleAllElements, dynamicSrcMaskValue, &
+     dynamicDstMaskValue, rc)
+
ARGUMENTS: +
     type(ESMF_DynamicMask), intent(out)           :: dynamicMask
+     procedure(ESMF_DynamicMaskRoutineR4R8R4)      :: dynamicMaskRoutine
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     logical,                intent(in),  optional :: handleAllElements
+     real(ESMF_KIND_R4),     intent(in),  optional :: dynamicSrcMaskValue
+     real(ESMF_KIND_R4),     intent(in),  optional :: dynamicDstMaskValue
+     integer,                intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+ Set an ESMF_DynamicMask object suitable for + destination element typekind ESMF_TYPEKIND_R4, + factor typekind ESMF_TYPEKIND_R8, and + source element typekind ESMF_TYPEKIND_R4. + +

+All values in dynamicMask will be reset by this call. + +

+See section 37.2.6 for a general discussion of dynamic masking. + +

+The arguments are: +

+
dynamicMask
+
DynamicMask object. + +
+
dynamicMaskRoutine
+
The routine responsible for handling dynamically masked source and + destination elements. See section 37.2.6 for the precise + definition of the dynamicMaskRoutine procedure interface. + The routine is only called on PETs where at least one interpolation + element is identified for special handling. + +
+
[handleAllElements]
+
If set to .true., all local elements, regardless of their dynamic + masking status, are made available to dynamicMaskRoutine for + handling. This option can be used to implement fully customized + interpolations based on the information provided by ESMF. + The default is .false., meaning that only elements affected by + dynamic masking will be handed to dynamicMaskRoutine. + +
+
[dynamicSrcMaskValue]
+
The value for which a source element is considered dynamically + masked. + The default is to not consider any source elements as + dynamically masked. + +
+
[dynamicDstMaskValue]
+
The value for which a destination element is considered dynamically + masked. + The default is to not consider any destination elements as + dynamically masked. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+28.6.4 ESMF_DynamicMaskSetR4R8R4V - Set DynamicMask for R4R8R4 with vectorization +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_DynamicMaskSetR4R8R4V(dynamicMask, dynamicMaskRoutine, &
+     handleAllElements, dynamicSrcMaskValue, &
+     dynamicDstMaskValue, rc)
+
ARGUMENTS: +
     type(ESMF_DynamicMask), intent(out)           :: dynamicMask
+     procedure(ESMF_DynamicMaskRoutineR4R8R4V)     :: dynamicMaskRoutine
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     logical,                intent(in),  optional :: handleAllElements
+     real(ESMF_KIND_R4),     intent(in),  optional :: dynamicSrcMaskValue
+     real(ESMF_KIND_R4),     intent(in),  optional :: dynamicDstMaskValue
+     integer,                intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+ Set an ESMF_DynamicMask object suitable for + destination element typekind ESMF_TYPEKIND_R4, + factor typekind ESMF_TYPEKIND_R8, and + source element typekind ESMF_TYPEKIND_R4. + +

+All values in dynamicMask will be reset by this call. + +

+See section 37.2.6 for a general discussion of dynamic masking. + +

+The arguments are: +

+
dynamicMask
+
DynamicMask object. + +
+
dynamicMaskRoutine
+
The routine responsible for handling dynamically masked source and + destination elements. See section 37.2.6 for the precise + definition of the dynamicMaskRoutine procedure interface. + The routine is only called on PETs where at least one interpolation + element is identified for special handling. + +
+
[handleAllElements]
+
If set to .true., all local elements, regardless of their dynamic + masking status, are made available to dynamicMaskRoutine for + handling. This option can be used to implement fully customized + interpolations based on the information provided by ESMF. + The default is .false., meaning that only elements affected by + dynamic masking will be handed to dynamicMaskRoutine. + +
+
[dynamicSrcMaskValue]
+
The value for which a source element is considered dynamically + masked. + The default is to not consider any source elements as + dynamically masked. + +
+
[dynamicDstMaskValue]
+
The value for which a destination element is considered dynamically + masked. + The default is to not consider any destination elements as + dynamically masked. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+28.6.5 ESMF_DynamicMaskSetR4R4R4 - Set DynamicMask for R4R4R4 +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_DynamicMaskSetR4R4R4(dynamicMask, dynamicMaskRoutine, &
+     handleAllElements, dynamicSrcMaskValue, &
+     dynamicDstMaskValue, rc)
+
ARGUMENTS: +
     type(ESMF_DynamicMask), intent(out)           :: dynamicMask
+     procedure(ESMF_DynamicMaskRoutineR4R4R4)      :: dynamicMaskRoutine
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     logical,                intent(in),  optional :: handleAllElements
+     real(ESMF_KIND_R4),     intent(in),  optional :: dynamicSrcMaskValue
+     real(ESMF_KIND_R4),     intent(in),  optional :: dynamicDstMaskValue
+     integer,                intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+ Set an ESMF_DynamicMask object suitable for + destination element typekind ESMF_TYPEKIND_R4, + factor typekind ESMF_TYPEKIND_R4, and + source element typekind ESMF_TYPEKIND_R4. + +

+All values in dynamicMask will be reset by this call. + +

+See section 37.2.6 for a general discussion of dynamic masking. + +

+The arguments are: +

+
dynamicMask
+
DynamicMask object. + +
+
dynamicMaskRoutine
+
The routine responsible for handling dynamically masked source and + destination elements. See section 37.2.6 for the precise + definition of the dynamicMaskRoutine procedure interface. + The routine is only called on PETs where at least one interpolation + element is identified for special handling. + +
+
[handleAllElements]
+
If set to .true., all local elements, regardless of their dynamic + masking status, are made available to dynamicMaskRoutine for + handling. This option can be used to implement fully customized + interpolations based on the information provided by ESMF. + The default is .false., meaning that only elements affected by + dynamic masking will be handed to dynamicMaskRoutine. + +
+
[dynamicSrcMaskValue]
+
The value for which a source element is considered dynamically + masked. + The default is to not consider any source elements as + dynamically masked. + +
+
[dynamicDstMaskValue]
+
The value for which a destination element is considered dynamically + masked. + The default is to not consider any destination elements as + dynamically masked. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+28.6.6 ESMF_DynamicMaskSetR4R4R4V - Set DynamicMask for R4R4R4 with vectorization +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_DynamicMaskSetR4R4R4V(dynamicMask, dynamicMaskRoutine, &
+     handleAllElements, dynamicSrcMaskValue, &
+     dynamicDstMaskValue, rc)
+
ARGUMENTS: +
     type(ESMF_DynamicMask), intent(out)           :: dynamicMask
+     procedure(ESMF_DynamicMaskRoutineR4R4R4V)     :: dynamicMaskRoutine
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     logical,                intent(in),  optional :: handleAllElements
+     real(ESMF_KIND_R4),     intent(in),  optional :: dynamicSrcMaskValue
+     real(ESMF_KIND_R4),     intent(in),  optional :: dynamicDstMaskValue
+     integer,                intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+ Set an ESMF_DynamicMask object suitable for + destination element typekind ESMF_TYPEKIND_R4, + factor typekind ESMF_TYPEKIND_R4, and + source element typekind ESMF_TYPEKIND_R4. + +

+All values in dynamicMask will be reset by this call. + +

+See section 37.2.6 for a general discussion of dynamic masking. + +

+The arguments are: +

+
dynamicMask
+
DynamicMask object. + +
+
dynamicMaskRoutine
+
The routine responsible for handling dynamically masked source and + destination elements. See section 37.2.6 for the precise + definition of the dynamicMaskRoutine procedure interface. + The routine is only called on PETs where at least one interpolation + element is identified for special handling. + +
+
[handleAllElements]
+
If set to .true., all local elements, regardless of their dynamic + masking status, are made available to dynamicMaskRoutine for + handling. This option can be used to implement fully customized + interpolations based on the information provided by ESMF. + The default is .false., meaning that only elements affected by + dynamic masking will be handed to dynamicMaskRoutine. + +
+
[dynamicSrcMaskValue]
+
The value for which a source element is considered dynamically + masked. + The default is to not consider any source elements as + dynamically masked. + +
+
[dynamicDstMaskValue]
+
The value for which a destination element is considered dynamically + masked. + The default is to not consider any destination elements as + dynamically masked. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ + +

+29 LocalArray Class +

+ +

+29.1 Description +

+ +

+The ESMF_LocalArray class provides a language independent +representation of data in array format. One of the major functions +of the LocalArray class is to bridge the Fortran/C/C++ language +difference that exists with respect to array representation. All +ESMF Field and Array data is internally stored in ESMF LocalArray +objects allowing transparent access from Fortran and C/C++. + +

+In the ESMF Fortran API the LocalArray becomes visible in those cases +where a local PET may be associated with multiple pieces of an Array, +e.g. if there are multiple DEs associated with a single PET. The Fortran +language standard does not provide an array of arrays construct, however +arrays of derived types holding arrays are possible. ESMF calls use +arguments that are of type ESMF_LocalArray with dimension +attributes where necessary. + +

+29.2 Restrictions and Future Work +

+ +

+ +

    +
  • The TKR (type/kind/rank) overloaded LocalArray interfaces declare the dummy Fortran array arguments with the pointer attribute. The advantage of doing this is that it allows ESMF to inquire information about the provided Fortran array. The disadvantage of this choice is that actual Fortran arrays passed into these interfaces must also be defined with pointer attribute in the user code. +
  • +
+ +

+29.3 Class API +

+ +

+ +

+ +

+ +

+29.3.1 ESMF_LocalArrayAssignment(=) - LocalArray assignment +

+ +

+ +

+
+INTERFACE: +

   interface assignment(=)
+   localarray1 = localarray2
+
ARGUMENTS: +
   type(ESMF_LocalArray) :: localarray1
+   type(ESMF_LocalArray) :: localarray2
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Assign localarray1 as an alias to the same ESMF LocalArray object in memory + as localarray2. If localarray2 is invalid, then localarray1 will be equally invalid after + the assignment. + +

+The arguments are: +

+
localarray1
+
The ESMF_LocalArray object on the left hand side of the assignment. + +
+
localarray2
+
The ESMF_LocalArray object on the right hand side of the assignment. + +
+
+ +

+ +

+ +

+29.3.2 ESMF_LocalArrayOperator(==) - LocalArray equality operator +

+ +

+ +

+
+INTERFACE: +

   interface operator(==)
+   if (localarray1 == localarray2) then ... endif
+   OR
+   result = (localarray1 == localarray2)
+
RETURN VALUE: +
   logical :: result
+
ARGUMENTS: +
   type(ESMF_LocalArray), intent(in) :: localarray1
+   type(ESMF_LocalArray), intent(in) :: localarray2
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Test whether localarray1 and localarray2 are valid aliases to the same ESMF + LocalArray object in memory. For a more general comparison of two ESMF LocalArrays, + going beyond the simple alias test, the ESMF_LocalArrayMatch() function (not yet + implemented) must be used. + +

+The arguments are: +

+
localarray1
+
The ESMF_LocalArray object on the left hand side of the equality + operation. + +
+
localarray2
+
The ESMF_LocalArray object on the right hand side of the equality + operation. + +
+
+ +

+ +

+ +

+29.3.3 ESMF_LocalArrayOperator(/=) - LocalArray not equal operator +

+ +

+ +

+
+INTERFACE: +

   interface operator(/=)
+   if (localarray1 /= localarray2) then ... endif
+   OR
+   result = (localarray1 /= localarray2)
+
RETURN VALUE: +
   logical :: result
+
ARGUMENTS: +
   type(ESMF_LocalArray), intent(in) :: localarray1
+   type(ESMF_LocalArray), intent(in) :: localarray2
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Test whether localarray1 and localarray2 are not valid aliases to the + same ESMF LocalArray object in memory. For a more general comparison of two ESMF + LocalArrays, going beyond the simple alias test, the ESMF_LocalArrayMatch() function + (not yet implemented) must be used. + +

+The arguments are: +

+
localarray1
+
The ESMF_LocalArray object on the left hand side of the non-equality + operation. + +
+
localarray2
+
The ESMF_LocalArray object on the right hand side of the non-equality + operation. + +
+
+ +

+ +

+ +

+29.3.4 ESMF_LocalArrayCreate - Create a LocalArray by explicitly specifying typekind and rank arguments +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_LocalArrayCreate()
+   function ESMF_LocalArrayCreateByTKR(typekind, rank, totalCount, &
+     totalLBound, totalUBound, rc)
+
RETURN VALUE: +
     type(ESMF_LocalArray) :: ESMF_LocalArrayCreateByTKR
+
ARGUMENTS: +
     type(ESMF_TypeKind_Flag), intent(in) :: typekind
+     integer, intent(in) :: rank
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer, intent(in), optional :: totalCount(:)
+     integer, intent(in), optional :: totalLBound(:)
+     integer, intent(in), optional :: totalUBound(:)
+     integer, intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Create a new ESMF_LocalArray and allocate data space, which remains + uninitialized. The return value is a new LocalArray. + +

+The arguments are: +

+
typekind
+
Array typekind. See section 54.61 for valid values. + +
+
rank
+
Array rank (dimensionality, 1D, 2D, etc). Maximum allowed is 7D. + +
+
[totalCount]
+
The number of items in each dimension of the array. This is a 1D + integer array the same length as the rank. The count argument may + be omitted if both totalLBound and totalUBound arguments are present. + +
+
[totalLBound]
+
An integer array of length rank, with the lower index for each dimension. + +
+
[totalUBound]
+
An integer array of length rank, with the upper index for each dimension. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+29.3.5 ESMF_LocalArrayCreate - Create a LocalArray by specifying an ArraySpec +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_LocalArrayCreate()
+   function ESMF_LocalArrayCreateBySpec(arrayspec, totalCount, &
+     totalLBound, totalUBound, rc)
+
RETURN VALUE: +
     type(ESMF_LocalArray) :: ESMF_LocalArrayCreateBySpec
+
ARGUMENTS: +
     type(ESMF_ArraySpec), intent(in) :: arrayspec
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer, intent(in), optional :: totalCount(:)
+     integer, intent(in), optional :: totalLBound(:)
+     integer, intent(in), optional :: totalUBound(:)
+     integer, intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Create a new ESMF_LocalArray and allocate data space, which remains + uninitialized. The return value is a new LocalArray. + +

+The arguments are: +

+
arrayspec
+
ArraySpec object specifying typekind and rank. + +
+
[totalCount]
+
The number of items in each dimension of the array. This is a 1D + integer array the same length as the rank. The count argument may + be omitted if both totalLBound and totalUBound arguments are present. + +
+
[totalLBound]
+
An integer array of length rank, with the lower index for each dimension. + +
+
[totalUBound]
+
An integer array of length rank, with the upper index for each dimension. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+29.3.6 ESMF_LocalArrayCreate - Create a LocalArray from pre-existing LocalArray +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_LocalArrayCreate()
+   function ESMF_LocalArrayCreateCopy(localarray, rc)
+
RETURN VALUE: +
     type(ESMF_LocalArray) :: ESMF_LocalArrayCreateCopy
+
ARGUMENTS: +
     type(ESMF_LocalArray), intent(in) :: localarray
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer, intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Perform a deep copy of an existing ESMF_LocalArray object. The return + value is a new LocalArray. + +

+The arguments are: +

+
localarray
+
Existing LocalArray to be copied. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+29.3.7 ESMF_LocalArrayCreate - Create a LocalArray from a Fortran pointer (associated or unassociated) +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_LocalArrayCreate() 
+   function ESMF_LocalArrCreateByPtr<rank><type><kind>(farrayPtr, & 
+   datacopyflag, totalCount, totalLBound, totalUBound, rc)
+
RETURN VALUE: +
   type(ESMF_LocalArray) :: ESMF_LocalArrCreateByPtr<rank><type><kind>
+
ARGUMENTS: +
   <type> (ESMF_KIND_<kind>), pointer :: farrayPtr(<rank>) 
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+   type(ESMF_DataCopy_Flag), intent(in), optional :: datacopyflag 
+   integer, intent(in), optional :: totalCount(:) 
+   integer, intent(in), optional :: totalLBound(:) 
+   integer, intent(in), optional :: totalUBound(:) 
+   integer, intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Creates an ESMF_LocalArray based on a Fortran array pointer. + Two cases must be distinguished. + +

+First, if farrayPtr is associated + the optional datacopyflag argument may be used to indicate whether the + associated data is to be copied or referenced. For associated farrayPtr + the optional totalCount, totalLBound and totalUBound arguments need + not be specified. However, all present arguments will be checked against + farrayPtr for consistency. + +

+Second, if farrayPtr is unassociated the optional argument datacopyflag + must not be specified. However, in this case a complete set of totalCount and + bounds information must be provided. Any combination of present totalCount + totalLBound and totalUBound arguments that provides a complete + specification is valid. All input information will be checked for + consistency. + +

+The arguments are: +

+
farrayPtr
+
A Fortran array pointer (associated or unassociated). + +
+
[datacopyflag]
+
Indicate copy vs. reference behavior in case of associated farrayPtr. + This argument must not be present for unassociated farrayPtr. + Default to ESMF_DATACOPY_REFERENCE, makes the ESMF_LocalArray + reference the associated data array. If set to ESMF_DATACOPY_VALUE this + routine allocates new memory and copies the data from the pointer into + the new LocalArray allocation. + +
+
[totalCount]
+
The number of items in each dimension of the array. This is a 1D + integer array the same length as the rank. The count argument may + be omitted if both totalLBound and totalUBound arguments are present. + +
+
[totalLBound]
+
An integer array of lower index values. Must be the same length as the rank. + +
+
[totalUBound]
+
An integer array of upper index values. Must be the same length as the rank. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+29.3.8 ESMF_LocalArrayDestroy - Release resources associated with a LocalArray +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_LocalArrayDestroy(localarray, rc)
+
ARGUMENTS: +
     type(ESMF_LocalArray), intent(inout) :: localarray
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer, intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Destroys an ESMF_LocalArray, releasing all resources associated + with the object. + +

+The arguments are: +

+
localarray
+
Destroy contents of this ESMF_LocalArray. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ + +

+ +

+ +

+ +

+29.3.9 ESMF_LocalArrayGet - Get object-wide LocalArray information +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_LocalArrayGet()
+   subroutine ESMF_LocalArrayGetDefault(localarray, &
+     typekind, rank, totalCount, totalLBound, totalUBound, isESMFAllocated, rc)
+
ARGUMENTS: +
     type(ESMF_LocalArray), intent(in) :: localarray
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     type(ESMF_TypeKind_Flag), intent(out), optional :: typekind
+     integer, intent(out), optional :: rank
+     integer, intent(out), optional :: totalCount(:)
+     integer, intent(out), optional :: totalLBound(:)
+     integer, intent(out), optional :: totalUBound(:)
+     logical, intent(out), optional :: isESMFAllocated
+     integer, intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    8.5.0
    +
    Added argument isESMFAllocated to support user query of + whether ESMF or user is responsible for the data allocation + referenced by this object. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Returns information about the ESMF_LocalArray. + +

+The arguments are: +

+
localarray
+
Queried ESMF_LocalArray object. + +
+
[typekind]
+
TypeKind of the LocalArray object. + +
+
[rank]
+
Rank of the LocalArray object. + +
+
[totalCount]
+
Count per dimension. + +
+
[totalLBound]
+
Lower bound per dimension. + +
+
[totalUBound]
+
Upper bound per dimension. + +
+
[isESMFAllocated]
+
Set to .true. for data allocations held by ESMF. Set to + .false. otherwise. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+29.3.10 ESMF_LocalArrayGet - Get a Fortran array pointer from a LocalArray +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_LocalArrayGet() 
+   subroutine ESMF_LocalArrayGetData<rank><type><kind>(localarray, farrayPtr, & 
+   datacopyflag, rc)
+
ARGUMENTS: +
   type(ESMF_LocalArray) :: localarray 
+   <type> (ESMF_KIND_<kind>), pointer :: farrayPtr 
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+   type(ESMF_DataCopy_Flag), intent(in), optional :: datacopyflag 
+   integer, intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Return a Fortran pointer to the data buffer, or return a Fortran pointer + to a new copy of the data. + +

+The arguments are: +

+
localarray
+
The ESMF_LocalArray to get the value from. + +
+
farrayPtr
+
An unassociated or associated Fortran pointer correctly allocated. + +
+
[datacopyflag]
+
An optional copy flag which can be specified. + Can either make a new copy of the data or reference existing data. + See section 54.13 for a list of possible values. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+29.3.11 ESMF_LocalArrayIsCreated - Check whether a LocalArray object has been created +

+ +

+ +

+
+INTERFACE: +

   function ESMF_LocalArrayIsCreated(localarray, rc)
+
RETURN VALUE: +
     logical :: ESMF_LocalArrayIsCreated
+
ARGUMENTS: +
     type(ESMF_LocalArray), intent(in) :: localarray
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer, intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Return .true. if the localarray has been created. Otherwise return + .false.. If an error occurs, i.e. rc /= ESMF_SUCCESS is + returned, the return value of the function will also be .false.. + +

+The arguments are: +

+
localarray
+
ESMF_LocalArray queried. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ + +

+ +

+ +

+ + +

+30 ArraySpec Class +

+ +

+30.1 Description +

+ +

+An ArraySpec is a very simple class that contains type, kind, and +rank information about an Array. This information is stored in two +parameters. TypeKind describes the data type of the elements +in the Array and their precision. Rank is the number of dimensions +in the Array. + +

+The only methods that are associated with the ArraySpec class are those +that allow you to set and retrieve this information. + +

+ +

+30.2 Use and Examples +

+ +

+The ArraySpec is passed in as an argument at Field and +FieldBundle creation in order to describe an Array that will +be allocated or attached at a later time. There are any +number of situations in which this approach is useful. +One common example is a case in which the user wants to create +a very flexible export State with many diagnostic variables +predefined, but only a subset desired and consequently +allocated for a particular run. + +

+ +

+ +

+ +

+

+! !PROGRAM: ESMF_ArraySpecEx - ArraySpec manipulation examples
+!
+! !DESCRIPTION:
+!
+! This program shows examples of ArraySpec set and get usage
+!-----------------------------------------------------------------------------
+#include "ESMF.h"
+
+      ! ESMF Framework module
+      use ESMF
+      use ESMF_TestMod
+      implicit none
+
+      ! local variables
+      type(ESMF_ArraySpec) :: arrayDS
+      integer :: myrank
+      type(ESMF_TypeKind_Flag) :: mytypekind
+
+
+      ! return code
+      integer:: rc, result
+      character(ESMF_MAXSTR) :: testname
+      character(ESMF_MAXSTR) :: failMsg
+
+ +

+

+      ! initialize ESMF framework
+      call ESMF_Initialize(defaultlogfilename="ArraySpecEx.Log", &
+                    logkindflag=ESMF_LOGKIND_MULTI, rc=rc)
+
+ +

+ +

+ +

+30.2.1 Set ArraySpec values +

+ +

+This example shows how to set values in an ESMF_ArraySpec. +

+

+      call ESMF_ArraySpecSet(arrayDS, rank=2, &
+                             typekind=ESMF_TYPEKIND_R8, rc=rc)
+
+ +

+ +

+ +

+30.2.2 Get ArraySpec values +

+ +

+This example shows how to query an ESMF_ArraySpec. +

+

+      call ESMF_ArraySpecGet(arrayDS, rank=myrank, &
+        typekind=mytypekind, rc=rc)
+      print *, "Returned values from ArraySpec:"
+      print *, "rank =", myrank
+
+ +

+

+      ! finalize ESMF framework
+      call ESMF_Finalize(rc=rc)
+
+ +

+

+      end program ESMF_ArraySpecEx
+
+ +

+ + +

+30.3 Restrictions and Future Work +

+ +

+ +

    +
  1. Limit on rank. The values for type, kind and rank passed +into the ArraySpec +class are subject to the same limitations as Arrays. The maximum +array rank is 7, which is the highest rank supported by Fortran. + +

    +

  2. +
+ +

+ +

+30.4 Design and Implementation Notes +

+ +

+The information contained in an ESMF_ArraySpec is used to create +ESMF_Array objects. + +

+ESMF_ArraySpec is a shallow class, and only set and get methods +are needed. They do not need to be created or destroyed. + +

+30.5 Class API +

+ +

+ +

+ +

+ +

+30.5.1 ESMF_ArraySpecAssignment(=) - Assign an ArraySpec to another ArraySpec +

+ +

+ +

+
+INTERFACE: +

   interface assignment(=)
+     arrayspec1 = arrayspec2
+
ARGUMENTS: +
     type(ESMF_ArraySpec) :: arrayspec1
+     type(ESMF_ArraySpec) :: arrayspec2
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Set arrayspec1 equal to arrayspec2. This is the default + Fortran assignment, which creates a complete, independent copy of + arrayspec2 as arrayspec1. If arrayspec2 is an + invalid ESMF_ArraySpec object then arrayspec1 will be + equally invalid after the assignment. + +

+The arguments are: +

+
arrayspec1
+
The ESMF_ArraySpec to be set. + +
+
arrayspec2
+
The ESMF_ArraySpec to be copied. + +
+
+ +

+ +

+ +

+30.5.2 ESMF_ArraySpecOperator(==) - Test if ArraySpec 1 is equal to ArraySpec 2 +

+ +

+ +

+
+INTERFACE: +

   interface operator(==)
+     if (arrayspec1 == arrayspec2) then ... endif
+                  OR
+     result = (arrayspec1 == arrayspec2)
+
RETURN VALUE: +
     logical :: result
+
ARGUMENTS: +
     type(ESMF_ArraySpec), intent(in) :: arrayspec1
+     type(ESMF_ArraySpec), intent(in) :: arrayspec2
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Overloads the (==) operator for the ESMF_ArraySpec class to return + .true. if arrayspec1 and arrayspec2 specify the same + type, kind and rank, and .false. otherwise. + +

+The arguments are: +

+
arrayspec1
+
First ESMF_ArraySpec in comparison. + +
+
arrayspec2
+
Second ESMF_ArraySpec in comparison. + +
+
+ +

+ +

+ +

+30.5.3 ESMF_ArraySpecOperator(/=) - Test if ArraySpec 1 is not equal to ArraySpec 2 +

+ +

+ +

+
+INTERFACE: +

   interface operator(/=)
+     if (arrayspec1 /= arrayspec2) then ... endif
+                  OR
+     result = (arrayspec1 /= arrayspec2)
+
RETURN VALUE: +
     logical :: result
+
ARGUMENTS: +
     type(ESMF_ArraySpec), intent(in) :: arrayspec1
+     type(ESMF_ArraySpec), intent(in) :: arrayspec2
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Overloads the (/=) operator for the ESMF_ArraySpec class to return + .true. if arrayspec1 and arrayspec2 do not specify the + same type, kind or rank, and .false. otherwise. + +

+The arguments are: +

+
arrayspec1
+
First ESMF_ArraySpec in comparison. + +
+
arrayspec2
+
Second ESMF_ArraySpec in comparison. + +
+
+ +

+ +

+ +

+30.5.4 ESMF_ArraySpecGet - Get values from an ArraySpec +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_ArraySpecGet(arrayspec, rank, typekind, rc)
+
ARGUMENTS: +
     type(ESMF_ArraySpec),     intent(in)            :: arrayspec
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,                  intent(out), optional :: rank
+     type(ESMF_TypeKind_Flag), intent(out), optional :: typekind
+     integer,                  intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Returns information about the contents of an ESMF_ArraySpec. + +

+The arguments are: +

+
arrayspec
+
The ESMF_ArraySpec to query. + +
+
[rank]
+
Array rank (dimensionality - 1D, 2D, etc). Maximum possible is 7D. + +
+
[typekind]
+
Array typekind. See section 54.61 for valid values. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+30.5.5 ESMF_ArraySpecPrint - Print ArraySpec information +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_ArraySpecPrint(arrayspec, rc)
+
ARGUMENTS: +
     type(ESMF_ArraySpec), intent(in)            :: arrayspec
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,              intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Print ArraySpec internals. +
+

+The arguments are: +

+
arrayspec
+
Specified ESMF_ArraySpec object. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+30.5.6 ESMF_ArraySpecSet - Set values for an ArraySpec +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_ArraySpecSet(arrayspec, rank, typekind, rc)
+
ARGUMENTS: +
     type(ESMF_ArraySpec),     intent(out)           :: arrayspec
+     integer,                  intent(in)            :: rank
+     type(ESMF_TypeKind_Flag), intent(in)            :: typekind
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,                  intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Creates a description of the data - the typekind, the rank, + and the dimensionality. + +

+The arguments are: +

+
arrayspec
+
The ESMF_ArraySpec to set. + +
+
rank
+
Array rank (dimensionality - 1D, 2D, etc). Maximum allowed is 7D. + +
+
typekind
+
Array typekind. See section 54.61 for valid values. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+30.5.7 ESMF_ArraySpecValidate - Validate ArraySpec internals +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_ArraySpecValidate(arrayspec, rc)
+
ARGUMENTS: +
     type(ESMF_ArraySpec), intent(in)            :: arrayspec
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,              intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Validates that the arrayspec is internally consistent. + The method returns an error code if problems are found. + +

+The arguments are: +

+
arrayspec
+
Specified ESMF_ArraySpec object. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ + +

+31 Grid Class +

+ +

+31.1 Description +

+ +

+The ESMF Grid class is used to describe the geometry and discretization +of logically rectangular physical grids. It also contains the +description of the grid's underlying topology and the decomposition +of the physical grid across the available computational resources. +The most frequent use of the Grid class is to describe physical grids +in user code so that sufficient information is available to perform ESMF +methods such as regridding. + +

+

+ + + + + + + + + + + + + + + + + + + +
+
+Key Features
Representation of grids formed by logically rectangular regions, +including uniform and rectilinear grids (e.g. lat-lon grids), +curvilinear grids (e.g. displaced pole grids), and grids formed +by connected logically rectangular regions (e.g. cubed sphere grids).
Support for 1D, 2D, 3D, and higher dimension grids.
Distribution of grids across computational resources for parallel +operations - users set which grid dimensions are distributed.
Grids can be created already distributed, so that no single +resource needs global information during the creation process.
Options to define periodicity and other edge connectivities either +explicitly or implicitly via shape shortcuts.
Options for users to define grid coordinates themselves or to call +prefabricated coordinate generation routines for standard grids.
Options for incremental construction of grids.
Options for using a set of pre-defined stagger locations or for setting +custom stagger locations.
+
+ +

+ +

+31.1.1 Grid Representation in ESMF +

+ +

+ESMF Grids are based on the concepts described in A Standard +Description of Grids Used in Earth System Models [Balaji 2006]. In this document +Balaji introduces the mosaic concept as a means of describing +a wide variety of Earth system model grids. A mosaic is +composed of grid tiles connected at their edges. Mosaic grids +includes simple, single tile grids as a special case. + +

+The ESMF Grid class is a representation of a mosaic grid. Each ESMF +Grid is constructed of one or more logically rectangular Tiles. +A Tile will usually have some physical significance (e.g. the region +of the world covered by one face of a cubed sphere grid). + +

+The piece of a Tile that resides on one DE (for simple cases, a DE +can be thought of as a processor - see section on the DELayout) +is called a LocalTile. For example, the six faces of a cubed +sphere grid are each Tiles, and each Tile can be divided into many +LocalTiles. + +

+Every ESMF Grid contains a DistGrid object, which defines the Grid's +index space, topology, distribution, and connectivities. It enables +the user to define the complex edge relationships of tripole and other +grids. The DistGrid can be created explicitly and passed into a Grid +creation routine, or it can be created implicitly if the user takes +a Grid creation shortcut. The DistGrid used +in Grid creation describes the properties of the Grid cells. In addition +to this one, the Grid internally creates DistGrids for each stagger location. +These stagger DistGrids are related to the original DistGrid, but may +contain extra padding to represent the extent of the index space of +the stagger. These DistGrids are what are used when a Field is created +on a Grid. + +

+ +

+31.1.2 Supported Grids +

+ +

+The range of supported grids in ESMF can be defined by: + +

    +
  • Types of topologies and shapes supported. ESMF supports one or +more logically rectangular grid Tiles with connectivities specified +between cells. For more details see section 31.1.3. +
  • +
  • Types of distributions supported. ESMF supports regular, +irregular, or arbitrary distributions of data. +For more details see section 31.1.4. +
  • +
  • Types of coordinates supported. ESMF supports uniform, rectilinear, +and curvilinear coordinates. For more details see section 31.1.5. +
  • +
+ +

+ +

+ +
+31.1.3 Grid Topologies and Periodicity +

+ +ESMF has shortcuts for the creation of standard Grid topologies +or shapes up to 3D. In many cases, these enable the user to +bypass the step of creating a DistGrid before creating the Grid. +There are two sets of methods which allow the user to do this. These two sets of methods cover the same set of topologies, but +allow the user to specify them in different ways. + +

+The first set of these are a group of overloaded +calls broken up by the number of periodic dimensions they specify. With these the user can pick +the method which creates a Grid with the number of periodic dimensions they need, and then specify other connectivity +options via arguments to the method. The following is a description of these methods: + +

+ +

+
+ +

+

+
ESMF_GridCreateNoPeriDim()
+
Allows the user to create a Grid with no edge connections, for example, a regional Grid with closed boundaries. + +

+

+
ESMF_GridCreate1PeriDim()
+
Allows the user to create a Grid with 1 periodic dimension and supports a range of options for what to do at the pole (see Section 31.2.5). Some examples of Grids which can be created here are tripole spheres, bipole spheres, cylinders with open poles. + +

+

+
ESMF_GridCreate2PeriDim()
+
Allows the user to create a Grid with 2 periodic dimensions, for example a torus, or a regional Grid with +doubly periodic boundaries. +
+
+ +

+More detailed information can be found in the API description of each. + +

+ +

+
+ +

+The second set of shortcut methods is a set of methods overloaded under the name ESMF_GridCreate(). These methods +allow the user to specify the connectivites at the end of each dimension, by using the ESMF_GridConn_Flag flag. The table below shows the ESMF_GridConn_Flag settings used to create +standard shapes in 2D using the ESMF_GridCreate() call. Two values +are specified for each dimension, one for the low end and one for +the high end of the dimension's index values. + +

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
2D ShapeconnflagDim1(1)connflagDim1(2)connflagDim2(1)connflagDim2(2)
RectangleNONENONENONENONE
Bipole SpherePOLEPOLEPERIODICPERIODIC
Tripole SpherePOLEBIPOLEPERIODICPERIODIC
CylinderNONENONEPERIODICPERIODIC
TorusPERIODICPERIODICPERIODICPERIODIC
+ +

+
+ +

+If the user's grid shape is too complex for an ESMF shortcut routine, +or involves more than three dimensions, a DistGrid can be created +to specify the shape in detail. This DistGrid is then passed +into a Grid create call. + +

+ +

+ +
+31.1.4 Grid Distribution +

+ +

+ESMF Grids have several options for data distribution (also referred to +as decomposition). As ESMF Grids are cell based, these +options are all specified in terms of how the cells in the Grid +are broken up between DEs. + +

+The main distribution options are regular, irregular, and arbitrary. +A regular distribution is one in which the same number of +contiguous grid cells are assigned to each DE in the +distributed dimension. An irregular distribution is one in which +unequal numbers of contiguous grid cells are assigned to each +DE in the distributed dimension. An arbitrary distribution is +one in which any grid cell can be assigned to any DE. Any of these +distribution options can be applied to any of the grid shapes (i.e., +rectangle) or types (i.e., rectilinear). Support for arbitrary distribution +is limited in the current version of ESMF, see Section 31.3.7 for +an example of creating a Grid with an arbitrary distribution. + +

+Figure 13 illustrates options for distribution. + +

+ + + +
Figure 13: +Examples of regular and irregular decomposition of +a grid a that is 6x6, and an arbitrary decomposition of +a grid b that is 6x3.
+\scalebox{0.9}{\includegraphics{GridDecomps}}
+
+ +

+A distribution can also be specified using the DistGrid, by passing +object into a Grid create call. + +

+ +

+ +
+31.1.5 Grid Coordinates +

+Grid Tiles can have uniform, rectilinear, or curvilinear +coordinates. The coordinates of uniform grids are equally spaced along +their axes, and can be fully specified by the coordinates of the two opposing points +that define the grid's physical span. The coordinates of rectilinear grids +are unequally spaced along their axes, and can be fully specified by giving +the spacing of grid points along each axis. The coordinates of curvilinear +grids must be specified by giving the explicit set of coordinates for each +grid point. Curvilinear grids are often uniform or rectilinear grids that +have been warped; for example, to place a pole over a land mass so that it +does not affect the computations performed on an ocean model grid. Figure +14 shows examples of each type of grid. + +

+ +

+ + + +
Figure 14: +Types of logically rectangular grid tiles. Red circles show the +values needed to specify grid coordinates for each type.
+\scalebox{0.9}{\includegraphics{LogRectGrids}}
+
+ +

+Each of these coordinate types can be set for each of the standard grid shapes +described in section 31.1.3. + +

+The table below shows how examples of common single Tile grids fall +into this shape and coordinate taxonomy. Note that any +of the grids in the table can have a regular or arbitrary distribution. + +

+ +

+
+ + + + + + + + + + + + + + + + +
 UniformRectilinearCurvilinear
SphereGlobal uniform lat-lon gridGaussian gridDisplaced pole grid
RectangleRegional uniform lat-lon gridGaussian grid sectionPolar stereographic grid section
+ +

+ +

+31.1.6 Coordinate Specification and Generation +

+ +

+There are two ways of specifying coordinates in ESMF. The +first way is for the user to set the coordinates. The second +way is to take a shortcut and have the framework generate +the coordinates. + +

+See Section 31.3.13 for more description and examples of +setting coordinates. + +

+ +

+31.1.7 Staggering +

+ +

+Staggering is a finite difference technique in which the values +of different physical quantities are placed at different locations +within a grid cell. + +

+The ESMF Grid class supports a variety of stagger locations, including +cell centers, corners, and edge centers. The default stagger location in +ESMF is the cell center, and cell counts in Grid are based on this assumption. +Combinations of the 2D ESMF stagger locations are sufficient to specify any of the +Arakawa staggers. ESMF also supports staggering in 3D and higher dimensions. +There are shortcuts for standard staggers, and interfaces through which users +can create custom staggers. + +

+As a default the ESMF Grid class provides symmetric staggering, so +that cell centers are enclosed by cell perimeter (e.g. corner) +stagger locations. This means the coordinate arrays for stagger +locations other than the center will have an additional element of +padding in order to enclose the cell center locations. +However, to achieve other types of staggering, the user may alter +or eliminate this padding by using the appropriate options when adding +coordinates to a Grid. + +

+In the current release, only the cell center stagger location is supported for an +arbitrarily distributed grid. For examples and a full description of the stagger interface +see Section 31.3.13. + +

+ +

+31.1.8 Masking +

+ +

+Masking is the process whereby parts of a Grid can be marked to be +ignored during an operation. For a description of how to set mask information in +the Grid, see here 31.3.17. For a description of how masking works +in regridding, see here 24.2.10. + +

+31.2 Constants +

+ +

+ +

+ +
+31.2.1 ESMF_GRIDCONN +

+ +

+DESCRIPTION: +
+ +The ESMF_GridCreateShapeTile command has three specific arguments +connflagDim1, connflagDim2, and connflagDim3. These can be used +to setup different types of connections at the ends of each dimension +of a Tile. Each of these parameters is a two element array. The first +element is the connection type at the minimum end of the dimension +and the second is the connection type at the maximum end. The default +value for all the connections is ESMF_GRIDCONN_NONE, specifying no +connection. + +

+The type of this flag is: + +

+type(ESMF_GridConn_Flag) + +

+The valid values are: +

+
ESMF_GRIDCONN_NONE
+
No connection. + +

+

+
ESMF_GRIDCONN_PERIODIC
+
Periodic connection. + +

+

+
ESMF_GRIDCONN_POLE
+
This edge is connected to itself. Given +that the edge is n elements long, then element i is connected to +element ((i+n/2) mod n). + +

+

+
ESMF_GRIDCONN_BIPOLE
+
This edge is connected to itself. Given +that the edge is n elements long, element i is connected to element n-i+1. +
+
+ +

+ +

+ +
+31.2.2 ESMF_GRIDITEM +

+ +

+DESCRIPTION: +
+The ESMF Grid can contain other kinds of data besides coordinates. +This data is referred to as Grid “items”. Some items may be used +by ESMF for calculations involving the Grid. The following +are the valid values of ESMF_GridItem_Flag. + +

+The type of this flag is: + +

+type(ESMF_GridItem_Flag) + +

+The valid values are: +
+ + + + + + + + + + + + + + + + + + + +
Item LabelType RestrictionType DefaultESMF UsesControls
ESMF_GRIDITEM_MASKESMF_TYPEKIND_I4ESMF_TYPEKIND_I4YESMasking in Regrid
ESMF_GRIDITEM_AREANONEESMF_TYPEKIND_R8YESConservation in Regrid
+ +

+ +

+
+ +

+NOTE: One important thing to consider when setting areas in the Grid using ESMF_GRIDITEM_AREA, + ESMF doesn't currently do unit conversion on areas. If these areas are going to be used + in a process that also involves the areas of another Grid or Mesh (e.g. conservative regridding), then + it is the user's responsibility to make sure that the area units are consistent between the two sides. + If ESMF calculates an area on the surface of a sphere, then it is in units of square radians. If + it calculates the area for a Cartesian grid, then it is in the same units as the coordinates, but squared. + +

+ +

+ +
+31.2.3 ESMF_GRIDMATCH +

+ +

+DESCRIPTION: +
+ This type is used to indicate the level to which two grids match. + +

+The type of this flag is: + +

+type(ESMF_GridMatch_Flag) + +

+The valid values are: +

+
ESMF_GRIDMATCH_INVALID:
+
Indicates a non-valid matching level. Returned + if an error occurs in the matching function. If a higher matching level + is returned then no error occurred. +
+
ESMF_GRIDMATCH_NONE:
+
The lowest level of grid matching. + This indicates that the Grid's don't match at any of the higher levels. +
+
ESMF_GRIDMATCH_EXACT:
+
All the pieces of the Grid (e.g. distgrids, + coordinates, etc.) except the name, match between the two Grids. +
+
ESMF_GRIDMATCH_ALIAS:
+
Both Grid variables are aliases to the exact + same Grid object in memory. +
+
+ +

+ +

+ +
+31.2.4 ESMF_GRIDSTATUS +

+ +

+DESCRIPTION: +
+The ESMF Grid class can exist in two states. These states are +present so that the library code can detect if a Grid has been +appropriately setup for the task at hand. The following +are the valid values of ESMF_GRIDSTATUS. + +

+The type of this flag is: + +

+type(ESMF_GridStatus_Flag) + +

+The valid values are: +

+
ESMF_GRIDSTATUS_EMPTY:
+
Status after a Grid has been created with + ESMF_GridEmptyCreate. A Grid object container is allocated but + space for internal objects is not. Topology information and coordinate + information is incomplete. This object can be used in ESMF_GridEmptyComplete() + methods in which additional information is added to the Grid. +
+
ESMF_GRIDSTATUS_COMPLETE:
+
The Grid has a specific topology and + distribution, but incomplete coordinate arrays. The Grid can be used + as the basis for allocating a Field, and coordinates can be added + via ESMF_GridCoordAdd() to allow other functionality. +
+
+ +

+ +

+ +
+31.2.5 ESMF_POLEKIND +

+ +

+DESCRIPTION: +
+This type describes the type of connection that occurs at the pole when a Grid is +created with ESMF_GridCreate1PeriodicDim(). + +

+The type of this flag is: + +

+type(ESMF_PoleKind_Flag) + +

+The valid values are: +

+
ESMF_POLEKIND_NONE
+
No connection at pole. + +

+

+
ESMF_POLEKIND_MONOPOLE
+
This edge is connected to itself. Given +that the edge is n elements long, then element i is connected to +element i+n/2. + +

+

+
ESMF_POLEKIND_BIPOLE
+
This edge is connected to itself. Given +that the edge is n elements long, element i is connected to element n-i+1. +
+
+ +

+ +

+ +
+31.2.6 ESMF_STAGGERLOC +

+ +

+DESCRIPTION: +
+ In the ESMF Grid class, data can be located at different positions in a + Grid cell. When setting or retrieving coordinate data the stagger location is + specified to tell the Grid method from where in the cell to get the data. + Although the user may define their own custom stagger locations, + ESMF provides a set of predefined locations for ease of use. The +following are the valid predefined stagger locations. + +

+ +

+
+ +

+

+
+
+ + + +
Figure 15: +2D Predefined Stagger Locations
+\scalebox{0.75}{\includegraphics{GridStaggerLoc2D}}
+
+
+
+ +

+The 2D predefined stagger locations (illustrated in figure 15) are: +

+
ESMF_STAGGERLOC_CENTER:
+
The center of the cell. +
+
ESMF_STAGGERLOC_CORNER:
+
The corners of the cell. +
+
ESMF_STAGGERLOC_EDGE1:
+
The edges offset from the center in the 1st dimension. +
+
ESMF_STAGGERLOC_EDGE2:
+
The edges offset from the center in the 2nd dimension. +
+
+ +

+ +

+
+ +

+

+
+
+ + + +
Figure 16: +3D Predefined Stagger Locations
+\scalebox{1.0}{\includegraphics{GridStaggerLoc3D}}
+
+
+
+ +

+The 3D predefined stagger locations (illustrated in figure 16) are: +

+
ESMF_STAGGERLOC_CENTER_VCENTER:
+
The center of the 3D cell. +
+
ESMF_STAGGERLOC_CORNER_VCENTER:
+
Half way up the vertical edges of the cell. +
+
ESMF_STAGGERLOC_EDGE1_VCENTER:
+
The center of the face bounded by edge 1 and the vertical dimension. +
+
ESMF_STAGGERLOC_EDGE2_VCENTER:
+
The center of the face bounded by edge 2 and the vertical dimension. +
+
ESMF_STAGGERLOC_CORNER_VFACE:
+
The corners of the 3D cell. +
+
ESMF_STAGGERLOC_EDGE1_VFACE:
+
The center of the edges of the 3D cell parallel offset from the center in the 1st dimension. +
+
ESMF_STAGGERLOC_EDGE2_VFACE:
+
The center of the edges of the 3D cell parallel offset from the center in the 2nd dimension. +
+
ESMF_STAGGERLOC_CENTER_VFACE:
+
The center of the top and bottom face. The face bounded by the 1st and 2nd dimensions. +
+
+ +

+31.3 Use and Examples +

+ +

+This section describes the use of the ESMF Grid class. It first discusses +the more user friendly shape specific interface to the Grid. +During this discussion it covers creation and options, +adding stagger locations, coordinate data access, and other grid +functionality. After this initial phase the document discusses +the more advanced options which the user can employ should they +need more customized interaction with the Grid class. + +

+ +

+ +

+ +

+ +

+31.3.1 Create single-tile Grid shortcut method +

+ +

+The set of methods ESMF_GridCreateNoPeriDim(), ESMF_GridCreate1PeriDim(), + ESMF_GridCreate2PeriDim(), and ESMF_GridCreate() are shortcuts + for building 2D or 3D single tile logically rectangular Grids. + These methods support all three types of distributions described in + Section 31.1.4: regular, irregular and arbitrary. + +

+The ESMF Grid is cell based and so for all distribution + options the methods take as input the number of cells to describe + the total index space and the number of cells to specify distribution. + +

+To create a Grid + with a regular distribution the user specifies the global + maximum and minimum ranges of the Grid cell index space (maxIndex and + minIndex), and the number of pieces in which to partition + each dimension (via a regDecomp argument). + ESMF then divides the index space as evenly as possible + into the specified number of pieces. If there are cells + left over then they are distributed one per DE starting from + the first DE until they are gone. + +

+If minIndex is + not specified, then the bottom of the Grid cell index range is assumed + to be (1,1,...,1). If regDecomp is not specified, then + by default ESMF creates a distribution that partitions the + grid cells in the first dimension (e.g. NPx1x1...1) as evenly + as possible by the number of PETs NP. + The remaining dimensions are not partitioned. + The dimension of the Grid is the size of maxIndex. + The following is an example of creating a 10x20x30 3D grid + where the first dimensions is broken into 2 pieces, the second + is broken into 4 pieces, and the third is not divided (i.e. every DE will + have length 30 in the 3rd dimension). +

+

+  grid3D=ESMF_GridCreateNoPeriDim(regDecomp=(/2,4,1/), maxIndex=(/10,20,30/), &
+           rc=rc)
+
+ +

+Irregular distribution requires the user to specify the + exact number of Grid cells per DE in each dimension. In the + ESMF_GridCreateNoPeriDim() call the countsPerDEDim1, + countsPerDim2, and countsPerDim3 + arguments are used to specify a rectangular distribution + containing size(countsPerDEDim1) by size(countsPerDEDim2) by + size(countsPerDEDim3) DEs. The entries in each of these arrays + specify the number of grid cells per DE in that dimension. + The dimension of the grid is determined by the presence of + countsPerDEDim3. If it's present the Grid + will be 3D. If just countsPerDEDim1 and + countsPerDEDim2 are specified the Grid + will be 2D. + +

+The following call illustrates the creation of + a 10x20 two dimensional rectangular Grid distributed across six DEs + that are arranged 2x3. In the first dimension there are 3 grid + cells on the first DE and 7 cells on the second DE. The second + dimension has 3 DEs with 11,2, and 7 cells, respectively. +

+

+   grid2D=ESMF_GridCreateNoPeriDim(countsPerDEDim1=(/3,7/), &
+          countsPerDEDim2=(/11,2,7/), rc=rc)
+
+ +

+To add a distributed third dimension of size 30, broken up into + two groups of 15, the above call would be altered as follows. +

+

+   grid3d=ESMF_GridCreateNoPeriDim(countsPerDEDim1=(/3,7/), &
+          countsPerDEDim2=(/11,2,7/), countsPerDEDim3=(/15,15/), rc=rc)
+
+ +

+To make a third dimension distributed across only 1 DE, then + countsPerDEDim3 in the call should only have a single term. +

+

+   grid3D=ESMF_GridCreateNoPeriDim(countsPerDEDim1=(/3,7/),  &
+          countsPerDEDim2=(/11,2,7/), countsPerDEDim3=(/30/), rc=rc)
+
+ +

+The petMap parameter may be used to specify on to which specific PETs + the DEs in the Grid are assigned. Each entry in petMap specifies to which PET the corresponding + DE should be assigned. For example, petMap(3,2)=4 tells the Grid + create call to put the DE located at column 3 row 2 on PET 4. + Note that this parameter is only available for the + regular and irregular distribution types. The petMap + array is a 3D array, for a 3D Grid each of its dimensions correspond to a + Grid dimension. If the Grid is 2D, then the first two dimensions correspond + to Grid dimensions and the last dimension should be of size 1. + The size of each petMap dimension is + the number of DE's along that dimension in the Grid. For a + regular Grid, the size is equal to the number in regDecomp + (i.e. size(petMap,d)=regDecomp(d) for all dimensions d in the Grid). For + an irregular Grid the size is equal to the number of items in + the corresponding countsPerDEDim variable (i.e. + size(petMap,d)=size(countsPerDEDimd) for all dimensions d in the Grid). + The following example demonstrates how to specify the PET to DE association + for an ESMF_GridCreateNoPeriDim() call. + + +

+

+   ! allocate memory for petMap
+   allocate( petMap(2,2,1) )
+
+   ! Set petMap
+   petMap(:,1,1) = (/3,2/) ! DE (1,1,1) on PET 3 and DE (2,1,1) on PET 2
+   petMap(:,2,1) = (/1,0/) ! DE (1,2,1) on PET 1 and DE (2,2,1) on PET 0
+
+
+   ! Let the 3D grid be be distributed only in the first two dimensions.
+   grid2D=ESMF_GridCreateNoPeriDim(countsPerDEDim1=(/3,7/), &
+           countsPerDEDim2=(/7,6/), petMap=petMap, rc=rc)
+
+ +

+To create an grid with arbitrary distribution, the user specifies the global minimum and maximum + ranges of the index space with the + arguments minIndex and maxIndex, the total number of cells and their index space locations + residing on the local PET through a localArbIndexCount and a localArbIndex + argument. localArbIndex is a 2D array with size (localArbIndexCount, n) where n is the total number + dimensions distributed arbitrarily. + Again, if minIndex is not specified, then the bottom of the + index range is assumed to be (1,1,...). + The dimension of the Grid is equal to the size of maxIndex. + If n (number of arbitrarily distributed dimension) is less than the grid dimension, an optional + argument distDim is used to specify which of the grid dimension is arbitrarily distributed. + If not given, the first n dimensions are assumed to be distributed. + +

+The following example creates a 2D Grid of dimensions 5x5, and places + the diagonal elements (i.e. indices (i,i) where i goes from 1 to 5) + on the local PET. The remaining PETs would individually declare + the remainder of the Grid locations. +

+

+   ! allocate memory for localArbIndex
+   allocate( localArbIndex(5,2) )
+   ! Set local indices
+   localArbIndex(1,:)=(/1,1/)
+   localArbIndex(2,:)=(/2,2/)
+   localArbIndex(3,:)=(/3,3/)
+   localArbIndex(4,:)=(/4,4/)
+   localArbIndex(5,:)=(/5,5/)
+
+   ! Create a 2D Arbitrarily distributed Grid
+   grid2D=ESMF_GridCreateNoPeriDim(maxIndex=(/5,5/), &
+         arbIndexList=localArbIndex, arbIndexCount=5, rc=rc)
+
+ +

+To create a 3D Grid of dimensions 5x6x5 with the first and the third dimensions distributed arbitrarily, + distDim is used. +

+

+   ! Create a 3D Grid with the 1st and 3rd dimension arbitrarily distributed
+   grid3D=ESMF_GridCreateNoPeriDim(maxIndex=(/5,6,5/), &
+         arbIndexList=localArbIndex, arbIndexCount=5, &
+         distDim=(/1,3/), rc=rc)
+
+ +

+ +

+ +
+31.3.2 Create a 2D regularly distributed rectilinear Grid + with uniformly spaced coordinates +

+ +

+The following is an example of creating a simple rectilinear grid + and loading in a set of coordinates. It illustrates a straightforward use + of the ESMF_GridCreateNoPeriDim() call described in the previous section. + This code creates a 10x20 2D grid with uniformly spaced coordinates varying from (10,10) to (100,200). + The grid is partitioned using a regular distribution. The first dimension + is divided into two pieces, and the second dimension is divided into 3. + This example assumes that the code is being run with a 1-1 mapping between + PETs and DEs because we are only accessing the first DE on each PET (localDE=0). + Because we have 6 DEs (2x3), this example would only work when run on 6 PETs. + The Grid is created with global indices. After Grid creation the + local bounds and native Fortran arrays are retrieved and the + coordinates are set by the user. + +

+

+   !-------------------------------------------------------------------
+   ! Create the Grid:  Allocate space for the Grid object, define the
+   ! topology and distribution of the Grid, and specify that it
+   ! will have global indices.  Note that here aperiodic bounds are
+   ! specified by the argument name. In this call the minIndex hasn't
+   ! been set, so it defaults to (1,1,...). The default is to
+   ! divide the index range as equally as possible among the DEs
+   ! specified in regDecomp. This behavior can be changed by
+   ! specifying decompFlag.
+   !-------------------------------------------------------------------
+   grid2D=ESMF_GridCreateNoPeriDim(          &
+         ! Define a regular distribution
+         maxIndex=(/10,20/), & ! define index space
+         regDecomp=(/2,3/),  & ! define how to divide among DEs
+         coordSys=ESMF_COORDSYS_CART, &
+         ! Specify mapping of coords dim to Grid dim
+         coordDep1=(/1/), & ! 1st coord is 1D and depends on 1st Grid dim
+         coordDep2=(/2/), & ! 2nd coord is 1D and depends on 2nd Grid dim
+         indexflag=ESMF_INDEX_GLOBAL, &
+         rc=rc)
+
+ +

+

+   !-------------------------------------------------------------------
+   ! Allocate coordinate storage and associate it with the center
+   ! stagger location.  Since no coordinate values are specified in
+   ! this call no coordinate values are set yet.
+   !-------------------------------------------------------------------
+   call ESMF_GridAddCoord(grid2D,  &
+          staggerloc=ESMF_STAGGERLOC_CENTER, rc=rc)
+
+ +

+

+   !-------------------------------------------------------------------
+   ! Get the pointer to the first coordinate array and the bounds
+   ! of its global indices on the local DE.
+   !-------------------------------------------------------------------
+   call ESMF_GridGetCoord(grid2D, coordDim=1, localDE=0, &
+          staggerloc=ESMF_STAGGERLOC_CENTER, &
+          computationalLBound=lbnd, computationalUBound=ubnd, &
+          farrayPtr=coordX, rc=rc)
+
+ +

+

+   !-------------------------------------------------------------------
+   ! Calculate and set coordinates in the first dimension [10-100].
+   !-------------------------------------------------------------------
+   do i=lbnd(1),ubnd(1)
+        coordX(i) = i*10.0
+   enddo
+
+   !-------------------------------------------------------------------
+   ! Get the pointer to the second coordinate array and the bounds of
+   ! its global indices on the local DE.
+   !-------------------------------------------------------------------
+   call ESMF_GridGetCoord(grid2D, coordDim=2, localDE=0, &
+          staggerloc=ESMF_STAGGERLOC_CENTER, &
+          computationalLBound=lbnd, computationalUBound=ubnd, &
+          farrayPtr=coordY, rc=rc)
+
+ +

+

+   !-------------------------------------------------------------------
+   ! Calculate and set coordinates in the second dimension [10-200]
+   !-------------------------------------------------------------------
+   do j=lbnd(1),ubnd(1)
+        coordY(j) = j*10.0
+   enddo
+
+ +

+ +

+ +
+31.3.3 Create a periodic 2D regularly distributed rectilinear Grid +

+ +

+The following is an example of creating a simple rectilinear grid + with a periodic dimension and loading in a set of coordinates. It illustrates a straightforward use + of the ESMF_GridCreate1PeriDim() call described in the previous section. + This code creates a 360x180 2D grid with uniformly spaced coordinates varying from (1,1) to (360,180). + The grid is partitioned using a regular distribution. The first dimension + is divided into two pieces, and the second dimension is divided into 3. + This example assumes that the code is being run with a 1-1 mapping between + PETs and DEs because we are only accessing the first DE on each PET (localDE=0). + Because we have 6 DEs (2x3), this example would only work when run on 6 PETs. + The Grid is created with global indices. After Grid creation the + local bounds and native Fortran arrays are retrieved and the + coordinates are set by the user. + +

+

+   !-------------------------------------------------------------------
+   ! Create the Grid:  Allocate space for the Grid object, define the
+   ! topology and distribution of the Grid, and specify that it
+   ! will have global indices.  Note that here a single periodic connection
+   ! is specified by the argument name. In this call the minIndex hasn't
+   ! been set, so it defaults to (1,1,...). The default is to
+   ! divide the index range as equally as possible among the DEs
+   ! specified in regDecomp. This behavior can be changed by
+   ! specifying decompFlag. Since the coordinate system is
+   ! not specified, it defaults to ESMF_COORDSYS_SPH_DEG.
+   !-------------------------------------------------------------------
+   grid2D=ESMF_GridCreate1PeriDim(          &
+         ! Define a regular distribution
+         maxIndex=(/360,180/), & ! define index space
+         regDecomp=(/2,3/),  & ! define how to divide among DEs
+         ! Specify mapping of coords dim to Grid dim
+         coordDep1=(/1/), & ! 1st coord is 1D and depends on 1st Grid dim
+         coordDep2=(/2/), & ! 2nd coord is 1D and depends on 2nd Grid dim
+         indexflag=ESMF_INDEX_GLOBAL, &
+         rc=rc)
+
+ +

+

+   !-------------------------------------------------------------------
+   ! Allocate coordinate storage and associate it with the center
+   ! stagger location.  Since no coordinate values are specified in
+   ! this call no coordinate values are set yet.
+   !-------------------------------------------------------------------
+   call ESMF_GridAddCoord(grid2D,  &
+          staggerloc=ESMF_STAGGERLOC_CENTER, rc=rc)
+
+ +

+

+   !-------------------------------------------------------------------
+   ! Get the pointer to the first coordinate array and the bounds
+   ! of its global indices on the local DE.
+   !-------------------------------------------------------------------
+   call ESMF_GridGetCoord(grid2D, coordDim=1, localDE=0, &
+          staggerloc=ESMF_STAGGERLOC_CENTER, &
+          computationalLBound=lbnd, computationalUBound=ubnd, &
+          farrayPtr=coordX, rc=rc)
+
+ +

+

+   !-------------------------------------------------------------------
+   ! Calculate and set coordinates in the first dimension [10-100].
+   !-------------------------------------------------------------------
+   do i=lbnd(1),ubnd(1)
+        coordX(i) = i*1.0
+   enddo
+
+   !-------------------------------------------------------------------
+   ! Get the pointer to the second coordinate array and the bounds of
+   ! its global indices on the local DE.
+   !-------------------------------------------------------------------
+   call ESMF_GridGetCoord(grid2D, coordDim=2, localDE=0, &
+          staggerloc=ESMF_STAGGERLOC_CENTER, &
+          computationalLBound=lbnd, computationalUBound=ubnd, &
+          farrayPtr=coordY, rc=rc)
+
+ +

+

+   !-------------------------------------------------------------------
+   ! Calculate and set coordinates in the second dimension [10-200]
+   !-------------------------------------------------------------------
+   do j=lbnd(1),ubnd(1)
+        coordY(j) = j*1.0
+   enddo
+
+ +

+The remaining examples in this section will use the irregular + distribution because of its greater generality. To create code similar to these, but + using a regular distribution, replace the countsPerDEDim arguments + in the Grid create with the appropriate maxIndex and regDecomp arguments. + +

+ +

+ +
+31.3.4 Create a 2D irregularly distributed rectilinear Grid + with uniformly spaced coordinates +

+ +

+This example serves as an illustration of the difference between using + a regular and irregular distribution. It repeats the previous example + except using an irregular distribution to give the user more control + over how the cells are divided between the DEs. As before, this code + creates a 10x20 2D Grid with uniformly spaced coordinates varying from (10,10) to (100,200). + In this example, the Grid is partitioned using an irregular distribution. The first dimension + is divided into two pieces, the first with 3 Grid cells per + DE and the second with 7 Grid cells per DE. In the second dimension, + the Grid is divided into 3 pieces, with 11, 2, and 7 cells per DE respectively. + This example assumes that the code is being run with a 1-1 mapping between + PETs and DEs because we are only accessing the first DE on each PET (localDE=0). + Because we have 6 DEs (2x3), this example would only work when run on 6 PETs. + The Grid is created with global indices. After Grid creation the + local bounds and native Fortran arrays are retrieved and the + coordinates are set by the user. + +

+

+   !-------------------------------------------------------------------
+   ! Create the Grid:  Allocate space for the Grid object, define the
+   ! topology and distribution of the Grid, and specify that it
+   ! will have global coordinates.  Note that aperiodic bounds are
+   ! indicated by the method name. In this call the minIndex hasn't
+   ! been set, so it defaults to (1,1,...).
+   !-------------------------------------------------------------------
+   grid2D=ESMF_GridCreateNoPeriDim(          &
+            ! Define an irregular distribution
+            countsPerDEDim1=(/3,7/),    &
+            countsPerDEDim2=(/11,2,7/), &
+            ! Specify mapping of coords dim to Grid dim
+            coordDep1=(/1/), & ! 1st coord is 1D and depends on 1st Grid dim
+            coordDep2=(/2/), & ! 2nd coord is 1D and depends on 2nd Grid dim
+            indexflag=ESMF_INDEX_GLOBAL, &
+            rc=rc)
+
+ +

+

+   !-------------------------------------------------------------------
+   ! Allocate coordinate storage and associate it with the center
+   ! stagger location.  Since no coordinate values are specified in
+   ! this call no coordinate values are set yet.
+   !-------------------------------------------------------------------
+   call ESMF_GridAddCoord(grid2D,  &
+          staggerloc=ESMF_STAGGERLOC_CENTER, rc=rc)
+
+ +

+

+   !-------------------------------------------------------------------
+   ! Get the pointer to the first coordinate array and the bounds
+   ! of its global indices on the local DE.
+   !-------------------------------------------------------------------
+   call ESMF_GridGetCoord(grid2D, coordDim=1, localDE=0, &
+          staggerloc=ESMF_STAGGERLOC_CENTER, &
+          computationalLBound=lbnd, computationalUBound=ubnd, &
+          farrayPtr=coordX, rc=rc)
+
+ +

+

+   !-------------------------------------------------------------------
+   ! Calculate and set coordinates in the first dimension [10-100].
+   !-------------------------------------------------------------------
+   do i=lbnd(1),ubnd(1)
+        coordX(i) = i*10.0
+   enddo
+
+   !-------------------------------------------------------------------
+   ! Get the pointer to the second coordinate array and the bounds of
+   ! its global indices on the local DE.
+   !-------------------------------------------------------------------
+   call ESMF_GridGetCoord(grid2D, coordDim=2, localDE=0, &
+          staggerloc=ESMF_STAGGERLOC_CENTER, &
+          computationalLBound=lbnd, computationalUBound=ubnd, &
+          farrayPtr=coordY, rc=rc)
+
+ +

+

+   !-------------------------------------------------------------------
+   ! Calculate and set coordinates in the second dimension [10-200]
+   !-------------------------------------------------------------------
+   do j=lbnd(1),ubnd(1)
+        coordY(j) = j*10.0
+   enddo
+
+ +

+ +

+ +
+31.3.5 Create a 2D irregularly distributed Grid + with curvilinear coordinates +

+ +

+The following is an example of creating a simple curvilinear Grid and + loading in a set of coordinates. It creates a 10x20 + 2D Grid where the coordinates vary along every dimension. + The Grid is partitioned using an irregular distribution. The first dimension + is divided into two pieces, the first with 3 Grid cells per + DE and the second with 7 Grid cells per DE. In the second dimension, + the Grid is divided into 3 pieces, with 11, 2, and 7 cells per DE respectively. + This example assumes that the code is being run with a 1-1 mapping between + PETs and DEs because we are only accessing the first DE on each PET (localDE=0). + Because we have 6 DEs (2x3), this example would only work when run on 6 PETs. + The Grid is created with global indices. After Grid creation the + local bounds and native Fortran arrays are retrieved and the + coordinates are set by the user. + +

+

+   !-------------------------------------------------------------------
+   ! Create the Grid:  Allocate space for the Grid object, define the
+   ! distribution of the Grid, and specify that it
+   ! will have global indices.  Note that aperiodic bounds are
+   ! indicated by the method name. If periodic bounds were desired they
+   ! could be specified by using the ESMF_GridCreate1PeriDim() call.
+   ! In this call the minIndex hasn't been set, so it defaults to (1,1,...).
+   !-------------------------------------------------------------------
+   grid2D=ESMF_GridCreateNoPeriDim(      &
+        ! Define an irregular distribution
+        countsPerDEDim1=(/3,7/),     &
+        countsPerDEDim2=(/11,2,7/),   &
+        ! Specify mapping of coords dim to Grid dim
+        coordDep1=(/1,2/), & ! 1st coord is 2D and depends on both Grid dim
+        coordDep2=(/1,2/), & ! 2nd coord is 2D and depends on both Grid dim
+        indexflag=ESMF_INDEX_GLOBAL, &
+        rc=rc)
+
+ +

+

+   !-------------------------------------------------------------------
+   ! Allocate coordinate storage and associate it with the center
+   ! stagger location.  Since no coordinate values are specified in
+   ! this call no coordinate values are set yet.
+   !-------------------------------------------------------------------
+   call ESMF_GridAddCoord(grid2D,  &
+          staggerloc=ESMF_STAGGERLOC_CENTER, rc=rc)
+
+ +

+

+   !-------------------------------------------------------------------
+   ! Get the pointer to the first coordinate array and the bounds
+   ! of its global indices on the local DE.
+   !-------------------------------------------------------------------
+   call ESMF_GridGetCoord(grid2D, coordDim=1, localDE=0, &
+          staggerloc=ESMF_STAGGERLOC_CENTER, &
+          computationalLBound=lbnd, computationalUBound=ubnd, &
+          farrayPtr=coordX2D, rc=rc)
+
+ +

+

+   !-------------------------------------------------------------------
+   ! Calculate and set coordinates in the first dimension [10-100].
+   !-------------------------------------------------------------------
+   do j=lbnd(2),ubnd(2)
+   do i=lbnd(1),ubnd(1)
+        coordX2D(i,j) = i+j
+   enddo
+   enddo
+
+   !-------------------------------------------------------------------
+   ! Get the pointer to the second coordinate array and the bounds of
+   ! its global indices on the local DE.
+   !-------------------------------------------------------------------
+   call ESMF_GridGetCoord(grid2D, coordDim=2, localDE=0, &
+          staggerloc=ESMF_STAGGERLOC_CENTER, &
+          computationalLBound=lbnd, computationalUBound=ubnd, &
+          farrayPtr=coordY2D, rc=rc)
+
+ +

+

+   !-------------------------------------------------------------------
+   ! Calculate and set coordinates in the second dimension [10-200]
+   !-------------------------------------------------------------------
+   do j=lbnd(2),ubnd(2)
+   do i=lbnd(1),ubnd(1)
+        coordY2D(i,j) = j-i/100.0
+   enddo
+   enddo
+
+ +

+ +

+ +
+31.3.6 Create an irregularly distributed rectilinear Grid with + a non-distributed vertical dimension +

+ +

+This example demonstrates how a user can build a rectilinear + horizontal Grid with a non-distributed vertical dimension. The Grid + contains both the center and corner stagger locations (i.e. Arakawa + B-Grid). In contrast to the previous examples, this example doesn't + assume that the code is being run with a 1-1 mapping between + PETs and DEs. It should work when run on any number of PETs. + +

+

+   !-------------------------------------------------------------------
+   ! Create the Grid:  Allocate space for the Grid object.  The
+   ! Grid is defined to be 180 Grid cells in the first dimension
+   ! (e.g. longitude), 90 Grid cells in the second dimension
+   ! (e.g. latitude), and 40 Grid cells in the third dimension
+   ! (e.g. height).  The first dimension is decomposed over 4 DEs,
+   ! the second over 3 DEs, and the third is not distributed.
+   ! The connectivities in each dimension are set to aperiodic
+   ! by this method. In this call the minIndex hasn't been set,
+   ! so it defaults to (1,1,...).
+   !-------------------------------------------------------------------
+   grid3D=ESMF_GridCreateNoPeriDim( &
+            ! Define an irregular distribution
+            countsPerDEDim1=(/45,75,40,20/), &
+            countsPerDEDim2=(/30,40,20/),    &
+            countsPerDEDim3=(/40/),          &
+            ! Specify mapping of coords dim to Grid dim
+            coordDep1=(/1/), & ! 1st coord is 1D and depends on 1st Grid dim
+            coordDep2=(/2/), & ! 2nd coord is 1D and depends on 2nd Grid dim
+            coordDep3=(/3/), & ! 3rd coord is 1D and depends on 3rd Grid dim
+            indexflag=ESMF_INDEX_GLOBAL,     & ! Use global indices
+            rc=rc)
+
+ +

+

+        
+
+   !-------------------------------------------------------------------
+   ! Allocate coordinate storage for both center and corner stagger
+   ! locations.  Since no coordinate values are specified in this
+   ! call no coordinate values are set yet.
+   !-------------------------------------------------------------------
+   call ESMF_GridAddCoord(grid3D, &
+          staggerloc=ESMF_STAGGERLOC_CENTER_VCENTER, rc=rc)
+
+ +

+

+   call ESMF_GridAddCoord(grid3D, &
+          staggerloc=ESMF_STAGGERLOC_CORNER_VCENTER, rc=rc)
+
+ +

+

+   !-------------------------------------------------------------------
+   ! Get the number of DEs on this PET, so that the program
+   ! can loop over them when accessing data.
+   !-------------------------------------------------------------------
+   call ESMF_GridGet(grid3D, localDECount=localDECount, rc=rc)
+
+ +

+

+   !-------------------------------------------------------------------
+   ! Loop over each localDE when accessing data
+   !-------------------------------------------------------------------
+   do lDE=0,localDECount-1
+
+    !------------------------------------------------------------------
+    ! Fill in the coordinates for the corner stagger location first.
+    !------------------------------------------------------------------
+      !----------------------------------------------------------------
+      ! Get the local bounds of the global indexing for the first
+      ! coordinate array on the local DE. If the number of PETs
+      ! is less than the total number of DEs then the rest of this
+      ! example would be in a loop over the local DEs.  Also get the
+      ! pointer to the first coordinate array.
+      !----------------------------------------------------------------
+      call ESMF_GridGetCoord(grid3D, coordDim=1, localDE=lDE, &
+             staggerLoc=ESMF_STAGGERLOC_CORNER_VCENTER,       &
+             computationalLBound=lbnd_corner,                 &
+             computationalUBound=ubnd_corner,                 &
+             farrayPtr=cornerX, rc=rc)
+
+ +

+

+      !----------------------------------------------------------------
+      ! Calculate and set coordinates in the first dimension.
+      !----------------------------------------------------------------
+      do i=lbnd_corner(1),ubnd_corner(1)
+         cornerX(i) = (i-1)*(360.0/180.0)
+      enddo
+
+      !----------------------------------------------------------------
+      ! Get the local bounds of the global indexing for the second
+      ! coordinate array on the local DE.  Also get the pointer to the
+      ! second coordinate array.
+      !----------------------------------------------------------------
+      call ESMF_GridGetCoord(grid3D, coordDim=2, localDE=lDE,   &
+             staggerLoc=ESMF_STAGGERLOC_CORNER_VCENTER,         &
+             computationalLBound=lbnd_corner,                   &
+             computationalUBound=ubnd_corner,                   &
+             farrayPtr=cornerY, rc=rc)
+
+ +

+

+      !----------------------------------------------------------------
+      ! Calculate and set coordinates in the second dimension.
+      !----------------------------------------------------------------
+      do j=lbnd_corner(1),ubnd_corner(1)
+         cornerY(j) = (j-1)*(180.0/90.0)
+      enddo
+
+      !----------------------------------------------------------------
+      ! Get the local bounds of the global indexing for the third
+      ! coordinate array on the local DE, and the pointer to the array.
+      !----------------------------------------------------------------
+      call ESMF_GridGetCoord(grid3D, coordDim=3, localDE=lDE,   &
+             staggerloc=ESMF_STAGGERLOC_CENTER_VCENTER,         &
+             computationalLBound=lbnd, computationalUBound=ubnd,&
+             farrayPtr=cornerZ, rc=rc)
+
+ +

+

+      !----------------------------------------------------------------
+      ! Calculate and set the vertical coordinates
+      !----------------------------------------------------------------
+      do k=lbnd(1),ubnd(1)
+         cornerZ(k) = 4000.0*( (1./39.)*(k-1)  )**2
+      enddo
+
+    !------------------------------------------------------------------
+    ! Now fill the coordinates for the center stagger location with
+    ! the average of the corner coordinate location values.
+    !------------------------------------------------------------------
+      !----------------------------------------------------------------
+      ! Get the local bounds of the global indexing for the first
+      ! coordinate array on the local DE, and the pointer to the array.
+      !----------------------------------------------------------------
+      call ESMF_GridGetCoord(grid3D, coordDim=1, localDE=lDE,    &
+             staggerloc=ESMF_STAGGERLOC_CENTER_VCENTER,          &
+             computationalLBound=lbnd, computationalUBound=ubnd, &
+             farrayPtr=centerX, rc=rc)
+
+ +

+

+      !----------------------------------------------------------------
+      ! Calculate and set coordinates in the first dimension.
+      !----------------------------------------------------------------
+      do i=lbnd(1),ubnd(1)
+         centerX(i) = 0.5*(i-1 + i)*(360.0/180.0)
+      enddo
+
+      !----------------------------------------------------------------
+      ! Get the local bounds of the global indexing for the second
+      ! coordinate array on the local DE, and the pointer to the array.
+      !----------------------------------------------------------------
+       call ESMF_GridGetCoord(grid3D, coordDim=2, localDE=lDE,    &
+              staggerloc=ESMF_STAGGERLOC_CENTER_VCENTER,          &
+              computationalLBound=lbnd, computationalUBound=ubnd, &
+              farrayPtr=centerY, rc=rc)
+
+ +

+

+      !----------------------------------------------------------------
+      ! Calculate and set coordinates in the second dimension.
+      !----------------------------------------------------------------
+      do j=lbnd(1),ubnd(1)
+         centerY(j) = 0.5*(j-1 + j)*(180.0/90.0)
+      enddo
+
+      !----------------------------------------------------------------
+      ! Get the local bounds of the global indexing for the third
+      ! coordinate array on the local DE, and the pointer to the array.
+      !----------------------------------------------------------------
+      call ESMF_GridGetCoord(grid3D, coordDim=3, localDE=lDE,   &
+             staggerloc=ESMF_STAGGERLOC_CENTER_VCENTER,         &
+             computationalLBound=lbnd, computationalUBound=ubnd,&
+             farrayPtr=centerZ, rc=rc)
+
+ +

+

+      !----------------------------------------------------------------
+      ! Calculate and set the vertical coordinates
+      !----------------------------------------------------------------
+      do k=lbnd(1),ubnd(1)
+         centerZ(k) = 4000.0*( (1./39.)*(k-1)  )**2
+      enddo
+
+   !-------------------------------------------------------------------
+   ! End of loop over DEs
+   !-------------------------------------------------------------------
+   enddo
+
+ +

+ +

+ +
+31.3.7 Create an arbitrarily distributed rectilinear Grid with + a non-distributed vertical dimension +

+ +

+There are more restrictions in defining an arbitrarily distributed grid. + First, there is always one DE per PET. Secondly, only local index (ESMF_INDEX_LOCAL) + is supported. Third, only one stagger location, i.e. ESMF_STAGGERLOC_CENTER is allowed + and last there is no extra paddings on the edge of the grid. + +

+This example demonstrates how a user can build a 3D grid with its rectilinear + horizontal Grid distributed arbitrarily and a non-distributed vertical dimension. + +

+

+   !-------------------------------------------------------------------
+   ! Set up the local index array:  Assuming the grid is 360x180x10.  First
+   ! calculate the localArbIndexCount and localArbIndex array for each PET
+   ! based on the total number of PETs. The cells are evenly distributed in
+   ! all the PETs. If the total number of cells are not divisible by the
+   ! total PETs, the remaining cells are assigned to the last PET.  The
+   ! cells are card dealt to each PET in y dimension first,
+   ! i.e. (1,1) -> PET 0, (1,2)->  PET 1, (1,3)-> PET 2, and so forth.
+   !-------------------------------------------------------------------
+   xdim = 360
+   ydim = 180
+   zdim = 10
+   localArbIndexCount = (xdim*ydim)/petCount
+   remain = (xdim*ydim)-localArbIndexCount*petCount
+   if (localPet == petCount-1) localArbIndexCount = localArbIndexCount+remain
+
+   allocate(localArbIndex(localArbIndexCount,2))
+   ind = localPet
+   do i=1, localArbIndexCount
+      localArbIndex(i,1)=mod(ind,ydim)+1
+      localArbIndex(i,2)=ind/ydim + 1
+      ind = ind + petCount
+   enddo
+   if (localPet == petCount-1) then
+      ind = xdim*ydim-remain+1
+      do i=localArbIndexCount-remain+1,localArbIndexCount
+         localArbIndex(i,1)=mod(ind,ydim)+1
+         localArbIndex(i,2)=ind/ydim+1
+         ind = ind + 1
+      enddo
+   endif
+
+   !-------------------------------------------------------------------
+   ! Create the Grid:  Allocate space for the Grid object.
+   ! the minIndex hasn't been set, so it defaults to (1,1,...). The
+   ! default coordDep1 and coordDep2 are (/ESMF_DIM_ARB/) where
+   ! ESMF_DIM_ARB represents the collapsed dimension for the
+   ! arbitrarily distributed grid dimensions.  For the undistributed
+   ! grid dimension, the default value for coordDep3 is (/3/).  The
+   ! default values for coordDepX in the arbitrary distribution are
+   ! different from the non-arbitrary distributions.
+   !-------------------------------------------------------------------
+   grid3D=ESMF_GridCreateNoPeriDim( &
+            maxIndex = (/xdim, ydim, zdim/), &
+            arbIndexList = localArbIndex, &
+            arbIndexCount = localArbIndexCount, &
+            rc=rc)
+
+ +

+

+   !-------------------------------------------------------------------
+   ! Allocate coordinate storage for the center stagger location, the
+   ! only stagger location supported for the arbitrary distribution.
+   !-------------------------------------------------------------------
+   call ESMF_GridAddCoord(grid3D, &
+          staggerloc=ESMF_STAGGERLOC_CENTER_VCENTER, rc=rc)
+
+ +

+

+   !------------------------------------------------------------------
+   ! Fill in the coordinates for the center stagger location. There is
+   ! always one DE per PET, so localDE is always 0
+   !------------------------------------------------------------------
+   call ESMF_GridGetCoord(grid3D, coordDim=1, localDE=0, &
+          staggerLoc=ESMF_STAGGERLOC_CENTER,       &
+          computationalLBound=lbnd,                 &
+          computationalUBound=ubnd,                 &
+          farrayPtr=centerX, rc=rc)
+
+ +

+

+   !----------------------------------------------------------------
+   ! Calculate and set coordinates in the first dimension.
+   !----------------------------------------------------------------
+   do i=lbnd(1),ubnd(1)
+      centerX(i) = (localArbIndex(i,1)-0.5)*(360.0/xdim)
+   enddo
+
+
+   !----------------------------------------------------------------
+   ! Get the local bounds of the global indexing for the second
+   ! coordinate array on the local DE, and the pointer to the array.
+   !----------------------------------------------------------------
+   call ESMF_GridGetCoord(grid3D, coordDim=2, localDE=0,    &
+          staggerloc=ESMF_STAGGERLOC_CENTER,                  &
+          computationalLBound=lbnd, computationalUBound=ubnd, &
+          farrayPtr=centerY, rc=rc)
+
+ +

+

+   !----------------------------------------------------------------
+   ! Calculate and set coordinates in the second dimension.
+   !----------------------------------------------------------------
+   do j=lbnd(1),ubnd(1)
+      centerY(j) = (localArbIndex(j,2)-0.5)*(180.0/ydim)-90.0
+   enddo
+
+   !----------------------------------------------------------------
+   ! Get the local bounds of the global indexing for the third
+   ! coordinate array on the local DE, and the pointer to the array.
+   !----------------------------------------------------------------
+   call ESMF_GridGetCoord(grid3D, coordDim=3, localDE=0,   &
+          staggerloc=ESMF_STAGGERLOC_CENTER,               &
+          computationalLBound=lbnd, computationalUBound=ubnd,&
+          farrayPtr=centerZ, rc=rc)
+
+ +

+

+   !----------------------------------------------------------------
+   ! Calculate and set the vertical coordinates
+   !----------------------------------------------------------------
+   do k=lbnd(1),ubnd(1)
+      centerZ(k) = 4000.0*( (1./zdim)*(k-1))**2
+   enddo
+
+ +

+ +

+
+31.3.8 Create a curvilinear Grid using the coordinates defined + in a SCRIP file +

+ +

+ESMF supports the creation of a 2D curvilinear Grid using the coordinates + defined in a SCRIP format Grid file [13]. The grid contained in the + file must be a 2D logically rectangular grid with grid_rank in the file set + to 2. The center coordinates variables grid_center_lat and grid_center_lon in the file + are placed in the ESMF_STAGGERLOC_CENTER location. If the parameter addCornerStagger + in the ESMF_GridCreate call is set to .true., then + the variables grid_corner_lat and grid_corner_lon in the file + are used to set the ESMF_STAGGERLOC_CORNER coordinates, otherwise they are ignored. + The values in the grid_imask variable in the file are used to set the ESMF_GRIDITEM_MASK in the Grid. + +

+The following example code shows you how to create a 2D Grid with both center and corner coordinates + using a SCRIP file and a row only regular distribution: +

+

+   grid2D = ESMF_GridCreate(filename="data/T42_grid.nc",  &
+              fileFormat=ESMF_FILEFORMAT_SCRIP,  &
+              regDecomp=(/PetCount,1/), addCornerStagger=.true., rc=rc)
+
+ +

+where T42_grid.nc is a 2D global grid of size (128x64) and the resulting Grid is distributed + by partitioning the rows evenly over all the PETs. + +

+ESMF also support the creation of a 2D Grid from the SCRIP format Grid file using a user specified + ESMF_DistGrid. The following example code demonstrates the creation of an Grid object using a pre-defined + DistGrid. The resulting Grid is the same as the one created above: +

+

+   distgrid = ESMF_DistGridCreate((/1,1/), (/128,64/), &
+              regDecomp=(/PetCount,1/), rc=rc)
+   grid2D = ESMF_GridCreate(filename="data/T42_grid.nc",  &
+              fileFormat=ESMF_FILEFORMAT_SCRIP,  &
+              distGrid=distgrid, addCornerStagger=.true., rc=rc)
+
+ +

+ +

+
+31.3.9 Create an empty Grid in a parent Component + for completion in a child Component +

+ +

+ESMF Grids can be created incrementally. To do this, + the user first calls ESMF_GridEmptyCreate() to allocate the shell of + a Grid. Next, we use the ESMF_GridEmptyComplete() + call that fills in the Grid and does an internal commit to make it usable. + For consistency's sake the ESMF_GridSetCommitShapeTile() + call must occur on the same or a subset of the PETs as the + ESMF_GridEmptyCreate() call. The + ESMF_GridEmptyComplete() call uses the VM for + the context in which it's executed and the "empty" Grid contains + no information about the VM in which its create was run. This + means that if the ESMF_GridEmptyComplete() call occurs + in a subset of the PETs in which the ESMF_GridEmptyCreate() was + executed that the Grid is created only in that subset. Inside the subset + the Grid will be fine, but outside the subset the Grid objects will + still be "empty" and not usable. The following example uses the + incremental technique to create a rectangular 10x20 Grid with coordinates at + the center and corner stagger locations. + +

+

+!---------------------------------------------------------------------------
+! IN THE PARENT COMPONENT:
+! Create an empty Grid in the parent component for use in a child component.
+! The parent may be defined on more PETs than the child component.
+! The child's [vm or pet list] is passed into the create call so that
+! the Grid is defined on the appropriate subset of the parent's PETs.
+!---------------------------------------------------------------------------
+   grid2D=ESMF_GridEmptyCreate(rc=rc)
+
+ +

+

+!---------------------------------------------------------------------------
+! IN THE CHILD COMPONENT:
+! Set the Grid topology.  Here we define an irregularly distributed
+! rectangular Grid.
+!---------------------------------------------------------------------------
+   call ESMF_GridEmptyComplete(grid2D,             &
+                          countsPerDEDim1=(/6,4/),      &
+                          countsPerDEDim2=(/10,3,7/), rc=rc)
+
+ +

+

+!---------------------------------------------------------------------------
+! Add Grid coordinates at the cell center location.
+!---------------------------------------------------------------------------
+   call ESMF_GridAddCoord(grid2D, staggerLoc=ESMF_STAGGERLOC_CENTER, rc=rc)
+
+ +

+

+!---------------------------------------------------------------------------
+! Add Grid coordinates at the corner stagger location.
+!---------------------------------------------------------------------------
+   call ESMF_GridAddCoord(grid2D, staggerLoc=ESMF_STAGGERLOC_CORNER, rc=rc)
+
+ +

+ +

+ +
+31.3.10 Create a six-tile cubed sphere Grid +

+ +

+This example creates a multi-tile Grid to represent a cubed sphere grid. + Each of the six tiles making up the cubed sphere has 45 elements on + each side, so the total number of elements is 45x45x6=12150. Each tile is + decomposed using a regular decomposition. The first two tiles are decomposed into + 2x2 blocks each and the remaining 4 tiles are decomposed into 1x2 block. + A total of 16 DEs are used. + +

+In this example, both the center and corner coordinates will be added to the grid. +

+

+     ! Set up decomposition for each tile
+     allocate(decomptile(2,6))
+     decomptile(:,1)=(/2,2/) ! Tile 1
+     decomptile(:,2)=(/2,2/) ! Tile 2
+     decomptile(:,3)=(/1,2/) ! Tile 3
+     decomptile(:,4)=(/1,2/) ! Tile 4
+     decomptile(:,5)=(/1,2/) ! Tile 5
+     decomptile(:,6)=(/1,2/) ! Tile 6
+
+     ! Create cubed sphere grid
+     grid2D = ESMF_GridCreateCubedSphere(tileSize=45, regDecompPTile=decomptile, &
+                 staggerLocList=(/ESMF_STAGGERLOC_CENTER, ESMF_STAGGERLOC_CORNER/), rc=rc)
+
+ +

+ +

+ +
+31.3.11 Create a six-tile cubed sphere Grid and apply Schmidt transform +

+ +

+This example creates the same cubed sphere grid with the same regular + decomposition as in 31.3.10 with a few differences. + First, the coordinates of the grid are of type ESMF_TYPEKIND_R4 + instead of the default ESMF_TYPEKIND_R8. Secondly, the coordinate + system is ESMF_COORDSYS_SPH_RAD instead of the default ESMF_COORDSYS_SPH_DEG. + Lastly, the grid was then + transformed using Schmidt Transformation algorithm on an arbitrary + target point and a streatching factor. An optional argument TransformArgs of + type ESMF_CubedSphereTransform_Args is used to pass the Schmidt + Transform arguments. ESMF_CubedSphereTransform_Args is defined as + follows: +

+     type ESMF_CubedSphereTransform_Args
+        real(ESMF_KIND_R8) :: stretch_factor, target_lat, target_lon
+     end type
+
+ +

+Note target_lat and target_lon are in radians. +

+

+     transformArgs%stretch_factor = 0.5;
+     transformArgs%target_lon = 0.0; ! in radians
+     transformArgs%target_lat = 1.3; ! in radians
+     grid2D = ESMF_GridCreateCubedSphere(tileSize=45, regDecompPTile=decomptile, &
+                 staggerLocList = (/ESMF_STAGGERLOC_CENTER, ESMF_STAGGERLOC_CORNER/), &
+                 coordTypeKind = ESMF_TYPEKIND_R4, &
+                 coordSys = ESMF_COORDSYS_SPH_RAD, &
+                 transformArgs=transformArgs, &
+                 rc=rc)
+
+ +

+ +

+ +
+31.3.12 Create a six-tile cubed sphere Grid from a GRIDSPEC Mosaic file +

+ +

+This example creates a six-tile Grid to represent a cubed sphere grid defined + in a GRIDSPEC Mosaic file C48_mosaic.nc. The GRIDSPEC mosaic file format is defined in + the document GRIDSPEC: A standard for the description of grids used in Earth System models +by V. Balaji, Alistair Adcroft and Zhi Liang. + +

+The mosaic file contains the following information: + +

+

+  netcdf C48_mosaic {
+  dimensions:
+         ntiles = 6 ;
+         ncontact = 12 ;
+         string = 255 ;
+  variables:
+         char mosaic(string) ;
+                 mosaic:standard_name = "grid_mosaic_spec" ;
+                 mosaic:children = "gridtiles" ;
+                 mosaic:contact_regions = "contacts" ;
+                 mosaic:grid_descriptor = "" ;
+         char gridlocation(string) ;
+                 gridlocation:standard_name = "grid_file_location" ;
+         char gridfiles(ntiles, string) ;
+         char gridtiles(ntiles, string) ;
+         char contacts(ncontact, string) ;
+                 contacts:standard_name = "grid_contact_spec" ;
+                 contacts:contact_type = "boundary" ;
+                 contacts:alignment = "true" ;
+                 contacts:contact_index = "contact_index" ;
+                 contacts:orientation = "orient" ;
+         char contact_index(ncontact, string) ;
+                 contact_index:standard_name = "starting_ending_point_index_of_contact" ;
+ 
+  // global attributes:
+                 :grid_version = "0.2" ;
+                 :code_version = "$Name: testing $" ;
+  data:
+  
+  mosaic = "C48_mosaic" ;
+  
+  gridlocation = "/archive/z1l/tools/test_20091028/output_all/" ;
+  
+  gridfiles =
+    "horizontal_grid.tile1.nc",
+    "horizontal_grid.tile2.nc",
+    "horizontal_grid.tile3.nc",
+    "horizontal_grid.tile4.nc",
+    "horizontal_grid.tile5.nc",
+    "horizontal_grid.tile6.nc" ;
+  
+  gridtiles =
+    "tile1",
+    "tile2",
+    "tile3",
+    "tile4",
+    "tile5",
+    "tile6" ;
+  
+  contacts =
+    "C48_mosaic:tile1::C48_mosaic:tile2",
+    "C48_mosaic:tile1::C48_mosaic:tile3",
+    "C48_mosaic:tile1::C48_mosaic:tile5",
+    "C48_mosaic:tile1::C48_mosaic:tile6",
+    "C48_mosaic:tile2::C48_mosaic:tile3",
+    "C48_mosaic:tile2::C48_mosaic:tile4",
+    "C48_mosaic:tile2::C48_mosaic:tile6",
+    "C48_mosaic:tile3::C48_mosaic:tile4",
+    "C48_mosaic:tile3::C48_mosaic:tile5",
+    "C48_mosaic:tile4::C48_mosaic:tile5",
+    "C48_mosaic:tile4::C48_mosaic:tile6",
+    "C48_mosaic:tile5::C48_mosaic:tile6" ;
+  
+   contact_index =
+    "96:96,1:96::1:1,1:96",
+    "1:96,96:96::1:1,96:1",
+    "1:1,1:96::96:1,96:96",
+    "1:96,1:1::1:96,96:96",
+    "1:96,96:96::1:96,1:1",
+    "96:96,1:96::96:1,1:1",
+    "1:96,1:1::96:96,96:1",
+    "96:96,1:96::1:1,1:96",
+    "1:96,96:96::1:1,96:1",
+    "1:96,96:96::1:96,1:1",
+    "96:96,1:96::96:1,1:1",
+    "96:96,1:96::1:1,1:96" ;
+  }
+
+ +

+A dummy variable with its standard_name attribute set to grid_mosaic_spec is required. + The children attribute of this dummy variable provides the variable name that contains the tile names and the + contact_region attribute points to the variable name that defines a list of tile pairs that are connected + to each other. For a Cubed Sphere grid, there are six tiles and 12 connections. The contacts variable + has three required attributes: standard_name, contact_type, and contact_index. startand_name + has to be set to grid_contact_spec. contact_type has to be boundary. ESMF does not support + overlapping contact regions. contact_index defines the variable name that contains the information how the + two adjacent tiles are connected to each other. The contact_index variable contains 12 entries. Each entry + contains the index of four points that defines the two edges that contact to + each other from the two neighboring tiles. Assuming the four points are A, B, C, and D. + A and B defines the edge of tile 1 and C and D defines the edge of tile2. A is the same point + as C and B is the same as D. (Ai, Aj) is the index for point A. The entry looks like this: +

+    Ai:Bi,Aj:Bj::Ci:Di,Cj:Dj
+
+ +

+The associated tile file names are defined in variable gridfiles and the directory path is defined in + variable gridlocation. + The gridlocation can be overwritten with an optional arguemnt TileFilePath. Each tile is + decomposed using a regular decomposition. The first two tiles are decomposed into + 2x2 blocks each and the remaining 4 tiles are decomposed into 1x2 block. + A total of 16 DEs are used. + +

+ESMF_GridCreateMosaic() first reads in the mosaic file and defines the tile connections in the + ESMF_DistGrid using the information + defined in variables contacts and contact_index. Then it reads in the coordinates defined in + the tile files if the optional argument staggerLocList is provided. The coordinates defined in the tile file are a + supergrid. A supergrid contains all the stagger locations in one grid. + It contains the corner, edge and center coordinates all in one 2D array. + In this example, there are 48 elements in each side of a tile, therefore, the size of the supergrid is + 48*2+1=97, i.e. 97x97. + +

+Here is the header of one of the tile files: + +

+

+  netcdf horizontal_grid.tile1 {
+  dimensions:
+         string = 255 ;
+         nx = 96 ;
+         ny = 96 ;
+         nxp = 97 ;
+         nyp = 97 ;
+  variables:
+         char tile(string) ;
+                 tile:standard_name = "grid_tile_spec" ;
+                 tile:geometry = "spherical" ;
+                 tile:north_pole = "0.0 90.0" ;
+                 tile:projection = "cube_gnomonic" ;
+                 tile:discretization = "logically_rectangular" ;
+                 tile:conformal = "FALSE" ;
+         double x(nyp, nxp) ;
+                 x:standard_name = "geographic_longitude" ;
+                 x:units = "degree_east" ;
+         double y(nyp, nxp) ;
+                 y:standard_name = "geographic_latitude" ;
+                 y:units = "degree_north" ;
+         double dx(nyp, nx) ;
+                 dx:standard_name = "grid_edge_x_distance" ;
+                 dx:units = "meters" ;
+         double dy(ny, nxp) ;
+                 dy:standard_name = "grid_edge_y_distance" ;
+                 dy:units = "meters" ;
+         double area(ny, nx) ;
+                 area:standard_name = "grid_cell_area" ;
+                 area:units = "m2" ;
+         double angle_dx(nyp, nxp) ;
+                 angle_dx:standard_name = "grid_vertex_x_angle_WRT_geographic_east" ;
+                 angle_dx:units = "degrees_east" ;
+         double angle_dy(nyp, nxp) ;
+                 angle_dy:standard_name = "grid_vertex_y_angle_WRT_geographic_north" ;
+                 angle_dy:units = "degrees_north" ;
+         char arcx(string) ;
+                 arcx:standard_name = "grid_edge_x_arc_type" ;
+                 arcx:north_pole = "0.0 90.0" ;
+  
+  // global attributes:
+                 :grid_version = "0.2" ;
+                 :code_version = "$Name: testing $" ;
+                 :history = "/home/z1l/bin/tools_20091028/make_hgrid --grid_type gnomonic_ed --nlon 96" ;
+  }
+
+ +

+The tile file not only defines the coordinates at all staggers, it also has a complete specification of + distances, angles, and areas. In ESMF, we currently only use the geographic_longitude and geographic_latitude + variables. +

+

+     ! Set up decomposition for each tile
+     allocate(decomptile(2,6))
+     decomptile(:,1)=(/2,2/) ! Tile 1
+     decomptile(:,2)=(/2,2/) ! Tile 2
+     decomptile(:,3)=(/1,2/) ! Tile 3
+     decomptile(:,4)=(/1,2/) ! Tile 4
+     decomptile(:,5)=(/1,2/) ! Tile 5
+     decomptile(:,6)=(/1,2/) ! Tile 6
+
+     ! Create cubed sphere grid without reading in the coordinates
+     grid2D = ESMF_GridCreateMosaic(filename='data/C48_mosaic.nc', &
+                tileFilePath='./data/', regDecompPTile=decomptile, rc=rc)
+
+ +

+

+     ! Create cubed sphere grid and read in the center and corner stagger coordinates
+     ! from the tile files
+
+     grid2D = ESMF_GridCreateMosaic(filename='data/C48_mosaic.nc', &
+                staggerLocList=(/ESMF_STAGGERLOC_CENTER, ESMF_STAGGERLOC_CORNER/), &
+                tileFilePath='./data/', regDecompPTile=decomptile, rc=rc)
+
+ +

+

+     ! Create cubed sphere grid and read in the edge staggers' coordinates
+     ! from the tile files, set the coordTypeKind to ESMF_TYPEKIND_R4
+
+     grid2D = ESMF_GridCreateMosaic(filename='data/C48_mosaic.nc', &
+                staggerLocList=(/ESMF_STAGGERLOC_EDGE1, ESMF_STAGGERLOC_EDGE2/), &
+                coordTypeKind = ESMF_TYPEKIND_R4, &
+                tileFilePath='./data/', regDecompPTile=decomptile, rc=rc)
+
+ +

+ +

+ +
+31.3.13 Grid stagger locations +

+ +

+A useful finite difference technique is to place different physical + quantities at different locations within a grid cell. This + staggering of the physical variables on the mesh is introduced so + that the difference of a field is naturally defined at the location of + another variable. This method was first formalized by Mesinger and Arakawa + (1976). + +

+To support the staggering of variables, the Grid provides + the idea of stagger locations. + Stagger locations refer to the places in a Grid cell that + can contain coordinates or other data and once a Grid is associated with a + Field object, field data. Typically Grid data can be located + at the cell center, at the cell corners, or at the cell faces, in 2D, 3D, and + higher dimensions. (Note that any Arakawa stagger can be constructed + of a set of Grid stagger locations.) There are predefined stagger locations + (see Section 31.2.6), or, + should the user wish to specify their own, there + is also a set of methods for generating custom locations + (See Section 31.3.25). + Users can put Grid data (e.g. coordinates) + at multiple stagger locations in a Grid. In addition, the user can create a Field + at any of the stagger locations in a Grid. + +

+By default the Grid data array at the center stagger location + starts at the bottom index of the Grid (default (1,1..,1)) and extends + up to the maximum cell index in the Grid (e.g. given by the maxIndex argument). + Other stagger locations also start at the bottom index of the Grid, however, + they can extend to +1 element beyond the center in some dimensions to allow + for the extra space to surround the center elements. See Section 31.3.25 + for a description of this extra space and how to adjust if it necessary. + There are ESMF_GridGet subroutines (e.g. ESMF_GridGetCoord() or ESMF_GridGetItem()) + which can be used to retrieve the stagger bounds for the piece of Grid data + on a particular DE. + +

+ +

+31.3.14 Associate coordinates with stagger locations +

+ +

+The primary type of data the Grid is responsible for storing is coordinates. + The coordinate values in a Grid can be employed by the user in calculations or + to describe the geometry of a Field. The Grid coordinate values are also used by + ESMF_FieldRegridStore() when calculating the interpolation + matrix between two Fields. The user can allocate coordinate arrays without setting coordinate values + using the ESMF_GridAddCoord() call. (See Section 31.3.16 for a discussion of + setting/getting coordinate values.) When adding or accessing + coordinate data, the stagger location is specified to tell the Grid method + where in the cell to get the data. The different stagger locations may also have slightly different + index ranges and sizes. Please see Section 31.3.13 for a discussion of + Grid stagger locations. + +

+The following example adds coordinate storage to the corner stagger location in a Grid using one + of the predefined stagger locations. +

+

+   call ESMF_GridAddCoord(grid2D, staggerLoc=ESMF_STAGGERLOC_CORNER, rc=rc)
+
+ +

+Note only the center stagger location ESMF_STAGGERLOC_CENTER is supported + in an arbitrarily distributed Grid. + +

+ +

+31.3.15 Specify the relationship of coordinate Arrays + to index space dimensions +

+ +

+To specify how the coordinate arrays are mapped to the + index dimensions the arguments coordDep1, + coordDep2, and coordDep3 are used, each + of which is a Fortran array. The values of the elements + in a coordDep array specify which index dimension + the corresponding coordinate dimension + maps to. For example, coordDep1=(/1,2/) means that + the first dimension of coordinate 1 maps to index + dimension 1 and the second maps to index dimension 2. + For a grid with non-arbitrary distribution, the default + values for coordDep1, coordDep2 and coordDep3 + are /1,2..,gridDimCount/. This default + thus specifies a curvilinear grid. + +

+The following call demonstrates the creation of a + 10x20 2D rectilinear grid where the first coordinate + component is mapped to the second index dimension + (i.e. is of size 20) and the second coordinate component + is mapped to the first index dimension (i.e. is of size + 10). +

+

+   grid2D=ESMF_GridCreateNoPeriDim(countsPerDEDim1=(/5,5/), &
+          countsPerDEDim2=(/7,7,6/),                    &
+          coordDep1=(/2/),                              &
+          coordDep2=(/1/), rc=rc)
+
+ +

+The following call demonstrates the creation of a + 10x20x30 2D plus 1 curvilinear grid where + coordinate component 1 and 2 are still 10x20, but + coordinate component 3 is mapped just to the + third index dimension. +

+

+   grid2D=ESMF_GridCreateNoPeriDim(countsPerDEDim1=(/6,4/), &
+          countsPerDEDim2=(/10,7,3/), countsPerDEDim3=(/30/), &
+          coordDep1=(/1,2/), coordDep2=(/1,2/), &
+          coordDep3=(/3/), rc=rc)
+
+ +

+By default the local piece of the array on each PET starts at + (1,1,..), however, the indexing for each grid coordinate array + on each DE may be shifted to the global indices by using the indexflag. + For example, the following call switches the grid to use global indices. +

+

+   grid2D=ESMF_GridCreateNoPeriDim(countsPerDEDim1=(/6,4/), &
+           countsPerDEDim2=(/10,7,3/), indexflag=ESMF_INDEX_GLOBAL, rc=rc)
+
+ +

+For an arbitrarily distributed grid, the default value of a coordinate + array dimension is ESMF_DIM_ARB if the index dimension is arbitrarily + distributed and is n where n is the index dimension itself when it is not + distributed. The following call is equivalent to the example in + Section 31.3.7 +

+

+   grid3D=ESMF_GridCreateNoPeriDim( &
+            maxIndex = (/xdim, ydim, zdim/), &
+            arbIndexList = localArbIndex, &
+            arbIndexCount = localArbIndexCount,          &
+            coordDep1 = (/ESMF_DIM_ARB/), &
+            coordDep2 = (/ESMF_DIM_ARB/), &
+            coordDep3 = (/3/), &
+            rc=rc)
+
+ +

+The following call uses non-default coordDep1, coordDep2, + and coordDep3 to create a 3D curvilinear grid with its horizontal + dimensions arbitrarily distributed. +

+

+   grid3D=ESMF_GridCreateNoPeriDim( &
+            maxIndex = (/xdim, ydim, zdim/), &
+            arbIndexList = localArbIndex, &
+            arbIndexCount = localArbIndexCount,          &
+            coordDep1 = (/ESMF_DIM_ARB, 3/), &
+            coordDep2 = (/ESMF_DIM_ARB, 3/), &
+            coordDep3 = (/ESMF_DIM_ARB, 3/), &
+            rc=rc)
+
+ +

+ +

+ +
+31.3.16 Access coordinates +

+ +

+Once a Grid has been created, the user has several options to access + the Grid coordinate data. The first of these, ESMF_GridSetCoord(), + enables the user to use ESMF Arrays to set data + for one stagger location across the whole Grid. + For example, the following sets the coordinates in the first dimension + (e.g. x) for the corner stagger location to + those in the ESMF Array arrayCoordX. +

+

+   call ESMF_GridSetCoord(grid2D, &
+          staggerLoc=ESMF_STAGGERLOC_CORNER, &
+          coordDim=1, array=arrayCoordX, rc=rc)
+
+ +

+The method ESMF_GridGetCoord() allows the user + to obtain a reference to an ESMF Array which + contains the coordinate data for a stagger location in a Grid. The user + can then employ any of the standard ESMF_Array tools to operate + on the data. The following copies the coordinates from the second + component of the corner and puts it into the ESMF Array arrayCoordY. +

+

+   call ESMF_GridGetCoord(grid2D,    &
+          staggerLoc=ESMF_STAGGERLOC_CORNER,    &
+          coordDim=2,                           &
+          array=arrayCoordY, rc=rc)
+
+ +

+Alternatively, the call ESMF_GridGetCoord() gets a Fortran pointer to + the coordinate data. The user can then operate on this array in the usual + manner. The following call gets a reference to the + Fortran array which holds the data for the second coordinate (e.g. y). +

+

+   call ESMF_GridGetCoord(grid2D, coordDim=2, localDE=0, &
+          staggerloc=ESMF_STAGGERLOC_CORNER, farrayPtr=coordY2D, rc=rc)
+
+ +

+ +

+ +
+31.3.17 Associate items with stagger locations +

+ +

+The ESMF Grids contain the ability to store other kinds of + data beyond coordinates. These kinds of data are referred to + as "items". Although the user is free to use this + data as they see fit, the user should be aware that + this data may also be used by other parts of ESMF (e.g. the + ESMF_GRIDITEM_MASK item is used in regridding). + Please see Section 31.2.2 for a list of valid + items. + +

+Like coordinates items are also created on stagger locations. + When adding or accessing item data, the stagger location is specified to tell the Grid method + where in the cell to get the data. The different stagger locations may also have slightly different + index ranges and sizes. Please see Section 31.3.13 for a discussion of + Grid stagger locations. The user can + allocate item arrays without setting item values using the ESMF_GridAddItem() call. + (See Section 31.3.18 for a discussion of setting/getting item values.) + +

+The following example adds mask item storage to the corner stagger location in a grid. +

+

+   call ESMF_GridAddItem(grid2D, staggerLoc=ESMF_STAGGERLOC_CORNER, &
+          itemflag=ESMF_GRIDITEM_MASK, rc=rc)
+
+ +

+ +

+ +
+31.3.18 Access items +

+ + Once an item has been added to a Grid, the user has several options to access + the data. The first of these, ESMF_GridSetItem(), + enables the user to use ESMF Arrays to set data for one stagger location across the whole Grid. + For example, the following sets the mask item in the corner stagger location to + those in the ESMF Array arrayMask. + +

+

+   call ESMF_GridSetItem(grid2D,             &
+          staggerLoc=ESMF_STAGGERLOC_CORNER, &
+          itemflag=ESMF_GRIDITEM_MASK, array=arrayMask, rc=rc)
+
+ +

+The method ESMF_GridGetItem() allows the user + to get a reference to the Array which + contains item data for a stagger location on a Grid. The user + can then employ any of the standard ESMF_Array tools to operate + on the data. The following gets the mask data from the corner + and puts it into the ESMF Array arrayMask. +

+

+   call ESMF_GridGetItem(grid2D,             &
+          staggerLoc=ESMF_STAGGERLOC_CORNER, &
+          itemflag=ESMF_GRIDITEM_MASK,           &
+          array=arrayMask, rc=rc)
+
+ +

+Alternatively, the call ESMF_GridGetItem() gets a Fortran pointer to + the item data. The user can then operate on this array in the usual + manner. The following call gets a reference to the + Fortran array which holds the data for the mask data. +

+

+   call ESMF_GridGetItem(grid2D, localDE=0,   &
+          staggerloc=ESMF_STAGGERLOC_CORNER,  &
+          itemflag=ESMF_GRIDITEM_MASK, farrayPtr=mask2D, rc=rc)
+
+ +

+ +

+ +
+31.3.19 Grid regions and bounds +

+ +

+Like an Array or a Field, the index space of each + stagger location in the Grid contains an exclusive region, a + computational region and a total region. Please + see Section 28.2.6 + for an in depth description of these regions. + +

+The exclusive region is the index space defined by the + distgrid of each stagger location of the Grid. This region + is the region which is owned by the DE and is the region + operated on by communication methods such as ESMF_FieldRegrid(). + The exclusive region for a stagger location is based on the + exclusive region defined by the DistGrid used to create the Grid. + The size of the stagger exclusive region is the index space for the + Grid cells, plus the stagger padding. + +

+The default stagger padding depends on the topology of the Grid. + For an unconnected dimension the stagger padding is a width + of 1 on the upper side (i.e. gridEdgeUWidth=(1,1,1,1...)). + For a periodic dimension there is no stagger padding. + By adjusting gridEdgeLWidth and gridEdgeUWidth, the + user can set the stagger padding for the whole Grid and + thus the exclusive region can be adjusted at will around the + index space corresponding to the cells. The user can + also use staggerEdgeLWidth and staggerEdgeUWidth to + adjust individual stagger location padding within the + Grid's padding (Please see Section 31.3.26 for + further discussion of customizing the stagger padding). + +

+

+
+
+ + + +
Figure 17: +An example of a Grid's exclusive region for the corner stagger
+\scalebox{0.75}{\includegraphics{GridExclusiveReg}}
+
+
+
+ +

+Figure 17 shows an example of a Grid exclusive region for the + ESMF_STAGGERLOC_CORNER stagger with default + stagger padding. This exclusive region would be for a Grid generated by either of the + following calls: +

+

+  grid2D=ESMF_GridCreateNoPeriDim(regDecomp=(/2,4/), maxIndex=(/5,15/), &
+           indexflag=ESMF_INDEX_GLOBAL, rc=rc)
+
+ +

+

+  grid2D=ESMF_GridCreateNoPeriDim(countsPerDEDim1=(/4,4,4,3/), &
+           countsPerDEDim2=(/3,2/), indexflag=ESMF_INDEX_GLOBAL, rc=rc)
+
+ +

+Each rectangle in this diagram represents a DE and the numbers along the sides + are the index values of the locations in the DE. Note that the exclusive region + has one extra index location in each dimension than the number of cells + because of the padding for the larger corner stagger location. + +

+The computational region is a user-settable region which can be used + to distinguish a particular area for computation. The Grid doesn't + currently contain functionality to let the user set the computational + region so it defaults to the exclusive region. However, if the + user sets an Array holding different computational bounds into the + Grid then that Array's computational bounds will be used. + +

+The total region is the outermost boundary of the memory allocated + on each DE to hold the data for the stagger location on that DE. This region + can be as small as the exclusive region, but may be larger to + include space for halos, memory padding, etc. The total region is + what is enlarged to include space for halos, and the total region + must be large enough to contain the maximum halo operation on the + Grid. The Grid doesn't currently contain functionality to let the + user set the total region so it defaults to the exclusive region. + However, if the + user sets an Array holding different total bounds into the + Grid then that Array's total bounds will be used. + +

+The user can retrieve a set of bounds for each index space region + described above: exclusive bounds, computational bounds, + and total bounds. Note that although some of these are similar + to bounds provided by ESMF_Array subroutines + (see Section 28.2.6) + the format here is different. The Array bounds are only for + distributed dimensions and are ordered to correspond + to the dimension order in the associated DistGrid. The bounds + provided by the Grid are ordered according to the order of dimensions of the data + in question. This means that the bounds provided should be usable + "as is" to access the data. + +

+Each of the three types of bounds refers to the maximum and minimum + per dimension of the index ranges of a particular region. The parameters + referring to the maximums contain a 'U' for upper. The parameters referring + to the minimums contain an 'L' for lower. The bounds and associated + quantities are almost always given on a per DE basis. The three types of + bounds exclusiveBounds, computationalBounds, and totalBounds refer + to the ranges of the exclusive region, the computational region, and the + total region. Each of these bounds also has a corresponding count parameter + which gives the number of items across that region (on a DE) in each dimension. + (e.g. totalCount(d)=totallUBound(i)-totalLBound(i)+1). Width parameters + give the spacing between two different types of region. The + computationalWidth argument gives the spacing between the exclusive + region and the computational region. The totalWidth argument gives the + spacing between the total region and the computational region. Like the + other bound information these are typically on a per DE basis, for example + specifying totalLWidth=(1,1) makes the bottom of the total + region one lower in each dimension than the computational region on + each DE. The exceptions to the per DE rule are + staggerEdgeWidth, and gridEdgeWidth + which give the spacing only on the DEs along the boundary of the Grid. + +

+All the above bound discussions only apply to the grid with non-arbitrary distributions, + i.e., regular or irregular distributions. For an arbitrarily distributed grid, + only center stagger location is supported and there is no padding around the grid. + Thus, the exclusive bounds, the total bounds and the computational bounds are identical + and staggerEdgeWidth, and gridEdgeWidth are all zeros. + +

+ +

+31.3.20 Get Grid coordinate bounds +

+ +

+When operating on coordinates the user may often wish to + retrieve the bounds of the piece of coordinate data on + a particular local DE. This is useful for iterating through the + data to set coordinates, retrieve coordinates, or do calculations. + The method ESMF_GridGetCoord allows the user + to retrieve bound information for a particular coordinate + array. + +

+As described in the previous section there are three types of bounds the user can + get: exclusive bounds, computational bounds, + and total bounds. The bounds + provided by ESMF_GridGetCoordBounds are for both distributed + and undistributed dimensions and are ordered according to the + order of dimensions in the coordinate. This means that the bounds + provided should be usable + "as is" to access data in the coordinate array. In the case + of factorized coordinate Arrays where a coordinate may + have a smaller dimension than its associated Grid, then + the dimension of the coordinate's bounds are the dimension of + the coordinate, not the Grid. + +

+The following is an example of retrieving the bounds for localDE 0 for the first + coordinate array from the corner stagger location. +

+

+   call ESMF_GridGetCoordBounds(grid2D, coordDim=1, localDE=0,  &
+          staggerLoc=ESMF_STAGGERLOC_CORNER,                         &
+          exclusiveLBound=elbnd, exclusiveUBound=eubnd,              &
+          computationalLBound=clbnd, computationalUBound=cubnd,      &
+          totalLBound=tlbnd, totalUBound=tubnd, rc=rc)
+
+ +

+ +

+31.3.21 Get Grid stagger location bounds +

+ +

+When operating on data stored at a particular stagger + in a Grid the user may find it useful to be able + to retrieve the bounds of the data on a particular local DE. + This is useful for iterating through the + data for computations or allocating arrays to hold the data. + The method ESMF_GridGet allows the user + to retrieve bound information for a particular stagger location. + +

+As described in Section 31.3.19 there are three types of bounds + the user can typically get, however, the Grid doesn't hold data at + a stagger location (that is the job of the Field), and so + no Array is contained there and so no total region exists, so the + user may only retrieve exclusive and computational bounds from + a stagger location. The bounds + provided by ESMF_GridGet are ordered according to the + order of dimensions in the Grid. + +

+The following is an example of retrieving the bounds for localDE 0 + from the corner stagger location. +

+

+   call ESMF_GridGet(grid2D, localDE=0,                         &
+          staggerLoc=ESMF_STAGGERLOC_CORNER,                    &
+          exclusiveLBound=elbnd, exclusiveUBound=eubnd,         &
+          computationalLBound=clbnd, computationalUBound=cubnd, rc=rc)
+
+ +

+ +

+31.3.22 Get Grid stagger location information +

+ +

+In addition to the per DE information that can be accessed about + a stagger location there is some global information that can + accessed by using ESMF_GridGet without specifying a + localDE. One of the uses of this information is to create + an ESMF Array to hold data for a stagger location. + +

+The information currently available from a stagger + location is the distgrid. The distgrid gives the + distgrid which describes the size and distribution of the elements in the stagger location. + +

+The following is an example of retrieving information for localDE 0 + from the corner stagger location. +

+

+    ! Get info about staggerloc
+    call ESMF_GridGet(grid2D, staggerLoc=ESMF_STAGGERLOC_CORNER,  &
+           distgrid=staggerDistgrid, &
+           rc=rc)
+
+ +

+ +

+31.3.23 Create an Array at a stagger location +

+ +

+In order to create an Array to correspond to a Grid stagger location + several pieces of information need to be obtained from both the + Grid and the stagger location in the Grid. + +

+The information that needs to be obtained from the Grid + is the distgridToGridMap to ensure that the new Array + has its dimensions are mapped correctly to the Grid. These + are obtained using the ESMF_GridGet method. + +

+The information that needs to be obtained from the stagger + location is the distgrid that describes the size and distribution + of the elements in the stagger location. This information can + be obtained using the stagger location specific ESMF_GridGet method. + +

+The following is an example of using information from a 2D Grid with non-arbitrary + distribution to create an Array corresponding to a stagger location. + +

+

+    ! Get info from Grid
+    call ESMF_GridGet(grid2D, distgridToGridMap=distgridToGridMap, rc=rc)
+
+ +

+

+    ! Get info about staggerloc
+    call ESMF_GridGet(grid2D, staggerLoc=ESMF_STAGGERLOC_CORNER, &
+           distgrid=staggerDistgrid, &
+           rc=rc)
+
+ +

+

+    ! construct ArraySpec
+    call ESMF_ArraySpecSet(arrayspec, rank=2, typekind=ESMF_TYPEKIND_R8, rc=rc)
+
+ +

+

+    ! Create an Array based on info from grid
+    array=ESMF_ArrayCreate(arrayspec=arrayspec, &
+            distgrid=staggerDistgrid, distgridToArrayMap=distgridToGridMap, &
+            rc=rc)
+
+ +

+Creating an Array for a Grid with arbitrary distribution is different. + For a 2D Grid with both dimension arbitrarily distributed, the Array dimension + is 1. For a 3D Grid with two arbitrarily distributed dimensions and one + undistributed dimension, the Array dimension is 2. In general, + if the Array does not have any ungridded dimension, the Array dimension + should be 1 plus the number of undistributed dimensions of the Grid. + +

+The following is an example of creating an Array for a 3D Grid with 2 + arbitrarily distributed dimensions such as the one defined in Section 31.3.7. +

+

+    ! Get distGrid from Grid
+    call ESMF_GridGet(grid3D, distgrid=distgrid, rc=rc)
+
+ +

+

+    ! construct ArraySpec
+    call ESMF_ArraySpecSet(arrayspec, rank=2, typekind=ESMF_TYPEKIND_R8, rc=rc)
+
+ +

+

+    ! Create an Array based on the presence of distributed dimensions
+    array=ESMF_ArrayCreate(arrayspec=arrayspec,distgrid=distgrid, rc=rc)
+
+ +

+ +

+ +
+31.3.24 Create more complex Grids using DistGrid +

+ +

+Besides the shortcut methods for creating a Grid object such as + ESMF_GridCreateNoPeriDim(), there is + a set of methods which give the user more control over the + specifics of the grid. The following describes the more + general interface, using DistGrid. + The basic idea is to first create an ESMF DistGrid object describing + the distribution and shape of the Grid, and then to employ that to either directly + create the Grid or first create Arrays and then create the Grid from those. + This method gives the user maximum control over the topology and distribution of the Grid. + See the DistGrid documentation in Section 36.1 for an + in-depth description of its interface and use. + +

+As an example, the following call constructs + a 10x20 Grid with a lower bound of (1,2). +

+

+   ! Create DistGrid
+   distgrid2D = ESMF_DistGridCreate(minIndex=(/1,2/), maxIndex=(/11,22/), &
+           rc=rc)
+
+ +

+

+   ! Create Grid
+   grid3D=ESMF_GridCreate(distGrid=distgrid2D, rc=rc)
+
+ +

+To alter which dimensions are distributed, the distgridToGridMap + argument can be used. The distgridToGridMap is used to set + which dimensions of the Grid are mapped to the dimensions + described by maxIndex. In other words, it describes how the dimensions of + the underlying default DistGrid are mapped to the Grid. Each entry + in distgridToGridMap contains the Grid dimension to which the corresponding + DistGrid dimension should be mapped. + The following example illustrates the creation of a Grid where the largest + dimension is first. To accomplish this the two dimensions are swapped. + +

+

+   ! Create DistGrid
+   distgrid2D = ESMF_DistGridCreate(minIndex=(/1,2/), maxIndex=(/11,22/), &
+        rc=rc)
+
+ +

+

+   ! Create Grid
+   grid2D=ESMF_GridCreate(distGrid=distgrid2D, distgridToGridMap=(/2,1/), &
+        rc=rc)
+
+ +

+ +

+ +
+31.3.25 Specify custom stagger locations +

+ +

+Although ESMF provides a set of predefined stagger locations (See Section 31.2.6), + the user may need one outside this set. This section describes the construction of + custom stagger locations. + +

+To completely specify a stagger for an arbitrary number of dimensions, we define the + stagger location in terms of a set of cartesian coordinates. The cell is represented + by a n-dimensional cube with sides of length 2, and the coordinate origin located at + the center of the cell. The geometry of the cell is for reference purposes only, + and does not literally represent the actual shape of the cell. Think of this method + instead as an easy way to specify a part (e.g. center, corner, face) of a higher + dimensional cell which is extensible to any number of dimensions. + +

+To illustrate this approach, consider a 2D cell. In 2 dimensions + the cell is represented by a square. An xy axis is placed at its center, with the + positive x-axis oriented East and the positive y-axis oriented North. + The resulting coordinate for the lower left corner is at $(-1,-1)$, and upper right + corner at $(1,1)$. + However, because our staggers are symmetric they don't need to distinguish between + the $-1$, and the $1$, so we only need to concern ourselves with the first quadrant of + this cell. We only need to use the $1$, and the $0$, and many of the cell locations + collapse together (e.g. we only need to represent one corner). See figure 18 + for an illustration of these concepts. + +

+

+
+
+ + + +
Figure 18: +An example of specifying 2D stagger locations using coordinates.
+\scalebox{0.75}{\includegraphics{GridCustStaggerLoc}}
+
+
+
+ +

+The cell center is represented by the coordinate pair $(0,0)$ indicating the origin. + The cell corner is $+1$ in each direction, giving a coordinate pair of $(1,1)$. + The edges are each $+1$ in one dimension and $0$ in the other indicating that + they're even with the center in one dimension and offset in the other. + +

+For three dimensions, the vertical component of the stagger location can be added by + simply adding an additional coordinate. The three dimensional generalization of the + cell center becomes $(0,0,0)$ and the cell corner becomes $(1,1,1)$. The rest of + the 3D stagger locations are combinations of $+1$ offsets from the center. + +

+To generalize this to $d$ dimensions, to represent a $d$ dimensional stagger + location. A set of $d$ $0$ and $1$ is used to specify for each dimension + whether a stagger location is aligned with the cell center in that dimension ($0$), + or offset by $+1$ in that dimension ($1$). Using this scheme we can represent + any symmetric stagger location. + +

+To construct a custom stagger location in ESMF the subroutine + ESMF_StaggerLocSet() is used to specify, + for each dimension, whether the stagger is located at the interior (0) + or on the boundary (1) of the cell. This method allows users + to construct stagger locations for which + there is no predefined value. In this example, it's used to + set the 4D center and 4D corner locations. + +

+

+   ! Set Center
+   call ESMF_StaggerLocSet(staggerLoc,loc=(/0,0,0,0/),rc=rc)
+
+ +

+

+   call ESMF_GridAddCoord(grid4D, staggerLoc=staggerLoc, rc=rc)
+
+ +

+

+   ! Set Corner
+   call ESMF_StaggerLocSet(staggerLoc,loc=(/1,1,1,1/),rc=rc)
+
+ +

+

+   call ESMF_GridAddCoord(grid4D, staggerLoc=staggerLoc, rc=rc)
+
+ +

+ +

+ +
+31.3.26 Specify custom stagger padding +

+ +

+There is an added complication with the data (e.g. coordinates) stored at stagger locations in + that they can require different amounts of storage depending + on the underlying Grid type. + +

+

+
+
+ + + +
Figure 19: +An example 2D Grid with cell centers and corners.
+\scalebox{0.75}{\includegraphics{GridCellsAndCorners}}
+
+
+
+ +

+Consider the example 2D grid in figure 19, where the dots represent the cell corners + and the “+” represents the cell centers. For the corners to completely + enclose the cell centers (symmetric stagger), the number of corners in each + dimension needs to be one greater then the number of cell centers. In the above + figure, there are two rows and three columns of cell centers. To enclose the + cell centers, there must be three rows and four columns of cell corners. + This is true in general for Grids without periodicity or + other connections. In fact, for a symmetric stagger, given that the center + location requires n x m storage, the corresponding corner location + requires n+1 x m+1, and the edges, depending on the side, require n+1 x m or + m+1 x n. In order to add the extra storage, a new DistGrid is + created at each stagger location. This Distgrid is similar to the DistGrid + used to create the Grid, but has an extra set of elements added to hold the + index locations for the stagger padding. + By default, when the coordinate arrays are created, one extra + layer of padding is added to the index space to create symmetric staggers + (i.e. the center location is surrounded). The default is to add this padding + on the positive side, and to only add this padding where needed + (e.g. no padding for the center, padding + on both dimensions for the corner, in only one dimension for the + edge in 2D.) There are two ways for the user to change + these defaults. + +

+One way is to use the GridEdgeWidth or GridAlign arguments + when creating a Grid. These arguments can be used to change the default padding + around the Grid cell index space. This extra padding is used by default + when setting the padding for a stagger location. + +

+The gridEdgeLWidth and + gridEdgeUWidth arguments are both 1D arrays of the + same size as the Grid dimension. The entries in the arrays + give the extra offset from the outer boundary of + the grid cell index space. The following example shows the + creation of a Grid with all the extra space to hold stagger padding + on the negative side of a Grid. This is the reverse of + the default behavior. The resulting Grid will have + an exclusive region which extends from $(-1,-1)$ to + $(10,10)$, however, the cell center stagger location + will still extend from $(1,1)$ to $(10,10)$. +

+

+   grid2D=ESMF_GridCreateNoPeriDim(minIndex=(/1,1/),maxIndex=(/10,10/), &
+            gridEdgeLWidth=(/1,1/), gridEdgeUWidth=(/0,0/), rc=rc)
+
+ +

+To indicate how the data in a Grid's stagger locations are aligned with the + cell centers, the optional gridAlign parameter + may be used. This parameter indicates which stagger elements + in a cell share the same index values as the cell center. + For example, in a 2D cell, it would indicate which of the four corners has + the same index value as the center. To set gridAlign, + the values -1,+1 are used to indicate the alignment in + each dimension. This parameter is mostly + informational, however, if the gridEdgeWidth parameters + are not set then its value determines where the default padding + is placed. If not specified, then the default is to align all + staggers to the most negative, so the padding is on the positive side. + The following code illustrates creating a Grid aligned to the reverse of + default (with everything to the positive side). This creates a + Grid identical to that created in the previous example. +

+

+   grid2D=ESMF_GridCreateNoPeriDim(minIndex=(/1,1/),maxIndex=(/10,10/), &
+            gridAlign=(/1,1/), rc=rc)
+
+ +

+The gridEdgeWidth and gridAlign arguments both + allow the user to set the default padding to be used + by stagger locations in a Grid. By default, stagger locations + allocated in a Grid set their stagger padding based on these + values. A stagger location's padding in each dimension is + equal to the value of gridEdgeWidth (or the value implied + by gridAlign), unless the stagger location is centered + in a dimension in which case the stagger padding is 0. For example, + the cell center stagger location has 0 stagger padding in all + dimensions, whereas the edge stagger location lower padding + is equal to gridEdgeLWidth and the upper padding is equal + to gridEdgeUWidth in one dimension, but both are 0 in the other, + centered, dimension. If the user wishes to set the stagger padding + individually for each stagger location they may use the + staggerEdgeWidth and staggerAlign arguments. + +

+The staggerEdgeLWidth and + staggerEdgeUWidth arguments are both 1D arrays of the + same size as the Grid dimension. The entries in the arrays + give the extra offset from the Grid cell index space + for a stagger location. The following example shows the + addition of two stagger locations. The + corner location has no extra boundary and the + center has a single layer of extra padding on + the negative side and none on the positive. This is the reverse of + the default behavior. +

+

+   grid2D=ESMF_GridCreate(distgrid=distgrid2D, &
+            gridEdgeLWidth=(/1,1/), gridEdgeUWidth=(/0,0/), rc=rc)
+
+ +

+

+   call ESMF_GridAddCoord(grid2D, &
+          staggerLoc=ESMF_STAGGERLOC_CORNER, &
+          staggerEdgeLWidth=(/0,0/), staggerEdgeUWidth=(/0,0/), rc=rc)
+
+ +

+

+   call ESMF_GridAddCoord(grid2D, &
+          staggerLoc=ESMF_STAGGERLOC_CENTER, &
+          staggerEdgeLWidth=(/1,1/), staggerEdgeUWidth=(/0,0/), rc=rc)
+
+ +

+To indicate how the data at a particular stagger location is aligned with the + cell center, the optional staggerAlign parameter + may be used. This parameter indicates which stagger elements + in a cell share the same index values as the cell center. + For example, in a 2D cell, it would indicate which of the four corners has + the same index value as the center. To set staggerAlign, + the values -1,+1 are used to indicate the alignment in + each dimension. If a stagger location is + centered in a dimension (e.g. an edge in 2D), then that + dimension is ignored in the alignment. This parameter is mostly + informational, however, if the staggerEdgeWidth parameters + are not set then its value determines where the default padding + is placed. If not specified, then the default is to align all + staggers to the most negative, so the padding is on the positive side. + The following code illustrates aligning the positive (northeast in 2D) + corner with the center. +

+

+   call ESMF_GridAddCoord(grid2D, &
+          staggerLoc=ESMF_STAGGERLOC_CORNER, staggerAlign=(/1,1/), rc=rc)
+
+ +

+ + +

+31.4 Restrictions and Future Work +

+ +

+ +

    +
  • Grids with factorized coordinates can only be redisted when they are 2D. +Using the ESMF_GridCreate() interface that allows the user to create a copy of an existing Grid with a new distribution will give incorrect results when used on a Grid with 3 or more dimensions and whose coordinate arrays are less than the full dimension of the Grid (i.e. it contains factorized coordinates). + +

    +

  • +
  • 7D limit. Only grids up to 7D will be supported. + +

    +

  • +
  • Future adaptation. Currently Grids +are created and then remain unchanged. In the future, it would +be useful to provide support for the various forms of grid +adaptation. This would allow the grids to dynamically change +their resolution to more closely match what is needed at a particular +time and position during a computation for front tracking or adaptive meshes. + +

    +

  • +
  • Future Grid generation. This class for now only contains +the basic functionality for operating on the grid. In the future +methods will be added to enable the automatic generation of various types of +grids. + +

    +

  • +
+ +

+31.5 Design and Implementation Notes +

+ +

+ +

+31.5.1 Grid Topology +

+ +

+The ESMF_Grid class depends upon the ESMF_DistGrid class +for the specification of its topology. That is, when +creating a Grid, first an ESMF_DistGrid is created to describe the +appropriate index space topology. This decision was +made because it seemed redundant to have a system for doing this +in both classes. It also seems most appropriate for +the machinary for topology creation to be located at the lowest +level possible so that it can be used by other +classes (e.g. the ESMF_Array class). Because of this, however, +the authors recommend that as a natural part of the +implementation of subroutines to generate standard grid shapes +(e.g. ESMF_GridGenSphere) a set of standard +topology generation subroutines be implemented (e.g. ESMF_DistGridGenSphere) for users who want to create a standard topology, but a custom geometry. + +

+ +

+31.6 Class API: General Grid Methods +

+ +

+ +

+ +

+ +

+31.6.1 ESMF_GridAssignment(=) - Grid assignment +

+ +

+ +

+
+INTERFACE: +

     interface assignment(=)
+     grid1 = grid2
+
ARGUMENTS: +
     type(ESMF_Grid) :: grid1
+     type(ESMF_Grid) :: grid2
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Assign grid1 as an alias to the same ESMF Grid object in memory + as grid2. If grid2 is invalid, then grid1 will be equally invalid after + the assignment. + +

+The arguments are: +

+
grid1
+
The ESMF_Grid object on the left hand side of the assignment. + +
+
grid2
+
The ESMF_Grid object on the right hand side of the assignment. + +
+
+ +

+ +

+ +

+31.6.2 ESMF_GridOperator(==) - Grid equality operator +

+ +

+ +

+
+INTERFACE: +

   interface operator(==)
+     if (grid1 == grid2) then ... endif
+               OR
+     result = (grid1 == grid2)
+
RETURN VALUE: +
     logical :: result
+
ARGUMENTS: +
     type(ESMF_Grid), intent(in) :: grid1
+     type(ESMF_Grid), intent(in) :: grid2
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Test whether grid1 and grid2 are valid aliases to the same ESMF + Grid object in memory. For a more general comparison of two ESMF Grids, + going beyond the simple alias test, the ESMF_GridMatch() function + must be used. + +

+The arguments are: +

+
grid1
+
The ESMF_Grid object on the left hand side of the equality + operation. + +
+
grid2
+
The ESMF_Grid object on the right hand side of the equality + operation. + +
+
+ +

+ +

+ +

+31.6.3 ESMF_GridOperator(/=) - Grid not equal operator +

+ +

+ +

+
+INTERFACE: +

   interface operator(/=)
+     if (grid1 /= grid2) then ... endif
+               OR
+     result = (grid1 /= grid2)
+
RETURN VALUE: +
     logical :: result
+
ARGUMENTS: +
     type(ESMF_Grid), intent(in) :: grid1
+     type(ESMF_Grid), intent(in) :: grid2
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Test whether grid1 and grid2 are not valid aliases to the + same ESMF Grid object in memory. For a more general comparison of two ESMF + Grids, going beyond the simple alias test, the ESMF_GridMatch() function + (not yet fully implemented) must be used. + +

+The arguments are: +

+
grid1
+
The ESMF_Grid object on the left hand side of the non-equality + operation. + +
+
grid2
+
The ESMF_Grid object on the right hand side of the non-equality + operation. + +
+
+ +

+ +

+ +

+31.6.4 ESMF_GridAddCoord - Allocate coordinate arrays but don't set their values +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_GridAddCoord()
+      subroutine ESMF_GridAddCoordNoValues(grid, staggerloc,  &
+        staggerEdgeLWidth, staggerEdgeUWidth, staggerAlign, &
+        staggerLBound,rc)
+
ARGUMENTS: +
       type(ESMF_Grid),        intent(in)            :: grid
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       type (ESMF_StaggerLoc), intent(in),  optional :: staggerloc
+       integer,                intent(in),  optional :: staggerEdgeLWidth(:)
+       integer,                intent(in),  optional :: staggerEdgeUWidth(:)
+       integer,                intent(in),  optional :: staggerAlign(:)
+       integer,                intent(in),  optional :: staggerLBound(:)
+       integer,                intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+When a Grid is created all of its potential stagger locations can hold coordinate + data, but none of them have storage allocated. This call allocates coordinate + storage (creates internal ESMF_Arrays and associated memory) for a particular + stagger location. Note that this + call doesn't assign any values to the storage, it only allocates it. The + remaining options staggerEdgeLWidth, etc. allow the user to adjust the + padding on the coordinate arrays. + +

+The arguments are: +

+
grid
+
Grid to allocate coordinate storage in. + +
+
[staggerloc]
+
The stagger location to add. Please see Section 31.2.6 for a list + of predefined stagger locations. If not present, defaults to ESMF_STAGGERLOC_CENTER. + +
+
[staggerEdgeLWidth]
+
This array should be the same dimCount as the grid. It specifies the lower corner of the stagger + region with respect to the lower corner of the exclusive region. + +
+
[staggerEdgeUWidth]
+
This array should be the same dimCount as the grid. It specifies the upper corner of the stagger + region with respect to the upper corner of the exclusive region. + +
+
[staggerAlign]
+
This array is of size grid dimCount. + For this stagger location, it specifies which element + has the same index value as the center. For example, + for a 2D cell with corner stagger it specifies which + of the 4 corners has the same index as the center. + If this is set and either staggerEdgeUWidth or staggerEdgeLWidth is not, + this determines the default array padding for a stagger. + If not set, then this defaults to all negative. (e.g. + The most negative part of the stagger in a cell is aligned with the + center and the padding is all on the positive side.) + +
+
[staggerLBound]
+
Specifies the lower index range of the memory of every DE in this staggerloc in this Grid. + Only used when Grid indexflag is ESMF_INDEX_USER. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+31.6.5 ESMF_GridAddItem - Allocate item array but don't set their values +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_GridAddItem()
+      subroutine ESMF_GridAddItemNoValues(grid, itemflag,  &
+        staggerloc, itemTypeKind, staggerEdgeLWidth, staggerEdgeUWidth, &
+        staggerAlign, staggerLBound,rc)
+
ARGUMENTS: +
       type(ESMF_Grid),          intent(in)           :: grid
+       type (ESMF_GridItem_Flag),intent(in)           :: itemflag
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       type (ESMF_StaggerLoc)  , intent(in), optional :: staggerloc
+       type (ESMF_TypeKind_Flag),intent(in), optional :: itemTypeKind
+       integer,                  intent(in), optional :: staggerEdgeLWidth(:)
+       integer,                  intent(in), optional :: staggerEdgeUWidth(:)
+       integer,                  intent(in), optional :: staggerAlign(:)
+       integer,                  intent(in), optional :: staggerLBound(:)
+       integer,                  intent(out),optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+When a Grid is created all of its potential stagger locations can hold item + data, but none of them have storage allocated. This call allocates item + storage (creates an internal ESMF_Array and associated memory) for a particular + stagger location. Note that this + call doesn't assign any values to the storage, it only allocates it. The + remaining options staggerEdgeLWidth, etc. allow the user to adjust the + padding on the item array. + +

+The arguments are: +

+
grid
+
Grid to allocate coordinate storage in. + +
+
itemflag
+
The grid item to add. Please see Section 31.2.2 for a list of valid items. + +
+
[staggerloc]
+
The stagger location to add. Please see Section 31.2.6 for a list + of predefined stagger locations. If not present, defaults to ESMF_STAGGERLOC_CENTER. + +
+
[itemTypeKind]
+
The typekind of the item to add. + +
+
[staggerEdgeLWidth]
+
This array should be the same dimCount as the grid. It specifies the lower corner of the stagger + region with respect to the lower corner of the exclusive region. + +
+
[staggerEdgeUWidth]
+
This array should be the same dimCount as the grid. It specifies the upper corner of the stagger + region with respect to the upper corner of the exclusive region. + +
+
[staggerAlign]
+
This array is of size grid dimCount. + For this stagger location, it specifies which element + has the same index value as the center. For example, + for a 2D cell with corner stagger it specifies which + of the 4 corners has the same index as the center. + If this is set and either staggerEdgeUWidth or staggerEdgeLWidth is not, + this determines the default array padding for a stagger. + If not set, then this defaults to all negative. (e.g. + The most negative part of the stagger in a cell is aligned with the + center and the padding is all on the positive side.) + +
+
[staggerLBound]
+
Specifies the lower index range of the memory of every DE in this staggerloc in this Grid. + Only used when Grid indexflag is ESMF_INDEX_USER. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+31.6.6 ESMF_GridCreate - Create a copy of a Grid with a new DistGrid +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_GridCreate()
+       function ESMF_GridCreateCopyFromNewDG(grid, distgrid, &
+         name, copyAttributes, routehandle, rc)
+
RETURN VALUE: +
       type(ESMF_Grid) :: ESMF_GridCreateCopyFromNewDG
+
ARGUMENTS: +
        type(ESMF_Grid),       intent(in)              :: grid
+        type(ESMF_DistGrid),   intent(in)              :: distgrid
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+        character (len=*),     intent(in),   optional  :: name
+        logical,               intent(in),   optional  :: copyAttributes
+        type(ESMF_RouteHandle),intent(out),  optional  :: routehandle
+        integer,               intent(out),  optional  :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    7.1.0r
    +
    Added argument copyAttributes to support attribute + propagation from the existing to the newly created grid object.
    + +
    +
    8.2.1
    +
    Added argument routehandle providing the user with a convenient + way to execute ESMF_GridRedist() repeatedly, e.g. when coordinates + on the source grid have changed. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+This call allows the user to copy an existing ESMF Grid, but with a new distribution. + All internal data from the old Grid (coords, items) are redistributed to the new Grid. + +

+The arguments are: +

+
grid
+
The existing ESMF_Grid being redistributed, i.e. the "source" grid. + +
+
distgrid
+
ESMF_DistGrid object which describes how the newly created Grid is + decomposed and distributed. + +
+
[name]
+
Name of the new Grid. If not specified, a new unique name will be created + for the Grid. + +
+
[copyAttributes]
+
A flag to indicate whether to copy the attributes of the existing grid + to the new grid. The default value is .false.. + +
+
[routehandle]
+
If provided holds the mapping of coordinates between the two grids. This can + be used in the companion method ESMF_GridRedist() to update coordinates. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+31.6.7 ESMF_GridCreate - Create a copy of a Grid with a different regular distribution +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_GridCreate()
+       function ESMF_GridCreateCopyFromReg(grid, &
+         regDecomp, decompFlag, name, copyAttributes, rc)
+
RETURN VALUE: +
       type(ESMF_Grid) :: ESMF_GridCreateCopyFromReg
+
ARGUMENTS: +
        type(ESMF_Grid),        intent(in)              :: grid
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+        integer,                intent(in),   optional  :: regDecomp(:)
+        type(ESMF_Decomp_Flag), intent(in),   optional  :: decompflag(:)
+        character (len=*),      intent(in),   optional  :: name
+        logical,                intent(in),   optional  :: copyAttributes
+        integer,                intent(out),  optional  :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    7.1.0r
    +
    Added argument copyAttributes to support attribute + propagation from the existing to the newly created grid object. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+This method creates a copy of an existing Grid, the new Grid is + regularly distributed (see Figure 13). + To specify the new distribution, the user passes in an array + (regDecomp) specifying the number of DEs to divide each + dimension into. The array decompFlag indicates how the division into DEs is to + occur. The default is to divide the range as evenly as possible. + +

+The arguments are: +

+
grid
+
ESMF_Grid to copy. + +
+
[regDecomp]
+
List that has the same number of elements as maxIndex. + Each entry is the number of decounts for that dimension. + If not specified, the default decomposition will be petCountx1x1..x1. + +
+
[decompflag]
+
List of decomposition flags indicating how each dimension of the + tile is to be divided between the DEs. The default setting + is ESMF_DECOMP_BALANCED in all dimensions. Please see + Section 54.14 for a full description of the + possible options. Note that currently the option + ESMF_DECOMP_CYCLIC isn't supported in Grid creation. + +
+
[name]
+
Name of the new Grid. If not specified, a new unique name will be + created for the Grid. + +
+
[copyAttributes]
+
A flag to indicate whether to copy the attributes of the existing grid + to the new grid. The default value is .false.. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+31.6.8 ESMF_GridCreate - Create a Grid with user set edge connections and an irregular distribution +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_GridCreate()
+       function ESMF_GridCreateEdgeConnI(minIndex,         &
+         countsPerDEDim1,countsPerDeDim2,                  &
+         countsPerDEDim3,                                  &
+         connflagDim1, connflagDim2, connflagDim3,         &
+         coordSys, coordTypeKind,                          &
+         coordDep1, coordDep2, coordDep3,                  &
+         gridEdgeLWidth, gridEdgeUWidth, gridAlign,        &
+         gridMemLBound, indexflag, petMap, name, rc)
+
RETURN VALUE: +
       type(ESMF_Grid) :: ESMF_GridCreateEdgeConnI
+
ARGUMENTS: +
        integer,                  intent(in),  optional :: minIndex(:)
+        integer,                  intent(in)            :: countsPerDEDim1(:)
+        integer,                  intent(in)            :: countsPerDEDim2(:)
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+        integer,                  intent(in),  optional :: countsPerDEDim3(:)
+        type(ESMF_GridConn_Flag), intent(in),  optional :: connflagDim1(:)
+        type(ESMF_GridConn_Flag), intent(in),  optional :: connflagDim2(:)
+        type(ESMF_GridConn_Flag), intent(in),  optional :: connflagDim3(:)
+        type(ESMF_CoordSys_Flag), intent(in),  optional :: coordSys
+        type(ESMF_TypeKind_Flag), intent(in),  optional :: coordTypeKind
+        integer,                  intent(in),  optional :: coordDep1(:)
+        integer,                  intent(in),  optional :: coordDep2(:)
+        integer,                  intent(in),  optional :: coordDep3(:)
+        integer,                  intent(in),  optional :: gridEdgeLWidth(:)
+        integer,                  intent(in),  optional :: gridEdgeUWidth(:)
+        integer,                  intent(in),  optional :: gridAlign(:)
+        integer,                  intent(in),  optional :: gridMemLBound(:)
+        type(ESMF_Index_Flag),    intent(in),  optional :: indexflag
+        integer,                  intent(in),  optional :: petMap(:,:,:)
+        character (len=*),        intent(in),  optional :: name
+        integer,                  intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+This method creates a single tile, irregularly distributed grid + (see Figure 13). + To specify the irregular distribution, the user passes in an array + for each grid dimension, where the length of the array is the number + of DEs in the dimension. Currently this call only + supports creating 2D or 3D Grids. A 2D Grid can be specified using the + countsPerDEDim1 and countsPerDEDim2 arguments. A 3D Grid can + be specified by also using the optional countsPerDEDim3 argument. + The index of each array element in these arguments corresponds to + a DE number. The array value at the index is the number of grid + cells on the DE in that dimension. + +

+Section 31.3.4 shows an example + of using this method to create a 2D Grid with uniformly spaced + coordinates. This creation method can also be used as the basis for + grids with rectilinear coordinates or curvilinear coordinates. + +

+The arguments are: +

+
[minIndex]
+
Tuple to start the index ranges at. If not present, defaults + to /1,1,1,.../. + +
+
countsPerDEDim1
+
This arrays specifies the number of cells per DE for index dimension 1 + for the exclusive region (the center stagger location). + +
+
countsPerDEDim2
+
This array specifies the number of cells per DE for index dimension 2 + for the exclusive region (center stagger location). + +
+
[countsPerDEDim3]
+
This array specifies the number of cells per DE for index dimension 3 + for the exclusive region (center stagger location). + If not specified then grid is 2D. + +
+
[connflagDim1]
+
Fortran array describing the index dimension 1 connections. + The first element represents the minimum end of dimension 1. + The second element represents the maximum end of dimension 1. + If array is only one element long, then that element is used + for both the minimum and maximum end. + Please see Section 31.2.1 for a list of valid + options. If not present, defaults to ESMF_GRIDCONN_NONE. + +
+
[connflagDim2]
+
Fortran array describing the index dimension 2 connections. + The first element represents the minimum end of dimension 2. + The second element represents the maximum end of dimension 2. + If array is only one element long, then that element is used + for both the minimum and maximum end. + Please see Section 31.2.1 for a list of valid + options. If not present, defaults to ESMF_GRIDCONN_NONE. + +
+
[connflagDim3]
+
Fortran array describing the index dimension 3 connections. + The first element represents the minimum end of dimension 3. + The second element represents the maximum end of dimension 3. + If array is only one element long, then that element is used + for both the minimum and maximum end. + Please see Section 31.2.1 for a list of valid + options. If not present, defaults to ESMF_GRIDCONN_NONE. + +
+
[coordSys]
+
The coordinate system of the grid coordinate data. + For a full list of options, please see Section 54.11. + If not specified then defaults to ESMF_COORDSYS_SPH_DEG. + +
+
[coordTypeKind]
+
The type/kind of the grid coordinate data. All numerical types + listed under section 54.61 are supported. + If not specified then defaults to ESMF_TYPEKIND_R8. + +
+
[coordDep1]
+
This array specifies the dependence of the first + coordinate component on the three index dimensions + described by coordsPerDEDim1,2,3. The size of the + array specifies the number of dimensions of the first + coordinate component array. The values specify which + of the index dimensions the corresponding coordinate + arrays map to. If not present the default is 1,2,...,grid rank. + +
+
[coordDep2]
+
This array specifies the dependence of the second + coordinate component on the three index dimensions + described by coordsPerDEDim1,2,3. The size of the + array specifies the number of dimensions of the second + coordinate component array. The values specify which + of the index dimensions the corresponding coordinate + arrays map to. If not present the default is 1,2,...,grid rank. + +
+
[coordDep3]
+
This array specifies the dependence of the third + coordinate component on the three index dimensions + described by coordsPerDEDim1,2,3. The size of the + array specifies the number of dimensions of the third + coordinate component array. The values specify which + of the index dimensions the corresponding coordinate + arrays map to. If not present the default is 1,2,...,grid rank. + +
+
[gridEdgeLWidth]
+
The padding around the lower edges of the grid. This padding is between + the index space corresponding to the cells and the boundary of the + the exclusive region. This extra space is to contain the extra + padding for non-center stagger locations, and should be big enough + to hold any stagger in the grid. If this and gridAlign are not present then + defaults to 0, 0, ..., 0 (all zeros). + +
+
[gridEdgeUWidth]
+
The padding around the upper edges of the grid. This padding is between + the index space corresponding to the cells and the boundary of the + the exclusive region. This extra space is to contain the extra + padding for non-center stagger locations, and should be big enough + to hold any stagger in the grid. If this and gridAlign are not present then + defaults to 1, 1, ..., 1 (all ones). + +
+
[gridAlign]
+
Specification of how the stagger locations should align with the cell + index space (can be overridden by the individual staggerAligns). If + the gridEdgeWidths are not specified than this argument + implies the gridEdgeWidths. If the gridEdgeWidths are specified and this argument isn't + then this argument is implied by the gridEdgeWidths. + If this and the gridEdgeWidths are not specified, then defaults to + -1, -1, ..., -1 (all negative ones). + +
+
[gridMemLBound]
+
Specifies the lower index range of the memory of every DE in this Grid. + Only used when indexflag is ESMF_INDEX_USER. May be overridden + by staggerMemLBound. + +
+
[indexflag]
+
Indicates the indexing scheme to be used in the new Grid. Please see + Section 54.29 for the list of options. If not present, + defaults to ESMF_INDEX_DELOCAL. + +
+
[petMap]
+
Sets the mapping of pets to the created DEs. This 3D + should be of size size(countsPerDEDim1) x size(countsPerDEDim2) x + size(countsPerDEDim3). If countsPerDEDim3 isn't present, then + the last dimension is of size 1. + +
+
[name]
+
ESMF_Grid name. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+31.6.9 ESMF_GridCreate - Create a Grid with user set edge connections and a regular distribution +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_GridCreate()
+       function ESMF_GridCreateEdgeConnR(regDecomp, decompFlag, &
+         minIndex, maxIndex,                                    &
+         connflagDim1, connflagDim2, connflagDim3,                       &
+         coordSys, coordTypeKind,                            &
+         coordDep1, coordDep2, coordDep3,                    &
+         gridEdgeLWidth, gridEdgeUWidth, gridAlign,          &
+         gridMemLBound, indexflag, petMap, name, rc)
+
RETURN VALUE: +
       type(ESMF_Grid) :: ESMF_GridCreateEdgeConnR
+
ARGUMENTS: +
        integer,                  intent(in),  optional :: regDecomp(:)
+        type(ESMF_Decomp_Flag),   intent(in),  optional :: decompflag(:)
+        integer,                  intent(in),  optional :: minIndex(:)
+        integer,                  intent(in)            :: maxIndex(:)
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+        type(ESMF_GridConn_Flag), intent(in),  optional :: connflagDim1(:)
+        type(ESMF_GridConn_Flag), intent(in),  optional :: connflagDim2(:)
+        type(ESMF_GridConn_Flag), intent(in),  optional :: connflagDim3(:)
+        type(ESMF_CoordSys_Flag), intent(in),  optional :: coordSys
+        type(ESMF_TypeKind_Flag), intent(in),  optional :: coordTypeKind
+        integer,                  intent(in),  optional :: coordDep1(:)
+        integer,                  intent(in),  optional :: coordDep2(:)
+        integer,                  intent(in),  optional :: coordDep3(:)
+        integer,                  intent(in),  optional :: gridEdgeLWidth(:)
+        integer,                  intent(in),  optional :: gridEdgeUWidth(:)
+        integer,                  intent(in),  optional :: gridAlign(:)
+        integer,                  intent(in),  optional :: gridMemLBound(:)
+        type(ESMF_Index_Flag),    intent(in),  optional :: indexflag
+        integer,                  intent(in),  optional :: petMap(:,:,:)
+        character (len=*),        intent(in),  optional :: name
+        integer,                  intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+This method creates a single tile, regularly distributed grid + (see Figure 13). + To specify the distribution, the user passes in an array + (regDecomp) specifying the number of DEs to divide each + dimension into. The array decompFlag indicates how the division into DEs is to + occur. The default is to divide the range as evenly as possible. Currently this call + only supports creating a 2D or 3D Grid, and thus, for example, maxIndex must be of size 2 or 3. + +

+The arguments are: +

+
[regDecomp]
+
List that has the same number of elements as maxIndex. + Each entry is the number of decounts for that dimension. + If not specified, the default decomposition will be petCountx1x1..x1. + +
+
[decompflag]
+
List of decomposition flags indicating how each dimension of the + tile is to be divided between the DEs. The default setting + is ESMF_DECOMP_BALANCED in all dimensions. Please see + Section 54.14 for a full description of the + possible options. Note that currently the option + ESMF_DECOMP_CYCLIC isn't supported in Grid creation. + +
+
[minIndex]
+
The bottom extent of the grid array. If not given then the value defaults + to /1,1,1,.../. + +
+
maxIndex
+
The upper extent of the grid array. + +
+
[connflagDim1]
+
Fortran array describing the index dimension 1 connections. + The first element represents the minimum end of dimension 1. + The second element represents the maximum end of dimension 1. + If array is only one element long, then that element is used + for both the minimum and maximum end. + Please see Section 31.2.1 for a list of valid + options. If not present, defaults to ESMF_GRIDCONN_NONE. + +
+
[connflagDim2]
+
Fortran array describing the index dimension 2 connections. + The first element represents the minimum end of dimension 2. + The second element represents the maximum end of dimension 2. + If array is only one element long, then that element is used + for both the minimum and maximum end. + Please see Section 31.2.1 for a list of valid + options. If not present, defaults to ESMF_GRIDCONN_NONE. + +
+
[connflagDim3]
+
Fortran array describing the index dimension 3 connections. + The first element represents the minimum end of dimension 3. + The second element represents the maximum end of dimension 3. + If array is only one element long, then that element is used + for both the minimum and maximum end. + Please see Section 31.2.1 for a list of valid + options. If not present, defaults to ESMF_GRIDCONN_NONE. + +
+
[coordSys]
+
The coordinate system of the grid coordinate data. + For a full list of options, please see Section 54.11. + If not specified then defaults to ESMF_COORDSYS_SPH_DEG. + +
+
[coordTypeKind]
+
The type/kind of the grid coordinate data. All numerical types + listed under section 54.61 are supported. + If not specified then defaults to ESMF_TYPEKIND_R8. + +
+
[coordDep1]
+
This array specifies the dependence of the first + coordinate component on the three index dimensions + described by coordsPerDEDim1,2,3. The size of the + array specifies the number of dimensions of the first + coordinate component array. The values specify which + of the index dimensions the corresponding coordinate + arrays map to. If not present the default is 1,2,...,grid rank. + +
+
[coordDep2]
+
This array specifies the dependence of the second + coordinate component on the three index dimensions + described by coordsPerDEDim1,2,3. The size of the + array specifies the number of dimensions of the second + coordinate component array. The values specify which + of the index dimensions the corresponding coordinate + arrays map to. If not present the default is 1,2,...,grid rank. + +
+
[coordDep3]
+
This array specifies the dependence of the third + coordinate component on the three index dimensions + described by coordsPerDEDim1,2,3. The size of the + array specifies the number of dimensions of the third + coordinate component array. The values specify which + of the index dimensions the corresponding coordinate + arrays map to. If not present the default is 1,2,...,grid rank. + +
+
[gridEdgeLWidth]
+
The padding around the lower edges of the grid. This padding is between + the index space corresponding to the cells and the boundary of the + the exclusive region. This extra space is to contain the extra + padding for non-center stagger locations, and should be big enough + to hold any stagger in the grid. If this and gridAlign are not present then + defaults to 0, 0, ..., 0 (all zeros). + +
+
[gridEdgeUWidth]
+
The padding around the upper edges of the grid. This padding is between + the index space corresponding to the cells and the boundary of the + the exclusive region. This extra space is to contain the extra + padding for non-center stagger locations, and should be big enough + to hold any stagger in the grid. If this and gridAlign are not present then + defaults to 1, 1, ..., 1 (all ones). + +
+
[gridAlign]
+
Specification of how the stagger locations should align with the cell + index space (can be overridden by the individual staggerAligns). If + the gridEdgeWidths are not specified than this argument + implies the gridEdgeWidths. If the gridEdgeWidths are specified and this argument isn't + then this argument is implied by the gridEdgeWidths. + If this and the gridEdgeWidths are not specified, then defaults to + -1, -1, ..., -1 (all negative ones). + +
+
[gridMemLBound]
+
Specifies the lower index range of the memory of every DE in this Grid. + Only used when indexflag is ESMF_INDEX_USER. May be overridden + by staggerMemLBound. + +
+
[indexflag]
+
Indicates the indexing scheme to be used in the new Grid. Please see + Section 54.29 for the list of options. If not present, + defaults to ESMF_INDEX_DELOCAL. + +
+
[petMap]
+
Sets the mapping of pets to the created DEs. This 3D + should be of size regDecomp(1) x regDecomp(2) x regDecomp(3) + If the Grid is 2D, then the last dimension is of size 1. + +
+
[name]
+
ESMF_Grid name. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+31.6.10 ESMF_GridCreate - Create a Grid with user set edge connections and an arbitrary distribution +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_GridCreate()
+       function ESMF_GridCreateEdgeConnA(minIndex, maxIndex,  &
+         arbIndexCount, arbIndexList,                         &
+         connflagDim1, connflagDim2, connflagDim3,                     &
+         coordSys, coordTypeKind,                          &
+         coordDep1, coordDep2, coordDep3,                  &
+         distDim, name, rc)
+
RETURN VALUE: +
       type(ESMF_Grid) :: ESMF_GridCreateEdgeConnA
+
ARGUMENTS: +
        integer,                  intent(in),  optional :: minIndex(:)
+        integer,                  intent(in)            :: maxIndex(:)
+        integer,                  intent(in)            :: arbIndexCount
+        integer,                  intent(in)            :: arbIndexList(:,:)
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+        type(ESMF_GridConn_Flag), intent(in),  optional :: connflagDim1(:)
+        type(ESMF_GridConn_Flag), intent(in),  optional :: connflagDim2(:)
+        type(ESMF_GridConn_Flag), intent(in),  optional :: connflagDim3(:)
+        type(ESMF_CoordSys_Flag), intent(in),  optional :: coordSys
+        type(ESMF_TypeKind_Flag), intent(in),  optional :: coordTypeKind
+        integer,                  intent(in),  optional :: coordDep1(:)
+        integer,                  intent(in),  optional :: coordDep2(:)
+        integer,                  intent(in),  optional :: coordDep3(:)
+        integer,                  intent(in),  optional :: distDim(:)
+        character (len=*),        intent(in),  optional :: name
+        integer,                  intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+This method creates a single tile, arbitrarily distributed grid + (see Figure 13). + To specify the arbitrary distribution, the user passes in an 2D array + of local indices, where the first dimension is the number of local grid cells + specified by localArbIndexCount and the second dimension is the number of distributed + dimensions. + +

+distDim specifies which grid dimensions are arbitrarily distributed. The + size of distDim has to agree with the size of the second dimension of + localArbIndex. + +

+Currently this call + only supports creating a 2D or 3D Grid, and thus, for example, maxIndex must be of size 2 or 3. + +

+The arguments are: +

+
[minIndex]
+
Tuple to start the index ranges at. If not present, defaults + to /1,1,1,.../. + +
+
maxIndex
+
The upper extend of the grid index ranges. + +
+
arbIndexCount
+
The number of grid cells in the local DE. It is okay to have 0 + grid cell in a local DE. + +
+
arbIndexList
+
This 2D array specifies the indices of the PET LOCAL grid cells. The + dimensions should be arbIndexCount * number of Distributed grid dimensions + where arbIndexCount is the input argument specified below + +
+
[connflagDim1]
+
Fortran array describing the index dimension 1 connections. + The first element represents the minimum end of dimension 1. + The second element represents the maximum end of dimension 1. + If array is only one element long, then that element is used + for both the minimum and maximum end. + Please see Section 31.2.1 for a list of valid + options. If not present, defaults to ESMF_GRIDCONN_NONE. + +
+
[connflagDim2]
+
Fortran array describing the index dimension 2 connections. + The first element represents the minimum end of dimension 2. + The second element represents the maximum end of dimension 2. + If array is only one element long, then that element is used + for both the minimum and maximum end. + Please see Section 31.2.1 for a list of valid + options. If not present, defaults to ESMF_GRIDCONN_NONE. + +
+
[connflagDim3]
+
Fortran array describing the index dimension 3 connections. + The first element represents the minimum end of dimension 3. + The second element represents the maximum end of dimension 3. + If array is only one element long, then that element is used + for both the minimum and maximum end. + Please see Section 31.2.1 for a list of valid + options. If not present, defaults to ESMF_GRIDCONN_NONE. + +
+
[coordSys]
+
The coordinate system of the grid coordinate data. + For a full list of options, please see Section 54.11. + If not specified then defaults to ESMF_COORDSYS_SPH_DEG. + +
+
[coordTypeKind]
+
The type/kind of the grid coordinate data. All numerical types + listed under section 54.61 are supported. + If not specified then defaults to ESMF_TYPEKIND_R8. + +
+
[coordDep1]
+
The size of the array specifies the number of dimensions of the + first coordinate component array. The values specify which + of the index dimensions the corresponding coordinate + arrays map to. The format should be /ESMF_DIM_ARB/ where + /ESMF_DIM_ARB/ is mapped to the collapsed 1D dimension from all + the arbitrarily distributed dimensions. n is the dimension that + is not distributed (if exists). + If not present the default is /ESMF_DIM_ARB/ if the first dimension + is arbitararily distributed, or /n/ if not distributed (i.e. n=1) + Please see Section 54.2 for a definition of ESMF_DIM_ARB. + +
+
[coordDep2]
+
The size of the array specifies the number of dimensions of the + second coordinate component array. The values specify which + of the index dimensions the corresponding coordinate + arrays map to. The format should be /ESMF_DIM_ARB/ where + /ESMF_DIM_ARB/ is mapped to the collapsed 1D dimension from all + the arbitrarily distributed dimensions. n is the dimension that + is not distributed (if exists). + If not present the default is /ESMF_DIM_ARB/ if this dimension + is arbitararily distributed, or /n/ if not distributed (i.e. n=2) + Please see Section 54.2 for a definition of ESMF_DIM_ARB. + +
+
[coordDep3]
+
The size of the array specifies the number of dimensions of the + third coordinate component array. The values specify which + of the index dimensions the corresponding coordinate + arrays map to. The format should be /ESMF_DIM_ARB/ where + /ESMF_DIM_ARB/ is mapped to the collapsed 1D dimension from all + the arbitrarily distributed dimensions. n is the dimension that + is not distributed (if exists). + If not present the default is /ESMF_DIM_ARB/ if this dimension + is arbitararily distributed, or /n/ if not distributed (i.e. n=3) + Please see Section 54.2 for a definition of ESMF_DIM_ARB. + +
+
[distDim]
+
This array specifies which dimensions are arbitrarily distributed. + The size of the array specifies the total distributed dimensions. + if not specified, defaults is all dimensions will be arbitrarily + distributed. The size has to agree with the size of the second + dimension of localArbIndex. + +
+
[name]
+
ESMF_Grid name. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+31.6.11 ESMF_GridCreate - Create a Grid from a DistGrid +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_GridCreate()
+       function ESMF_GridCreateFrmDistGrid(distgrid, &
+         distgridToGridMap, &
+         coordSys, coordTypeKind, coordDimCount, coordDimMap, &
+         gridEdgeLWidth, gridEdgeUWidth, gridAlign, &
+         gridMemLBound, indexflag, name, vm, rc)
+
RETURN VALUE: +
       type(ESMF_Grid) :: ESMF_GridCreateFrmDistGrid
+
ARGUMENTS: +
        type(ESMF_DistGrid),     intent(in)            :: distgrid
+        integer,                 intent(in),  optional :: distgridToGridMap(:)
+        type(ESMF_CoordSys_Flag),intent(in),  optional :: coordSys
+        type(ESMF_TypeKind_Flag),intent(in),  optional :: coordTypeKind
+        integer,                 intent(in),  optional :: coordDimCount(:)
+        integer,                 intent(in),  optional :: coordDimMap(:,:)
+        integer,                 intent(in),  optional :: gridEdgeLWidth(:)
+        integer,                 intent(in),  optional :: gridEdgeUWidth(:)
+        integer,                 intent(in),  optional :: gridAlign(:)
+        integer,                 intent(in),  optional :: gridMemLBound(:)
+        type(ESMF_Index_Flag),   intent(in),  optional :: indexflag
+        character (len=*),       intent(in),  optional :: name
+        type(ESMF_VM),           intent(in),  optional :: vm
+        integer,                 intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+This is the most general form of creation for an ESMF_Grid + object. It allows the user to fully specify the topology and index space + using the DistGrid methods and then build a grid out + of the resulting DistGrid. Note that since the Grid created by this call + uses distgrid as a description of its index space, the resulting Grid + will have exactly the same number of dimensions (i.e. the same dimCount) as + distgrid. The distgridToGridMap argument + specifies how the Grid dimensions are mapped to the distgrid. + The coordDimCount and coordDimMap arguments + allow the user to specify how the coordinate arrays should map to the grid + dimensions. (Note, though, that creating a grid does not allocate coordinate + storage. A method such as ESMF_GridAddCoord() must be called + before adding coordinate values.) + +

+The arguments are: +

+
distgrid
+
ESMF_DistGrid object that describes how the array is decomposed and + distributed over DEs. + +
+
[distgridToGridMap]
+
List that has dimCount elements. + The elements map each dimension of distgrid to a dimension in the grid. + (i.e. the values should range from 1 to dimCount). If not specified, the default + is to map all of distgrid's dimensions against the dimensions of the + grid in sequence. + +
+
[coordSys]
+
The coordinate system of the grid coordinate data. + For a full list of options, please see Section 54.11. + If not specified then defaults to ESMF_COORDSYS_SPH_DEG. + +
+
[coordTypeKind]
+
The type/kind of the grid coordinate data. All numerical types + listed under section 54.61 are supported. + If not specified then defaults to ESMF_TYPEKIND_R8. + +
+
[coordDimCount]
+
List that has dimCount elements. + Gives the dimension of each component (e.g. x) array. This is + to allow factorization of the coordinate arrays. If not specified + all arrays are the same size as the grid. + +
+
[coordDimMap]
+
2D list of size dimCount x dimCount. This array describes the + map of each component array's dimensions onto the grids + dimensions. Each entry coordDimMap(i,j) tells which + grid dimension component i's, jth dimension maps to. + Note that if j is bigger than coordDimCount(i) it is ignored. + The default for each row i is coordDimMap(i,:)=(1,2,3,4,...). + +
+
[gridEdgeLWidth]
+
The padding around the lower edges of the grid. This padding is between + the index space corresponding to the cells and the boundary of the + the exclusive region. This extra space is to contain the extra + padding for non-center stagger locations, and should be big enough + to hold any stagger in the grid. If this and gridAlign are not present then + defaults to 0, 0, ..., 0 (all zeros). + +
+
[gridEdgeUWidth]
+
The padding around the upper edges of the grid. This padding is between + the index space corresponding to the cells and the boundary of the + the exclusive region. This extra space is to contain the extra + padding for non-center stagger locations, and should be big enough + to hold any stagger in the grid. If this and gridAlign are not present then + defaults to 1, 1, ..., 1 (all ones). + +
+
[gridAlign]
+
Specification of how the stagger locations should align with the cell + index space (can be overridden by the individual staggerAligns). If + the gridEdgeWidths are not specified than this argument + implies the gridEdgeWidths. If the gridEdgeWidths are specified and this argument isn't + then this argument is implied by the gridEdgeWidths. + If this and the gridEdgeWidths are not specified, then defaults to + -1, -1, ..., -1 (all negative ones). + +
+
[gridMemLBound]
+
Specifies the lower index range of the memory of every DE in this Grid. + Only used when indexflag is ESMF_INDEX_USER. May be overridden + by staggerMemLBound. + +
+
[indexflag]
+
Indicates the indexing scheme to be used in the new Grid. Please see + Section 54.29 for the list of options. If not present, + defaults to ESMF_INDEX_DELOCAL. + +
+
[name]
+
ESMF_Grid name. + +
+
[vm]
+
If present, the Grid object is created on the specified + ESMF_VM object. The default is to create on the VM of the + current context. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+31.6.12 ESMF_GridCreate - Create a Arbitrary Grid from a DistGrid +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_GridCreate()
+       function ESMF_GridCreateFrmDistGridArb(distgrid, &
+         indexArray, distDim, &
+         coordSys, coordTypeKind, coordDimCount, coordDimMap, &
+         name, rc)
+
RETURN VALUE: +
       type(ESMF_Grid) :: ESMF_GridCreateFrmDistGridArb
+
ARGUMENTS: +
        type(ESMF_DistGrid),      intent(in)              :: distgrid
+        integer,                  intent(in)              :: indexArray(:,:)
+        integer,                  intent(in),   optional  :: distDim(:)
+        type(ESMF_CoordSys_Flag), intent(in),   optional  :: coordSys
+        type(ESMF_TypeKind_Flag), intent(in),   optional  :: coordTypeKind
+        integer,                  intent(in),   optional  :: coordDimCount(:)
+        integer,                  intent(in),   optional  :: coordDimMap(:,:)
+        character (len=*),        intent(in),   optional  :: name
+        integer,                  intent(out),  optional  :: rc
+
+DESCRIPTION: +
+ +

+This is the lower level function to create an arbitrarily distributed ESMF_Grid + object. It allows the user to fully specify the topology and index space + (of the distributed dimensions) using the DistGrid methods and then build a grid out + of the resulting distgrid. The indexArray(2,dimCount), + argument is required to specifies the topology of the grid. + +

+The arguments are: +

+
distgrid
+
ESMF_DistGrid object that describes how the array is decomposed and + distributed over DEs. + +
+
indexArray
+
The minIndex and maxIndex array of size 2 x dimCount + indexArray(1,:) is the minIndex and indexArray(2,:) is the maxIndex + +
+
[distDim]
+
This array specifies which dimensions are arbitrarily distributed. + The size of the array specifies the total distributed dimensions. + if not specified, the default is that all dimensions will be arbitrarily + distributed. + +
+
[coordSys]
+
The coordinate system of the grid coordinate data. + For a full list of options, please see Section 54.11. + If not specified then defaults to ESMF_COORDSYS_SPH_DEG. + +
+
[coordTypeKind]
+
The type/kind of the grid coordinate data. All numerical types + listed under section 54.61 are supported. + If not specified then defaults to ESMF_TYPEKIND_R8. + +
+
[coordDimCount]
+
List that has dimCount elements. + Gives the dimension of each component (e.g. x) array. This is + to allow factorization of the coordinate arrays. If not specified + each component is assumed to be size 1. Note, the default value is different + from the same argument for a non-arbitrarily distributed grid. + +
+
[coordDimMap]
+
2D list of size dimCount x dimCount. This array describes the + map of each coordinate array's dimensions onto the grids + dimensions. coordDimMap(i,j) is the grid dimension of the jth dimension + of the i'th coordinate array. If not specified, the default value of + coordDimMap(i,1) is /ESMF_DIM_ARB/ if the ith dimension of the grid is + arbitrarily distributed, or i if the ith dimension is not distributed. + Note that if j is bigger than coordDimCount(i) then it's ignored. + Please see Section 54.2 for a definition of ESMF_DIM_ARB. + +
+
[name]
+
ESMF_Grid name. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+31.6.13 ESMF_GridCreate - Create a Grid from a SCRIP or GRIDSPEC format grid file with a user specified distribution +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_GridCreate()
+      function ESMF_GridCreateFrmNCFileDG(filename, fileformat, distgrid, &
+        isSphere, polekindflag, addCornerStagger, coordTypeKind, addUserArea, indexflag, &
+        addMask, varname, coordNames, rc)
+
RETURN VALUE: +
       type(ESMF_Grid) :: ESMF_GridCreateFrmNCFileDG
+
ARGUMENTS: +
 
+     character(len=*),       intent(in)             :: filename
+     type(ESMF_FileFormat_Flag), intent(in), optional :: fileformat
+     type(ESMF_DistGrid),    intent(in)             :: distgrid
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     logical,                intent(in),  optional  :: isSphere
+     type(ESMF_PoleKind_Flag),  intent(in),  optional :: polekindflag(2)
+     logical,                intent(in),  optional  :: addCornerStagger
+     type(ESMF_TypeKind_Flag),intent(in), optional  :: coordTypeKind
+     logical,                intent(in),  optional  :: addUserArea
+     type(ESMF_Index_Flag),  intent(in),  optional  :: indexflag
+     logical,                intent(in),  optional  :: addMask
+     character(len=*),       intent(in),  optional  :: varname
+     character(len=*),       intent(in),  optional  :: coordNames(:)
+     integer,                intent(out), optional  :: rc
+
+DESCRIPTION: +
+ +

+This function creates a ESMF_Grid object using the grid definition from + a grid file in NetCDF that is either in the SCRIP format or in the CF convention. + To specify the distribution, the user passes in a distGrid. + The grid defined in the file has to be a 2D logically rectangular grid. + This function first call ESMF_GridCreateFrmNCFile() to create a ESMF_Grid + object using a pre-calculated block distribution, then redistribute the Grid to + create a new Grid object using the user specified distGrid. + +

+This call is collective across the current VM. + +

+The arguments are: +

+
filename
+
The NetCDF Grid filename. + +
+
[fileformat]
+
The file format. The valid options are ESMF_FILEFORMAT_SCRIP and ESMF_FILEFORMAT_GRIDSPEC. + If it is the SCRIP format, the dimension grid_rank in the file has to be equal to 2. + Please see section 54.20 for a detailed description of the options. + If not specified, the file type will be detected automatically. + +
+
distGrid
+
A distGrid defines how the grid is distributed + +
+
[isSphere]
+
If .true., create a periodic Grid. If .false., create a regional Grid. Defaults to .true. + +
+
[polekindflag]
+
Two item array which specifies the type of connection which occurs at the pole. The value in polekindflag(1) + specifies the connection that occurs at the minimum end of the pole dimension. The value in polekindflag(2) + specifies the connection that occurs at the maximum end of the pole dimension. Please see + Section 31.2.5 for a full list of options. If not specified, + the default is ESMF_POLEKIND_MONOPOLE for both. + +
+
[addCornerStagger]
+
Uses the information in the grid file to add the Corner stagger to + the Grid. The coordinates for the corner stagger is required for conservative + regridding. If not specified, defaults to false. + +
+
[coordTypeKind]
+
The type/kind of the grid coordinate data. Only ESMF_TYPEKIND_R4 + and ESMF_TYPEKIND_R8 are allowed. Currently, ESMF_TYPEKIND_R4 is only + supported for the GRIDSPEC fileformat. + If not specified then defaults to ESMF_TYPEKIND_R8. + +
+
[addUserArea]
+
If .true., read in the cell area from the Grid file, otherwise, ESMF will calculate it. The feature + is only supported when the grid file is in the SCRIP format. If not set, the default value is + .false. + +
+
[indexflag]
+
Indicates the indexing scheme to be used in the new Grid. Please see + section 54.29 for the list of options. If not present, + defaults to ESMF_INDEX_DELOCAL. + +
+
[addMask]
+
If .true., generate the mask using the missing_value attribute defined in 'varname'. + This flag is only needed for the GRIDSPEC file format. If not set, the default value is .false. + +
+
[varname]
+
If addMask is true, provide a variable name stored in the grid file and + the mask will be generated using the missing value of the data value of + this variable. The first two dimensions of the variable has to be the + the longitude and the latitude dimension and the mask is derived from the + first 2D values of this variable even if this data is 3D, or 4D array. + +
+
[coordNames]
+
a two-element array containing the longitude and latitude variable names in a + GRIDSPEC file if there are multiple coordinates defined in the file + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+31.6.14 ESMF_GridCreate - Create a Grid from a SCRIP or GRIDSPEC format grid file +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_GridCreate()
+      function ESMF_GridCreateFrmNCFile(filename, fileformat, regDecomp, &
+        decompflag, delayout, isSphere, polekindflag, addCornerStagger, coordTypeKind, &
+        addUserArea, indexflag, addMask, varname, coordNames, rc)
+
RETURN VALUE: +
       type(ESMF_Grid) :: ESMF_GridCreateFrmNCFile
+
ARGUMENTS: +
 
+     character(len=*),       intent(in)                :: filename
+     type(ESMF_FileFormat_Flag), intent(in), optional  :: fileformat
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,                intent(in),  optional     :: regDecomp(:)
+     type(ESMF_Decomp_Flag), intent(in),  optional     :: decompflag(:)
+     type(ESMF_DELayout),    intent(in),  optional     :: delayout
+     logical,                intent(in),  optional     :: isSphere
+     type(ESMF_PoleKind_Flag),  intent(in),  optional  :: polekindflag(2)
+     logical,                intent(in),  optional     :: addCornerStagger 
+     type(ESMF_TypeKind_Flag),intent(in), optional     :: coordTypeKind
+     logical,                intent(in),  optional     :: addUserArea
+     type(ESMF_Index_Flag),  intent(in),  optional     :: indexflag
+     logical,                intent(in),  optional     :: addMask
+     character(len=*),       intent(in),  optional     :: varname
+     character(len=*),       intent(in),  optional     :: coordNames(:)
+     integer,                intent(out), optional     :: rc
+
+DESCRIPTION: +
+ +

+This function creates a ESMF_Grid object using the grid definition from + a grid file in NetCDF that is either in the SCRIP format or in the CF convention. + To specify the distribution, the user passes in an array + (regDecomp) specifying the number of DEs to divide each + dimension into. The array decompflag indicates how the division into DEs is to + occur. The default is to divide the range as evenly as possible. + The grid defined in the file has to be a 2D logically rectangular + grid. + +

+This call is collective across the current VM. + +

+The arguments are: +

+
filename
+
The NetCDF Grid filename. + +
+
[fileformat]
+
The file format. The valid options are ESMF_FILEFORMAT_SCRIP and ESMF_FILEFORMAT_GRIDSPEC. + If it is the SCRIP format, the dimension grid_rank in the file has to be equal to 2. + Please see section 54.20 for a detailed + description of the options. If not specified, the filetype will be automatically detected. + +
+
[regDecomp]
+
A 2 element array specifying how the grid is decomposed. + Each entry is the number of decounts for that dimension. + The total decounts cannot exceed the total number of PETs. In other + word, at most one DE is allowed per processor. + If not specified, the default decomposition will be petCountx1. + +
+
[decompflag]
+
List of decomposition flags indicating how each dimension of the + tile is to be divided between the DEs. The default setting + is ESMF_DECOMP_BALANCED in all dimensions. Please see + section 54.14 for a full description of the + possible options. Note that currently the option + ESMF_DECOMP_CYCLIC isn't supported in Grid creation. + +
+
[delayout]
+
The DELayout that determines DE layout of DEs across PETs. The default is to create a default + DELayout with the correct number of DEs according to the regDecomp. See the documentation of + the ESMF_DELayoutCreate() method for details about the default DELayout. + +
+
[isSphere]
+
If .true., create a periodic Grid. If .false., create a regional Grid. Defaults to .true. + +
+
[polekindflag]
+
Two item array which specifies the type of connection which occurs at the pole. The value in polekindflag(1) + specifies the connection that occurs at the minimum end of the pole dimension. The value in polekindflag(2) + specifies the connection that occurs at the maximum end of the pole dimension. Please see + Section 31.2.5 for a full list of options. If not specified, + the default is ESMF_POLEKIND_MONOPOLE for both. + +
+
[addCornerStagger]
+
Uses the information in the grid file to add the Corner stagger to + the Grid. The coordinates for the corner stagger is required for conservative + regridding. If not specified, defaults to false. + +
+
[coordTypeKind]
+
The type/kind of the grid coordinate data. Only ESMF_TYPEKIND_R4 + and ESMF_TYPEKIND_R8 are allowed. Currently, ESMF_TYPEKIND_R4 is only + supported for the GRIDSPEC fileformat. + If not specified then defaults to ESMF_TYPEKIND_R8. + +
+
[addUserArea]
+
If .true., read in the cell area from the Grid file, otherwise, ESMF will calculate it. The feature + is only supported when the grid file is in the SCRIP format. If not set, the default value is + .false. + +
+
[indexflag]
+
Indicates the indexing scheme to be used in the new Grid. Please see + section 54.29 for the list of options. If not present, + defaults to ESMF_INDEX_DELOCAL. + +
+
[addMask]
+
If .true., generate the mask using the missing_value attribute defined in 'varname'. This flag + is only needed for the GRIDSPEC file format. If not set, the default value is .false. + +
+
[varname]
+
If addMask is true, provide a variable name stored in the grid file and + the mask will be generated using the missing value of the data value of + this variable. The first two dimensions of the variable has to be the + the longitude and the latitude dimension and the mask is derived from the + first 2D values of this variable even if this data is 3D, or 4D array. + +
+
[coordNames]
+
a two-element array containing the longitude and latitude variable names in a + GRIDSPEC file if there are multiple coordinates defined in the file + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+31.6.15 ESMF_GridCreate1PeriDim - Create a Grid with one periodic dim and an irregular distribution +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_GridCreate1PeriDim()
+       function ESMF_GridCreate1PeriDimI(minIndex,         &
+         countsPerDEDim1,countsPerDeDim2,                  &
+         countsPerDEDim3,                                  &
+         polekindflag, periodicDim, poleDim,                   &
+         coordSys, coordTypeKind,                          &
+         coordDep1, coordDep2, coordDep3,                  &
+         gridEdgeLWidth, gridEdgeUWidth, gridAlign,        &
+         gridMemLBound, indexflag, petMap, name, rc)
+
RETURN VALUE: +
       type(ESMF_Grid) :: ESMF_GridCreate1PeriDimI
+
ARGUMENTS: +
        integer,                   intent(in),  optional :: minIndex(:)
+        integer,                   intent(in)            :: countsPerDEDim1(:)
+        integer,                   intent(in)            :: countsPerDEDim2(:)
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+        integer,                   intent(in),  optional :: countsPerDEDim3(:)
+        type(ESMF_PoleKind_Flag),  intent(in),  optional :: polekindflag(2)
+        integer,                   intent(in),  optional :: periodicDim
+        integer,                   intent(in),  optional :: poleDim
+        type(ESMF_CoordSys_Flag),  intent(in),  optional :: coordSys
+        type(ESMF_TypeKind_Flag),  intent(in),  optional :: coordTypeKind
+        integer,                   intent(in),  optional :: coordDep1(:)
+        integer,                   intent(in),  optional :: coordDep2(:)
+        integer,                   intent(in),  optional :: coordDep3(:)
+        integer,                   intent(in),  optional :: gridEdgeLWidth(:)
+        integer,                   intent(in),  optional :: gridEdgeUWidth(:)
+        integer,                   intent(in),  optional :: gridAlign(:)
+        integer,                   intent(in),  optional :: gridMemLBound(:)
+        type(ESMF_Index_Flag),     intent(in),  optional :: indexflag
+        integer,                   intent(in),  optional :: petMap(:,:,:)
+        character (len=*),         intent(in),  optional :: name
+        integer,                   intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+This method creates a single tile, irregularly distributed grid + (see Figure 13) with one periodic dimension. + To specify the irregular distribution, the user passes in an array + for each grid dimension, where the length of the array is the number + of DEs in the dimension. Currently this call only + supports creating 2D or 3D Grids. A 2D Grid can be specified using the + countsPerDEDim1 and countsPerDEDim2 arguments. A 3D Grid can + be specified by also using the optional countsPerDEDim3 argument. + The index of each array element in these arguments corresponds to + a DE number. The array value at the index is the number of grid + cells on the DE in that dimension. + +

+Section 31.3.4 shows an example + of using this method to create a 2D Grid with uniformly spaced + coordinates. This creation method can also be used as the basis for + grids with rectilinear coordinates or curvilinear coordinates. + +

+The arguments are: +

+
[minIndex]
+
Tuple to start the index ranges at. If not present, defaults + to /1,1,1,.../. + +
+
countsPerDEDim1
+
This arrays specifies the number of cells per DE for index dimension 1 + for the exclusive region (the center stagger location). + +
+
countsPerDEDim2
+
This array specifies the number of cells per DE for index dimension 2 + for the exclusive region (center stagger location). + +
+
[countsPerDEDim3]
+
This array specifies the number of cells per DE for index dimension 3 + for the exclusive region (center stagger location). + If not specified then grid is 2D. + +
+
[polekindflag]
+
Two item array which specifies the type of connection which occurs at the pole. The value in polekindflag(1) + specifies the connection that occurs at the minimum end of the pole dimension. The value in polekindflag(2) + specifies the connection that occurs at the maximum end of the pole dimension. Please see + Section 31.2.5 for a full list of options. If not specified, + the default is ESMF_POLEKIND_MONOPOLE for both. + +
+
[periodicDim]
+
The periodic dimension. If not specified, defaults to 1. + +
+
[poleDim]
+
The dimension at who's ends the poles are located. If not specified defaults to 2. + +
+
[coordSys]
+
The coordinate system of the grid coordinate data. + For a full list of options, please see Section 54.11. + If not specified then defaults to ESMF_COORDSYS_SPH_DEG. + +
+
[coordTypeKind]
+
The type/kind of the grid coordinate data. All numerical types + listed under section 54.61 are supported. + If not specified then defaults to ESMF_TYPEKIND_R8. + +
+
[coordDep1]
+
This array specifies the dependence of the first + coordinate component on the three index dimensions + described by coordsPerDEDim1,2,3. The size of the + array specifies the number of dimensions of the first + coordinate component array. The values specify which + of the index dimensions the corresponding coordinate + arrays map to. If not present the default is 1,2,...,grid rank. + +
+
[coordDep2]
+
This array specifies the dependence of the second + coordinate component on the three index dimensions + described by coordsPerDEDim1,2,3. The size of the + array specifies the number of dimensions of the second + coordinate component array. The values specify which + of the index dimensions the corresponding coordinate + arrays map to. If not present the default is 1,2,...,grid rank. + +
+
[coordDep3]
+
This array specifies the dependence of the third + coordinate component on the three index dimensions + described by coordsPerDEDim1,2,3. The size of the + array specifies the number of dimensions of the third + coordinate component array. The values specify which + of the index dimensions the corresponding coordinate + arrays map to. If not present the default is 1,2,...,grid rank. + +
+
[gridEdgeLWidth]
+
The padding around the lower edges of the grid. This padding is between + the index space corresponding to the cells and the boundary of the + the exclusive region. This extra space is to contain the extra + padding for non-center stagger locations, and should be big enough + to hold any stagger in the grid. If this and gridAlign are not present then + defaults to 0, 0, ..., 0 (all zeros). + +
+
[gridEdgeUWidth]
+
The padding around the upper edges of the grid. This padding is between + the index space corresponding to the cells and the boundary of the + the exclusive region. This extra space is to contain the extra + padding for non-center stagger locations, and should be big enough + to hold any stagger in the grid. If this and gridAlign are not present then + defaults to 1, 1, ..., 1 (all ones). + +
+
[gridAlign]
+
Specification of how the stagger locations should align with the cell + index space (can be overridden by the individual staggerAligns). If + the gridEdgeWidths are not specified than this argument + implies the gridEdgeWidths. If the gridEdgeWidths are specified and this argument isn't + then this argument is implied by the gridEdgeWidths. + If this and the gridEdgeWidths are not specified, then defaults to + -1, -1, ..., -1 (all negative ones). + +
+
[gridMemLBound]
+
Specifies the lower index range of the memory of every DE in this Grid. + Only used when indexflag is ESMF_INDEX_USER. May be overridden + by staggerMemLBound. + +
+
[indexflag]
+
Indicates the indexing scheme to be used in the new Grid. Please see + Section 54.29 for the list of options. If not present, + defaults to ESMF_INDEX_DELOCAL. + +
+
[petMap]
+
Sets the mapping of pets to the created DEs. This 3D + should be of size size(countsPerDEDim1) x size(countsPerDEDim2) x + size(countsPerDEDim3). If countsPerDEDim3 isn't present, then + the last dimension is of size 1. + +
+
[name]
+
ESMF_Grid name. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+31.6.16 ESMF_GridCreate1PeriDim - Create a Grid with one periodic dim and a regular distribution +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_GridCreate1PeriDim()
+       function ESMF_GridCreate1PeriDimR(regDecomp, decompFlag, &
+         minIndex, maxIndex,                                    &
+         polekindflag, periodicDim, poleDim,                        &
+         coordSys, coordTypeKind,                               &
+         coordDep1, coordDep2, coordDep3,                       &
+         gridEdgeLWidth, gridEdgeUWidth, gridAlign,             &
+         gridMemLBound, indexflag, petMap, name, rc)
+
RETURN VALUE: +
       type(ESMF_Grid) :: ESMF_GridCreate1PeriDimR
+
ARGUMENTS: +
        integer,                   intent(in),  optional :: regDecomp(:)
+        type(ESMF_Decomp_Flag),    intent(in),  optional :: decompflag(:)
+        integer,                   intent(in),  optional :: minIndex(:)
+        integer,                   intent(in)            :: maxIndex(:)
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+        type(ESMF_PoleKind_Flag),  intent(in),  optional :: polekindflag(2)
+        integer,                   intent(in),  optional :: periodicDim
+        integer,                   intent(in),  optional :: poleDim
+        type(ESMF_CoordSys_Flag),  intent(in),  optional :: coordSys
+        type(ESMF_TypeKind_Flag),  intent(in),  optional :: coordTypeKind
+        integer,                   intent(in),  optional :: coordDep1(:)
+        integer,                   intent(in),  optional :: coordDep2(:)
+        integer,                   intent(in),  optional :: coordDep3(:)
+        integer,                   intent(in),  optional :: gridEdgeLWidth(:)
+        integer,                   intent(in),  optional :: gridEdgeUWidth(:)
+        integer,                   intent(in),  optional :: gridAlign(:)
+        integer,                   intent(in),  optional :: gridMemLBound(:)
+        type(ESMF_Index_Flag),     intent(in),  optional :: indexflag
+        integer,                   intent(in),  optional :: petMap(:,:,:)
+        character (len=*),         intent(in),  optional :: name
+        integer,                   intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+This method creates a single tile, regularly distributed grid + (see Figure 13) with one periodic dimension. + To specify the distribution, the user passes in an array + (regDecomp) specifying the number of DEs to divide each + dimension into. The array decompFlag indicates how the division into DEs is to + occur. The default is to divide the range as evenly as possible. Currently this call + only supports creating a 2D or 3D Grid, and thus, for example, maxIndex must be of size 2 or 3. + +

+The arguments are: +

+
[regDecomp]
+
List that has the same number of elements as maxIndex. + Each entry is the number of decounts for that dimension. + If not specified, the default decomposition will be petCountx1x1..x1. + +
+
[decompflag]
+
List of decomposition flags indicating how each dimension of the + tile is to be divided between the DEs. The default setting + is ESMF_DECOMP_BALANCED in all dimensions. Please see + Section 54.14 for a full description of the + ! possible options. Note that currently the option + ESMF_DECOMP_CYCLIC isn't supported in Grid creation. + +
+
[minIndex]
+
The bottom extent of the grid array. If not given then the value defaults + to /1,1,1,.../. + +
+
maxIndex
+
The upper extent of the grid array. + +
+
[polekindflag]
+
Two item array which specifies the type of connection which occurs at the pole. The value in polekindflag(1) + specifies the connection that occurs at the minimum end of the pole dimension. The value in polekindflag(2) + specifies the connection that occurs at the maximum end of the pole dimension. Please see + Section 31.2.5 for a full list of options. If not specified, + the default is ESMF_POLEKIND_MONOPOLE for both. + +
+
[periodicDim]
+
The periodic dimension. If not specified, defaults to 1. + +
+
[poleDim]
+
The dimension at who's ends the poles are located. If not specified defaults to 2. + +
+
[coordSys]
+
The coordinate system of the grid coordinate data. + For a full list of options, please see Section 54.11. + If not specified then defaults to ESMF_COORDSYS_SPH_DEG. + +
+
[coordTypeKind]
+
The type/kind of the grid coordinate data. All numerical types + listed under section 54.61 are supported. + If not specified then defaults to ESMF_TYPEKIND_R8. + +
+
[coordDep1]
+
This array specifies the dependence of the first + coordinate component on the three index dimensions + described by coordsPerDEDim1,2,3. The size of the + array specifies the number of dimensions of the first + coordinate component array. The values specify which + of the index dimensions the corresponding coordinate + arrays map to. If not present the default is 1,2,...,grid rank. + +
+
[coordDep2]
+
This array specifies the dependence of the second + coordinate component on the three index dimensions + described by coordsPerDEDim1,2,3. The size of the + array specifies the number of dimensions of the second + coordinate component array. The values specify which + of the index dimensions the corresponding coordinate + arrays map to. If not present the default is 1,2,...,grid rank. + +
+
[coordDep3]
+
This array specifies the dependence of the third + coordinate component on the three index dimensions + described by coordsPerDEDim1,2,3. The size of the + array specifies the number of dimensions of the third + coordinate component array. The values specify which + of the index dimensions the corresponding coordinate + arrays map to. If not present the default is 1,2,...,grid rank. + +
+
[gridEdgeLWidth]
+
The padding around the lower edges of the grid. This padding is between + the index space corresponding to the cells and the boundary of the + the exclusive region. This extra space is to contain the extra + padding for non-center stagger locations, and should be big enough + to hold any stagger in the grid. If this and gridAlign are not present then + defaults to 0, 0, ..., 0 (all zeros). + +
+
[gridEdgeUWidth]
+
The padding around the upper edges of the grid. This padding is between + the index space corresponding to the cells and the boundary of the + the exclusive region. This extra space is to contain the extra + padding for non-center stagger locations, and should be big enough + to hold any stagger in the grid. If this and gridAlign are not present then + defaults to 1, 1, ..., 1 (all ones). + +
+
[gridAlign]
+
Specification of how the stagger locations should align with the cell + index space (can be overridden by the individual staggerAligns). If + the gridEdgeWidths are not specified than this argument + implies the gridEdgeWidths. If the gridEdgeWidths are specified and this argument isn't + then this argument is implied by the gridEdgeWidths. + If this and the gridEdgeWidths are not specified, then defaults to + -1, -1, ..., -1 (all negative ones). + +
+
[gridMemLBound]
+
Specifies the lower index range of the memory of every DE in this Grid. + Only used when indexflag is ESMF_INDEX_USER. May be overridden + by staggerMemLBound. + +
+
[indexflag]
+
Indicates the indexing scheme to be used in the new Grid. Please see + Section 54.29 for the list of options. If not present, + defaults to ESMF_INDEX_DELOCAL. + +
+
[petMap]
+
Sets the mapping of pets to the created DEs. This 3D + should be of size regDecomp(1) x regDecomp(2) x regDecomp(3) + If the Grid is 2D, then the last dimension is of size 1. + +
+
[name]
+
ESMF_Grid name. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+31.6.17 ESMF_GridCreate1PeriDim - Create a Grid with one periodic dim and an arbitrary distribution +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_GridCreate1PeriDim()
+       function ESMF_GridCreate1PeriDimA(minIndex, maxIndex,  &
+         arbIndexCount, arbIndexList,                         &
+         polekindflag, periodicDim, poleDim,                      &
+         coordSys, coordTypeKind,                             &
+         coordDep1, coordDep2, coordDep3,                     &
+         distDim, name, rc)
+
RETURN VALUE: +
       type(ESMF_Grid) :: ESMF_GridCreate1PeriDimA
+
ARGUMENTS: +
        integer,                   intent(in),  optional :: minIndex(:)
+         integer,                   intent(in)            :: maxIndex(:)
+        integer,                   intent(in)                    :: arbIndexCount
+        integer,                   intent(in)            :: arbIndexList(:,:)
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+        type(ESMF_PoleKind_Flag),  intent(in),  optional :: polekindflag(2)
+        integer,                   intent(in),  optional :: periodicDim
+        integer,                   intent(in),  optional :: poleDim
+        type(ESMF_CoordSys_Flag),  intent(in),  optional :: coordSys
+        type(ESMF_TypeKind_Flag),  intent(in),  optional :: coordTypeKind
+        integer,                   intent(in),  optional :: coordDep1(:)
+        integer,                   intent(in),  optional :: coordDep2(:)
+        integer,                   intent(in),  optional :: coordDep3(:)
+        integer,                   intent(in),  optional :: distDim(:)
+        character (len=*),         intent(in),  optional :: name
+        integer,                   intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+This method creates a single tile, arbitrarily distributed grid + (see Figure 13) with one periodic dimension. + To specify the arbitrary distribution, the user passes in an 2D array + of local indices, where the first dimension is the number of local grid cells + specified by localArbIndexCount and the second dimension is the number of distributed + dimensions. + +

+distDim specifies which grid dimensions are arbitrarily distributed. The + size of distDim has to agree with the size of the second dimension of + localArbIndex. + +

+Currently this call + only supports creating a 2D or 3D Grid, and thus, for example, maxIndex must be of size 2 or 3. + +

+The arguments are: +

+
[minIndex]
+
Tuple to start the index ranges at. If not present, defaults + to /1,1,1,.../. + +
+
maxIndex
+
The upper extend of the grid index ranges. + +
+
arbIndexCount
+
The number of grid cells in the local DE. It is okay to have 0 + grid cell in a local DE. + +
+
arbIndexList
+
This 2D array specifies the indices of the PET LOCAL grid cells. The + dimensions should be arbIndexCount * number of Distributed grid dimensions + where arbIndexCount is the input argument specified below + +
+
[polekindflag]
+
Two item array which specifies the type of connection which occurs at the pole. The value in polekindflag(1) + specifies the connection that occurs at the minimum end of the pole dimension. The value in polekindflag(2) + specifies the connection that occurs at the maximum end of the pole dimension. Please see + Section 31.2.5 for a full list of options. If not specified, + the default is ESMF_POLEKIND_MONOPOLE for both. + +
+
[periodicDim]
+
The periodic dimension. If not specified, defaults to 1. + +
+
[poleDim]
+
The dimension at who's ends the poles are located. If not specified defaults to 2. + +
+
[coordSys]
+
The coordinate system of the grid coordinate data. + For a full list of options, please see Section 54.11. + If not specified then defaults to ESMF_COORDSYS_SPH_DEG. + +
+
[coordTypeKind]
+
The type/kind of the grid coordinate data. All numerical types + listed under section 54.61 are supported. + If not specified then defaults to ESMF_TYPEKIND_R8. + +
+
[coordDep1]
+
The size of the array specifies the number of dimensions of the + first coordinate component array. The values specify which + of the index dimensions the corresponding coordinate + arrays map to. The format should be /ESMF_DIM_ARB/ where + /ESMF_DIM_ARB/ is mapped to the collapsed 1D dimension from all + the arbitrarily distributed dimensions. n is the dimension that + is not distributed (if exists). + If not present the default is /ESMF_DIM_ARB/ if the first dimension + is arbitararily distributed, or /n/ if not distributed (i.e. n=1) + Please see Section 54.2 for a definition of ESMF_DIM_ARB. + +
+
[coordDep2]
+
The size of the array specifies the number of dimensions of the + second coordinate component array. The values specify which + of the index dimensions the corresponding coordinate + arrays map to. The format should be /ESMF_DIM_ARB/ where + /ESMF_DIM_ARB/ is mapped to the collapsed 1D dimension from all + the arbitrarily distributed dimensions. n is the dimension that + is not distributed (if exists). + If not present the default is /ESMF_DIM_ARB/ if this dimension + is arbitararily distributed, or /n/ if not distributed (i.e. n=2) + Please see Section 54.2 for a definition of ESMF_DIM_ARB. + +
+
[coordDep3]
+
The size of the array specifies the number of dimensions of the + third coordinate component array. The values specify which + of the index dimensions the corresponding coordinate + ! arrays map to. The format should be /ESMF_DIM_ARB/ where + /ESMF_DIM_ARB/ is mapped to the collapsed 1D dimension from all + the arbitrarily distributed dimensions. n is the dimension that + is not distributed (if exists). + If not present the default is /ESMF_DIM_ARB/ if this dimension + is arbitararily distributed, or /n/ if not distributed (i.e. n=3) + Please see Section 54.2 for a definition of ESMF_DIM_ARB. + +
+
[distDim]
+
This array specifies which dimensions are arbitrarily distributed. + The size of the array specifies the total distributed dimensions. + if not specified, defaults is all dimensions will be arbitrarily + distributed. The size has to agree with the size of the second + dimension of localArbIndex. + +
+
[name]
+
ESMF_Grid name. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+31.6.18 ESMF_GridCreate2PeriDim - Create a Grid with two periodic dims and an irregular distribution +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_GridCreate2PeriDim()
+       function ESMF_GridCreate2PeriDimI(minIndex,         &
+         countsPerDEDim1,countsPerDeDim2,                  &
+         countsPerDEDim3,                                  &
+         coordSys, coordTypeKind,                          &
+         coordDep1, coordDep2, coordDep3,                  &
+         gridEdgeLWidth, gridEdgeUWidth, gridAlign,        &
+         gridMemLBound, indexflag, petMap, name, rc)
+
RETURN VALUE: +
       type(ESMF_Grid) :: ESMF_GridCreate2PeriDimI
+
ARGUMENTS: +
        integer,                   intent(in),  optional :: minIndex(:)
+        integer,                   intent(in)            :: countsPerDEDim1(:)
+        integer,                   intent(in)            :: countsPerDEDim2(:)
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+        integer,                   intent(in),  optional :: countsPerDEDim3(:)
+        type(ESMF_CoordSys_Flag),  intent(in),  optional :: coordSys
+        type(ESMF_TypeKind_Flag),  intent(in),  optional :: coordTypeKind
+        integer,                   intent(in),  optional :: coordDep1(:)
+        integer,                   intent(in),  optional :: coordDep2(:)
+        integer,                   intent(in),  optional :: coordDep3(:)
+        integer,                   intent(in),  optional :: gridEdgeLWidth(:)
+        integer,                   intent(in),  optional :: gridEdgeUWidth(:)
+        integer,                   intent(in),  optional :: gridAlign(:)
+        integer,                   intent(in),  optional :: gridMemLBound(:)
+        type(ESMF_Index_Flag),     intent(in),  optional :: indexflag
+        integer,                   intent(in),  optional :: petMap(:,:,:)
+        character (len=*),         intent(in),  optional :: name
+        integer,                   intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+This method creates a single tile, irregularly distributed grid + (see Figure 13) with two periodic dimensions. + To specify the irregular distribution, the user passes in an array + for each grid dimension, where the length of the array is the number + of DEs in the dimension. Currently this call only + supports creating 2D or 3D Grids. A 2D Grid can be specified using the + countsPerDEDim1 and countsPerDEDim2 arguments. A 3D Grid can + be specified by also using the optional countsPerDEDim3 argument. + The index of each array element in these arguments corresponds to + a DE number. The array value at the index is the number of grid + ! cells on the DE in that dimension. + +

+Section 31.3.4 shows an example + of using this method to create a 2D Grid with uniformly spaced + coordinates. This creation method can also be used as the basis for + grids with rectilinear coordinates or curvilinear coordinates. + +

+The arguments are: +

+
[minIndex]
+
Tuple to start the index ranges at. If not present, defaults + to /1,1,1,.../. + +
+
countsPerDEDim1
+
This arrays specifies the number of cells per DE for index dimension 1 + for the exclusive region (the center stagger location). + +
+
countsPerDEDim2
+
This array specifies the number of cells per DE for index dimension 2 + for the exclusive region (center stagger location). + +
+
[countsPerDEDim3]
+
This array specifies the number of cells per DE for index dimension 3 + for the exclusive region (center stagger location). + If not specified then grid is 2D. + +
+
[coordSys]
+
The coordinate system of the grid coordinate data. + For a full list of options, please see Section 54.11. + If not specified then defaults to ESMF_COORDSYS_SPH_DEG. + +
+
[coordTypeKind]
+
The type/kind of the grid coordinate data. All numerical types + listed under section 54.61 are supported. + If not specified then defaults to ESMF_TYPEKIND_R8. + +
+
[coordDep1]
+
This array specifies the dependence of the first + coordinate component on the three index dimensions + described by coordsPerDEDim1,2,3. The size of the + array specifies the number of dimensions of the first + coordinate component array. The values specify which + of the index dimensions the corresponding coordinate + arrays map to. If not present the default is 1,2,...,grid rank. + +
+
[coordDep2]
+
This array specifies the dependence of the second + coordinate component on the three index dimensions + described by coordsPerDEDim1,2,3. The size of the + array specifies the number of dimensions of the second + coordinate component array. The values specify which + of the index dimensions the corresponding coordinate + arrays map to. If not present the default is 1,2,...,grid rank. + ! +
+
[coordDep3]
+
This array specifies the dependence of the third + coordinate component on the three index dimensions + described by coordsPerDEDim1,2,3. The size of the + array specifies the number of dimensions of the third + coordinate component array. The values specify which + of the index dimensions the corresponding coordinate + arrays map to. If not present the default is 1,2,...,grid rank. + +
+
[gridEdgeLWidth]
+
The padding around the lower edges of the grid. This padding is between + the index space corresponding to the cells and the boundary of the + the exclusive region. This extra space is to contain the extra + padding for non-center stagger locations, and should be big enough + to hold any stagger in the grid. If this and gridAlign are not present then + defaults to 0, 0, ..., 0 (all zeros). + +
+
[gridEdgeUWidth]
+
The padding around the upper edges of the grid. This padding is between + the index space corresponding to the cells and the boundary of the + the exclusive region. This extra space is to contain the extra + padding for non-center stagger locations, and should be big enough + to hold any stagger in the grid. If this and gridAlign are not present then + defaults to 1, 1, ..., 1 (all ones). + +
+
[gridAlign]
+
Specification of how the stagger locations should align with the cell + index space (can be overridden by the individual staggerAligns). If + the gridEdgeWidths are not specified than this argument + implies the gridEdgeWidths. If the gridEdgeWidths are specified and this argument isn't + then this argument is implied by the gridEdgeWidths. + If this and the gridEdgeWidths are not specified, then defaults to + -1, -1, ..., -1 (all negative ones). + +
+
[gridMemLBound]
+
Specifies the lower index range of the memory of every DE in this Grid. + Only used when indexflag is ESMF_INDEX_USER. May be overridden + by staggerMemLBound. + +
+
[indexflag]
+
Indicates the indexing scheme to be used in the new Grid. Please see + Section 54.29 for the list of options. If not present, + defaults to ESMF_INDEX_DELOCAL. + +
+
[petMap]
+
Sets the mapping of pets to the created DEs. This 3D + should be of size size(countsPerDEDim1) x size(countsPerDEDim2) x + size(countsPerDEDim3). If countsPerDEDim3 isn't present, then + the last dimension is of size 1. + +
+
[name]
+
ESMF_Grid name. + +
+
[rc]
+
! Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+31.6.19 ESMF_GridCreate2PeriDim - Create a Grid with two periodic dims and a regular distribution +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_GridCreate2PeriDim()
+       function ESMF_GridCreate2PeriDimR(regDecomp, decompFlag, &
+         minIndex, maxIndex,                                    &
+         coordSys, coordTypeKind,                               &
+         coordDep1, coordDep2, coordDep3,                       &
+         gridEdgeLWidth, gridEdgeUWidth, gridAlign,             &
+         gridMemLBound, indexflag, petMap, name, rc)
+
RETURN VALUE: +
       type(ESMF_Grid) :: ESMF_GridCreate2PeriDimR
+
ARGUMENTS: +
        integer,                   intent(in),  optional :: regDecomp(:)
+        type(ESMF_Decomp_Flag),    intent(in),  optional :: decompflag(:)
+        integer,                   intent(in),  optional :: minIndex(:)
+        integer,                   intent(in)            :: maxIndex(:)
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+        type(ESMF_CoordSys_Flag),  intent(in),  optional :: coordSys
+        type(ESMF_TypeKind_Flag),  intent(in),  optional :: coordTypeKind
+        integer,                   intent(in),  optional :: coordDep1(:)
+        integer,                   intent(in),  optional :: coordDep2(:)
+        integer,                   intent(in),  optional :: coordDep3(:)
+        integer,                   intent(in),  optional :: gridEdgeLWidth(:)
+        integer,                   intent(in),  optional :: gridEdgeUWidth(:)
+        integer,                   intent(in),  optional :: gridAlign(:)
+        integer,                   intent(in),  optional :: gridMemLBound(:)
+        type(ESMF_Index_Flag),     intent(in),  optional :: indexflag
+        integer,                   intent(in),  optional :: petMap(:,:,:)
+        character (len=*),         intent(in),  optional :: name
+        integer,                   intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+This method creates a single tile, regularly distributed grid + (see Figure 13) with two periodic dimensions. + To specify the distribution, the user passes in an array + (regDecomp) specifying the number of DEs to divide each + dimension into. The array decompFlag indicates how the division into DEs is to + occur. The default is to divide the range as evenly as possible. Currently this call + only supports creating a 2D or 3D Grid, and thus, for example, maxIndex must be of size 2 or 3. + +

+The arguments are: +

+
[regDecomp]
+
List that has the same number of elements as maxIndex. + Each entry is the number of decounts for that dimension. + If not specified, the default decomposition will be petCountx1x1..x1. + +
+
[decompflag]
+
List of decomposition flags indicating how each dimension of the + tile is to be divided between the DEs. The default setting + is ESMF_DECOMP_BALANCED in all dimensions. Please see + Section 54.14 for a full description of the + possible options. Note that currently the option + ESMF_DECOMP_CYCLIC isn't supported in Grid creation. + +
+
[minIndex]
+
The bottom extent of the grid array. If not given then the value defaults + to /1,1,1,.../. + +
+
maxIndex
+
The upper extent of the grid array. + +
+
[coordSys]
+
The coordinate system of the grid coordinate data. + For a full list of options, please see Section 54.11. + If not specified then defaults to ESMF_COORDSYS_SPH_DEG. + +
+
[coordTypeKind]
+
The type/kind of the grid coordinate data. All numerical types + listed under section 54.61 are supported. + If not specified then defaults to ESMF_TYPEKIND_R8. + +
+
[coordDep1]
+
This array specifies the dependence of the first + coordinate component on the three index dimensions + described by coordsPerDEDim1,2,3. The size of the + array specifies the number of dimensions of the first + coordinate component array. The values specify which + of the index dimensions the corresponding coordinate + arrays map to. If not present the default is 1,2,...,grid rank. + +
+
[coordDep2]
+
This array specifies the dependence of the second + coordinate component on the three index dimensions + described by coordsPerDEDim1,2,3. The size of the + array specifies the number of dimensions of the second + coordinate component array. The values specify which + of the index dimensions the corresponding coordinate + arrays map to. If not present the default is 1,2,...,grid rank. + +
+
[coordDep3]
+
This array specifies the dependence of the third + coordinate component on the three index dimensions + described by coordsPerDEDim1,2,3. The size of the + array specifies the number of dimensions of the third + coordinate component array. The values specify which + of the index dimensions the corresponding coordinate + arrays map to. If not present the default is 1,2,...,grid rank. + +
+
[gridEdgeLWidth]
+
The padding around the lower edges of the grid. This padding is between + the index space corresponding to the cells and the boundary of the + the exclusive region. This extra space is to contain the extra + padding for non-center stagger locations, and should be big enough + to hold any stagger in the grid. If this and gridAlign are not present then + defaults to 0, 0, ..., 0 (all zeros). + +
+
[gridEdgeUWidth]
+
The padding around the upper edges of the grid. This padding is between + the index space corresponding to the cells and the boundary of the + the exclusive region. This extra space is to contain the extra + padding for non-center stagger locations, and should be big enough + to hold any stagger in the grid. If this and gridAlign are not present then + defaults to 1, 1, ..., 1 (all ones). + +
+
[gridAlign]
+
Specification of how the stagger locations should align with the cell + index space (can be overridden by the individual staggerAligns). If + the gridEdgeWidths are not specified than this argument + implies the gridEdgeWidths. If the gridEdgeWidths are specified and this argument isn't + then this argument is implied by the gridEdgeWidths. + If this and the gridEdgeWidths are not specified, then defaults to + -1, -1, ..., -1 (all negative ones). + +
+
[gridMemLBound]
+
Specifies the lower index range of the memory of every DE in this Grid. + Only used when indexflag is ESMF_INDEX_USER. May be overridden + by staggerMemLBound. + +
+
[indexflag]
+
Indicates the indexing scheme to be used in the new Grid. Please see + Section 54.29 for the list of options. If not present, + defaults to ESMF_INDEX_DELOCAL. + +
+
[petMap]
+
Sets the mapping of pets to the created DEs. This 3D + should be of size regDecomp(1) x regDecomp(2) x regDecomp(3) + If the Grid is 2D, then the last dimension is of size 1. + +
+
[name]
+
ESMF_Grid name. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+31.6.20 ESMF_GridCreate2PeriDim - Create a Grid with two periodic dims and an arbitrary distribution +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_GridCreate2PeriDim()
+       function ESMF_GridCreate2PeriDimA(minIndex, maxIndex, &
+         arbIndexCount, arbIndexList,                        &
+         coordSys, coordTypeKind,                            &
+         coordDep1, coordDep2, coordDep3,                    &
+         distDim, name, rc)
+
RETURN VALUE: +
       type(ESMF_Grid) :: ESMF_GridCreate2PeriDimA
+
ARGUMENTS: +
        integer,                   intent(in),  optional :: minIndex(:)
+        integer,                   intent(in)            :: maxIndex(:)
+        integer,                   intent(in)                    :: arbIndexCount
+         integer,                   intent(in)            :: arbIndexList(:,:)
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+        type(ESMF_CoordSys_Flag),  intent(in),  optional :: coordSys
+        type(ESMF_TypeKind_Flag),  intent(in),  optional :: coordTypeKind
+        integer,                   intent(in),  optional :: coordDep1(:)
+        integer,                   intent(in),  optional :: coordDep2(:)
+        integer,                   intent(in),  optional :: coordDep3(:)
+        integer,                   intent(in),  optional :: distDim(:)
+        character (len=*),         intent(in),  optional :: name
+        integer,                   intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+This method creates a single tile, arbitrarily distributed grid + (see Figure 13) with two periodic dimensions. + To specify the arbitrary distribution, the user passes in an 2D array + of local indices, where the first dimension is the number of local grid cells + specified by localArbIndexCount and the second dimension is the number of distributed + dimensions. + +

+distDim specifies which grid dimensions are arbitrarily distributed. The + size of distDim has to agree with the size of the second dimension of + localArbIndex. + +

+Currently this call + only supports creating a 2D or 3D Grid, and thus, for example, maxIndex must be of size 2 or 3. + +

+The arguments are: +

+
[minIndex]
+
Tuple to start the index ranges at. If not present, defaults + to /1,1,1,.../. + +
+
maxIndex
+
The upper extend of the grid index ranges. + +
+
arbIndexCount
+
The number of grid cells in the local DE. It is okay to have 0 + grid cell in a local DE. + +
+
arbIndexList
+
This 2D array specifies the indices of the PET LOCAL grid cells. The + dimensions should be arbIndexCount * number of Distributed grid dimensions + where arbIndexCount is the input argument specified below + +
+
[coordSys]
+
The coordinate system of the grid coordinate data. + For a full list of options, please see Section 54.11. + If not specified then defaults to ESMF_COORDSYS_SPH_DEG. + +
+
[coordTypeKind]
+
The type/kind of the grid coordinate data. All numerical types + listed under section 54.61 are supported. + If not specified then defaults to ESMF_TYPEKIND_R8. + +
+
[coordDep1]
+
The size of the array specifies the number of dimensions of the + first coordinate component array. The values specify which + of the index dimensions the corresponding coordinate + arrays map to. The format should be /ESMF_DIM_ARB/ where + /ESMF_DIM_ARB/ is mapped to the collapsed 1D dimension from all + the arbitrarily distributed dimensions. n is the dimension that + is not distributed (if exists). + If not present the default is /ESMF_DIM_ARB/ if the first dimension + is arbitararily distributed, or /n/ if not distributed (i.e. n=1) + Please see Section 54.2 for a definition of ESMF_DIM_ARB. + +
+
[coordDep2]
+
The size of the array specifies the number of dimensions of the + second coordinate component array. The values specify which + of the index dimensions the corresponding coordinate + arrays map to. The format should be /ESMF_DIM_ARB/ where + /ESMF_DIM_ARB/ is mapped to the collapsed 1D dimension from all + the arbitrarily distributed dimensions. n is the dimension that + is not distributed (if exists). + If not present the default is /ESMF_DIM_ARB/ if this dimension + is arbitararily distributed, or /n/ if not distributed (i.e. n=2) + Please see Section 54.2 for a definition of ESMF_DIM_ARB. + +
+
[coordDep3]
+
The size of the array specifies the number of dimensions of the + third coordinate component array. The values specify which + of the index dimensions the corresponding coordinate + arrays map to. The format should be /ESMF_DIM_ARB/ where + /ESMF_DIM_ARB/ is mapped to the collapsed 1D dimension from all + the arbitrarily distributed dimensions. n is the dimension that + is not distributed (if exists). + If not present the default is /ESMF_DIM_ARB/ if this dimension + is arbitararily distributed, or /n/ if not distributed (i.e. n=3) + Please see Section 54.2 for a definition of ESMF_DIM_ARB. + +
+
[distDim]
+
This array specifies which dimensions are arbitrarily distributed. + The size of the array specifies the total distributed dimensions. + if not specified, defaults is all dimensions will be arbitrarily + distributed. The size has to agree with the size of the second + dimension of localArbIndex. + +
+
[name]
+
ESMF_Grid name. + ! +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+31.6.21 ESMF_GridCreateNoPeriDim - Create a Grid with no periodic dim and an irregular distribution +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_GridCreateNoPeriDim()
+       function ESMF_GridCreateNoPeriDimI(minIndex,        &
+         countsPerDEDim1,countsPerDeDim2,                  &
+         countsPerDEDim3,                                  &
+         coordSys, coordTypeKind,                          &
+         coordDep1, coordDep2, coordDep3,                  &
+         gridEdgeLWidth, gridEdgeUWidth, gridAlign,        &
+         gridMemLBound, indexflag, petMap, name, rc)
+
RETURN VALUE: +
       type(ESMF_Grid) :: ESMF_GridCreateNoPeriDimI
+
ARGUMENTS: +
        integer,                   intent(in),  optional :: minIndex(:)
+        integer,                   intent(in)            :: countsPerDEDim1(:)
+        integer,                   intent(in)            :: countsPerDEDim2(:)
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+        integer,                   intent(in),  optional :: countsPerDEDim3(:)
+        type(ESMF_CoordSys_Flag),  intent(in),  optional :: coordSys
+        type(ESMF_TypeKind_Flag),  intent(in),  optional :: coordTypeKind
+        integer,                   intent(in),  optional :: coordDep1(:)
+        integer,                   intent(in),  optional :: coordDep2(:)
+        integer,                   intent(in),  optional :: coordDep3(:)
+        integer,                   intent(in),  optional :: gridEdgeLWidth(:)
+        integer,                   intent(in),  optional :: gridEdgeUWidth(:)
+        integer,                   intent(in),  optional :: gridAlign(:)
+        integer,                   intent(in),  optional :: gridMemLBound(:)
+        type(ESMF_Index_Flag),     intent(in),  optional :: indexflag
+        integer,                   intent(in),  optional :: petMap(:,:,:)
+        character (len=*),         intent(in),  optional :: name
+        integer,                   intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+This method creates a single tile, irregularly distributed grid + (see Figure 13) without a periodic dimension. + To specify the irregular distribution, the user passes in an array + for each grid dimension, where the length of the array is the number + of DEs in the dimension. Currently this call only + supports creating 2D or 3D Grids. A 2D Grid can be specified using the + countsPerDEDim1 and countsPerDEDim2 arguments. A 3D Grid can + be specified by also using the optional countsPerDEDim3 argument. + The index of each array element in these arguments corresponds to + a DE number. The array value at the index is the number of grid + cells on the DE in that dimension. + +

+Section 31.3.4 shows an example + of using this method to create a 2D Grid with uniformly spaced + coordinates. This creation method can also be used as the basis for + grids with rectilinear coordinates or curvilinear coordinates. + +

+The arguments are: +

+
[minIndex]
+
Tuple to start the index ranges at. If not present, defaults + to /1,1,1,.../. + +
+
countsPerDEDim1
+
This arrays specifies the number of cells per DE for index dimension 1 + for the exclusive region (the center stagger location). + +
+
countsPerDEDim2
+
This array specifies the number of cells per DE for index dimension 2 + ! for the exclusive region (center stagger location). + +
+
[countsPerDEDim3]
+
This array specifies the number of cells per DE for index dimension 3 + for the exclusive region (center stagger location). + If not specified then grid is 2D. + +
+
[coordSys]
+
The coordinate system of the grid coordinate data. + For a full list of options, please see Section 54.11. + If not specified then defaults to ESMF_COORDSYS_SPH_DEG. + +
+
[coordTypeKind]
+
The type/kind of the grid coordinate data. All numerical types + listed under section 54.61 are supported. + If not specified then defaults to ESMF_TYPEKIND_R8. + +
+
[coordDep1]
+
This array specifies the dependence of the first + coordinate component on the three index dimensions + described by coordsPerDEDim1,2,3. The size of the + array specifies the number of dimensions of the first + coordinate component array. The values specify which + of the index dimensions the corresponding coordinate + arrays map to. If not present the default is 1,2,...,grid rank. + ! +
+
[coordDep2]
+
This array specifies the dependence of the second + coordinate component on the three index dimensions + described by coordsPerDEDim1,2,3. The size of the + array specifies the number of dimensions of the second + coordinate component array. The values specify which + of the index dimensions the corresponding coordinate + arrays map to. If not present the default is 1,2,...,grid rank. + +
+
[coordDep3]
+
This array specifies the dependence of the third + coordinate component on the three index dimensions + described by coordsPerDEDim1,2,3. The size of the + array specifies the number of dimensions of the third + coordinate component array. The values specify which + of the index dimensions the corresponding coordinate + arrays map to. If not present the default is 1,2,...,grid rank. + +
+
[gridEdgeLWidth]
+
The padding around the lower edges of the grid. This padding is between + the index space corresponding to the cells and the boundary of the + the exclusive region. This extra space is to contain the extra + padding for non-center stagger locations, and should be big enough + to hold any stagger in the grid. If this and gridAlign are not present then + defaults to 0, 0, ..., 0 (all zeros). + +
+
[gridEdgeUWidth]
+
The padding around the upper edges of the grid. This padding is between + the index space corresponding to the cells and the boundary of the + the exclusive region. This extra space is to contain the extra + padding for non-center stagger locations, and should be big enough + to hold any stagger in the grid. If this and gridAlign are not present then + defaults to 1, 1, ..., 1 (all ones). + +
+
[gridAlign]
+
Specification of how the stagger locations should align with the cell + index space (can be overridden by the individual staggerAligns). If + the gridEdgeWidths are not specified than this argument + implies the gridEdgeWidths. If the gridEdgeWidths are specified and this argument isn't + then this argument is implied by the gridEdgeWidths. + If this and the gridEdgeWidths are not specified, then defaults to + -1, -1, ..., -1 (all negative ones). + +
+
[gridMemLBound]
+
Specifies the lower index range of the memory of every DE in this Grid. + Only used when indexflag is ESMF_INDEX_USER. May be overridden + by staggerMemLBound. + +
+
[indexflag]
+
Indicates the indexing scheme to be used in the new Grid. Please see + Section 54.29 for the list of options. If not present, + defaults to ESMF_INDEX_DELOCAL. + +
+
[petMap]
+
Sets the mapping of pets to the created DEs. This 3D + should be of size size(countsPerDEDim1) x size(countsPerDEDim2) x + size(countsPerDEDim3). If countsPerDEDim3 isn't present, then + the last dimension is of size 1. + +
+
[name]
+
ESMF_Grid name. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+31.6.22 ESMF_GridCreateNoPeriDim - Create a Grid with no periodic dim and a regular distribution +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_GridCreateNoPeriDim()
+       function ESMF_GridCreateNoPeriDimR(regDecomp, decompFlag, &
+         minIndex, maxIndex,                                     &
+         coordSys, coordTypeKind,                                &
+         coordDep1, coordDep2, coordDep3,                        &
+         gridEdgeLWidth, gridEdgeUWidth, gridAlign,              &
+         gridMemLBound, indexflag, petMap, name, rc)
+
RETURN VALUE: +
       type(ESMF_Grid) :: ESMF_GridCreateNoPeriDimR
+
ARGUMENTS: +
        integer,                   intent(in),  optional :: regDecomp(:)
+        type(ESMF_Decomp_Flag),    intent(in),  optional :: decompflag(:)
+        integer,                   intent(in),  optional :: minIndex(:)
+        integer,                   intent(in)            :: maxIndex(:)
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+        type(ESMF_CoordSys_Flag),  intent(in),  optional :: coordSys
+        type(ESMF_TypeKind_Flag),  intent(in),  optional :: coordTypeKind
+        integer,                   intent(in),  optional :: coordDep1(:)
+        integer,                   intent(in),  optional :: coordDep2(:)
+        integer,                   intent(in),  optional :: coordDep3(:)
+        integer,                   intent(in),  optional :: gridEdgeLWidth(:)
+        integer,                   intent(in),  optional :: gridEdgeUWidth(:)
+        integer,                   intent(in),  optional :: gridAlign(:)
+        integer,                   intent(in),  optional :: gridMemLBound(:)
+        type(ESMF_Index_Flag),     intent(in),  optional :: indexflag
+         integer,                   intent(in),  optional :: petMap(:,:,:)
+        character (len=*),         intent(in),  optional :: name
+        integer,                   intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+This method creates a single tile, regularly distributed grid + (see Figure 13) with no periodic dimension. + To specify the distribution, the user passes in an array + (regDecomp) specifying the number of DEs to divide each + dimension into. The array decompFlag indicates how the division into DEs is to + occur. The default is to divide the range as evenly as possible. Currently this call + only supports creating a 2D or 3D Grid, and thus, for example, maxIndex must be of size 2 or 3. + +

+The arguments are: +

+
[regDecomp]
+
List that has the same number of elements as maxIndex. + Each entry is the number of decounts for that dimension. + If not specified, the default decomposition will be petCountx1x1..x1. + +
+
[decompflag]
+
List of decomposition flags indicating how each dimension of the + tile is to be divided between the DEs. The default setting + is ESMF_DECOMP_BALANCED in all dimensions. Please see + Section 54.14 for a full description of the + possible options. Note that currently the option + ESMF_DECOMP_CYCLIC isn't supported in Grid creation. + +
+
[minIndex]
+
The bottom extent of the grid array. If not given then the value defaults + to /1,1,1,.../. + +
+
maxIndex
+
The upper extent of the grid array. + +
+
[coordSys]
+
The coordinate system of the grid coordinate data. + For a full list of options, please see Section 54.11. + If not specified then defaults to ESMF_COORDSYS_SPH_DEG. + +
+
[coordTypeKind]
+
The type/kind of the grid coordinate data. All numerical types + listed under section 54.61 are supported. + If not specified then defaults to ESMF_TYPEKIND_R8. + +
+
[coordDep1]
+
This array specifies the dependence of the first + coordinate component on the three index dimensions + described by coordsPerDEDim1,2,3. The size of the + array specifies the number of dimensions of the first + coordinate component array. The values specify which + ! of the index dimensions the corresponding coordinate + arrays map to. If not present the default is 1,2,...,grid rank. + +
+
[coordDep2]
+
This array specifies the dependence of the second + coordinate component on the three index dimensions + described by coordsPerDEDim1,2,3. The size of the + array specifies the number of dimensions of the second + coordinate component array. The values specify which + of the index dimensions the corresponding coordinate + arrays map to. If not present the default is 1,2,...,grid rank. + +
+
[coordDep3]
+
This array specifies the dependence of the third + coordinate component on the three index dimensions + described by coordsPerDEDim1,2,3. The size of the + array specifies the number of dimensions of the third + coordinate component array. The values specify which + of the index dimensions the corresponding coordinate + arrays map to. If not present the default is 1,2,...,grid rank. + +
+
[gridEdgeLWidth]
+
The padding around the lower edges of the grid. This padding is between + the index space corresponding to the cells and the boundary of the + the exclusive region. This extra space is to contain the extra + padding for non-center stagger locations, and should be big enough + to hold any stagger in the grid. If this and gridAlign are not present then + defaults to 0, 0, ..., 0 (all zeros). + +
+
[gridEdgeUWidth]
+
The padding around the upper edges of the grid. This padding is between + the index space corresponding to the cells and the boundary of the + the exclusive region. This extra space is to contain the extra + padding for non-center stagger locations, and should be big enough + to hold any stagger in the grid. If this and gridAlign are not present then + defaults to 1, 1, ..., 1 (all ones). + +
+
[gridAlign]
+
Specification of how the stagger locations should align with the cell + index space (can be overridden by the individual staggerAligns). If + the gridEdgeWidths are not specified than this argument + implies the gridEdgeWidths. If the gridEdgeWidths are specified and this argument isn't + then this argument is implied by the gridEdgeWidths. + If this and the gridEdgeWidths are not specified, then defaults to + -1, -1, ..., -1 (all negative ones). + +
+
[gridMemLBound]
+
Specifies the lower index range of the memory of every DE in this Grid. + Only used when indexflag is ESMF_INDEX_USER. May be overridden + by staggerMemLBound. + +
+
[indexflag]
+
Indicates the indexing scheme to be used in the new Grid. Please see + Section 54.29 for the list of options. If not present, + defaults to ESMF_INDEX_DELOCAL. + +
+
[petMap]
+
Sets the mapping of pets to the created DEs. This 3D + ! should be of size regDecomp(1) x regDecomp(2) x regDecomp(3) + If the Grid is 2D, then the last dimension is of size 1. + +
+
[name]
+
ESMF_Grid name. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+31.6.23 ESMF_GridCreateNoPeriDim - Create a Grid with no periodic dim and an arbitrary distribution +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_GridCreateNoPeriodic()
+       function ESMF_GridCreateNoPeriDimA(minIndex, maxIndex, &
+         arbIndexCount, arbIndexList,                         &
+         coordSys, coordTypeKind,                             &
+         coordDep1, coordDep2, coordDep3,                     &
+         distDim, name, rc)
+
RETURN VALUE: +
        type(ESMF_Grid) :: ESMF_GridCreateNoPeriDimA
+
ARGUMENTS: +
        integer,                   intent(in),  optional :: minIndex(:)
+        integer,                   intent(in)            :: maxIndex(:)
+        integer,                   intent(in)                    :: arbIndexCount
+        integer,                   intent(in)            :: arbIndexList(:,:)
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+        type(ESMF_CoordSys_Flag),  intent(in),  optional :: coordSys
+        type(ESMF_TypeKind_Flag),  intent(in),  optional :: coordTypeKind
+        integer,                   intent(in),  optional :: coordDep1(:)
+        integer,                   intent(in),  optional :: coordDep2(:)
+        integer,                   intent(in),  optional :: coordDep3(:)
+        integer,                   intent(in),  optional :: distDim(:)
+        character (len=*),         intent(in),  optional :: name
+        integer,                   intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+This method creates a single tile, arbitrarily distributed grid + (see Figure 13) with no periodic dimension. + To specify the arbitrary distribution, the user passes in an 2D array + of local indices, where the first dimension is the number of local grid cells + specified by localArbIndexCount and the second dimension is the number of distributed + dimensions. + +

+distDim specifies which grid dimensions are arbitrarily distributed. The + size of distDim has to agree with the size of the second dimension of + localArbIndex. + +

+Currently this call + only supports creating a 2D or 3D Grid, and thus, for example, maxIndex must be of size 2 or 3. + +

+The arguments are: +

+
[minIndex]
+
Tuple to start the index ranges at. If not present, defaults + to /1,1,1,.../. + +
+
maxIndex
+
The upper extend of the grid index ranges. + +
+
arbIndexCount
+
The number of grid cells in the local DE. It is okay to have 0 + grid cell in a local DE. + +
+
arbIndexList
+
! This 2D array specifies the indices of the PET LOCAL grid cells. The + dimensions should be arbIndexCount * number of Distributed grid dimensions + ! where arbIndexCount is the input argument specified below + +
+
[coordSys]
+
The coordinate system of the grid coordinate data. + For a full list of options, please see Section 54.11. + If not specified then defaults to ESMF_COORDSYS_SPH_DEG. + +
+
[coordTypeKind]
+
The type/kind of the grid coordinate data. All numerical types + listed under section 54.61 are supported. + If not specified then defaults to ESMF_TYPEKIND_R8. + +
+
[coordDep1]
+
The size of the array specifies the number of dimensions of the + first coordinate component array. The values specify which + of the index dimensions the corresponding coordinate + arrays map to. The format should be /ESMF_DIM_ARB/ where + /ESMF_DIM_ARB/ is mapped to the collapsed 1D dimension from all + the arbitrarily distributed dimensions. n is the dimension that + is not distributed (if exists). + If not present the default is /ESMF_DIM_ARB/ if the first dimension + is arbitararily distributed, or /n/ if not distributed (i.e. n=1) + Please see Section 54.2 for a definition of ESMF_DIM_ARB. + +
+
[coordDep2]
+
The size of the array specifies the number of dimensions of the + second coordinate component array. The values specify which + of the index dimensions the corresponding coordinate + arrays map to. The format should be /ESMF_DIM_ARB/ where + /ESMF_DIM_ARB/ is mapped to the collapsed 1D dimension from all + the arbitrarily distributed dimensions. n is the dimension that + is not distributed (if exists). + If not present the default is /ESMF_DIM_ARB/ if this dimension + is arbitararily distributed, or /n/ if not distributed (i.e. n=2) + Please see Section 54.2 for a definition of ESMF_DIM_ARB. + +
+
[coordDep3]
+
The size of the array specifies the number of dimensions of the + third coordinate component array. The values specify which + of the index dimensions the corresponding coordinate + arrays map to. The format should be /ESMF_DIM_ARB/ where + /ESMF_DIM_ARB/ is mapped to the collapsed 1D dimension from all + the arbitrarily distributed dimensions. n is the dimension that + is not distributed (if exists). + If not present the default is /ESMF_DIM_ARB/ if this dimension + is arbitararily distributed, or /n/ if not distributed (i.e. n=3) + Please see Section 54.2 for a definition of ESMF_DIM_ARB. + +
+
[distDim]
+
This array specifies which dimensions are arbitrarily distributed. + ! The size of the array specifies the total distributed dimensions. + if not specified, defaults is all dimensions will be arbitrarily + distributed. The size has to agree with the size of the second + dimension of localArbIndex. + +
+
[name]
+
ESMF_Grid name. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+31.6.24 ESMF_GridCreate1PeriDimUfrm - Create a uniform Grid with one periodic dim and a regular distribution +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_GridCreate1PeriDimUfrm()
+       function ESMF_GridCreate1PeriDimUfrmR(minIndex, maxIndex, &
+            minCornerCoord, maxCornerCoord, &
+            regDecomp, decompFlag, &
+            polekindflag, coordSys, staggerLocList, &
+            ignoreNonPeriCoord, petMap, name, rc)
+
RETURN VALUE: +
        type(ESMF_Grid) :: ESMF_GridCreate1PeriDimUfrmR
+
ARGUMENTS: +
        integer,                   intent(in),  optional :: minIndex(:)
+        integer,                   intent(in)            :: maxIndex(:)
+        real(ESMF_KIND_R8),        intent(in)            :: minCornerCoord(:)
+        real(ESMF_KIND_R8),        intent(in)            :: maxCornerCoord(:)
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+        integer,                   intent(in),  optional :: regDecomp(:)
+        type(ESMF_Decomp_Flag),    intent(in),  optional :: decompflag(:)
+        type(ESMF_PoleKind_Flag),  intent(in),  optional :: polekindflag(2)
+        type(ESMF_CoordSys_Flag),  intent(in),  optional :: coordSys
+        type(ESMF_StaggerLoc),     intent(in),  optional :: staggerLocList(:)
+        logical,                   intent(in),  optional :: ignoreNonPeriCoord
+        integer,                   intent(in),  optional :: petMap(:,:,:)
+        character (len=*),         intent(in),  optional :: name
+        integer,                   intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+This method creates a single tile, regularly distributed grid + (see Figure 13) with one periodic dimension. + The periodic dimension in the resulting grid will be dimension 1. + The dimension with the poles at either end (i.e. the pole dimension) + will be dimension 2. + +

+The grid will have its coordinates uniformly spread between the + ranges specified by the user. The coordinates are ESMF_TYPEKIND_R8. + Currently, this method only fills the center stagger with coordinates, and + the minCornerCoord and maxCornerCoord arguments give the boundaries of + the center stagger. + +

+To specify the distribution, the user passes in an array + (regDecomp) specifying the number of DEs to divide each + dimension into. The array decompFlag indicates how the division into DEs is to + occur. The default is to divide the range as evenly as possible. Currently this call + only supports creating a 2D or 3D Grid, and thus, for example, maxIndex must be of size 2 or 3. + +

+The following arguments have been set to non-typical values and so + there is a reasonable possibility that they may change in the future + to be inconsistent with other Grid create interfaces: + +

+The arguments coordDep1, coordDep2, and coordDep3 have internally + been set to 1, 2, and 3 respectively. + This was done because this call creates a uniform grid and so only 1D arrays + are needed to hold the coordinates. This means the coordinate arrays + will be 1D. + +

+The argument indexFlag has internally been set to ESMF_INDEX_GLOBAL. This + means that the grid created from this function will have a global index space. + +

+The arguments are: +

+
[minIndex]
+
The bottom extent of the grid array. If not given then the value defaults + to /1,1,1,.../. + +
+
maxIndex
+
The upper extent of the grid array. + +
+
minCornerCoord
+
The coordinates of the corner of the grid that corresponds to minIndex. + size(minCornerCoord) must be equal to size(maxIndex). + +
+
maxCornerCoord
+
The coordinates of the corner of the grid that corresponds to maxIndex. + size(maxCornerCoord) must be equal to size(maxIndex). + +
+
[regDecomp]
+
A ndims-element array specifying how the grid is decomposed. + Each entry is the number of decounts for that dimension. + +
+
[decompflag]
+
List of decomposition flags indicating how each dimension of the + tile is to be divided between the DEs. The default setting + is ESMF_DECOMP_BALANCED in all dimensions. Please see + Section 54.14 for a full description of the + possible options. Note that currently the option + ESMF_DECOMP_CYCLIC isn't supported in Grid creation. + +
+
[polekindflag]
+
Two item array which specifies the type of connection which occurs at the pole. The value in polekindflag(1) + specifies the connection that occurs at the minimum end of the pole dimension. The value in polekindflag(2) + specifies the connection that occurs at the maximum end of the pole dimension. Please see + Section 31.2.5 for a full list of options. If not specified, + the default is ESMF_POLEKIND_MONOPOLE for both. + +
+
[coordSys]
+
The coordinate system of the grid coordinate data. + For a full list of options, please see Section 54.11. + If not specified then defaults to ESMF_COORDSYS_SPH_DEG. + +
+
[staggerLocList]
+
The list of stagger locations to fill with coordinates. Please see Section 31.2.6 + for a description of the available stagger locations. If not present, then + no staggers are added or filled. + +
+
[ignoreNonPeriCoord]
+
If .true., do not check if the coordinates for the periodic dimension (i.e. dim=1) specify a full periodic range (e.g. 0 to 360 degrees). + If not specified, defaults to .false. . + +
+
[petMap]
+
Sets the mapping of pets to the created DEs. This 3D + should be of size regDecomp(1) x regDecomp(2) x regDecomp(3) + If the Grid is 2D, then the last dimension is of size 1. + +
+
[name]
+
ESMF_Grid name. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+31.6.25 ESMF_GridCreate1PeriDimUfrm - Create a uniform Grid with one periodic dim and a block distribution +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_GridCreate1PeriDimUfrm()
+   function ESMF_GridCreate1PeriDimUfrmB(minIndex, maxIndex, &
+             minCornerCoord, maxCornerCoord, &
+             deBlockList, deLabelList, &
+             polekindflag, coordSys, staggerLocList, &
+             ignoreNonPeriCoord, petMap, name, rc)
+
RETURN VALUE: +
     type(ESMF_Grid) :: ESMF_GridCreate1PeriDimUfrmB
+
ARGUMENTS: +
     integer,                   intent(in),  optional :: minIndex(:)
+     integer,                   intent(in)            :: maxIndex(:)
+     real(ESMF_KIND_R8),        intent(in)            :: minCornerCoord(:)
+     real(ESMF_KIND_R8),        intent(in)            :: maxCornerCoord(:)
+     integer,                   intent(in)            :: deBlockList(:,:,:)
+     integer,                   intent(in),  optional :: deLabelList(:)
+     type(ESMF_PoleKind_Flag),  intent(in),  optional :: polekindflag(2)
+     type(ESMF_CoordSys_Flag),  intent(in),  optional :: coordSys
+     type(ESMF_StaggerLoc),     intent(in),  optional :: staggerLocList(:)
+     logical,                   intent(in),  optional :: ignoreNonPeriCoord
+     integer,                   intent(in),  optional :: petMap(:,:,:)
+     character (len=*),         intent(in),  optional :: name
+     integer,                   intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+This method creates a single tile, regularly distributed grid + (see Figure 13) with one periodic dimension. + The periodic dimension in the resulting grid will be dimension 1. + The dimension with the poles at either end (i.e. the pole dimension) + will be dimension 2. + +

+The grid will have its coordinates uniformly spread between the + ranges specified by the user. The coordinates are ESMF_TYPEKIND_R8. + Currently, this method only fills the center stagger with coordinates, and + the minCornerCoord and maxCornerCoord arguments give the boundaries of + the center stagger. + +

+To specify the distribution, the user passes in an array + (deBlockList) specifying index space blocks for each DE. + +

+The following arguments have been set to non-typical values and so + there is a reasonable possibility that they may change in the future + to be inconsistent with other Grid create interfaces: + +

+The arguements coordDep1, coordDep2, and coordDep3 have internally + been set to 1, 2, and 3 respectively. + This was done because this call creates a uniform grid and so only 1D arrays + are needed to hold the coordinates. This means the coordinate arrays + will be 1D. + +

+The argument indexFlag has internally been set to ESMF_INDEX_GLOBAL. This + means that the grid created from this function will have a global index space. + +

+The arguments are: +

+
[minIndex]
+
The bottom extent of the grid array. If not given then the value defaults + to /1,1,1,.../. + +
+
maxIndex
+
The upper extent of the grid array. + +
+
minCornerCoord
+
The coordinates of the corner of the grid that corresponds to minIndex. + size(minCornerCoord) must be equal to size(maxIndex). + +
+
maxCornerCoord
+
The coordinates of the corner of the grid that corresponds to maxIndex. + size(maxCornerCoord) must be equal to size(maxIndex). + +
+
deBlockList
+
List of DE-local LR blocks. The third index of deBlockList + steps through the deBlock elements, which are defined by the first + two indices. The first index must be of size dimCount and the + second index must be of size 2. Each 2D element of deBlockList + defined by the first two indices hold the following information. +
+                 +---------------------------------------> 2nd index
+                 |    1               2
+                 | 1  minIndex(1)    maxIndex(1)
+                 | 2  minIndex(2)    maxIndex(2)
+                 | .  minIndex(.)    maxIndex(.)
+                 | .
+                 v
+                1st index
+
+ It is required that there be no overlap between the LR segments + defined by deBlockList. + +
+
[deLabelList]
+
List assigning DE labels to the default sequence of DEs. The default + sequence is given by the order of DEs in the deBlockList + argument. + +
+
[polekindflag]
+
Two item array which specifies the type of connection which occurs at the pole. The value in polekindflag(1) + specifies the connection that occurs at the minimum end of the pole dimension. The value in polekindflag(2) + specifies the connection that occurs at the maximum end of the pole dimension. Please see + Section 31.2.5 for a full list of options. If not specified, + the default is ESMF_POLEKIND_MONOPOLE for both. + +
+
[coordSys]
+
The coordinate system of the grid coordinate data. + For a full list of options, please see Section 54.11. + If not specified then defaults to ESMF_COORDSYS_SPH_DEG. + +
+
[staggerLocList]
+
The list of stagger locations to fill with coordinates. Please see Section 31.2.6 + for a description of the available stagger locations. If not present, then + no staggers are added or filled. + +
+
[ignoreNonPeriCoord]
+
If .true., do not check if the coordinates for the periodic dimension (i.e. dim=1) specify a full periodic range (e.g. 0 to 360 degrees). + If not specified, defaults to .false. . + +
+
[petMap]
+
Sets the mapping of pets to the created DEs. This 3D + should be of size regDecomp(1) x regDecomp(2) x regDecomp(3) + If the Grid is 2D, then the last dimension is of size 1. + +
+
[name]
+
ESMF_Grid name. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+31.6.26 ESMF_GridCreateNoPeriDimUfrm - Create a uniform Grid with no periodic dim and a regular distribution +

+ +

+ +

+
+INTERFACE: +

  ! Private name; call using ESMF_GridCreateNoPeriDimUfrm()
+       function ESMF_GridCreateNoPeriDimUfrmR(minIndex, maxIndex, &
+         minCornerCoord, maxCornerCoord, &
+         regDecomp, decompFlag, &
+         coordSys, staggerLocList, petMap, name, rc)
+
RETURN VALUE: +
       type(ESMF_Grid) :: ESMF_GridCreateNoPeriDimUfrmR
+
ARGUMENTS: +
        integer,                   intent(in),  optional :: minIndex(:)
+        integer,                   intent(in)            :: maxIndex(:)
+        real(ESMF_KIND_R8),        intent(in)            :: minCornerCoord(:)
+        real(ESMF_KIND_R8),        intent(in)            :: maxCornerCoord(:)
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+        integer,                   intent(in),  optional :: regDecomp(:)
+        type(ESMF_Decomp_Flag),    intent(in),  optional :: decompflag(:)
+        type(ESMF_CoordSys_Flag),  intent(in),  optional :: coordSys
+        type(ESMF_StaggerLoc),     intent(in),  optional :: staggerLocList(:)
+        integer,                   intent(in),  optional :: petMap(:,:,:)
+        character (len=*),         intent(in),  optional :: name
+        integer,                   intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+This method creates a single tile, regularly distributed grid + (see Figure 13) with no periodic dimension. + +

+The resulting grid will have its coordinates uniformly spread between the + ranges specified by the user. The coordinates are ESMF_TYPEKIND_R8. + Currently, this method only fills the center stagger with coordinates, and + the minCornerCoord and maxCornerCoord arguments give the boundaries of + the center stagger. + +

+To specify the distribution, the user passes in an array + (regDecomp) specifying the number of DEs to divide each + dimension into. The array decompFlag indicates how the division into DEs is to + occur. The default is to divide the range as evenly as possible. Currently this call + only supports creating a 2D or 3D Grid, and thus, for example, maxIndex must be of size 2 or 3. + +

+The following arguments have been set to non-typical values and so + there is a reasonable possibility that they may change in the future + to be inconsistent with other Grid create interfaces: + +

+The arguements coordDep1, coordDep2, and coordDep3 have internally + been set to 1, 2, and 3 respectively. + This was done because this call creates a uniform grid and so only 1D arrays + are needed to hold the coordinates. This means the coordinate arrays + will be 1D. + +

+The argument indexFlag has internally been set to ESMF_INDEX_GLOBAL. This + means that the grid created from this function will have a global index space. + +

+The arguments are: +

+
[minIndex]
+
The bottom extent of the grid array. If not given then the value defaults + to /1,1,1,.../. + +
+
maxIndex
+
The upper extent of the grid array. + +
+
minCornerCoord
+
The coordinates of the corner of the grid that corresponds to minIndex. + size(minCornerCoord) must be equal to size(maxIndex). + +
+
maxCornerCoord
+
The coordinates of the corner of the grid that corresponds to maxIndex. + size(maxCornerCoord) must be equal to size(maxIndex). + +
+
[regDecomp]
+
A ndims-element array specifying how the grid is decomposed. + Each entry is the number of decounts for that dimension. + +
+
[decompflag]
+
List of decomposition flags indicating how each dimension of the + tile is to be divided between the DEs. The default setting + is ESMF_DECOMP_BALANCED in all dimensions. Please see + Section 54.14 for a full description of the + possible options. Note that currently the option + ESMF_DECOMP_CYCLIC isn't supported in Grid creation. + +
+
[coordSys]
+
The coordinate system of the grid coordinate data. + For a full list of options, please see Section 54.11. + If not specified then defaults to ESMF_COORDSYS_SPH_DEG. + +
+
[staggerLocList]
+
The list of stagger locations to fill with coordinates. Please see Section 31.2.6 + for a description of the available stagger locations. If not present, then + no staggers are added or filled. + +
+
[petMap]
+
Sets the mapping of pets to the created DEs. This 3D + should be of size regDecomp(1) x regDecomp(2) x regDecomp(3) + If the Grid is 2D, then the last dimension is of size 1. + +
+
[name]
+
ESMF_Grid name. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+31.6.27 ESMF_GridCreateCubedSphere - Create a multi-tile cubed sphere Grid with regular decomposition +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_GridCreateCubedSphere()
+   function ESMF_GridCreateCubedSphereReg(tileSize,&
+        regDecompPTile, decompflagPTile,                            &
+        coordSys, coordTypeKind,                                    &
+        deLabelList, staggerLocList,                                &
+        delayout, indexflag, name, transformArgs, coordCalcFlag,    &
+        rc)
+
RETURN VALUE: +
     type(ESMF_Grid) :: ESMF_GridCreateCubedSphereReg
+
ARGUMENTS: +
     integer,                        intent(in)            :: tilesize
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,                        intent(in),  optional :: regDecompPTile(:,:)
+     type(ESMF_Decomp_Flag), target, intent(in),  optional :: decompflagPTile(:,:)
+     type(ESMF_CoordSys_Flag),       intent(in),  optional :: coordSys
+     type(ESMF_TypeKind_Flag),       intent(in),  optional :: coordTypeKind
+     integer,                        intent(in),  optional :: deLabelList(:)
+     type(ESMF_StaggerLoc),          intent(in),  optional :: staggerLocList(:)
+     type(ESMF_DELayout),            intent(in),  optional :: delayout
+     type(ESMF_Index_Flag),          intent(in),  optional :: indexflag
+     character(len=*),               intent(in),  optional :: name
+     type(ESMF_CubedSphereTransform_Args), intent(in),  optional :: transformArgs
+     type(ESMF_CubedSphereCalc_Flag),intent(in),  optional :: coordCalcFlag           
+     integer,                        intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Create a six-tile ESMF_Grid for a Cubed Sphere grid using regular decomposition. Each tile can + have different decomposition. The grid coordinates are generated based on the algorithm used by GEOS-5, + The tile resolution is defined by tileSize. + +

+The arguments are: +

+
tilesize
+
The number of elements on each side of the tile of the Cubed Sphere grid. + +
+
[regDecompPTile]
+
List of DE counts for each dimension. The second index steps through + the tiles. The total deCount is determined as the sum over + the products of regDecompPTile elements for each tile. + By default every tile is decomposed in the same way. If the total + PET count is less than 6, one tile will be assigned to one DE and the DEs + will be assigned to PETs sequentially, therefore, some PETs may have + more than one DE. If the total PET count is greater than 6, the total + number of DEs will be a multiple of 6 and less than or equal to the total + PET count. For instance, if the total PET count is 16, the total DE count + will be 12 with each tile decomposed into 1x2 blocks. The 12 DEs are mapped + to the first 12 PETs and the remaining 4 PETs have no DEs locally, unless + an optional delayout is provided. + +
+
[decompflagPTile]
+
List of decomposition flags indicating how each dimension of each + tile is to be divided between the DEs. The default setting + is ESMF_DECOMP_BALANCED in all dimensions for all tiles. + See section 54.14 for a list of valid decomposition + flag options. The second index indicates the tile number. + +
+
[deLabelList]
+
List assigning DE labels to the default sequence of DEs. The default + sequence is given by the column major order of the regDecompPTile + elements in the sequence as they appear following the tile index. + +
+
[staggerLocList]
+
The list of stagger locations to fill with coordinates. Only ESMF_STAGGERLOC_CENTER + and ESMF_STAGGERLOC_CORNER are supported. If not present, no coordinates + will be added or filled. + +
+
[coordSys]
+
The coordinate system of the grid coordinate data. + Only ESMF_COORDSYS_SPH_DEG and ESMF_COORDSYS_SPH_RAD are supported. + If not specified then defaults to ESMF_COORDSYS_SPH_DEG. + +
+
[coordTypeKind]
+
The type/kind of the grid coordinate data. Only ESMF_TYPEKIND_R4 + and ESMF_TYPEKIND_R8 are supported. + If not specified then defaults to ESMF_TYPEKIND_R8. + +
+
[delayout]
+
Optional ESMF_DELayout object to be used. By default a new + DELayout object will be created with as many DEs as there are PETs, + or tiles, which ever is greater. If a DELayout object is specified, + the number of DEs must match regDecompPTile, if present. In the + case that regDecompPTile was not specified, the deCount + must be at least that of the default DELayout. The + regDecompPTile will be constructed accordingly. + +
+
[indexflag]
+
Indicates the indexing scheme to be used in the new Grid. Please see + section 54.29 for the list of options. If not present, + defaults to ESMF_INDEX_DELOCAL. + +
+
[name]
+
ESMF_Grid name. + +
+
[transformArgs]
+
A data type containing the stretch factor, target longitude, and target latitude + to perform a Schmidt transformation on the Cubed-Sphere grid. + 31.3.11 for details. + +
+
[coordCalcFlag]
+
A flag which controls the method used to calculate the cubed sphere coordinates. + Please see section 54.12 for a list of options. If not set, + defaults to ESMF_CUBEDSPHERECALC_1TILE which was the original method used + to calculate coordinates. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+31.6.28 ESMF_GridCreateCubedSphere - Create a multi-tile cubed sphere Grid with irregular decomposition +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_GridCreateCubedSphere()
+   function ESMF_GridCreateCubedSphereIReg(tileSize,              &
+         countsPerDEDim1PTile, countsPerDEDim2PTile,              &
+                                                 &        
+         coordSys, coordTypeKind,                                 &
+         deLabelList, staggerLocList,                             &
+         delayout, indexflag, name, transformArgs, coordCalcFlag, &
+         rc)
+
RETURN VALUE: +
     type(ESMF_Grid) :: ESMF_GridCreateCubedSphereIReg
+
ARGUMENTS: +
     integer,                        intent(in)            :: tilesize
+     integer,                        intent(in)            :: countsPerDEDim1PTile(:,:)
+     integer,                        intent(in)            :: countsPerDEDim2PTile(:,:)
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     type(ESMF_CoordSys_Flag),       intent(in),  optional :: coordSys
+     type(ESMF_TypeKind_Flag),       intent(in),  optional :: coordTypeKind
+     integer,                        intent(in),  optional :: deLabelList(:)
+     type(ESMF_StaggerLoc),          intent(in),  optional :: staggerLocList(:)
+     type(ESMF_DELayout),            intent(in),  optional :: delayout
+     type(ESMF_Index_Flag),          intent(in),  optional :: indexflag
+     character(len=*),               intent(in),  optional :: name
+     type(ESMF_CubedSphereTransform_Args), intent(in),  optional :: transformArgs
+     type(ESMF_CubedSphereCalc_Flag),intent(in),  optional :: coordCalcFlag           
+     integer,                        intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Create a six-tile ESMF_Grid for a Cubed Sphere grid using irregular decomposition. Each tile can + have different decomposition. The grid coordinates are generated based on the algorithm used by GEOS-5, + The tile resolution is defined by tileSize. + +

+The arguments are: +

+
tilesize
+
The number of elements on each side of the tile of the Cubed Sphere grid. + +
+
countsPerDEDim1PTile
+
This array specifies the number of cells per DE for index dimension 1 for the + center stagger location. The second index steps through the tiles. If each tile is + decomposed into different number of DEs, the first dimension is the maximal DEs of + all the tiles. + +
+
countsPerDEDim2PTile
+
This array specifies the number of cells per DE for index dimension 2 for the + center stagger location. The second index steps through the tiles. If each tile is + decomposed into different number of DEs, the first dimension is the maximal DEs of + all the tiles. + +
+
[coordSys]
+
The coordinate system of the grid coordinate data. + Only ESMF_COORDSYS_SPH_DEG and ESMF_COORDSYS_SPH_RAD are supported. + If not specified then defaults to ESMF_COORDSYS_SPH_DEG. + +
+
[coordTypeKind]
+
The type/kind of the grid coordinate data. Only ESMF_TYPEKIND_R4 + and ESMF_TYPEKIND_R8 are supported. + If not specified then defaults to ESMF_TYPEKIND_R8. + +
+
[deLabelList]
+
List assigning DE labels to the default sequence of DEs. The default + sequence is given by the column major order in the sequence as they appear + in countsPerDEDim1PTile, followed by countsPerDEDim2PTile, then the + tile index. + +
+
[staggerLocList]
+
The list of stagger locations to fill with coordinates. Only ESMF_STAGGERLOC_CENTER + and ESMF_STAGGERLOC_CORNER are supported. If not present, no coordinates + will be added or filled. + +
+
[delayout]
+
Optional ESMF_DELayout object to be used. If a delayout object is specified, + the number of DEs must match with the total DEs defined in countsPerDEDim1PTile + and countsPerDEDim2PTile. + +
+
[indexflag]
+
Indicates the indexing scheme to be used in the new Grid. Please see + Section 54.29 for the list of options. If not present, + defaults to ESMF_INDEX_DELOCAL. + +
+
[name]
+
ESMF_Grid name. + +
+
[transformArgs]
+
A data type containing the stretch factor, target longitude, and target latitude + to perform a Schmidt transformation on the Cubed-Sphere grid. See section + 31.3.11 for details. + +
+
[coordCalcFlag]
+
A flag which controls the method used to calculate the cubed sphere coordinates. + Please see section 54.12 for a list of options. If not set, + defaults to ESMF_CUBEDSPHERECALC_1TILE which was the original method used + to calculate coordinates. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+31.6.29 ESMF_GridCreateMosaic - Create a multi-tile Grid object with regular decomposition using the grid definition from a GRIDSPEC Mosaic file. +

+ +

+ +

+
+INTERFACE: +

   function ESMF_GridCreateMosaicReg(filename,regDecompPTile, decompflagPTile, &
+         coordTypeKind, deLabelList, staggerLocList, delayout, indexflag, name, tileFilePath, rc)
+
RETURN VALUE: +
     type(ESMF_Grid) :: ESMF_GridCreateMosaicReg
+
ARGUMENTS: +
     character(len=*),               intent(in)            :: filename
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,                        intent(in),  optional :: regDecompPTile(:,:)
+     type(ESMF_Decomp_Flag), target, intent(in),  optional :: decompflagPTile(:,:)
+     type(ESMF_TypeKind_Flag),       intent(in),  optional :: coordTypeKind
+     integer,                        intent(in),  optional :: deLabelList(:)
+     type(ESMF_StaggerLoc),          intent(in),  optional :: staggerLocList(:)
+     type(ESMF_DELayout),            intent(in),  optional :: delayout
+     type(ESMF_Index_Flag),          intent(in),  optional :: indexflag
+     character(len=*),               intent(in),  optional :: name
+     character(len=*),               intent(in),  optional :: tileFilePath
+     integer,                        intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Create a multiple-tile ESMF_Grid based on the definition from a GRIDSPEC Mosaic file and its associated + tile files using regular decomposition. Each tile can have different decomposition. The tile connections + are defined in a GRIDSPEC format Mosaic file. + And each tile's coordination is defined in a separate NetCDF file. The coordinates defined + in the tile file is so-called "Super Grid". In other words, the dimensions of the coordinate variables are + (2*xdim+1, 2*ydim+1) if (xdim, ydim) is the size of the tile. The Super Grid combines the corner, + the edge and the center coordinates in one big array. A Mosaic file may contain just one tile. If a Mosaic contains + multiple tiles. Each tile is a logically rectangular lat/lon grid. Currently, all the tiles have to be the same size. + We will remove this limitation in the future release. + +

+The arguments are: +

+
filename
+
The name of the GRIDSPEC Mosaic file. + +
+
[regDecompPTile]
+
List of DE counts for each dimension. The second index steps through + the tiles. The total deCount is determined as the sum over + the products of regDecompPTile elements for each tile. + By default every tile is decomposed in the same way. If the total + PET count is less than the tile count, one tile will be assigned to one DE and the DEs + will be assigned to PETs sequentially, therefore, some PETs may have + more than one DE. If the total PET count is greater than the tile count, the total + number of DEs will be a multiple of the tile count and less than or equal to the total + PET count. For instance, if the total PET count is 16 and the tile count is 6, the total DE count + will be 12 with each tile decomposed into 1x2 blocks. The 12 DEs are mapped + to the first 12 PETs and the remaining 4 PETs have no DEs locally, unless + an optional delayout is provided. + +
+
[decompflagPTile]
+
List of decomposition flags indicating how each dimension of each + tile is to be divided between the DEs. The default setting + is ESMF_DECOMP_BALANCED in all dimensions for all tiles. + See section 54.14 for a list of valid decomposition + flag options. The second index indicates the tile number. + +
+
[coordTypeKind]
+
The type/kind of the grid coordinate data. Only ESMF_TYPEKIND_R4 + and ESMF_TYPEKIND_R8 are supported. + If not specified then defaults to ESMF_TYPEKIND_R8. + +
+
[deLabelList]
+
List assigning DE labels to the default sequence of DEs. The default + sequence is given by the column major order of the regDecompPTile + elements in the sequence as they appear following the tile index. + +
+
[staggerLocList]
+
The list of stagger locations to fill with coordinates. Please see Section 31.2.6 + for a description of the available stagger locations. If not present, no coordinates + will be added or filled. + +
+
[delayout]
+
Optional ESMF_DELayout object to be used. By default a new + DELayout object will be created with as many DEs as there are PETs, + or tiles, which ever is greater. If a DELayout object is specified, + the number of DEs must match regDecompPTile, if present. In the + case that regDecompPTile was not specified, the deCount + must be at least that of the default DELayout. The + regDecompPTile will be constructed accordingly. + +
+
[indexflag]
+
Indicates the indexing scheme to be used in the new Grid. Please see + Section 54.29 for the list of options. If not present, + defaults to ESMF_INDEX_DELOCAL. + +
+
[name]
+
ESMF_Grid name. + +
+
[tileFilePath]
+
Optional argument to define the path where the tile files reside. If it + is given, it overwrites the path defined in gridlocation variable + in the mosaic file. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+31.6.30 ESMF_GridCreateMosaic - Create a multi-tile Grid object with irregular decomposition using the grid definition from a GRIDSPEC Mosaic file. +

+ +

+ +

+
+INTERFACE: +

   function ESMF_GridCreateMosaicIReg(filename,                  &
+           countsPerDEDim1PTile, countsPerDEDim2PTile,           &
+                                                &
+           coordTypeKind,                                        &
+           deLabelList, staggerLocList,                          &
+           delayout, indexflag, name, tileFilePath, rc)
+
RETURN VALUE: +
     type(ESMF_Grid) :: ESMF_GridCreateMosaicIReg
+
ARGUMENTS: +
     character(len=*),               intent(in)            :: filename
+     integer,                        intent(in)            :: countsPerDEDim1PTile(:,:)
+     integer,                        intent(in)            :: countsPerDEDim2PTile(:,:)
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     type(ESMF_TypeKind_Flag),       intent(in),  optional :: coordTypeKind
+     integer,                        intent(in),  optional :: deLabelList(:)
+     type(ESMF_StaggerLoc),          intent(in),  optional :: staggerLocList(:)
+     type(ESMF_DELayout),            intent(in),  optional :: delayout
+     type(ESMF_Index_Flag),          intent(in),  optional :: indexflag
+     character(len=*),               intent(in),  optional :: name
+     character(len=*),               intent(in),  optional :: tileFilePath
+     integer,                        intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Create a multiple-tile ESMF_Grid based on the definition from a GRIDSPEC Mosaic file and its associated + tile files using irregular decomposition. Each tile can have different decomposition. The tile connections + are defined in a GRIDSPEC format Mosaic file. + And each tile's coordination is defined in a separate NetCDF file. The coordinates defined + in the tile file is so-called "Super Grid". In other words, the dimensions of the coordinate variables are + (2*xdim+1, 2*ydim+1) if (xdim, ydim) is the size of the tile. The Super Grid combines the corner, + the edge and the center coordinates in one big array. A Mosaic file may contain just one tile. If a Mosaic contains + multiple tiles. Each tile is a logically rectangular lat/lon grid. Currently, all the tiles have to be the same size. + We will remove this limitation in the future release. + +

+The arguments are: +

+
filename
+
The name of the GRIDSPEC Mosaic file. + +
+
countsPerDEDim1PTile
+
This array specifies the number of cells per DE for index dimension 1 for the + center stagger location. The second index steps through the tiles. If each tile is + decomposed into different number of DEs, the first dimension is the maximal DEs of + all the tiles. + +
+
countsPerDEDim2PTile
+
This array specifies the number of cells per DE for index dimension 2 for the + center stagger location. The second index steps through the tiles. If each tile is + decomposed into different number of DEs, the first dimension is the maximal DEs of + all the tiles. + +
+
[coordTypeKind]
+
The type/kind of the grid coordinate data. Only ESMF_TYPEKIND_R4 + and ESMF_TYPEKIND_R8 are supported. + If not specified then defaults to ESMF_TYPEKIND_R8. + +
+
[deLabelList]
+
List assigning DE labels to the default sequence of DEs. The default + sequence is given by the column major order in the sequence as they appear + in countsPerDEDim1PTile, followed by countsPerDEDim2PTile, then the + tile index. + +
+
[staggerLocList]
+
The list of stagger locations to fill with coordinates. Please see Section 31.2.6 + for a description of the available stagger locations. If not present, no coordinates + will be added or filled. + +
+
[delayout]
+
Optional ESMF_DELayout object to be used. If a delayout object is specified, + the number of DEs must match with the total DEs defined in countsPerDEDim1PTile + and countsPerDEDim2PTile. + +
+
[indexflag]
+
Indicates the indexing scheme to be used in the new Grid. Please see + Section 54.29 for the list of options. If not present, + defaults to ESMF_INDEX_DELOCAL. + +
+
[name]
+
ESMF_Grid name. + +
+
[tileFilePath]
+
Optional argument to define the path where the tile files reside. If it + is given, it overwrites the path defined in gridlocation variable + in the mosaic file. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+31.6.31 ESMF_GridDestroy - Release resources associated with a Grid +

+ +

+ +

+
+INTERFACE: +

       subroutine ESMF_GridDestroy(grid, noGarbage, rc)
+
ARGUMENTS: +
       type(ESMF_Grid), intent(inout)         :: grid
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       logical,         intent(in),  optional :: noGarbage
+       integer,         intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    7.0.0
    +
    Added argument noGarbage. + The argument provides a mechanism to override the default garbage collection + mechanism when destroying an ESMF object. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Destroys an ESMF_Grid object and related internal structures. + This call does destroy internally created DistGrid and DELayout classes, + for example those created by ESMF_GridCreateShapeTile(). It also + destroys internally created coordinate/item Arrays, for example those + created by ESMF_GridAddCoord(). However, if the user uses an + externally created class, for example creating an Array and setting it + using ESMF_GridSetCoord(), then that class is not destroyed by + this method. + +

+By default a small remnant of the object is kept in memory in order to + prevent problems with dangling aliases. The default garbage collection + mechanism can be overridden with the noGarbage argument. + +

+The arguments are: +

+
grid
+
ESMF_Grid to be destroyed. + +
+
[noGarbage]
+
If set to .TRUE. the object will be fully destroyed and removed + from the ESMF garbage collection system. Note however that under this + condition ESMF cannot protect against accessing the destroyed object + through dangling aliases - a situation which may lead to hard to debug + application crashes. + +

+It is generally recommended to leave the noGarbage argument + set to .FALSE. (the default), and to take advantage of the ESMF + garbage collection system which will prevent problems with dangling + aliases or incorrect sequences of destroy calls. However this level of + support requires that a small remnant of the object is kept in memory + past the destroy call. This can lead to an unexpected increase in memory + consumption over the course of execution in applications that use + temporary ESMF objects. For situations where the repeated creation and + destruction of temporary objects leads to memory issues, it is + recommended to call with noGarbage set to .TRUE., fully + removing the entire temporary object from memory. + +

+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+31.6.32 ESMF_GridEmptyComplete - Complete a Grid with user set edge connections and an irregular distribution +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_GridEmptyComplete()
+       subroutine ESMF_GridEmptyCompleteEConnI(grid, minIndex,         &
+         countsPerDEDim1,countsPerDeDim2,                  &
+         countsPerDEDim3,                                  &
+         connDim1, connDim2, connDim3,                     &
+         coordSys, coordTypeKind,                          &
+         coordDep1, coordDep2, coordDep3,                  &
+         gridEdgeLWidth, gridEdgeUWidth, gridAlign,        &
+         gridMemLBound, indexflag, petMap, name, rc)
+
ARGUMENTS: +
        type (ESMF_Grid)                                :: grid
+        integer,                  intent(in),  optional :: minIndex(:)
+        integer,                  intent(in)            :: countsPerDEDim1(:)
+        integer,                  intent(in)            :: countsPerDEDim2(:)
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+        integer,                  intent(in),  optional :: countsPerDEDim3(:)
+        type(ESMF_GridConn_Flag), intent(in),  optional :: connDim1(:)
+        type(ESMF_GridConn_Flag), intent(in),  optional :: connDim2(:)
+        type(ESMF_GridConn_Flag), intent(in),  optional :: connDim3(:)
+        type(ESMF_CoordSys_Flag), intent(in),  optional :: coordSys
+        type(ESMF_TypeKind_Flag), intent(in),  optional :: coordTypeKind
+        integer,                  intent(in),  optional :: coordDep1(:)
+        integer,                  intent(in),  optional :: coordDep2(:)
+        integer,                  intent(in),  optional :: coordDep3(:)
+        integer,                  intent(in),  optional :: gridEdgeLWidth(:)
+        integer,                  intent(in),  optional :: gridEdgeUWidth(:)
+        integer,                  intent(in),  optional :: gridAlign(:)
+        integer,                  intent(in),  optional :: gridMemLBound(:)
+        type(ESMF_Index_Flag),    intent(in),  optional :: indexflag
+        integer,                  intent(in),  optional :: petMap(:,:,:)
+        character (len=*),        intent(in),  optional :: name
+        integer,                  intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+This method takes in an empty Grid created by ESMF_GridEmptyCreate(). + It then completes the grid to form a single tile, irregularly distributed grid + (see Figure 13). To specify the irregular distribution, the user passes in an array + for each grid dimension, where the length of the array is the number + of DEs in the dimension. Currently this call only + supports creating 2D or 3D Grids. A 2D Grid can be specified using the + countsPerDEDim1 and countsPerDEDim2 arguments. A 3D Grid can + be specified by also using the optional countsPerDEDim3 argument. + The index of each array element in these arguments corresponds to + a DE number. The array value at the index is the number of grid + cells on the DE in that dimension. + +

+Section 31.3.4 shows an example + of using an irregular distribution to create a 2D Grid with uniformly spaced + coordinates. This creation method can also be used as the basis for + grids with rectilinear coordinates or curvilinear coordinates. + +

+For consistency's sake the ESMF_GridEmptyComplete() call + should be executed in the same set or a subset of the PETs in which the + ESMF_GridEmptyCreate() call was made. If the call + is made in a subset, the Grid objects outside that subset will + still be "empty" and not usable. + +

+The arguments are: +

+
grid
+
The empty ESMF_Grid to set information into and then commit. + +
+
[minIndex]
+
Tuple to start the index ranges at. If not present, defaults + to /1,1,1,.../. + +
+
countsPerDEDim1
+
This arrays specifies the number of cells per DE for index dimension 1 + for the exclusive region (the center stagger location). + +
+
countsPerDEDim2
+
This array specifies the number of cells per DE for index dimension 2 + for the exclusive region (center stagger location). + +
+
[countsPerDEDim3]
+
This array specifies the number of cells per DE for index dimension 3 + for the exclusive region (center stagger location). + If not specified then grid is 2D. + +
+
[connDim1]
+
Fortran array describing the index dimension 1 connections. + The first element represents the minimum end of dimension 1. + The second element represents the maximum end of dimension 1. + If array is only one element long, then that element is used + for both the minimum and maximum end. + Please see Section 31.2.1 for a list of valid + options. If not present, defaults to ESMF_GRIDCONN_NONE. + +
+
[connDim2]
+
Fortran array describing the index dimension 2 connections. + The first element represents the minimum end of dimension 2. + The second element represents the maximum end of dimension 2. + If array is only one element long, then that element is used + for both the minimum and maximum end. + Please see Section 31.2.1 for a list of valid + options. If not present, defaults to ESMF_GRIDCONN_NONE. + +
+
[connDim3]
+
Fortran array describing the index dimension 3 connections. + The first element represents the minimum end of dimension 3. + The second element represents the maximum end of dimension 3. + If array is only one element long, then that element is used + for both the minimum and maximum end. + Please see Section 31.2.1 for a list of valid + options. If not present, defaults to ESMF_GRIDCONN_NONE. + +
+
[coordSys]
+
The coordinate system of the grid coordinate data. + For a full list of options, please see Section 54.11. + If not specified then defaults to ESMF_COORDSYS_SPH_DEG. + +
+
[coordTypeKind]
+
The type/kind of the grid coordinate data. All numerical types + listed under section 54.61 are supported. + If not specified then defaults to ESMF_TYPEKIND_R8. + +
+
[coordDep1]
+
This array specifies the dependence of the first + coordinate component on the three index dimensions + described by coordsPerDEDim1,2,3. The size of the + array specifies the number of dimensions of the first + coordinate component array. The values specify which + of the index dimensions the corresponding coordinate + arrays map to. If not present the default is 1,2,...,grid rank. + +
+
[coordDep2]
+
This array specifies the dependence of the second + coordinate component on the three index dimensions + described by coordsPerDEDim1,2,3. The size of the + array specifies the number of dimensions of the second + coordinate component array. The values specify which + of the index dimensions the corresponding coordinate + arrays map to. If not present the default is 1,2,...,grid rank. + +
+
[coordDep3]
+
This array specifies the dependence of the third + coordinate component on the three index dimensions + described by coordsPerDEDim1,2,3. The size of the + array specifies the number of dimensions of the third + coordinate component array. The values specify which + of the index dimensions the corresponding coordinate + arrays map to. If not present the default is 1,2,...,grid rank. + +
+
[gridEdgeLWidth]
+
The padding around the lower edges of the grid. This padding is between + the index space corresponding to the cells and the boundary of the + the exclusive region. This extra space is to contain the extra + padding for non-center stagger locations, and should be big enough + to hold any stagger in the grid. If this and gridAlign are not present then + defaults to 0, 0, ..., 0 (all zeros). + +
+
[gridEdgeUWidth]
+
The padding around the upper edges of the grid. This padding is between + the index space corresponding to the cells and the boundary of the + the exclusive region. This extra space is to contain the extra + padding for non-center stagger locations, and should be big enough + to hold any stagger in the grid. If this and gridAlign are not present then + defaults to 1, 1, ..., 1 (all ones). + +
+
[gridAlign]
+
Specification of how the stagger locations should align with the cell + index space (can be overridden by the individual staggerAligns). If + the gridEdgeWidths are not specified than this argument + implies the gridEdgeWidths. If the gridEdgeWidths are specified and this argument isn't + then this argument is implied by the gridEdgeWidths. + If this and the gridEdgeWidths are not specified, then defaults to + -1, -1, ..., -1 (all negative ones). + +
+
[gridMemLBound]
+
Specifies the lower index range of the memory of every DE in this Grid. + Only used when indexflag is ESMF_INDEX_USER. May be overridden + by staggerMemLBound. + +
+
[indexflag]
+
Indicates the indexing scheme to be used in the new Grid. Please see + Section 54.29 for the list of options. If not present, + defaults to ESMF_INDEX_DELOCAL. + +
+
[petMap]
+
Sets the mapping of pets to the created DEs. This 3D + should be of size size(countsPerDEDim1) x size(countsPerDEDim2) x + size(countsPerDEDim3). If countsPerDEDim3 isn't present, then + the last dimension is of size 1. + +
+
[name]
+
ESMF_Grid name. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+31.6.33 ESMF_GridEmptyComplete - Complete a Grid with user set edge connections and a regular distribution +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_GridEmptyComplete()
+      subroutine ESMF_GridEmptyCompleteEConnR(grid, regDecomp, decompFlag, &
+         minIndex, maxIndex,                                    &
+         connDim1, connDim2, connDim3,                       &
+         coordSys, coordTypeKind,                            &
+         coordDep1, coordDep2, coordDep3,                    &
+         gridEdgeLWidth, gridEdgeUWidth, gridAlign,          &
+         gridMemLBound, indexflag, petMap, name, rc)
+ 
+  !
+
ARGUMENTS: +
        type (ESMF_Grid)                                :: grid
+        integer,                  intent(in),  optional :: regDecomp(:)
+        type(ESMF_Decomp_Flag),   intent(in),  optional :: decompflag(:)
+        integer,                  intent(in),  optional :: minIndex(:)
+        integer,                  intent(in)            :: maxIndex(:)
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+        type(ESMF_GridConn_Flag), intent(in),  optional :: connDim1(:)
+        type(ESMF_GridConn_Flag), intent(in),  optional :: connDim2(:)
+        type(ESMF_GridConn_Flag), intent(in),  optional :: connDim3(:)
+        type(ESMF_CoordSys_Flag), intent(in),  optional :: coordSys
+        type(ESMF_TypeKind_Flag), intent(in),  optional :: coordTypeKind
+        integer,                  intent(in),  optional :: coordDep1(:)
+        integer,                  intent(in),  optional :: coordDep2(:)
+        integer,                  intent(in),  optional :: coordDep3(:)
+        integer,                  intent(in),  optional :: gridEdgeLWidth(:)
+        integer,                  intent(in),  optional :: gridEdgeUWidth(:)
+        integer,                  intent(in),  optional :: gridAlign(:)
+        integer,                  intent(in),  optional :: gridMemLBound(:)
+        type(ESMF_Index_Flag),    intent(in),  optional :: indexflag
+        integer,                  intent(in),  optional :: petMap(:,:,:)
+        character (len=*),        intent(in),  optional :: name
+        integer,                  intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+This method takes in an empty Grid created by ESMF_GridEmptyCreate(). + It then completes the grid to form a single tile, regularly distributed grid + (see Figure 13). + To specify the distribution, the user passes in an array + (regDecomp) specifying the number of DEs to divide each + dimension into. The array decompFlag indicates how the division into DEs is to + occur. The default is to divide the range as evenly as possible. Currently this call + only supports creating a 2D or 3D Grid, and thus, for example, maxIndex must be of size 2 or 3. + +

+For consistency's sake the ESMF_GridEmptyComplete() call + should be executed in the same set or a subset of the PETs in which the + ESMF_GridEmptyCreate() call was made. If the call + is made in a subset, the Grid objects outside that subset will + still be "empty" and not usable. + +

+The arguments are: +

+
grid
+
The empty ESMF_Grid to set information into and then commit. + +
+
[regDecomp]
+
List that has the same number of elements as maxIndex. + Each entry is the number of decounts for that dimension. + If not specified, the default decomposition will be petCountx1x1..x1. + +
+
[decompflag]
+
List of decomposition flags indicating how each dimension of the + tile is to be divided between the DEs. The default setting + is ESMF_DECOMP_BALANCED in all dimensions. Please see + Section 54.14 for a full description of the + possible options. Note that currently the option + ESMF_DECOMP_CYCLIC isn't supported in Grid creation. + +
+
[minIndex]
+
The bottom extent of the grid array. If not given then the value defaults + to /1,1,1,.../. + +
+
maxIndex
+
The upper extent of the grid array. + +
+
[connDim1]
+
Fortran array describing the index dimension 1 connections. + The first element represents the minimum end of dimension 1. + The second element represents the maximum end of dimension 1. + If array is only one element long, then that element is used + for both the minimum and maximum end. + Please see Section 31.2.1 for a list of valid + options. If not present, defaults to ESMF_GRIDCONN_NONE. + +
+
[connDim2]
+
Fortran array describing the index dimension 2 connections. + The first element represents the minimum end of dimension 2. + The second element represents the maximum end of dimension 2. + If array is only one element long, then that element is used + for both the minimum and maximum end. + Please see Section 31.2.1 for a list of valid + options. If not present, defaults to ESMF_GRIDCONN_NONE. + +
+
[connDim3]
+
Fortran array describing the index dimension 3 connections. + The first element represents the minimum end of dimension 3. + The second element represents the maximum end of dimension 3. + If array is only one element long, then that element is used + for both the minimum and maximum end. + Please see Section 31.2.1 for a list of valid + options. If not present, defaults to ESMF_GRIDCONN_NONE. + +
+
[coordSys]
+
The coordinate system of the grid coordinate data. + For a full list of options, please see Section 54.11. + If not specified then defaults to ESMF_COORDSYS_SPH_DEG. + +
+
[coordTypeKind]
+
The type/kind of the grid coordinate data. All numerical types + listed under section 54.61 are supported. + If not specified then defaults to ESMF_TYPEKIND_R8. + +
+
[coordDep1]
+
This array specifies the dependence of the first + coordinate component on the three index dimensions + described by coordsPerDEDim1,2,3. The size of the + array specifies the number of dimensions of the first + coordinate component array. The values specify which + of the index dimensions the corresponding coordinate + arrays map to. If not present the default is 1,2,...,grid rank. + +
+
[coordDep2]
+
This array specifies the dependence of the second + coordinate component on the three index dimensions + described by coordsPerDEDim1,2,3. The size of the + array specifies the number of dimensions of the second + coordinate component array. The values specify which + of the index dimensions the corresponding coordinate + arrays map to. If not present the default is 1,2,...,grid rank. + +
+
[coordDep3]
+
This array specifies the dependence of the third + coordinate component on the three index dimensions + described by coordsPerDEDim1,2,3. The size of the + array specifies the number of dimensions of the third + coordinate component array. The values specify which + of the index dimensions the corresponding coordinate + arrays map to. If not present the default is 1,2,...,grid rank. + +
+
[gridEdgeLWidth]
+
The padding around the lower edges of the grid. This padding is between + the index space corresponding to the cells and the boundary of the + the exclusive region. This extra space is to contain the extra + padding for non-center stagger locations, and should be big enough + to hold any stagger in the grid. If this and gridAlign are not present then + defaults to 0, 0, ..., 0 (all zeros). + +
+
[gridEdgeUWidth]
+
The padding around the upper edges of the grid. This padding is between + the index space corresponding to the cells and the boundary of the + the exclusive region. This extra space is to contain the extra + padding for non-center stagger locations, and should be big enough + to hold any stagger in the grid. If this and gridAlign are not present then + defaults to 1, 1, ..., 1 (all ones). + +
+
[gridAlign]
+
Specification of how the stagger locations should align with the cell + index space (can be overridden by the individual staggerAligns). If + the gridEdgeWidths are not specified than this argument + implies the gridEdgeWidths. If the gridEdgeWidths are specified and this argument isn't + then this argument is implied by the gridEdgeWidths. + If this and the gridEdgeWidths are not specified, then defaults to + -1, -1, ..., -1 (all negative ones). + +
+
[gridMemLBound]
+
Specifies the lower index range of the memory of every DE in this Grid. + Only used when indexflag is ESMF_INDEX_USER. May be overridden + by staggerMemLBound. + +
+
[indexflag]
+
Indicates the indexing scheme to be used in the new Grid. Please see + Section 54.29 for the list of options. If not present, + defaults to ESMF_INDEX_DELOCAL. + +
+
[petMap]
+
Sets the mapping of pets to the created DEs. This 3D + should be of size regDecomp(1) x regDecomp(2) x regDecomp(3) + If the Grid is 2D, then the last dimension is of size 1. + +
+
[name]
+
ESMF_Grid name. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+31.6.34 ESMF_GridEmptyComplete - Complete a Grid with user set edge connections and an arbitrary distribution +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_GridEmptyComplete()
+       subroutine ESMF_GridEmptyCompleteEConnA(grid, minIndex, maxIndex,  &
+         arbIndexCount, arbIndexList,                         &
+         connDim1, connDim2, connDim3,                     &
+         coordSys, coordTypeKind,                          &
+         coordDep1, coordDep2, coordDep3,                  &
+         distDim, name, rc)
+  !
+
ARGUMENTS: +
        type (ESMF_Grid)                                :: grid
+        integer,                  intent(in),  optional :: minIndex(:)
+        integer,                  intent(in)            :: maxIndex(:)
+        integer,                  intent(in)            :: arbIndexCount
+        integer,                  intent(in)            :: arbIndexList(:,:)
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+        type(ESMF_GridConn_Flag), intent(in),  optional :: connDim1(:)
+        type(ESMF_GridConn_Flag), intent(in),  optional :: connDim2(:)
+        type(ESMF_GridConn_Flag), intent(in),  optional :: connDim3(:)
+        type(ESMF_CoordSys_Flag), intent(in),  optional :: coordSys
+        type(ESMF_TypeKind_Flag), intent(in),  optional :: coordTypeKind
+        integer,                  intent(in),  optional :: coordDep1(:)
+        integer,                  intent(in),  optional :: coordDep2(:)
+        integer,                  intent(in),  optional :: coordDep3(:)
+        integer,                  intent(in),  optional :: distDim(:)
+        character (len=*),        intent(in),  optional :: name
+        integer,                  intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+This method takes in an empty Grid created by ESMF_GridEmptyCreate(). + It then completes the grid to form a single tile, arbitrarily distributed grid + (see Figure 13). + To specify the arbitrary distribution, the user passes in an 2D array + of local indices, where the first dimension is the number of local grid cells + specified by localArbIndexCount and the second dimension is the number of distributed + dimensions. + +

+distDim specifies which grid dimensions are arbitrarily distributed. The + size of distDim has to agree with the size of the second dimension of + localArbIndex. + +

+Currently this call + only supports creating a 2D or 3D Grid, and thus, for example, maxIndex must be of size 2 or 3. + +

+For consistency's sake the ESMF_GridEmptyComplete() call + should be executed in the same set or a subset of the PETs in which the + ESMF_GridEmptyCreate() call was made. If the call + is made in a subset, the Grid objects outside that subset will + still be "empty" and not usable. + +

+The arguments are: +

+
grid
+
The empty ESMF_Grid to set information into and then commit. + +
+
[minIndex]
+
Tuple to start the index ranges at. If not present, defaults + to /1,1,1,.../. + +
+
maxIndex
+
The upper extend of the grid index ranges. + +
+
arbIndexCount
+
The number of grid cells in the local DE. It is okay to have 0 + grid cell in a local DE. + +
+
arbIndexList
+
This 2D array specifies the indices of the PET LOCAL grid cells. The + dimensions should be arbIndexCount * number of Distributed grid dimensions + where arbIndexCount is the input argument specified below + +
+
[connDim1]
+
Fortran array describing the index dimension 1 connections. + The first element represents the minimum end of dimension 1. + The second element represents the maximum end of dimension 1. + If array is only one element long, then that element is used + for both the minimum and maximum end. + Please see Section 31.2.1 for a list of valid + options. If not present, defaults to ESMF_GRIDCONN_NONE. + +
+
[connDim2]
+
Fortran array describing the index dimension 2 connections. + The first element represents the minimum end of dimension 2. + The second element represents the maximum end of dimension 2. + If array is only one element long, then that element is used + for both the minimum and maximum end. + Please see Section 31.2.1 for a list of valid + options. If not present, defaults to ESMF_GRIDCONN_NONE. + +
+
[connDim3]
+
Fortran array describing the index dimension 3 connections. + The first element represents the minimum end of dimension 3. + The second element represents the maximum end of dimension 3. + If array is only one element long, then that element is used + for both the minimum and maximum end. + Please see Section 31.2.1 for a list of valid + options. If not present, defaults to ESMF_GRIDCONN_NONE. + +
+
[coordSys]
+
The coordinate system of the grid coordinate data. + For a full list of options, please see Section 54.11. + If not specified then defaults to ESMF_COORDSYS_SPH_DEG. + +
+
[coordTypeKind]
+
The type/kind of the grid coordinate data. All numerical types + listed under section 54.61 are supported. + If not specified then defaults to ESMF_TYPEKIND_R8. + +
+
[coordDep1]
+
The size of the array specifies the number of dimensions of the + first coordinate component array. The values specify which + of the index dimensions the corresponding coordinate + arrays map to. The format should be /ESMF_GRID_ARBDIM/ where + /ESMF_GRID_ARBDIM/ is mapped to the collapsed 1D dimension from all + the arbitrarily distributed dimensions. n is the dimension that + is not distributed (if exists). + If not present the default is /ESMF_GRID_ARBDIM/ if the first dimension + is arbitararily distributed, or /n/ if not distributed (i.e. n=1) + Please see Section 54.2 for a definition of ESMF_GRID_ARBDIM. + +
+
[coordDep2]
+
The size of the array specifies the number of dimensions of the + second coordinate component array. The values specify which + of the index dimensions the corresponding coordinate + arrays map to. The format should be /ESMF_GRID_ARBDIM/ where + /ESMF_GRID_ARBDIM/ is mapped to the collapsed 1D dimension from all + the arbitrarily distributed dimensions. n is the dimension that + is not distributed (if exists). + If not present the default is /ESMF_GRID_ARBDIM/ if this dimension + is arbitararily distributed, or /n/ if not distributed (i.e. n=2) + Please see Section 54.2 for a definition of ESMF_GRID_ARBDIM. + +
+
[coordDep3]
+
The size of the array specifies the number of dimensions of the + third coordinate component array. The values specify which + of the index dimensions the corresponding coordinate + arrays map to. The format should be /ESMF_GRID_ARBDIM/ where + /ESMF_GRID_ARBDIM/ is mapped to the collapsed 1D dimension from all + the arbitrarily distributed dimensions. n is the dimension that + is not distributed (if exists). + If not present the default is /ESMF_GRID_ARBDIM/ if this dimension + is arbitararily distributed, or /n/ if not distributed (i.e. n=3) + Please see Section 54.2 for a definition of ESMF_GRID_ARBDIM. + +
+
[distDim]
+
This array specifies which dimensions are arbitrarily distributed. + The size of the array specifies the total distributed dimensions. + if not specified, defaults is all dimensions will be arbitrarily + distributed. The size has to agree with the size of the second + dimension of localArbIndex. + +
+
[name]
+
ESMF_Grid name. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+31.6.35 ESMF_GridEmptyCreate - Create a Grid that has no contents +

+ +

+ +

+
+INTERFACE: +

      function ESMF_GridEmptyCreate(vm, rc)
+
RETURN VALUE: +
      type(ESMF_Grid) :: ESMF_GridEmptyCreate
+
ARGUMENTS: +
 -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+        type(ESMF_VM),           intent(in),  optional :: vm
+        integer,                 intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    7.1.0r
    +
    Added argument vm to support object creation on a + different VM than that of the current context. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Partially create an ESMF_Grid object. This function allocates + an ESMF_Grid object, but doesn't allocate any coordinate storage or other + internal structures. The ESMF_GridEmptyComplete() calls + can be used to set the values in the grid object and to construct the + internal structure. + +

+The arguments are: +

+
[vm]
+
If present, the Grid object is created on the specified + ESMF_VM object. The default is to create on the VM of the + current context. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+31.6.36 ESMF_GridGet - Get object-wide Grid information +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_GridGet()
+       subroutine ESMF_GridGetDefault(grid, coordTypeKind, &
+         dimCount, tileCount, staggerlocCount, localDECount, distgrid, &
+         distgridToGridMap, coordSys, coordDimCount, coordDimMap, arbDim, &
+         rank, arbDimCount, gridEdgeLWidth, gridEdgeUWidth, gridAlign,  &
+         indexFlag, status, name, rc)
+
ARGUMENTS: +
       type(ESMF_Grid),            intent(in)            :: grid
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       type(ESMF_TypeKind_Flag),  intent(out), optional :: coordTypeKind
+       integer,                   intent(out), optional :: dimCount
+       integer,                   intent(out), optional :: tileCount
+       integer,                   intent(out), optional :: staggerlocCount
+       integer,                   intent(out), optional :: localDECount
+       type(ESMF_DistGrid),       intent(out), optional :: distgrid
+       integer,       target,     intent(out), optional :: distgridToGridMap(:)
+       type(ESMF_CoordSys_Flag),  intent(out), optional :: coordSys
+       integer,       target,     intent(out), optional :: coordDimCount(:)
+       integer,       target,     intent(out), optional :: coordDimMap(:,:)
+       integer,                   intent(out), optional :: arbDim
+       integer,                   intent(out), optional :: rank
+       integer,                   intent(out), optional :: arbDimCount
+       integer,       target,     intent(out), optional :: gridEdgeLWidth(:)
+       integer,       target,     intent(out), optional :: gridEdgeUWidth(:)
+       integer,       target,     intent(out), optional :: gridAlign(:)
+       type(ESMF_Index_Flag),     intent(out), optional :: indexflag
+       type(ESMF_GridStatus_Flag),intent(out), optional :: status
+       character (len=*),         intent(out), optional :: name
+       integer,                   intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Gets various types of information about a grid. + +

+The arguments are: +

+
grid
+
Grid to get the information from. + +
+
[coordTypeKind]
+
The type/kind of the grid coordinate data. All numerical types + listed under section 54.61 are supported. + +
+
[dimCount]
+
DimCount of the Grid object. + +
+
[tileCount]
+
The number of logically rectangular tiles in the grid. + +
+
[staggerlocCount]
+
The number of stagger locations. + +
+
[localDECount]
+
The number of DEs in this grid on this PET. + +
+
[distgrid]
+
The structure describing the distribution of the grid. + +
+
[distgridToGridMap]
+
List that has as many elements as the distgrid dimCount. This array describes + mapping between the grids dimensions and the distgrid. + +
+
[coordSys]
+
The coordinate system of the grid coordinate data. + +
+
[coordDimCount]
+
This argument needs to be of size equal to the Grid's dimCount. + Each entry in the argument will be filled with the dimCount of the corresponding coordinate component (e.g. the + dimCount of coordDim=1 will be put into entry 1). + This is useful because it describes the factorization of the coordinate components in the Grid. + +
+
[coordDimMap]
+
2D list of size grid dimCount x grid dimCount. This array describes the + map of each component array's dimensions onto the grids + dimensions. + +
+
[arbDim]
+
The distgrid dimension that is mapped by the arbitrarily distributed grid dimensions. + +
+
[rank]
+
The count of the memory dimensions, it is the same as dimCount for a non-arbitrarily distributed grid, + and equal or less for a arbitrarily distributed grid. + +
+
[arbDimCount]
+
The number of dimensions distributed arbitrarily for an arbitrary grid, 0 if the grid is non-arbitrary. + +
+
[gridEdgeLWidth]
+
The padding around the lower edges of the grid. The array should + be of size greater or equal to the Grid dimCount. + +
+
[gridEdgeUWidth]
+
The padding around the upper edges of the grid. The array should + be of size greater or equal to the Grid dimCount. + +
+
[gridAlign]
+
Specification of how the stagger locations should align with the cell + index space. The array should be of size greater or equal to the Grid dimCount. + +
+
[indexflag]
+
Flag indicating the indexing scheme being used in the Grid. Please + see Section 54.29 for the list of options. + +
+
[status]
+
Flag indicating the status of the Grid. Please + see Section 31.2.4 for the list of options. + +
+
[name]
+
ESMF_Grid name. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+31.6.37 ESMF_GridGet - Get DE-local Grid information +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_GridGet()
+       subroutine ESMF_GridGetPLocalDe(grid, localDE, &
+         isLBound,isUBound, arbIndexCount, arbIndexList, tile, rc)
+
ARGUMENTS: +
       type(ESMF_Grid),        intent(in)            :: grid
+       integer,                intent(in)            :: localDE
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       logical,                intent(out), optional :: isLBound(:)
+       logical,                intent(out), optional :: isUBound(:)
+       integer,                intent(out), optional :: arbIndexCount
+       integer,        target, intent(out), optional :: arbIndexList(:,:)
+       integer,                intent(out), optional :: tile
+       integer,                intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    7.1.0r
    +
    Added argument tile. This new argument allows the user to + query the tile within which the localDE is contained. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+This call gets information about a particular local DE in a Grid. + +

+The arguments are: +

+
grid
+
Grid to get the information from. + +
+
localDE
+
The local DE from which to get the information. [0,..,localDECount-1] + +
+
[isLBound]
+
Upon return, for each dimension this indicates if the DE is a lower bound of the Grid. + isLBound must be allocated to be of size equal to the Grid dimCount. + +
+
[isUBound]
+
Upon return, for each dimension this indicates if the DE is an upper bound of the Grid. + isUBound must be allocated to be of size equal to the Grid dimCount. + +
+
[arbIndexCount]
+
The number of local cells for an arbitrarily distributed grid + +
+
[arbIndexList]
+
The 2D array storing the local cell indices for an arbitrarily distributed grid. The size of the array + is arbIndexCount * arbDimCount + +
+
[tile]
+
The number of the tile in which localDE is contained. Tile numbers range from 1 to TileCount. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+31.6.38 ESMF_GridGet - Get DE-local information for a specific stagger location in a Grid +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_GridGet()
+       subroutine ESMF_GridGetPLocalDePSloc(grid, staggerloc, localDE, &
+         exclusiveLBound, exclusiveUBound, exclusiveCount,  &
+         computationalLBound, computationalUBound, computationalCount, rc)
+
ARGUMENTS: +
       type(ESMF_Grid),        intent(in)            :: grid
+       type (ESMF_StaggerLoc), intent(in)            :: staggerloc
+       integer,                intent(in)            :: localDE
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       integer,        target, intent(out), optional :: exclusiveLBound(:)
+       integer,        target, intent(out), optional :: exclusiveUBound(:)
+       integer,        target, intent(out), optional :: exclusiveCount(:)
+       integer,        target, intent(out), optional :: computationalLBound(:)
+       integer,        target, intent(out), optional :: computationalUBound(:)
+       integer,        target, intent(out), optional :: computationalCount(:)
+       integer,                intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+This method gets information about the range of index space which a + particular stagger location occupies. This call differs from the coordinate + bound calls (e.g. ESMF_GridGetCoord) in that a given coordinate + array may only occupy a subset of the Grid's dimensions, and + so these calls may not give all the bounds of the stagger location. + The bounds from this call are the full bounds, and so + for example, give the appropriate bounds for allocating a Fortran array to hold + data residing on the stagger location. + Note that unlike the output from the Array, these values also include the + undistributed dimensions and are + ordered to reflect the order of the indices in the Grid. This call will + still give correct values even if the stagger location does not contain + coordinate arrays (e.g. if ESMF_GridAddCoord hasn't yet + been called on the stagger location). + +

+The arguments are: +

+
grid
+
Grid to get the information from. + +
+
staggerloc
+
The stagger location to get the information for. + Please see Section 31.2.6 for a list + of predefined stagger locations. + +
+
localDE
+
The local DE from which to get the information. [0,..,localDECount-1] + +
+
[exclusiveLBound]
+
Upon return this holds the lower bounds of the exclusive region. + exclusiveLBound must be allocated to be of size equal to the Grid dimCount. + Please see Section 31.3.19 for a description + of the regions and their associated bounds and counts. + +
+
[exclusiveUBound]
+
Upon return this holds the upper bounds of the exclusive region. + exclusiveUBound must be allocated to be of size equal to the Grid dimCount. + Please see Section 31.3.19 for a description + of the regions and their associated bounds and counts. + +
+
[exclusiveCount]
+
Upon return this holds the number of items,exclusiveUBound-exclusiveLBound+1, + in the exclusive region per dimension. + exclusiveCount must + be allocated to be of size equal to the Grid dimCount. + Please see Section 31.3.19 for a description + of the regions and their associated bounds and counts. + +
+
[computationalLBound]
+
Upon return this holds the lower bounds of the computational region. + computationalLBound must be allocated to be of size equal to the Grid dimCount. + Please see Section 31.3.19 for a description + of the regions and their associated bounds and counts. + +
+
[computationalUBound]
+
Upon return this holds the upper bounds of the computational region. + computationalUBound must be allocated to be of size equal to the Grid dimCount. + Please see Section 31.3.19 for a description + of the regions and their associated bounds and counts. + +
+
[computationalCount]
+
Upon return this holds the number of items in the computational region per dimension. + (i.e. computationalUBound-computationalLBound+1). computationalCount must + be allocated to be of size equal to the Grid dimCount. + Please see Section 31.3.19 for a description + of the regions and their associated bounds and counts. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+31.6.39 ESMF_GridGet - Get information about a specific stagger location in a Grid +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_GridGet()
+       subroutine ESMF_GridGetPSloc(grid, staggerloc, &
+         distgrid, &
+         staggerEdgeLWidth, staggerEdgeUWidth, &
+         staggerAlign, staggerLBound, rc)
+
ARGUMENTS: +
       type(ESMF_Grid),        intent(in)            :: grid
+       type (ESMF_StaggerLoc), intent(in)            :: staggerloc
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       type(ESMF_DistGrid),    intent(out), optional :: distgrid
+       integer,                intent(out), optional :: staggerEdgeLWidth(:)
+       integer,                intent(out), optional :: staggerEdgeUWidth(:)
+       integer,                intent(out), optional :: staggerAlign(:)
+       integer,                intent(out), optional :: staggerLBound(:)
+       integer,                intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    7.1.0r
    +
    Added arguments staggerEdgeLWidth, staggerEdgeUWidth, + staggerAlign, and staggerLBound. These new arguments + allow the user to get width, alignment, and bound information for + the given stagger location. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+This method gets information about a particular stagger location. + This information is useful for creating an ESMF Array to hold + the data at the stagger location. + +

+The arguments are: +

+
grid
+
Grid to get the information from. + +
+
staggerloc
+
The stagger location to get the information for. + Please see Section 31.2.6 for a list + of predefined stagger locations. + +
+
[distgrid]
+
The structure describing the distribution of this staggerloc in this grid. + +
+
[staggerEdgeLWidth]
+
This array should be the same dimCount as the grid. It specifies the lower corner of the stagger + region with respect to the lower corner of the exclusive region. + +
+
[staggerEdgeUWidth]
+
This array should be the same dimCount as the grid. It specifies the upper corner of the stagger + region with respect to the upper corner of the exclusive region. + +
+
[staggerAlign]
+
This array is of size grid dimCount. + For this stagger location, it specifies which element + has the same index value as the center. For example, + for a 2D cell with corner stagger it specifies which + of the 4 corners has the same index as the center. + +
+
[staggerLBound]
+
Specifies the lower index range of the memory of every DE in this staggerloc in this Grid. + Only used when Grid indexflag is ESMF_INDEX_USER. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+31.6.40 ESMF_GridGet - Get information about a specific stagger location and tile in a Grid +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_GridGet()
+       subroutine ESMF_GridGetPSlocPTile(grid, tile, staggerloc, &
+         minIndex, maxIndex, rc)
+
ARGUMENTS: +
       type(ESMF_Grid),        intent(in)            :: grid
+       integer,                intent(in)            :: tile
+       type (ESMF_StaggerLoc), intent(in)            :: staggerloc
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       integer,        target, intent(out), optional :: minIndex(:)
+       integer,        target, intent(out), optional :: maxIndex(:)
+       integer,                intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+This method gets information about a particular stagger location. + This information is useful for creating an ESMF Array to hold + the data at the stagger location. + +

+The arguments are: +

+
grid
+
Grid to get the information from. + +
+
tile
+
The tile number to get the data from. Tile numbers range from 1 to TileCount. + +
+
staggerloc
+
The stagger location to get the information for. + Please see Section 31.2.6 for a list + of predefined stagger locations. + +
+
[minIndex]
+
Upon return this holds the global lower index of this stagger location. + minIndex must be allocated to be of size equal to the grid DimCount. + Note that this value is only for the first Grid tile, as multigrid support + is added, this interface will likely be changed or moved to adapt. + +
+
[maxIndex]
+
Upon return this holds the global upper index of this stagger location. + maxIndex must be allocated to be of size equal to the grid DimCount. + Note that this value is only for the first Grid tile, as multigrid support + is added, this interface will likely be changed or moved to adapt. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+31.6.41 ESMF_GridGetCoord - Get a DE-local Fortran array pointer to Grid coord data and coord bounds +

+ +

+ +

+
+INTERFACE: +

        subroutine ESMF_GridGetCoord<rank><type><kind>(grid, coordDim,    &
+          staggerloc, localDE, farrayPtr, datacopyflag,                  &
+          exclusiveLBound, exclusiveUBound, exclusiveCount,              &
+          computationalLBound, computationalUBound, computationalCount,  &
+          totalLBound, totalUBound, totalCount, rc)
+
ARGUMENTS: +
       type(ESMF_Grid),       intent(in)              :: grid
+       integer,               intent(in)              :: coordDim
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       type (ESMF_StaggerLoc) intent(in),    optional :: staggerloc
+       integer,               intent(in),    optional :: localDE
+       <type> (ESMF_KIND_<kind>), pointer             :: farrayPtr(<rank>)
+       type(ESMF_DataCopy_Flag), intent(in), optional :: datacopyflag
+       integer,               intent(out),   optional :: exclusiveLBound(:)
+       integer,               intent(out),   optional :: exclusiveUBound(:)
+       integer,               intent(out),   optional :: exclusiveCount(:)
+       integer,               intent(out),   optional :: computationalLBound(:)
+       integer,               intent(out),   optional :: computationalUBound(:)
+       integer,               intent(out),   optional :: computationalCount(:)
+       integer,               intent(out),   optional :: totalLBound(:)
+       integer,               intent(out),   optional :: totalUBound(:)
+       integer,               intent(out),   optional :: totalCount(:)
+       integer,               intent(out),   optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+This method gets a Fortran pointer to the piece of memory which holds the + coordinate data on the local DE for the given coordinate dimension and stagger + locations. + This is useful, for example, for setting the coordinate values in a Grid, or + for reading the coordinate values. Currently this method supports up to three + coordinate dimensions, of either R4 or R8 datatype. See below for specific + supported values. If the coordinates that you are trying to retrieve are of + higher dimension, use the ESMF_GetCoord() interface that returns coordinate + values in an ESMF_Array instead. That interface supports the retrieval of + coordinates up to 7D. + +

+Supported values for the farrayPtr argument are: +

+
+
real(ESMF_KIND_R4), pointer :: farrayPtr(:) + +
+
+
real(ESMF_KIND_R4), pointer :: farrayPtr(:,:) + +
+
+
real(ESMF_KIND_R4), pointer :: farrayPtr(:,:,:) + +
+
+
real(ESMF_KIND_R8), pointer :: farrayPtr(:) + +
+
+
real(ESMF_KIND_R8), pointer :: farrayPtr(:,:) + +
+
+
real(ESMF_KIND_R8), pointer :: farrayPtr(:,:,:) + +
+
+ +

+The arguments are: +

+
grid
+
Grid to get the information from. + +
+
coordDim
+
The coordinate dimension to get the data from (e.g. 1=x). + +
+
[staggerloc]
+
The stagger location to get the information for. + Please see Section 31.2.6 for a list + of predefined stagger locations. If not present, defaults to ESMF_STAGGERLOC_CENTER. + +
+
[localDE]
+
The local DE for which information is requested. [0,..,localDECount-1]. + For localDECount==1 the localDE argument may be omitted, + in which case it will default to localDE=0. + +
+
farrayPtr
+
The pointer to the coordinate data. + +
+
[datacopyflag]
+
If not specified, default to ESMF_DATACOPY_REFERENCE, in this case + farrayPtr is a reference to the data in the Grid coordinate arrays. + Please see Section 54.13 for further description and a + list of valid values. + +
+
[exclusiveLBound]
+
Upon return this holds the lower bounds of the exclusive region. + exclusiveLBound must be allocated to be of size equal to the coord dimCount. + +
+
[exclusiveUBound]
+
Upon return this holds the upper bounds of the exclusive region. + exclusiveUBound must be allocated to be of size equal to the coord dimCount. + +
+
[exclusiveCount]
+
Upon return this holds the number of items, exclusiveUBound-exclusiveLBound+1, + in the exclusive region per dimension. + exclusiveCount must + be allocated to be of size equal to the coord dimCount. + Please see Section 31.3.19 for a description + of the regions and their associated bounds and counts. + +
+
[computationalLBound]
+
Upon return this holds the lower bounds of the stagger region. + computationalLBound must be allocated to be of size equal to the coord dimCount. + Please see Section 31.3.19 for a description + of the regions and their associated bounds and counts. + +
+
[computationalUBound]
+
Upon return this holds the upper bounds of the stagger region. + exclusiveUBound must be allocated to be of size equal to the coord dimCount. + Please see Section 31.3.19 for a description + of the regions and their associated bounds and counts. + +
+
[computationalCount]
+
Upon return this holds the number of items in the computational region per dimension + (i.e. computationalUBound-computationalLBound+1). computationalCount + must be allocated to be of size equal to the coord dimCount. + Please see Section 31.3.19 for a description + of the regions and their associated bounds and counts. + +
+
[totalLBound]
+
Upon return this holds the lower bounds of the total region. + totalLBound must be allocated to be of size equal to the coord dimCount. + Please see Section 31.3.19 for a description + of the regions and their associated bounds and counts. + +
+
[totalUBound]
+
Upon return this holds the upper bounds of the total region. + totalUBound must be allocated to be of size equal to the coord dimCount. + Please see Section 31.3.19 for a description + of the regions and their associated bounds and counts. + +
+
[totalCount]
+
Upon return this holds the number of items in the total region per dimension + (i.e. totalUBound-totalLBound+1). totalCount must + be allocated to be of size equal to the coord dimCount. + Please see Section 31.3.19 for a description + of the regions and their associated bounds and counts. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+31.6.42 ESMF_GridGetCoord - Get coordinates and put into an Array +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_GridGetCoord()
+       subroutine ESMF_GridGetCoordIntoArray(grid, coordDim, staggerloc, &
+         array, rc)
+
ARGUMENTS: +
       type(ESMF_Grid),        intent(in)            :: grid
+       integer,                intent(in)            :: coordDim
+       type (ESMF_StaggerLoc), intent(in),  optional :: staggerloc
+       type(ESMF_Array),       intent(out)           :: array
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       integer,                intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+This method allows the user to get access to the ESMF Array holding + coordinate data at a particular stagger location. This is useful, for example, + to set the coordinate values. To have an Array to access, the coordinate Arrays + must have already been allocated, for example by ESMF_GridAddCoord or + ESMF_GridSetCoord. + +

+The arguments are: +

+
grid
+
The grid to get the coord array from. + +
+
coordDim
+
The coordinate dimension to get the data from (e.g. 1=x). + +
+
[staggerloc]
+
The stagger location from which to get the arrays. + Please see Section 31.2.6 for a list + of predefined stagger locations. If not present, defaults to ESMF_STAGGERLOC_CENTER. + +
+
array
+
An array into which to put the coordinate information. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+31.6.43 ESMF_GridGetCoord - Get DE-local coordinates from a specific index location in a Grid +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_GridGetCoord()
+       subroutine ESMF_GridGetCoordR4(grid, staggerloc, localDE, &
+         index, coord, rc)
+
ARGUMENTS: +
       type(ESMF_Grid),        intent(in)            :: grid
+       type (ESMF_StaggerLoc), intent(in),  optional :: staggerloc
+       integer,                intent(in),  optional :: localDE
+       integer,                intent(in)            :: index(:)
+       real(ESMF_KIND_R4),     intent(out)           :: coord(:)
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       integer,                intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Given a specific index location in a Grid, this method returns the full set + of coordinates from that index location. This method should work no matter what + the factorization of the Grid's coordinate components. + +

+The arguments are: +

+
grid
+
Grid to get the information from. + +
+
[staggerloc]
+
The stagger location to get the information for. + Please see Section 31.2.6 for a list + of predefined stagger locations. If not present, defaults to + ESMF_STAGGERLOC_CENTER. + +
+
[localDE]
+
The local DE for which information is requested. [0,..,localDECount-1]. + For localDECount==1 the localDE argument may be omitted, + in which case it will default to localDE=0. + +
+
index
+
This array holds the index location to be queried in the Grid. This array must + at least be of the size Grid rank. + +
+
coord
+
This array will be filled with the coordinate data. This array must + at least be of the size Grid rank. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+31.6.44 ESMF_GridGetCoord - Get DE-local coordinates from a specific index location in a Grid +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_GridGetCoord()
+       subroutine ESMF_GridGetCoordR8(grid, staggerloc, localDE, &
+         index, coord, rc)
+
ARGUMENTS: +
       type(ESMF_Grid),        intent(in)            :: grid
+       type (ESMF_StaggerLoc), intent(in),  optional :: staggerloc
+       integer,                intent(in),  optional :: localDE
+       integer,                intent(in)            :: index(:)
+       real(ESMF_KIND_R8),     intent(out)           :: coord(:)
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       integer,                intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Given a specific index location in a Grid, this method returns the full set + of coordinates from that index location. This method should work no matter what + the factorization of the Grid's coordinate components. + +

+The arguments are: +

+
grid
+
Grid to get the information from. + +
+
[staggerloc]
+
The stagger location to get the information for. + Please see Section 31.2.6 for a list + of predefined stagger locations. If not present, defaults to + ESMF_STAGGERLOC_CENTER. + +
+
[localDE]
+
The local DE for which information is requested. [0,..,localDECount-1]. + For localDECount==1 the localDE argument may be omitted, + in which case it will default to localDE=0. + +
+
index
+
This array holds the index location to be queried in the Grid. This array must + at least be of the size Grid rank. + +
+
coord
+
This array will be filled with the coordinate data. This array must + at least be of the size Grid rank. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+31.6.45 ESMF_GridGetCoord - Get information about the coordinates at a particular stagger location +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_GridGetCoord()
+       subroutine ESMF_GridGetCoordInfo(grid, &
+         staggerloc, isPresent, rc)
+
ARGUMENTS: +
       type(ESMF_Grid),           intent(in)            :: grid
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       type (ESMF_StaggerLoc),    intent(in),  optional :: staggerloc
+       logical,                   intent(out), optional :: isPresent
+       integer,                   intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+This method allows the user to get information about the coordinates on a given + stagger. + +

+The arguments are: +

+
grid
+
Grid to get the information from. + +
+
[staggerloc]
+
The stagger location from which to get information. + Please see Section 31.2.6 for a list + of predefined stagger locations. If not present, defaults to ESMF_STAGGERLOC_CENTER. + +
+
[isPresent]
+
If .true. then coordinates have been added on this staggerloc. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+31.6.46 ESMF_GridGetCoordBounds - Get Grid coordinate bounds +

+ +

+ +

+
+INTERFACE: +

       subroutine ESMF_GridGetCoordBounds(grid, coordDim,   &
+         staggerloc, localDE, exclusiveLBound, exclusiveUBound, &
+         exclusiveCount, computationalLBound, computationalUBound , &
+         computationalCount, totalLBound, totalUBound, totalCount, rc)
+
ARGUMENTS: +
       type(ESMF_Grid),        intent(in)            :: grid
+       integer,                intent(in)            :: coordDim
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       type (ESMF_StaggerLoc), intent(in),  optional :: staggerloc
+       integer,                intent(in),  optional :: localDE
+       integer,        target, intent(out), optional :: exclusiveLBound(:)
+       integer,        target, intent(out), optional :: exclusiveUBound(:)
+       integer,        target, intent(out), optional :: exclusiveCount(:)
+       integer,        target, intent(out), optional :: computationalLBound(:)
+       integer,        target, intent(out), optional :: computationalUBound(:)
+       integer,        target, intent(out), optional :: computationalCount(:)
+       integer,        target, intent(out), optional :: totalLBound(:)
+       integer,        target, intent(out), optional :: totalUBound(:)
+       integer,        target, intent(out), optional :: totalCount(:)
+       integer,                intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+This method gets information about the range of index space which a particular + piece of coordinate data occupies. In other words, this method returns the + bounds of the coordinate arrays. Note that unlike the output from the + Array, these values also include the undistributed dimensions and are + ordered to reflect the order of the indices in the coordinate. So, for example, + totalLBound and totalUBound should match the bounds of the Fortran array + retrieved by ESMF_GridGetCoord. + +

+The arguments are: +

+
grid
+
Grid to get the information from. + +
+
coordDim
+
The coordinate dimension to get the information for (e.g. 1=x). + +
+
[staggerloc]
+
The stagger location to get the information for. + Please see Section 31.2.6 for a list + of predefined stagger locations. If not present, defaults to + ESMF_STAGGERLOC_CENTER. + +
+
[localDE]
+
The local DE for which information is requested. [0,..,localDECount-1]. + For localDECount==1 the localDE argument may be omitted, + in which case it will default to localDE=0. + +
+
[exclusiveLBound]
+
Upon return this holds the lower bounds of the exclusive region. + exclusiveLBound must be allocated to be of size equal to the coord dimCount. + Please see Section 31.3.19 for a description + of the regions and their associated bounds and counts. + +
+
[exclusiveUBound]
+
Upon return this holds the upper bounds of the exclusive region. + exclusiveUBound must be allocated to be of size equal to the coord dimCount. + Please see Section 31.3.19 for a description + of the regions and their associated bounds and counts. + +
+
[exclusiveCount]
+
Upon return this holds the number of items, exclusiveUBound-exclusiveLBound+1, + in the exclusive region per dimension. + exclusiveCount must + be allocated to be of size equal to the coord dimCount. + Please see Section 31.3.19 for a description + of the regions and their associated bounds and counts. + +
+
[computationalLBound]
+
Upon return this holds the lower bounds of the stagger region. + computationalLBound must be allocated to be of size equal to the coord dimCount. + Please see Section 31.3.19 for a description + of the regions and their associated bounds and counts. + +
+
[computationalUBound]
+
Upon return this holds the upper bounds of the stagger region. + computationalUBound must be allocated to be of size equal to the coord dimCount. + Please see Section 31.3.19 for a description + of the regions and their associated bounds and counts. + +
+
[computationalCount]
+
Upon return this holds the number of items in the computational region per dimension + (i.e. computationalUBound-computationalLBound+1). computationalCount + must be allocated to be of size equal to the coord dimCount. + Please see Section 31.3.19 for a description + of the regions and their associated bounds and counts. + +
+
[totalLBound]
+
Upon return this holds the lower bounds of the total region. + totalLBound must be allocated to be of size equal to the coord dimCount. + Please see Section 31.3.19 for a description + of the regions and their associated bounds and counts. + +
+
[totalUBound]
+
Upon return this holds the upper bounds of the total region. + totalUBound must be allocated to be of size equal to the coord dimCount. + Please see Section 31.3.19 for a description + of the regions and their associated bounds and counts. + +
+
[totalCount]
+
Upon return this holds the number of items in the total region per dimension + (i.e. totalUBound-totalLBound+1). totalCount must + be allocated to be of size equal to the coord dimCount. + Please see Section 31.3.19 for a description + of the regions and their associated bounds and counts. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+31.6.47 ESMF_GridGetItem - Get a DE-local Fortran array pointer to Grid item data and item bounds +

+ +

+ +

+
+INTERFACE: +

        subroutine ESMF_GridGetItem<rank><type><kind>(grid, itemflag,  &
+          staggerloc, localDE, farrayPtr, datacopyflag,                  &
+          exclusiveLBound, exclusiveUBound, exclusiveCount,              &
+          computationalLBound, computationalUBound, computationalCount,  &
+          totalLBound, totalUBound, totalCount, rc)
+
ARGUMENTS: +
       type(ESMF_Grid),      intent(in)               :: grid
+       type (ESMF_GridItem_Flag),intent(in)           :: itemflag
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       type (ESMF_StaggerLoc), intent(in),  optional  :: staggerloc
+       integer,              intent(in),    optional  :: localDE
+       <type> (ESMF_KIND_<kind>), pointer             :: farrayPtr(<rank>)
+       type(ESMF_DataCopy_Flag),intent(in), optional  :: datacopyflag
+       integer,              intent(out),   optional  :: exclusiveLBound(:)
+       integer,              intent(out),   optional  :: exclusiveUBound(:)
+       integer,              intent(out),   optional  :: exclusiveCount(:)
+       integer,              intent(out),   optional  :: computationalLBound(:)
+       integer,              intent(out),   optional  :: computationalUBound(:)
+       integer,              intent(out),   optional  :: computationalCount(:)
+       integer,              intent(out),   optional  :: totalLBound(:)
+       integer,              intent(out),   optional  :: totalUBound(:)
+       integer,              intent(out),   optional  :: totalCount(:)
+       integer,              intent(out),   optional  :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+This method gets a Fortran pointer to the piece of memory which holds the + item data on the local DE for the given stagger locations. + This is useful, for example, for setting the item values in a Grid, or + for reading the item values. Currently this method supports up to three + grid dimensions, but is limited to the I4 datatype. See below for specific + supported values. If the item values that you are trying to retrieve are of + higher dimension, use the ESMF_GetItem() interface that returns coordinate + values in an ESMF_Array instead. That interface supports the retrieval of + coordinates up to 7D. + +

+Supported values for the farrayPtr argument are: +

+
+
integer(ESMF_KIND_I4), pointer :: farrayPtr(:) + +
+
+
integer(ESMF_KIND_I4), pointer :: farrayPtr(:,:) + +
+
+
integer(ESMF_KIND_I4), pointer :: farrayPtr(:,:,:) + +
+
+
real(ESMF_KIND_R4), pointer :: farrayPtr(:) + +
+
+
real(ESMF_KIND_R4), pointer :: farrayPtr(:,:) + +
+
+
real(ESMF_KIND_R4), pointer :: farrayPtr(:,:,:) + +
+
+
real(ESMF_KIND_R8), pointer :: farrayPtr(:) + +
+
+
real(ESMF_KIND_R8), pointer :: farrayPtr(:,:) + +
+
+
real(ESMF_KIND_R8), pointer :: farrayPtr(:,:,:) + +
+
+ +

+The arguments are: +

+
grid
+
Grid to get the information from. + +
+
itemflag
+
The item to get the information for. Please see Section 31.2.2 for a + list of valid items. + +
+
[staggerloc]
+
The stagger location to get the information for. + Please see Section 31.2.6 for a list + of predefined stagger locations. If not present, defaults to ESMF_STAGGERLOC_CENTER. + +
+
[localDE]
+
The local DE for which information is requested. [0,..,localDECount-1]. + For localDECount==1 the localDE argument may be omitted, + in which case it will default to localDE=0. + +
+
farrayPtr
+
The pointer to the item data. + +
+
[datacopyflag]
+
If not specified, default to ESMF_DATACOPY_REFERENCE, in this case + farrayPtr is a reference to the data in the Grid item arrays. + Please see Section 54.13 for further description and a + list of valid values. + +
+
[exclusiveLBound]
+
Upon return this holds the lower bounds of the exclusive region. + exclusiveLBound must be allocated to be of size equal to the grid dimCount. + +
+
[exclusiveUBound]
+
Upon return this holds the upper bounds of the exclusive region. + exclusiveUBound must be allocated to be of size equal to the grid dimCount. + +
+
[exclusiveCount]
+
Upon return this holds the number of items in the exclusive region per dimension + (i.e. exclusiveUBound-exclusiveLBound+1). exclusiveCount must + be allocated to be of size equal to the grid dimCount. + Please see Section 31.3.19 for a description + of the regions and their associated bounds and counts. + +
+
[computationalLBound]
+
Upon return this holds the lower bounds of the stagger region. + computationalLBound must be allocated to be of size equal to the grid dimCount. + Please see Section 31.3.19 for a description + of the regions and their associated bounds and counts. + +
+
[computationalUBound]
+
Upon return this holds the upper bounds of the stagger region. + exclusiveUBound must be allocated to be of size equal to the grid dimCount. + Please see Section 31.3.19 for a description + of the regions and their associated bounds and counts. + +
+
[computationalCount]
+
Upon return this holds the number of items in the computational region per dimension + (i.e. computationalUBound-computationalLBound+1). computationalCount + must be allocated to be of size equal to the grid dimCount. + Please see Section 31.3.19 for a description + of the regions and their associated bounds and counts. + +
+
[totalLBound]
+
Upon return this holds the lower bounds of the total region. + totalLBound must be allocated to be of size equal to the grid dimCount. + Please see Section 31.3.19 for a description + of the regions and their associated bounds and counts. + +
+
[totalUBound]
+
Upon return this holds the upper bounds of the total region. + totalUBound must be allocated to be of size equal to the grid dimCount. + Please see Section 31.3.19 for a description + of the regions and their associated bounds and counts. + +
+
[totalCount]
+
Upon return this holds the number of items in the total region per dimension + (i.e. totalUBound-totalLBound+1). totalCount must + be allocated to be of size equal to the grid dimCount. + Please see Section 31.3.19 for a description + of the regions and their associated bounds and counts. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+31.6.48 ESMF_GridGetItem - Get a Grid item and put into an Array +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_GridGetItem()
+       subroutine ESMF_GridGetItemIntoArray(grid, itemflag,  staggerloc, &
+         array, rc)
+
ARGUMENTS: +
       type(ESMF_Grid),           intent(in)            :: grid
+       type (ESMF_GridItem_Flag), intent(in)            :: itemflag
+       type (ESMF_StaggerLoc),    intent(in),  optional :: staggerloc
+       type(ESMF_Array),          intent(out)           :: array
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       integer,                   intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+This method allows the user to get access to the ESMF Array holding + item data at a particular stagger location. This is useful, for example, + to set the item values. To have an Array to access, the item Array + must have already been allocated, for example by ESMF_GridAddItem or + ESMF_GridSetItem. + +

+The arguments are: +

+
grid
+
Grid to get the information from. + +
+
itemflag
+
The item from which to get the arrays. Please see Section 31.2.2 for a + list of valid items. + +
+
[staggerloc]
+
The stagger location from which to get the arrays. + Please see Section 31.2.6 for a list + of predefined stagger locations. If not present, defaults to ESMF_STAGGERLOC_CENTER. + +
+
array
+
An array into which to put the item information. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+31.6.49 ESMF_GridGetItem - Get information about an item at a particular stagger location +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_GridGetItem()
+       subroutine ESMF_GridGetItemInfo(grid, itemflag, &
+         staggerloc, isPresent, rc)
+
ARGUMENTS: +
       type(ESMF_Grid),           intent(in)            :: grid
+       type (ESMF_GridItem_Flag), intent(in)            :: itemflag
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       type (ESMF_StaggerLoc),    intent(in),  optional :: staggerloc
+       logical,                   intent(out), optional :: isPresent
+       integer,                   intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+This method allows the user to get information about a given item on a given + stagger. + +

+The arguments are: +

+
grid
+
Grid to get the information from. + +
+
itemflag
+
The item for which to get information. Please see Section 31.2.2 for a + list of valid items. + +
+
[staggerloc]
+
The stagger location for which to get information. + Please see Section 31.2.6 for a list + of predefined stagger locations. If not present, defaults to ESMF_STAGGERLOC_CENTER. + +
+
[isPresent]
+
If .true. then an item of type itemflag has been added to this staggerloc. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+31.6.50 ESMF_GridGetItemBounds - Get DE-local item bounds from a Grid +

+ +

+ +

+
+INTERFACE: +

       subroutine ESMF_GridGetItemBounds(grid, itemflag,  &
+         staggerloc, localDE, &
+         exclusiveLBound, exclusiveUBound, exclusiveCount, &
+         computationalLBound, computationalUBound, computationalCount,  &
+         totalLBound, totalUBound, totalCount, rc)
+
ARGUMENTS: +
       type(ESMF_Grid),        intent(in)            :: grid
+       type (ESMF_GridItem_Flag), intent(in)         :: itemflag
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       type (ESMF_StaggerLoc), intent(in),  optional :: staggerloc
+       integer,                intent(in),  optional :: localDE
+       integer,        target, intent(out), optional :: exclusiveLBound(:)
+       integer,        target, intent(out), optional :: exclusiveUBound(:)
+       integer,        target, intent(out), optional :: exclusiveCount(:)
+       integer,        target, intent(out), optional :: computationalLBound(:)
+       integer,        target, intent(out), optional :: computationalUBound(:)
+       integer,        target, intent(out), optional :: computationalCount(:)
+       integer,        target, intent(out), optional :: totalLBound(:)
+       integer,        target, intent(out), optional :: totalUBound(:)
+       integer,        target, intent(out), optional :: totalCount(:)
+       integer,                intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+This method gets information about the range of index space which a particular + piece of item data occupies. In other words, this method returns the + bounds of the item arrays. Note that unlike the output from the + Array, these values also include the undistributed dimensions and are + ordered to reflect the order of the indices in the item. So, for example, + totalLBound and totalUBound should match the bounds of the Fortran array + retrieved by ESMF_GridGetItem. + +

+The arguments are: +

+
grid
+
Grid to get the information from. + +
+
itemflag
+
The item to get the information for. Please see Section 31.2.2 for a + list of valid items. + +
+
[staggerloc]
+
The stagger location to get the information for. + Please see Section 31.2.6 for a list + of predefined stagger locations. If not present, defaults to + ESMF_STAGGERLOC_CENTER. + +
+
[localDE]
+
The local DE for which information is requested. [0,..,localDECount-1]. + For localDECount==1 the localDE argument may be omitted, + in which case it will default to localDE=0. + +
+
[exclusiveLBound]
+
Upon return this holds the lower bounds of the exclusive region. + exclusiveLBound must be allocated to be of size equal to the item dimCount. + Please see Section 31.3.19 for a description + of the regions and their associated bounds and counts. + +
+
[exclusiveUBound]
+
Upon return this holds the upper bounds of the exclusive region. + exclusiveUBound must be allocated to be of size equal to the item dimCount. + Please see Section 31.3.19 for a description + of the regions and their associated bounds and counts. + +
+
[exclusiveCount]
+
Upon return this holds the number of items, exclusiveUBound-exclusiveLBound+1, + in the exclusive region per dimension. + exclusiveCount must + be allocated to be of size equal to the item dimCount. + Please see Section 31.3.19 for a description + of the regions and their associated bounds and counts. + +
+
[computationalLBound]
+
Upon return this holds the lower bounds of the stagger region. + computationalLBound must be allocated to be of size equal to the item dimCount. + Please see Section 31.3.19 for a description + of the regions and their associated bounds and counts. + +
+
[computationalUBound]
+
Upon return this holds the upper bounds of the stagger region. + computationalUBound must be allocated to be of size equal to the item dimCount. + Please see Section 31.3.19 for a description + of the regions and their associated bounds and counts. + +
+
[computationalCount]
+
Upon return this holds the number of items in the computational region per dimension + (i.e. computationalUBound-computationalLBound+1). computationalCount + must be allocated to be of size equal to the item dimCount. + Please see Section 31.3.19 for a description + of the regions and their associated bounds and counts. + +
+
[totalLBound]
+
Upon return this holds the lower bounds of the total region. + totalLBound must be allocated to be of size equal to the item dimCount. + Please see Section 31.3.19 for a description + of the regions and their associated bounds and counts. + +
+
[totalUBound]
+
Upon return this holds the upper bounds of the total region. + totalUBound must be allocated to be of size equal to the item dimCount. + Please see Section 31.3.19 for a description + of the regions and their associated bounds and counts. + +
+
[totalCount]
+
Upon return this holds the number of items in the total region per dimension + (i.e. totalUBound-totalLBound+1). totalCount must + be allocated to be of size equal to the item dimCount. + Please see Section 31.3.19 for a description + of the regions and their associated bounds and counts. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+31.6.51 ESMF_GridIsCreated - Check whether a Grid object has been created +

+ +

+ +

+
+INTERFACE: +

   function ESMF_GridIsCreated(grid, rc)
+
RETURN VALUE: +
     logical :: ESMF_GridIsCreated
+
ARGUMENTS: +
     type(ESMF_Grid), intent(in)            :: grid
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,             intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Return .true. if the grid has been created. Otherwise return + .false.. If an error occurs, i.e. rc /= ESMF_SUCCESS is + returned, the return value of the function will also be .false.. + +

+The arguments are: +

+
grid
+
ESMF_Grid queried. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+31.6.52 ESMF_GridMatch - Check if two Grid objects match +

+ +

+ +

+
+INTERFACE: +

   function ESMF_GridMatch(grid1, grid2, globalflag, rc)
+
RETURN VALUE: +
     type(ESMF_GridMatch_Flag) :: ESMF_GridMatch
+
ARGUMENTS: +
     type(ESMF_Grid),  intent(in)              :: grid1
+     type(ESMF_Grid),  intent(in)              :: grid2
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     logical,          intent(in),   optional  :: globalflag
+     integer,          intent(out),  optional  :: rc
+
+DESCRIPTION: +
+ +

+Check if grid1 and grid2 match. Returns a range of values of type + ESMF_GridMatch indicating how closely the Grids match. For a description of + the possible return values, please see 31.2.3. + Please also note that by default this call is not collective and only + returns the match for the piece of the Grids on the local PET. In this case, + it is possible for this call to return a different match on different PETs + for the same Grids. To do a global match operation set the globalflag + argument to .true.. In this case, the call becomes collective across the + current VM, ensuring the same result is returned on all PETs. + +

+The arguments are: +

+
grid1
+
ESMF_Grid object. + +
+
grid2
+
ESMF_Grid object. + +
+
[globalflag]
+
By default this flag is set to false. When it's set to true, the + function performs the match check globally. In this case, + the method becomes collective across the current VM. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+31.6.53 ESMF_GridRedist - Redistribute the coordinates of a Grid +

+ +

+ +

+
+INTERFACE: +

     subroutine ESMF_GridRedist(srcGrid, dstGrid, routehandle, rc)
+
ARGUMENTS: +
        type(ESMF_Grid),       intent(in)              :: srcGrid
+        type(ESMF_Grid),       intent(inout)           :: dstGrid
+        type(ESMF_RouteHandle),intent(inout)           :: routehandle
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+        integer,               intent(out),  optional  :: rc
+
+DESCRIPTION: +
+ +

+This call is companion to the ESMF_GridCreate() that allows the user to copy an + existing ESMF Grid, but with a new distribution. The ESMF_GridRedist() allows + the user to repeatedly redistribute the coordinates from srcGrid to dstGrid. + +

+The arguments are: +

+
srcGrid
+
The source grid providing the coordinates. + +
+
srcGrid
+
The destination grid receiving the coordinates from srcGrid. + +
+
routehandle
+
The ESMF_RouteHandle object returned by the companion method + ESMF_GridCreate() used to create dstGrid from srcGrid. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+31.6.54 ESMF_GridSetCoord - Set coordinates using Arrays +

+ +

+ +

+
+INTERFACE: +

       subroutine ESMF_GridSetCoordFromArray(grid, coordDim, staggerloc, &
+         array, rc)
+
ARGUMENTS: +
       type(ESMF_Grid),        intent(in)            :: grid
+       integer,                intent(in)            :: coordDim
+       type (ESMF_StaggerLoc), intent(in),  optional :: staggerloc
+       type(ESMF_Array),       intent(in)            :: array
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       integer,                intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+This method sets the passed in Array as the holder of the coordinate + data for stagger location staggerloc and coordinate coord. This method + can be used in place of ESMF_GridAddCoord(). In fact, if the Grid + location already contains an Array for this coordinate, then this one + replaces it. For this method to replace ESMF_GridAddCoord() and produce + a valid set of coordinates, then this method must be used to set + an Array for each coordDim ranging from 1 to the dimCount of the passed in Grid. + +

+The arguments are: +

+
grid
+
The grid to set the coord in. + +
+
coordDim
+
The coordinate dimension to put the data in (e.g. 1=x). + +
+
[staggerloc]
+
The stagger location into which to copy the arrays. + Please see Section 31.2.6 for a list + of predefined stagger locations. If not present, defaults to + ESMF_STAGGERLOC_CENTER. + +
+
array
+
An array to set the grid coordinate information from. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+31.6.55 ESMF_GridSetItem - Set an item using an Array +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_GridSetItem()
+       subroutine ESMF_GridSetItemFromArray(grid, itemflag,  staggerloc, &
+         array, rc)
+
ARGUMENTS: +
       type(ESMF_Grid),           intent(in)            :: grid
+       type (ESMF_GridItem_Flag), intent(in)            :: itemflag
+       type (ESMF_StaggerLoc),    intent(in),  optional :: staggerloc
+       type(ESMF_Array),          intent(in)            :: array
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       integer,                   intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+This method sets the passed in Array as the holder of the item data + for stagger location staggerloc and item itemflag. If the location + already contains an Array, then this one overwrites it. This method can + be used as a replacement for ESMF_GridAddItem(). + +

+The arguments are: +

+
grid
+
The grid in which to set the array. + +
+
itemflag
+
The item into which to copy the arrays. Please see Section 31.2.2 for a + list of valid items. + +
+
[staggerloc]
+
The stagger location into which to copy the arrays. + Please see Section 31.2.6 for a list + of predefined stagger locations. If not present, defaults to + ESMF_STAGGERLOC_CENTER. + +
+
array
+
An array to set the grid item information from. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+31.6.56 ESMF_GridValidate - Validate Grid internals +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_GridValidate(grid, rc)
+
ARGUMENTS: +
     type(ESMF_Grid), intent(in)              :: grid
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,         intent(out),  optional  :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Validates that the Grid is internally consistent. + Note that one of the checks that the Grid validate does + is the Grid status. Currently, the validate will return + an error if the grid is not at least + ESMF_GRIDSTATUS_COMPLETE. This means that + if a Grid was created with the ESMF_GridEmptyCreate + method, it must also have been finished with + ESMF_GridEmptyComplete() + to be valid. If a Grid was created with another create + call it should automatically have the correct status level + to pass the status part of the validate. + The Grid validate at this time doesn't check for the presence + or consistency of the Grid coordinates. + The method returns an error code if problems are found. + +

+The arguments are: +

+
grid
+
Specified ESMF_Grid object. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ + +

+31.7 Class API: StaggerLoc Methods +

  +

+ +

+ +

+ +

+31.7.1 ESMF_StaggerLocGet - Get the value of one dimension of a StaggerLoc +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_StaggerLocGet() 
+       subroutine ESMF_StaggerLocGetDim(staggerloc, dim, loc, &
+            rc)
+
ARGUMENTS: +
       type (ESMF_StaggerLoc), intent(in)  :: staggerloc
+       integer,                intent(in)  :: dim
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       integer, optional,      intent(out) :: loc
+       integer, optional                   :: rc
+
+DESCRIPTION: +
+ +

+Gets the position of a particular dimension of a cell staggerloc + The argument loc will be only be 0,1. + If loc is 0 it means the position + should be in the center in that dimension. If loc is +1 then + for the dimension, the position should be on the positive side of the cell. + Please see Section 31.3.25 for diagrams. + +

+The arguments are: +

+
staggerloc
+
Stagger location for which to get information. + +
+
dim
+
Dimension for which to get information (1-7). + +
+
[loc]
+
Output position data (should be either 0,1). + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+31.7.2 ESMF_StaggerLocSet - Set a StaggerLoc to a particular position in the cell +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_StaggerLocSet() 
+      subroutine ESMF_StaggerLocSetAllDim(staggerloc, loc, rc)
+
ARGUMENTS: +
       type (ESMF_StaggerLoc), intent(inout) :: staggerloc
+       integer,                intent(in)    :: loc(:)
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       integer, optional                     :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Sets a custom staggerloc to a position in a cell by using the array + loc. The values in the array should only be 0,1. If loc(i) is 0 it + ! means the position should be in the center in that dimension. If loc(i) is 1 then + for dimension i, the position should be on the side of the cell. + Please see Section 31.3.25 + for diagrams and further discussion of custom stagger locations. + +

+The arguments are: +

+
staggerloc
+
Grid location to be initialized + +
+
loc
+
Array holding position data. Each entry in loc should only + be 0 or 1. note that dimensions beyond those specified are set to 0. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+31.7.3 ESMF_StaggerLocSet - Set one dimension of a StaggerLoc to a particular position +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_StaggerLocSet() 
+        subroutine ESMF_StaggerLocSetDim(staggerloc, dim, loc, &
+             rc)
+
ARGUMENTS: +
       type (ESMF_StaggerLoc), intent(inout) :: staggerloc
+       integer,                intent(in)    :: dim
+       integer,                intent(in)    :: loc
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       integer, optional                     :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Sets a particular dimension of a custom staggerloc to a position in a cell + by using the variable loc. The variable loc should only be 0,1. + If loc is 0 it means the position + should be in the center in that dimension. If loc is +1 then + for the dimension, the position should be on the positive side of the cell. + Please see Section 31.3.25 + for diagrams and further discussion of custom stagger locations. + +

+The arguments are: +

+
staggerloc
+
Stagger location to be initialized + +
+
dim
+
Dimension to be changed (1-7). + +
+
loc
+
Position data should be either 0,1. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+31.7.4 ESMF_StaggerLocString - Return a StaggerLoc as a string +

+ +

+ +

+
+INTERFACE: +

       subroutine ESMF_StaggerLocString(staggerloc, string, &
+            rc)
+
ARGUMENTS: +
       type(ESMF_StaggerLoc), intent(in)  :: staggerloc
+       character (len = *),   intent(out) :: string
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       integer, optional,     intent(out) :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Return an ESMF_StaggerLoc as a printable string. + +

+The arguments are: +

+
staggerloc
+
The ESMF_StaggerLoc to be turned into a string. + +
+
string
+
Return string. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+31.7.5 ESMF_StaggerLocPrint - Print StaggerLoc information +

+ +

+ +

+
+INTERFACE: +

       subroutine ESMF_StaggerLocPrint(staggerloc, rc)
+
ARGUMENTS: +
       type (ESMF_StaggerLoc), intent(in)  :: staggerloc
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       integer, optional,      intent(out) :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Print the internal data members of an ESMF_StaggerLoc object. +
+

+The arguments are: +

+
staggerloc
+
ESMF_StaggerLoc object as the method input + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ + +

+32 LocStream Class +

+ +

+32.1 Description +

+ +

+A location stream (LocStream) can be used to represent the locations of +a set of data points. For example, in the data assimilation world, +LocStreams can be used to represent a set of observations. The values +of the data points are stored within a Field or FieldBundle created +using the LocStream. + +

+The locations are generally described using Cartesian (x, y, z), or +(lat, lon, radius) coordinates. The coordinates are stored using +constructs called keys. A Key is essentially a list of point +descriptors, one for each data point. They may hold other information +besides the coordinates - a mask, for example. They may also hold a +second set of coordinates. Keys are referenced by name - see +32.2.1 and 32.2.2 for specific +keynames required in regridding. Each key must contain the same +number of elements as there are data points in the LocStream. While +there is no assumption in the ordering of the points, the order +chosen must be maintained in each of the keys. + +

+LocStreams can be very large. Data assimilation systems might use +LocStreams with up to $10^{8}$ observations, so efficiency is critical. +LocStreams can be created from file, see 32.4.14. + +

+Common operations involving LocStreams are similar to those involving Grids. +For example, LocStreams allow users to: + +

+ +

    +
  1. Create a Field or FieldBundle on a LocStream +
  2. +
  3. Regrid data in Fields defined on LocStreams +
  4. +
  5. Redistribute data between Fields defined on LocStreams +
  6. +
  7. Gather or scatter a FieldBundle defined on a LocStream from/to a root DE +
  8. +
  9. Extract Fortran array from Field which was defined on a LocStream +
  10. +
+ +

+A LocStream differs from a Grid in that no topological structure is +maintained between the points +(e.g. the class contains no information about which point is the neighbor +of which other point). + +

+A LocStream is similar to a Mesh in that both are collections of irregularly positioned +points. However, the two structures differ because a Mesh also has connectivity: +each data point represents either a center or corner of a cell. There is no requirement that the +points in a LocStream have connectivity, in fact there is no requirement that any two points +have any particular spatial relationship at all. + +

+32.2 Constants +

+ +

+ +

+ +
+32.2.1 Coordinate keyNames +

+ +

+DESCRIPTION: +
+For ESMF to be able to use coordinates specified in a LocStream key (e.g. in regridding) +they need to be named with the appropriate identifiers. The particular identifiers depend +on the coordinate system (i.e. coordSys argument) used to create the LocStream containing +the keys. ESMF regridding expects these keys to be of type ESMF_TYPEKIND_R8. + +

+The valid values are: +
+ + + + + + + + + + + + + + + + + + + + + +
Coordinate Systemdimension 1dimension 2dimension 3 (if used)
ESMF_COORDSYS_SPH_DEGESMF:LonESMF:LatESMF:Radius
ESMF_COORDSYS_SPH_RADESMF:LonESMF:LatESMF:Radius
ESMF_COORDSYS_CARTESMF:XESMF:YESMF:Z
+ +

+ +

+ +
+32.2.2 Masking keyName +

+ +

+DESCRIPTION: +
+Points within a LocStream can be marked and then potentially ignored during certain +operations, like regridding. This masking information must be contained in a key +named with the appropriate identifier. ESMF regridding expects this key to be +of type ESMF_TYPEKIND_I4. + +

+The valid value is: +

+
ESMF:Mask
+
+
+
+ +

+32.3 Use and Examples +

+ +

+ +

+ +

+ +

+32.3.1 Create a LocStream with user allocated memory +

+ +

+The following is an example of creating a LocStream object. + After creation, key data is added, and a Field is created to hold data + (temperature) at each location. + +

+

+   !-------------------------------------------------------------------
+   ! Get parallel information. Here petCount is the total number of 
+   ! running PETs, and localPet is the number of this particular PET.
+   !-------------------------------------------------------------------
+   call ESMF_VMGet(vm, localPet=localPet, petCount=petCount, rc=rc)
+
+ +

+

+   !-------------------------------------------------------------------
+   ! Allocate and set example location information. Locations on a PET
+   ! are wrapped around sphere. Each PET occupies a different latitude
+   ! ranging from +50.0 to -50.0.
+   !-------------------------------------------------------------------
+   numLocations = 20
+   allocate(lon(numLocations))
+   allocate(lat(numLocations))
+
+   do i=1,numLocations
+      lon(i)=360.0*i/numLocations
+      lat(i)=100*REAL(localPet,ESMF_KIND_R8)/REAL(petCount,ESMF_KIND_R8)-50.0
+   enddo
+
+   !-------------------------------------------------------------------
+   ! Allocate and set example Field data
+   !-------------------------------------------------------------------
+   allocate(temperature(numLocations))
+
+   do i=1,numLocations
+      temperature(i)= 300 - abs(lat(i))
+   enddo
+
+   !-------------------------------------------------------------------
+   ! Create the LocStream:  Allocate space for the LocStream object, 
+   ! define the number and distribution of the locations. 
+   !-------------------------------------------------------------------
+   locstream=ESMF_LocStreamCreate(name="Temperature Measurements",   &
+                                  localCount=numLocations, &
+                                  coordSys=ESMF_COORDSYS_SPH_DEG,   &
+                                  rc=rc)
+
+ +

+

+   !-------------------------------------------------------------------
+   ! Add key data, referencing a user data pointer. By changing the 
+   ! datacopyflag to ESMF_DATACOPY_VALUE an internally allocated copy of the 
+   ! user data may also be set.  
+   !-------------------------------------------------------------------
+   call ESMF_LocStreamAddKey(locstream,              &
+                             keyName="ESMF:Lat",     &
+                             farray=lat,             &
+                             datacopyflag=ESMF_DATACOPY_REFERENCE, &
+                             keyUnits="Degrees",     &
+                             keyLongName="Latitude", rc=rc)
+
+ +

+

+   call ESMF_LocStreamAddKey(locstream,              &
+                             keyName="ESMF:Lon",     &
+                             farray=lon,             &
+                             datacopyflag=ESMF_DATACOPY_REFERENCE, &
+                             keyUnits="Degrees",     &
+                             keyLongName="Longitude", rc=rc)
+
+ +

+

+   !-------------------------------------------------------------------
+   ! Create a Field on the Location Stream. In this case the 
+   ! Field is created from a user array, but any of the other
+   ! Field create methods (e.g. from ArraySpec) would also apply.
+   !-------------------------------------------------------------------       
+   field_temperature=ESMF_FieldCreate(locstream,   &
+                                   temperature, &
+                                   name="temperature", &
+                                   rc=rc)
+
+ +

+ +

+32.3.2 Create a LocStream with internally allocated memory +

+ +

+The following is an example of creating a LocStream object. + After creation, key data is internally allocated, + the pointer is retrieved, and the data is set. + A Field is also created on the LocStream to hold data + (temperature) at each location. + +

+

+   !-------------------------------------------------------------------
+   ! Get parallel information. Here petCount is the total number of 
+   ! running PETs, and localPet is the number of this particular PET.
+   !-------------------------------------------------------------------
+   call ESMF_VMGet(vm, localPet=localPet, petCount=petCount, rc=rc)
+
+ +

+

+   numLocations = 20
+
+   !-------------------------------------------------------------------
+   ! Create the LocStream:  Allocate space for the LocStream object, 
+   ! define the number and distribution of the locations. 
+   !-------------------------------------------------------------------
+   locstream=ESMF_LocStreamCreate(name="Temperature Measurements",   &
+                                  localCount=numLocations, &
+                                  coordSys=ESMF_COORDSYS_SPH_DEG,   &
+                                  rc=rc)
+
+ +

+

+   !-------------------------------------------------------------------
+   ! Add key data (internally allocating memory).
+   !-------------------------------------------------------------------
+   call ESMF_LocStreamAddKey(locstream,                    &
+                             keyName="ESMF:Lat",           &
+                             KeyTypeKind=ESMF_TYPEKIND_R8, &
+                             keyUnits="Degrees",           &
+                             keyLongName="Latitude", rc=rc)
+
+ +

+

+   call ESMF_LocStreamAddKey(locstream,                    &
+                             keyName="ESMF:Lon",           &
+                             KeyTypeKind=ESMF_TYPEKIND_R8, &
+                             keyUnits="Degrees",           &
+                             keyLongName="Longitude", rc=rc)
+
+ +

+

+   !-------------------------------------------------------------------
+   ! Get key data. 
+   !-------------------------------------------------------------------
+   call ESMF_LocStreamGetKey(locstream,                    &
+                             keyName="ESMF:Lat",           &
+                             farray=lat,                   &
+                             rc=rc)
+
+ +

+

+   call ESMF_LocStreamGetKey(locstream,                    &
+                             keyName="ESMF:Lon",           &
+                             farray=lon,                   &
+                             rc=rc)
+
+ +

+

+   !-------------------------------------------------------------------
+   ! Set example location information. Locations on a PET are wrapped 
+   ! around sphere. Each PET occupies a different latitude ranging 
+   ! from +50.0 to -50.0.
+   !-------------------------------------------------------------------
+   do i=1,numLocations
+      lon(i)=360.0*i/numLocations
+      lat(i)=100*REAL(localPet,ESMF_KIND_R8)/REAL(petCount,ESMF_KIND_R8)-50.0
+   enddo
+
+
+   !-------------------------------------------------------------------
+   ! Allocate and set example Field data
+   !-------------------------------------------------------------------
+   allocate(temperature(numLocations))
+   do i=1,numLocations
+      temperature(i)= 300 - abs(lat(i))
+   enddo
+
+   !-------------------------------------------------------------------
+   ! Create a Field on the Location Stream. In this case the 
+   ! Field is created from a user array, but any of the other
+   ! Field create methods (e.g. from ArraySpec) would also apply.
+   !-------------------------------------------------------------------    
+   field_temperature=ESMF_FieldCreate(locstream,   &
+                                 temperature, &
+                                 name="temperature", &
+                                 rc=rc)
+
+ +

+ +

+32.3.3 Create a LocStream with a distribution based on a Grid +

+ +

+The following is an example of using the LocStream create from background + Grid capability. Using this capability, the newly created LocStream + is a copy of the old LocStream, but with a new distribution. The new LocStream + is distributed such that if the coordinates of a location in the LocStream lie + within a Grid cell, then that location is put on the same PET as the Grid cell. + +

+

+   !-------------------------------------------------------------------
+   ! Get parallel information. Here petCount is the total number of 
+   ! running PETs, and localPet is the number of this particular PET.
+   !-------------------------------------------------------------------
+   call ESMF_VMGet(vm, localPet=localPet, petCount=petCount, rc=rc)
+
+ +

+

+   !-------------------------------------------------------------------
+   ! Create the LocStream:  Allocate space for the LocStream object, 
+   ! define the number and distribution of the locations. 
+   !-------------------------------------------------------------------
+   numLocations = 20
+   locstream=ESMF_LocStreamCreate(name="Temperature Measurements",   &
+                                  localCount=numLocations, &
+                                  coordSys=ESMF_COORDSYS_SPH_DEG,   &
+                                  rc=rc)
+
+ +

+

+   !-------------------------------------------------------------------
+   ! Add key data (internally allocating memory).
+   !-------------------------------------------------------------------
+   call ESMF_LocStreamAddKey(locstream,                    &
+                             keyName="ESMF:Lon",           &
+                             KeyTypeKind=ESMF_TYPEKIND_R8, &
+                             keyUnits="Degrees",           &
+                             keyLongName="Longitude", rc=rc)
+
+ +

+

+   call ESMF_LocStreamAddKey(locstream,                    &
+                             keyName="ESMF:Lat",           &
+                             KeyTypeKind=ESMF_TYPEKIND_R8, &
+                             keyUnits="Degrees",           &
+                             keyLongName="Latitude", rc=rc)
+
+ +

+

+   !-------------------------------------------------------------------
+   ! Get Fortran arrays which hold the key data, so that it can be set. 
+   !-------------------------------------------------------------------
+   call ESMF_LocStreamGetKey(locstream,                    &
+                             keyName="ESMF:Lon",           &
+                             farray=lon,                   &
+                             rc=rc)
+
+ +

+

+   call ESMF_LocStreamGetKey(locstream,                    &
+                             keyName="ESMF:Lat",           &
+                             farray=lat,                   &
+                             rc=rc)
+
+ +

+

+   !-------------------------------------------------------------------
+   ! Set example location information. Locations on a PET are wrapped 
+   ! around sphere. Each PET occupies a different latitude ranging 
+   ! from +50.0 to -50.0.
+   !-------------------------------------------------------------------
+   do i=1,numLocations
+      lon(i)=360.0*i/numLocations
+      lat(i)=100*REAL(localPet,ESMF_KIND_R8)/REAL(petCount,ESMF_KIND_R8)-50.0
+   enddo
+
+   !-------------------------------------------------------------------
+   ! Create a Grid to use as the background. The Grid is 
+   ! GridLonSize by GridLatSize with the default distribution 
+   ! (The first dimension split across the PETs). The coordinate range
+   ! is  0 to 360 in longitude and -90 to 90 in latitude. Note that we 
+   ! use indexflag=ESMF_INDEX_GLOBAL for the Grid creation. At this time 
+   ! this is required for a Grid to be usable as a background Grid.
+   ! Note that here the points are treated as cartesian.
+   !-------------------------------------------------------------------
+   grid=ESMF_GridCreateNoPeriDim(maxIndex=(/GridLonSize,GridLatSize/), &
+                                 coordSys=ESMF_COORDSYS_SPH_DEG,       &
+                                 indexflag=ESMF_INDEX_GLOBAL,          &
+                                 rc=rc)
+
+ +

+

+   !-------------------------------------------------------------------
+   ! Allocate the corner stagger location in which to put the coordinates. 
+   ! (The corner stagger must be used for the Grid to be usable as a
+   !  background Grid.)
+   !-------------------------------------------------------------------
+   call ESMF_GridAddCoord(grid, staggerloc=ESMF_STAGGERLOC_CORNER, rc=rc)
+
+ +

+

+   !-------------------------------------------------------------------
+   ! Get access to the Fortran array pointers that hold the Grid 
+   ! coordinate information and then set the coordinates to be uniformly 
+   ! distributed around the globe. 
+   !-------------------------------------------------------------------
+   call ESMF_GridGetCoord(grid,                                  &
+                          staggerLoc=ESMF_STAGGERLOC_CORNER,     &
+                          coordDim=1, computationalLBound=clbnd, &
+                          computationalUBound=cubnd,             & 
+                          farrayPtr=farrayPtrLonC, rc=rc)
+
+ +

+

+   call ESMF_GridGetCoord(grid,                                  &
+                         staggerLoc=ESMF_STAGGERLOC_CORNER,      &
+                          coordDim=2, farrayPtr=farrayPtrLatC, rc=rc)
+
+ +

+

+   do i1=clbnd(1),cubnd(1)
+   do i2=clbnd(2),cubnd(2)
+      ! Set Grid longitude coordinates as 0 to 360
+      farrayPtrLonC(i1,i2) = REAL(i1-1)*360.0/REAL(GridLonSize)
+
+      ! Set Grid latitude coordinates as -90 to 90
+      farrayPtrLatC(i1,i2) = -90. + REAL(i2-1)*180.0/REAL(GridLatSize) + &
+                                      0.5*180.0/REAL(GridLatSize)
+   enddo
+   enddo
+
+
+   !-------------------------------------------------------------------
+   ! Create newLocstream on the background Grid using the 
+   ! "Lon" and "Lat" keys as the coordinates for the entries in 
+   ! locstream. The entries in newLocstream with coordinates (lon,lat)
+   ! are on the same PET as the piece of grid which contains (lon,lat). 
+   !-------------------------------------------------------------------
+   newLocstream=ESMF_LocStreamCreate(locstream, &
+                  background=grid, rc=rc)
+
+
+   !-------------------------------------------------------------------
+   ! A Field can now be created on newLocstream and 
+   ! ESMF_FieldRedist() can be used to move data between Fields built 
+   ! on locstream and Fields built on newLocstream.
+   !-------------------------------------------------------------------
+
+ +

+ +

+32.3.4 Regridding from a Grid to a LocStream +

+ +

+The following is an example of how a LocStream object can be used in regridding. + +

+

+   !-------------------------------------------------------------------
+   ! Create a global Grid to use as the regridding source. The Grid is 
+   ! GridLonSize by GridLatSize with the default distribution 
+   ! (The first dimension split across the PETs). The coordinate range
+   ! is  0 to 360 in longitude and -90 to 90 in latitude. Note that we 
+   ! use indexflag=ESMF_INDEX_GLOBAL for the Grid creation to calculate
+   ! coordinates across PETs.
+   !-------------------------------------------------------------------
+   grid=ESMF_GridCreate1PeriDim(maxIndex=(/GridLonSize,GridLatSize/), &
+                                coordSys=ESMF_COORDSYS_SPH_DEG,       &
+                                indexflag=ESMF_INDEX_GLOBAL,          &
+                                rc=rc)
+
+ +

+

+   !-------------------------------------------------------------------
+   ! Allocate the center stagger location in which to put the coordinates. 
+   !-------------------------------------------------------------------
+   call ESMF_GridAddCoord(grid, staggerloc=ESMF_STAGGERLOC_CENTER, rc=rc)
+
+ +

+

+   !-------------------------------------------------------------------
+   ! Get access to the Fortran array pointers that hold the Grid 
+   ! coordinate information.
+   !------------------------------------------------------------------- 
+   ! Longitudes 
+   call ESMF_GridGetCoord(grid,                                  &
+                          staggerLoc=ESMF_STAGGERLOC_CENTER,     &
+                          coordDim=1, computationalLBound=clbnd, &
+                          computationalUBound=cubnd,             &
+                          farrayPtr=farrayPtrLonC, rc=rc)
+
+ +

+

+   ! Latitudes
+   call ESMF_GridGetCoord(grid,                                  &
+                          staggerLoc=ESMF_STAGGERLOC_CENTER,     &
+                          coordDim=2, computationalLBound=clbnd, &
+                          computationalUBound=cubnd,             &
+                          farrayPtr=farrayPtrLatC, rc=rc)
+
+ +

+

+   !-------------------------------------------------------------------
+   ! Create a source Field to hold the data to be regridded to the 
+   ! destination
+   !-------------------------------------------------------------------
+   srcField = ESMF_FieldCreate(grid, typekind=ESMF_TYPEKIND_R8,   &
+                               staggerloc=ESMF_STAGGERLOC_CENTER, &
+                               name="source", rc=rc)
+
+ +

+

+   !-------------------------------------------------------------------
+   ! Set the Grid coordinates to be uniformly distributed around the globe. 
+   !-------------------------------------------------------------------
+   do i1=clbnd(1),cubnd(1)
+   do i2=clbnd(2),cubnd(2)
+      ! Set Grid longitude coordinates as 0 to 360
+      farrayPtrLonC(i1,i2) = REAL(i1-1)*360.0/REAL(GridLonSize)
+
+      ! Set Grid latitude coordinates as -90 to 90
+      farrayPtrLatC(i1,i2) = -90. + REAL(i2-1)*180.0/REAL(GridLatSize) + &
+                                       0.5*180.0/REAL(GridLatSize)
+
+ +

+

+   enddo
+   enddo
+
+   !-------------------------------------------------------------------
+   ! Set the number of points the destination LocStream will have
+   ! depending on the PET. 
+   !-------------------------------------------------------------------
+   if (petCount .eq. 1) then
+     numLocationsOnThisPet=7
+   else
+     if (localpet .eq. 0) then
+       numLocationsOnThisPet=2
+     else if (localpet .eq. 1) then
+       numLocationsOnThisPet=2
+     else if (localpet .eq. 2) then
+       numLocationsOnThisPet=2
+     else if (localpet .eq. 3) then
+       numLocationsOnThisPet=1
+     endif
+   endif
+
+   !-------------------------------------------------------------------
+   ! Create the LocStream:  Allocate space for the LocStream object,
+   ! define the number of locations on this PET. 
+   !-------------------------------------------------------------------
+   locstream=ESMF_LocStreamCreate(name="Test Data",                 &
+                                  localCount=numLocationsOnThisPet, &
+                                  coordSys=ESMF_COORDSYS_SPH_DEG,   &
+                                  rc=rc)
+
+ +

+

+   !-------------------------------------------------------------------
+   ! Add key data to LocStream(internally allocating memory).
+   !-------------------------------------------------------------------
+   call ESMF_LocStreamAddKey(locstream,                    &
+                             keyName="ESMF:Lat",           &
+                             KeyTypeKind=ESMF_TYPEKIND_R8, &
+                             keyUnits="degrees",           &
+                             keyLongName="Latitude", rc=rc)
+
+ +

+

+   call ESMF_LocStreamAddKey(locstream,                    &
+                             keyName="ESMF:Lon",           &
+                             KeyTypeKind=ESMF_TYPEKIND_R8, &
+                             keyUnits="degrees",           &
+                             keyLongName="Longitude", rc=rc)
+
+ +

+

+   !-------------------------------------------------------------------
+   ! Get access to the Fortran array pointers that hold the key data.
+   !-------------------------------------------------------------------
+   ! Longitudes
+   call ESMF_LocStreamGetKey(locstream,           &
+                             keyName="ESMF:Lon",  &
+                             farray=lonArray,     &
+                             rc=rc)
+
+ +

+

+   ! Latitudes
+   call ESMF_LocStreamGetKey(locstream,           &
+                             keyName="ESMF:Lat",  &
+                             farray=latArray,     &
+                             rc=rc)
+
+ +

+

+   !-------------------------------------------------------------------
+   ! Set coordinates in key arrays depending on the PET.
+   ! For this example use an arbitrary set of points around globe.  
+   !-------------------------------------------------------------------
+   if (petCount .eq. 1) then
+     latArray = (/-87.75, -56.25, -26.5, 0.0, 26.5, 56.25, 87.75 /)
+     lonArray = (/51.4, 102.8, 154.2, 205.6, 257.0, 308.4, 359.8 /)
+   else
+     if (localpet .eq. 0) then
+       latArray = (/ -87.75, -56.25 /)
+       lonArray = (/ 51.4, 102.8 /)
+     else if (localpet .eq.1) then
+       latArray = (/ -26.5, 0.0 /)
+       lonArray = (/ 154.2, 205.6 /)
+     else if (localpet .eq.2) then
+       latArray = (/ 26.5, 56.25 /)
+       lonArray = (/ 257.0, 308.4 /)
+     else if (localpet .eq.3) then
+       latArray = (/ 87.75 /)
+       lonArray = (/ 359.8 /)
+     endif
+   endif
+
+   !-------------------------------------------------------------------
+   ! Create the destination Field on the LocStream to hold the 
+   ! result of the regridding. 
+   !-------------------------------------------------------------------
+   dstField = ESMF_FieldCreate(locstream, typekind=ESMF_TYPEKIND_R8, &
+                               name="dest", rc=rc)
+
+ +

+

+   !-------------------------------------------------------------------
+   ! Calculate the RouteHandle that represents the regridding from 
+   ! the source to destination Field using the Bilinear regridding method.
+   !-------------------------------------------------------------------
+   call ESMF_FieldRegridStore( srcField=srcField,                       &
+                               dstField=dstField,                       &
+                               routeHandle=routeHandle,                 &
+                               regridmethod=ESMF_REGRIDMETHOD_BILINEAR, &
+                               rc=rc)
+
+ +

+

+   !-------------------------------------------------------------------
+   ! Regrid from srcField to dstField
+   !-------------------------------------------------------------------
+   ! Can loop here regridding from srcField to dstField as src data changes
+   ! do i=1,...
+
+        ! (Put data into srcField)
+
+        !-------------------------------------------------------------------
+        ! Use the RouteHandle to regrid data from srcField to dstField.
+        !-------------------------------------------------------------------
+        call ESMF_FieldRegrid(srcField, dstField, routeHandle, rc=rc)
+
+        ! (Can now use the data in dstField)
+
+   ! enddo
+
+ +

+

+   !-------------------------------------------------------------------
+   ! Now that we are done, release the RouteHandle freeing its memory. 
+   !-------------------------------------------------------------------
+   call ESMF_FieldRegridRelease(routeHandle, rc=rc)
+
+ +

+ + +

+32.4 Class API +

+ +

+ +

+ +

+ +

+32.4.1 ESMF_LocStreamAssignment(=) - LocStream assignment +

+ +

+ +

+
+INTERFACE: +

     interface assignment(=)
+     locstream1 = locstream2
+
ARGUMENTS: +
     type(ESMF_LocStream) :: locstream1
+     type(ESMF_LocStream) :: locstream2
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Assign locstream1 as an alias to the same ESMF LocStream object in memory + as locstream2. If locstream2 is invalid, then locstream1 will be equally invalid after + the assignment. + +

+The arguments are: +

+
locstream1
+
The ESMF_LocStream object on the left hand side of the assignment. + +
+
locstream2
+
The ESMF_LocStream object on the right hand side of the assignment. + +
+
+ +

+ +

+ +

+32.4.2 ESMF_LocStreamOperator(==) - LocStream equality operator +

+ +

+ +

+
+INTERFACE: +

   interface operator(==)
+     if (locstream1 == locstream2) then ... endif
+               OR
+     result = (locstream1 == locstream2)
+
RETURN VALUE: +
     logical :: result
+
ARGUMENTS: +
     type(ESMF_LocStream), intent(in) :: locstream1
+     type(ESMF_LocStream), intent(in) :: locstream2
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Test whether locstream1 and locstream2 are valid aliases to the same ESMF + LocStream object in memory. For a more general comparison of two ESMF LocStreams, + going beyond the simple alias test, the ESMF_LocStreamMatch() function (not yet + implemented) must be used. + +

+The arguments are: +

+
locstream1
+
The ESMF_LocStream object on the left hand side of the equality + operation. + +
+
locstream2
+
The ESMF_LocStream object on the right hand side of the equality + operation. + +
+
+ +

+ +

+ +

+32.4.3 ESMF_LocStreamOperator(/=) - LocStream not equal operator +

+ +

+ +

+
+INTERFACE: +

   interface operator(/=)
+     if (locstream1 /= locstream2) then ... endif
+               OR
+     result = (locstream1 /= locstream2)
+
RETURN VALUE: +
     logical :: result
+
ARGUMENTS: +
     type(ESMF_LocStream), intent(in) :: locstream1
+     type(ESMF_LocStream), intent(in) :: locstream2
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Test whether locstream1 and locstream2 are not valid aliases to the + same ESMF LocStream object in memory. For a more general comparison of two ESMF + LocStreams, going beyond the simple alias test, the ESMF_LocStreamMatch() function + (not yet implemented) must be used. + +

+The arguments are: +

+
locstream1
+
The ESMF_LocStream object on the left hand side of the non-equality + operation. + +
+
locstream2
+
The ESMF_LocStream object on the right hand side of the non-equality + operation. + +
+
+ +

+ +

+ +

+32.4.4 ESMF_LocStreamAddKey - Add a key Array and allocate the internal memory +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_LocStreamAddKey()
+   subroutine ESMF_LocStreamAddKeyAlloc(locstream, keyName, &
+                keyTypeKind, keyUnits, keyLongName, rc)
+
ARGUMENTS: +
     type(ESMF_Locstream),     intent(in)            :: locstream
+     character (len=*),        intent(in)            :: keyName
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     type(ESMF_TypeKind_Flag), intent(in),  optional :: keyTypeKind
+     character (len=*),        intent(in),  optional :: keyUnits 
+     character (len=*),        intent(in),  optional :: keyLongName 
+     integer,                  intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Add a key to a locstream with a required keyName. Once a key has + been added, a pointer to its internally allocated memory can be + retrieved and used to set key values. + +

+The arguments are: +

+
locstream
+
The ESMF_LocStream object to add key to. + +
+
keyName
+
The name of the key to add. + +
+
[keyTypeKind]
+
The type/kind of the key data. + If not specified then the type/kind will default to 8 byte reals. + +
+
[keyUnits]
+
The units of the key data. + If not specified, then the item remains blank. + +
+
[keyLongName]
+
The long name of the key data. + If not specified, then the item remains blank. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+32.4.5 ESMF_LocStreamAddKey - Add a key Array +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_LocStreamAddKey()
+   subroutine ESMF_LocStreamAddKeyArray(locstream, keyName, keyArray, &
+                destroyKey, keyUnits, keyLongName, rc)
+
ARGUMENTS: +
     type(ESMF_Locstream), intent(in)             :: locstream
+     character (len=*),    intent(in)             :: keyName
+     type(ESMF_Array),     intent(in)             :: keyArray
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     logical,              intent(in),  optional  :: destroyKey
+     character (len=*),    intent(in),  optional  :: keyUnits 
+     character (len=*),    intent(in),  optional  :: keyLongName 
+     integer,              intent(out), optional  :: rc
+
+DESCRIPTION: +
+ +

+Add a key to a locstream with a required keyName and a required + ESMF_Array. The user is responsible for the creation of the + ESMF_Array that will hold the key values. + +

+The arguments are: +

+
locstream
+
The ESMF_LocStream object to add key to. + +
+
keyName
+
The name of the key to add. + +
+
keyArray
+
An ESMF Array which contains the key data + +
+
[destroyKey]
+
if .true. destroy this key array when the locstream is destroyed. + Defaults to .false. + +
+
[keyUnits]
+
The units of the key data. + If not specified, then the item remains blank. + +
+
[keyLongName]
+
The long name of the key data. + If not specified, then the item remains blank. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+32.4.6 ESMF_LocStreamAddKey - Add a key Array created around user memory +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_LocStreamAddKey()
+    subroutine ESMF_LocStreamAddKeyI4(locstream, keyName, farray, &
+                 datacopyflag, keyUnits, keyLongName, rc)
+
ARGUMENTS: +
      type(ESMF_Locstream), intent(in) :: locstream
+      character (len=*), intent(in) :: keyName
+      <farray>
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+      type(ESMF_DataCopy_Flag), intent(in), optional :: datacopyflag
+      character (len=*), intent(in), optional :: keyUnits
+      character (len=*), intent(in), optional :: keyLongName
+      integer, intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Add a key to a locstream with a required keyName and a required + Fortran array. The user is responsible for the creation of the + Fortran array that will hold the key values, including + the maintenance of any allocated memory. + +

+Supported values for <farray> are: +

+
+
integer(ESMF_KIND_I4), intent(in) :: farray(:) + +
+
+
real(ESMF_KIND_R4), intent(in) :: farray(:) + +
+
+
real(ESMF_KIND_R8), intent(in) :: farray(:) + +
+
+ +

+The arguments are: +

+
locstream
+
The ESMF_LocStream object to add key to. + +
+
keyName
+
The name of the key to add. + +
+
farray
+
Valid native Fortran array, i.e. memory must be associated with the + actual argument. The type/kind/rank information of farray will be + used to set the key Array's properties accordingly. + +
+
[datacopyflag]
+
Specifies whether the Array object will reference the memory allocation + provided by farray directly or will copy the data from + farray into a new memory allocation. Valid options are + ! ESMF_DATACOPY_REFERENCE (default) or ESMF_DATACOPY_VALUE. + Depending on the specific situation the ESMF_DATACOPY_REFERENCE option + may be unsafe when specifying an array slice for farray. + +
+
[keyUnits]
+
The units of the key data. + If not specified, then the item remains blank. + +
+
[keyLongName]
+
The long name of the key data. + If not specified, then the item remains blank. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+32.4.7 ESMF_LocStreamCreate - Create a new LocStream by projecting onto a Grid +

+ +

+ +

+
+INTERFACE: +

       ! Private name; call using ESMF_LocStreamCreate()
+       function ESMF_LocStreamCreateByBkgGrid(locstream, &
+                  background, maskValues, &
+                  unmappedaction, name, rc)
+
RETURN VALUE: +
       type(ESMF_LocStream) :: ESMF_LocStreamCreateByBkgGrid
+
ARGUMENTS: +
       type(ESMF_LocStream),           intent(in)            :: locstream
+       type(ESMF_Grid),                intent(in)            :: background
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       integer(ESMF_KIND_I4),          intent(in),  optional :: maskValues(:)
+       type(ESMF_UnmappedAction_Flag), intent(in),  optional :: unmappedaction
+       character (len=*),              intent(in),  optional :: name
+       integer,                        intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Create an location stream from an existing one in accordance with + the distribution of the background Grid. The entries + in the new location stream are redistributed, so that they lie on the same PET + as the piece of Grid which contains the coordinates of the entries. The coordinates + of the entries are the data in the keys named ESMF:Lon, ESMF:Lat, ESMF:Radius in the + case of a spherical system and ESMF:X, ESMF:Y, ESMF:Z for cartesian. To copy data in + Fields or FieldBundles built on locstream to the new one simply use ESMF_FieldRedist() + or ESMF_FieldBundleRedist(). + +

+The arguments are: +

+
locstream
+
Location stream from which the new location stream is to be created + +
+
background
+
Background Grid which determines the distribution of the entries in the new location stream. + The background Grid + Note also that this subroutine uses the corner stagger location in the Grid for determining + where a point lies, because this is the stagger location which fully contains the cell. + A Grid must have coordinate data in this stagger location to be used in this subroutine. + For a 2D Grid this stagger location is ESMF_STAGGERLOC_CORNER for a 3D Grid this + stagger location is ESMF_STAGGERLOC_CORNER_VFACE. Note that currently the background + Grid also needs to have been created with indexflag=ESMF_INDEX_GLOBAL to be usable here. + +
+
[maskValues]
+
List of values that indicate a background grid point should be masked out. + If not specified, no masking will occur. + +
+
[unmappedaction]
+
Specifies what should happen if there are destination points that + can't be mapped to a source cell. Please see Section 54.62 for a + list of valid options. If not specified, unmappedaction defaults to ESMF_UNMAPPEDACTION_ERROR. [NOTE: the unmappedaction=ESMF_UNMAPPEDACTION_IGNORE option is currently not implemented.] + +
+
[name]
+
Name of the resulting location stream + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+32.4.8 ESMF_LocStreamCreate - Create a new LocStream by projecting onto a Mesh +

+ +

+ +

+
+INTERFACE: +

       ! Private name; call using ESMF_LocStreamCreate()
+       function ESMF_LocStreamCreateByBkgMesh(locstream, &
+                  background, unmappedaction, name, rc)
+
RETURN VALUE: +
       type(ESMF_LocStream) :: ESMF_LocStreamCreateByBkgMesh
+
ARGUMENTS: +
       type(ESMF_LocStream),           intent(in)           :: locstream
+       type(ESMF_Mesh),                intent(in)           :: background
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       type(ESMF_UnmappedAction_Flag), intent(in), optional :: unmappedaction
+       character (len=*),              intent(in), optional :: name
+       integer,                        intent(out),optional :: rc
+
+DESCRIPTION: +
+ +

+Create an location stream from an existing one in accordance with + the distribution of the background Mesh. The entries + in the new location stream are redistributed, so that they lie on the same PET + as the piece of Mesh which contains the coordinates of the entries. The coordinates + of the entries are the data in the keys named ESMF:Lon, ESMF:Lat, ESMF:Radius in the + case of a spherical system and ESMF:X, ESMF:Y, ESMF:Z for cartesian. To copy data in + Fields or FieldBundles built on locstream to the new one simply use ESMF_FieldRedist() + or ESMF_FieldBundleRedist(). + +

+The arguments are: +

+
locstream
+
Location stream from which the new location stream is to be created + +
+
background
+
Background Mesh which determines the distribution of entries in the new locatiion stream. + +
+
[unmappedaction]
+
Specifies what should happen if there are destination points that + can't be mapped to a source cell. Please see Section 54.62 for a + list of valid options. If not specified, unmappedaction defaults to ESMF_UNMAPPEDACTION_ERROR. [NOTE: the unmappedaction=ESMF_UNMAPPEDACTION_IGNORE option is currently not implemented.] + +
+
[name]
+
Name of the resulting location stream + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+32.4.9 ESMF_LocStreamCreate - Create a new LocStream from a distgrid +

+ +

+ +

+
+INTERFACE: +

       ! Private name: call using ESMF_LocStreamCreate()
+       function ESMF_LocStreamCreateFromDG(distgrid, &
+         indexflag, coordSys, name, vm, rc )
+
RETURN VALUE: +
       type(ESMF_LocStream) :: ESMF_LocStreamCreateFromDG
+
ARGUMENTS: +
       type(ESMF_DistGrid),      intent(in)            :: distgrid
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       type(ESMF_Index_Flag),    intent(in),  optional :: indexflag    
+       type(ESMF_CoordSys_Flag), intent(in),  optional :: coordSys
+       character (len=*),        intent(in),  optional :: name
+       type(ESMF_VM),            intent(in),  optional :: vm
+       integer,                  intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Allocates memory for a new ESMF_LocStream object, constructs its + internal derived types. + +

+The arguments are: +

+
distgrid
+
Distgrid specifying size and distribution. Only 1D distgrids are allowed. + +
+
[indexflag]
+
Flag that indicates how the DE-local indices are to be defined. + Defaults to ESMF_INDEX_DELOCAL, which indicates + that the index range on each DE starts at 1. See Section 54.29 + for the full range of options. + +
+
[coordSys]
+
The coordinate system of the location stream coordinate data. + For a full list of options, please see Section 54.11. + If not specified then defaults to ESMF_COORDSYS_SPH_DEG. + +
+
[name]
+
Name of the location stream + +
+
[vm]
+
If present, the LocStream object is created on the specified + ESMF_VM object. The default is to create on the VM of the + current context. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+32.4.10 ESMF_LocStreamCreate - Create a new LocStream from an irregular distribution +

+ +

+ +

+
+INTERFACE: +

       ! Private name: call using ESMF_LocStreamCreate()
+       function ESMF_LocStreamCreateIrreg(minIndex, countsPerDE, &
+                   indexflag, coordSys, name, rc)
+
RETURN VALUE: +
       type(ESMF_LocStream) :: ESMF_LocStreamCreateIrreg
+
ARGUMENTS: +
       integer, intent(in), optional                   :: minIndex
+       integer, intent(in)                             :: countsPerDE(:)
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       type(ESMF_Index_Flag), intent(in), optional     :: indexflag
+       type(ESMF_CoordSys_Flag), intent(in),  optional :: coordSys
+       character (len=*), intent(in), optional         :: name
+       integer, intent(out), optional                  :: rc
+
+DESCRIPTION: +
+ +

+Allocates memory for a new ESMF_LocStream object, constructs its + internal derived types. The ESMF_DistGrid is set up, indicating + how the LocStream is distributed. + +

+The arguments are: +

+
[minIndex]
+
If indexflag=ESMF_INDEX_DELOCAL, this setting is used to indicate + the number to start the index ranges at. If not present, defaults to 1. + +
+
countsPerDE
+
This array has an element for each DE, specifying the number of locations + for that DE. + +
+
[indexflag]
+
Flag that indicates how the DE-local indices are to be defined. + Defaults to ESMF_INDEX_DELOCAL, which indicates + that the index range on each DE starts at 1. See Section 54.29 + for the full range of options. + +
+
[coordSys]
+
The coordinate system of the location stream coordinate data. + For a full list of options, please see Section 54.11. + If not specified then defaults to ESMF_COORDSYS_SPH_DEG. + +
+
[name]
+
Name of the location stream + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+32.4.11 ESMF_LocStreamCreate - Create a new LocStream from a local count +

+ +

+ +

+
+INTERFACE: +

       ! Private name: call using ESMF_LocStreamCreate()
+       function ESMF_LocStreamCreateFromLocal(localCount, &
+                   indexflag, coordSys, name, rc)
+
RETURN VALUE: +
       type(ESMF_LocStream) :: ESMF_LocStreamCreateFromLocal
+
ARGUMENTS: +
       integer, intent(in)                             :: localCount
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       type(ESMF_Index_Flag), intent(in), optional     :: indexflag
+       type(ESMF_CoordSys_Flag), intent(in),  optional :: coordSys
+       character (len=*), intent(in), optional         :: name
+       integer, intent(out), optional                  :: rc
+
+DESCRIPTION: +
+ +

+Allocates memory for a new ESMF_LocStream object, constructs its + internal derived types. The ESMF_DistGrid is set up, indicating + how the LocStream is distributed. The assumed layout is one DE per PET. + +

+The arguments are: +

+
localCount
+
Number of grid cells to be distributed to this DE/PET. + +
+
[indexflag]
+
Flag that indicates how the DE-local indices are to be defined. + Defaults to ESMF_INDEX_DELOCAL, which indicates + that the index range on each DE starts at 1. See Section 54.29 + for the full range of options. + +
+
[coordSys]
+
The coordinate system of the location stream coordinate data. + For a full list of options, please see Section 54.11. + If not specified then defaults to ESMF_COORDSYS_SPH_DEG. + +
+
[name]
+
Name of the location stream + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+32.4.12 ESMF_LocStreamCreate - Create a new LocStream from an old one and a distgrid +

+ +

+ +

+
+INTERFACE: +

       ! Private name: call using ESMF_LocStreamCreate()
+       function ESMF_LocStreamCreateFromNewDG(locstream, distgrid, &
+            name, rc)
+
RETURN VALUE: +
       type(ESMF_LocStream) :: ESMF_LocStreamCreateFromNewDG
+
ARGUMENTS: +
       type(ESMF_LocStream), intent(in)                :: locstream
+       type(ESMF_DistGrid),  intent(in)                :: distgrid
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       character (len=*),    intent(in), optional      :: name
+       integer,              intent(out), optional     :: rc
+
+DESCRIPTION: +
+ +

+Create a new location stream that is a copy of an old one, but with a new + distribution. The new distribution is given by a distgrid passed into the call. + Key and other class information is copied from the old locstream to the new one. + Information contained in Fields build on the location streams can be copied over + by using the Field redistribution calls (e.g. ESMF_FieldRedistStore() + and ESMF_FieldRedist()). + +

+The arguments are: +

+
locstream
+
Location stream from which the new location stream is to be created + +
+
distgrid
+
Distgrid for new distgrid + +
+
[name]
+
Name of the resulting location stream + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+32.4.13 ESMF_LocStreamCreate - Create a new LocStream using a regular distribution +

+ +

+ +

+
+INTERFACE: +

       ! Private name: call using ESMF_LocStreamCreate()
+       function ESMF_LocStreamCreateReg(regDecomp, decompFlag, &
+                     minIndex, maxIndex, &
+                     coordSys, indexflag, name, rc)
+
RETURN VALUE: +
       type(ESMF_LocStream) :: ESMF_LocStreamCreateReg
+
ARGUMENTS: +
       integer,                  intent(in),  optional  :: regDecomp
+       type(ESMF_Decomp_Flag),   intent(in),  optional  :: decompflag
+       integer,                  intent(in),  optional  :: minIndex
+       integer,                  intent(in)             :: maxIndex
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       type(ESMF_CoordSys_Flag), intent(in),  optional  :: coordSys
+       type(ESMF_Index_Flag),    intent(in),  optional  :: indexflag
+       character (len=*),        intent(in),  optional  :: name
+       integer,                  intent(out), optional  :: rc
+
+DESCRIPTION: +
+ +

+Allocates memory for a new ESMF_LocStream object, constructs its + internal derived types. The ESMF_DistGrid is set up, indicating + how the LocStream is distributed. + +

+The arguments are: +

+
[regDecomp]
+
Specify into how many chunks to divide the locations. + If not specified, defaults to the number of PETs. + +
+
[decompFlag]
+
Specify what to do with leftover locations after division. + If not specified, defaults to ESMF_DECOMP_BALANCED. Please + see Section 54.14 for a full description of the + possible options. + +
+
[minIndex]
+
If indexflag=ESMF_INDEX_DELOCAL, this setting is used to indicate + the number to start the index ranges at. If not present, defaults to 1. + +
+
maxIndex
+
The maximum index across all PETs. + +
+
[coordSys]
+
The coordinate system of the location stream coordinate data. + For a full list of options, please see Section 54.11. + If not specified then defaults to ESMF_COORDSYS_SPH_DEG. + +
+
[indexflag]
+
Flag that indicates how the DE-local indices are to be defined. + Defaults to ESMF_INDEX_DELOCAL, which indicates + that the index range on each DE starts at 1. See Section 54.29 + for the full range of options. + +
+
[name]
+
Name of the location stream + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+32.4.14 ESMF_LocStreamCreate - Create a new LocStream from a grid file +

+ +

+ +

+
+INTERFACE: +

       ! Private name: call using ESMF_LocStreamCreate()
+       function ESMF_LocStreamCreateFromFile(filename, &
+            fileformat, varname, indexflag, centerflag, name, rc)
+
RETURN VALUE: +
       type(ESMF_LocStream) :: ESMF_LocStreamCreateFromFile
+
ARGUMENTS: +
       character (len=*),          intent(in)           :: filename
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       type(ESMF_FileFormat_Flag), intent(in), optional :: fileformat
+       character(len=*),           intent(in), optional :: varname
+       type(ESMF_Index_Flag),      intent(in), optional :: indexflag
+       logical,                    intent(in), optional :: centerflag
+       character (len=*),          intent(in), optional :: name
+       integer,                    intent(out),optional :: rc
+
+DESCRIPTION: +
+ +

+Create a new ESMF_LocStream object and add the coordinate keys and mask key + to the LocStream using the coordinates defined in a grid file. Currently, it + supports the SCRIP format, the ESMF unstructured grid format and the UGRID format. + For a 2D or 3D grid in ESMF or UGRID format, it can construct the LocStream using either + the center coordinates or the corner coordinates. For a SCRIP format grid file, the + LocStream can only be constructed using the center coordinates. In + addition, it supports 1D network topology in UGRID format. When + construction a LocStream using a 1D UGRID, it always uses node + coordinates (i.e., corner coordinates). + +

+The arguments are: +

+
filename
+
Name of grid file to be used to create the location stream. + +
+
[fileformat]
+
The file format. The valid options are ESMF_FILEFORMAT_SCRIP, + ESMF_FILEFORMAT_ESMFMESH, and ESMF_FILEFORMAT_UGRID. + Please see section 54.20 for a detailed description of the options. + If not specified, the default is ESMF_FILEFORMAT_SCRIP. + +
+
[varname]
+
An optional variable name stored in the UGRID file to be used to + generate the mask using the missing value of the data value of + this variable. The first two dimensions of the variable has to be the + the longitude and the latitude dimension and the mask is derived from the + first 2D values of this variable even if this data is 3D, or 4D array. If not + specified, no mask is used for a UGRID file. + +
+
[indexflag]
+
Flag that indicates how the DE-local indices are to be defined. + Defaults to ESMF_INDEX_DELOCAL, which indicates + that the index range on each DE starts at 1. See Section 54.29 + for the full range of options. + +
+
[centerflag]
+
Flag that indicates whether to use the center coordinates to construct the location stream. + If true, use center coordinates, otherwise, use the corner coordinates. If not specified, + use center coordinates as default. For SCRIP files, only center coordinate + is supported. + +
+
[name]
+
Name of the location stream + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+32.4.15 ESMF_LocStreamDestroy - Release resources associated with a LocStream +

+ +

+ +

+
+INTERFACE: +

       subroutine ESMF_LocStreamDestroy(locstream, noGarbage, rc)
+
ARGUMENTS: +
       type(ESMF_LocStream), intent(inout)          :: locstream 
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       logical,              intent(in),   optional :: noGarbage
+       integer,              intent(out),  optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    8.1.0
    +
    Added argument noGarbage. + The argument provides a mechanism to override the default garbage collection + mechanism when destroying an ESMF object. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Deallocate an ESMF_LocStream object and appropriate + internal structures. + +

+The arguments are: +

+
locstream
+
locstream to destroy + +
+
[noGarbage]
+
If set to .TRUE. the object will be fully destroyed and removed + from the ESMF garbage collection system. Note however that under this + condition ESMF cannot protect against accessing the destroyed object + through dangling aliases - a situation which may lead to hard to debug + application crashes. + +

+It is generally recommended to leave the noGarbage argument + set to .FALSE. (the default), and to take advantage of the ESMF + garbage collection system which will prevent problems with dangling + aliases or incorrect sequences of destroy calls. However this level of + support requires that a small remnant of the object is kept in memory + past the destroy call. This can lead to an unexpected increase in memory + consumption over the course of execution in applications that use + temporary ESMF objects. For situations where the repeated creation and + destruction of temporary objects leads to memory issues, it is + recommended to call with noGarbage set to .TRUE., fully + removing the entire temporary object from memory. + +

+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+32.4.16 ESMF_LocStreamGet - Return object-wide information from a LocStream +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_LocStreamGet(locstream, &
+        distgrid, keyCount, keyNames, localDECount, indexflag, &
+        coordSys, name, rc)
+
ARGUMENTS: +
     type(ESMF_Locstream),         intent(in)            :: locstream
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     type(ESMF_DistGrid),          intent(out), optional :: distgrid
+     integer,                      intent(out), optional :: keyCount
+     character(len=ESMF_MAXSTR),                optional :: keyNames(:) 
+     integer,                      intent(out), optional :: localDECount
+     type(ESMF_Index_Flag),        intent(out), optional :: indexflag
+     type(ESMF_CoordSys_Flag),     intent(out), optional :: coordSys
+     character(len=*),             intent(out), optional :: name
+     integer,                      intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Query an ESMF_LocStream for various information. All arguments after + the locstream are optional. + +

+The arguments are: +

+
locstream
+
The ESMF_LocStream object to query. + +
+
[distgrid]
+
The ESMF_DistGrid object that describes + +
+
[keyCount]
+
Number of keys in the locstream. + +
+
[keyNames]
+
The names of the keys in the locstream. Keynames should + be an array of character strings. The character strings should + be of length ESMF_MAXSTR and the array's length should be + at least keyCount. + +
+
[localDECount]
+
Number of DEs on this PET in the locstream. + +
+
[indexflag]
+
The indexflag for this indexflag. + +
+
[coordSys]
+
The coordinate system for this location stream. + +
+
[name]
+
Name of queried item. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+32.4.17 ESMF_LocStreamGetBounds - Get DE-local bounds of a LocStream +

+ +

+ +

+
+INTERFACE: +

       subroutine ESMF_LocStreamGetBounds(locstream,   &
+           localDE, exclusiveLBound, exclusiveUBound, exclusiveCount,   &
+           computationalLBound, computationalUBound, computationalCount,&
+           rc)
+
ARGUMENTS: +
       type(ESMF_LocStream),   intent(in) :: locstream
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       integer,                intent(in),  optional :: localDE
+       integer,                intent(out), optional :: exclusiveLBound
+       integer,                intent(out), optional :: exclusiveUBound
+       integer,                intent(out), optional :: exclusiveCount
+       integer,                intent(out), optional :: computationalLBound
+       integer,                intent(out), optional :: computationalUBound
+       integer,                intent(out), optional :: computationalCount
+       integer, intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+This method gets the bounds of a localDE for a locstream. + +

+The arguments are: +

+
locstream
+
LocStream to get the information from. + +
+
localDE
+
The local DE for which information is requested. [0,..,localDECount-1]. + For localDECount==1 the localDE argument may be omitted, + in which case it will default to localDE=0. + +
+
[exclusiveLBound]
+
Upon return this holds the lower bounds of the exclusive region. + +
+
[exclusiveUBound]
+
Upon return this holds the upper bounds of the exclusive region. + +
+
[exclusiveCount]
+
! Upon return this holds the number of items in the exclusive region +
+ (i.e. exclusiveUBound-exclusiveLBound+1). exclusiveCount. + +
+
[computationalLBound]
+
Upon return this holds the lower bounds of the computational region. + +
+
[computationalUBound]
+
Upon return this holds the upper bounds of the computational region. + +
+
[computationalCount]
+
Upon return this holds the number of items in the computational region +
+ (i.e. computationalUBound-computationalLBound+1). computationalCount. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+32.4.18 ESMF_LocStreamGetKey - Get an Array associated with a key +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_LocStreamGetKey()
+   subroutine ESMF_LocStreamGetKeyArray(locstream, keyName, keyArray, &
+        rc)
+
ARGUMENTS: +
     type(ESMF_Locstream), intent(in)            :: locstream
+     character (len=*),    intent(in)            :: keyName
+     type(ESMF_Array),     intent(out)           :: keyArray
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,              intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Get ESMF Array associated with key. + +

+The arguments are: +

+
locstream
+
The ESMF_LocStream object to get key from. + +
+
keyName
+
The name of the key to get. + +
+
keyArray
+
Array associated with key. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+32.4.19 ESMF_LocStreamGetKey - Get info associated with a key +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_LocStreamGetKey()
+   subroutine ESMF_LocStreamGetKeyInfo(locstream, keyName, &
+        keyUnits, keyLongName, typekind, isPresent, rc)
+
ARGUMENTS: +
     type(ESMF_Locstream),     intent(in)            :: locstream
+     character (len=*),        intent(in)            :: keyName
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     character (len=*),        intent(out), optional :: keyUnits 
+     character (len=*),        intent(out), optional :: keyLongName 
+     type(ESMF_TypeKind_Flag), intent(out), optional :: typekind
+     logical,                  intent(out), optional :: isPresent
+     integer,                  intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Get ESMF Array associated with key. + +

+The arguments are: +

+
locstream
+
The ESMF_LocStream object to get key from. + +
+
keyName
+
The name of the key to get. + +
+
[keyUnits]
+
The units of the key data. + If not specified, then the item remains blank. + +
+
[keyLongName]
+
The long name of the key data. + If not specified, then the item remains blank. + +
+
[typekind]
+
The typekind of the key data + +
+
[isPresent]
+
Whether or not the keyname is present + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+32.4.20 ESMF_LocStreamGetKey - Get a DE-local Fortran array pointer to key values +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_LocStreamGetKey()
+        subroutine ESMF_LocStreamGetKey(locstream, keyName, &
+            localDE, exclusiveLBound, exclusiveUBound, exclusiveCount,       &
+            computationalLBound, computationalUBound, computationalCount,    &
+            totalLBound, totalUBound, totalCount,                            &
+            farray, datacopyflag, rc)
+
ARGUMENTS: +
        type(ESMF_LocStream),   intent(in)            :: locstream
+        character (len=*),      intent(in)            :: keyName
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+        integer,                intent(in),  optional :: localDE
+        integer,                intent(out), optional :: exclusiveLBound
+        integer,                intent(out), optional :: exclusiveUBound
+        integer,                intent(out), optional :: exclusiveCount
+        integer,                intent(out), optional :: computationalLBound
+        integer,                intent(out), optional :: computationalUBound
+        integer,                intent(out), optional :: computationalCount
+        integer,                intent(out), optional :: totalLBound
+        integer,                intent(out), optional :: totalUBound
+        integer,                intent(out), optional :: totalCount
+        <farray>
+        type(ESMF_DataCopy_Flag), intent(in), optional :: datacopyflag
+        integer, intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+This method gets a Fortran pointer to the piece of memory which holds the + key data for a particular key on the given local DE. + This is useful, for example, for setting the key values in a LocStream, or + for reading the values. + +

+Supported values for <farray> are: +

+
+
integer(ESMF_KIND_I4), pointer :: farray(:) + +
+
+
real(ESMF_KIND_R4), pointer :: farray(:) + +
+
+
real(ESMF_KIND_R8), pointer :: farray(:) + +
+
+ +

+The arguments are: +

+
locstream
+
LocStream to get the information from. + +
+
keyName
+
The key to get the information from. + +
+
[localDE]
+
The local DE for which information is requested. [0,..,localDECount-1]. + For localDECount==1 the localDE argument may be omitted, + in which case it will default to localDE=0. + +
+
[exclusiveLBound]
+
Upon return this holds the lower bounds of the exclusive region. + +
+
[exclusiveUBound]
+
Upon return this holds the upper bounds of the exclusive region. + +
+
[exclusiveCount]
+
Upon return this holds the number of items in the exclusive region
+ (i.e. exclusiveUBound-exclusiveLBound+1). exclusiveCount. + +
+
[computationalLBound]
+
Upon return this holds the lower bounds of the computational region. + +
+
[computationalUBound]
+
Upon return this holds the upper bounds of the computational region. + +
+
[computationalCount]
+
Upon return this holds the number of items in the computational region +
+ (i.e. computationalUBound-computationalLBound+1). + +
+
[totalLBound]
+
Upon return this holds the lower bounds of the total region. + +
+
[totalUBound]
+
Upon return this holds the upper bounds of the total region. + +
+
[totalCount]
+
Upon return this holds the number of items in the total region + (i.e. totalUBound-totalLBound+1). + +
+
farray
+
The pointer to the coordinate data. + +
+
[datacopyflag]
+
If not specified, default to ESMF_DATACOPY_REFERENCE, in this case + farray is a reference to the data in the Grid coordinate arrays. + Please see Section 54.13 for further description and a + list of valid values. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+32.4.21 ESMF_LocStreamIsCreated - Check whether a LocStream object has been created +

+ +

+ +

+
+INTERFACE: +

   function ESMF_LocStreamIsCreated(locstream, rc)
+
RETURN VALUE: +
     logical :: ESMF_LocStreamIsCreated
+
ARGUMENTS: +
     type(ESMF_LocStream), intent(in)            :: locstream
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,             intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Return .true. if the locstream has been created. Otherwise return + .false.. If an error occurs, i.e. rc /= ESMF_SUCCESS is + returned, the return value of the function will also be .false.. + +

+The arguments are: +

+
locstream
+
ESMF_LocStream queried. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+32.4.22 ESMF_LocStreamPrint - Print the contents of a LocStream +

+ +

+ +

+
+INTERFACE: +

       subroutine ESMF_LocStreamPrint(locstream, options, rc)
+
ARGUMENTS: +
       type(ESMF_LocStream), intent(in)             :: locstream 
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       character (len = *),  intent(in),   optional :: options
+       integer,              intent(out),  optional :: rc
+
+DESCRIPTION: +
+ +

+Prints information about the locstream to stdout. + This subroutine goes through the internal data members of a locstream + ! data type and prints information of each data member. + +

+The arguments are: +

+
locstream
+
+
+
[options]
+
Print options are not yet supported. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+32.4.23 ESMF_LocStreamValidate - Check validity of a LocStream +

+ +

+ +

+
+INTERFACE: +

       subroutine ESMF_LocStreamValidate(locstream, rc)
+
ARGUMENTS: +
       type(ESMF_LocStream), intent(in)            :: locstream 
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       integer,              intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Validates that the locstream is internally consistent. + Currently this method determines if the locstream is uninitialized + or already destroyed. + +

+The method returns an error code if problems are found. + +

+The arguments are: +

+
locstream
+
ESMF_LocStream to validate. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if the locstream + is valid. + +
+
+ +

+ + +

+33 Mesh Class +

+ +

+33.1 Description +

+ +

+Unstructured grids are commonly used in the computational solution of partial differential +equations. These are especially useful for problems that involve complex geometry, where +using the less flexible structured grids can result in grid representation of regions +where no computation is needed. Finite element and finite volume methods map naturally +to unstructured grids and are used commonly in hydrology, ocean modeling, and many other +applications. + +

+In order to provide support for application codes using unstructured grids, the ESMF library +provides a class for representing unstructured grids called the Mesh. Fields can be +created on a Mesh to hold data. Fields created on a Mesh can also be used as either the +source or destination or both of an interpolation (i.e. an ESMF_FieldRegridStore() call) +which allows data to be moved between unstructured grids. This section describes the Mesh +and how to create and use them in ESMF. + +

+ +

+
+33.1.1 Mesh representation in ESMF +

+ +

+A Mesh in ESMF is constructed of nodes and elements. + +

+A node, also known as a vertex or corner, is a part of a Mesh which represents a single point. Coordinate information is +set in a node. + +

+An element, also known as a cell, is a part of a mesh which represents a small +region of space. Elements are described in terms of a connected set of nodes which represent locations along their boundaries. + +

+Field data may be located on either the nodes or elements of a Mesh. + +

+ +

+
+ +

+The dimension of a Mesh in ESMF is specified with two parameters: the parametric dimension and the spatial dimension. + +

+The parametric dimension of a Mesh is the dimension of the topology of the Mesh. This can be thought of as the dimension of +the elements which make up the Mesh. For example, a Mesh composed of triangles would have a parametric dimension of 2, whereas +a Mesh composed of tetrahedra would have a parametric dimension of 3. + +

+The spatial dimension of a Mesh is the dimension of the space the Mesh is embedded in. In other words, it is the number of coordinate dimensions needed to describe the location of the nodes making up the Mesh. + +

+For example, a Mesh constructed of squares on a plane would have a parametric dimension of 2 and a spatial dimension of 2. +If that same Mesh were used to represent the 2D surface of a sphere, then the Mesh would still have a parametric dimension +of 2, but now its spatial dimension would be 3. + +

+ +

+33.1.2 Supported Meshes +

+ +

+The range of Meshes supported by ESMF are defined by several factors: dimension, element +types, and distribution. + +

+ESMF currently only supports Meshes whose number of coordinate dimensions (spatial dimension) +is 2 or 3. The dimension of the elements in a Mesh (parametric dimension) must be less than +or equal to the spatial dimension, but also must be either 2 or 3. This means that a Mesh may +be either 2D elements in 2D space, 3D elements in 3D space, or a manifold constructed of 2D +elements embedded in 3D space. + +

+ESMF supports a range of elements for each Mesh parametric dimension. For a +parametric dimension of 2, the native supported element types are triangles and quadrilaterals. +In addition to these, ESMF supports 2D polygons with any number of sides. Internally these +are represented as sets of triangles, but to the user should behave like any other element. +For a parametric dimension of 3, the supported element types are tetrahedrons +and hexahedrons. See Section 33.2.1 for diagrams of these. The Mesh +supports any combination of element types within a particular dimension, but types from +different dimensions may not be mixed. For example, a Mesh cannot be constructed of both +quadrilaterals and tetrahedra. + +

+ESMF currently only supports distributions where every node on a PET must be a part of an +element on that PET. In other words, there must not be nodes without a corresponding element +on any PET. + +

+33.2 Constants +

+ +

+ +

+ +
+33.2.1 ESMF_MESHELEMTYPE +

+ +

+DESCRIPTION: +
+ An ESMF Mesh can be constructed from a combination of different elements. The type of elements that can +be used in a Mesh depends on the Mesh's parameteric dimension, which is set during Mesh creation. The +following are the valid Mesh element types for each valid Mesh parametric dimension (2D or 3D) . + +

+ +

+
+ +

+

+                     3                          4 ---------- 3
+                    / \                         |            |  
+                   /   \                        |            |
+                  /     \                       |            |
+                 /       \                      |            |
+                /         \                     |            |
+               1 --------- 2                    1 ---------- 2
+
+           ESMF_MESHELEMTYPE_TRI            ESMF_MESHELEMTYPE_QUAD
+
+     2D element types (numbers are the order for elementConn during Mesh create)
+
+ +

+For a Mesh with parametric dimension of 2 ESMF supports two native element types (illustrated above), +but also supports polygons with more sides. Internally these polygons are represented as a set of +triangles, but to the user should behave like other elements. +To specify the non-native polygons in the elementType argument use the number of corners +of the polygon (e.g. for a pentagon use 5). The connectivity for a polygon should be specified in counterclockwise order. +The following table summarizes this information: + +

+ +

+ +

+ + + + + + + + + + + + + + + + + +
Element TypeNumber of NodesDescription
ESMF_MESHELEMTYPE_TRI3A triangle
ESMF_MESHELEMTYPE_QUAD4A quadrilateral (e.g. a rectangle)
NNAn N-gon (e.g. if N=5 a pentagon)
+ +

+ +

+
+ +

+
+ +

+

+                                            
+                 3                               8---------------7
+                /|\                             /|              /|
+               / | \                           / |             / |
+              /  |  \                         /  |            /  |
+             /   |   \                       /   |           /   |
+            /    |    \                     5---------------6    |
+           4-----|-----2                    |    |          |    |
+            \    |    /                     |    4----------|----3
+             \   |   /                      |   /           |   /
+              \  |  /                       |  /            |  /
+               \ | /                        | /             | /
+                \|/                         |/              |/
+                 1                          1---------------2
+
+       ESMF_MESHELEMTYPE_TETRA             ESMF_MESHELEMTYPE_HEX  
+
+  3D element types (numbers are the order for elementConn during Mesh create)
+
+ +

+For a Mesh with parametric dimension of 3 the valid element types (illustrated above) are: + +

+ +

+ +

+ + + + + + + + + + + + + +
Element TypeNumber of NodesDescription
ESMF_MESHELEMTYPE_TETRA4A tetrahedron (NOT VALID IN BILINEAR OR PATCH REGRID)
ESMF_MESHELEMTYPE_HEX8A hexahedron (e.g. a cube)
+ +

+33.3 Use and Examples +

+ +

+ +

+ +

+This section describes the use of the ESMF Mesh class. It starts with an explanation and examples of + creating a Mesh and then goes through other Mesh methods. This set of sections covers the use of the + Mesh class interfaces. For further detail which applies to creating a Field on a Mesh, please see + Section 26.3.19. + +

+ +

+ +
+33.3.1 Mesh creation +

+ +

+To create a Mesh we need to set some properties of the Mesh as a whole, some properties of each node in the mesh and + then some properties of each element which connects the nodes (for a definition of node and element please see + Section 33.1.1). + +

+For the Mesh as a whole we set its parametric dimension (parametricDim) and spatial dimension (spatialDim). + A Mesh's parametric dimension can be thought of as the dimension of the elements which make up the Mesh. + A Mesh's spatial dimension, on the other hand, is the is the number of coordinate dimensions needed to describe the location of + the nodes making up the Mesh. (For a fuller definition of these terms please see Section 33.1.1.) + +

+The structure of the per node and element information used to create a Mesh is influenced by the Mesh distribution strategy. + The Mesh class is distributed by elements. This means that a node must be present on any PET that contains an element + associated with that node, but not on any other PET (a node can't be on a PET without an element "home"). Since a node may be used + by two or more elements located on different PETs, a node may be duplicated on multiple PETs. When a node is duplicated in this manner, + one and only one of the PETs that contain the node must "own" the node. The user sets this ownership when they define the nodes during Mesh creation. + When a Field is created on a Mesh (i.e. on the Mesh nodes), on each PET the Field is only created on the nodes which are owned by that PET. + This means that the size of the Field memory on the PET can be smaller than the number of nodes used to create the Mesh on + that PET. Please see Section 26.3.19 in Field for further explanation and examples of this + issue and others in working with Fields on Meshes. + +

+For each node in the Mesh we set three properties: the global id of the node (nodeIds), node coordinates + (nodeCoords), and which PET owns the node (nodeOwners). The node id is a unique (across all PETs) integer + attached to the particular node. It is used to indicate which nodes are the same when connecting together pieces of the + Mesh on different processors. The node coordinates indicate the location of a node in space and are used in the + ESMF_FieldRegrid() functionality when interpolating. The node owner indicates which PET is in charge of the node. This + is used when creating a Field on the Mesh to indicate which PET should contain a Field location for the data. + +

+For each element in the Mesh we set three properties: the global id of the element (elementIds), the topology type of + the element (elementTypes), and which nodes are connected together to form the element (elementConn). The element id is + a unique (across all PETs) integer attached to the particular element. The element type describes the topology of the element + (e.g. a triangle vs. a quadrilateral). The range of choices for the topology of the elements in a Mesh are restricted by the + Mesh's parametric dimension (e.g. a Mesh can't contain a 2D element like a triangle, when its parametric dimension is 3D), but it can contain + any combination of elements appropriate to its dimension. In particular, in 2D ESMF supports two native element types triangle and quadrilateral, but + also provides support for polygons with any number of sides. These polygons are represented internally as sets of triangles, but to the user + should behave like other elements. To specify a polygon with more than four sides, the element type should be set to the number of corners of + the polygon (e.g. element type=6 for a hexagon). + The element connectivity indicates which nodes are to be connected together to + form the element. The number of nodes connected together for each element is implied by the elements topology type (elementTypes). + It is IMPORTANT to note, that the entries in this list are NOT the global ids of the nodes, but are indices into the PET local lists of + node info used in the Mesh Create. In other words, the element connectivity isn't specified in terms of the global list of nodes, but instead + is specified in terms of the locally described node info. One other important point about connectivities is that the order of the nodes in the + connectivity list of an element is important. Please see Section 33.2.1 for diagrams illustrating the correct order of + nodes in an element. In general, when specifying an element with parametric dimension 2, the nodes should be given in counterclockwise order + around the element. + +

+Mesh creation may either be performed as a one step process using the full ESMF_MeshCreate() call, or may be done in three steps. The + three step process starts with a more minimal ESMF_MeshCreate() call. It is then followed by the ESMF_MeshAddNodes() to + specify nodes, and then the ESMF_MeshAddElements() call to specify elements. This three step sequence is useful to conserve memory + because the node arrays being used for the ESMF_MeshAddNodes() call can be deallocated before creating the arrays to be used in the ESMF_MeshAddElements() call. + +

+ +

+
+33.3.2 Create a small single PET Mesh in one step +

+ + +
+
+  
+   
+    2.0   7 ------- 8 ------- 9
+          |         |         |
+          |    4    |    5    |
+          |         |         |
+    1.0   4 ------- 5 ------- 6
+          |         |  \   3  |
+          |    1    |    \    |
+          |         |  2   \  |
+    0.0   1 ------- 2 ------- 3
+  
+         0.0       1.0        2.0 
+   
+          Node Id labels at corners
+         Element Id labels in centers
+         (Everything owned by PET 0)
+
+ +

+This example is intended to illustrate the creation of a small Mesh on one PET. The reason for starting with a single PET + case is so that the user can start to familiarize themselves with the concepts of Mesh creation without the added complication of + multiple processors. Later examples illustrate the multiple processor case. This example creates the small 2D Mesh which can be + seen in the figure above. Note that this Mesh consists of 9 nodes and 5 elements, where the elements are a mixture of + quadrilaterals and triangles. The coordinates of the nodes in the Mesh range from 0.0 to 2.0 in both dimensions. The node ids are + in the corners of the elements whereas the element ids are in the centers. The following section of code illustrates the creation of + this Mesh. + +

+

+  ! Set number of nodes
+  numNodes=9
+
+  ! Allocate and fill the node id array.
+  allocate(nodeIds(numNodes))
+  nodeIds=(/1,2,3,4,5,6,7,8,9/) 
+
+  ! Allocate and fill node coordinate array.
+  ! Since this is a 2D Mesh the size is 2x the
+  ! number of nodes.
+  allocate(nodeCoords(2*numNodes))
+  nodeCoords=(/0.0,0.0, & ! node id 1
+               1.0,0.0, & ! node id 2
+               2.0,0.0, & ! node id 3
+               0.0,1.0, & ! node id 4
+               1.0,1.0, & ! node id 5
+               2.0,1.0, & ! node id 6
+               0.0,2.0, & ! node id 7
+               1.0,2.0, & ! node id 8
+               2.0,2.0 /) ! node id 9
+
+  ! Allocate and fill the node owner array.
+  ! Since this Mesh is all on PET 0, it's just set to all 0.
+  allocate(nodeOwners(numNodes))
+  nodeOwners=0 ! everything on PET 0
+
+
+  ! Set the number of each type of element, plus the total number.
+  numQuadElems=3
+  numTriElems=2
+  numTotElems=numQuadElems+numTriElems
+
+
+  ! Allocate and fill the element id array.
+  allocate(elemIds(numTotElems))
+  elemIds=(/1,2,3,4,5/) 
+
+
+  ! Allocate and fill the element topology type array.
+  allocate(elemTypes(numTotElems))
+  elemTypes=(/ESMF_MESHELEMTYPE_QUAD, & ! elem id 1
+              ESMF_MESHELEMTYPE_TRI,  & ! elem id 2
+              ESMF_MESHELEMTYPE_TRI,  & ! elem id 3
+              ESMF_MESHELEMTYPE_QUAD, & ! elem id 4
+              ESMF_MESHELEMTYPE_QUAD/)  ! elem id 5
+
+
+  ! Allocate and fill the element connection type array.
+  ! Note that entries in this array refer to the 
+  ! positions in the nodeIds, etc. arrays and that
+  ! the order and number of entries for each element
+  ! reflects that given in the Mesh options 
+  ! section for the corresponding entry
+  ! in the elemTypes array. The number of 
+  ! entries in this elemConn array is the
+  ! number of nodes in a quad. (4) times the 
+  ! number of quad. elements plus the number
+  ! of nodes in a triangle (3) times the number
+  ! of triangle elements. 
+  allocate(elemConn(4*numQuadElems+3*numTriElems))
+  elemConn=(/1,2,5,4, &  ! elem id 1
+             2,3,5,   &  ! elem id 2
+             3,6,5,   &  ! elem id 3
+             4,5,8,7, &  ! elem id 4
+             5,6,9,8/)   ! elem id 5
+
+
+  ! Create Mesh structure in 1 step
+  mesh=ESMF_MeshCreate(parametricDim=2,spatialDim=2, &
+         coordSys=ESMF_COORDSYS_CART, &
+         nodeIds=nodeIds, nodeCoords=nodeCoords, &
+         nodeOwners=nodeOwners, elementIds=elemIds,&
+         elementTypes=elemTypes, elementConn=elemConn, &
+         rc=localrc)
+
+
+  ! After the creation we are through with the arrays, so they may be
+  ! deallocated.
+  deallocate(nodeIds)
+  deallocate(nodeCoords)
+  deallocate(nodeOwners)
+  deallocate(elemIds)
+  deallocate(elemTypes)
+  deallocate(elemConn)
+
+
+  ! At this point the mesh is ready to use. For example, as is 
+  ! illustrated here, to have a field created on it. Note that 
+  ! the Field only contains data for nodes owned by the current PET.
+  ! Please see Section "Create a Field from a Mesh" under Field
+  ! for more information on creating a Field on a Mesh. 
+  field = ESMF_FieldCreate(mesh, ESMF_TYPEKIND_R8,  rc=localrc)
+
+ +

+ +

+
+33.3.3 Create a small single PET Mesh in three steps +

+ +

+This example is intended to illustrate the creation of a small Mesh in three steps on one PET. The Mesh being created is exactly + the same one as in the last example (Section 33.3.2), but the three step process allows the creation to occur in + a more memory efficient manner. + +

+

+  ! Create the mesh structure setting the dimensions
+  ! and coordinate system
+  mesh = ESMF_MeshCreate(parametricDim=2,spatialDim=2, &
+                         coordSys=ESMF_COORDSYS_CART, &
+                         rc=localrc)
+
+  ! Set number of nodes
+  numNodes=9
+
+  ! Allocate and fill the node id array.
+  allocate(nodeIds(numNodes))
+  nodeIds=(/1,2,3,4,5,6,7,8,9/) 
+
+  ! Allocate and fill node coordinate array.
+  ! Since this is a 2D Mesh the size is 2x the
+  ! number of nodes.
+  allocate(nodeCoords(2*numNodes))
+  nodeCoords=(/0.0,0.0, & ! node id 1
+               1.0,0.0, & ! node id 2
+               2.0,0.0, & ! node id 3
+               0.0,1.0, & ! node id 4
+               1.0,1.0, & ! node id 5
+               2.0,1.0, & ! node id 6
+               0.0,2.0, & ! node id 7
+               1.0,2.0, & ! node id 8
+               2.0,2.0 /) ! node id 9
+
+  ! Allocate and fill the node owner array.
+  ! Since this Mesh is all on PET 0, it's just set to all 0.
+  allocate(nodeOwners(numNodes))
+  nodeOwners=0 ! everything on PET 0
+
+  ! Add the nodes to the Mesh
+  call ESMF_MeshAddNodes(mesh, nodeIds=nodeIds, &
+         nodeCoords=nodeCoords, nodeOwners=nodeOwners, rc=localrc)
+
+  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+  ! HERE IS THE POINT OF THE THREE STEP METHOD
+  ! WE CAN DELETE THESE NODE ARRAYS BEFORE 
+  ! ALLOCATING THE ELEMENT ARRAYS, THEREBY
+  ! REDUCING THE AMOUNT OF MEMORY NEEDED 
+  ! AT ONE TIME. 
+  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+  deallocate(nodeIds)
+  deallocate(nodeCoords)
+  deallocate(nodeOwners)
+
+
+  ! Set the number of each type of element, plus the total number.
+  numQuadElems=3
+  numTriElems=2
+  numTotElems=numQuadElems+numTriElems
+
+  ! Allocate and fill the element id array.
+  allocate(elemIds(numTotElems))
+  elemIds=(/1,2,3,4,5/) 
+
+  ! Allocate and fill the element topology type array.
+  allocate(elemTypes(numTotElems))
+  elemTypes=(/ESMF_MESHELEMTYPE_QUAD, & ! elem id 1
+              ESMF_MESHELEMTYPE_TRI,  & ! elem id 2
+              ESMF_MESHELEMTYPE_TRI,  & ! elem id 3
+              ESMF_MESHELEMTYPE_QUAD, & ! elem id 4
+              ESMF_MESHELEMTYPE_QUAD/)  ! elem id 5
+
+
+  ! Allocate and fill the element connection type array.
+  ! Note that entries in this array refer to the 
+  ! positions in the nodeIds, etc. arrays and that
+  ! the order and number of entries for each element
+  ! reflects that given in the Mesh options 
+  ! section for the corresponding entry
+  ! in the elemTypes array. The number of 
+  ! entries in this elemConn array is the
+  ! number of nodes in a quad. (4) times the 
+  ! number of quad. elements plus the number
+  ! of nodes in a triangle (3) times the number
+  ! of triangle elements. 
+  allocate(elemConn(4*numQuadElems+3*numTriElems))
+  elemConn=(/1,2,5,4, &  ! elem id 1
+             2,3,5,   &  ! elem id 2
+             3,6,5,   &  ! elem id 3
+             4,5,8,7, &  ! elem id 4
+             5,6,9,8/)   ! elem id 5
+
+
+  ! Finish the creation of the Mesh by adding the elements
+  call ESMF_MeshAddElements(mesh, elementIds=elemIds,&
+         elementTypes=elemTypes, elementConn=elemConn, &
+         rc=localrc)
+
+  ! After the creation we are through with the arrays, so they may be
+  ! deallocated.
+  deallocate(elemIds)
+  deallocate(elemTypes)
+  deallocate(elemConn)
+
+
+  ! At this point the mesh is ready to use. For example, as is 
+  ! illustrated here, to have a field created on it. Note that 
+  ! the Field only contains data for nodes owned by the current PET.
+  ! Please see Section "Create a Field from a Mesh" under Field
+  ! for more information on creating a Field on a Mesh. 
+  field = ESMF_FieldCreate(mesh, ESMF_TYPEKIND_R8,  rc=localrc)
+
+ +

+ +

+ +
+33.3.4 Create a small Mesh on 4 PETs in one step +

+ + +
+
+  
+    2.0   7 ------- 8        [8] ------ 9          
+          |         |         |         |
+          |    4    |         |    5    |
+          |         |         |         |
+    1.0  [4] ----- [5]       [5] ----- [6]
+          
+         0.0       1.0       1.0       2.0
+  
+             PET 2               PET 3
+  
+  
+    1.0   4 ------- 5        [5] ------ 6
+          |         |         |  \   3  |
+          |    1    |         |    \    |
+          |         |         | 2    \  |
+    0.0   1 ------- 2        [2] ------ 3
+  
+         0.0       1.0       1.0      2.0 
+   
+             PET 0               PET 1
+  
+                 Node Id labels at corners
+                Element Id labels in centers
+
+ +

+This example is intended to illustrate the creation of a small Mesh on multiple PETs. This example creates the same small 2D Mesh as the + previous two examples (See Section 33.3.2 for a diagram), however, in this case the Mesh is broken up across 4 PETs. + The figure above illustrates the distribution of the Mesh across the PETs. As in the previous diagram, the node ids are in + the corners of the elements and the element ids are in the centers. In this figure '[' and ']' around a character indicate a node which + is owned by another PET. The nodeOwner parameter indicates which PET owns the node. Note that the three step creation + illustrated in Section 33.3.3 could also be used in a parallel Mesh creation such as this by simply interleaving + the three calls in the appropriate places between the node and element array definitions. + +

+

+ ! Break up what's being set by PET
+ if (localPET .eq. 0) then !!! This part only for PET 0
+    ! Set number of nodes
+     numNodes=4
+
+    ! Allocate and fill the node id array.
+    allocate(nodeIds(numNodes))
+    nodeIds=(/1,2,4,5/) 
+
+    ! Allocate and fill node coordinate array.
+    ! Since this is a 2D Mesh the size is 2x the
+    ! number of nodes.
+    allocate(nodeCoords(2*numNodes))
+    nodeCoords=(/0.0,0.0, & ! node id 1
+                 1.0,0.0, & ! node id 2
+                 0.0,1.0, & ! node id 4
+                 1.0,1.0 /) ! node id 5
+
+    ! Allocate and fill the node owner array.
+    allocate(nodeOwners(numNodes))
+    nodeOwners=(/0, & ! node id 1
+                 0, & ! node id 2
+                 0, & ! node id 4
+                 0/)  ! node id 5
+
+    ! Set the number of each type of element, plus the total number.
+    numQuadElems=1
+    numTriElems=0
+    numTotElems=numQuadElems+numTriElems
+
+    ! Allocate and fill the element id array.
+    allocate(elemIds(numTotElems))
+    elemIds=(/1/) 
+
+    ! Allocate and fill the element topology type array.
+    allocate(elemTypes(numTotElems))
+    elemTypes=(/ESMF_MESHELEMTYPE_QUAD/) ! elem id 1
+
+    ! Allocate and fill the element connection type array.
+    ! Note that entry are local indices
+    allocate(elemConn(4*numQuadElems+3*numTriElems))
+    elemConn=(/1,2,4,3/) ! elem id 1
+
+  else if (localPET .eq. 1) then !!! This part only for PET 1
+    ! Set number of nodes
+     numNodes=4
+
+    ! Allocate and fill the node id array.
+    allocate(nodeIds(numNodes))
+    nodeIds=(/2,3,5,6/) 
+
+    ! Allocate and fill node coordinate array.
+    ! Since this is a 2D Mesh the size is 2x the
+    ! number of nodes.
+    allocate(nodeCoords(2*numNodes))
+    nodeCoords=(/1.0,0.0, & ! node id 2
+                 2.0,0.0, & ! node id 3
+                 1.0,1.0, & ! node id 5
+                 2.0,1.0 /) ! node id 6
+
+    ! Allocate and fill the node owner array.
+    allocate(nodeOwners(numNodes))
+    nodeOwners=(/0, & ! node id 2
+                 1, & ! node id 3
+                 0, & ! node id 5
+                 1/)  ! node id 6
+
+    ! Set the number of each type of element, plus the total number.
+    numQuadElems=0
+    numTriElems=2
+    numTotElems=numQuadElems+numTriElems
+
+    ! Allocate and fill the element id array.
+    allocate(elemIds(numTotElems))
+    elemIds=(/2,3/) 
+
+    ! Allocate and fill the element topology type array.
+    allocate(elemTypes(numTotElems))
+    elemTypes=(/ESMF_MESHELEMTYPE_TRI, & ! elem id 2
+                ESMF_MESHELEMTYPE_TRI/)  ! elem id 3
+
+    ! Allocate and fill the element connection type array.
+    allocate(elemConn(4*numQuadElems+3*numTriElems))
+    elemConn=(/1,2,3, & ! elem id 2
+               2,4,3/)  ! elem id 3
+
+  else if (localPET .eq. 2) then !!! This part only for PET 2
+    ! Set number of nodes
+     numNodes=4
+
+    ! Allocate and fill the node id array.
+    allocate(nodeIds(numNodes))
+    nodeIds=(/4,5,7,8/) 
+
+    ! Allocate and fill node coordinate array.
+    ! Since this is a 2D Mesh the size is 2x the
+    ! number of nodes.
+    allocate(nodeCoords(2*numNodes))
+    nodeCoords=(/0.0,1.0, & ! node id 4
+                 1.0,1.0, & ! node id 5
+                 0.0,2.0, & ! node id 7
+                 1.0,2.0 /) ! node id 8
+
+    ! Allocate and fill the node owner array.
+    ! Since this Mesh is all on PET 0, it's just set to all 0.
+    allocate(nodeOwners(numNodes))
+    nodeOwners=(/0, & ! node id 4
+                 0, & ! node id 5
+                 2, & ! node id 7
+                 2/)  ! node id 8
+
+    ! Set the number of each type of element, plus the total number.
+    numQuadElems=1
+    numTriElems=0
+    numTotElems=numQuadElems+numTriElems
+
+    ! Allocate and fill the element id array.
+    allocate(elemIds(numTotElems))
+    elemIds=(/4/) 
+
+    ! Allocate and fill the element topology type array.
+    allocate(elemTypes(numTotElems))
+    elemTypes=(/ESMF_MESHELEMTYPE_QUAD/) ! elem id 4
+
+    ! Allocate and fill the element connection type array.
+    allocate(elemConn(4*numQuadElems+3*numTriElems))
+    elemConn=(/1,2,4,3/) ! elem id 4
+
+  else if (localPET .eq. 3) then !!! This part only for PET 3
+    ! Set number of nodes
+     numNodes=4
+
+    ! Allocate and fill the node id array.
+    allocate(nodeIds(numNodes))
+    nodeIds=(/5,6,8,9/) 
+
+    ! Allocate and fill node coordinate array.
+    ! Since this is a 2D Mesh the size is 2x the
+    ! number of nodes.
+    allocate(nodeCoords(2*numNodes))
+    nodeCoords=(/1.0,1.0, &  ! node id 5
+                 2.0,1.0, &  ! node id 6
+                 1.0,2.0, &  ! node id 8
+                 2.0,2.0 /)  ! node id 9
+
+    ! Allocate and fill the node owner array.
+    allocate(nodeOwners(numNodes))
+    nodeOwners=(/0, & ! node id 5
+                 1, & ! node id 6
+                 2, & ! node id 8
+                 3/)  ! node id 9
+
+    ! Set the number of each type of element, plus the total number.
+    numQuadElems=1
+    numTriElems=0
+    numTotElems=numQuadElems+numTriElems
+
+    ! Allocate and fill the element id array.
+    allocate(elemIds(numTotElems))
+    elemIds=(/5/)  
+
+    ! Allocate and fill the element topology type array.
+    allocate(elemTypes(numTotElems))
+    elemTypes=(/ESMF_MESHELEMTYPE_QUAD/) ! elem id 5
+
+    ! Allocate and fill the element connection type array.
+    allocate(elemConn(4*numQuadElems+3*numTriElems))
+    elemConn=(/1,2,4,3/) ! elem id 5
+  endif
+
+  
+  ! Create Mesh structure in 1 step
+  mesh=ESMF_MeshCreate(parametricDim=2, spatialDim=2, &
+         coordSys=ESMF_COORDSYS_CART, &
+         nodeIds=nodeIds, nodeCoords=nodeCoords, &
+         nodeOwners=nodeOwners, elementIds=elemIds,&
+         elementTypes=elemTypes, elementConn=elemConn, &
+         rc=localrc)
+
+
+  ! After the creation we are through with the arrays, so they may be
+  ! deallocated.
+  deallocate(nodeIds)
+  deallocate(nodeCoords)
+  deallocate(nodeOwners)
+  deallocate(elemIds)
+  deallocate(elemTypes)
+  deallocate(elemConn)
+
+
+  ! At this point the mesh is ready to use. For example, as is 
+  ! illustrated here, to have a field created on it. Note that 
+  ! the Field only contains data for nodes owned by the current PET.
+  ! Please see Section "Create a Field from a Mesh" under Field
+  ! for more information on creating a Field on a Mesh. 
+  field = ESMF_FieldCreate(mesh, ESMF_TYPEKIND_R8,  rc=localrc)
+
+ +

+ +

+33.3.5 Create a copy of a Mesh with a new distribution +

+ + +
+
+  
+    2.0   7 -------[8]               8 ------- 9          
+          |         |                |         |
+          |    4    |                |    5    |
+          |         |                |         |
+    1.0   4 ------ [5]               5 ------- 6
+          
+         0.0       1.0              1.0       2.0
+  
+             PET 1                      PET 0
+  
+  
+    1.0  [4] ----- [5]              [5] ----- [6]
+          |         |  \                \      |
+          |    1    | 2  \                \  3 |
+          |         |      \                \  |
+    0.0   1 ------- 2 -----[3]                 3
+  
+         0.0       1.0               1.0      2.0 
+   
+             PET 2                      PET 3
+  
+                 Node Id labels at corners
+                Element Id labels in centers
+
+ +

+This example demonstrates the creation of a new Mesh which is a copy of an existing Mesh + with a new distribution of the original Mesh's nodes and elements. To create the new Mesh + in this manner the user needs two DistGrids. One to describe the new distribution of the nodes. + The other to describe the new distribution of the elements. In this example we create new + DistGrids from a list of indices. The DistGrids are then used in the redistribution + Mesh create interface which is overloaded to ESMF_MeshCreate(). In this example + we redistribute the Mesh created in the previous example (Section 33.3.4) + to the distribution pictured above. Note that for simplicity's sake, the position of the + Mesh in the diagram is basically the same, but the PET positions and node owners + have been changed. + +

+

+  ! Setup the new location of nodes and elements depending on the processor
+  if (localPet .eq. 0) then !!! This part only for PET 0
+     allocate(elemIds(1))
+     elemIds=(/5/)
+     
+     allocate(nodeIds(4))
+     nodeIds=(/5,6,8,9/)
+     
+  else if (localPet .eq. 1) then !!! This part only for PET 1
+     allocate(elemIds(1))
+     elemIds=(/4/)
+     
+     allocate(nodeIds(2))
+     nodeIds=(/7,4/)        
+     
+  else if (localPet .eq. 2) then !!! This part only for PET 2
+     allocate(elemIds(2))
+     elemIds=(/1,2/)
+     
+     allocate(nodeIds(2))
+     nodeIds=(/1,2/)
+     
+  else if (localPet .eq. 3) then !!! This part only for PET 3
+     allocate(elemIds(1))
+     elemIds=(/3/)
+     
+     allocate(nodeIds(1))
+     nodeIds=(/3/)
+     
+  endif
+
+
+  ! Create new node DistGrid
+  nodedistgrid=ESMF_DistGridCreate(nodeIds, rc=localrc)
+  if (localrc .ne. ESMF_SUCCESS) rc=ESMF_FAILURE
+
+ 
+  ! Create new element DistGrid
+  elemdistgrid=ESMF_DistGridCreate(elemIds, rc=localrc)
+  if (localrc .ne. ESMF_SUCCESS) rc=ESMF_FAILURE
+
+
+  ! Can now deallocate distribution lists
+  deallocate(elemIds)
+  deallocate(nodeIds)
+
+
+  ! Create new redisted Mesh based on DistGrids
+  mesh2=ESMF_MeshCreate(mesh,                         &
+                        nodalDistgrid=nodedistgrid,   & 
+                        elementDistgrid=elemdistgrid, &
+                        rc=localrc)
+  if (localrc .ne. ESMF_SUCCESS) rc=ESMF_FAILURE
+
+
+  ! At this point the mesh is ready to use. For example, as is 
+  ! illustrated here, to have a field created on it. Note that 
+  ! the Field only contains data for nodes owned by the current PET.
+  ! Please see Section "Create a Field from a Mesh" under Field
+  ! for more information on creating a Field on a Mesh. 
+  field = ESMF_FieldCreate(mesh2, ESMF_TYPEKIND_R8,  rc=localrc)
+
+ +

+ +

+ +
+33.3.6 Create a small Mesh of all one element type on 4 PETs using easy element method +

+ + +
+
+  
+    2.0   * ------- *         * ------- *          
+          |         |         |         |
+          |    3    |         |    4    |
+          |         |         |         |
+    1.0   * ------- *         * ------- *
+          
+         0.0       1.0       1.0       2.0
+  
+             PET 2               PET 3
+  
+  
+    1.0   * ------- *         * ------- *
+          |         |         |         |
+          |    1    |         |    2    |
+          |         |         |         |
+    0.0   * ------- *         * ------- *
+  
+         0.0       1.0       1.0      2.0 
+   
+             PET 0               PET 1
+  
+             Element Id labels in centers
+
+ +

+This example is intended to illustrate the creation of a small Mesh on multiple PETs using the easy element creation interface. + Here the Mesh consists of only one type of element, so we can use a slightly more convenient interface. In this interface the user + only needs to specify the element type once and the elementCornerCoords argument has three dimensions. This means that the corners for all + elements are not collapsed into a 1D list as happens with the next example. + +

+The figure above shows the Mesh to be created and it's distribution across the PETs. As in the previous diagrams, the element ids are in the centers. + Note that in the example code below the user doesn't specify the element ids. In this case, they are assigned sequentially + through the local elements on each PET starting with 1 for the first element on PET 0. (It isn't shown in the example below, but there is + an optional argument that enables the user to set the element ids if they wish.) + Unlike some of the previous examples of Mesh creation, here the user doesn't specify node ids or ownership, so that information is shown by a "*" in + the diagram. + +

+

+ ! Break up what's being set by PET
+ if (localPET .eq. 0) then !!! This part only for PET 0
+
+    ! Set the number of elements on this PET
+    numTotElems=1
+
+    ! Allocate and fill element corner coordinate array.
+    allocate(elemCornerCoords3(2,4,numTotElems))
+    elemCornerCoords3(:,1,1)=(/0.0,0.0/) ! elem id 1 corner 1 
+    elemCornerCoords3(:,2,1)=(/1.0,0.0/) ! elem id 1 corner 2
+    elemCornerCoords3(:,3,1)=(/1.0,1.0/) ! elem id 1 corner 3
+    elemCornerCoords3(:,4,1)=(/0.0,1.0/) ! elem id 1 corner 4
+
+  else if (localPET .eq. 1) then !!! This part only for PET 1
+
+    ! Set the number of elements on this PET
+    numTotElems=1
+
+    ! Allocate and fill element corner coordinate array.
+    allocate(elemCornerCoords3(2,4,numTotElems))
+    elemCornerCoords3(:,1,1)=(/1.0,0.0/) ! elem id 2 corner 1 
+    elemCornerCoords3(:,2,1)=(/2.0,0.0/) ! elem id 2 corner 2
+    elemCornerCoords3(:,3,1)=(/2.0,1.0/) ! elem id 2 corner 3
+    elemCornerCoords3(:,4,1)=(/1.0,1.0/) ! elem id 2 corner 4 
+
+
+  else if (localPET .eq. 2) then !!! This part only for PET 2
+
+    ! Set the number of elements on this PET
+    numTotElems=1
+
+    ! Allocate and fill element corner coordinate array.
+    allocate(elemCornerCoords3(2,4,numTotElems))
+    elemCornerCoords3(:,1,1)=(/0.0,1.0/) ! elem id 3 corner 1 
+    elemCornerCoords3(:,2,1)=(/1.0,1.0/) ! elem id 3 corner 2
+    elemCornerCoords3(:,3,1)=(/1.0,2.0/) ! elem id 3 corner 3
+    elemCornerCoords3(:,4,1)=(/0.0,2.0/) ! elem id 3 corner 4
+
+
+  else if (localPET .eq. 3) then !!! This part only for PET 3
+
+    ! Set the number of elements on this PET
+    numTotElems=1
+
+    ! Allocate and fill element corner coordinate array.
+    allocate(elemCornerCoords3(2,4,numTotElems))
+    elemCornerCoords3(:,1,1)=(/1.0,1.0/) ! elem id 4 corner 1 
+    elemCornerCoords3(:,2,1)=(/2.0,1.0/) ! elem id 4 corner 2
+    elemCornerCoords3(:,3,1)=(/2.0,2.0/) ! elem id 4 corner 3
+    elemCornerCoords3(:,4,1)=(/1.0,2.0/) ! elem id 4 corner 4
+
+  endif
+  
+  ! Create Mesh structure in 1 step
+  mesh=ESMF_MeshCreate(parametricDim=2, &
+         coordSys=ESMF_COORDSYS_CART,   &
+         elementType=ESMF_MESHELEMTYPE_QUAD, &
+         elementCornerCoords=elemCornerCoords3, &
+         rc=localrc)
+
+
+  ! After the creation we are through with the arrays, so they may be
+  ! deallocated.
+  deallocate(elemCornerCoords3)
+
+  ! At this point the mesh is ready to use. For example, as is 
+  ! illustrated here, to have a field created on it. Note that 
+  ! the Field only contains data for elements owned by the current PET.
+  ! Please see Section "Create a Field from a Mesh" under Field
+  ! for more information on creating a Field on a Mesh. 
+  field = ESMF_FieldCreate(mesh, ESMF_TYPEKIND_R8, &
+       meshloc=ESMF_MESHLOC_ELEMENT, rc=localrc)
+
+ +

+ +

+ +
+33.3.7 Create a small Mesh of multiple element types on 4 PETs using easy element method +

+ + +
+
+  
+    2.0   * ------- *         * ------- *          
+          |         |         |         |
+          |    4    |         |    5    |
+          |         |         |         |
+    1.0   * ------- *         * ------- *
+          
+         0.0       1.0       1.0       2.0
+  
+             PET 2               PET 3
+  
+  
+    1.0   * ------- *         * ------- *
+          |         |         |  \   3  |
+          |    1    |         |    \    |
+          |         |         | 2    \  |
+    0.0   * ------- *         * ------- *
+  
+         0.0       1.0       1.0      2.0 
+   
+             PET 0               PET 1
+  
+             Element Id labels in centers
+
+ +

+This example is intended to illustrate the creation of a small Mesh on multiple PETs using the easy element creation interface. + In this example, the Mesh being created contains elements of multiple types. + To support the specification of a set of elements containing different types and thus different + numbers of corners, the elementCornerCoords argument has the + corner and element dimensions collapsed together into one dimension. + +

+The figure above shows the Mesh to be created and it's distribution across the PETs. As in the previous diagrams, the element ids are in the centers. + Note that in the example code below the user doesn't specify the element ids. In this case, they are assigned sequentially + through the local elements on each PET starting with 1 for the first element on PET 0. (It isn't shown in the example below, but there is + an optional argument that enables the user to set the element ids if they wish.) + Unlike some of the previous examples of Mesh creation, here the user doesn't specify node ids or ownership, so that information is shown by a "*" in + the diagram. + +

+

+ ! Break up what's being set by PET
+ if (localPET .eq. 0) then !!! This part only for PET 0
+
+    ! Set the number of each type of element, plus the total number.
+    numQuadElems=1
+    numTriElems=0
+    numTotElems=numQuadElems+numTriElems
+    numElemCorners=4*numQuadElems+3*numTriElems
+
+    ! Allocate and fill the element type array.
+    allocate(elemTypes(numTotElems))
+    elemTypes=(/ESMF_MESHELEMTYPE_QUAD/) ! elem id 1
+
+    ! Allocate and fill element corner coordinate array.
+    allocate(elemCornerCoords2(2,numElemCorners))
+    elemCornerCoords2(:,1)=(/0.0,0.0/) ! elem id 1 corner 1 
+    elemCornerCoords2(:,2)=(/1.0,0.0/) ! elem id 1 corner 2
+    elemCornerCoords2(:,3)=(/1.0,1.0/) ! elem id 1 corner 3
+    elemCornerCoords2(:,4)=(/0.0,1.0/) ! elem id 1 corner 4
+
+  else if (localPET .eq. 1) then !!! This part only for PET 1
+
+    ! Set the number of each type of element, plus the total number.
+    numQuadElems=0
+    numTriElems=2
+    numTotElems=numQuadElems+numTriElems
+    numElemCorners=4*numQuadElems+3*numTriElems
+
+    ! Allocate and fill the element type array.
+    allocate(elemTypes(numTotElems))
+    elemTypes=(/ESMF_MESHELEMTYPE_TRI, & ! elem id 2
+                ESMF_MESHELEMTYPE_TRI/)  ! elem id 3
+
+    ! Allocate and fill element corner coordinate array.
+    allocate(elemCornerCoords2(2,numElemCorners))
+    elemCornerCoords2(:,1)=(/1.0,0.0/) ! elem id 2 corner 1 
+    elemCornerCoords2(:,2)=(/2.0,0.0/) ! elem id 2 corner 2
+    elemCornerCoords2(:,3)=(/1.0,1.0/) ! elem id 2 corner 3
+    elemCornerCoords2(:,4)=(/2.0,0.0/) ! elem id 3 corner 1 
+    elemCornerCoords2(:,5)=(/2.0,1.0/) ! elem id 3 corner 2
+    elemCornerCoords2(:,6)=(/1.0,1.0/) ! elem id 3 corner 3
+
+  else if (localPET .eq. 2) then !!! This part only for PET 2
+
+    ! Set the number of each type of element, plus the total number.
+    numQuadElems=1
+    numTriElems=0
+    numTotElems=numQuadElems+numTriElems
+    numElemCorners=4*numQuadElems+3*numTriElems
+
+
+    ! Allocate and fill the element type array.
+    allocate(elemTypes(numTotElems))
+    elemTypes=(/ESMF_MESHELEMTYPE_QUAD/) ! elem id 4
+
+    ! Allocate and fill element corner coordinate array.
+    allocate(elemCornerCoords2(2,numElemCorners))
+    elemCornerCoords2(:,1)=(/0.0,1.0/) ! elem id 4 corner 1 
+    elemCornerCoords2(:,2)=(/1.0,1.0/) ! elem id 4 corner 2
+    elemCornerCoords2(:,3)=(/1.0,2.0/) ! elem id 4 corner 3
+    elemCornerCoords2(:,4)=(/0.0,2.0/) ! elem id 4 corner 4
+
+
+  else if (localPET .eq. 3) then !!! This part only for PET 3
+
+    ! Set the number of each type of element, plus the total number.
+    numQuadElems=1
+    numTriElems=0
+    numTotElems=numQuadElems+numTriElems
+    numElemCorners=4*numQuadElems+3*numTriElems
+
+    ! Allocate and fill the element type array.
+    allocate(elemTypes(numTotElems))
+    elemTypes=(/ESMF_MESHELEMTYPE_QUAD/) ! elem id 5
+
+    ! Allocate and fill element corner coordinate array.
+    allocate(elemCornerCoords2(2,numElemCorners))
+    elemCornerCoords2(:,1)=(/1.0,1.0/) ! elem id 5 corner 1 
+    elemCornerCoords2(:,2)=(/2.0,1.0/) ! elem id 5 corner 2
+    elemCornerCoords2(:,3)=(/2.0,2.0/) ! elem id 5 corner 3
+    elemCornerCoords2(:,4)=(/1.0,2.0/) ! elem id 5 corner 4
+
+  endif
+  
+  ! Create Mesh structure in 1 step
+  mesh=ESMF_MeshCreate(parametricDim=2, &
+         coordSys=ESMF_COORDSYS_CART,   &
+         elementTypes=elemTypes, &
+         elementCornerCoords=elemCornerCoords2, &
+         rc=localrc)
+
+
+  ! After the creation we are through with the arrays, so they may be
+  ! deallocated.
+  deallocate(elemTypes)
+  deallocate(elemCornerCoords2)
+
+  ! At this point the mesh is ready to use. For example, as is 
+  ! illustrated here, to have a field created on it. Note that 
+  ! the Field only contains data for elements owned by the current PET.
+  ! Please see Section "Create a Field from a Mesh" under Field
+  ! for more information on creating a Field on a Mesh. 
+  field = ESMF_FieldCreate(mesh, ESMF_TYPEKIND_R8, &
+       meshloc=ESMF_MESHLOC_ELEMENT, rc=localrc)
+
+ +

+ +

+ +
+33.3.8 Create a Mesh from an unstructured grid file +

+ +

+ESMF supports the creation of a Mesh from three grid file formats: the SCRIP format 12.8.1, the + ESMF format 12.8.2 or the + proposed CF unstructured grid UGRID format 12.8.4. All three of these grid file formats + are NetCDF files. + +

+When creating a Mesh from a SCRIP format file, there are a number of options to control the output Mesh. + The data is located at the center of the grid cell in a SCRIP grid; whereas + the data is located at the corner of a cell in an ESMF Mesh object. Therefore, + we create a Mesh object by default by constructing a "dual" mesh using the coordinates in the file. + If the user wishes to not construct the dual mesh, the optional argument convertToDual may be + used to control this behavior. When comvertToDual is + set to .false. the Mesh constructed from the file will not be the dual. This is necessary when using the + Mesh as part of a conservative regridding operation in the ESMF_FieldRegridStore() call, so the + weights are properly generated for the cell centers in the file. + +

+The following example code depicts how to create a Mesh using a SCRIP file. Note that + you have to set the fileformat to ESMF_FILEFORMAT_SCRIP. +

+

+   mesh = ESMF_MeshCreate(filename="data/ne4np4-pentagons.nc", &
+        fileformat=ESMF_FILEFORMAT_SCRIP, rc=localrc)
+
+ +

+As mentioned above ESMF also supports creating Meshes from the ESMF format. + The ESMF format works better with the methods used to create an ESMF Mesh object, so less conversion needs + to be done to create a Mesh, and thus this format is more efficient than SCRIP to use within ESMF. + The ESMF format is also more general than the SCRIP format because it supports higher dimension coordinates and more general + topologies. Currently, ESMF_MeshCreate() does not support conversion to a dual mesh for this format. All regrid methods + are supported on Meshes in this format. + +

+Here is an example of creating a Mesh from an ESMF unstructured grid file. Note that you have to set the fileformat to + ESMF_FILEFORMAT_ESMFMESH. +

+

+   mesh = ESMF_MeshCreate(filename="data/ne4np4-esmf.nc", &
+            fileformat=ESMF_FILEFORMAT_ESMFMESH, &
+            rc=localrc)
+
+ +

+ +

+ +
+33.3.9 Create a Mesh representation of a cubed sphere grid +

+ +

+This example demostrates how to create a ESMF_Mesh object representing a cubed sphere grid with + identical regular decomposition for every tile. + In this example, the tile resolution is 45, so there will be a total 45x45x6=12150 elements in the mesh. + nx and ny are the regular decomposition of each tile. + The total number of DEs is nx x ny x 6. If the number of PETs are less than the total + number of DEs, the DEs will be distributed to the PETs using the default cyclic distribution. +

+

+   ! Decompose each tile into 2 x 1 blocks
+   nx=2
+   ny=1
+
+   ! Create Mesh
+   mesh = ESMF_MeshCreateCubedSphere(tileSize=45, nx=nx,ny=ny, rc=localrc)
+
+ +

+ +

+33.3.10 Remove Mesh memory +

+ +

+There are two different levels that the memory in a Mesh can be removed. The first of these is the standard destroy call, + ESMF_MeshDestroy(). As with other classes, this call removes all memory associated with the object, and afterwards + the object can not be used further (i.e. should not be used in any methods). The second, which is unique to Mesh, is the + ESMF_MeshFreeMemory() call. This call removes the connection and coordinate information associated with the Mesh, but + leaves the distgrid information. The coordinate and connection information held in the Mesh can consume a large amount of memory + for a big Mesh, so using this call can very significantly reduce the amount of memory used. However, once this method + has been used on a Mesh there are some restriction on what may be done with it. Once a Mesh has had its memory freed using this method, + any Field built on the Mesh can no longer be used as part of an ESMF_FieldRegridStore() call. However, because the distgrid + information is still part of the Mesh, Fields built on such a Mesh can still be part of an ESMF_FieldRegrid() + call (where the routehandle was generated previous to the ESMF_MeshFreeMemory() operation). Fields may also + still be created on these Meshes. The following short piece of code illustrates the use of this call. + +

+

+   ! Here a Field built on a mesh may be used
+   ! as part of a ESMF_FieldRegridStore() call
+
+   ! This call removes connection and coordinate 
+   ! information, significantly reducing the memory used by
+   ! mesh, but limiting what can be done with it.
+   call ESMF_MeshFreeMemory(mesh, rc=localrc)
+
+   ! Here a new Field may be built on mesh, or
+   ! a field built on a mesh may be used as part
+   ! of an ESMF_FieldRegrid() call
+
+   ! Destroy the mesh
+   call ESMF_MeshDestroy(mesh, rc=localrc)
+
+   ! Here mesh can't be used for anything
+
+ +

+ +

+
+33.3.11 Mesh Masking +

+ +

+There are two types of masking available in Mesh: node masking and element masking. These both work + in a similar manner, but vary slightly in the details of setting the mask information during mesh creation. + +

+For node masking, the mask information is set using the nodeMask argument to either ESMF_MeshCreate() or + ESMF_MeshAddNodes(). When a regrid store method is called (e.g. ESMF_FieldRegridStore()) the mask values arguments + (srcMaskValues and dstMaskValues) can + then be used to indicate which particular values set in the nodeMask array indicate that the node should be masked. For example, when + calling ESMF_FieldRegridStore() if dstMaskValues has been set to 1, then any node in the destination Mesh whose + corresponding nodeMask value is 1 will be masked out (a node with any other value than 1 will not be masked). + +

+For element masking, the mask information is set using the elementMask argument to either ESMF_MeshCreate() or + ESMF_MeshAddElements(). In a similar manner to node masking, when a regrid store method is called (e.g. ESMF_FieldRegridStore()) + the mask values arguments + (srcMaskValues and dstMaskValues) can + then be used to indicate which particular values set in the elementMask array indicate that the element should be masked. For example, when + calling ESMF_FieldRegridStore() if dstMaskValues has been set to 1, then any element in the destination Mesh whose + corresponding elementMask value is 1 will be masked out (an element with any other value than 1 will not be masked). + +

+ +

+ +
+33.3.12 Mesh Halo Communication +

+ + +
+
+  
+    2.0   7 ------- 8        [8] ------ 9          
+          |         |         |         |
+          |    4    |         |    5    |
+          |         |         |         |
+    1.0  [4] ----- [5]       [5] ----- [6]
+          
+         0.0       1.0       1.0       2.0
+  
+             PET 2               PET 3
+  
+  
+    1.0   4 ------- 5        [5] ------ 6
+          |         |         |  \   3  |
+          |    1    |         |    \    |
+          |         |         | 2    \  |
+    0.0   1 ------- 2        [2] ------ 3
+  
+         0.0       1.0       1.0      2.0 
+   
+             PET 0               PET 1
+  
+              Node Id labels at corners
+             Element Id labels in centers
+
+ +

+This section illustrates the process of setting up halo communication for a Field built on the nodes of a Mesh. + The Mesh used in this example is the one that was created in section 33.3.4. The diagram for + that Mesh is repeated above for convenience's sake. The halo method used here is the one described in + section 28.2.16, but made more specific to the case of a Mesh. + This example shows how to set up haloing for nodes which are owned by another processor (e.g. the node with id + 5 on PET 1 above). However, it could be expanded to halo other nodes simply by including them in the + halo arrays below on the PET where their values are needed. + +

+The first step in setting up the halo communication is to create arrays containing + the ids of the haloed nodes on the PETs where they + are needed. + +

+The following illustrates that for the Mesh diagramed above. + +

+

+  ! Create halo lists based on PET id.
+  if (localPET .eq. 0) then !!! This part only for PET 0
+
+    ! Allocate and fill the halo list.
+    allocate(haloSeqIndexList(0))  ! There are no haloed points on PET 0
+
+  else if (localPET .eq. 1) then !!! This part only for PET 1
+
+    ! Allocate and fill the halo list.
+    allocate(haloSeqIndexList(2)) 
+    haloSeqIndexList=(/2,5/)
+
+  else if (localPET .eq. 2) then !!! This part only for PET 2
+
+    ! Allocate and fill the halo list.
+    allocate(haloSeqIndexList(2)) 
+    haloSeqIndexList=(/4,5/)
+
+  else if (localPET .eq. 3) then !!! This part only for PET 3
+
+    ! Allocate and fill the halo list.
+    allocate(haloSeqIndexList(3)) 
+    haloSeqIndexList=(/5,6,8/)
+
+  endif
+
+ +

+The next step is to create an ESMF Array with a halo region to hold the data being haloed. + +

+

+  ! Get node DistGrid from the Mesh. 
+  call ESMF_MeshGet(mesh, nodalDistgrid=nodeDistgrid, rc=localrc)
+
+  ! Create an ESMF Array with a halo region from a node DistGrid.
+  array=ESMF_ArrayCreate(nodeDistgrid, typekind=ESMF_TYPEKIND_R8, &
+       haloSeqIndexList=haloSeqIndexList, rc=localrc)
+
+ +

+Note that currently the halo data is stored at the end of the Array data on each PET in the order specified + by the haloSeqIndexList argument (e.g. for PET 3 the halo information will be in the order 5,6,8 + at the end of the piece of array on PET 3). This means that if the halo information needs to be in the order of + nodes specified when you create the Mesh, then the nodes owned by another processor need to + be at the end of the node information when the Mesh is created (e.g. when creating + the piece of the Mesh on PET 3, then nodes 5,6,8 would need to be at the end of the node information lists). + +

+At this point haloing could be done on the ESMF Array by using the ESMF_ArrayHaloStore() call + followed by ESMF_ArrayHalo(). However, in this example we wrap the Array in an ESMF Field. + This allows it to be used in Field specific calls (e.g. ESMF_FieldRegridStore()) as well + as for haloing. + +

+

+  ! Wrap the ESMF Array in a Field created on the nodes of the Mesh. 
+  field=ESMF_FieldCreate(mesh, array=array, &
+       meshLoc=ESMF_MESHLOC_NODE, rc=localrc)
+
+ +

+We can now proceed with haloing the Field by using the ESMF_FieldHaloStore() call to + create a RouteHandle, and then the ESMF_FieldHalo() call to apply the RouteHandle. Note + that once the RouteHandle has been created it can be applied repeatedly to redo the halo + communication as data changes in the Field. + +

+

+  ! Create the RouteHandle for the halo communication.
+  call ESMF_FieldHaloStore(field, routehandle=haloHandle, rc=localrc)
+
+  ! Can repeatedly do halo as data in field changes.
+  ! do t=...
+ 
+    ! Data set in non-halo field locations. 
+
+    ! Do the halo communication.
+    call ESMF_FieldHalo(field, routehandle=haloHandle, rc=localrc)
+
+    ! Halo locations now filled in field.
+
+  ! enddo 
+
+  ! After its last use the RouteHandle can be released.
+  call ESMF_FieldHaloRelease(haloHandle, rc=localrc)
+
+ +

+

+  ! The Field can now be destroyed.
+  call ESMF_FieldDestroy(field, rc=localrc)
+
+  ! The Array can now be destroyed.
+  call ESMF_ArrayDestroy(array, rc=localrc)
+
+ +

+ + +

+33.4 Class API +

+ +

+ +

+ +

+ +

+33.4.1 ESMF_MeshAssignment(=) - Mesh assignment +

+ +

+ +

+
+INTERFACE: +

     interface assignment(=)
+     mesh1 = mesh2
+
ARGUMENTS: +
     type(ESMF_Mesh) :: mesh1
+     type(ESMF_Mesh) :: mesh2
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Assign mesh1 as an alias to the same ESMF Mesh object in memory + as mesh2. If mesh2 is invalid, then mesh1 will be equally invalid after + the assignment. + +

+The arguments are: +

+
mesh1
+
The ESMF_Mesh object on the left hand side of the assignment. + +
+
mesh2
+
The ESMF_Mesh object on the right hand side of the assignment. + +
+
+ +

+ +

+ +

+33.4.2 ESMF_MeshOperator(==) - Mesh equality operator +

+ +

+ +

+
+INTERFACE: +

    interface operator(==)
+     if (mesh1 == mesh2) then ... endif
+               OR
+     result = (mesh1 == mesh2)
+
RETURN VALUE: +
     logical :: result
+
ARGUMENTS: +
     type(ESMF_Mesh), intent(in) :: mesh1
+     type(ESMF_Mesh), intent(in) :: mesh2
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Test whether mesh1 and mesh2 are valid aliases to the same ESMF + Mesh object in memory. For a more general comparison of two ESMF Meshes, + going beyond the simple alias test, the ESMF_MeshMatch() function (not yet + implemented) must be used. + +

+The arguments are: +

+
mesh1
+
The ESMF_Mesh object on the left hand side of the equality + operation. + +
+
mesh2
+
The ESMF_Mesh object on the right hand side of the equality + operation. + +
+
+ +

+ +

+ +

+33.4.3 ESMF_MeshOperator(/=) - Mesh not equal operator +

+ +

+ +

+
+INTERFACE: +

   interface operator(/=)
+     if (mesh1 /= mesh2) then ... endif
+               OR
+     result = (mesh1 /= mesh2)
+
RETURN VALUE: +
     logical :: result
+
ARGUMENTS: +
     type(ESMF_Mesh), intent(in) :: mesh1
+     type(ESMF_Mesh), intent(in) :: mesh2
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Test whether mesh1 and mesh2 are not valid aliases to the + same ESMF Mesh object in memory. For a more general comparison of two ESMF + Meshes, going beyond the simple alias test, the ESMF_MeshMatch() function + (not yet implemented) must be used. + +

+The arguments are: +

+
mesh1
+
The ESMF_Mesh object on the left hand side of the non-equality + operation. + +
+
mesh2
+
The ESMF_Mesh object on the right hand side of the non-equality + operation. + +
+
+ +

+ +

+ +

+
+33.4.4 ESMF_MeshAddElements - Add elements to a Mesh +

+ +

+ +

+
+INTERFACE: +

     subroutine ESMF_MeshAddElements(mesh, elementIds, elementTypes, &
+                  elementConn, elementMask, elementArea, elementCoords, &
+                  elementDistgrid, rc)
+
ARGUMENTS: +
     type(ESMF_Mesh),    intent(inout)         :: mesh
+     integer,            intent(in)            :: elementIds(:)
+     integer,            intent(in)            :: elementTypes(:)
+     integer,            intent(in)            :: elementConn(:)
+     integer,            intent(in),  optional :: elementMask(:)
+     real(ESMF_KIND_R8), intent(in),  optional :: elementArea(:)
+     real(ESMF_KIND_R8), intent(in),  optional :: elementCoords(:)
+     type(ESMF_DistGrid), intent(in), optional :: elementDistgrid
+     integer,            intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+This call is the third and last part of the three part mesh create + sequence and should be called after the mesh is created with ESMF_MeshCreate() + (33.4.6) + and after the nodes are added with ESMF_MeshAddNodes() (33.4.5). + This call adds the elements to the + mesh and finalizes the create. After this call the Mesh is usable, for + example a Field may be built on the created Mesh object and + this Field may be used in a ESMF_FieldRegridStore() call. + +

+The parameters to this call elementIds, elementTypes, and + elementConn describe the elements to be created. The description + for a particular element lies at the same index location in elementIds + and elementTypes. Each entry in elementConn consists of the list of + nodes used to create that element, so the connections for element $e$ in the + elementIds array will start at +$number\_of\_nodes\_in\_element(1) + number\_of\_nodes\_in\_element(2) +
+\cdots + number\_of\_nodes\_in\_element(e-1) + 1$ in elementConn. + +

+This call is collective across the current VM. + +

+

+
elementIds
+
An array containing the global ids of the elements to be created on this PET. + This input consists of a 1D array the size of the number of elements on this PET. + Each element id must be a number equal to or greater than 1. An id should be + unique in the sense that different elements must have different ids (the same element + that appears on different processors must have the same id). There may be gaps in the sequence + of ids, but if these gaps are the same scale as the length of the sequence it can lead to + inefficiencies when the Mesh is used (e.g. in ESMF_FieldRegridStore()). + +
+
elementTypes
+
An array containing the types of the elements to be created on this PET. The types used + must be appropriate for the parametric dimension of the Mesh. Please see + Section 33.2.1 for the list of options. This input consists of + a 1D array the size of the number of elements on this PET. + +
+
elementConn
+
An array containing the indexes of the sets of nodes to be connected together to form the + elements to be created on this PET. The entries in this list are NOT node global ids, + but rather each entry is a local index (1 based) into the list of nodes which were + created on this PET by the previous ESMF_MeshAddNodes() call. + In other words, an entry of 1 indicates that this element contains the node + described by nodeIds(1), nodeCoords(1), etc. passed into the + ESMF_MeshAddNodes() call on this PET. It is also + important to note that the order of the nodes in an element connectivity list + matters. Please see Section 33.2.1 for diagrams illustrating + the correct order of nodes in a element. This input consists of a 1D array with + a total size equal to the sum of the number of nodes in each element on + this PET. The number of nodes in each element is implied by its element type in + elementTypes. The nodes for each element + are in sequence in this array (e.g. the nodes for element 1 are elementConn(1), + elementConn(2), etc.). + +
+
[elementMask]
+
An array containing values which can be used for element masking. Which values indicate + masking are chosen via the srcMaskValues or dstMaskValues arguments to + ESMF_FieldRegridStore() call. This input consists of a 1D array the + size of the number of elements on this PET. + +
+
[elementArea]
+
An array containing element areas. If not specified, the element areas are internally calculated. + This input consists of a 1D array the size of the number of elements on this PET. + NOTE: ESMF doesn't currently do unit conversion on areas. If these areas are going to be used + in a process that also involves the areas of another Grid or Mesh (e.g. conservative regridding), then + it is the user's responsibility to make sure that the area units are consistent between the two sides. + If ESMF calculates an area on the surface of a sphere, then it is in units of square radians. If + it calculates the area for a Cartesian grid, then it is in the same units as the coordinates, but squared. + +
+
[elementCoords]
+
An array containing the physical coordinates of the elements to be created on this + PET. This input consists of a 1D array the size of the number of elements on this PET times the Mesh's + spatial dimension. The coordinates in this array are ordered + so that the coordinates for an element lie in sequence in memory. (e.g. for a + Mesh with spatial dimension 2, the coordinates for element 1 are in elementCoords(1) and + elementCoords(2), the coordinates for element 2 are in elementCoords(3) and elementCoords(4), + etc.). + +
+
[elementDistgrid]
+
If present, use this as the element Distgrid for the Mesh. + The passed in Distgrid + needs to contain a local set of sequence indices matching the set of local element ids (i.e. those in elementIds). + However, specifying an externally created Distgrid gives the user more control over aspects of + the Distgrid containing those sequence indices (e.g. how they are broken into DEs). + If not present, a 1D Distgrid will be created internally consisting of one DE per PET. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+
+33.4.5 ESMF_MeshAddNodes - Add nodes to a Mesh +

+ +

+ +

+
+INTERFACE: +

     subroutine ESMF_MeshAddNodes(mesh, nodeIds, nodeCoords, nodeOwners, &
+                                  nodeMask, nodalDistgrid, rc)
+
ARGUMENTS: +
     type(ESMF_Mesh),    intent(inout)         :: mesh
+     integer,            intent(in)            :: nodeIds(:)
+     real(ESMF_KIND_R8), intent(in)            :: nodeCoords(:)
+     integer,            intent(in),  optional :: nodeOwners(:)
+     integer,            intent(in),  optional :: nodeMask(:)
+     type(ESMF_DistGrid), intent(in), optional :: nodalDistgrid
+     integer,            intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+This call is the second part of the three part mesh create + sequence and should be called after the mesh's dimensions are set + using ESMF_MeshCreate() (33.4.6). + This call adds the nodes to the + mesh. The next step is to call ESMF_MeshAddElements() (33.4.4). + +

+The parameters to this call nodeIds, nodeCoords, and + nodeOwners describe the nodes to be created on this PET. + The description for a particular node lies at the same index location in + nodeIds and nodeOwners. Each entry + in nodeCoords consists of spatial dimension coordinates, so the coordinates + for node $n$ in the nodeIds array will start at +$(n-1)*spatialDim+1$. + +

+

+
nodeIds
+
An array containing the global ids of the nodes to be created on this PET. + This input consists of a 1D array the size of the number of nodes on this PET. + Each node id must be a number equal to or greater than 1. An id should be + unique in the sense that different nodes must have different ids (the same node + that appears on different processors must have the same id). There may be gaps in the sequence + of ids, but if these gaps are the same scale as the length of the sequence it can lead to + inefficiencies when the Mesh is used (e.g. in ESMF_FieldRegridStore()). + +
+
nodeCoords
+
An array containing the physical coordinates of the nodes to be created on this + PET. This input consists of a 1D array the size of the number of nodes on this PET times the Mesh's + spatial dimension (spatialDim). The coordinates in this array are ordered + so that the coordinates for a node lie in sequence in memory. (e.g. for a + Mesh with spatial dimension 2, the coordinates for node 1 are in nodeCoords(1) and + nodeCoords(2), the coordinates for node 2 are in nodeCoords(3) and nodeCoords(4), + etc.). + +
+
[nodeOwners]
+
An array containing the PETs that own the nodes to be created on this PET. + If the node is shared with another PET, the value + may be a PET other than the current one. Only nodes owned by this PET + will have PET local entries in a Field created on the Mesh. This input consists of + a 1D array the size of the number of nodes on this PET. If not provided by the user, + then ESMF will calculate node ownership. + +
+
[nodeMask]
+
An array containing values which can be used for node masking. Which values indicate + masking are chosen via the srcMaskValues or dstMaskValues arguments to + ESMF_FieldRegridStore() call. This input consists of a 1D array the + size of the number of nodes on this PET. + +
+
[nodalDistgrid]
+
If present, use this as the node Distgrid for the Mesh. + The passed in Distgrid + needs to contain a local set of sequence indices matching the set of local node ids (i.e. the ids in + nodeIds with nodeOwners equal to the current PET). + However, specifying an externally created Distgrid gives the user more control over aspects of + the Distgrid containing those sequence indices (e.g. how they are broken into DEs). + If not present, a 1D Distgrid will be created internally consisting of one DE per PET. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+
+33.4.6 ESMF_MeshCreate - Create a Mesh as a 3 step process +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_MeshCreate()
+     function ESMF_MeshCreate3Part(parametricDim, spatialDim, coordSys, name, rc)
+
RETURN VALUE: +
     type(ESMF_Mesh)                                 :: ESMF_MeshCreate3Part
+
ARGUMENTS: +
     integer,                  intent(in)            :: parametricDim
+     integer,                  intent(in)            :: spatialDim
+     type(ESMF_CoordSys_Flag), intent(in),  optional :: coordSys
+     character(len=*),         intent(in),  optional :: name
+     integer,                  intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+This call is the first part of the three part mesh create + sequence. This call sets the dimension of the elements in the mesh + (parametricDim) and the number of coordinate dimensions in the mesh + (spatialDim). The next step is to call ESMF_MeshAddNodes() (33.4.5) + to add the nodes and then ESMF_MeshAddElements() (33.4.4) to add + the elements and finalize the mesh. + +

+This call is collective across the current VM. + +

+

+
parametricDim
+
Dimension of the topology of the Mesh. (E.g. a mesh constructed of squares would + have a parametric dimension of 2, whereas a Mesh constructed of cubes would have one + of 3.) + +
+
spatialDim
+
The number of coordinate dimensions needed to describe the locations of the nodes + making up the Mesh. For a manifold, the spatial dimension can be larger than the + parametric dim (e.g. the 2D surface of a sphere in 3D space), but it can't be smaller. + +
+
[coordSys]
+
The coordinate system of the grid coordinate data. + For a full list of options, please see Section 54.11. + If not specified then defaults to ESMF_COORDSYS_SPH_DEG. + +
+
[name]
+
The name of the Mesh. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+33.4.7 ESMF_MeshCreate - Create a Mesh all at once +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_MeshCreate()
+     function ESMF_MeshCreate1Part(parametricDim, spatialDim, &
+                    nodeIds, nodeCoords, nodeOwners, nodeMask, nodalDistgrid, &
+                    elementIds, elementTypes, elementConn, &
+                    elementMask, elementArea, elementCoords, &
+                    elementDistgrid, coordSys, name, rc)
+
RETURN VALUE: +
     type(ESMF_Mesh)                                 :: ESMF_MeshCreate1Part
+
ARGUMENTS: +
     integer,                  intent(in)            :: parametricDim
+     integer,                  intent(in)            :: spatialDim
+     integer,                  intent(in)            :: nodeIds(:)
+     real(ESMF_KIND_R8),       intent(in)            :: nodeCoords(:)
+     integer,                  intent(in),  optional :: nodeOwners(:)
+     integer,                  intent(in),  optional :: nodeMask(:)
+     type(ESMF_DistGrid),      intent(in),  optional :: nodalDistgrid
+     integer,                  intent(in)            :: elementIds(:)
+     integer,                  intent(in)            :: elementTypes(:)
+     integer,                  intent(in)            :: elementConn(:)
+     integer,                  intent(in),  optional :: elementMask(:)
+     real(ESMF_KIND_R8),       intent(in),  optional :: elementArea(:)
+     real(ESMF_KIND_R8),       intent(in),  optional :: elementCoords(:)
+     type(ESMF_DistGrid),      intent(in),  optional :: elementDistgrid
+     type(ESMF_CoordSys_Flag), intent(in),  optional :: coordSys
+     character(len=*),         intent(in),  optional :: name
+     integer,                  intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Create a Mesh object in one step. After this call the Mesh is usable, for + example, a Field may be built on the created Mesh object and + this Field may be used in a ESMF_FieldRegridStore() call. + +

+This call sets the dimension of the elements in the mesh + (parametricDim) and the number of coordinate dimensions in the mesh + (spatialDim). It then creates the nodes, and + then creates the elements by connecting together the nodes. + +

+The parameters to this call nodeIds, nodeCoords, and + nodeOwners describe the nodes to be created on this PET. + The description for a particular node lies at the same index location in + nodeIds and nodeOwners. Each entry + in nodeCoords consists of spatial dimension coordinates, so the coordinates + for node $n$ in the nodeIds array will start at +$(n-1)*spatialDim+1$. + +

+The parameters to this call elementIds, elementTypes, and + elementConn describe the elements to be created. The description + for a particular element lies at the same index location in elementIds + and elementTypes. Each entry in elementConn consists of the list of + nodes used to create that element, so the connections for element $e$ in the + elementIds array will start at +$number\_of\_nodes\_in\_element(1) + number\_of\_nodes\_in\_element(2) +
+\cdots + number\_of\_nodes\_in\_element(e-1) + 1$ in elementConn. + +

+This call is collective across the current VM. + +

+

+
parametricDim
+
Dimension of the topology of the Mesh. (E.g. a mesh constructed of squares would + have a parametric dimension of 2, whereas a Mesh constructed of cubes would have one + of 3.) + +
+
spatialDim
+
The number of coordinate dimensions needed to describe the locations of the nodes + making up the Mesh. For a manifold, the spatial dimension can be larger than the + parametric dim (e.g. the 2D surface of a sphere in 3D space), but it can't be smaller. + +
+
nodeIds
+
An array containing the global ids of the nodes to be created on this PET. + This input consists of a 1D array the size of the number of nodes on this PET. + Each node id must be a number equal to or greater than 1. An id should be + unique in the sense that different nodes must have different ids (the same node + that appears on different processors must have the same id). There may be gaps in the sequence + of ids, but if these gaps are the same scale as the length of the sequence it can lead to + inefficiencies when the Mesh is used (e.g. in ESMF_FieldRegridStore()). + +
+
nodeCoords
+
An array containing the physical coordinates of the nodes to be created on this + PET. This input consists of a 1D array the size of the number of nodes on this PET times the Mesh's + spatial dimension (spatialDim). The coordinates in this array are ordered + so that the coordinates for a node lie in sequence in memory. (e.g. for a + Mesh with spatial dimension 2, the coordinates for node 1 are in nodeCoords(1) and + nodeCoords(2), the coordinates for node 2 are in nodeCoords(3) and nodeCoords(4), + etc.). + +
+
[nodeOwners]
+
An array containing the PETs that own the nodes to be created on this PET. + If the node is shared with another PET, the value + may be a PET other than the current one. Only nodes owned by this PET + will have PET local entries in a Field created on the Mesh. This input consists of + a 1D array the size of the number of nodes on this PET. If not provided by the user, + then ESMF will calculate node ownership. + +
+
[nodeMask]
+
An array containing values which can be used for node masking. Which values indicate + masking are chosen via the srcMaskValues or dstMaskValues arguments to + ESMF_FieldRegridStore() call. This input consists of a 1D array the + size of the number of nodes on this PET. + +
+
[nodalDistgrid]
+
If present, use this as the node Distgrid for the Mesh. + The passed in Distgrid + needs to contain a local set of sequence indices matching the set of local node ids (i.e. the ids in + nodeIds with nodeOwners equal to the current PET). + However, specifying an externally created Distgrid gives the user more control over aspects of + the Distgrid containing those sequence indices (e.g. how they are broken into DEs). + If not present, a 1D Distgrid will be created internally consisting of one DE per PET. + +
+
elementIds
+
An array containing the global ids of the elements to be created on this PET. + This input consists of a 1D array the size of the number of elements on this PET. + Each element id must be a number equal to or greater than 1. An id should be + unique in the sense that different elements must have different ids (the same element + that appears on different processors must have the same id). There may be gaps in the sequence + of ids, but if these gaps are the same scale as the length of the sequence it can lead to + inefficiencies when the Mesh is used (e.g. in ESMF_FieldRegridStore()). + +
+
elementTypes
+
An array containing the types of the elements to be created on this PET. The types used + must be appropriate for the parametric dimension of the Mesh. Please see + Section 33.2.1 for the list of options. This input consists of + a 1D array the size of the number of elements on this PET. + +
+
elementConn
+
An array containing the indexes of the sets of nodes to be connected together to form the + elements to be created on this PET. The entries in this list are NOT node global ids, + but rather each entry is a local index (1 based) into the list of nodes to be + created on this PET by this call. + In other words, an entry of 1 indicates that this element contains the node + described by nodeIds(1), nodeCoords(1), etc. on this PET. It is also + important to note that the order of the nodes in an element connectivity list + matters. Please see Section 33.2.1 for diagrams illustrating + the correct order of nodes in a element. This input consists of a 1D array with + a total size equal to the sum of the number of nodes contained in each element on + this PET. The number of nodes in each element is implied by its element type in + elementTypes. The nodes for each element + are in sequence in this array (e.g. the nodes for element 1 are elementConn(1), + elementConn(2), etc.). + +
+
[elementMask]
+
An array containing values which can be used for element masking. Which values indicate + masking are chosen via the srcMaskValues or dstMaskValues arguments to + ESMF_FieldRegridStore() call. This input consists of a 1D array the + size of the number of elements on this PET. + +
+
[elementArea]
+
An array containing element areas. If not specified, the element areas are internally calculated. + This input consists of a 1D array the size of the number of elements on this PET. + NOTE: ESMF doesn't currently do unit conversion on areas. If these areas are going to be used + in a process that also involves the areas of another Grid or Mesh (e.g. conservative regridding), then + it is the user's responsibility to make sure that the area units are consistent between the two sides. + If ESMF calculates an area on the surface of a sphere, then it is in units of square radians. If + it calculates the area for a Cartesian grid, then it is in the same units as the coordinates, but squared. + +
+
[elementCoords]
+
An array containing the physical coordinates of the elements to be created on this + PET. This input consists of a 1D array the size of the number of elements on this PET times the Mesh's + spatial dimension (spatialDim). The coordinates in this array are ordered + so that the coordinates for an element lie in sequence in memory. (e.g. for a + Mesh with spatial dimension 2, the coordinates for element 1 are in elementCoords(1) and + elementCoords(2), the coordinates for element 2 are in elementCoords(3) and elementCoords(4), + etc.). + +
+
[elementDistgrid]
+
If present, use this as the element Distgrid for the Mesh. + The passed in Distgrid + needs to contain a local set of sequence indices matching the set of local element ids (i.e. those in elementIds). + However, specifying an externally created Distgrid gives the user more control over aspects of + the Distgrid containing those sequence indices (e.g. how they are broken into DEs). + If not present, a 1D Distgrid will be created internally consisting of one DE per PET. + +
+
[coordSys]
+
The coordinate system of the grid coordinate data. + For a full list of options, please see Section 54.11. + If not specified then defaults to ESMF_COORDSYS_SPH_DEG. + +
+
[name]
+
The name of the Mesh. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+33.4.8 ESMF_MeshCreate - Create a Mesh from a Grid +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_MeshCreate()
+     function ESMF_MeshCreateFromGrid(grid, name, rc)
+
RETURN VALUE: +
     type(ESMF_Mesh)         :: ESMF_MeshCreateFromGrid
+
ARGUMENTS: +
     type(ESMF_Grid),        intent(in)            :: grid
+     character(len=*),       intent(in),  optional :: name
+     integer,                intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Create an ESMF Mesh from an ESMF Grid. This method creates the elements of + the Mesh from the cells of the Grid, and the nodes of the Mesh from the corners of + the Grid. Corresponding locations in the Grid and new Mesh will have the same + coordinates, sequence indices, masking, and area information. + +

+This method currently only works for 2D Grids. In addition, this method requires + the input Grid to have coordinates in the corner stagger location. + +

+

+
grid
+
The ESMF Grid from which to create the Mesh. + +
+
[name]
+
The name of the Mesh. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+33.4.9 ESMF_MeshCreate - Create a Mesh from a file +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_MeshCreate()
+     function ESMF_MeshCreateFromFile(filename, fileformat, &
+                  convertToDual, addUserArea, maskFlag, varname, &
+                  nodalDistgrid, elementDistgrid, &
+                  coordSys, name, rc)
+
RETURN VALUE: +
     type(ESMF_Mesh)         :: ESMF_MeshCreateFromFile
+
ARGUMENTS: +
     character(len=*),           intent(in)            :: filename
+     type(ESMF_FileFormat_Flag), intent(in)            :: fileformat
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     logical,                    intent(in),  optional :: convertToDual
+     logical,                    intent(in),  optional :: addUserArea
+     type(ESMF_MeshLoc),         intent(in),  optional :: maskFlag
+     character(len=*),           intent(in),  optional :: varname
+     type(ESMF_DistGrid),        intent(in),  optional :: nodalDistgrid
+     type(ESMF_DistGrid),        intent(in),  optional :: elementDistgrid
+     type(ESMF_CoordSys_Flag),   intent(in),  optional :: coordSys
+     character(len=*),           intent(in),  optional :: name
+     integer,                    intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Create a Mesh from a file. Provides options to convert to 3D and in the case of SCRIP + format files, allows the dual of the mesh to be created. + +

+This call is collective across the current VM. + +

+

+
filename
+
The name of the grid file + +
+
fileformat
+
The file format. The valid options are ESMF_FILEFORMAT_SCRIP, ESMF_FILEFORMAT_ESMFMESH and + ESMF_FILEFORMAT_UGRID. + Please see Section 54.20 for a detailed description of the options. + +
+
[convertToDual]
+
if .true., the mesh will be converted to its dual. If not specified, + defaults to .false.. + +
+
[addUserArea]
+
if .true., the cell area will be read in from the GRID file. This feature is + only supported when the grid file is in the SCRIP or ESMF format. If not specified, + defaults to .false.. + +
+
[maskFlag]
+
If maskFlag is present, generate the mask using the missing_value attribute defined in 'varname' + This flag is only supported when the grid file is in the UGRID format. + The value could be either ESMF_MESHLOC_NODE or ESMF_MESHLOC_ELEMENT. If the value is + ESMF_MESHLOC_NODE, the node mask will be generated and the variable has to be + defined on the "node" (specified by its location attribute). If the value is + ESMF_MESHLOC_ELEMENT, the element mask will be generated and the variable has to be + defined on the "face" of the mesh. If the variable is not defined on the right location, + no mask will be generated. If not specified, no mask will be generated. + +
+
[varname]
+
If maskFlag is present, provide a variable name stored in the UGRID file and + the mask will be generated using the missing value of the data value of + this variable. The first two dimensions of the variable has to be the + the longitude and the latitude dimension and the mask is derived from the + first 2D values of this variable even if this data is 3D, or 4D array. If not + specified, defaults to empty string. + +
+
[nodalDistgrid]
+
A Distgrid describing the user-specified distribution of + the nodes across the PETs. + +
+
[elementDistgrid]
+
A Distgrid describing the user-specified distribution of + the elements across the PETs. + +
+
[coordSys]
+
The coordinate system in which to store the mesh coordinate data. + If this setting doesn't match the coordinate system in the file, then + the coordinates in the file will be converted to this system during mesh + creation. It is currently an error to convert Cartesian file coordinates + into a spherical coordinate system. + For a full list of options, please see Section 54.11. + If not specified, then defaults to the coordinate system in the file. + +
+
[name]
+
The name of the Mesh. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+33.4.10 ESMF_MeshCreate - Create a copy of a Mesh with a new distribution +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_MeshCreate()
+     function ESMF_MeshCreateRedist(mesh, nodalDistgrid, &
+       elementDistgrid, vm, name, rc)
+
RETURN VALUE: +
     type(ESMF_Mesh)                            :: ESMF_MeshCreateRedist
+
ARGUMENTS: +
     type(ESMF_Mesh),          intent(in)            :: mesh
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     type(ESMF_DistGrid),      intent(in),  optional :: nodalDistgrid
+     type(ESMF_DistGrid),      intent(in),  optional :: elementDistgrid
+     type(ESMF_VM),            intent(in),  optional :: vm
+     character(len=*),         intent(in),  optional :: name
+     integer,                  intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Create a copy of an existing Mesh with a new distribution. Information + in the Mesh such as connections, coordinates, areas, masks, etc. are + automatically redistributed to the new Mesh. To redistribute + data in Fields built on the original Mesh create a Field on the new Mesh + and then use the Field redistribution functionality + (ESMF_FieldRedistStore(), etc.). The equivalent methods + can also be used for data in FieldBundles. + +

+

+
mesh
+
The source Mesh to be redistributed. + +
+
[nodalDistgrid]
+
A Distgrid describing the new distribution of + the nodes across the PETs. + +
+
[elementDistgrid]
+
A Distgrid describing the new distribution of + the elements across the PETs. + +
+
[vm]
+
If present, the Mesh object is created on the specified + ESMF_VM object. The default is to create on the VM of the + current context. + +
+
[name]
+
The name of the Mesh. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+33.4.11 ESMF_MeshCreate - Create a Mesh of just one element type using corner coordinates +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_MeshCreate()
+     function  ESMF_MeshCreateEasyElems1Type(parametricDim, coordSys, &
+                    elementIds, elementType, elementCornerCoords, &
+                    elementMask, elementArea, elementCoords, &
+                    elementDistgrid, rc)
+
RETURN VALUE: +
     type(ESMF_Mesh) :: ESMF_MeshCreateEasyElems1Type
+
ARGUMENTS: +
     integer,                  intent(in)            :: parametricDim
+     type(ESMF_CoordSys_Flag), intent(in),  optional :: coordSys
+     integer,                  intent(in),  optional :: elementIds(:)
+     integer,                  intent(in)            :: elementType
+     real(ESMF_KIND_R8),       intent(in)            :: elementCornerCoords(:,:,:)
+     integer,                  intent(in),  optional :: elementMask(:)
+     real(ESMF_KIND_R8),       intent(in),  optional :: elementArea(:)
+     real(ESMF_KIND_R8),       intent(in),  optional :: elementCoords(:,:)
+     type(ESMF_DistGrid),      intent(in),  optional :: elementDistgrid
+     integer,                  intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Create a Mesh object in one step by just specifying the corner coordinates of each element. + Internally these corners are turned into nodes forming the outside edges of the elements. + This call assumes that each element is the same type to make the specification of the elements + a bit easier. + After this call the Mesh is usable, for + example, a Field may be built on the created Mesh object and + this Field may be used in ESMF_FieldRegridStore(). However, the Mesh created by this + call consists of a set of disconnected elements, and so shouldn't be used in a situation where + connections between elements are necessary (e.g. bilinear regridding on element centers, patch regridding, + or second-order conservative regridding). + +

+This call sets the dimension of the elements in the Mesh + via parametricDim and the number of coordinate dimensions in the mesh + is determined from the first dimension of elementCornerCoords. + +

+The parameters to this call elementIds, elementTypes, and + elementCornerCoords describe the elements to be created. The description + for a particular element lies at the same index location in elementIds + and elementTypes. The argument elementCornerCoords contains the coordinates of the + corners used to create each element. The first dimension of this argument are across the coordinate dimensions. + The second dimension of this argument is across the corners of a + particular element. The last dimension of this argument is across the list + of elements on this PET, so the coordinates of corner c in element e on this PET + would be in elementCornerCoords(:,c,e). + +

+This call is collective across the current VM. + +

+

+
parametricDim
+
Dimension of the topology of the Mesh. (E.g. a mesh constructed of squares would + have a parametric dimension of 2, whereas a Mesh constructed of cubes would have one + of 3.) + +
+
[coordSys]
+
The coordinate system of the grid coordinate data. + For a full list of options, please see Section 54.11. + If not specified then defaults to ESMF_COORDSYS_SPH_DEG. + +
+
[elementIds]
+
An array containing the global ids of the elements to be created on this PET. + This input consists of a 1D array the size of the number of elements on this PET. + Each element id must be a number equal to or greater than 1. An id should be + unique in the sense that different elements must have different ids (the same element + that appears on different processors must have the same id). There may be gaps in the sequence + of ids, but if these gaps are the same scale as the length of the sequence it can lead to + inefficiencies when the Mesh is used (e.g. in ESMF_FieldRegridStore()). + If not specified, then elements are numbered in sequence starting with the first element + on PET 0. + +
+
elementType
+
An variable containing the type of the elements to be created in this Mesh. The type used + must be appropriate for the parametric dimension of the Mesh. Please see + Section 33.2.1 for the list of options. + +
+
elementCornerCoords
+
A 3D array containing the coordinates of the corners of the elements + to be created on this PET. The first dimension of this array is for the + coordinates and should be of size 2 or 3. The size of this dimension will be + used to determine the spatialDim of the Mesh. The second dimension is the number + of corners for an element. The 3rd dimension is a list of all the elements on this PET. + +
+
[elementMask]
+
An array containing values which can be used for element masking. Which values indicate + masking are chosen via the srcMaskValues or dstMaskValues arguments to + ESMF_FieldRegridStore() call. This input consists of a 1D array the + size of the number of elements on this PET. + +
+
[elementArea]
+
An array containing element areas. If not specified, the element areas are internally calculated. + This input consists of a 1D array the size of the number of elements on this PET. + NOTE: ESMF doesn't currently do unit conversion on areas. If these areas are going to be used + in a process that also involves the areas of another Grid or Mesh (e.g. conservative regridding), then + it is the user's responsibility to make sure that the area units are consistent between the two sides. + If ESMF calculates an area on the surface of a sphere, then it is in units of square radians. If + it calculates the area for a Cartesian grid, then it is in the same units as the coordinates, but squared. + +
+
[elementCoords]
+
An array containing the physical coordinates of the elements to be created on this + PET. This input consists of a 2D array with the first dimension that same size as the first dimension of elementCornerCoords. + The second dimension should be the same size as the elementTypes argument. + +
+
[elementDistgrid]
+
If present, use this as the element Distgrid for the Mesh. + The passed in Distgrid + needs to contain a local set of sequence indices matching the set of local element ids (i.e. those in elementIds). + However, specifying an externally created Distgrid gives the user more control over aspects of + the Distgrid containing those sequence indices (e.g. how they are broken into DEs). + If not present, a 1D Distgrid will be created internally consisting of one DE per PET. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+33.4.12 ESMF_MeshCreate - Create a Mesh using element corner coordinates +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_MeshCreate()
+     function  ESMF_MeshCreateEasyElemsGen(parametricDim, coordSys, &
+                    elementIds, elementTypes, elementCornerCoords, &
+                    elementMask, elementArea, elementCoords, &
+                    elementDistgrid, rc)
+
RETURN VALUE: +
     type(ESMF_Mesh) :: ESMF_MeshCreateEasyElemsGen
+
ARGUMENTS: +
     integer,                  intent(in)            :: parametricDim
+     type(ESMF_CoordSys_Flag), intent(in),  optional :: coordSys
+     integer,                  intent(in),  optional :: elementIds(:)
+     integer,                  intent(in)            :: elementTypes(:)
+     real(ESMF_KIND_R8),       intent(in)            :: elementCornerCoords(:,:)
+     integer,                  intent(in),  optional :: elementMask(:)
+     real(ESMF_KIND_R8),       intent(in),  optional :: elementArea(:)
+     real(ESMF_KIND_R8),       intent(in),  optional :: elementCoords(:,:)
+     type(ESMF_DistGrid),      intent(in),  optional :: elementDistgrid
+     integer,                  intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Create a Mesh object in one step by just specifying the corner coordinates of each element. + Internally these corners are turned into nodes forming the outside edges of the elements. + After this call the Mesh is usable, for + example, a Field may be built on the created Mesh object and + this Field may be used in ESMF_FieldRegridStore(). However, the Mesh created by this + call consists of a set of disconnected elements, and so shouldn't be used in a situation where + connections between elements are necessary (e.g. bilinear regridding on element centers, patch regridding, + or second-order conservative regridding). + +

+This call sets the dimension of the elements in the Mesh + via parametricDim and the number of coordinate dimensions in the mesh + is determined from the first dimension of elementCornerCoords. + +

+The parameters to this call elementIds, elementTypes, and + elementCornerCoords describe the elements to be created. The description + for a particular element lies at the same index location in elementIds + and elementTypes. The argument elementCornerCoords consists of a list of + all the corners used to create all the elements, so the corners for element $e$ in the + elementTypes array will start at +$number\_of\_corners\_in\_element(1)
++ number\_of\_corners\_in\_element(2) +
+\cdots + number\_of\_corners\_in\_element(e-1) + 1$ in elementCornerCoords. + +

+This call is collective across the current VM. + +

+

+
parametricDim
+
Dimension of the topology of the Mesh. (E.g. a mesh constructed of squares would + have a parametric dimension of 2, whereas a Mesh constructed of cubes would have one + of 3.) + +
+
[coordSys]
+
The coordinate system of the grid coordinate data. + For a full list of options, please see Section 54.11. + If not specified then defaults to ESMF_COORDSYS_SPH_DEG. + +
+
[elementIds]
+
An array containing the global ids of the elements to be created on this PET. + This input consists of a 1D array the size of the number of elements on this PET. + Each element id must be a number equal to or greater than 1. An id should be + unique in the sense that different elements must have different ids (the same element + that appears on different processors must have the same id). There may be gaps in the sequence + of ids, but if these gaps are the same scale as the length of the sequence it can lead to + inefficiencies when the Mesh is used (e.g. in ESMF_FieldRegridStore()). + If not specified, then elements are numbered in sequence starting with the first element + on PET 0. + +
+
elementTypes
+
An array containing the types of the elements to be created on this PET. The types used + must be appropriate for the parametric dimension of the Mesh. Please see + Section 33.2.1 for the list of options. This input consists of + a 1D array the size of the number of elements on this PET. + +
+
elementCornerCoords
+
A 2D array containing the coordinates of the corners of the elements + to be created on this PET. The first dimension of this array is for the + coordinates and should be of size 2 or 3. The size of this dimension will be + used to determine the spatialDim of the Mesh. The second dimension is a collapsed + list of all the corners in all the elements. The list of corners has been collapsed + to 1D to enable elements with different number of corners to be supported in the + same list without wasting space. + The number of corners in each element is implied by its element type in + elementTypes. The corners for each element + are in sequence in this array (e.g. If element 1 has 3 corners then they are in elementCornerCoords(:,1), + elementCornerCoords(:,2), elementCornerCoords(:,3) and the corners for the next element start in elementCornerCoords(:,4)). + +
+
[elementMask]
+
An array containing values which can be used for element masking. Which values indicate + masking are chosen via the srcMaskValues or dstMaskValues arguments to + ESMF_FieldRegridStore() call. This input consists of a 1D array the + size of the number of elements on this PET. + +
+
[elementArea]
+
An array containing element areas. If not specified, the element areas are internally calculated. + This input consists of a 1D array the size of the number of elements on this PET. + NOTE: ESMF doesn't currently do unit conversion on areas. If these areas are going to be used + in a process that also involves the areas of another Grid or Mesh (e.g. conservative regridding), then + it is the user's responsibility to make sure that the area units are consistent between the two sides. + If ESMF calculates an area on the surface of a sphere, then it is in units of square radians. If + it calculates the area for a Cartesian grid, then it is in the same units as the coordinates, but squared. + +
+
[elementCoords]
+
An array containing the physical coordinates of the elements to be created on this + PET. This input consists of a 2D array with the first dimension that same size as the first dimension of elementCornerCoords. + The second dimension should be the same size as the elementTypes argument. + +
+
[elementDistgrid]
+
If present, use this as the element Distgrid for the Mesh. + The passed in Distgrid + needs to contain a local set of sequence indices matching the set of local element ids (i.e. those in elementIds). + However, specifying an externally created Distgrid gives the user more control over aspects of + the Distgrid containing those sequence indices (e.g. how they are broken into DEs). + If not present, a 1D Distgrid will be created internally consisting of one DE per PET. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+33.4.13 ESMF_MeshCreateCubedSphere - Create a Mesh representation of a cubed sphere grid +

+ +

+ +

+
+INTERFACE: +

 function ESMF_MeshCreateCubedSphere(tileSize, nx, ny, name, rc)
+
RETURN VALUE: +
     type(ESMF_Mesh)         :: ESMF_MeshCreateCubedSphere
+
ARGUMENTS: +
     integer,                  intent(in)            :: tileSize
+     integer,                  intent(in)            :: nx
+     integer,                  intent(in)            :: ny
+     character(len=*),         intent(in),  optional :: name
+     integer,                  intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Create a ESMF_Mesh object for a cubed sphere grid using identical regular decomposition for every tile. + The grid coordinates are generated based on the algorithm used by GEOS-5, The tile resolution is defined by + tileSize. Each tile is decomposed into nx x ny blocks and the total number of DEs used + is nx x ny x 6. If the total PET is not equal to the number of DEs, the DEs are distributed + into PETs in the default cyclic distribution. Internally, the nodes and the elements from multiple DEs are + collapsed into a 1D array. Therefore, the nodal distgrid or the element distgrid attached to the Mesh object + is always a one DE arbitrarily distributed distgrid. The sequential indices of the nodes and the elements + are derived based on the location of the point in the Cubed Sphere grid. If an element is located at (x, y) of + tile n. Its sequential index would be (n-1)*tileSize*tileSize+(y-1)*tileSize+x. If it is a node, its + sequential index would be (n-1)*(tileSize+1)*(tileSize+1)+(y-1)*(tileSize+1)+x. + +

+The arguments are: +

+
tilesize
+
The number of elements on each side of the tile of the Cubed Sphere grid + +
+
nx
+
The number of blocks on the horizontal size of each tile + +
+
ny
+
The number of blocks on the vertical size of each tile + +
+
[name]
+
The name of the Mesh. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+33.4.14 ESMF_MeshDestroy - Release resources associated with a Mesh +

+ +

+ +

+
+INTERFACE: +

       subroutine ESMF_MeshDestroy(mesh, noGarbage, rc)
+
RETURN VALUE: +
+
ARGUMENTS: +
     type(ESMF_Mesh), intent(inout)          :: mesh
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     logical,         intent(in),   optional :: noGarbage
+     integer,         intent(out),  optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    8.1.0
    +
    Added argument noGarbage. + The argument provides a mechanism to override the default garbage collection + mechanism when destroying an ESMF object. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+This call removes internal memory associated with mesh. + After this call mesh will no longer be usable. + ! + ! The arguments are: +

+
mesh
+
Mesh object to be destroyed. + +
+
[noGarbage]
+
If set to .TRUE. the object will be fully destroyed and removed + from the ESMF garbage collection system. Note however that under this + condition ESMF cannot protect against accessing the destroyed object + through dangling aliases - a situation which may lead to hard to debug + application crashes. + +

+It is generally recommended to leave the noGarbage argument + set to .FALSE. (the default), and to take advantage of the ESMF + garbage collection system which will prevent problems with dangling + aliases or incorrect sequences of destroy calls. However this level of + support requires that a small remnant of the object is kept in memory + past the destroy call. This can lead to an unexpected increase in memory + consumption over the course of execution in applications that use + temporary ESMF objects. For situations where the repeated creation and + destruction of temporary objects leads to memory issues, it is + recommended to call with noGarbage set to .TRUE., fully + removing the entire temporary object from memory. + +

+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+33.4.15 ESMF_MeshEmptyCreate - Create a Mesh to hold Distgrid information +

+ +

+ +

+
+INTERFACE: +

     function ESMF_MeshEmptyCreate(nodalDistgrid, elementDistgrid, name, rc)
+
RETURN VALUE: +
     type(ESMF_Mesh)         :: ESMF_MeshEmptyCreate
+
ARGUMENTS: +
     type(ESMF_DistGrid),      intent(in),  optional :: elementdistgrid
+     type(ESMF_DistGrid),      intent(in),  optional :: nodalDistgrid
+     character(len=*),         intent(in),  optional :: name
+     integer,                  intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Create a Mesh to hold distribution information (i.e. Distgrids). + Such a mesh will have no coordinate or connectivity information stored. + Aside from holding distgrids the Mesh created by this call can't be used in other + ESMF functionality (e.g. it can't be used to create a Field or in regridding). + +

+

+
[nodalDistgrid]
+
The nodal distgrid. + +
+
[elementDistgrid]
+
The elemental distgrid. + +
+
[name]
+
The name of the Mesh. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+33.4.16 ESMF_MeshFreeMemory - Remove a Mesh and its memory +

+ +

+ +

+
+INTERFACE: +

       subroutine ESMF_MeshFreeMemory(mesh, rc)
+
RETURN VALUE: +
+
ARGUMENTS: +
     type(ESMF_Mesh), intent(inout)        :: mesh
+     integer,        intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+This call removes the portions of mesh which contain connection and coordinate + information. After this call, Fields build on mesh will no longer be usable + as part of an ESMF_FieldRegridStore() operation. However, after this call + Fields built on mesh can still be used in an ESMF_FieldRegrid() + operation if the routehandle was generated beforehand. New Fields may also + be built on mesh after this call. + +

+The arguments are: +

+
mesh
+
Mesh object whose memory is to be freed. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+33.4.17 ESMF_MeshGet - Get Mesh information +

+ +

+ +

+
+INTERFACE: +

       subroutine ESMF_MeshGet(mesh, parametricDim, spatialDim, &
+                    nodeCount, nodeIds, nodeCoords, nodeOwners, &
+                    nodeMaskIsPresent, nodeMask,&
+                    elementCount, elementIds, elementTypes, &
+                    elementConnCount, elementConn, &
+                    elementMaskIsPresent,elementMask, &
+                    elementAreaIsPresent, elementArea, &
+                    elementCoordsIsPresent, elementCoords, &
+                    nodalDistgridIsPresent, nodalDistgrid, &
+                    elementDistgridIsPresent, elementDistgrid, &
+                    numOwnedNodes, ownedNodeCoords, &
+                    numOwnedElements, ownedElemCoords, &
+                    elemMaskArray, elemAreaArray, &
+                    isMemFreed, coordSys, status, name, rc)
+
RETURN VALUE: +
+
ARGUMENTS: +
     type(ESMF_Mesh),          intent(in)            :: mesh
+     integer,                  intent(out), optional :: parametricDim
+     integer,                  intent(out), optional :: spatialDim
+     integer,                  intent(out), optional :: nodeCount
+     integer,                  intent(out), optional :: nodeIds(:)
+     real(ESMF_KIND_R8),       intent(out), optional :: nodeCoords(:)
+     integer,                  intent(out), optional :: nodeOwners(:)
+     logical,                  intent(out), optional :: nodeMaskIsPresent
+     integer,                  intent(out), optional :: nodeMask(:)
+     integer,                  intent(out), optional :: elementCount
+     integer,                  intent(out), optional :: elementIds(:)
+     integer,                  intent(out), optional :: elementTypes(:)
+     integer,                  intent(out), optional :: elementConnCount
+     integer,                  intent(out), optional :: elementConn(:)
+     logical,                  intent(out), optional :: elementMaskIsPresent
+     integer,                  intent(out), optional :: elementMask(:)
+     logical,                  intent(out), optional :: elementAreaIsPresent
+     real(ESMF_KIND_R8),       intent(out), optional :: elementArea(:)
+     logical,                  intent(out), optional :: elementCoordsIsPresent
+     real(ESMF_KIND_R8),       intent(out), optional :: elementCoords(:)
+     logical,                  intent(out), optional :: nodalDistgridIsPresent
+     type(ESMF_DistGrid),      intent(out), optional :: nodalDistgrid
+     logical,                  intent(out), optional :: elementDistgridIsPresent
+     type(ESMF_DistGrid),      intent(out), optional :: elementDistgrid
+     integer,                  intent(out), optional :: numOwnedNodes
+     real(ESMF_KIND_R8),       intent(out), optional :: ownedNodeCoords(:)
+     integer,                  intent(out), optional :: numOwnedElements
+     real(ESMF_KIND_R8),       intent(out), optional :: ownedElemCoords(:)
+     logical,                  intent(out), optional :: isMemFreed
+     type(ESMF_Array),         intent(inout), optional :: elemMaskArray
+     type(ESMF_Array),         intent(inout), optional :: elemAreaArray
+     type(ESMF_CoordSys_Flag), intent(out), optional :: coordSys
+     type(ESMF_MeshStatus_Flag),intent(out), optional :: status
+     character(len=*),         intent(out), optional :: name
+     integer,                  intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Get various information from a mesh. + +

+The arguments are: +

+
mesh
+
Mesh object to retrieve information from. + +
+
[parametricDim]
+
Dimension of the topology of the Mesh. (E.g. a mesh constructed of squares would + have a parametric dimension of 2, whereas a Mesh constructed of cubes would have one + of 3.) + +
+
[spatialDim]
+
The number of coordinate dimensions needed to describe the locations of the nodes + making up the Mesh. For a manifold, the spatial dimension can be larger than the + parametric dim (e.g. the 2D surface of a sphere in 3D space), but it can't be smaller. + +
+
[nodeCount]
+
The number of local nodes in the mesh (both owned and shared with another PET). + +
+
[nodeIds]
+
An array of ids for each local node in the mesh. The nodeIds array should be of size nodeCount. + +
+
[nodeCoords]
+
An array of coordinates for each local node in the mesh. The nodeCoords array should be of size (spatialDim*nodeCount). + +
+
[nodeOwners]
+
An array of the PET numbers that own each local node in the mesh. The nodeOwners array should be of size nodeCount. + +
+
[nodeMaskIsPresent]
+
.true. if node masking was set in mesh, .false. otherwise. + +
+
[nodeMask]
+
An array of mask values for each local node in the mesh. The nodeOwners array should be of size nodeCount. + +
+
[elementCount]
+
The number of local elements in the mesh (both owned and shared with another PET). + +
+
[elementIds]
+
An array of ids for each local element in the mesh. The elementIds array should be of size elementCount. + +
+
[elementTypes]
+
An array of types for each local element in the mesh. Please see + section 33.2.1 for the list of options. The elementTypes array should be of size elementCount. + +
+
[elementConnCount]
+
The number of entries elementConn array. Provided as a convenience. + +
+
elementConn
+
An array containing the indexes of the sets of nodes to be connected together to form the + elements to be created on this PET. The entries in this list are NOT node global ids, + but rather each entry is a local index (1 based) into the list of nodes to be + created on this PET by this call. + In other words, an entry of 1 indicates that this element contains the node + described by nodeIds(1), nodeCoords(1), etc. on this PET. It is also + important to note that the order of the nodes in an element connectivity list + matters. Please see Section 33.2.1 for diagrams illustrating + the correct order of nodes in a element. This input consists of a 1D array with + a total size equal to the sum of the number of nodes contained in each element on + this PET (also provided by elementConnCount). The number of nodes in each element + is implied by its element type in + elementTypes. The nodes for each element + are in sequence in this array (e.g. the nodes for element 1 are elementConn(1), + elementConn(2), etc.). + +
+
[elementMaskIsPresent]
+
.true. if element masking was set in mesh, .false. otherwise. + +
+
[elementMask]
+
An array of mask values for each local element in the mesh. The elementMask array should be of size elementCount. + +
+
[elementAreaIsPresent]
+
.true. if element areas were set in mesh, .false. otherwise. + +
+
[elementArea]
+
An array of area values for each local element in the mesh. The elementArea array should be of size elementCount. + +
+
[elementCoordsIsPresent]
+
.true. if element coordinates were set in mesh, .false. otherwise. + +
+
[elementCoords]
+
An array of coordinate values for each local element in the mesh. The elementCoord array should be of size (spatialDim*elementCount). + +
+
[nodalDistgridIsPresent]
+
.true. if nodalDistgrid was set in Mesh object, .false. otherwise. + +
+
[nodalDistgrid]
+
A Distgrid describing the distribution of the nodes across the PETs. Note that + on each PET the distgrid will only contain entries for nodes owned by that PET. + This is the DistGrid that would be used to construct the Array in a Field that is constructed + on mesh. + +
+
[elementDistgridIsPresent]
+
.true. if elementDistgrid was set in Mesh object, .false. otherwise. + +
+
[elementDistgrid]
+
A Distgrid describing the distribution of elements across the PETs. Note that + on each PET the distgrid will only contain entries for elements owned by that PET. + +
+
[numOwnedNodes]
+
The number of local nodes which are owned by this PET. This is the number of PET local entries in + the nodalDistgrid. + +
+
[ownedNodeCoords]
+
The coordinates for the local nodes. These coordinates will be in the proper order to correspond + with the nodes in the nodalDistgrid returned by this call, and hence with a Field built on + mesh. The size of the input array should be the spatial dim of mesh times + numOwnedNodes. + +
+
[numOwnedElements]
+
The number of local elements which are owned by this PET. Note that every element is owned by + the PET it resides on, so unlike for nodes, numOwnedElements is identical to the number of elements on + the PET. It is also the number of PET local entries in the elementDistgrid. + +
+
[ownedElemCoords]
+
The center coordinates for the local elements. These coordinates will be in the proper order to correspond + with the elements in the elementDistgrid returned by this call, and hence with a Field built on the + center of mesh. The size of the input array should be the spatial dim of mesh times + numOwnedElements. + +
+
[elemMaskArray]
+
The mask information for elements put into an ESMF Array. The ESMF Array must be build on a DistGrid which + matches the elementDistgrid. + +
+
[elemAreaArray]
+
The area information for elements put into an ESMF Array. The ESMF Array must be build on a DistGrid which + matches the elementDistgrid. + +
+
[isMemFreed]
+
Indicates if the coordinate and connection memory been freed from mesh. If so, it + can no longer be used as part of an ESMF_FieldRegridStore() call. + +
+
[coordSys]
+
The coordinate system of the grid coordinate data. + +
+
[status]
+
Flag indicating the status of the Mesh. Please + see Section 54.43 for the list of options. + +
+
[name]
+
Name of the Mesh object. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+33.4.18 ESMF_MeshGetMOAB - Check on status of using MOAB library internally. +

+ +

+ +

+
+INTERFACE: +

    subroutine ESMF_MeshGetMOAB(moabOn, rc)
+
ARGUMENTS: +
     logical, intent(out)                      :: moabOn
+     integer, intent(out), optional            :: rc
+
+DESCRIPTION: +
+ +

+This method is only temporary. It was created to enable testing during the stage in ESMF development while + we have two internal mesh implementations. At some point it will be removed. + +

+This method can be used to check whether the MOAB library is being used + to hold the internal structure of the Mesh. When set to .true. the following + Mesh create calls create a Mesh using MOAB internally. When set to .false. the following + Mesh create calls use the ESMF native internal mesh respresentation. Note that ESMF Meshes + created on MOAB are only supported in a limited set of operations and should be used + with caution as they haven't yet been tested as thoroughly as the native version. + Also, operations that use a pair of Meshes (e.g. regrid weight generation) are only supported between + meshes of the same type (e.g. you can regrid between two MOAB meshes, but not between a MOAB and + a native mesh). + +

+

+
moabOn
+
Output variable which indicates current state of MOAB. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+33.4.19 ESMF_MeshIsCreated - Check whether a Mesh object has been created +

+ +

+ +

+
+INTERFACE: +

   function ESMF_MeshIsCreated(mesh, rc)
+
RETURN VALUE: +
     logical :: ESMF_MeshIsCreated
+
ARGUMENTS: +
     type(ESMF_Mesh), intent(in)            :: mesh
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,             intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Return .true. if the mesh has been created. Otherwise return + .false.. If an error occurs, i.e. rc /= ESMF_SUCCESS is + returned, the return value of the function will also be .false.. + +

+The arguments are: +

+
mesh
+
ESMF_Mesh queried. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+33.4.20 ESMF_MeshSet - Set some Mesh information +

+ +

+ +

+
+INTERFACE: +

       subroutine ESMF_MeshSet(mesh, &
+            elementMask, elementArea, rc)
+
RETURN VALUE: +
+
ARGUMENTS: +
     type(ESMF_Mesh),          intent(in)            :: mesh
+     integer,                  intent(in), optional :: elementMask(:)
+     real(ESMF_KIND_R8),       intent(in), optional :: elementArea(:)
+     integer,                  intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+This call allows the user to change the set of information that it's legal to alter after + a mesh has been created. Currently, this call requires that the information has already + been added to the mesh during creation. For example, you can only change the element mask + information, if the mesh was initially created with element masking. + +

+The arguments are: +

+
mesh
+
+
+
[elementMask]
+
An array of mask values for each local element in the mesh. The elementMask array should be of size elementCount. + +
+
[elementArea]
+
An array of area values for each local element in the mesh. The elementArea array should be of size elementCount. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+33.4.21 ESMF_MeshSetMOAB - Toggle using the MOAB library internally. +

+ +

+ +

+
+INTERFACE: +

    subroutine ESMF_MeshSetMOAB(moabOn, rc)
+
ARGUMENTS: +
     logical, intent(in)                        :: moabOn
+     integer, intent(out) , optional            :: rc
+
+DESCRIPTION: +
+ +

+This method is only temporary. It was created to enable testing during the stage in ESMF development while + we have two internal mesh implementations. At some point it will be removed. + +

+This method can be employed to turn on or off using the MOAB library + to hold the internal structure of the Mesh. When set to .true. the following + Mesh create calls create a Mesh using MOAB internally. When set to .false. the following + Mesh create calls use the ESMF native internal mesh respresentation. Note that ESMF Meshes + created on MOAB are only supported in a limited set of operations and should be used + with caution as they haven't yet been tested as thoroughly as the native version. + Also, operations that use a pair of Meshes (e.g. regrid weight generation) are only supported between + meshes of the same type (e.g. you can regrid between two MOAB meshes, but not between a MOAB and + a native mesh). + +

+

+
moabOn
+
Variable used to turn MOAB on or off + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ + +

+34 XGrid Class +

+ +

+34.1 Description +

+ +

+An exchange grid represents the 2D boundary layer usually between the +atmosphere on one side and ocean and land on the other in an Earth +system model. There are dynamical and thermodynamical processes on +either side of the boundary layer and on the boundary layer itself. +The boundary layer exchanges fluxes from either side and adjusts +boundary conditions for the model components involved. For climate modeling, +it is critical that the fluxes transferred by the boundary layer are +conservative. + +

+The ESMF exchange grid is implemented as the ESMF_XGrid class. +Internally it's represented by a collection of the intersected cells +between atmosphere and ocean/land[17] grids. +These polygonal cells can have irregular shapes +and can be broken down into triangles facilitating a finite element +approach. + +

+There are two ways to create an ESMF_XGrid object from +user supplied information. The first way to create an ESMF_XGrid takes +two lists of ESMF_Grid or ESMF_Mesh that represent the model component grids on +either side of the exchange grid. From the two lists of ESMF_Grid or ESMF_Mesh, +information required for flux exchange calculation between any pair of the +model components from either side of the exchange grid is computed. In addition, the +internal representation of the ESMF_XGrid is computed and can be optionally stored +as an ESMF_Mesh. This internal representation is the collection of the intersected +polygonal cells as a result of merged ESMF_Meshes from both sides of the exchange grid. +ESMF_Field can be created on the ESMF_XGrid and used for weight generation +and regridding as the internal representation in the ESMF_XGrid has +a complete geometrical description of the exchange grid. + +

+The second way +to create an ESMF_XGrid requires users to supply all necessary information +to compute communication routehandle. A later +call to ESMF_FieldRegridStore() with the xgrid and source and destination +ESMF_Fields computes the ESMF_Routehandle object for matrix +multiply operation used in model remapping. + +

+ESMF_XGrid deals with 2 distinctive kinds of fraction for each Grid or Mesh cell +involved in its creation. The following description applies to both ESMF_Grid +and ESMF_Mesh involved in the ESMF_XGrid creation process. +The first fraction quantity $f_1$ is the same as defined in direct +Field regrid between a source and destination ESMF_Field pair, namely the fraction +of a total Grid cell area $A$ that is used in weight generation. The second fraction quantity $f_2$ +is a result of the Grid merging process when multiple ESMF_Grids or model components +exist on one side of the exchange grid. To compute XGrid, the multiple ESMF_Grids +are first merged together to form a super mesh. During the merging process, Grids that are +of a higher priority clips into lower priority Grids, creating fractional cells in the lower +priority Grids. Priority is a mechanism to resolve the claim of a surface region by multiple +Grids. To conserve flux, any surface area can only be claimed by a unique Grid. This is +a typical practice in earth system modelling, e.g. to handle land and ocean boundary. + +

+In addition to the matrix multiply communication routehandle, +ESMF_XGrid exports both $f_1$ and $f_2$ to the user through the ESMF_FieldRegridStore() method +because each remapping pair has different $f_1$ and $f_2$ associated with it. $f_2$ from source Grid is +folded directly in the calculated weight matrices since its used to calculate destination point flux +density $F$. The global source flux is defined as +$\sum_{g=1}^{g=n\_srcgrid}\sum_{s=1}^{s=n\_srccell}{ f_{1s} f_{2s} A_s F_s }$. +The global destination flux is defined as: + +$\sum_{g=1}^{g=n\_dstgrid}\sum_{d=1}^{d=n\_dstcell}{ \sum_{s=1}^{s=n\_intersect}(w_{sd} F_s) f_{2d} A_d}$, $w_{sd}$ is the +$f_2$ modified weight intersecting s-th source Grid cell with d-th destination Grid cell. +It can be proved that this formulation of the fractions and +weight calculation ensures first order global conservation of +flux $\mathcal{F}$ transferred from source grids to exchange grid, and from exchange grid to destination grids. + +

+34.2 Constants +

+ +

+ +

+ +
+34.2.1 ESMF_XGRIDSIDE +

+ +

+DESCRIPTION: +
+Specify which side of the ESMF_XGrid the current operation is taking place. + +

+The type of this flag is: + +

+type(ESMF_XGridSide_Flag) + +

+The valid values are: +

+
ESMF_XGRIDSIDE_A
+
A side of the eXchange Grid, corresponding to the A side of the Grids used to create an XGrid. +
+
ESMF_XGRIDSIDE_B
+
B side of the eXchange Grid, corresponding to the B side of the Grids used to create an XGrid. +
+
ESMF_XGRIDSIDE_BALANCED
+
The internally generated balanced side of the eXchange Grid in the middle. +
+
+ +

+34.3 Use and Examples +

+ +

+ +

+ +

+ +

+ +
+34.3.1 Create an XGrid from Grids then use it for regridding +

+ +

+An ESMF_XGrid object can be created from Grids on either side + of the exchange grid. Internally the + weight matrices and index mapping are computed and stored in the XGrid, along + with other necessary information for flux exchange calculation between + any pair of model components used for the XGrid creation. + +

+In this example, we create an XGrid from overlapping Grids on + either side of the XGrid. Then we perform a flux exchange from one side + to the other side of the XGrid. + +

+We start by creating the Grids on both sides and associate coordinates with + the Grids on the corner stagger. The Grids use global indexing and padding + for coordinates on the corner stagger. + +

+For details of Grid creation and coordinate use, + please refer to Grid class documentation: 31.3.2. +

+

+    ! First Grid on side A
+    sideA(1) = ESMF_GridCreateNoPeriDim(maxIndex=(/20, 20/), &
+      indexflag=ESMF_INDEX_GLOBAL, &
+      gridEdgeLWidth=(/0,0/), gridEdgeUWidth=(/1,1/), &
+      name='source Grid 1 on side A', rc=localrc)
+
+ +

+

+    ! Second Grid on side A
+    sideA(2) = ESMF_GridCreateNoPeriDim(maxIndex=(/20, 10/), &
+      indexflag=ESMF_INDEX_GLOBAL, &
+      gridEdgeLWidth=(/0,0/), gridEdgeUWidth=(/1,1/), &
+      name='source Grid 2 on side A', rc=localrc)
+
+ +

+

+    ! Allocate coordinates for Grid corner stagger
+    do i = 1, 2
+      call ESMF_GridAddCoord(sideA(i), staggerloc=ESMF_STAGGERLOC_CORNER, &
+          rc=localrc)
+
+ +

+

+    enddo
+
+ +

+Assign coordinate for the Grids on sideA at corner stagger. +

+

+    ! SideA first grid spans (0-20, 0-20) with 1.0x1.0 degree resolution
+    ! X corner
+    call ESMF_GridGetCoord(sideA(1), localDE=0, &
+        staggerLoc=ESMF_STAGGERLOC_CORNER, coordDim=1, &
+        farrayPtr=coordX, rc=localrc)
+
+ +

+

+    ! Y corner
+    call ESMF_GridGetCoord(sideA(1), localDE=0, &
+        staggerLoc=ESMF_STAGGERLOC_CORNER, coordDim=2, &
+        farrayPtr=coordY, rc=localrc)
+
+ +

+

+    do i = lbound(coordX,1), ubound(coordX,1)
+      do j = lbound(coordX, 2), ubound(coordX, 2)
+        coordX(i,j) = (i-1)*1.0
+        coordY(i,j) = (j-1)*1.0
+      enddo
+    enddo
+
+ +

+

+    ! SideA second grid spans (14.3-24.3, 14.2-24.2) with 0.5x1.0 degree
+    ! resolution X corner
+    call ESMF_GridGetCoord(sideA(2), localDE=0, &
+        staggerLoc=ESMF_STAGGERLOC_CORNER, coordDim=1, &
+        farrayPtr=coordX, rc=localrc)
+
+ +

+

+    ! Y corner
+    call ESMF_GridGetCoord(sideA(2), localDE=0, &
+        staggerLoc=ESMF_STAGGERLOC_CORNER, coordDim=2, &
+        farrayPtr=coordY, rc=localrc)
+
+ +

+

+    do i = lbound(coordX,1), ubound(coordX,1)
+      do j = lbound(coordX, 2), ubound(coordX, 2)
+        coordX(i,j) = 14.3+(i-1)*0.5
+        coordY(i,j) = 14.2+(j-1)*1.0
+      enddo
+    enddo
+
+ +

+Create the destination grid on side B, only one Grid exists on side B. Also associate + coordinate with the Grid: +

+

+    sideB(1) = ESMF_GridCreateNoPeriDim(maxIndex=(/30, 30/), &
+      indexflag=ESMF_INDEX_GLOBAL, &
+      gridEdgeLWidth=(/0,0/), gridEdgeUWidth=(/1,1/), &
+      name='source Grid 1 on side B', rc=localrc)
+
+ +

+

+    do i = 1, 1
+      call ESMF_GridAddCoord(sideB(i), staggerloc=ESMF_STAGGERLOC_CORNER, &
+          rc=localrc)
+
+ +

+

+    enddo
+
+ +

+

+    ! SideB grid spans (0-30, 0-30) with 1.0x1.0 degree resolution
+    ! X corner
+    call ESMF_GridGetCoord(sideB(1), localDE=0, &
+        staggerLoc=ESMF_STAGGERLOC_CORNER, coordDim=1, &
+        farrayPtr=coordX, rc=localrc)
+
+ +

+

+    ! Y corner
+    call ESMF_GridGetCoord(sideB(1), localDE=0, &
+        staggerLoc=ESMF_STAGGERLOC_CORNER, coordDim=2, &
+        farrayPtr=coordY, rc=localrc)
+
+ +

+

+    do i = lbound(coordX,1), ubound(coordX,1)
+      do j = lbound(coordX, 2), ubound(coordX, 2)
+        coordX(i,j) = (i-1)*1.0
+        coordY(i,j) = (j-1)*1.0
+      enddo
+    enddo
+
+ +

+Create an ESMF_XGrid object from the two lists of Grids on side A and B. + In this example both Grids on side A overlaps with the Grid on side B. It's an error to have a Grid + on either side that is spatially disjoint with the XGrid. Neither of the Grid on side A is + identical to the Grid on side B. Calling the ESMF_XGridCreate() method is straightforward: +

+

+    xgrid = ESMF_XGridCreate(sideAGrid=sideA, sideBGrid=sideB, rc=localrc)
+
+ +

+Create an ESMF_Field on the XGrid: +

+

+    field = ESMF_FieldCreate(xgrid, typekind=ESMF_TYPEKIND_R8, &
+                rc=localrc)
+
+ +

+Query the Field for its Fortran data pointer and its exclusive bounds: +

+

+    call ESMF_FieldGet(field, farrayPtr=xfarrayPtr, &
+        exclusiveLBound=xlb, exclusiveUBound=xub, rc=localrc)
+
+ +

+Create src and dst Fields on side A and side B Grids. +

+

+    do i = 1, 2
+        srcField(i) = ESMF_FieldCreate(sideA(i), &
+                typekind=ESMF_TYPEKIND_R8, rc=localrc)
+
+ +

+

+    enddo
+    do i = 1, 1
+        dstField(i) = ESMF_FieldCreate(sideB(i), &
+                typekind=ESMF_TYPEKIND_R8, rc=localrc)
+
+ +

+

+    enddo
+
+ +

+The current implementation requires that Grids used to generate the XGrid + must not match, i.e. they are different either topologically or geometrically or both. + In this example, the first source Grid is topologically identical to the destination + Grid but their geometric coordinates are different. + +

+First we compute the regrid routehandles, these routehandles can be used repeatedly + afterwards. Then we initialize the values in the Fields. Finally we execute the Regrid. + +

+

+    ! Compute regrid routehandles. The routehandles can be used
+    ! repeatedly afterwards.
+    ! From A -> X
+    do i = 1, 2
+      call ESMF_FieldRegridStore(xgrid, srcField(i), field, &
+        routehandle=rh_src2xgrid(i), rc = localrc)
+
+ +

+

+    enddo
+    ! from X -> B, retrieve the destination fraction Fields.
+    do i = 1, 1
+      call ESMF_FieldRegridStore(xgrid, field, dstField(i), &
+        dstFracField=dstFrac, dstMergeFracField=dstFrac2, &
+        routehandle=rh_xgrid2dst(i), rc = localrc)
+
+ +

+

+    enddo
+
+    ! Initialize values in the source Fields on side A
+    do i = 1, 2
+      call ESMF_FieldGet(srcField(i), farrayPtr=farrayPtr, rc=localrc)
+
+ +

+

+      farrayPtr = i
+    enddo
+    ! Initialize values in the destination Field on XGrid
+    xfarrayPtr = 0.0
+    ! Initialize values in the destination Field on Side B
+    do i = 1, 1
+      call ESMF_FieldGet(dstField(i), farrayPtr=farrayPtr, rc=localrc)
+
+ +

+

+      farrayPtr = 0.0
+    enddo
+
+ +

+First we regrid from the Fields on side A to the Field on the XGrid: +

+

+    ! Execute regrid from A -> X
+    do i = 1, 2
+      call ESMF_FieldRegrid(srcField(i), field, &
+        routehandle=rh_src2xgrid(i), &
+        zeroregion=ESMF_REGION_SELECT, rc = localrc)
+
+ +

+

+    enddo
+
+ +

+Next we regrid from the Field on XGrid to the destination Field on side B: +

+

+    ! Execute the regrid store
+    do i = 1, 1
+      call ESMF_FieldRegrid(field, dstField(i), &
+        routehandle=rh_xgrid2dst(i), &
+        rc = localrc)
+
+ +

+

+    enddo
+
+ +

+After the regridding calls, the routehandle can be released by calling the + ESMF_FieldRegridRelease() method. +

+

+    do i = 1, 2
+      call ESMF_FieldRegridRelease(routehandle=rh_src2xgrid(i), rc=localrc)
+
+ +

+

+    enddo
+    call ESMF_FieldRegridRelease(routehandle=rh_xgrid2dst(1), rc=localrc)
+
+ +

+In the above example, we first set up all the required parameters to create an XGrid from user + supplied input. Then we create Fields on the XGrid and the Grids on either side. Finally + we use the ESMF_FieldRegrid() interface to perform a flux exchange from the source side + to the destination side. + +

+ +

+ +
+34.3.2 Using XGrid in Earth System modeling +

+ +

+A typical application in Earth System Modeling is to calculate flux exchange + through the planetary boundary layer that can be represented by ESMF_XGrid. + Atmosphere is above the planetary boundary layer while land and ocean are below the boundary layer. + To create an XGrid, the land and ocean Grids that are usually different in resolution + need to be merged first to create a super Mesh. This merging process is enabled through the support + of masking. + +

+The global land and ocean Grids need to be created with masking enabled. + In practice, each Grid cell has an integer masking value attached to it. For examples using masking in + ESMF_Grid please refer to section 31.3.17. + +

+When calling the ESMF_XGridCreate() method, user can supply the optional arguments + sideAMaskValues and sideBMaskValues. + These arguments are one dimensional Fortran integer arrays. If any of the sideAMaskValues entry + matches the masking value used in sideA Grid, the sideA Grid cell is masked out, vice versa for sideB. + Thus by specifying different regions of a land and ocean Grids to be masked out, the two global Grids + can be merged into a new global Mesh covering the entire Earth. + +

+The following call shows how to use the ESMF_XGridCreate() method with the optional + arguments sideAMaskValues and sideBMaskValues. + +

+

+    xgrid = ESMF_XGridCreate(sideAGrid=sideA, sideBGrid=sideB, &
+      sideAMaskValues=(/2/), sideBMaskValues=(/3,4/), rc=localrc)
+
+ +

+ + +

+ +

+ +

+ +

+ +
+34.3.3 Create an XGrid from user input data then use it for regridding +

+ +

+Alternatively, XGrid can be created from Grids on either side, + area and centroid information of XGrid cells, sparse matrix matmul information. + The functionalities provided by the + XGrid object is constrained by the user supplied input during its creation time. + +

+In this example, we will set up a simple XGrid from overlapping Grids on + either side of the XGrid. Then we perform a flux exchange from one side + to the other side of the XGrid. The Grids are laid out in the following figure: +

+
+
+ + + +
Figure 20: +Grid layout for simple XGrid creation example. Overlapping of 3 Grids + (Green 2x2, Red 2x1, Blue 2x2). Green and red Grids on side A, blue Grid on side + B, black indicates the resulting XGrid. Color coded sequence indices are shown. + Physical coordinates are the tuples in parenthesis, e.g. at the four + corners of rectangular computational domain.
+\scalebox{0.6}{\includegraphics{XGridEx1}}
+
+
+
+ +

+We start by creating the Grids on both sides and associate coordinates with + the Grids. For details of Grid creation and coordinate use, please refer to + Grid class documentation. +

+

+    sideA(1) = ESMF_GridCreateNoPeriDim(minIndex=(/1,1/), maxIndex=(/2,2/), &
+        coordDep1=(/1/), &
+        coordDep2=(/2/), &
+        name='source Grid 1 on side A', rc=localrc)
+
+ +

+

+    sideA(2) = ESMF_GridCreateNoPeriDim(minIndex=(/1,1/), maxIndex=(/2,1/), &
+        coordDep1=(/1/), &
+        coordDep2=(/2/), &
+        name='source Grid 2 on side A', rc=localrc)
+
+ +

+

+    do i = 1, 2
+        call ESMF_GridAddCoord(sideA(i), staggerloc=ESMF_STAGGERLOC_CENTER, &
+            rc=localrc)
+
+ +

+

+    enddo
+
+ +

+Coordinate for the Grids on sideA, refer to the Grid layout diagram for the + interpretation of the coordinate values: +

+

+    ! SideA first grid
+    centroidA1X=(/0.5, 1.5/)
+    centroidA1Y=(/0.5, 1.5/)
+    call ESMF_GridGetCoord(sideA(1), localDE=0, &
+        staggerLoc=ESMF_STAGGERLOC_CENTER, coordDim=1, &
+        farrayPtr=coordX, rc=localrc)
+
+ +

+

+    coordX = centroidA1X
+    call ESMF_GridGetCoord(sideA(1), localDE=0, &
+        staggerLoc=ESMF_STAGGERLOC_CENTER, coordDim=2, &
+        farrayPtr=coordY, rc=localrc)
+
+ +

+

+    coordY = centroidA1Y
+
+    ! SideA second grid
+    centroidA2X=(/0.5, 1.5/)
+    centroidA2Y=(/2.5/)
+    call ESMF_GridGetCoord(sideA(2), localDE=0, &
+        staggerLoc=ESMF_STAGGERLOC_CENTER, coordDim=1, &
+        farrayPtr=coordX, rc=localrc)
+
+ +

+

+    coordX = centroidA2X
+    call ESMF_GridGetCoord(sideA(2), localDE=0, &
+        staggerLoc=ESMF_STAGGERLOC_CENTER, coordDim=2, &
+        farrayPtr=coordY, rc=localrc)
+
+ +

+

+    coordY = centroidA2Y
+
+ +

+Create the destination grid on side B, only one Grid exists on side B. Also associate + coordinate with the Grid: +

+

+    sideB(1) = ESMF_GridCreateNoPeriDim(minIndex=(/1,1/), maxIndex=(/2,2/), &
+        coordDep1=(/1/), coordDep2=(/2/), &
+        name='destination Grid on side B', rc=localrc)
+
+ +

+

+    do i = 1, 1
+        call ESMF_GridAddCoord(sideB(i), staggerloc=ESMF_STAGGERLOC_CENTER, &
+            rc=localrc)
+
+ +

+

+    enddo
+
+    ! SideB grid
+    centroidBX=(/0.75, 1.75/)
+    centroidBY=(/0.75, 2.25/)
+    call ESMF_GridGetCoord(sideB(1), localDE=0, &
+        staggerLoc=ESMF_STAGGERLOC_CENTER, coordDim=1, farrayPtr=coordX, &
+                rc=localrc)
+
+ +

+

+    coordX = centroidBX
+    call ESMF_GridGetCoord(sideB(1), localDE=0, &
+        staggerLoc=ESMF_STAGGERLOC_CENTER, coordDim=2, farrayPtr=coordY, &
+                rc=localrc)
+
+ +

+

+    coordY = centroidBY
+
+ +

+Set up the mapping indices and weights from A side to the XGrid. For details of + sequence indices, factorIndexList, and factorList, please see section + 28.2.18 in the reference manual. Please refer to the figure above + for interpretation of the sequence indices used here. + +

+In order to compute the destination flux on sideB through the XGrid as an mediator, + we need to set up the factorList (weights) and factorIndexList (indices) + for sparse matrix multiplication in this formulation: + dst_flux = W'*W*src_flux, where W' is the weight matrix from the XGrid to + destination; and W is the weight matrix from source to the XGrid. The weight matrix + is generated using destination area weighted algorithm. Please refer to figure + 20 for details. + +

+

+    ! Set up mapping from A1 -> X
+    sparseMatA2X(1)%factorIndexList(1,1)=1    ! src seq index (green)
+    sparseMatA2X(1)%factorIndexList(1,2)=2    ! src seq index (green)
+    sparseMatA2X(1)%factorIndexList(1,3)=2    ! src seq index (green)
+    sparseMatA2X(1)%factorIndexList(1,4)=3    ! src seq index (green)
+    sparseMatA2X(1)%factorIndexList(1,5)=4    ! src seq index (green)
+    sparseMatA2X(1)%factorIndexList(1,6)=4    ! src seq index (green)
+    sparseMatA2X(1)%factorIndexList(1,7)=3    ! src seq index (green)
+    sparseMatA2X(1)%factorIndexList(1,8)=4    ! src seq index (green)
+    sparseMatA2X(1)%factorIndexList(1,9)=4    ! src seq index (green)
+
+    sparseMatA2X(1)%factorIndexList(2,1)=1    ! dst seq index (black)
+    sparseMatA2X(1)%factorIndexList(2,2)=2    ! dst seq index (black)
+    sparseMatA2X(1)%factorIndexList(2,3)=3    ! dst seq index (black)
+    sparseMatA2X(1)%factorIndexList(2,4)=4    ! dst seq index (black)
+    sparseMatA2X(1)%factorIndexList(2,5)=5    ! dst seq index (black)
+    sparseMatA2X(1)%factorIndexList(2,6)=6    ! dst seq index (black)
+    sparseMatA2X(1)%factorIndexList(2,7)=7    ! dst seq index (black)
+    sparseMatA2X(1)%factorIndexList(2,8)=8    ! dst seq index (black)
+    sparseMatA2X(1)%factorIndexList(2,9)=9    ! dst seq index (black)
+
+    ! Set up mapping from A2 -> X
+    sparseMatA2X(2)%factorIndexList(1,1)=1    ! src seq index (red)
+    sparseMatA2X(2)%factorIndexList(1,2)=2    ! src seq index (red)
+    sparseMatA2X(2)%factorIndexList(1,3)=2    ! src seq index (red)
+
+    sparseMatA2X(2)%factorIndexList(2,1)=10   ! dst seq index (black)
+    sparseMatA2X(2)%factorIndexList(2,2)=11   ! dst seq index (black)
+    sparseMatA2X(2)%factorIndexList(2,3)=12   ! dst seq index (black)
+
+ +

+Set up the mapping weights from side A to the XGrid: +

+

+    ! Note that the weights are dest area weighted, they are ratio
+    ! of areas with destination area as the denominator.
+    ! Set up mapping weights from A1 -> X
+    sparseMatA2X(1)%factorList(:)=1.
+
+    ! Set up mapping weights from A2 -> X
+    sparseMatA2X(2)%factorList(:)=1.
+
+ +

+Set up the mapping indices and weights from the XGrid to B side: +

+

+    ! Set up mapping from X -> B
+    sparseMatX2B(1)%factorIndexList(1,1)=1    ! src seq index (black)
+    sparseMatX2B(1)%factorIndexList(1,2)=2    ! src seq index (black)
+    sparseMatX2B(1)%factorIndexList(1,3)=3    ! src seq index (black)
+    sparseMatX2B(1)%factorIndexList(1,4)=4    ! src seq index (black)
+    sparseMatX2B(1)%factorIndexList(1,5)=5    ! src seq index (black)
+    sparseMatX2B(1)%factorIndexList(1,6)=6    ! src seq index (black)
+    sparseMatX2B(1)%factorIndexList(1,7)=7    ! src seq index (black)
+    sparseMatX2B(1)%factorIndexList(1,8)=8    ! src seq index (black)
+    sparseMatX2B(1)%factorIndexList(1,9)=9    ! src seq index (black)
+    sparseMatX2B(1)%factorIndexList(1,10)=10  ! src seq index (black)
+    sparseMatX2B(1)%factorIndexList(1,11)=11  ! src seq index (black)
+    sparseMatX2B(1)%factorIndexList(1,12)=12  ! src seq index (black)
+
+    sparseMatX2B(1)%factorIndexList(2,1)=1    ! dst seq index (blue)
+    sparseMatX2B(1)%factorIndexList(2,2)=1    ! dst seq index (blue)
+    sparseMatX2B(1)%factorIndexList(2,3)=2    ! dst seq index (blue)
+    sparseMatX2B(1)%factorIndexList(2,4)=1    ! dst seq index (blue)
+    sparseMatX2B(1)%factorIndexList(2,5)=1    ! dst seq index (blue)
+    sparseMatX2B(1)%factorIndexList(2,6)=2    ! dst seq index (blue)
+    sparseMatX2B(1)%factorIndexList(2,7)=3    ! dst seq index (blue)
+    sparseMatX2B(1)%factorIndexList(2,8)=3    ! dst seq index (blue)
+    sparseMatX2B(1)%factorIndexList(2,9)=4    ! dst seq index (blue)
+    sparseMatX2B(1)%factorIndexList(2,10)=3   ! dst seq index (blue)
+    sparseMatX2B(1)%factorIndexList(2,11)=3   ! dst seq index (blue)
+    sparseMatX2B(1)%factorIndexList(2,12)=4   ! dst seq index (blue)
+
+    ! Set up mapping weights from X -> B
+    sparseMatX2B(1)%factorList(1)=4./9.
+    sparseMatX2B(1)%factorList(2)=2./9.
+    sparseMatX2B(1)%factorList(3)=2./3.
+    sparseMatX2B(1)%factorList(4)=2./9.
+    sparseMatX2B(1)%factorList(5)=1./9.
+    sparseMatX2B(1)%factorList(6)=1./3.
+    sparseMatX2B(1)%factorList(7)=2./9.
+    sparseMatX2B(1)%factorList(8)=1./9.
+    sparseMatX2B(1)%factorList(9)=1./3.
+    sparseMatX2B(1)%factorList(10)=4./9.
+    sparseMatX2B(1)%factorList(11)=2./9.
+    sparseMatX2B(1)%factorList(12)=2./3.
+
+ +

+Optionally the area can be setup to compute surface area weighted flux integrals: +

+

+    ! Set up destination areas to adjust weighted flux
+    xgrid_area(1) = 1.
+    xgrid_area(2) = 0.5
+    xgrid_area(3) = 0.5
+    xgrid_area(4) = 0.5
+    xgrid_area(5) = 0.25
+    xgrid_area(6) = 0.25
+    xgrid_area(7) = 0.5
+    xgrid_area(8) = 0.25
+    xgrid_area(9) = 0.25
+    xgrid_area(10) = 1.
+    xgrid_area(11) = 0.5
+    xgrid_area(12) = 0.5
+
+ +

+Create an XGrid based on the user supplied regridding parameters: +

+

+    xgrid = ESMF_XGridCreateFromSparseMat(sideAGrid=sideA, &
+        sideBGrid=sideB, area=xgrid_area, &
+        centroid=centroid, sparseMatA2X=sparseMatA2X, &
+        sparseMatX2B=sparseMatX2B, rc=localrc)
+
+ +

+Create an ESMF_Field on the XGrid: +

+

+    field = ESMF_FieldCreate(xgrid, typekind=ESMF_TYPEKIND_R8, &
+                rc=localrc)
+
+ +

+Query the Field for its Fortran data pointer and its exclusive bounds: +

+

+    call ESMF_FieldGet(field, farrayPtr=xfarrayPtr, &
+        exclusiveLBound=xlb, exclusiveUBound=xub, rc=localrc)
+
+ +

+Setup and initialize src and dst Fields on side A and side B Grids, + source Fields have different source flux: +

+

+    do i = 1, 2
+        srcField(i) = ESMF_FieldCreate(sideA(i), &
+                typekind=ESMF_TYPEKIND_R8, rc=localrc)
+
+ +

+

+        call ESMF_FieldGet(srcField(i), farrayPtr=farrayPtr, rc=localrc)
+
+ +

+

+        farrayPtr = i
+    enddo
+    do i = 1, 1
+        dstField(i) = ESMF_FieldCreate(sideB(i), &
+                typekind=ESMF_TYPEKIND_R8, rc=localrc)
+
+ +

+

+        call ESMF_FieldGet(dstField(i), farrayPtr=farrayPtr, rc=localrc)
+
+ +

+

+        farrayPtr = 0.0
+    enddo
+
+ +

+The current implementation requires that Grids used to generate the XGrid + must not match, i.e. they are different either topologically or geometrically or both. + In this example, the first source Grid is topologically identical to the destination + Grid but their geometric coordinates are different. This requirement will be relaxed + in a future release. + +

+First we compute the regrid routehandles, these routehandles can be used repeatedly + afterwards. Then we initialize the values in the Fields. Finally we execute the Regrid. + +

+

+    ! Compute regrid routehandles. The routehandles can be used
+    ! repeatedly afterwards.
+    ! From A -> X
+    do i = 1, 2
+        call ESMF_FieldRegridStore(xgrid, srcField(i), field, &
+                routehandle=rh_src2xgrid(i), rc = localrc)
+
+ +

+

+    enddo
+    ! from X -> B
+    do i = 1, 1
+        call ESMF_FieldRegridStore(xgrid, field, dstField(i), &
+                routehandle=rh_xgrid2dst(i), rc = localrc)
+
+ +

+

+    enddo
+
+    ! Initialize values in the source Fields on side A
+    do i = 1, 2
+        call ESMF_FieldGet(srcField(i), farrayPtr=farrayPtr, rc=localrc)
+
+ +

+

+        farrayPtr = i
+    enddo
+    ! Initialize values in the destination Field on XGrid
+    xfarrayPtr = 0.0
+    ! Initialize values in the destination Field on Side B
+    do i = 1, 1
+        call ESMF_FieldGet(dstField(i), farrayPtr=farrayPtr, rc=localrc)
+
+ +

+

+        farrayPtr = 0.0
+    enddo
+
+ +

+First we regrid from the Fields on side A to the Field on the XGrid: +

+

+    ! Execute regrid from A -> X
+    do i = 1, 2
+        call ESMF_FieldRegrid(srcField(i), field, &
+            routehandle=rh_src2xgrid(i), &
+            zeroregion=ESMF_REGION_SELECT, rc = localrc)
+
+ +

+

+    enddo
+
+ +

+Next we regrid from the Field on XGrid to the destination Field on side B: +

+

+    ! Execute the regrid store
+    do i = 1, 1
+        call ESMF_FieldRegrid(field, dstField(i), &
+            routehandle=rh_xgrid2dst(i), rc = localrc)
+
+ +

+

+    enddo
+
+ +

+In the above example, we first set up all the required parameters to create an XGrid from user + supplied input. Then we create Fields on the XGrid and the Grids on either side. Finally + we use the ESMF_FieldRegrid() interface to perform a flux exchange from the source side + to the destination side. + +

+ +

+ +
+34.3.4 Query the XGrid for its internal information +

+ One can query the XGrid for its internal information: +

+

+    call ESMF_XGridGet(xgrid, &
+        sideAGridCount=ngridA, &    ! number of Grids on side A
+        sideBGridCount=ngridB, &    ! number of Grids on side B
+        sideAGrid=l_sideA, &    ! list of Grids on side A
+        sideBGrid=l_sideB, &    ! list of Grids on side B
+        area=l_area, &      ! list of area of XGrid
+        centroid=l_centroid, &  ! list of centroid of XGrid
+        distgridA=l_sideAdg, &  ! list of Distgrids on side A
+        distgridM = distgrid, & ! balanced distgrid
+        sparseMatA2X=l_sparseMatA2X, & !sparse matrix matmul parameters A to X
+        sparseMatX2B=l_sparseMatX2B, & !sparse matrix matmul parameters X to B
+        rc=localrc)
+
+ +

+

+    call ESMF_XGridGet(xgrid, localDe=0, &
+        elementCount=eleCount, &    ! elementCount on the localDE
+        exclusiveCount=ec, &        ! exclusive count
+        exclusiveLBound=elb, &      ! exclusive lower bound
+        exclusiveUBound=eub, &      ! exclusive upper bound
+        rc=localrc)
+
+ +

+

+    call ESMF_XGridGet(xgrid, &
+        xgridSide=ESMF_XGRIDSIDE_A, & ! side of the XGrid to query
+        gridIndex=1, &              ! index of the distgrid
+        distgrid=distgrid, &        ! the distgrid returned
+        rc=localrc)
+
+ +

+ +

+ +
+34.3.5 Destroying the XGrid and other resources +

+ Clean up the resources by destroying the XGrid and other objects: +

+

+    ! After the regridding is successful.
+    ! Clean up all the allocated resources:
+    call ESMF_FieldDestroy(field, rc=localrc)
+
+ +

+

+    call ESMF_XGridDestroy(xgrid, rc=localrc)
+
+ +

+

+    do i = 1, 2
+        call ESMF_FieldDestroy(srcField(i), rc = localrc)
+
+ +

+

+        call ESMF_GridDestroy(sideA(i), rc = localrc)
+
+ +

+

+    enddo
+
+    do i = 1, 1
+        call ESMF_FieldDestroy(dstField(i), rc = localrc)
+
+ +

+

+        call ESMF_GridDestroy(sideB(i), rc = localrc)
+
+ +

+

+    enddo
+
+    deallocate(sparseMatA2X(1)%factorIndexList, sparseMatA2X(1)%factorList)
+    deallocate(sparseMatA2X(2)%factorIndexList, sparseMatA2X(2)%factorList)
+    deallocate(sparseMatX2B(1)%factorIndexList, sparseMatX2B(1)%factorList)
+
+ +

+ + +

+34.4 Restrictions and Future Work +

+ +

+ +

+34.4.1 Restrictions and Future Work +

+ +

+ + + +

    +
  1. CAUTION: Any Grid or Mesh pair picked from the A side and B side of the XGrid +cannot point to the same Grid or Mesh in memory on a local PET. This prevents Regrid from +selecting the right source and destination grid automatically to calculate the regridding routehandle. +It's okay for the Grid and Mesh to have identical topological and geographical properties as long +as they are stored in different memory. + +

    +

  2. +
+ +

+ +

+34.5 Design and Implementation Notes +

+ +

+ +

    +
  1. The XGrid class is implemented in Fortran, and as such is +defined inside the framework by a XGrid derived type and a set of +subprograms (functions and subroutines) which operate on that derived type. +The XGrid class contains information needed to create Grid, Field, and +communication routehandle. + +

    +

  2. +
  3. XGrid follows the framework-wide convention of the +unison creation and operation rule: All PETs which are +part of the currently executing VM must create the +same XGrids at the same point in their execution. +In addition to the unison rule, XGrid creation also performs inter-PET +communication within the current executing VM. +
  4. +
+ +

+34.6 Class API +

+ +

+ +

+ +

+ +

+34.6.1 ESMF_XGridAssignment(=) - XGrid assignment +

+ +

+ +

+
+INTERFACE: +

     interface assignment(=)
+     xgrid1 = xgrid2
+
ARGUMENTS: +
     type(ESMF_XGrid) :: xgrid1
+     type(ESMF_XGrid) :: xgrid2
+
+DESCRIPTION: +
+ +

+Assign xgrid1 as an alias to the same ESMF XGrid object in memory + as xgrid2. If xgrid2 is invalid, then xgrid1 will be equally invalid after + the assignment. + +

+The arguments are: +

+
xgrid1
+
The ESMF_XGrid object on the left hand side of the assignment. + +
+
xgrid2
+
The ESMF_XGrid object on the right hand side of the assignment. + +
+
+ +

+ +

+ +

+34.6.2 ESMF_XGridOperator(==) - XGrid equality operator +

+ +

+ +

+
+INTERFACE: +

     interface operator(==)
+     if (xgrid1 == xgrid2) then ... endif
+               OR
+     result = (xgrid1 == xgrid2)
+
RETURN VALUE: +
     logical :: result
+
ARGUMENTS: +
     type(ESMF_XGrid), intent(in) :: xgrid1
+     type(ESMF_XGrid), intent(in) :: xgrid2
+
+DESCRIPTION: +
+ +

+Test whether xgrid1 and xgrid2 are valid aliases to the same ESMF + XGrid object in memory. For a more general comparison of two ESMF XGrids, + going beyond the simple alias test, the ESMF_XGridMatch() function (not yet + implemented) must be used. + +

+The arguments are: +

+
xgrid1
+
The ESMF_XGrid object on the left hand side of the equality + operation. + +
+
xgrid2
+
The ESMF_XGrid object on the right hand side of the equality + operation. + +
+
+ +

+ +

+ +

+34.6.3 ESMF_XGridOperator(/=) - XGrid not equal operator +

+ +

+ +

+
+INTERFACE: +

     interface operator(/=)
+     if (xgrid1 /= xgrid2) then ... endif
+               OR
+     result = (xgrid1 /= xgrid2)
+
RETURN VALUE: +
     logical :: result
+
ARGUMENTS: +
     type(ESMF_XGrid), intent(in) :: xgrid1
+     type(ESMF_XGrid), intent(in) :: xgrid2
+
+DESCRIPTION: +
+ +

+Test whether xgrid1 and xgrid2 are not valid aliases to the + same ESMF XGrid object in memory. For a more general comparison of two ESMF + XGrids, going beyond the simple alias test, the ESMF_XGridMatch() function + (not yet implemented) must be used. + +

+The arguments are: +

+
xgrid1
+
The ESMF_XGrid object on the left hand side of the non-equality + operation. + +
+
xgrid2
+
The ESMF_XGrid object on the right hand side of the non-equality + operation. + +
+
+ +

+ +

+ +

+34.6.4 ESMF_XGridCreate - Create an XGrid from lists of Grids and Meshes +

+ +

+ +

+
+INTERFACE: +

 
+ function ESMF_XGridCreate(&
+     sideAGrid,              sideAMesh, &
+     sideBGrid,              sideBMesh, &
+     sideAGridPriority,      sideAMeshPriority, &
+     sideBGridPriority,      sideBMeshPriority, &
+     sideAMaskValues,        sideBMaskValues, &
+     storeOverlay, &
+     name, rc)
+
RETURN VALUE: +
   type(ESMF_XGrid)                           :: ESMF_XGridCreate
+
ARGUMENTS: +
 -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+   type(ESMF_Grid),      intent(in), optional :: sideAGrid(:)
+   type(ESMF_Mesh),      intent(in), optional :: sideAMesh(:)
+   type(ESMF_Grid),      intent(in), optional :: sideBGrid(:)
+   type(ESMF_Mesh),      intent(in), optional :: sideBMesh(:)
+   integer,              intent(in), optional :: sideAGridPriority(:)
+   integer,              intent(in), optional :: sideAMeshPriority(:)
+   integer,              intent(in), optional :: sideBGridPriority(:)
+   integer,              intent(in), optional :: sideBMeshPriority(:)
+   integer(ESMF_KIND_I4),intent(in), optional :: sideAMaskValues(:)
+   integer(ESMF_KIND_I4),intent(in), optional :: sideBMaskValues(:)
+   logical,              intent(in), optional :: storeOverlay
+   character(len=*),     intent(in), optional :: name
+   integer,              intent(out),optional :: rc
+
+DESCRIPTION: +
+ +

+Create an XGrid from user supplied input: the list of Grids or Meshes on side A and side B, + and other optional arguments. A user can supply both Grids and Meshes on one side to create + the XGrid. By default, the Grids have a higher priority over Meshes but the order of priority + can be adjusted by the optional GridPriority and MeshPriority arguments. The priority order + of Grids and Meshes can also be interleaved by rearranging the optional + GridPriority and MeshPriority arguments accordingly. + +

+Sparse matrix multiplication coefficients are internally computed and + uniquely determined by the Grids or Meshes provided in sideA and sideB. User can supply + a single ESMF_Grid or an array of ESMF_Grid on either side of the + ESMF_XGrid. For an array of ESMF_Grid or ESMF_Mesh in sideA or sideB, + a merging process concatenates all the ESMF_Grids and ESMF_Meshes + into a super mesh represented + by ESMF_Mesh. The super mesh is then used to compute the XGrid. + Grid or Mesh objects in sideA and sideB arguments must have coordinates defined for + the corners of a Grid or Mesh cell. XGrid creation can be potentially memory expensive given the + size of the input Grid and Mesh objects. By default, the super mesh is not stored + to reduce memory usage. + Once communication routehandles are computed using ESMF_FieldRegridStore() method through + XGrid, all memory can be released by destroying the XGrid. + +

+If sideA and sideB have a single + Grid or Mesh object, it's erroneous + if the two Grids or Meshes are spatially disjoint. + It is also erroneous to specify a Grid or Mesh object in sideA or sideB + that is spatially disjoint from the ESMF_XGrid. + +

+This call is collective across the current VM. For more details please refer to the description + 34.1 of the XGrid class. For an example and associated documentation using this method see section + 34.3.1 + +

+The arguments are: +

+
[sideAGrid]
+
Parametric 2D Grids on side A, for example, + these Grids can be either Cartesian 2D or Spherical. + +
+
[sideAMesh]
+
Parametric 2D Meshes on side A, for example, + these Meshes can be either Cartesian 2D or Spherical. + +
+
[sideBGrid]
+
Parametric 2D Grids on side B, for example, + these Grids can be either Cartesian 2D or Spherical. + +
+
[sideBMesh]
+
Parametric 2D Meshes on side B, for example, + these Meshes can be either Cartesian 2D or Spherical. + +
+
[sideAGridPriority]
+
Priority array of Grids on sideA during overlay generation. + The sideAGridPriority array should be the same size as the sideAGrid array. The values + in the array should range from 1 to size(sideAGrid)+size(sideAMesh). A Grid whose corresponding + value in this array is lower than another side A Grid or Mesh, will take precedence over that Grid or Mesh + during side A merging. In other words, if both have parts in the same region, then the object with the lower value will win, and + the other Grid or Mesh part will be clipped away. + +
+
[sideAMeshPriority]
+
Priority array of Meshes on sideA during overlay generation. + The sideAMeshPriority array should be the same size as the sideAMesh array. The values + in the array should range from 1 to size(sideAGrid)+size(sideAMesh). A Mesh whose corresponding + value in this array is lower than another side A Grid or Mesh, will take precedence over that Grid or Mesh + during side A merging. In other words, if both have parts in the same region, then the object with the lower value will win, and + the other Grid or Mesh part will be clipped away. + +
+
[sideBGridPriority]
+
Priority array of Grids on sideB during overlay generation. + The sideBGridPriority array should be the same size as the sideBGrid array. The values + in the array should range from 1 to size(sideBGrid)+size(sideBMesh). A Grid whose corresponding + value in this array is lower than another side B Grid or Mesh, will take precedence over that Grid or Mesh + during side B merging. In other words, if both have parts in the same region, then the object with the lower value will win, and + the other Grid or Mesh part will be clipped away. + +
+
[sideBMeshPriority]
+
Priority array of Meshes on sideB during overlay generation. + The sideBMeshPriority array should be the same size as the sideBMesh array. The values + in the array should range from 1 to size(sideBGrid)+size(sideBMesh). A Mesh whose corresponding + value in this array is lower than another side B Grid or Mesh, will take precedence over that Grid or Mesh + during side B merging. In other words, if both have parts in the same region, then the object with the lower value will win, and + the other Grid or Mesh part will be clipped away. + +
+
[sideAMaskValues]
+
Mask information can be set in the Grid (see 31.3.17) or Mesh (see 33.3.11) + upon which the Field is built. The sideAMaskValues argument specifies the values in that + mask information which indicate a point should be masked out. In other words, a location is masked if and only if the + value for that location in the mask information matches one of the values listed in sideAMaskValues. + If sideAMaskValues is not specified, no masking on side A will occur. + +
+
[sideBMaskValues]
+
Mask information can be set in the Grid (see 31.3.17) or Mesh (see 33.3.11) + upon which the Field is built. The sideBMaskValues argument specifies the values in that + mask information which indicate a point should be masked out. In other words, a location is masked if and only if the + value for that location in the mask information matches one of the values listed in sideBMaskValues. + If sideBMaskValues is not specified, no masking on side B will occur. + +
+
[storeOverlay]
+
Setting the storeOverlay optional argument to .false. (default) + allows a user to bypass storage of the ESMF_Mesh used to represent the XGrid. + Only a ESMF_DistGrid is stored to allow Field to be built on the XGrid. + If the temporary mesh object is of interest, storeOverlay can be set to .true. + so a user can retrieve it for future use. + +
+
[name]
+
name of the xgrid object. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS only if the ESMF_XGrid + is created. + +
+
+ +

+ +

+ +

+34.6.5 ESMF_XGridCreateFromSparseMat an XGrid from raw input parameters +

+ +

+ +

+
+INTERFACE: +

 
+ function ESMF_XGridCreateFromSparseMat(&
+     sideAGrid,              sideAMesh, &
+     sideBGrid,              sideBMesh, &
+     sideAGridPriority,      sideAMeshPriority, &
+     sideBGridPriority,      sideBMeshPriority, &
+     sparseMatA2X, sparseMatX2A, sparseMatB2X, sparseMatX2B, &
+     area, centroid, &
+     name, &
+     rc)
+
RETURN VALUE: +
     type(ESMF_XGrid) :: ESMF_XGridCreateFromSparseMat
+
ARGUMENTS: +
 -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+ type(ESMF_Grid),      intent(in), optional :: sideAGrid(:)
+ type(ESMF_Mesh),      intent(in), optional :: sideAMesh(:)
+ type(ESMF_Grid),      intent(in), optional :: sideBGrid(:)
+ type(ESMF_Mesh),      intent(in), optional :: sideBMesh(:)
+ integer,              intent(in), optional :: sideAGridPriority(:)
+ integer,              intent(in), optional :: sideAMeshPriority(:)
+ integer,              intent(in), optional :: sideBGridPriority(:)
+ integer,              intent(in), optional :: sideBMeshPriority(:)
+ type(ESMF_XGridSpec), intent(in), optional :: sparseMatA2X(:)
+ type(ESMF_XGridSpec), intent(in), optional :: sparseMatX2A(:)
+ type(ESMF_XGridSpec), intent(in), optional :: sparseMatB2X(:)
+ type(ESMF_XGridSpec), intent(in), optional :: sparseMatX2B(:)
+ real(ESMF_KIND_R8),   intent(in), optional :: area(:)
+ real(ESMF_KIND_R8),   intent(in), optional :: centroid(:,:)
+ character (len=*),    intent(in), optional :: name
+ integer,              intent(out),optional :: rc
+
+DESCRIPTION: +
+ +

+Create an XGrid directly from user supplied sparse matrix parameters. User + is responsible to supply all information necessary for communication calculation. + For an example and associated documentation using this method see section + 34.3.3 + +

+The arguments are: +

+
[sideAGrid]
+
Parametric 2D Grids on side A, for example, + these Grids can be either Cartesian 2D or Spherical. + +
+
[sideAMesh]
+
Parametric 2D Meshes on side A, for example, + these Meshes can be either Cartesian 2D or Spherical. + +
+
[sideBGrid]
+
Parametric 2D Grids on side B, for example, + these Grids can be either Cartesian 2D or Spherical. + +
+
[sideBMesh]
+
Parametric 2D Meshes on side B, for example, + these Meshes can be either Cartesian 2D or Spherical. + +
+
[sideAGridPriority]
+
Priority array of Grids on sideA during overlay generation. + The sideAGridPriority array should be the same size as the sideAGrid array. The values + in the array should range from 1 to size(sideAGrid)+size(sideAMesh). A Grid whose corresponding + value in this array is lower than another side A Grid or Mesh, will take precedence over that Grid or Mesh + during side A merging. In other words, if both have parts in the same region, then the object with the lower value will win, and + the other Grid or Mesh part will be clipped away. + +
+
[sideAMeshPriority]
+
Priority array of Meshes on sideA during overlay generation. + The sideAMeshPriority array should be the same size as the sideAMesh array. The values + in the array should range from 1 to size(sideAGrid)+size(sideAMesh). A Mesh whose corresponding + value in this array is lower than another side A Grid or Mesh, will take precedence over that Grid or Mesh + during side A merging. In other words, if both have parts in the same region, then the object with the lower value will win, and + the other Grid or Mesh part will be clipped away. + +
+
[sideBGridPriority]
+
Priority array of Grids on sideB during overlay generation. + The sideBGridPriority array should be the same size as the sideBGrid array. The values + in the array should range from 1 to size(sideBGrid)+size(sideBMesh). A Grid whose corresponding + value in this array is lower than another side B Grid or Mesh, will take precedence over that Grid or Mesh + during side B merging. In other words, if both have parts in the same region, then the object with the lower value will win, and + the other Grid or Mesh part will be clipped away. + +
+
[sideBMeshPriority]
+
Priority array of Meshes on sideB during overlay generation. + The sideBMeshPriority array should be the same size as the sideBMesh array. The values + in the array should range from 1 to size(sideBGrid)+size(sideBMesh). A Mesh whose corresponding + value in this array is lower than another side B Grid or Mesh, will take precedence over that Grid or Mesh + during side B merging. In other words, if both have parts in the same region, then the object with the lower value will win, and + the other Grid or Mesh part will be clipped away. + +
+
[sparseMatA2X]
+
indexlist from a Grid index space on side A to xgrid index space; + indexFactorlist from a Grid index space on side A to xgrid index space. + +
+
[sparseMatX2A]
+
indexlist from xgrid index space to a Grid index space on side A; + indexFactorlist from xgrid index space to a Grid index space on side A. + +
+
[sparseMatB2X]
+
indexlist from a Grid index space on side B to xgrid index space; + indexFactorlist from a Grid index space on side B to xgrid index space. + +
+
[sparseMatX2B]
+
indexlist from xgrid index space to a Grid index space on side B; + indexFactorlist from xgrid index space to a Grid index space on side B. + +
+
[area]
+
area of the xgrid cells. + +
+
[centroid]
+
coordinates at the area weighted center of the xgrid cells. + +
+
[name]
+
name of the xgrid object. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS only if the ESMF_XGrid + is created. + +
+
+ +

+ +

+ +

+34.6.6 ESMF_XGridIsCreated - Check whether a XGrid object has been created +

+ +

+ +

+
+INTERFACE: +

   function ESMF_XGridIsCreated(xgrid, rc)
+
RETURN VALUE: +
     logical :: ESMF_XGridIsCreated
+
ARGUMENTS: +
     type(ESMF_XGrid), intent(in)            :: xgrid
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,             intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Return .true. if the xgrid has been created. Otherwise return + .false.. If an error occurs, i.e. rc /= ESMF_SUCCESS is + returned, the return value of the function will also be .false.. + +

+The arguments are: +

+
xgrid
+
ESMF_XGrid queried. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+34.6.7 ESMF_XGridDestroy - Release resources associated with an XGrid +

+ +

+ +

+
+INTERFACE: +

 
+   subroutine ESMF_XGridDestroy(xgrid, noGarbage, rc)
+
ARGUMENTS: +
     type(ESMF_XGrid), intent(inout)          :: xgrid       
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     logical,          intent(in),   optional :: noGarbage
+     integer,          intent(out),  optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    8.1.0
    +
    Added argument noGarbage. + The argument provides a mechanism to override the default garbage collection + mechanism when destroying an ESMF object. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Destroys an ESMF_XGrid, releasing the resources associated + with the object. + +

+The arguments are: +

+
xgrid
+
ESMF_XGrid object. + +
+
[noGarbage]
+
If set to .TRUE. the object will be fully destroyed and removed + from the ESMF garbage collection system. Note however that under this + condition ESMF cannot protect against accessing the destroyed object + through dangling aliases - a situation which may lead to hard to debug + application crashes. + +

+It is generally recommended to leave the noGarbage argument + set to .FALSE. (the default), and to take advantage of the ESMF + garbage collection system which will prevent problems with dangling + aliases or incorrect sequences of destroy calls. However this level of + support requires that a small remnant of the object is kept in memory + past the destroy call. This can lead to an unexpected increase in memory + consumption over the course of execution in applications that use + temporary ESMF objects. For situations where the repeated creation and + destruction of temporary objects leads to memory issues, it is + recommended to call with noGarbage set to .TRUE., fully + removing the entire temporary object from memory. + +

+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ + +

+ +

+ +

+ +

+34.6.8 ESMF_XGridGet - Get object-wide information from an XGrid +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_XGridGet()
+ 
+ subroutine ESMF_XGridGetDefault(xgrid, &
+     sideAGridCount, sideBGridCount, sideAMeshCount, sideBMeshCount, &
+     coordSys, &
+     dimCount, elementCount, &
+     sideAGrid, sideBGrid, sideAMesh, sideBMesh, &
+     mesh, &
+     area, centroid, &
+     distgridA, distgridB, distgridM, &
+     sparseMatA2X, sparseMatX2A, sparseMatB2X, sparseMatX2B, &
+     name, &
+     rc)
+
ARGUMENTS: +
 type(ESMF_XGrid),     intent(in)            :: xgrid
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+ integer,              intent(out), optional :: sideAGridCount, sideBGridCount
+ integer,              intent(out), optional :: sideAMeshCount, sideBMeshCount
+ type(ESMF_CoordSys_Flag), intent(out), optional :: coordSys
+ integer,              intent(out), optional :: dimCount
+ integer,              intent(out), optional :: elementCount
+ type(ESMF_Grid),      intent(out), optional :: sideAGrid(:), sideBGrid(:)
+ type(ESMF_Mesh),      intent(out), optional :: sideAMesh(:), sideBMesh(:)
+ type(ESMF_Mesh),      intent(out), optional :: mesh
+ real(ESMF_KIND_R8),   intent(out), optional :: area(:)
+ real(ESMF_KIND_R8),   intent(out), optional :: centroid(:,:)
+ type(ESMF_DistGrid),  intent(out), optional :: distgridA(:)
+ type(ESMF_DistGrid),  intent(out), optional :: distgridB(:)
+ type(ESMF_DistGrid),  intent(out), optional :: distgridM
+ type(ESMF_XGridSpec), intent(out), optional :: sparseMatA2X(:)
+ type(ESMF_XGridSpec), intent(out), optional :: sparseMatX2A(:)
+ type(ESMF_XGridSpec), intent(out), optional :: sparseMatB2X(:)
+ type(ESMF_XGridSpec), intent(out), optional :: sparseMatX2B(:)
+ character (len=*),    intent(out), optional :: name
+ integer,              intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Get information about XGrid + +

+The arguments are: +

+
xgrid
+
The ESMF_XGrid object used to retrieve information from. + +
+
[sideAGridCount]
+
Total Number of Grids on the A side. + +
+
[sideBGridCount]
+
Total Number of Grids on the B side. + +
+
[sideAMeshCount]
+
Total Number of Meshes on the A side. + +
+
[sideBMeshCount]
+
Total Number of Meshes on the B side. + +
+
[coordSys]
+
The coordinate system of the XGrid's coordinate data. + +
+
[dimCount]
+
Number of dimension of the xgrid. + +
+
[elementCount]
+
Number of elements in exclusive region of the xgrid on this PET. + +
+
[sideAGrid]
+
List of 2D Grids on side A. Must enter with shape(sideAGrid)=(/sideAGridCount/). + +
+
[sideBGrid]
+
List of 2D Grids on side B. Must enter with shape(sideBGrid)=(/sideBGridCount/). + +
+
[sideAMesh]
+
List of 2D Meshes on side A. Must enter with shape(sideAMesh)=(/sideAMeshCount/). + +
+
[sideBMesh]
+
List of 2D Meshes on side B. Must enter with shape(sideBMesh)=(/sideBMeshCount/). + +
+
[mesh]
+
Super mesh stored in XGrid when storeOverlay is set true during XGrid creation. + +
+
[area]
+
Area of the xgrid cells on this PET. Must enter with shape(area)=(/elementCount/). + +
+
[centroid]
+
Coordinates at the area weighted center of the xgrid cells on this PET. Must enter with shape(centroid)=(/elementCount, dimCount/). + +
+
[distgridA]
+
List of distgrids whose sequence index list is an overlap between a Grid + on sideA and the xgrid object. Must enter with shape(distgridA)=(/sideAGridCount+sideAMeshCount/). + +
+
[distgridB]
+
List of distgrids whose sequence index list is an overlap between a Grid + on sideB and the xgrid object. Must enter with shape(distgridB)=(/sideBGridCount+sideBMeshCount/). + +
+
[distgridM]
+
The distgrid whose sequence index list fully describes the xgrid object. + +
+
[sparseMatA2X]
+
Indexlist from a Grid index space on side A to xgrid index space; + indexFactorlist from a Grid index space on side A to xgrid index space. Must enter with shape(sparsematA2X)=(/sideAGridCount+sideAMeshCount/). + +
+
[sparseMatX2A]
+
Indexlist from xgrid index space to a Grid index space on side A; + indexFactorlist from xgrid index space to a Grid index space on side A. Must enter with shape(sparsematX2A)=(/sideAGridCount+sideAMeshCount/). + +
+
[sparseMatB2X]
+
Indexlist from a Grid index space on side B to xgrid index space; + indexFactorlist from a Grid index space on side B to xgrid index space. Must enter with shape(sparsematB2X)=(/sideBGridCount+sideBMeshCount/). + +
+
[sparseMatX2B]
+
Indexlist from xgrid index space to a Grid index space on side B; + indexFactorlist from xgrid index space to a Grid index space on side B. Must enter with shape(sparsematX2B)=(/sideBGridCount+sideBMeshCount/). + +
+
[name]
+
Name of the xgrid object. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS only if the ESMF_XGrid + is created. + +
+
+ +

+ + +

+ +

+ +

+ + +

+35 Geom Class +

+ +

+35.1 Description +

+ +

+The ESMF Geom class is used as a container for other ESMF geometry objects (e.g. an ESMF Grid). This allows a generic +representation of a geometry to be passed around (e.g. through a coupled system) without it's specific type being known. +Some operations are supported on a Geom object and more will be added over time as needed. However, if +an unsupported operation is needed, then the specific geometry object can always be pulled out and operated on that way. + +

+In addition to the geometry object, a Geom can also contain information describing a location on a geometry. For example, in the case of +a Grid, a geometry object will also contain a stagger location. Having this location information allows the creation of Fields and +other capabilities to be performed in the most generic way on a Geom object. For geometries where it is appropriate, the user can +optionally specify this location information during the creation of a Geom object. However, if no location is specified, then default values for +this information are provided which match those which would be used when creating a Field with the specific geometry +(e.g. stagger location ESMF_STAGGERLOC_CENTER for a Grid). + +

+35.2 Class API: Geom Methods +

+ +

+ +

+ +

+ +

+35.2.1 ESMF_GeomAssignment(=) - Geom assignment +

+ +

+ +

+
+INTERFACE: +

     interface assignment(=)
+     geom1 = geom2
+
ARGUMENTS: +
     type(ESMF_Geom) :: geom1
+     type(ESMF_Geom) :: geom2
+
+DESCRIPTION: +
+ +

+Assign geom1 as an alias to the same ESMF Geom object in memory + as geom2. If geom2 is invalid, then geom1 will be equally invalid after + the assignment. + +

+The arguments are: +

+
geom1
+
The ESMF_Geom object on the left hand side of the assignment. + +
+
geom2
+
The ESMF_Geom object on the right hand side of the assignment. + +
+
+ +

+ +

+ +

+35.2.2 ESMF_GeomOperator(==) - Geom equality operator +

+ +

+ +

+
+INTERFACE: +

   interface operator(==)
+     if (geom1 == geom2) then ... endif
+               OR
+     result = (geom1 == geom2)
+
RETURN VALUE: +
     logical :: result
+
ARGUMENTS: +
     type(ESMF_Geom), intent(in) :: geom1
+     type(ESMF_Geom), intent(in) :: geom2
+  !
+
+DESCRIPTION: +
+ +

+Test whether geom1 and geom2 are valid aliases to the same ESMF + Geom object in memory. For a more general comparison of two ESMF Geoms, + going beyond the simple alias test, the ESMF_GeomMatch() function + must be used. + +

+The arguments are: +

+
geom1
+
The ESMF_Geom object on the left hand side of the equality + operation. + +
+
geom2
+
The ESMF_Geom object on the right hand side of the equality + operation. + +
+
+ +

+ +

+ +

+35.2.3 ESMF_GeomOperator(/=) - Geom not equal operator +

+ +

+ +

+
+INTERFACE: +

   interface operator(/=)
+     if (geom1 /= geom2) then ... endif
+               OR
+     result = (geom1 /= geom2)
+
RETURN VALUE: +
     logical :: result
+
ARGUMENTS: +
     type(ESMF_Geom), intent(in) :: geom1
+     type(ESMF_Geom), intent(in) :: geom2
+
+DESCRIPTION: +
+ +

+Test whether geom1 and geom2 are not valid aliases to the + same ESMF Geom object in memory. For a more general comparison of two ESMF + Geoms, going beyond the simple alias test, the ESMF_GeomMatch() function + (not yet fully implemented) must be used. + +

+The arguments are: +

+
geom1
+
The ESMF_Geom object on the left hand side of the non-equality + operation. + +
+
geom2
+
The ESMF_Geom object on the right hand side of the non-equality + operation. + +
+
+ +

+ +

+ +

+35.2.4 ESMF_GeomCreate - Create a Geom from a Grid +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_GeomCreate()
+       function ESMF_GeomCreateGrid(grid,staggerloc, rc)
+
RETURN VALUE: +
       type(ESMF_Geom) :: ESMF_GeomCreateGrid
+
ARGUMENTS: +
        type(ESMF_Grid),       intent(in)             :: grid
+        type(ESMF_StaggerLoc), intent(in), optional   :: staggerloc
+        integer,               intent(out), optional  :: rc
+
+DESCRIPTION: +
+ +

+Create an ESMF_Geom object from an ESMF_Grid object. + +

+The arguments are: +

+
grid
+
ESMF_Grid object from which to create the Geom. + +
+
[staggerloc]
+
Stagger location of data in grid cells. For valid + predefined values see section 31.2.6. + If not specified, defaults to ESMF_STAGGERLOC_CENTER. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+35.2.5 ESMF_GeomCreate - Create a Geom from a Mesh +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_GeomCreate()
+       function ESMF_GeomCreateMesh(mesh, meshLoc, rc)
+
RETURN VALUE: +
       type(ESMF_Geom) :: ESMF_GeomCreateMesh
+
ARGUMENTS: +
        type(ESMF_Mesh),       intent(in)              :: mesh
+        type(ESMF_MeshLoc),    intent(in),  optional   :: meshLoc
+        integer,               intent(out), optional   :: rc
+
+DESCRIPTION: +
+ +

+Create an ESMF_Geom object from an ESMF_Mesh object. + +

+The arguments are: +

+
mesh
+
ESMF_Mesh object from which to create the Geom. + +
+
[meshloc]
+
The part of the Mesh on which to build the Field. For valid + predefined values see Section 54.41. + If not set, defaults to ESMF_MESHLOC_NODE. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+35.2.6 ESMF_GeomCreate - Create a Geom from a LocStream +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_GeomCreate()
+       function ESMF_GeomCreateLocStream(locstream, rc)
+
RETURN VALUE: +
       type(ESMF_Geom) :: ESMF_GeomCreateLocStream
+
ARGUMENTS: +
        type(ESMF_LocStream),  intent(in)              :: locstream
+        integer,               intent(out),  optional  :: rc
+
+DESCRIPTION: +
+ +

+Create an ESMF_Geom object from an ESMF_LocStream object. + +

+The arguments are: +

+
locstream
+
ESMF_LocStream object from which to create the Geom. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+35.2.7 ESMF_GeomCreate - Create a Geom from an XGrid +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_GeomCreate()
+       function ESMF_GeomCreateXGrid(xgrid, xgridside, gridIndex, rc)
+
RETURN VALUE: +
       type(ESMF_Geom) :: ESMF_GeomCreateXGrid
+
ARGUMENTS: +
        type(ESMF_XGrid),     intent(in)                :: xgrid
+        type(ESMF_XGridSide_Flag), intent(in), optional :: xgridSide
+        integer,              intent(in), optional      :: gridIndex
+        integer,              intent(out),optional      :: rc
+
+DESCRIPTION: +
+ +

+Create an ESMF_Geom object from an ESMF_XGrid object. + +

+The arguments are: +

+
xgrid
+
ESMF_XGrid object from which to create the Geom. + +
+
[xgridSide]
+
Which side of the XGrid to create the Field on (either ESMF_XGRIDSIDE_A, + ESMF_XGRIDSIDE_B, or ESMF_XGRIDSIDE_BALANCED). If not specified, then + defaults to ESMF_XGRIDSIDE_BALANCED. + +
+
[gridindex]
+
If xgridSide is ESMF_XGRIDSIDE_A or ESMF_XGRIDSIDE_B then + this index tells which Grid or Mesh on that side is being + referred to. If not provided, defaults to 1. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+35.2.8 ESMF_GeomDestroy - Release resources associated with a Geom +

+ +

+ +

+
+INTERFACE: +

       subroutine ESMF_GeomDestroy(geom, rc)
+
ARGUMENTS: +
       type(ESMF_Geom)            :: geom
+       integer, intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Destroys an ESMF_Geom object. This call does not destroy wrapped + Grid, LocStream, or other objects. + +

+The arguments are: +

+
geom
+
ESMF_Geom to be destroyed. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+35.2.9 ESMF_GeomGet - Get information about a Geom +

+ +

+ +

+
+INTERFACE: +

       subroutine ESMF_GeomGet(geom, &
+           dimCount, rank, localDECount, distgrid, &
+           distgridToGridMap, indexFlag, geomtype, &
+           grid, staggerloc, mesh, meshloc, locstream, &
+           xgrid, xgridside, gridIndex,rc)
+
ARGUMENTS: +
       type(ESMF_Geom),   intent(in)            :: geom
+       integer,               intent(out), optional :: dimCount
+       integer,               intent(out), optional :: rank
+       integer,               intent(out), optional :: localDECount
+       type(ESMF_DistGrid),   intent(out), optional :: distgrid
+       integer,               intent(out), optional :: distgridToGridMap(:)
+       type(ESMF_Index_Flag),  intent(out), optional :: indexflag
+       type(ESMF_GeomType_Flag),   intent(out), optional :: geomtype
+       type(ESMF_Grid),       intent(out), optional :: grid
+       type(ESMF_StaggerLoc), intent(out), optional :: staggerloc
+       type(ESMF_Mesh),       intent(out), optional :: mesh
+       type(ESMF_MeshLoc),    intent(out), optional :: meshloc
+       type(ESMF_LocStream),  intent(out), optional :: locstream
+       type(ESMF_XGrid),      intent(out), optional :: xgrid
+       type(ESMF_XGridSide_Flag),  intent(out), optional :: xgridside
+       integer,               intent(out), optional :: gridIndex
+       integer,               intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Get various types of information about a Geom. + +

+The arguments are: +

+
geom
+
Geom to get the information from. + +
+
[dimCount]
+
The full number of dimensions of the Distgrid object underneath the Geom object. + +
+
[rank]
+
The count of the memory dimensions in this Geom object. + Typically it's the same as dimCount. + However, in some cases (e.g. arbitrarily distributed grids) it can be different. + +
+
[localDECount]
+
The number of DEs in this Geom object on this PET. + +
+
[distgrid]
+
The structure describing the distribution of the Geom object. + +
+
[distgridToGridMap]
+
List that has as many elements as the distgrid dimCount. This array describes + mapping between the Geom object's dimensions and its Distgrid. + +
+
[indexflag]
+
Flag that indicates how the DE-local indices are to be defined. + +
+
[geomtype]
+
The type of geometry on which the Field is built. See + section 54.23 for the range of values. + +
+
[grid]
+
If the Geom object holds a Grid, then this will pass out that Grid object. + +
+
[staggerloc]
+
If the Geom object holds a Grid, then this will pass out the staggerloc. + +
+
[mesh]
+
If the Geom object holds a Mesh, then this will pass out that Mesh object. + +
+
[meshloc]
+
If the Geom object holds a Mesh, then this will pass out the meshloc. + +
+
[locstream]
+
If the Geom object holds a LocStream, then this will pass out that LocStream object. + +
+
[xgrid]
+
If the Geom object holds an XGrid, then this will pass out that XGrid object. + +
+
[xgridSide]
+
If the Geom object holds an XGrid, then this will pass out the XGrid side. + +
+
[gridIndex]
+
If the Geom object holds an XGrid, then this will pass out the gridIndex. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+35.2.10 ESMF_GeomMatch - Check if two Geom objects match +

+ +

+ +

+
+INTERFACE: +

   function ESMF_GeomMatch(geom1, geom2, rc)
+
RETURN VALUE: +
     type(ESMF_GeomMatch_Flag) :: ESMF_GeomMatch
+
ARGUMENTS: +
     type(ESMF_Geom),  intent(in)              :: geom1
+     type(ESMF_Geom),  intent(in)              :: geom2
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,          intent(out),  optional  :: rc
+
+DESCRIPTION: +
+ +

+Check if geom1 and geom2 match. Returns a range of values of type + ESMF_GeomMatch indicating how closely the Geoms match. For a description of + the possible return values, please see [*]. + Please also note that by default this call is not collective and only + returns the match for the piece of the Geoms on the local PET. In this case, + it is possible for this call to return a different match on different PETs + for the same Geoms. + +

+The arguments are: +

+
geom1
+
ESMF_Geom object. + +
+
geom2
+
ESMF_Geom object. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ + +

+36 DistGrid Class +

+ +

+36.1 Description +

+ +

+The ESMF DistGrid class sits on top of the DELayout class and holds domain +information in index space. A DistGrid object captures the index space topology +and describes its decomposition in terms of DEs. Combined with DELayout and VM +the DistGrid defines the data distribution of a domain decomposition across the +computational resources of an ESMF Component. + +

+The global domain is defined as the union of logically +rectangular (LR) sub-domains or tiles. The DistGrid create methods allow +the specification of such a multi-tile global domain and its decomposition into +exclusive, DE-local LR regions according to various degrees of user specified +constraints. Complex index space topologies can be constructed by specifying +connection relationships between tiles during creation. + +

+The DistGrid class holds domain information for all DEs. Each DE is associated +with a local LR region. No overlap of the regions is allowed. The DistGrid +offers query methods that allow DE-local topology information to be extracted, +e.g. for the construction of halos by higher classes. + +

+A DistGrid object only contains decomposable dimensions. The minimum rank for a +DistGrid object is 1. A maximum rank does not exist for DistGrid objects, +however, ranks greater than 7 may lead to difficulties with respect to the +Fortran API of higher classes based on DistGrid. The rank of a DELayout object +contained within a DistGrid object must be equal to the DistGrid rank. Higher +class objects that use the DistGrid, such as an Array object, may be of +different rank than the associated DistGrid object. The higher class object +will hold the mapping information between its dimensions and the DistGrid +dimensions. + +

+36.2 Constants +

+ +

+ +

+ +
+36.2.1 ESMF_DISTGRIDMATCH +

+ +

+DESCRIPTION: +
+Indicates the level to which two DistGrid variables match. + +

+The type of this flag is: + +

+type(ESMF_DistGridMatch_Flag) + +

+The valid values are: +

+
ESMF_DISTGRIDMATCH_INVALID:
+
Indicates a non-valid matching level. One + or both DistGrid objects are invalid. +
+
ESMF_DISTGRIDMATCH_NONE:
+
The lowest valid level of DistGrid matching. + This indicates that the DistGrid objects don't match at any of the higher + levels. +
+
ESMF_DISTGRIDMATCH_INDEXSPACE:
+
The index space covered by the two + DistGrid objects is identical. However, differences between the two objects + prevents a higher matching level. +
+
ESMF_DISTGRIDMATCH_TOPOLOGY:
+
The topology (i.e. index space and + connections) defined by the two DistGrid objects is identical. However, + differences between the two objects prevents a higher matching level. +
+
ESMF_DISTGRIDMATCH_DECOMP:
+
The index space decomposition defined by + the two DistGrid objects is identical. However, differences between the two + objects prevents a higher matching level. +
+
ESMF_DISTGRIDMATCH_EXACT:
+
The two DistGrid objects match in all + aspects, including sequence indices. The only aspect that may differ between + the two objects is their name. +
+
ESMF_DISTGRIDMATCH_ALIAS:
+
Both DistGrid variables are aliases to the + exact same DistGrid object in memory. +
+
+ +

+36.3 Use and Examples +

+ +

+The following examples demonstrate how to create, use and destroy DistGrid objects. In order to produce complete and valid DistGrid objects all of the ESMF_DistGridCreate() calls require to be called in unison i.e. on all PETs of a component with a complete set of valid arguments. + +

+ +

+ +

+ +

+36.3.1 Single tile DistGrid with regular decomposition +

+ +

+The minimum information required to create an ESMF_DistGrid object + for a single tile with default decomposition are the min and max of the tile + in index space. The following call creates a DistGrid for a + 1D index space tile with elements from 1 through 1000. +

+

+  distgrid = ESMF_DistGridCreate(minIndex=(/1/), maxIndex=(/1000/), rc=rc)
+
+ +

+A default DELayout with 1 DE per PET will be created during the + ESMF_DistGridCreate() call. The 1000 elements of the specified 1D tile + are then block decomposed into the available DEs, and distributed across the + PETs (same number as DEs by default). + Assuming execution on 4 PETs, the (min) $\sim$ (max) indices of the DE-local + blocks will be: +

+     DE 0 - (1) ~ (250)
+     DE 1 - (251) ~ (500)
+     DE 2 - (501) ~ (750)
+     DE 3 - (751) ~ (1000)
+
+ +

+DistGrids with rank > 1 can also be created with default decompositions, + specifying only the min and max indices of the tile. The following creates a + 2D DistGrid for a 5x5 tile with default decomposition. +

+

+  distgrid = ESMF_DistGridCreate(minIndex=(/1,1/), maxIndex=(/5,5/), rc=rc)
+
+ +

+The default decomposition for a DistGrid of rank $N$ will be +$(nDEs \times 1
+\times ... \times 1) $, where $nDEs$ is the number of DEs in the DELayout + and there are $N-1$ factors of $1$. For the 2D example above this means + a $4 \times 1$ regular decomposition if executed on 4 PETs and will result + in the following DE-local LR regions: +

+     DE 0 - (1,1) ~ (2,5)
+     DE 1 - (3,1) ~ (3,5)
+     DE 2 - (4,1) ~ (4,5)
+     DE 3 - (5,1) ~ (5,5)
+
+ +

+In many cases the default decomposition will not suffice for higher rank + DistGrids (rank > 1). For this reason a decomposition descriptor + regDecomp argument is available during ESMF_DistGridCreate(). The + following call creates a DistGrid on the same 2D tile as before, but now with + a user specified regular decomposition of +$2 \times 3 = 6 $ DEs. +

+

+  distgrid = ESMF_DistGridCreate(minIndex=(/1,1/), maxIndex=(/5,5/), &
+    regDecomp=(/2,3/), rc=rc)
+
+ +

+The default DE labeling sequence follows column major order for the + regDecomp argument: +

+     -----------> 2nd dimension
+     |  0  2  4
+     |  1  3  5
+     v
+    1st dimension
+
+ +

+By default grid points along all dimensions are homogeneously divided between + the DEs. The maximum element count difference between DEs along any dimension + is 1. The (min) $\sim$ (max) indices of the DE-local blocks of the above + example are as follows: +

+     DE 0 - (1,1) ~ (3,2)
+     DE 1 - (4,1) ~ (5,2)
+     DE 2 - (1,3) ~ (3,4)
+     DE 3 - (4,3) ~ (5,4)
+     DE 4 - (1,5) ~ (3,5)
+     DE 5 - (4,5) ~ (5,5)
+
+ +

+The specifics of the tile decomposition into DE-local LR domains can be + modified by the optional decompflag argument. The following line shows + how this argument is used to keep ESMF's default decomposition in the first + dimension but move extra grid points of the second dimension to the last DEs + in that direction. Extra elements occur if the number of DEs for a certain + dimension does not evenly divide its extent. In this example there are + 2 extra grid points for the second dimension because its extent is 5 but there + are 3 DEs along this index space axis. +

+

+  distgrid = ESMF_DistGridCreate(minIndex=(/1,1/), maxIndex=(/5,5/), &
+    regDecomp=(/2,3/), decompflag=(/ESMF_DECOMP_BALANCED, &
+    ESMF_DECOMP_RESTLAST/), rc=rc)
+
+ +

+Now DE 4 and DE 5 will hold the extra elements along the 2nd dimension. +

+     DE 0 - (1,1) ~ (3,1)
+     DE 1 - (4,1) ~ (5,1)
+     DE 2 - (1,2) ~ (3,2)
+     DE 3 - (4,2) ~ (5,2)
+     DE 4 - (1,3) ~ (3,5)
+     DE 5 - (4,3) ~ (5,5)
+
+ +

+An alternative way of indicating the DE-local LR regions is to list the + index space coordinate as given by the associated DistGrid tile for each + dimension. For this 2D example there are two lists (dim 1) / (dim 2) for each + DE: +

+     DE 0 - (1,2,3) / (1)
+     DE 1 - (4,5)   / (1)
+     DE 2 - (1,2,3) / (2)
+     DE 3 - (4,5)   / (2)
+     DE 4 - (1,2,3) / (3,4,5)
+     DE 5 - (4,5)   / (3,4,5)
+
+ +

+Information about DE-local LR regions in the latter format can be obtained + from the DistGrid object by use of ESMF_DistGridGet() methods: + +

+

+  allocate(dimExtent(2, 0:5)) ! (dimCount, deCount)
+  call ESMF_DistGridGet(distgrid, delayout=delayout, &
+    indexCountPDe=dimExtent, rc=rc)
+  if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+  call ESMF_DELayoutGet(delayout, localDeCount=localDeCount, rc=rc)
+  if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+  allocate(localDeToDeMap(0:localDeCount-1))
+  call ESMF_DELayoutGet(delayout, localDeToDeMap=localDeToDeMap, rc=rc)
+  if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+  do localDe=0, localDeCount-1
+    de = localDeToDeMap(localDe)
+    do dim=1, 2
+      allocate(localIndexList(dimExtent(dim, de))) ! allocate list 
+                                                   ! to hold indices
+      call ESMF_DistGridGet(distgrid, localDe=localDe, dim=dim, &
+        indexList=localIndexList, rc=rc)
+      if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+      print *, "local DE ", localDe," - DE ",de, &
+        " localIndexList along dim=", dim," :: ", localIndexList
+      deallocate(localIndexList)
+    enddo
+  enddo
+  deallocate(localDeToDeMap)
+  deallocate(dimExtent)
+
+ +

+The advantage of the localIndexList format over the minIndex/maxIndex + format is that it can be used directly for DE-local to tile index + dereferencing. Furthermore the localIndexList allows to express very + general decompositions such as the cyclic decompositions in the first + dimension generated by the following call: +

+

+  distgrid = ESMF_DistGridCreate(minIndex=(/1,1/), maxIndex=(/5,5/), &
+    regDecomp=(/2,3/), &
+    decompflag=(/ESMF_DECOMP_CYCLIC,ESMF_DECOMP_RESTLAST/), rc=rc)
+
+ +

+with decomposition: +

+     DE 0 - (1,3,5) / (1)
+     DE 1 - (2,4)   / (1)
+     DE 2 - (1,3,5) / (2)
+     DE 3 - (2,4)   / (2)
+     DE 4 - (1,3,5) / (3,4,5)
+     DE 5 - (2,4)   / (3,4,5)
+
+ +

+Finally, a DistGrid object is destroyed by calling +

+  call ESMF_DistGridDestroy(distgrid, rc=rc)
+
+ +

+ +

+36.3.2 DistGrid and DELayout +

+ +

+The examples of this section use the 2D DistGrid of the previous section + to show the interplay between DistGrid and DELayout. By default, i.e. + without specifying the delayout argument, a DELayout will be created + during DistGrid creation that provides as many DEs as the DistGrid + object requires. The implicit call to ESMF_DELayoutCreate() is issued + with a fixed number of DEs and default settings in all other aspects. The + resulting DE to PET mapping depends on the number of PETs of the current VM + context. Assuming 6 PETs in the VM +

+  distgrid = ESMF_DistGridCreate(minIndex=(/1,1/), maxIndex=(/5,5/), &
+    regDecomp=(/2,3/), rc=rc)
+
+ +

+will result in the following domain decomposition in terms of DEs +

+     0  2  4
+     1  3  5
+
+ and their layout or distribution over the available PETs: +
+     DE 0  -> PET 0
+     DE 1  -> PET 1
+     DE 2  -> PET 2
+     DE 3  -> PET 3
+     DE 4  -> PET 4
+     DE 5  -> PET 5
+
+ +

+Running the same example on a 4 PET VM will not change the domain + decomposition into 6 DEs as specified by +

+     0  2  4
+     1  3  5
+
+ but the layout across PETs will now contain multiple DE-to-PET mapping with + default cyclic distribution: +
+     DE 0  -> PET 0
+     DE 1  -> PET 1
+     DE 2  -> PET 2
+     DE 3  -> PET 3
+     DE 4  -> PET 0
+     DE 5  -> PET 1
+
+ +

+Sometimes it may be desirable for performance tuning to construct a DELayout + with specific characteristics. For instance, if the 6 PETs of the above + example are running on 3 nodes of a dual-SMP node cluster and there is a + higher communication load along the first dimension of the model than along + the second dimension it would be sensible to place DEs according to this + knowledge. + +

+The following example first creates a DELayout + with 6 DEs where groups of 2 DEs are to be in fast connection. This DELayout + is then used to create a DistGrid. +

+

+  delayout = ESMF_DELayoutCreate(deCount=6, deGrouping=(/(i/2,i=0,5)/), rc=rc)
+
+ +

+

+  distgrid = ESMF_DistGridCreate(minIndex=(/1,1/), maxIndex=(/5,5/), &
+    regDecomp=(/2,3/), delayout=delayout, rc=rc)
+
+ +

+This will ensure a distribution of DEs across the cluster resource + in the following way: +

+     0   2   4
+     1   3   5
+    SMP SMP SMP
+
+ +

+The interplay between DistGrid and DELayout may at first seem complicated. + The simple but important rule to understand is that DistGrid describes a + domain decomposition and each domain is labeled with a DE number. The DELayout + describes how these DEs are laid out over the compute resources of the VM, + i.e. PETs. The DEs are purely logical elements of decomposition and may be + relabeled to fit the algorithm or legacy code better. The following + example demonstrates this by describing the exact same distribution of the + domain data across the fictitious cluster of SMP-nodes with a different + choice of DE labeling: +

+

+  delayout = ESMF_DELayoutCreate(deCount=6, deGrouping=(/(mod(i,3),i=0,5)/), &
+    rc=rc)
+
+ +

+

+  distgrid = ESMF_DistGridCreate(minIndex=(/1,1/), maxIndex=(/5,5/), &
+    regDecomp=(/2,3/), deLabelList=(/0,3,1,4,2,5/), delayout=delayout, rc=rc)
+
+ +

+Here the deLabelList argument changes the default DE label sequence from + column major to row major. The DELayout compensates for this change in DE + labeling by changing the deGrouping argument to map the first dimension + to SMP nodes as before. The decomposition and layout now looks as follows: +

+     0   1   2
+     3   4   5
+    SMP SMP SMP
+
+ +

+Finally, in order to achieve a completely user-defined distribution of the + domain data across the PETs of the VM a DELayout may be created from a + petMap before using it in the creation of a DistGrid. If for + instance the desired distribution of a 2 x 3 decomposition puts the DEs of + the first row onto 3 separate PETs (PET 0, 1, 2) and groups the DEs of + the second row onto PET 3 a petMap must first be setup that + takes the DE labeling of the DistGrid into account.The following lines of + code result in the desired distribution using column major DE labeling by + first create a DELayout and then using it in the DistGrid creation. +

+

+  delayout = ESMF_DELayoutCreate(petMap=(/0,3,1,3,2,3/), rc=rc)
+
+ +

+

+  distgrid = ESMF_DistGridCreate(minIndex=(/1,1/), maxIndex=(/5,5/), &
+    regDecomp=(/2,3/), delayout=delayout, rc=rc)
+
+ +

+This decomposes the global domain into +

+     0   2   4
+     1   3   5
+
+ and associates the DEs to the following PETs: +
+     DE 0  -> PET 0
+     DE 1  -> PET 3
+     DE 2  -> PET 1
+     DE 3  -> PET 3
+     DE 4  -> PET 2
+     DE 5  -> PET 3
+
+ +

+ +

+36.3.3 Single tile DistGrid with decomposition by DE blocks +

+ +

+In the previous examples the DistGrid objects were created with regular + decompositions. In some cases a regular decomposition may not be the most + natural choice to decompose and distribute the index space. The + DE block version of ESMF_DistGridCreate() offers more control + over the precise decomposition. The following example shows how the + deBlockList argument is used to determine exactly what index space + block ends up on each DE. + +

+A single 5x5 tile is decomposed into 6 DEs. To this end a list is + constructed that holds the min and max indices of all six DE + blocks. The DE blocks must be constructed to cover the index space without + overlapping each other. It is okay to leave holes in the index space, i.e. + the DE blocks do not completely cover the index space tile. +

+

+  allocate(deBlockList(2, 2, 6))  ! (dimCount, 2, deCount)
+  deBlockList(:,1,1) = (/1,1/)  ! minIndex  1st deBlock
+  deBlockList(:,2,1) = (/3,2/)  ! maxIndex  1st deBlock
+  deBlockList(:,1,2) = (/4,1/)  ! minIndex  2nd deBlock
+  deBlockList(:,2,2) = (/5,2/)  ! maxIndex  2nd deBlock
+  deBlockList(:,1,3) = (/1,3/)
+  deBlockList(:,2,3) = (/2,4/)
+  deBlockList(:,1,4) = (/3,3/)
+  deBlockList(:,2,4) = (/5,4/)
+  deBlockList(:,1,5) = (/1,5/)
+  deBlockList(:,2,5) = (/3,5/)
+  deBlockList(:,1,6) = (/4,5/)  ! minIndex  6th deBlock
+  deBlockList(:,2,6) = (/5,5/)  ! maxInbex  6th deBlock
+
+ +

+

+  distgrid = ESMF_DistGridCreate(minIndex=(/1,1/), maxIndex=(/5,5/), &
+    deBlockList=deBlockList, rc=rc)
+
+ +

+ +

+36.3.4 2D multi-tile DistGrid with regular decomposition +

+ +

+Creating a DistGrid from a list of LR tiles is a straightforward + extension of the single tile case. The first four + arguments of ESMF_DistGridCreate() are promoted to rank 2 where the + second dimension is the tile index. + +

+The following 2D multi-tile domain consisting of 3 LR tiles will + be used in the examples of this section: +

+  
+     ----------------------------------------> 2nd dim
+     |
+     |                   (1,11)-----(1,20)
+     |                   |               | 
+     |                   |               | 
+     |                   |               | 
+     |                   |               | 
+     |                   |               | 
+     |                   (10,11)---(10,20)
+     |  (11,1)----(11,10)(11,11)---(11,20)
+     |  |               ||               |
+     |  |               ||               |
+     |  |               ||               |
+     |  |               ||               |
+     |  |               ||               |
+     |  (20,1)----(20,10)(20,11)---(20,20)
+     |
+     |
+     v
+    1st dim
+
+ +

+The first step in creating a multi-tile global domain is to construct the + minIndex and maxIndex arrays. +

+

+  allocate(minIndexPTile(2,3))    ! (dimCount, tileCount)
+  allocate(maxIndexPTile(2,3))    ! (dimCount, tileCount)
+  minIndexPTile(:,1) = (/11,1/)
+  maxIndexPTile(:,1) = (/20,10/)
+  minIndexPTile(:,2) = (/11,11/)
+  maxIndexPTile(:,2) = (/20,20/)
+  minIndexPTile(:,3) = (/1,11/)
+  maxIndexPTile(:,3) = (/10,20/)
+
+ +

+Next the regular decomposition for each tile is set up in the + regDecomp array. In this example each tile is associated with a + single DE. +

+

+  allocate(regDecompPTile(2,3))    ! (dimCount, tileCount)
+  regDecompPTile(:,1) = (/1,1/)    ! one DE
+  regDecompPTile(:,2) = (/1,1/)    ! one DE
+  regDecompPTile(:,3) = (/1,1/)    ! one DE
+
+ +

+Finally the DistGrid can be created by calling +

+  distgrid = ESMF_DistGridCreate(minIndexPTile=minIndexPTile, &
+    maxIndexPTile=maxIndexPTile, regDecompPTile=regDecompPTile, rc=rc)
+
+ +

+The default DE labeling sequence is identical to the tile labeling sequence + and follows the sequence in which the tiles are defined during the create + call. However, DE labels start at 0 whereas tile labels start at 1. In this + case the DE labels look as: +

+           2
+       0   1
+
+ +

+Each tile can be decomposed differently into DEs. The default DE labeling + follows the column major order for each tile. This is demonstrated in the + following case where the multi-tile global domain is decomposed into 9 DEs, +

+

+  regDecompPTile(:,1) = (/2,2/)    ! 4 DEs
+  regDecompPTile(:,2) = (/1,3/)    ! 3 DEs
+  regDecompPTile(:,3) = (/2,1/)    ! 2 DEs
+  
+  distgrid = ESMF_DistGridCreate(minIndexPTile=minIndexPTile, &
+    maxIndexPTile=maxIndexPTile, regDecompPTile=regDecompPTile, rc=rc)
+
+ +

+resulting in the following decomposition: +

+             +-------+
+             |   7   |
+             |       |
+             |   8   |
+     +-------+-------+
+     | 0   2 |       |
+     |       | 4 5 6 |
+     | 1   3 |       |
+     +-------+-------+
+
+ +

+

+     DE 0 - (11,1)  ~ (15,5)
+     DE 1 - (16,1)  ~ (20,5)
+     DE 2 - (11,6)  ~ (15,10)
+     DE 3 - (16,6)  ~ (20,10)
+     DE 4 - (11,11) ~ (20,14)
+     DE 5 - (11,15) ~ (20,17)
+     DE 6 - (11,18) ~ (20,20)
+     DE 7 - (1,11)  ~ (5,20)
+     DE 8 - (6,11)  ~ (10,20)
+
+ +

+The decompflag and deLabelList arguments can be used much like + in the single LR domain case to overwrite the default grid decomposition + (per tile) and to change the overall DE labeling sequence, respectively. + +

+ +

+ +
+36.3.5 Arbitrary DistGrids with user-supplied sequence indices +

+ +

+The third, and most flexible way of creating an ESMF DistGrid object is + by specifying the arbitrary sequence indices of all the index space elements + associated with a particular DE. The concept of sequence index + comes into the DistGrid class through the support it implements for the + communication methods of higher classes: Arrays and Fields. This support + is based by associating a unique sequence index with each + DistGrid index tuple. The sequence index can be used to address every Array + or Field element. By default, the DistGrid does not actually generate and + store the sequence index of each element. Instead a default sequence through + the elements is implemented in the DistGrid code. This default sequence + is used internally when needed. + +

+The DistGrid class provides two ESMF_DistGridCreate() calls that + allow the user to specify arbitrary sequence indices, overriding the use of + the default sequence index scheme. The user sequence indices are passed to + the DistGrid in form of 1d Fortran arrays, one array on each PET. The local + size of this array on each PET determines the number of DistGrid elements on + the PET. The supplied sequence indices must be unique across all PETs. + +

+

+  allocate(arbSeqIndexList(10))   ! each PET will have 10 elements
+  
+  do i=1, 10
+    arbSeqIndexList(i) = (i-1)*petCount + localPet ! initialize unique 
+                                                   ! seq. indices
+  enddo
+
+ +

+A default DELayout will be created automatically during + ESMF_DistGridCreate(), associating 1 DE per PET. +

+

+  distgrid = ESMF_DistGridCreate(arbSeqIndexList=arbSeqIndexList, rc=rc)
+
+ +

+The user provided sequence index array can be deallocated once it has + been used. +

+

+  deallocate(arbSeqIndexList)
+
+ +

+The distgrid object can be used just like any other DistGrid object. + The "arbitrary" nature of distgrid will only become visible during + Array or Field communication methods, where source and destination objects + map elements according to the sequence indices provided by the associated + DistGrid objects. +

+

+  call ESMF_DistGridDestroy(distgrid, rc=rc)
+
+ +

+The second ESMF_DistGridCreate() call, that accepts the + arbSeqIndexList argument, allows the user to specify additional, + regular DistGrid dimensions. These additional DistGrid dimensions are not + decomposed across DEs, but instead are simply "added" or "multiplied" to the + 1D arbitrary dimension. + +

+The same arbSeqIndexList array as before is used to define the + user supplied sequence indices. +

+

+  allocate(arbSeqIndexList(10))   ! each PET will have 10 elements
+  
+  do i=1, 10
+    arbSeqIndexList(i) = (i-1)*petCount + localPet  ! initialize unique 
+                                                    ! seq. indices
+  enddo
+
+ +

+The additional DistGrid dimensions are specified in the usual manner using + minIndex and maxIndex arguments. The dimCount of the + resulting DistGrid is the size of the minIndex and maxIndex + arguments plus 1 for the arbitrary dimension. The arbDim argument is + used to indicate which or the resulting DistGrid dimensions + is associated with the arbitrary sequence indices provided by the user. +

+

+  distgrid = ESMF_DistGridCreate(arbSeqIndexList=arbSeqIndexList, &
+    arbDim=1, minIndexPTile=(/1,1/), maxIndexPTile=(/5,7/), rc=rc)
+
+ +

+

+  deallocate(arbSeqIndexList)
+
+ +

+

+  call ESMF_DistGridDestroy(distgrid, rc=rc)
+
+ +

+ +

+36.3.6 DistGrid Connections - Definition +

+ +

+By default all of the edges of the index space tiles making up a DistGrid + are open. There is no sense of connectedness between the tiles. This situation + is shown for a simple 2 tile DistGrid. +

+

+  allocate(minIndexPTile(2,2))    ! (dimCount, tileCount)
+  allocate(maxIndexPTile(2,2))    ! (dimCount, tileCount)
+  minIndexPTile(:,1) = (/1,1/)
+  maxIndexPTile(:,1) = (/10,10/)
+  minIndexPTile(:,2) = (/11,1/)
+  maxIndexPTile(:,2) = (/20,10/)
+  
+  distgrid = ESMF_DistGridCreate(minIndexPTile=minIndexPTile, &
+    maxIndexPTile=maxIndexPTile, rc=rc)
+
+ +

+ +

+ + + +
Figure 21: +Two 10x10 index space tiles next to each other without + connections. Both tiles operate in the same global index space chosen + by ESMF_INDEX_GLOBAL when creating the DistGrid object. + The index tuples held by the DistGrid are represented by the vertices of + the shown grid structure. The index tuple (11,3), which is referenced in + the text, is marked by a black circle.
+
+ +
\includegraphics{dgconnect_2tiles_not_connected.eps}
+
+ +

+Connections between index space tiles are specified during DistGrid + creation through the connectionList argument. This argument takes + a list of elements of type(ESMF_DistGridConnection). Each element + refers to one specific connection between any two tiles. + +

+Each connection is defined by 4 parameters: + +

    +
  • tileIndexA - The tile index of the "A" side of the connection. +
  • +
  • tileIndexB - The tile index of the "B" side of the connection. +
  • +
  • positionVector - A vector containing information about the + translation of the index space of tile "B" + relative to tile "A". This vector has as many + components as there are index space dimensions. +
  • +
  • orientationVector - A vector containing information about + the rotation of the index space of tile "B" + relative to tile "A". This vector has as many + components as there are index space dimensions. + +
  • +
+ +

+The underlying principle of the DistGrid connections is that all supported + connections can be written as a forward transformation of the form +
+

+ + + + + + +
\begin{displaymath}
+\vec a \rightarrow \vec b = \hat R \vec a + \vec P.
+\end{displaymath} +(4)
+

+This transform takes the index space tuple $\vec a$ of a point in the + reference frame of tile "A" and expresses it as tuple $\vec b$ in terms of + the index space defined by tile "B". Here $\hat R$ + is a general rotation operator, and $\vec P$ is a translation vector in index + space. $\hat R$ and $\vec P$ correspond to the orientationVector and + positionVector, respectively. + +

+As an example consider the index space point marked by the black circle in + figure 21. In the reference frame of + tile 1 the point has an index tuple of (11,3). Because of the global index + space (ESMF_INDEX_GLOBAL), the point has the same index + tuple of (11,3) in the reference frame of tile 2. Therefore, the connection + that connects the right edge of tile 1 with the left edge of tile 2 has + +$\hat R ={1\!\!1}$ (default orientation) and +$\vec P = (0,0)$. Therefore + the connection can be set by the following code. The resulting situation is + shown in figure 22. +

+

+  allocate(connectionList(1))
+  call ESMF_DistGridConnectionSet(connection=connectionList(1), &
+    tileIndexA=1, tileIndexB=2, positionVector=(/0,0/), rc=rc)
+
+ +

+

+  distgrid = ESMF_DistGridCreate(minIndexPTile=minIndexPTile, &
+    maxIndexPTile=maxIndexPTile, connectionList=connectionList, &
+    rc=rc)  ! defaults to ESMF_INDEX_GLOBAL
+
+ +

+The same topology can be defined for ESMF_INDEX_DELOCAL indexing. + However, the positionVector must be adjusted for the fact that now + the same point in index space has different index tuples depending on what + tile's reference frame is used. + +

+With local indexing both tiles start at (1,1) and end at (10,10). +

+

+  allocate(minIndexPTile(2,2))    ! (dimCount, tileCount)
+  allocate(maxIndexPTile(2,2))    ! (dimCount, tileCount)
+  minIndexPTile(:,1) = (/1,1/)
+  maxIndexPTile(:,1) = (/10,10/)
+  minIndexPTile(:,2) = (/1,1/)
+  maxIndexPTile(:,2) = (/10,10/)
+
+ +

+To see the impact that the index scheme has on the positionVector, + again consider the same highlighted index space point. The index tuple + for this point is still (11,3) in the reference frame of tile 1 (tile "A" of + the connection). However, in the reference frame of of tile 2 + (tile "B" of the connection)) it has changed to (1,3) due to local indexing. + Therefore, using form (4), we find that the + position vector must be +$\vec P = \vec b - \vec a = (1,3) - (11,3) = (-10,0)$. +

+

+  allocate(connectionList(1))
+  call ESMF_DistGridConnectionSet(connection=connectionList(1), &
+    tileIndexA=1, tileIndexB=2, positionVector=(/-10,0/), rc=rc)
+
+ +

+

+  distgrid = ESMF_DistGridCreate(minIndexPTile=minIndexPTile, &
+    maxIndexPTile=maxIndexPTile, connectionList=connectionList, &
+    indexflag=ESMF_INDEX_DELOCAL, rc=rc)
+
+ +

+ +

+ + + +
Figure 22: +Two 10x10 index space tiles next to each other with a single + connection between the right edge of tile 1 and the left edge of tile 2. + The index tuple (11,3), which is referenced in + the text, is marked by a black circle.
+
+ +
\includegraphics{dgconnect_2tiles_connected.eps}
+
+ +

+Further note that every forward transformation has an associated inverse, or + backward transformation from tile "B" into the reference frame of tile "A". + Inverting the forward transform yields the backward transform as +
+

+ + + + + +
\begin{displaymath}
+\vec b \rightarrow \vec a = \hat R^{-1} \vec b - \hat R^{-1} \vec P.
+\end{displaymath} +(5)
+

+The DistGrid implicitly considers the corresponding backward connection for + every forward connection that is specified explicitly. In other words, + DistGrid connections are bidirectional. + +

+Before going into the details of how the orientationVector and + positionVector arguments correspond to $\hat R$ and $\vec P$ for more + complex cases, it is useful to explore what class of connections are covered + by the above introduced form (4) of + +$\vec a \rightarrow \vec b$. + +

+First consider the case where tile "A" is rotated by $\hat R$ + relative to tile "B" around a general pivot point $\vec p$ given in terms + of the index space of tile "A": + +

+
+

+ + + + + + + + + + +
$\displaystyle \vec a \rightarrow \vec b$$\textstyle =$$\displaystyle \hat R (\vec a - \vec p) + \vec p$
 $\textstyle =$$\displaystyle \hat R \vec a + ({1\!\!1} - \hat R) \vec p$ +(6)
+

+ +

+With substitution +
+

+ + + + + +
\begin{displaymath}
+\vec P = ({1\!\!1} - \hat R) \vec p
+\end{displaymath} +(7)
+

+form (4) is recovered. + +

+Next consider transform (6) followed by + a translation $\vec t$ of tile "B" relative to tile "A": + +

+
+

+ + + + + + +
\begin{displaymath}
+\vec a \rightarrow \vec b =
+\hat R \vec a + ({1\!\!1} - \hat R) \vec p + \vec t.
+\end{displaymath} +(8)
+

+ +

+Again form (4) is recovered with the + appropriate subsitution: +
+

+ + + + + + +
\begin{displaymath}
+\vec P = ({1\!\!1} - \hat R) \vec p + \vec t.
+\end{displaymath} +(9)
+

+ +

+Equation (9) is the general + definition of the positionVector argument for DistGrid connections. + It allows two tiles to be connected according to the relationship expressed + by (8). Note that this formualation of + tile connections is more general than connecting an edge of a tile to the + edge of another tile. Instead a DistGrid connection is specified as a general + relationship between the two index spaces, accounting for possible rotation + and translation. This formuation supports situations where some elements of + the connected tiles overlap with each other in index space. The ESMF + DistGrid class leverages this feature when representing topologies that + lead to redundancies of elements. Examples for this are the bipolar cut line + in a tripole grid, or the edges of a cubed sphere. + +

+By definition, DistGrid connections associate an index tuple of one tile + with exactly one index tuple expressed in the reference frame of another tile. + This restricts the supported rotations $\hat R$ to multiples of $90^{\circ}$. + Also allowing invesion of index space dimensions leads to 8 unique + operations in two dimension shown in table 3. + +

+

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 3: +The 8 unique rotational operations in 2 dimensional index space. The + associated orientationVector argument for each operation is also shown.
  $\hat R$orientationVector 
 $0^{\circ}$ +$\left( \begin{array}{rr}
+1 & 0 \\
+0 & 1 \end{array} \right)$ +$\left( \begin{array}{r}
+1 \\
+2 \end{array} \right)$ 
 $90^{\circ}$ +$\left( \begin{array}{rr}
+0 & -1 \\
+1 & 0 \end{array} \right)$ +$\left( \begin{array}{r}
+-2 \\
+1 \end{array} \right)$ 
 $180^{\circ}$ +$\left( \begin{array}{rr}
+-1 & 0 \\
+0 & -1 \end{array} \right)$ +$\left( \begin{array}{r}
+-1 \\
+-2 \end{array} \right)$ 
 $270^{\circ}$ +$\left( \begin{array}{rr}
+0 & 1 \\
+-1 & 0 \end{array} \right)$ +$\left( \begin{array}{r}
+2 \\
+-1 \end{array} \right)$ 
 $0^{\circ}$ + inversion dim 1 +$\left( \begin{array}{rr}
+-1 & 0 \\
+0 & 1 \end{array} \right)$ +$\left( \begin{array}{r}
+-1 \\
+2 \end{array} \right)$ 
 $0^{\circ}$ + inversion dim 2 +$\left( \begin{array}{rr}
+1 & 0 \\
+0 & -1 \end{array} \right)$ +$\left( \begin{array}{r}
+1 \\
+-2 \end{array} \right)$ 
 $90^{\circ}$ + inversion dim 1 +$\left( \begin{array}{rr}
+0 & 1 \\
+1 & 0 \end{array} \right)$ +$\left( \begin{array}{r}
+2 \\
+1 \end{array} \right)$ 
 $90^{\circ}$ + inversion dim 2 +$\left( \begin{array}{rr}
+0 & -1 \\
+-1 & 0 \end{array} \right)$ +$\left( \begin{array}{r}
+-2 \\
+-1 \end{array} \right)$ 
+
+
+ +

+The orientationVector is simply a more compact format holding the same + information provided by the 8 rotational matrices. The first (or top) element + of the orientation vector indicates which dimension of the tile "A" index + tuple is used for the first dimension of the tile "B" tuple. The second + (or bottom) element of the orientation vector indicates which dimension of the + tile "A" index tuple is used for the second dimenson of the tile "B" tuple. + If an orientation vector entry is negative, the sign of the associated + tuple element is inverted when going from tile "A" to tile "B" reference + frame. Table 3 provides the corresponding + orientationVector argument for each of the 8 2D rotational operations. + +

+ +

+36.3.7 DistGrid Connections - Single tile periodic and pole connections +

+ +

+The concept of DistGrid connections is not limited to cases with multiple + tiles. Even a single tile DistGrid can have connections. In this instance + tileA and tileB simply reference the same tile. A very common + case is that of a single tile with periodic boundary conditions. + +

+First consider a single tile DistGrid without connections. +

+

+  distgrid = ESMF_DistGridCreate(minIndex=(/1,1/), maxIndex=(/50,20/), rc=rc)
+
+ +

+In order to better visualize the topology, the first index space + dimension is associated with the longitude ( +$0^{\circ}..360^{\circ}$), and + the second dimension with latitude ( +$-80^{\circ}..+80^{\circ}$) of the unit + sphere (using an ESMF_Grid object) as shown in figure + 23. + +

+ +

+ + + +
Figure 23: +A single 50x20 index space tile without connections. For better + visualization the index space points are plotted on the unit circle. + The gap between the right and left edge of the tile is visible. Further + the top and the bottom edges of the tile are visibly without + connection.
+
+ +
\includegraphics{dgconnect_1tile_not_connected.eps}
+
+ +

+A single DistGrid connection is needed to connect the right edge of the + index space tile with its left edge. Connecting a tile with itself in such + manner leads to a periodic topology. + +

+First the connectionList needs to be allocated for a single connection. + Then the connection is defined with both tileIndexA and + tileIndexB set to 1, referring to the first, and only tile in this case. +

+

+  allocate(connectionList(1))
+  call ESMF_DistGridConnectionSet(connection=connectionList(1), &
+    tileIndexA=1, tileIndexB=1, positionVector=(/-50,0/), rc=rc)
+
+ +

+The positionVector is determined by transformation + (4), the fact that there is no rotation + involved, and that stepping over the right edge needs to connect back to + the left edge. Therefore +$\vec P = \vec b - \vec a = (1,j) - (51,j) =
+(-50,0)$. Here $j$ stands for an arbitrary value along the second index + space dimension. + +

+Creating a DistGrid on the same index space tile, but with this connection, + results in a periodic boundary condition along the first dimension. + This is shown in figure 24. + +

+

+  distgrid = ESMF_DistGridCreate(minIndex=(/1,1/), maxIndex=(/50,20/), &
+    connectionList=connectionList, rc=rc)
+
+ +

+ +

+ + + +
Figure 24: +A single 50x20 index space tile with periodic connection along + the first dimension.
+
+ +
\includegraphics{dgconnect_1tile_periodic1_connected.eps}
+
+ +

+In general it is more useful to express the position vector of a connection + in terms of the tile minIndex and maxIndex components. For this we define the + same index space tile in a set of variables. +

+

+  allocate(minIndex(2))    ! (dimCount)
+  allocate(maxIndex(2))    ! (dimCount)
+  minIndex(:) = (/1,1/)
+  maxIndex(:) = (/50,20/)
+
+ +

+Now we can code any connection on this tile in terms of minIndex and + maxIndex. For purpose of demonstration we define periodic boundary + conditions along both index space dimensions. The resulting torus topology + is depicted in figure 25. +

+

+  allocate(connectionList(2))
+  call ESMF_DistGridConnectionSet(connection=connectionList(1), & ! 1st connection
+    tileIndexA=1, tileIndexB=1, &   ! periodic along i
+    positionVector=(/ -(maxIndex(1)-minIndex(1)+1) , 0/), &  
+    rc=rc)
+
+ +

+

+  call ESMF_DistGridConnectionSet(connection=connectionList(2), & ! 2nd connection
+    tileIndexA=1, tileIndexB=1, &   ! periodic along j
+    positionVector=(/ 0 , -(maxIndex(2)-minIndex(2)+1) /), &  
+    rc=rc)
+
+ +

+

+  distgrid = ESMF_DistGridCreate(minIndex=minIndex, maxIndex=maxIndex, &
+    connectionList=connectionList, rc=rc)
+
+ +

+ +

+ + + +
Figure 25: +A single 50x20 index space tile with periodic connections + along both directions. The topology is that of a torus, however, because + of the chosen spherical coordinates the connection through the middle + has the shape of a cylinder.
+
+ +
\includegraphics{dgconnect_1tile_periodic2_connected.eps}
+
+ +

+While the topology shown in figure + 25 is that of a torus, the + coordinates chosen are actually those of a sphere. Next we replace + the periodic connection along $j$ (i.e. the second index space dimension) + with a more fitting pole connection at the top of the sphere + (i.e. at $j_{max}$). + +

+For the orientation vector associated with a regular pole connection at + $j_{max}$ we first look at how the two index space directions are affected. + Looking at a point with $i$ along the first dimension, and a second point + $i+1$ that is just to the right of the first point, we see that as the + pole is being crossed, the second point maps just right of the first point. + Therefore, the orientation of the first index space dimension is unaffected + by the pole connection. However, for the second dimension we find that + increasing $j$ on one side corresponds to a dereasing $j$ across the pole. + We thus have found the general fact that orientationVector=(1,-2) for + a pole connection across the $j$ direction. + +

+In order to find the position vector of the polar connection we consider + starting at a general point ($i$,$j_{max}$) at the top edge of the tile. + Crossing the pole this takes us to a point that is again right on the + top edge with $j=j_{max}$, and is $180^\circ$ rotated along the first + dimension. This means +$i=mod(i+i_{size}/2, i_{size})$, with +$i_{size}=i_{max}
+-i_{min}+1$. + In practice the modulo operation is automatically taken care of by the + periodic connection along $i$. We can therefore write: + +

+
+

+ + + + + +
\begin{displaymath}
+\vec a = \left( \begin{array}{l}
+i \\
+j_{max}+1 \end{arr...
+...in{array}{l}
+i + i_{size}/2\\
+j_{max} \end{array} \right).
+\end{displaymath} +(10)
+

+ +

+Using this observation, together with table 3 to + translate the polar orientationVector into a standard rotation + operation $\hat R$, we get the position vector from equation + (4): + +

+
+

+ + + + + + + + + + + + + + + +
$\displaystyle \vec P$$\textstyle =$$\displaystyle \vec b - \hat R \vec a$
 $\textstyle =$$\displaystyle \left( \begin{array}{l}
+i + i_{size}/2\\
+j_{max} \end{array} \ri...
+...\end{array} \right)
+\left( \begin{array}{l}
+i \\
+j_{max}+1 \end{array} \right)$
 $\textstyle =$$\displaystyle \left( \begin{array}{l}
+i_{size}/2\\
+2j_{max} +1 \end{array} \right).$ +(11)
+

+

+

+  allocate(connectionList(2))
+  call ESMF_DistGridConnectionSet(connection=connectionList(1), & ! 1st connection
+    tileIndexA=1, tileIndexB=1, &   ! periodic along i
+    positionVector=(/-(maxIndex(1)-minIndex(1)+1),0/), & 
+    rc=rc)
+
+ +

+

+  call ESMF_DistGridConnectionSet(connection=connectionList(2), & ! 2nd connection
+    tileIndexA=1, tileIndexB=1, &   ! pole at j_max
+    orientationVector=(/1,-2/), &
+    positionVector=(/ (maxIndex(1)-minIndex(1)+1)/2 , 2*maxIndex(2)+1 /), & 
+    rc=rc)
+
+ +

+

+  distgrid = ESMF_DistGridCreate(minIndex=minIndex, maxIndex=maxIndex, &
+    connectionList=connectionList, rc=rc)
+
+ +

+The pole connection at $j_{max}$ can clearly be seen in figure + 26. Note that the chosen perspective + hides the fact that the lower edge of the index space tile remains open. + In other words there is still a hole at the bottom of the sphere that cannot + be seen. Only three of the four sides have been connected so far: + The first connection + connects the left and the right tile edges. The second connection connects + the top edge to itself to form the pole. A third connection would be needed, + e.g. to form a pole at the bottom edge much like the top edge. + This would then complete a perfectly spherical topology with a single tile. + +

+ +

+ + + +
Figure 26: +A single 50x20 index space tile with periodic connection + along $i$, and pole at $j_{max}$. The hole at $j_{min}$ is hidden from + sight.
+
+ +
\includegraphics{dgconnect_1tile_peripole_connected.eps}
+
+ +

+The final single tile topology discussed in this section is that of a tripole. + A tripolar sphere has the typical spherical periodic boundary condition + along one direction (e.g. connecting the left and the right tile edge), and a + regular monopole at one of the other edges of the tile. However, instead + of defining a second monopole at the opposite edge, a bipole connection + is chosen. + +

+Topologically a bipole connection can be thought of folding the respective + edge at the middle point back onto itself. Assuming the bipole at the top + edge, i.e. at $j_{max}$, we get mappings across the bipole of + +$(i_{min}, j_{max}+1) \rightarrow (i_{max}, j_{max})$, + +$(i_{min}+1, j_{max}+1) \rightarrow (i_{max}-1, j_{max})$, and so forth. + This means that + compared to the regular pole connection, the bipolar orientation vector + reverses the $i$ direction in addition to the $j$ direction: + orientationVector=(-1,-2). + +

+Using the bipolar mapping just mentioned for a point at $i_{min}$, together + with table 3 to translate the polar orientationVector + into a standard rotation operation $\hat R$, we can solve for the position + vector according to equation (4): + +

+
+

+ + + + + + + + + + + + + + + +
$\displaystyle \vec P$$\textstyle =$$\displaystyle \vec b - \hat R \vec a$
 $\textstyle =$$\displaystyle \left( \begin{array}{l}
+i_{max}\\
+j_{max} \end{array} \right)
+- ...
+...rray} \right)
+\left( \begin{array}{l}
+i_{min} \\
+j_{max}+1 \end{array} \right)$
 $\textstyle =$$\displaystyle \left( \begin{array}{l}
+i_{max}+i_{min}\\
+2j_{max} +1 \end{array} \right).$ +(12)
+

+ +

+Figure 27 visualizes the + bipolar topology at the top edge of the tile. Note, however, that the + coordinates are perfectly spherical. Consequently there is no "drawing + shut" of the cut line as would be expected for a true bipolar geometry. + Still, the two poles are becoming visible at the two opposing + ends of the top circle, where the distance between the connection lines is + starting to go to zero. + +

+ +

+ + + +
Figure 27: +A single 50x20 index space tile with periodic connection + along $i$, and bi-pole at $j_{max}$. The regular pole connection + at $j_{min}$ is hidden from sight.
+
+ +
\includegraphics{dgconnect_1tile_peribipole_connected.eps}
+
+ +

+

+  allocate(connectionList(3))
+  call ESMF_DistGridConnectionSet(connection=connectionList(1), & ! 1st connection
+    tileIndexA=1, tileIndexB=1, &   ! periodic along i
+    positionVector=(/-(maxIndex(1)-minIndex(1)+1),0/), & 
+    rc=rc)
+
+ +

+

+  call ESMF_DistGridConnectionSet(connection=connectionList(2), & ! 2nd connection
+    tileIndexA=1, tileIndexB=1, &   ! pole at j_min
+    orientationVector=(/1,-2/), &
+    positionVector=(/ (maxIndex(1)-minIndex(1)+1)/2 , 2*minIndex(2)+1 /), & 
+    rc=rc)
+
+ +

+

+  call ESMF_DistGridConnectionSet(connection=connectionList(3), & ! 3rd connection
+    tileIndexA=1, tileIndexB=1, &   ! bi-pole at j_max
+    orientationVector=(/-1,-2/), &
+    positionVector=(/ maxIndex(1)+minIndex(1) , 2*maxIndex(2)+1 /), & 
+    rc=rc)
+
+ +

+

+  distgrid = ESMF_DistGridCreate(minIndex=minIndex, maxIndex=maxIndex, &
+    connectionList=connectionList, rc=rc)
+
+ +

+ +

+36.3.8 DistGrid Connections - Multi tile connections +

+ +

+Starting point of the multi-tile connection examples will be the + six tile case shown in figure 28. + All six tiles are identical squares of size 10x10. + +

+ +

+ + + +
Figure 28: +Six 10x10 square index space tiles without connections. The tile + number is indicated by color as indicated by the legend.
+
+ +
\includegraphics{dgconnect_cusph_not_connected.eps}
+
+ +

+One geometrical interpretation of the six tiles shown is that of an unfolded + cube. In fact, the way that the tiles are arranged in the 2D plane does + suggest the cubic interpretation. In order to turn the six tiles into a + cubic topology, each tile must be connected to its neighbors on all four + sides. In total there will be 12 connections that need to be made. + +

+Choosing global indexing, the depicted six tile case can be created + in the following way: +

+

+  allocate(minIndexPTile(2,6))    ! (dimCount, tileCount)
+  allocate(maxIndexPTile(2,6))    ! (dimCount, tileCount)
+  size = 10                       ! number of index space points along tile sides
+  !- tile 1
+  tile=1
+  minIndexPTile(1,tile)=1
+  minIndexPTile(2,tile)=1
+  maxIndexPTile(1,tile)=minIndexPTile(1,tile)+size-1
+  maxIndexPTile(2,tile)=minIndexPTile(2,tile)+size-1
+  !- tile 2
+  tile=2
+  minIndexPTile(1,tile)=maxIndexPTile(1,tile-1)+1
+  minIndexPTile(2,tile)=minIndexPTile(2,tile-1)
+  maxIndexPTile(1,tile)=minIndexPTile(1,tile)+size-1
+  maxIndexPTile(2,tile)=minIndexPTile(2,tile)+size-1
+  !- tile 3
+  tile=3
+  minIndexPTile(1,tile)=minIndexPTile(1,tile-1)
+  minIndexPTile(2,tile)=maxIndexPTile(2,tile-1)+1
+  maxIndexPTile(1,tile)=minIndexPTile(1,tile)+size-1
+  maxIndexPTile(2,tile)=minIndexPTile(2,tile)+size-1
+  !- tile 4
+  tile=4
+  minIndexPTile(1,tile)=maxIndexPTile(1,tile-1)+1
+  minIndexPTile(2,tile)=minIndexPTile(2,tile-1)
+  maxIndexPTile(1,tile)=minIndexPTile(1,tile)+size-1
+  maxIndexPTile(2,tile)=minIndexPTile(2,tile)+size-1
+  !- tile 5
+  tile=5
+  minIndexPTile(1,tile)=minIndexPTile(1,tile-1)
+  minIndexPTile(2,tile)=maxIndexPTile(2,tile-1)+1
+  maxIndexPTile(1,tile)=minIndexPTile(1,tile)+size-1
+  maxIndexPTile(2,tile)=minIndexPTile(2,tile)+size-1
+  !- tile 6
+  tile=6
+  minIndexPTile(1,tile)=maxIndexPTile(1,tile-1)+1
+  minIndexPTile(2,tile)=minIndexPTile(2,tile-1)
+  maxIndexPTile(1,tile)=minIndexPTile(1,tile)+size-1
+  maxIndexPTile(2,tile)=minIndexPTile(2,tile)+size-1
+  
+  distgrid = ESMF_DistGridCreate(minIndexPTile=minIndexPTile, &
+    maxIndexPTile=maxIndexPTile, rc=rc)
+
+ +

+The five connections between tiles 1&2, 2&3, 3&4, 4&5, 5&6 are trivial. + There are no rotations, which means that the orientationVector argument + can be ommitted in these connections. Further, because of the global index + space, there are no translations either, which means that + positionVector=(0,0) for these five connections. The resulting + topology is shown in figure 29. +

+

+  allocate(connectionList(5))
+  !- connection 1
+  conn=1
+  call ESMF_DistGridConnectionSet(connection=connectionList(conn), &
+    tileIndexA=1, tileIndexB=2, positionVector=(/0, 0/), rc=rc)
+  !- connection 2
+  conn=2
+  call ESMF_DistGridConnectionSet(connection=connectionList(conn), &
+    tileIndexA=2, tileIndexB=3, positionVector=(/0, 0/), rc=rc)
+  !- connection 3
+  conn=3
+  call ESMF_DistGridConnectionSet(connection=connectionList(conn), &
+    tileIndexA=3, tileIndexB=4, positionVector=(/0, 0/), rc=rc)
+  !- connection 4
+  conn=4
+  call ESMF_DistGridConnectionSet(connection=connectionList(conn), &
+    tileIndexA=4, tileIndexB=5, positionVector=(/0, 0/), rc=rc)
+  !- connection 5
+  conn=5
+  call ESMF_DistGridConnectionSet(connection=connectionList(conn), &
+    tileIndexA=5, tileIndexB=6, positionVector=(/0, 0/), rc=rc)
+
+  distgrid = ESMF_DistGridCreate(minIndexPTile=minIndexPTile, &
+    maxIndexPTile=maxIndexPTile, connectionList=connectionList, rc=rc)
+
+ +

+ +

+ + + +
Figure 29: +The six tiles of an unfolded cube with five connections defined.
+
+ +
\includegraphics{dgconnect_cusph_5connected.eps}
+
+ +

+The sixth connection that does not involve a rotation is that between tile + 1&6. While there is no rotation involved, it does include a translation + because the bottom edge of tile 1 must reach all the way to the top edge + of tile 6. This involves a translation along both the $i$ and the $j$ + dimension. + +

+Using the same procedure introduced in the previous section, we chose an + arbitrary index space point close to the connection and write it in terms + of both tiles that we want to connect. E.g. the first point of the top + edge of tile 6 is + +

+( minIndexPTile(1,6) , maxIndexPTile(2,6) ) + +

+in terms of tile 6. However, + in terms of tile 1, going through the connection, it is + +

+( minIndexPTile(1,1) , minIndexPTile(2,1)-1 ). + +

+According to the general transformation relationship + (4) the position vector $\vec P$ for the + forward transform tile 1 $\rightarrow$ tile 6 is then given as the + difference between these two representations. Figure + 30 visualizes the situation. +

+

+  !- connection 6
+  conn=6
+  call ESMF_DistGridConnectionSet(connection=connectionList(conn), &
+    tileIndexA=1, tileIndexB=6, &
+    positionVector=(/minIndexPTile(1,6)-minIndexPTile(1,1),     &
+                     maxIndexPTile(2,6)-minIndexPTile(2,1)+1/), &
+    rc=rc)
+  
+  distgrid = ESMF_DistGridCreate(minIndexPTile=minIndexPTile, &
+    maxIndexPTile=maxIndexPTile, connectionList=connectionList, rc=rc)
+
+ +

+ +

+ + + +
Figure 30: +The six tiles of an unfolded cube with all six connections that + do not involve any rotation of tiles.
+
+ +
\includegraphics{dgconnect_cusph_6connected.eps}
+
+ +

+The six remaining connections all involve rotations. The procedure for finding + the correct orientationVector and positionVector arguments + still remains the same: First determine the direction of the connection + to be formulated. This is important because for the forward connection the + rotation applies to tile "A". Once the correct rotation operation $\hat R$ is + pinned down, an arbitrary point close to the connection is chosen. This point + can either be on tile "A" or "B". It is written then written in terms of tile + "A" index space $\vec a$, and in terms of tile "B" index space $\vec b$. + Obviously one of those formulations (either $\vec a$ or $\vec b$) will take + advantage of the connection, i.e. it will actually step outside the reference + tile in order to reach the chosen point. Finally the position vector $\vec P$ + of the connection is determined by expression + (4) as the difference: + +

+
+

+ + + + + + +
\begin{displaymath}
+\vec P = \vec b - \hat R \vec a.
+\end{displaymath} +(13)
+

+ +

+Following the above outlined procedure for connection tile 1 $\rightarrow$ + tile 3, we find first that tile 1 needs to be rotated clockwise by $90^\circ$. + This rotation lines up the top edge of tile 1 with the left edge of + tile 3. A clockwise rotation of $90^\circ$ corresponds to a counterclockwise + rotation by $270^\circ$ given in table 3. We therefore know + that orientationVector=(2,-1) for this connection, and the associated + operation is +$\hat R=\left(\begin{array}{rr}
+0 & 1 \\
+-1 & 0 \end{array} \right)$. + +

+Next we chose the first point on the top edge of tile 1 as a reference point. + In terms of tile 1 this point has coordinates + +

+$\vec a$ = ( minIndexPTile(1,1) , maxIndexPTile(2,1) ). + +

+The same point in terms of tile 3 (going through the connection) has + coordinates + +

+$\vec b$ = ( minIndexPTile(1,3)-1 , maxIndexPTile(2,3) ). + +

+Using equation (13) we find the position vector and + can write down the connection: +

+

+  allocate(connectionList(2))
+  !- connection 1
+  conn=1
+  call ESMF_DistGridConnectionSet(connection=connectionList(conn), &
+    tileIndexA=1, tileIndexB=3, &
+    orientationVector=(/2,-1/), & ! 270 degree rotation of tile A
+    positionVector=(/minIndexPTile(1,3)-1-maxIndexPTile(2,1),   &
+                     maxIndexPTile(2,3)+minIndexPTile(1,1)/), &
+    rc=rc)
+
+ +

+For greater clarity figure 31 only + shows two connections. Besides the connection just defined between tile 1 + and 3, the other connection shown is between tile 4 and 6. Defining the + connection as forward going from tile 4 to tile 6 means that tile 4 needs + to be rotated in such a way that its right edge meets up with the bottom + edge of tile 6. This requires a counterclockwise rotation of tile 4 by + $90^\circ$. From table 3 we then get + orientationVector=(-2,1), and +$\hat R=\left(\begin{array}{rr}
+0 & -1 \\
+1 & 0 \end{array} \right)$. + +

+Choosing the left most point on the bottom edge of tile 6 as the reference + point, we find the coordinates in terms of tile 4 (through the connection) + +

+$\vec a$ = ( maxIndexPTile(1,4)+1 , maxIndexPTile(2,4) ), + +

+and in terms of tile 6 + +

+$\vec b$ = ( minIndexPTile(1,6) , minIndexPTile(2,6) ). + +

+Again using equation (13) we find the position vector + and can implement the second connection: +

+

+  !- connection 2
+  conn=2
+  call ESMF_DistGridConnectionSet(connection=connectionList(conn), &
+    tileIndexA=4, tileIndexB=6, &
+    orientationVector=(/-2,1/), & ! 90 degree rotation of tile A
+    positionVector=(/minIndexPTile(1,6)+maxIndexPTile(2,4),   &
+                     minIndexPTile(2,6)-maxIndexPTile(1,4)-1/), &
+    rc=rc)
+
+  distgrid = ESMF_DistGridCreate(minIndexPTile=minIndexPTile, &
+    maxIndexPTile=maxIndexPTile, connectionList=connectionList, rc=rc)
+
+ +

+ +

+ + + +
Figure 31: +The six tiles of an unfolded cube with two connections that + involve rotation of tiles.
+
+ +
\includegraphics{dgconnect_cusph_2rotconnected.eps}
+
+ +

+The remaining four connections with rotations can be determined following the + exact same recipe. The following code finally defines all 12 connections + needed to connect the six index space tiles into a cubic topology. +

+

+  allocate(connectionList(12))
+
+  !- connection 1: tile 1 -> tile 2
+  conn=1
+  call ESMF_DistGridConnectionSet(connection=connectionList(conn), &
+    tileIndexA=1, tileIndexB=2, positionVector=(/0, 0/), rc=rc)
+
+  !- connection 2: tile 2 -> tile 3
+  conn=2
+  call ESMF_DistGridConnectionSet(connection=connectionList(conn), &
+    tileIndexA=2, tileIndexB=3, positionVector=(/0, 0/), rc=rc)
+
+  !- connection 3: tile 3 -> tile 4
+  conn=3
+  call ESMF_DistGridConnectionSet(connection=connectionList(conn), &
+    tileIndexA=3, tileIndexB=4, positionVector=(/0, 0/), rc=rc)
+
+  !- connection 4: tile 4 -> tile 5
+  conn=4
+  call ESMF_DistGridConnectionSet(connection=connectionList(conn), &
+    tileIndexA=4, tileIndexB=5, positionVector=(/0, 0/), rc=rc)
+
+  !- connection 5: tile 5 -> tile 6
+  conn=5
+  call ESMF_DistGridConnectionSet(connection=connectionList(conn), &
+    tileIndexA=5, tileIndexB=6, positionVector=(/0, 0/), rc=rc)
+
+  !- connection 6: tile 1 -> tile 6
+  conn=6
+  call ESMF_DistGridConnectionSet(connection=connectionList(conn), &
+    tileIndexA=1, tileIndexB=6, &
+    positionVector=(/minIndexPTile(1,6)-minIndexPTile(1,1),     &
+                     maxIndexPTile(2,6)-minIndexPTile(2,1)+1/), &
+    rc=rc)
+
+  !- connection 7: tile 1 -> tile 3
+  conn=7
+  call ESMF_DistGridConnectionSet(connection=connectionList(conn), &
+    tileIndexA=1, tileIndexB=3, &
+    orientationVector=(/2,-1/), & ! 270 degree rotation of tile A
+    positionVector=(/minIndexPTile(1,3)-1-maxIndexPTile(2,1), &
+                     maxIndexPTile(2,3)+minIndexPTile(1,1)/), &
+    rc=rc)
+
+  !- connection 8: tile 3 -> tile 5
+  conn=8
+  call ESMF_DistGridConnectionSet(connection=connectionList(conn), &
+    tileIndexA=3, tileIndexB=5, &
+    orientationVector=(/2,-1/), & ! 270 degree rotation of tile A
+    positionVector=(/minIndexPTile(1,5)-1-maxIndexPTile(2,3), &
+                     maxIndexPTile(2,5)+minIndexPTile(1,3)/), &
+    rc=rc)
+
+  !- connection 9: tile 5 -> tile 1
+  conn=9
+  call ESMF_DistGridConnectionSet(connection=connectionList(conn), &
+    tileIndexA=5, tileIndexB=1, &
+    orientationVector=(/2,-1/), & ! 270 degree rotation of tile A
+    positionVector=(/minIndexPTile(1,1)-1-maxIndexPTile(2,5), &
+                     maxIndexPTile(2,1)+minIndexPTile(1,5)/), &
+    rc=rc)
+
+  !- connection 10: tile 2 -> tile 4
+  conn=10
+  call ESMF_DistGridConnectionSet(connection=connectionList(conn), &
+    tileIndexA=2, tileIndexB=4, &
+    orientationVector=(/-2,1/), & ! 90 degree rotation of tile A
+    positionVector=(/minIndexPTile(1,4)+maxIndexPTile(2,2),     &
+                     minIndexPTile(2,4)-maxIndexPTile(1,2)-1/), &
+    rc=rc)
+
+  !- connection 11: tile 4 -> tile 6
+  conn=11
+  call ESMF_DistGridConnectionSet(connection=connectionList(conn), &
+    tileIndexA=4, tileIndexB=6, &
+    orientationVector=(/-2,1/), & ! 90 degree rotation of tile A
+    positionVector=(/minIndexPTile(1,6)+maxIndexPTile(2,4),     &
+                     minIndexPTile(2,6)-maxIndexPTile(1,4)-1/), &
+    rc=rc)
+
+  !- connection 12: tile 6 -> tile 2
+  conn=12
+  call ESMF_DistGridConnectionSet(connection=connectionList(conn), &
+    tileIndexA=6, tileIndexB=2, &
+    orientationVector=(/-2,1/), & ! 90 degree rotation of tile A
+    positionVector=(/minIndexPTile(1,2)+maxIndexPTile(2,6),     &
+                     minIndexPTile(2,2)-maxIndexPTile(1,6)-1/), &
+    rc=rc)
+  
+  ! - create the DistGrid with 6 tiles and 12 connections
+  distgrid = ESMF_DistGridCreate(minIndexPTile=minIndexPTile, &
+    maxIndexPTile=maxIndexPTile, connectionList=connectionList, rc=rc)
+
+ +

+For better visualization the resulting cubic topology is plotted in 3D. + Each index space point is associated with a longitude and latitude value + of the unit sphere. Combined with the cubic topology formed by the six + index space tiles, this results in a cubed sphere representation shown in + figure 32. + +

+ +

+ + + +
Figure 32: +Six index space tiles with all 12 connections to form a cubic + topology. The coordinates at every index space point are chosen to + form a spherical geometry, resulting in a cubed sphere.
+
+ +
\includegraphics{dgconnect_cusph_12connected.eps}
+
+ +

+ + +

+36.4 Restrictions and Future Work +

+ +

+ +

    +
  • Multi-tile DistGrids from deBlockList are not yet supported. +
  • +
  • The fastAxis feature has not been implemented yet. +
  • +
+ +

+36.5 Design and Implementation Notes +

+ +

+This section will be updated as the implementation of the DistGrid class +nears completion. + +

+36.6 Class API +

+ +

+ +

+ +

+ +

+36.6.1 ESMF_DistGridAssignment(=) - DistGrid assignment +

+ +

+ +

+
+INTERFACE: +

     interface assignment(=)
+     distgrid1 = distgrid2
+
ARGUMENTS: +
     type(ESMF_DistGrid) :: distgrid1
+     type(ESMF_DistGrid) :: distgrid2
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Assign distgrid1 as an alias to the same ESMF DistGrid object in memory + as distgrid2. If distgrid2 is invalid, then distgrid1 will be equally + invalid after the assignment. + +

+The arguments are: +

+
distgrid1
+
The ESMF_DistGrid object on the left hand side of the assignment. + +
+
distgrid2
+
The ESMF_DistGrid object on the right hand side of the assignment. + +
+
+ +

+ +

+ +

+36.6.2 ESMF_DistGridOperator(==) - DistGrid equality operator +

+ +

+ +

+
+INTERFACE: +

   interface operator(==)
+     if (distgrid1 == distgrid2) then ... endif
+               OR
+     result = (distgrid1 == distgrid2)
+
RETURN VALUE: +
     logical :: result
+
ARGUMENTS: +
     type(ESMF_DistGrid), intent(in) :: distgrid1
+     type(ESMF_DistGrid), intent(in) :: distgrid2
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Test whether distgrid1 and distgrid2 are valid aliases to the same ESMF + DistGrid object in memory. For a more general comparison of two + ESMF DistGrids, going beyond the simple alias test, the + ESMF_DistGridMatch() function (not yet fully implemented) must + be used. + +

+The arguments are: +

+
distgrid1
+
The ESMF_DistGrid object on the left hand side of the equality + operation. + +
+
distgrid2
+
The ESMF_DistGrid object on the right hand side of the equality + operation. + +
+
+ +

+ +

+ +

+36.6.3 ESMF_DistGridOperator(/=) - DistGrid not equal operator +

+ +

+ +

+
+INTERFACE: +

   interface operator(/=)
+     if (distgrid1 /= distgrid2) then ... endif
+               OR
+     result = (distgrid1 /= distgrid2)
+
RETURN VALUE: +
     logical :: result
+
ARGUMENTS: +
     type(ESMF_DistGrid), intent(in) :: distgrid1
+     type(ESMF_DistGrid), intent(in) :: distgrid2
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Test whether distgrid1 and distgrid2 are not valid aliases to the + same ESMF DistGrid object in memory. For a more general comparison of two + ESMF DistGrids, going beyond the simple alias test, the + ESMF_DistGridMatch() function (not yet fully implemented) must + be used. + +

+The arguments are: +

+
distgrid1
+
The ESMF_DistGrid object on the left hand side of the non-equality + operation. + +
+
distgrid2
+
The ESMF_DistGrid object on the right hand side of the non-equality + operation. + +
+
+ +

+ +

+ +

+36.6.4 ESMF_DistGridCreate - Create DistGrid object from DistGrid +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_DistGridCreate()
+   function ESMF_DistGridCreateDG(distgrid, &
+     firstExtra, lastExtra, indexflag, connectionList, balanceflag, &
+     delayout, vm, rc)
+
RETURN VALUE: +
     type(ESMF_DistGrid) :: ESMF_DistGridCreateDG
+
ARGUMENTS: +
     type(ESMF_DistGrid),           intent(in)            :: distgrid
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer, target,               intent(in),  optional :: firstExtra(:)
+     integer, target,               intent(in),  optional :: lastExtra(:)
+     type(ESMF_Index_Flag),         intent(in),  optional :: indexflag
+     type(ESMF_DistGridConnection), intent(in),  optional :: connectionList(:)
+     logical,                       intent(in),  optional :: balanceflag
+     type(ESMF_DELayout),           intent(in),  optional :: delayout
+     type(ESMF_VM),                 intent(in),  optional :: vm
+     integer,                       intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    6.3.0r
    +
    Added argument vm to support object creation on a + different VM than that of the current context. + +
    +
    8.0.0
    +
    Added argument delayout to support changing the layout of + DEs across PETs. +
    +Added argument balanceflag to support rebalancing of the + incoming DistGrids decomposition. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Create a new DistGrid from an existing DistGrid, keeping the decomposition + unchanged, unless balanceflag=.true. (see below). + The firstExtraPTile and lastExtraPTile arguments allow extra + elements to be added at the first/last edge DE in each dimension. The + method also allows the indexflag to be set. Further, if the + connectionList argument provided in it will be used to set + connections in the newly created DistGrid, otherwise the connections of + the incoming DistGrid will be used. + +

+The balanceflag argument allows a change in the decomposition, and + thus of the number of DEs. An attempt is made to decompose the index + space into as many DEs as there are PETs in the VM for which the DistGrid + is created. See the argument description for details. + +

+Setting the balanceflag argument to .true. is currently + incompatible with providing any of the other optional arguments. + +

+The arguments are: +

+
distgrid
+
Incoming DistGrid object. + +
+
[firstExtra]
+
Extra elements added to the first DE along each + dimension. This increases the size of the index space compared to + that of the incoming distgrid. The decomposition of the + enlarged index space is constructed to align with the original index + space provided by distgrid. + The default is a zero vector. + +
+
[lastExtra]
+
Extra elements added to the last DE along each + dimension. This increases the size of the index space compared to + that of the incoming distgrid. The decomposition of the + enlarged index space is constructed to align with the original index + space provided by distgrid. + The default is a zero vector. + +
+
[indexflag]
+
If present, override the indexflag setting of the incoming + distgrid. See section 54.29 for a + complete list of options. By default use the indexflag setting of + distgrid. + +
+
[connectionList]
+
If present, override the connections of the incoming distgrid. + See section 36.7.2 for the associated Set() + method. By default use the connections defined in distgrid. + +
+
[balanceflag]
+
If set to .true, rebalance the incoming distgrid + decompositon to exactly one DE per PET. The DEs along each dimension + are chosen to provide the most balanced decomposition across all + dimensions. + The default is .false., leaving the decomposition, and + therefore the number of DEs unchanged. For this case, PETs might end + up with no DE, one DE, or multiple DEs. + +
+
[delayout]
+
If present, override the DELayout of the incoming distgrid. + By default use the DELayout defined in distgrid. + +
+
[vm]
+
If present, the DistGrid object and the DELayout object + are created on the specified ESMF_VM object. The + default is to use the VM of the current context. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+36.6.5 ESMF_DistGridCreate - Create DistGrid object from DistGrid (multi-tile version) +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_DistGridCreate()
+   function ESMF_DistGridCreateDGT(distgrid, firstExtraPTile, &
+     lastExtraPTile, indexflag, connectionList, balanceflag, &
+     delayout, vm, rc)
+
RETURN VALUE: +
     type(ESMF_DistGrid) :: ESMF_DistGridCreateDGT
+
ARGUMENTS: +
     type(ESMF_DistGrid),           intent(in)            :: distgrid
+     integer, target,               intent(in)            :: firstExtraPTile(:,:)
+     integer, target,               intent(in)            :: lastExtraPTile(:,:)
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     type(ESMF_Index_Flag),         intent(in),  optional :: indexflag
+     type(ESMF_DistGridConnection), intent(in),  optional :: connectionList(:)
+     logical,                       intent(in),  optional :: balanceflag
+     type(ESMF_DELayout),           intent(in),  optional :: delayout
+     type(ESMF_VM),                 intent(in),  optional :: vm
+     integer,                       intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    6.3.0r
    +
    Added argument vm to support object creation on a + different VM than that of the current context. + +
    +
    8.0.0
    +
    Added argument delayout to support changing the layout of + DEs across PETs. +
    +Added argument balanceflag to support rebalancing of the + incoming DistGrids decomposition. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Create a new DistGrid from an existing DistGrid, keeping the decomposition + unchanged, unless balanceflag=.true. (see below). + The firstExtraPTile and lastExtraPTile arguments allow extra + elements to be added at the first/last edge DE in each dimension. The + method also allows the indexflag to be set. Further, if the + connectionList argument provided in it will be used to set + connections in the newly created DistGrid, otherwise the connections of + the incoming DistGrid will be used. + +

+The balanceflag argument allows a change in the decomposition, and + thus of the number of DEs. An attempt is made to decompose the index + space into as many DEs as there are PETs in the VM for which the DistGrid + is created. See the argument description for details. + +

+Setting the balanceflag argument to .true. is currently + incompatible with providing any of the other optional arguments. + +

+The arguments are: +

+
distgrid
+
Incoming DistGrid object. + +
+
firstExtraPTile
+
Extra elements added to the first DE along each dimension for each + tile. This increases the size of the index space compared to + that of the incoming distgrid. The decomposition of the + enlarged index space is constructed to align with the original index + space provided by distgrid. + The default is a zero vector. + +
+
lastExtraPTile
+
Extra elements added to the last DE along each dimension for each + tile. This increases the size of the index space compared to + that of the incoming distgrid. The decomposition of the + enlarged index space is constructed to align with the original index + space provided by distgrid. + The default is a zero vector. + +
+
[indexflag]
+
If present, override the indexflag setting of the incoming + distgrid. See section 54.29 for a + complete list of options. By default use the indexflag setting of + distgrid. + +
+
[connectionList]
+
If present, override the connections of the incoming distgrid. + See section 36.7.2 for the associated Set() + method. By default use the connections defined in distgrid. + +
+
[balanceflag]
+
If set to .true, rebalance the incoming distgrid + decompositon. An attempt is made to come out at exactly one DE per + PET. However, if there are more tiles than PETs, the lower PETs will + hold more than one DE. For cases where there are more PETs than + tiles, each tile is decomposed into DEs as to provide the most + balanced decomposition across all dimensions. + The default is .false., leaving the decomposition, and + therefore the number of DEs unchanged. For this case, PETs might end + up with no DE, one DE, or multiple DEs. + +
+
[delayout]
+
If present, override the DELayout of the incoming distgrid. + By default use the DELayout defined in distgrid. + +
+
[vm]
+
If present, the DistGrid object and the DELayout object + are created on the specified ESMF_VM object. The + default is to use the VM of the current context. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+36.6.6 ESMF_DistGridCreate - Create DistGrid object with regular decomposition +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_DistGridCreate()
+   function ESMF_DistGridCreateRD(minIndex, maxIndex, regDecomp, &
+     decompflag, regDecompFirstExtra, regDecompLastExtra, deLabelList, &
+     indexflag, connectionList, delayout, vm, indexTK, rc)
+
RETURN VALUE: +
     type(ESMF_DistGrid) :: ESMF_DistGridCreateRD
+
ARGUMENTS: +
     integer,                        intent(in)            :: minIndex(:)
+     integer,                        intent(in)            :: maxIndex(:)
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,                target, intent(in),  optional :: regDecomp(:)
+     type(ESMF_Decomp_Flag), target, intent(in),  optional :: decompflag(:)
+     integer,                target, intent(in),  optional :: regDecompFirstExtra(:)
+     integer,                target, intent(in),  optional :: regDecompLastExtra(:)
+     integer,                target, intent(in),  optional :: deLabelList(:)
+     type(ESMF_Index_Flag),          intent(in),  optional :: indexflag
+     type(ESMF_DistGridConnection),  intent(in),  optional :: connectionList(:)
+     type(ESMF_DELayout),            intent(in),  optional :: delayout
+     type(ESMF_VM),                  intent(in),  optional :: vm
+     type(ESMF_TypeKind_Flag),       intent(in),  optional :: indexTK
+     integer,                        intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    8.1.0
    +
    Added argument indexTK to support explicit selection + between 32-bit and 64-bit sequence indices. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Create an ESMF_DistGrid from a single logically rectangular tile. + The tile has a regular decomposition, where the tile is decomposed + into a fixed number of DEs along each dimension. A regular decomposition + of a single tile is expressed by a single regDecomp list of DE + counts in each dimension. + +

+The arguments are: +

+
minIndex
+
Index space tuple of the lower corner of the single tile. + +
+
maxIndex
+
Index space tuple of the upper corner of the single tile. + +
+
[regDecomp]
+
List of DE counts for each dimension. The total deCount is + determined as the product of regDecomp elements. + By default regDecomp = (/deCount,1,...,1/), + where deCount + is the number of DEs in the delayout. If the default + delayout is used, the deCount is equal to petCount. + This leads to a simple 1 DE per PET distribution, where the + decompsition is only along the first dimension. + +
+
[decompflag]
+
List of decomposition flags indicating how each dimension of the + tile is to be divided between the DEs. The default setting + is ESMF_DECOMP_BALANCED in all dimensions. See section + 54.14 for a list of valid decomposition options. + +
+
[regDecompFirstExtra]
+
Specify how many extra elements on the first DEs along each + dimension to consider when applying the regular decomposition + algorithm. This does not add extra elements to the + index space defined by minIndex and maxIndex. Instead + regDecompFirstExtra is used to correctly interpret the + specified index space: The regDecomp is first applied to the + index space without the extra elements. The extra elements are + then added back in to arrive at the final decomposition. This is + useful when aligning the decomposition of index spaces that only + differ in extra elements along the edges, e.g. when dealing with + different stagger locations. + The default is a zero vector, assuming no extra elements. + +
+
[regDecompLastExtra]
+
Specify how many extra elements on the last DEs along each + dimension to consider when applying the regular decomposition + algorithm. This does not add extra elements to the + index space defined by minIndex and maxIndex. Instead + regDecompLastExtra is used to correctly interpret the + specified index space: The regDecomp is first applied to the + index space without the extra elements. The extra elements are + then added back in to arrive at the final decomposition. This is + useful when aligning the decomposition of index spaces that only + differ in extra elements along the edges, e.g. when dealing with + different stagger locations. + The default is a zero vector, assuming no extra elements. + +
+
[deLabelList]
+
List assigning DE labels to the default sequence of DEs. The default + sequence is given by the column major order of the regDecomp + argument. + +
+
[indexflag]
+
Indicates whether the indices provided by the minIndex and + maxIndex arguments are forming a global + index space or not. This does not affect the indices held + by the DistGrid object, which are always identical to what was + specified by minIndex and maxIndex, regardless of the + indexflag setting. However, it does affect whether an + ESMF_Array object created on the DistGrid can choose global + indexing or not. The default is ESMF_INDEX_DELOCAL. + See section 54.29 for a complete list of options. + +
+
[connectionList]
+
List of ESMF_DistGridConnection objects, defining connections + between DistGrid tiles in index space. + See section 36.7.2 for the associated Set() + method. + +
+
[delayout]
+
ESMF_DELayout object to be used. If a DELayout object is + specified its deCount must match the number indicated by + regDecomp. By default a new DELayout object will be created + with the correct number of DEs. + +
+
[vm]
+
If present, the DistGrid object (and the DELayout object if not + provided) are created on the specified ESMF_VM object. The + default is to use the VM of the current context. + +
+
[indexTK]
+
Typekind used for global sequence indexing. See section + 54.61 for a list of typekind options. Only integer + types are supported. The default is to have ESMF automatically choose + between ESMF_TYPEKIND_I4 and ESMF_TYPEKIND_I8, + depending on whether the global number of elements held by the + DistGrid is below or above the 32-bit limit, respectively. + Because of the use of signed integers for sequence indices, + element counts of +$> 2^{31}-1 = 2,147,483,647$ will switch to 64-bit + indexing. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+36.6.7 ESMF_DistGridCreate - Create DistGrid object with regular decomposition (multi-tile version) +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_DistGridCreate()
+   function ESMF_DistGridCreateRDT(minIndexPTile, maxIndexPTile, &
+     regDecompPTile, decompflagPTile, regDecompFirstExtraPTile,&
+     regDecompLastExtraPTile, deLabelList, indexflag, connectionList, &
+     delayout, vm, indexTK, rc)
+
RETURN VALUE: +
     type(ESMF_DistGrid) :: ESMF_DistGridCreateRDT
+
ARGUMENTS: +
     integer,                        intent(in)            :: minIndexPTile(:,:)
+     integer,                        intent(in)            :: maxIndexPTile(:,:)
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,                        intent(in),  optional :: regDecompPTile(:,:)
+     type(ESMF_Decomp_Flag), target, intent(in),  optional :: decompflagPTile(:,:)
+     integer,                target, intent(in),  optional :: regDecompFirstExtraPTile(:,:)
+     integer,                target, intent(in),  optional :: regDecompLastExtraPTile(:,:)
+     integer,                        intent(in),  optional :: deLabelList(:)
+     type(ESMF_Index_Flag),          intent(in),  optional :: indexflag
+     type(ESMF_DistGridConnection),  intent(in),  optional :: connectionList(:)
+     type(ESMF_DELayout),            intent(in),  optional :: delayout
+     type(ESMF_VM),                  intent(in),  optional :: vm
+     type(ESMF_TypeKind_Flag),       intent(in),  optional :: indexTK
+     integer,                        intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    8.1.0
    +
    Added argument indexTK to support explicit selection + between 32-bit and 64-bit sequence indices. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Create an ESMF_DistGrid from multiple logically rectangular tiles. + Each tile has a regular decomposition, where the tile is decomposed + into a fixed number of DEs along each dimension. A regular decomposition + of a multi-tile DistGrid is expressed by a list of DE count vectors, one + vector for each tile. If a DELayout is specified, it must contain at least + as many DEs as there are tiles. + +

+The arguments are: +

+
minIndexPTile
+
The first index provides the index space tuple of the lower + corner of a tile. The second index indicates the tile number. + +
+
maxIndexPTile
+
The first index provides the index space tuple of the upper + corner of a tile. The second index indicates the tile number. + +
+
[regDecompPTile]
+
List of DE counts for each dimension. The second index steps through + the tiles. The total deCount is determined as ths sum over + the products of regDecomp elements for each tile. + By default each tile is decomposed only along the first dimension. + The default number of DEs per tile is at least 1, but may be greater + for the leading tiles if the deCount is greater than the + tileCount. If no DELayout is specified, the deCount is + by default set equal to the number of PETs (petCount), or the + number of tiles (tileCount), which ever is greater. This means + that as long as petCount > tileCount, the resulting + default distribution will be 1 DE per PET. Notice that some tiles + may be decomposed into more DEs than other tiles. + +
+
[decompflagPTile]
+
List of decomposition flags indicating how each dimension of each + tile is to be divided between the DEs. The default setting + is ESMF_DECOMP_BALANCED in all dimensions for all tiles. + See section 54.14 for a list of valid decomposition + flag options. The second index indicates the tile number. + +
+
[regDecompFirstExtraPTile]
+
Specify how many extra elements on the first DEs along each + dimension to consider when applying the regular decomposition + algorithm. This does not add extra elements to the + index space defined by minIndex and maxIndex. Instead + regDecompFirstExtraPTile is used to correctly interpret the + specified index space: The regDecomp is first applied to the + index space without the extra elements. The extra elements are + then added back in to arrive at the final decomposition. This is + useful when aligning the decomposition of index spaces that only + differ in extra elements along the edges, e.g. when dealing with + different stagger locations. + The default is a zero vector, assuming no extra elements. + +
+
[regDecompLastExtraPTile]
+
Specify how many extra elements on the last DEs along each + dimension to consider when applying the regular decomposition + algorithm. This does not add extra elements to the + index space defined by minIndex and maxIndex. Instead + regDecompLastExtraPTile is used to correctly interpret the + specified index space: The regDecomp is first applied to the + index space without the extra elements. The extra elements are + then added back in to arrive at the final decomposition. This is + useful when aligning the decomposition of index spaces that only + differ in extra elements along the edges, e.g. when dealing with + different stagger locations. + The default is a zero vector, assuming no extra elements. + +
+
[deLabelList]
+
List assigning DE labels to the default sequence of DEs. The default + sequence is given by the column major order of the regDecompPTile + elements in the sequence as they appear following the tile index. + +
+
[indexflag]
+
Indicates whether the indices provided by the minIndexPTile and + maxIndexPTile arguments are forming a global index space or + not. This does not affect the indices held by the DistGrid + object, which are always identical to what was specified by + minIndexPTile and maxIndexPTile, regardless of the + indexflag setting. However, it does affect whether an + ESMF_Array object created on the DistGrid can choose global + indexing or not. The default is ESMF_INDEX_DELOCAL. + See section 54.29 for a complete list of options. + +
+
[connectionList]
+
List of ESMF_DistGridConnection objects, defining connections + between DistGrid tiles in index space. + See section 36.7.2 for the associated Set() + method. + +
+
[delayout]
+
Optional ESMF_DELayout object to be used. By default a new + DELayout object will be created with as many DEs as there are PETs, + or tiles, which ever is greater. If a DELayout object is specified, + the number of DEs must match regDecompPTile, if present. In the + case that regDecompPTile was not specified, the deCount + must be at least that of the default DELayout. The + regDecompPTile will be constructed accordingly. + +
+
[vm]
+
Optional ESMF_VM object of the current context. Providing the + VM of the current context will lower the method's overhead. + +
+
[indexTK]
+
Typekind used for global sequence indexing. See section + 54.61 for a list of typekind options. Only integer + types are supported. The default is to have ESMF automatically choose + between ESMF_TYPEKIND_I4 and ESMF_TYPEKIND_I8, + depending on whether the global number of elements held by the + DistGrid is below or above the 32-bit limit, respectively. + Because of the use of signed integers for sequence indices, + element counts of +$> 2^{31}-1 = 2,147,483,647$ will switch to 64-bit + indexing. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+36.6.8 ESMF_DistGridCreate - Create DistGrid object with DE blocks +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_DistGridCreate()
+   function ESMF_DistGridCreateDB(minIndex, maxIndex, deBlockList, &
+     deLabelList, indexflag, connectionList, delayout, vm, &
+     indexTK, rc)
+
RETURN VALUE: +
     type(ESMF_DistGrid) :: ESMF_DistGridCreateDB
+
ARGUMENTS: +
     integer,                       intent(in)            :: minIndex(:)
+     integer,                       intent(in)            :: maxIndex(:)
+     integer,                       intent(in)            :: deBlockList(:,:,:)
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,                       intent(in),  optional :: deLabelList(:)
+     type(ESMF_Index_Flag),         intent(in),  optional :: indexflag
+     type(ESMF_DistGridConnection), intent(in),  optional :: connectionList(:)
+     type(ESMF_DELayout),           intent(in),  optional :: delayout
+     type(ESMF_VM),                 intent(in),  optional :: vm
+     type(ESMF_TypeKind_Flag),      intent(in),  optional :: indexTK
+     integer,                       intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    7.1.0r
    +
    Added argument indexTK to support selecting between + 32-bit and 64-bit sequence indices. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Create an ESMF_DistGrid from a single logically rectangular + tile with decomposition specified by deBlockList. + +

+The arguments are: +

+
minIndex
+
Index space tuple of the lower corner of the single tile. + +
+
maxIndex
+
Index space tuple of the upper corner of the single tile. + +
+
deBlockList
+
List of DE-local blocks. The third index of deBlockList + steps through the deBlock elements (i.e. deCount), which are defined + by the first two indices. + The first index must be of size dimCount and the + second index must be of size 2. Each element of deBlockList + defined by the first two indices hold the following information. +
+                     +---------------------------------------> 2nd index
+                     |    1               2           
+                     | 1  minIndex(1)    maxIndex(1)
+                     | 2  minIndex(2)    maxIndex(2)
+                     | .  minIndex(.)    maxIndex(.)
+                     | .
+                     v
+                    1st index
+
+ It is required that there be no overlap between the DE blocks. + +
+
[deLabelList]
+
List assigning DE labels to the default sequence of DEs. The default + sequence is given by the order of DEs in the deBlockList + argument. + +
+
[indexflag]
+
Indicates whether the indices provided by the minIndex and + maxIndex arguments are forming a global + index space or not. This does not affect the indices held + by the DistGrid object, which are always identical to what was + specified by minIndex and maxIndex, regardless of the + indexflag setting. However, it does affect whether an + ESMF_Array object created on the DistGrid can choose global + indexing or not. The default is ESMF_INDEX_DELOCAL. + See section 54.29 for a complete list of options. + +
+
[connectionList]
+
List of ESMF_DistGridConnection objects, defining connections + between DistGrid tiles in index space. + See section 36.7.2 for the associated Set() + method. + +
+
[delayout]
+
Optional ESMF_DELayout object to be used. By default a new + DELayout object will be created with the correct number of DEs. If + a DELayout object is specified its number of DEs must match the + number indicated by regDecomp. + +
+
[vm]
+
Optional ESMF_VM object of the current context. Providing the + VM of the current context will lower the method's overhead. + +
+
[indexTK]
+
Typekind used for global sequence indexing. See section + 54.61 for a list of typekind options. Only integer + types are supported. The default is to have ESMF automatically choose + between ESMF_TYPEKIND_I4 and ESMF_TYPEKIND_I8, + depending on whether the global number of elements held by the + DistGrid is below or above the 32-bit limit, respectively. + Because of the use of signed integers for sequence indices, + element counts of +$> 2^{31}-1 = 2,147,483,647$ will switch to 64-bit + indexing. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+36.6.9 ESMF_DistGridCreate - Create DistGrid object with DE blocks (multi-tile version) +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_DistGridCreate()
+   function ESMF_DistGridCreateDBT(minIndexPTile, maxIndexPTile, deBlockList, &
+     deToTileMap, deLabelList, indexflag, connectionList, &
+     delayout, vm, indexTK, rc)
+
RETURN VALUE: +
     type(ESMF_DistGrid) :: ESMF_DistGridCreateDBT
+
ARGUMENTS: +
     integer,                       intent(in)            :: minIndexPTile(:,:)
+     integer,                       intent(in)            :: maxIndexPTile(:,:)
+     integer,                       intent(in)            :: deBlockList(:,:,:)
+     integer,                       intent(in)            :: deToTileMap(:)
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,                       intent(in),  optional :: deLabelList(:)
+     type(ESMF_Index_Flag),         intent(in),  optional :: indexflag
+     type(ESMF_DistGridConnection), intent(in),  optional :: connectionList(:)
+     type(ESMF_DELayout),           intent(in),  optional :: delayout
+     type(ESMF_VM),                 intent(in),  optional :: vm
+     type(ESMF_TypeKind_Flag),      intent(in),  optional :: indexTK
+     integer,                       intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Create an ESMF_DistGrid on multiple logically + rectangular tiles with decomposition specified by deBlockList. + +

+The arguments are: +

+
minIndexPTile
+
The first index provides the index space tuple of the lower + corner of a tile. The second index indicates the tile number. + +
+
maxIndexPTile
+
The first index provides the index space tuple of the upper + corner of a tile. The second index indicates the tile number. + +
+
deBlockList
+
List of DE-local blocks. The third index of deBlockList + steps through the deBlock elements (i.e. deCount), which are defined + by the first two indices. + The first index must be of size dimCount and the + second index must be of size 2. Each element of deBlockList + defined by the first two indices hold the following information. +
+                     +---------------------------------------> 2nd index
+                     |    1               2           
+                     | 1  minIndex(1)    maxIndex(1)
+                     | 2  minIndex(2)    maxIndex(2)
+                     | .  minIndex(.)    maxIndex(.)
+                     | .
+                     v
+                    1st index
+
+ It is required that there be no overlap between the DE blocks. + +
+
deToTileMap
+
List assigning each DE to a specific tile. The size of + deToTileMap must be equal to deCount. + The order of DEs is the same as in deBlockList. + +
+
[deLabelList]
+
List assigning DE labels to the default sequence of DEs. The default + sequence is given by the order of DEs in the deBlockList + argument. + +
+
[indexflag]
+
Indicates whether the indices provided by the minIndexPTile and + maxIndexPTile arguments are forming a global index space or + not. This does not affect the indices held by the DistGrid + object, which are always identical to what was specified by + minIndexPTile and maxIndexPTile, regardless of the + indexflag setting. However, it does affect whether an + ESMF_Array object created on the DistGrid can choose global + indexing or not. The default is ESMF_INDEX_DELOCAL. + See section 54.29 for a complete list of options. + +
+
[connectionList]
+
List of ESMF_DistGridConnection objects, defining connections + between DistGrid tiles in index space. + See section 36.7.2 for the associated Set() + method. + +
+
[delayout]
+
Optional ESMF_DELayout object to be used. By default a new + DELayout object will be created with the correct number of DEs. If + a DELayout object is specified its number of DEs must match the + number indicated by regDecomp. + +
+
[vm]
+
Optional ESMF_VM object of the current context. Providing the + VM of the current context will lower the method's overhead. + +
+
[indexTK]
+
Typekind used for global sequence indexing. See section + 54.61 for a list of typekind options. Only integer + types are supported. The default is to have ESMF automatically choose + between ESMF_TYPEKIND_I4 and ESMF_TYPEKIND_I8, + depending on whether the global number of elements held by the + DistGrid is below or above the 32-bit limit, respectively. + Because of the use of signed integers for sequence indices, + element counts of +$> 2^{31}-1 = 2,147,483,647$ will switch to 64-bit + indexing. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+36.6.10 ESMF_DistGridCreate - Create 1D DistGrid object from user's arbitrary sequence index list 1 DE per PET +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_DistGridCreate()
+   function ESMF_DistGridCreateDBAI1D1DE(arbSeqIndexList, rc)
+
RETURN VALUE: +
     type(ESMF_DistGrid) :: ESMF_DistGridCreateDBAI1D1DE
+
ARGUMENTS: +
     integer, intent(in)            :: arbSeqIndexList(:)
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer, intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Create an ESMF_DistGrid of dimCount 1 from a PET-local list + of sequence indices. The PET-local size of the arbSeqIndexList + argument determines the number of local elements in the created DistGrid. + The sequence indices must be unique across all PETs. A default + DELayout with 1 DE per PET across all PETs of the current VM is + automatically created. + +

+This is a collective method across the current VM. + +

+The arguments are: +

+
arbSeqIndexList
+
List of arbitrary sequence indices that reside on the local PET. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+36.6.11 ESMF_DistGridCreate - Create 1D DistGrid object from user's arbitrary 64-bit sequence index list 1 DE per PET +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_DistGridCreate()
+   function ESMF_DistGridCreateDBAI1D1DEI8(arbSeqIndexList, rc)
+
RETURN VALUE: +
     type(ESMF_DistGrid) :: ESMF_DistGridCreateDBAI1D1DEI8
+
ARGUMENTS: +
     integer(ESMF_KIND_I8),  intent(in)            :: arbSeqIndexList(:)
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,                intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Create an ESMF_DistGrid of dimCount 1 from a PET-local list + of sequence indices. The PET-local size of the arbSeqIndexList + argument determines the number of local elements in the created DistGrid. + The sequence indices must be unique across all PETs. A default + DELayout with 1 DE per PET across all PETs of the current VM is + automatically created. + +

+This is a collective method across the current VM. + +

+The arguments are: +

+
arbSeqIndexList
+
List of arbitrary sequence indices that reside on the local PET. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+36.6.12 ESMF_DistGridCreate - Create 1D DistGrid object from user's arbitrary sequence index list multiple DE/PET +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_DistGridCreate()
+   function ESMF_DistGridCreateDBAI1D(arbSeqIndexList, rc)
+
RETURN VALUE: +
     type(ESMF_DistGrid) :: ESMF_DistGridCreateDBAI1D
+
ARGUMENTS: +
     type(ESMF_PtrInt1D), intent(in) :: arbSeqIndexList(:)
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer, intent(out), optional  :: rc
+
+DESCRIPTION: +
+ +

+Create an ESMF_DistGrid of dimCount 1 from a PET-local list + of sequence index lists. The PET-local size of the arbSeqIndexList + argument determines the number of local DEs in the created DistGrid. + Each of the local DEs is associated with as many index space elements as + there are arbitrary sequence indices in the associated list. + The sequence indices must be unique across all DEs. A default + DELayout with the correct number of DEs per PET is automatically created. + +

+This is a collective method across the current VM. + +

+The arguments are: +

+
arbSeqIndexList
+
List of arbitrary sequence index lists that reside on the local PET. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+36.6.13 ESMF_DistGridCreate - Create (1+n)D DistGrid object from user's arbitrary sequence index list and minIndexPTile/maxIndexPTile +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_DistGridCreate()
+   function ESMF_DistGridCreateDBAI(arbSeqIndexList, arbDim, &
+     minIndexPTile, maxIndexPTile, rc)
+
RETURN VALUE: +
     type(ESMF_DistGrid) :: ESMF_DistGridCreateDBAI
+
ARGUMENTS: +
     integer, intent(in)            :: arbSeqIndexList(:)
+     integer, intent(in)            :: arbDim
+     integer, intent(in)            :: minIndexPTile(:)
+     integer, intent(in)            :: maxIndexPTile(:)
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer, intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Create an ESMF_DistGrid of dimCount $1+n$, where + $n=$ size(minIndexPTile) = size(maxIndexPTile). + +

+The resulting DistGrid will have a 1D distribution determined by the + PET-local arbSeqIndexList. The PET-local size of the + arbSeqIndexList argument determines the number of local elements + along the arbitrarily distributed dimension in the created DistGrid. The + sequence indices must be unique across all PETs. The associated, + automatically created DELayout will have 1 DE per PET across all PETs of + the current VM. + +

+In addition to the arbitrarily distributed dimension, regular DistGrid + dimensions can be specified in minIndexPTile and maxIndexPTile. The + $n$ dimensional subspace spanned by the regular dimensions is "multiplied" + with the arbitrary dimension on each DE, to form a $1+n$ dimensional + total index space described by the DistGrid object. The arbDim + argument allows to specify which dimension in the resulting DistGrid + corresponds to the arbitrarily distributed one. + +

+This is a collective method across the current VM. + +

+The arguments are: +

+
arbSeqIndexList
+
List of arbitrary sequence indices that reside on the local PET. + +
+
arbDim
+
Dimension of the arbitrary distribution. + +
+
minIndexPTile
+
Index space tuple of the lower corner of the tile. The + arbitrary dimension is not included in this tile + +
+
maxIndexPTile
+
Index space tuple of the upper corner of the tile. The + arbitrary dimension is not included in this tile + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+36.6.14 ESMF_DistGridDestroy - Release resources associated with a DistGrid +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_DistGridDestroy(distgrid, noGarbage, rc)
+
ARGUMENTS: +
     type(ESMF_DistGrid), intent(inout)          :: distgrid
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     logical,             intent(in),   optional :: noGarbage
+     integer,             intent(out),  optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    7.0.0
    +
    Added argument noGarbage. + The argument provides a mechanism to override the default garbage collection + mechanism when destroying an ESMF object. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Destroys an ESMF_DistGrid, releasing the resources associated + with the object. + +

+By default a small remnant of the object is kept in memory in order to + prevent problems with dangling aliases. The default garbage collection + mechanism can be overridden with the noGarbage argument. + +

+The arguments are: +

+
distgrid
+
ESMF_DistGrid object to be destroyed. + +
+
[noGarbage]
+
If set to .TRUE. the object will be fully destroyed and removed + from the ESMF garbage collection system. Note however that under this + condition ESMF cannot protect against accessing the destroyed object + through dangling aliases - a situation which may lead to hard to debug + application crashes. + +

+It is generally recommended to leave the noGarbage argument + set to .FALSE. (the default), and to take advantage of the ESMF + garbage collection system which will prevent problems with dangling + aliases or incorrect sequences of destroy calls. However this level of + support requires that a small remnant of the object is kept in memory + past the destroy call. This can lead to an unexpected increase in memory + consumption over the course of execution in applications that use + temporary ESMF objects. For situations where the repeated creation and + destruction of temporary objects leads to memory issues, it is + recommended to call with noGarbage set to .TRUE., fully + removing the entire temporary object from memory. + +

+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+36.6.15 ESMF_DistGridGet - Get object-wide DistGrid information +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_DistGridGet()
+   subroutine ESMF_DistGridGetDefault(distgrid, delayout, &
+     dimCount, tileCount, deCount, localDeCount, minIndexPTile, maxIndexPTile, &
+     elementCountPTile, elementCountPTileI8, minIndexPDe, maxIndexPDe, &
+     elementCountPDe, elementCountPDeI8, localDeToDeMap, deToTileMap, &
+     indexCountPDe, collocation, regDecompFlag, indexTK, indexflag, &
+     connectionCount, connectionList, rc)
+
ARGUMENTS: +
     type(ESMF_DistGrid),      intent(in)            :: distgrid
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     type(ESMF_DELayout),      intent(out), optional :: delayout
+     integer,                  intent(out), optional :: dimCount
+     integer,                  intent(out), optional :: tileCount
+     integer,                  intent(out), optional :: deCount
+     integer,                  intent(out), optional :: localDeCount
+     integer,          target, intent(out), optional :: minIndexPTile(:,:)
+     integer,          target, intent(out), optional :: maxIndexPTile(:,:)
+     integer,          target, intent(out), optional :: elementCountPTile(:)
+ integer(ESMF_KIND_I8),target, intent(out), optional :: elementCountPTileI8(:)
+     integer,          target, intent(out), optional :: minIndexPDe(:,:)
+     integer,          target, intent(out), optional :: maxIndexPDe(:,:)
+     integer,          target, intent(out), optional :: elementCountPDe(:)
+ integer(ESMF_KIND_I8),target, intent(out), optional :: elementCountPDeI8(:)
+     integer,          target, intent(out), optional :: localDeToDeMap(:)
+     integer,          target, intent(out), optional :: deToTileMap(:)
+     integer,          target, intent(out), optional :: indexCountPDe(:,:)
+     integer,          target, intent(out), optional :: collocation(:)
+     logical,                  intent(out), optional :: regDecompFlag
+     type(ESMF_TypeKind_Flag), intent(out), optional :: indexTK
+     type(ESMF_Index_Flag),    intent(out), optional :: indexflag
+     integer,                  intent(out), optional :: connectionCount
+     type(ESMF_DistGridConnection), &
+                       target, intent(out), optional :: connectionList(:)
+     integer,                  intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    7.0.0
    +
    Added argument deCount to simplify access to this + variable.
    +Added arguments connectionCount and connectionList + to provide user access to the explicitly defined connections in + a DistGrid. + +
    +
    8.0.0
    +
    Added arguments localDeCount and localDeToDeMap + to simplify access to these variables. + +
    +
    8.1.0
    +
    Added argument indexTK to allow query of the sequence index + typekind. +
    +Added arguments elementCountPTileI8 and + elementCountPDeI8 to provide 64-bit access. +
    +Added argument indexflag to allow user to query this + setting. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Access internal DistGrid information. + +

+The arguments are: +

+
distgrid
+
Queried ESMF_DistGrid object. + +
+
[delayout]
+
ESMF_DELayout object associated with distgrid. + +
+
[dimCount]
+
Number of dimensions (rank) of distgrid. + +
+
[tileCount]
+
Number of tiles in distgrid. + +
+
[deCount]
+
Number of DEs in the DELayout in distgrid. + +
+
[localDeCount]
+
Number of local DEs in the DELayout in distgrid on this PET. + +
+
[minIndexPTile]
+
Lower index space corner per tile. Must enter + allocated with shape(minIndexPTile) == (/dimCount, tileCount/). + +
+
[maxIndexPTile]
+
Upper index space corner per tile. Must enter + allocated with shape(maxIndexPTile) == (/dimCount, tileCount/). + +
+
[elementCountPTile]
+
Number of elements in the exclusive region per tile. Must enter + allocated with shape(elementCountPTile) == (/tileCount/). + An error will be returned if any of the counts goes above the 32-bit + limit. + +
+
[elementCountPTileI8]
+
Same as elementCountPTile, but of 64-bit integer kind. + +
+
[minIndexPDe]
+
Lower index space corner per DE. Must enter + allocated with shape(minIndexPDe) == (/dimCount, deCount/). + +
+
[maxIndexPDe]
+
Upper index space corner per DE. Must enter + allocated with shape(maxIndexPDe) == (/dimCount, deCount/). + +
+
[elementCountPDe]
+
Number of elements in the exclusive region per DE. Must enter + allocated with shape(elementCountPDe) == (/deCount/). + An error will be returned if any of the counts goes above the 32-bit + limit. + +
+
[elementCountPDeI8]
+
Same as elementCountPDe, but of 64-bit integer kind. + +
+
[localDeToDeMap]
+
Global DE index for each local DE. Must enter allocated with + shape(localDeToDeMap) == (/localDeCount/). It is recommended to + use a lower bound of 0 for localDeToDeMap, in order to support + direct indexing into this map with a zero-based localDe variable. + +
+
[deToTileMap]
+
Map each DE uniquely to a tile. Must enter allocated with + shape(deToTileMap) == (/deCount/). It is recommended to + use a lower bound of 0 for deToTileMap, in order to support + direct indexing into this map with a zero-based de variable. + +
+
[indexCountPDe]
+
Number of indices for each dimension per DE. Must enter + allocated with shape(indexCountPDe) == (/dimCount, deCount/). + +
+
[collocation]
+
Collocation identifier for each dimension. Must enter + allocated with shape(collocation) == (/dimCount/). + +
+
[regDecompFlag]
+
Decomposition scheme. A return value of .true. indicates + a regular decomposition, i.e. the decomposition is based on a + logically rectangular scheme with specific number of DEs along + each dimension. A return value of .false. indicates that the + decomposition was not generated from a regular decomposition + description, e.g. a deBlockList was used instead. + +
+
[indexTK]
+
Typekind used by the global sequence indexing. See section + 54.61 for a list of typekind options. Only the integer + types are supported for sequence indices. + +
+
[indexflag]
+
Return the indexing option used by the distgrid object. See section + 54.29 for a complete list of options. + +
+
[connectionCount]
+
Number of explicitly defined connections in distgrid. + +
+
[connectionList]
+
List of explicitly defined connections in distgrid. Must enter + allocated with shape(connectionList) == (/connectionCount/). + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+36.6.16 ESMF_DistGridGet - Get DE-local DistGrid information +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_DistGridGet()
+   subroutine ESMF_DistGridGetPLocalDe(distgrid, localDe, &
+     de, tile, collocation, arbSeqIndexFlag, seqIndexList, seqIndexListI8, &
+     elementCount, elementCountI8, rc)
+
ARGUMENTS: +
     type(ESMF_DistGrid),      intent(in)            :: distgrid
+     integer,                  intent(in)            :: localDe
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,                  intent(out), optional :: de
+     integer,                  intent(out), optional :: tile
+     integer,                  intent(in),  optional :: collocation
+     logical,                  intent(out), optional :: arbSeqIndexFlag
+     integer,          target, intent(out), optional :: seqIndexList(:)
+ integer(ESMF_KIND_I8),target, intent(out), optional :: seqIndexListI8(:)
+     integer,                  intent(out), optional :: elementCount
+     integer,                  intent(out), optional :: elementCountI8
+     integer,                  intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    8.0.0
    +
    Added arguments de and tile to simplify usage. + +
    +
    8.1.0
    +
    Added arguments seqIndexListI8 and elementCountI8 + to provide 64-bit access. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Access internal DistGrid information. + +

+The arguments are: +

+
distgrid
+
Queried ESMF_DistGrid object. + +
+
localDe
+
Local DE for which information is requested. [0,..,localDeCount-1] + +
+
[de]
+
The global DE associated with the localDe. DE indexing starts at 0. + +
+
[tile]
+
The tile on which the localDe is located. Tile indexing starts at 1. + +
+
[collocation]
+
Collocation for which information is requested. Default to first + collocation in collocation list. + +
+
[arbSeqIndexFlag]
+
A returned value of .true. indicates that the collocation + is associated with arbitrary sequence indices. For .false., + canoncial sequence indices are used. + +
+
[seqIndexList]
+
The sequence indices associated with the localDe. This argument must + enter allocated with a size equal to + elementCountPDe(localDeToDeMap(localDe)). + An error will be returned if any of the sequence indices are above the + 32-bit limit. + +
+
[seqIndexListI8]
+
Same as seqIndexList, but of 64-bit integer kind. + +
+
[elementCount]
+
Number of elements in the localDe, i.e. identical to + elementCountPDe(localDeToDeMap(localDe)). + An error will be returned if the count is above the 32-bit limit. + +
+
[elementCountI8]
+
Same as elementCount, but of 64-bit integer kind. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+36.6.17 ESMF_DistGridGet - Get DE-local DistGrid information for a specific dimension +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_DistGridGet()
+   subroutine ESMF_DistGridGetPLocalDePDim(distgrid, localDe, dim, &
+            indexList, rc)
+
ARGUMENTS: +
     type(ESMF_DistGrid),    intent(in)            :: distgrid
+     integer,                intent(in)            :: localDe
+     integer,                intent(in)            :: dim
+     integer,        target, intent(out)           :: indexList(:)
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,                intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Access internal DistGrid information. + +

+The arguments are: +

+
distgrid
+
Queried ESMF_DistGrid object. + +
+
localDe
+
Local DE for which information is requested. [0,..,localDeCount-1] + +
+
dim
+
Dimension for which information is requested. [1,..,dimCount] + +
+
indexList
+
Upon return this holds the list of DistGrid tile-local indices + for localDe along dimension dim. The supplied variable + must be at least of size indexCountPDe(dim, localDeToDeMap(localDe)). + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+36.6.18 ESMF_DistGridIsCreated - Check whether a DistGrid object has been created +

+ +

+ +

+
+INTERFACE: +

   function ESMF_DistGridIsCreated(distgrid, rc)
+
RETURN VALUE: +
     logical :: ESMF_DistGridIsCreated
+
ARGUMENTS: +
     type(ESMF_DistGrid), intent(in)            :: distgrid
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,             intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Return .true. if the distgrid has been created. Otherwise return + .false.. If an error occurs, i.e. rc /= ESMF_SUCCESS is + returned, the return value of the function will also be .false.. + +

+The arguments are: +

+
distgrid
+
ESMF_DistGrid queried. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+36.6.19 ESMF_DistGridLog - Log DistGrid information +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_DistGridLog(distgrid, prefix, logMsgFlag, deepFlag, rc)
+
ARGUMENTS: +
     type(ESMF_DistGrid),    intent(in)              :: distgrid
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     character(len=*),       intent(in),   optional  :: prefix
+     type(ESMF_LogMsg_Flag), intent(in),   optional  :: logMsgFlag
+     logical,                intent(in),   optional  :: deepFlag
+     integer, intent(out),                 optional  :: rc
+
+DESCRIPTION: +
+ +

+Write information about DistGrid to the ESMF default Log. + +

+The arguments are: +

+
distgrid
+
ESMF_DistGrid object logged. + +
+
[prefix]
+
String to prefix the log message. Default is no prefix. + +
+
[logMsgFlag]
+
Type of log message generated. See section 49.2.3 for + a list of valid message types. Default is ESMF_LOGMSG_INFO. + +
+
[deepFlag]
+
When set to .false. (default), only log top level information about + the DistGrid. + When set to .true., additionally log deep information. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+36.6.20 ESMF_DistGridMatch - Check if two DistGrid objects match +

+ +

+ +

+
+INTERFACE: +

   function ESMF_DistGridMatch(distgrid1, distgrid2, rc)
+
RETURN VALUE: +
     type(ESMF_DistGridMatch_Flag) :: ESMF_DistGridMatch
+
ARGUMENTS: +
     type(ESMF_DistGrid),  intent(in)            :: distgrid1
+     type(ESMF_DistGrid),  intent(in)            :: distgrid2
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,              intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Determine to which level distgrid1 and distgrid2 match. + +

+Returns a range of values of type ESMF_DistGridMatch_Flag, + indicating how closely the DistGrids match. For a description of the + possible return values, see 36.2.1. + Note that this call only performs PET local matching. Different return values + may be returned on different PETs for the same DistGrid pair. + +

+The arguments are: +

+
distgrid1
+
ESMF_DistGrid object. + +
+
distgrid2
+
ESMF_DistGrid object. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+36.6.21 ESMF_DistGridPrint - Print DistGrid information +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_DistGridPrint(distgrid, rc)
+
ARGUMENTS: +
     type(ESMF_DistGrid),  intent(in)            :: distgrid
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,              intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Prints internal information about the specified ESMF_DistGrid + object to stdout. +
+

+The arguments are: +

+
distgrid
+
Specified ESMF_DistGrid object. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+36.6.22 ESMF_DistGridSet - Set arbitrary sequence for a specific local DE +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_DistGridSet()
+   subroutine ESMF_DistGridSetPLocalDe(distgrid, localDe, collocation, &
+     seqIndexList, seqIndexListI8, rc)
+
ARGUMENTS: +
     type(ESMF_DistGrid),      intent(inout)         :: distgrid
+     integer,                  intent(in)            :: localDe
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,                  intent(in),  optional :: collocation
+     integer,          target, intent(in),  optional :: seqIndexList(:)
+ integer(ESMF_KIND_I8),target, intent(in),  optional :: seqIndexListI8(:)
+     integer,                  intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Set DistGrid information for a specific local DE. + +

+The arguments are: +

+
distgrid
+
Queried ESMF_DistGrid object. + +
+
localDe
+
Local DE for which information is set. [0,..,localDeCount-1] + +
+
[collocation]
+
Collocation for which information is set. Default to first + collocation in collocation list. + +
+
[seqIndexList]
+
Sequence indices for the elements on localDe. The seqIndexList + must provide exactly elementCountPDe(localDeToDeMap(localDe) many + entries. When this argument is present, the indexTK of + distgrid will be set to ESMF_TYPEKIND_I4. + This argument is mutually exclusive with seqIndexListI8. Only one + or the other must be provided. An error will be returned otherwise. + +
+
[seqIndexListI8]
+
Same as seqIndexList, but of 64-bit integer kind. + When this argument is present, the indexTK of + distgrid will be set to ESMF_TYPEKIND_I8. + This argument is mutually exclusive with seqIndexList. Only one + or the other must be provided. An error will be returned otherwise. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+36.6.23 ESMF_DistGridValidate - Validate DistGrid internals +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_DistGridValidate(distgrid, rc)
+
ARGUMENTS: +
     type(ESMF_DistGrid),  intent(in)            :: distgrid
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,              intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Validates that the distgrid is internally consistent. + The method returns an error code if problems are found. + +

+The arguments are: +

+
distgrid
+
Specified ESMF_DistGrid object. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ + +

+ +
+36.7 Class API: DistGridConnection Methods +

+ +

+ +

+ +

+ +

+36.7.1 ESMF_DistGridConnectionGet - Get DistGridConnection +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_DistGridConnectionGet(connection, &
+     tileIndexA, tileIndexB, dimCount, positionVector, orientationVector, rc)
+
ARGUMENTS: +
     type(ESMF_DistGridConnection), intent(in)            :: connection
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,                       intent(out), optional :: tileIndexA
+     integer,                       intent(out), optional :: tileIndexB
+     integer,                       intent(out), optional :: dimCount
+     integer,                       intent(out), optional :: positionVector(:)
+     integer,                       intent(out), optional :: orientationVector(:)
+     integer,                       intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+ Get connection parameters from an ESMF_DistGridConnection object. + This interface provides access to all variables required to create a new + connection using the ESMF_DistGridConnectionSet() method. + +

+The arguments are: +

+
connection
+
DistGridConnection object. + +
+
[tileIndexA]
+
Index of one of the two connected tiles. + +
+
[tileIndexB]
+
Index of the other connected tile. + +
+
[dimCount]
+
Number of dimensions of positionVector. + +
+
[positionVector]
+
Position of tile B's minIndex with respect to tile A's minIndex. + This array's size should be at least equal to dimCount. + +
+
[orientationVector]
+
Lists which dimension of tile A is associated to which dimension of + tile B. Negative index values may be used to indicate a reversal + in index orientation. Should be at least of size dimCount. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+36.7.2 ESMF_DistGridConnectionSet - Set DistGridConnection +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_DistGridConnectionSet(connection, tileIndexA, tileIndexB, &
+     positionVector, orientationVector, rc)
+
ARGUMENTS: +
     type(ESMF_DistGridConnection),intent(out)         :: connection
+     integer,                     intent(in)           :: tileIndexA
+     integer,                     intent(in)           :: tileIndexB
+     integer,                     intent(in)           :: positionVector(:)
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,                     intent(in), optional :: orientationVector(:)
+     integer,                     intent(out), optional:: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+ Set an ESMF_DistGridConnection object to represent a connection + according to the provided index space information. + +

+The arguments are: +

+
connection
+
DistGridConnection object. + +
+
tileIndexA
+
Index of one of the two tiles that are to be connected. + +
+
tileIndexB
+
Index of one of the two tiles that are to be connected. + +
+
positionVector
+
Position of tile B's minIndex with respect to tile A's minIndex. + +
+
[orientationVector]
+
Associates each dimension of tile A with a dimension in tile B's + index space. Negative index values may be used to indicate a + reversal in index orientation. It is erroneous to associate multiple + dimensions of tile A with the same index in tile B. By default + orientationVector = (/1,2,3,.../), i.e. same orientation as tile A. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ + +

+ +
+36.8 Class API: DistGridRegDecomp Methods +

+ +

+ +

+ +

+ +

+36.8.1 ESMF_DistGridRegDecompSetCubic - Construct a DistGrid regDecomp +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_DistGridRegDecompSetCubic(regDecomp, deCount, rc)
+
ARGUMENTS: +
     integer,        target, intent(out)           :: regDecomp(:)
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,                intent(in),  optional :: deCount
+     integer,                intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Construct a regular decomposition argument for DistGrid that is most cubic + in dimCount dimensions, and multiplies out to deCount DEs. The + factorization is stable monotonic decreasing, ensuring that earlier entries + in regDecomp are larger or equal to the later entires. + +

+The arguments are: +

+
regDecomp
+
The regular decomposition description being constructed. + +
+
[deCount]
+
The number of DEs. Defaults to petCount. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ + +

+37 RouteHandle Class +

+ +

+37.1 Description +

+ +

+ +

+The ESMF RouteHandle class provides a unified interface for all route-based communication methods across the Field, FieldBundle, Array, and ArrayBundle classes. All route-based communication methods implement a pre-computation step, returning a RouteHandle, an execution step, and a release step. Typically the pre-computation, or Store() step will be a lot more expensive (both in memory and time) than the execution step. The idea is that once precomputed, a RouteHandle will be executed many times over during a model run, making the execution time a very performance critical piece of code. In ESMF, Regridding, Redisting, and Haloing are implemented as route-based communication methods. The following sections discuss the RouteHandle concepts that apply uniformly to all route-based communication methods, across all of the above mentioned classes. + +

+ +

+37.2 Use and Examples +

+ +

+The user interacts with the RouteHandle class through the route-based communication methods of Field, FieldBundle, Array, and ArrayBundle. The usage of these methods are described in detail under their respective class documentation section. The following examples focus on the RouteHandle aspects common across classes and methods. + +

+ +

+ +

+ +

+ +
+37.2.1 Bit-for-bit reproducibility +

+ +

+Bit-for-bit (bfb) reproducibility is at the core of the regression testing + schemes of many scientific model codes. The bfb requirement makes it possible + to easily compare the numerical results of simulation runs using standard + binary diff tools. + +

+While bfb reproducibility is desirable (and often required) for regression + testing, it does limit the available performance optimization + opportunities. Especially in highly parallelized code, best performance is + often achieved by allowing operations to occur in a flexible order. Under + some conditions, however, a change in the order of numerical operations + leads to small numerical differences in the results, breaking bfb + reproducibility. + +

+ESMF provides the following three levels of bfb reproducibility + support, with the associated performance optimization implications: + +

+ +

    +
  • Strict bit-for-bit reproducibility: Results are guaranteed to be + bit-for-bit identical even when executing across different numbers of PETs. + The optimization options are limited to memory layout and message aggregation. + +

    +

  • +
  • Relaxed bit-for-bit reproducibility: Results are only guaranteed to be + bit-for-bit identical when running across an unchanged number of PETs. The + optimization options include partial sums, allowing computational load to + be balanced between source and destination PETs, and message sizes to be + reduced. + +

    +

  • +
  • No guarantee for bit-for-bit reproducibility: Results may differ by + numerical round-off. The optimization options include dynamic out-of-order + summation of partial sums. + +

    +

  • +
+ +

+The following discussion uses very simple numerical examples to demonstrate + how the order of terms in a sum can lead to results that are not + bit-for-bit identical. The examples use single precision, + ESMF_KIND_R4 numbers, but the concepts apply the same + to double precision, ESMF_KIND_R8; only that the decimals, for + which bfb differences in the sums occur, are different ones. + +

+With sumA, sumB, sumC, sumD, and sumE all of + type real(ESMF_KIND_R4), one finds the following bfb differences: +

+

+  sumA = (0.5 + 0.1) + 0.1        ! results in 0.700000048
+  sumB = 0.5 + (0.1 + 0.1)        ! results in 0.699999988
+  
+  sumC = 0.5 +  0.2 + 0.1  + 0.1  ! results in 0.900000036
+  sumD = 0.5 + (0.2 + 0.1) + 0.1  ! results in 0.900000036
+  sumE = 0.5 + (0.2 + 0.1 + 0.1)  ! results in 0.899999976
+
+ +

+These differences result from the fact that many decimals (even very simple + ones like 0.1 or 0.2) lead to periodic binary floating point numbers. + Periodic floating point numbers must be truncated when represented by a + finite number of bits, leading to small rounding errors. Further truncation + occurs when the radix point of two numbers must be aligned during + floating point arithmetic, resulting in bit shifts for one of the + numbers. The resulting truncation error depends on the precise numbers that + need alignment. As a result, executing the "same" sum in a different order + can lead to different truncation steps and consequently in results that are + not bit-for-bit identical. + +

+In order to help users with the implementation of their bfb requirement, + ESMF provides different levels of control over the term order in sparse + matrix multiplications, while at the same time offering performance + optimization options. In all there are three arguments that will be + introduced in the following paragraphs: srcTermProcessing, + termorderflag, and pipelineDepth. + +

+For the purpose of demonstration, a one-dimensional, arbitrarily distributed + source Array is constructed. There are three Array elements on each of the + four PETs. Their local storage indices, sequence indices, and data values + are as follows: + +

+

+  
+           +-----+-------+----------------+------------+
+           | PET | index | sequence index | data value |
+           +-----+-------+----------------+------------+
+           |  0  |   1   |          1     |     0.5    |
+           |  0  |   2   |          6     |     0.1    |
+           |  0  |   3   |          9     |     0.1    |
+           +-----+-------+----------------+------------+
+           |  1  |   1   |          4     |     0.5    |
+           |  1  |   2   |          3     |     0.1    |
+           |  1  |   3   |         10     |     0.1    |
+           +-----+-------+----------------+------------+
+           |  2  |   1   |         11     |     0.5    |
+           |  2  |   2   |          7     |     0.1    |
+           |  2  |   3   |          5     |     0.1    |
+           +-----+-------+----------------+------------+
+           |  3  |   1   |          8     |     0.1    |
+           |  3  |   2   |          2     |     0.2    |
+           |  3  |   3   |         12     |     0.1    |
+           +-----+-------+----------------+------------+
+
+ +

+The destination Array consists of only a single element, located on PET 0: + +

+

+  
+           +-----+-------+----------------+------------+
+           | PET | index | sequence index | data value |
+           +-----+-------+----------------+------------+
+           |  0  |   1   |          1     |     n/a    |
+           +-----+-------+----------------+------------+
+
+ +

+As a first example consider the following sparse matrix with three entries: +

+

+    factorIndexList(1,1) = 1  ! src seq index
+    factorIndexList(2,1) = 1  ! dst seq index
+    factorList(1) = 1.
+    factorIndexList(1,2) = 6  ! src seq index
+    factorIndexList(2,2) = 1  ! dst seq index
+    factorList(2) = 1.
+    factorIndexList(1,3) = 9  ! src seq index
+    factorIndexList(2,3) = 1  ! dst seq index
+    factorList(3) = 1.
+
+ +

+In ESMF, the order in which the sparse matrix entries are specified in + factorIndexList and factorList, or on which PET they + are provided, is completely irrelevant. The term order in the resulting + sparse matrix sums is not affected by it. + +

+There is one aspect of the sparse matrix format, however, that is relevant + to the bfb considerations: When multiple entries for the same (src, dst) + pair are present in a sparse matrix definition, the entries are summed + into a single (src, dst) entry. Therefore, even if there are multiple + sparse matrix entries for the same (src, dst) pair, there will only be a + single term for it in the resulting expression. + +

+Going back to the three term sparse matrix definition above, the + canonical term order is defined by the source sequence indices in + ascending order. With (src,dst) denoting the sparse matrix factors, + and s(src) and d(dst) denoting source and destination Array + elements, respectively, for src and dst sequence indices, the + sum in canonical order is: + +

+d(1) = (1,1)*s(1) + (6,1)*s(6) + (9,1)*s(9) + +

+For simplicity, the factors in all of the examples are set to 1.0, allowing us + to drop them in the expressions. This helps focus on the critical issue - + term order: + +

+d(1) = s(1) + s(6) + s(9) + +

+There are two parameters that affect term order in the ESMF sparse matrix + multiplication (SMM), and therefore must be considered in the context of bfb + reproducibility. First there is the srcTermProcessing parameter which + controls grouping of source terms located on the same PET. The value of the + srcTermProcessing parameter indicates the maximum number of terms that + may be grouped into partial sums on the source PET. Setting + srcTermProcessing to 1 means that no partial sums are formed on the + source side, however, the source terms are multiplied with their + respective sparse matrix factor before being sent to the destination PET. + Setting srcTermProcessing to 0 prevents these products from being carried + out on the source side, and the source Array elements are sent unmodified. + Depending on the distribution of the source Array, values greater than 1 + for srcTermProcessing can lead to partial sums and thus may have + impact on the bfb reproducibility of the SMM. + +

+The second parameter that may have bfb effects comes into play at + execution-time of a precomputed + RouteHandle. It is accessible via the termorderflag argument; a typed + flag with the following values: + +

    +
  • ESMF_TERMORDER_SRCSEQ - Strictly enforces the canonical order + of the source terms according to the source sequence index. However, + terms that are grouped together in the RouteHandle at store-time, as a + consequence of srcTermProcessing, are treated as + single entities with a sequence index equal to the lowest original + sequence index in the group. Use ESMF_TERMORDER_SRCSEQ together + with srcTermProcessing=0 or srcTermProcessing=1 when strict + bfb reproducibility is required independent of the source Array + distribution, e.g. for different number of PETs. +
  • +
  • ESMF_TERMORDER_SRCPET - The source terms in the sum are + first arranged according to the relative position of the PET on which + they reside with respect to the destination PET. Second, all the terms + coming from the same PET are sorted in canonical sequence index order + and summed into partial sums. Again, terms that are grouped together + in the RouteHandle at store-time are treated as + single entities with a sequence index equal to the lowest original + sequence index in the group. The final result for each destination + element is determined by adding the partial sums in an order that is + fixed by the position of the partial sums' source PETs relative to + the destination PET. This ensures bfb reproducibility of the result as + long as the number of PETs remains unchanged. +
  • +
  • ESMF_TERMORDER_FREE - For this option there are no + restrictions on the term + order. Terms can be summed in any order, and the order may change each + time the RouteHandle is executed. This option grants greatest flexibility + to the RouteHandle execution implementation. It is available for all the + methods that take the termorderflag argument. Without a + guaranteed source term order, the ESMF_TERMORDER_FREE option is + not suitable for situations that require bfb reproducibility. + +
  • +
+ +

+ESMF_TERMORDER_SRCSEQ + +

+First using srcTermProcessing=0 at store time and + termorderflag=ESMF_TERMORDER_SRCSEQ at execution time, + the canonical term order is expected: + +

+d(1) = s(1) + s(6) + s(9) = 0.5 + 0.1 + 0.1 = sumA + +

+

+  ! forced srcTermProcessing
+  srcTermProcessing = 0
+  
+  call ESMF_ArraySMMStore(srcArray, dstArray, &
+    factorIndexList=factorIndexList, factorList=factorList, &
+    routehandle=rh, srcTermProcessing=srcTermProcessing, rc=rc)
+
+ +

+

+  call ESMF_ArraySMM(srcArray, dstArray, routehandle=rh, &
+    termorderflag=ESMF_TERMORDER_SRCSEQ, rc=rc)
+
+ +

+

+  if (localPet == 0) then
+    print *, "result SRCSEQ#1 = ", farrayPtr(1), " expect: ", sumA
+    if (farrayPtr(1) /= sumA) &
+      finalrc = ESMF_FAILURE
+  endif
+
+ +

+The order of source terms across PETs is expected to have no effect on the + bfb reproducibility of the result for ESMF_TERMORDER_SRCSEQ. To test + this, a sparse matrix is used where the source terms originate from different + PETs. +

+

+    factorIndexList(1,1) = 4  ! src seq index
+    factorIndexList(2,1) = 1  ! dst seq index
+    factorList(1) = 1.
+    factorIndexList(1,2) = 5  ! src seq index
+    factorIndexList(2,2) = 1  ! dst seq index
+    factorList(2) = 1.
+    factorIndexList(1,3) = 12 ! src seq index
+    factorIndexList(2,3) = 1  ! dst seq index
+    factorList(3) = 1.
+
+ +

+Again the srcTermProcessing argument is kept at 0, ensuring that none + of the source terms are grouped into partial sums. + +

+

+  ! forced srcTermProcessing
+  srcTermProcessing = 0
+  
+  call ESMF_ArraySMMStore(srcArray, dstArray, &
+    factorIndexList=factorIndexList, factorList=factorList, &
+    routehandle=rh, srcTermProcessing=srcTermProcessing, rc=rc)
+
+ +

+

+  call ESMF_ArraySMM(srcArray, dstArray, routehandle=rh, &
+    termorderflag=ESMF_TERMORDER_SRCSEQ, rc=rc)
+
+ +

+Under ESMF_TERMORDER_SRCSEQ it does not matter on which PET a + source term is located, the order of source terms is strictly defined by the + order of source sequence indices: + +

+d(1) = s(4) + s(5) + s(12) = 0.5 + 0.1 + 0.1 = sumA + +

+

+  if (localPet == 0) then
+    print *, "result SRCSEQ#2 = ", farrayPtr(1), " expect: ", sumA
+    if (farrayPtr(1) /= sumA) &
+      finalrc = ESMF_FAILURE
+  endif
+
+ +

+The same sparse matrix leads to bfb differences in the result when executed + with the ESMF_TERMORDER_SRCPET option. This is demonstrated further + down in result SRCPET#4. + +

+ESMF_TERMORDER_SRCPET + +

+All source terms coming from the same PET + +

+In the following examples the srcTermProcessing argument at store-time + is first set to 0, forcing all of the source terms to be sent to the + destination PET unmodified. We start by going back to the initial sparse + matrix where all of the source terms are located on the same PET. +

+

+    factorIndexList(1,1) = 1  ! src seq index
+    factorIndexList(2,1) = 1  ! dst seq index
+    factorList(1) = 1.
+    factorIndexList(1,2) = 6  ! src seq index
+    factorIndexList(2,2) = 1  ! dst seq index
+    factorList(2) = 1.
+    factorIndexList(1,3) = 9  ! src seq index
+    factorIndexList(2,3) = 1  ! dst seq index
+    factorList(3) = 1.
+
+ +

+

+  ! forced srcTermProcessing
+  srcTermProcessing=0
+  
+  call ESMF_ArraySMMStore(srcArray, dstArray, &
+    factorIndexList=factorIndexList, factorList=factorList, &
+    routehandle=rh, srcTermProcessing=srcTermProcessing, rc=rc)
+
+ +

+Then, at execution time, the ESMF_TERMORDER_SRCPET option is used. +

+

+  call ESMF_ArraySMM(srcArray, dstArray, routehandle=rh, &
+    termorderflag=ESMF_TERMORDER_SRCPET, rc=rc)
+
+ +

+Here all of the source elements originate from the same PET (PET 0). This + fact, together with the ESMF_TERMORDER_SRCPET execution-time option, + results in the following canonical term order: + +

+d(1) = s(1) + s(6) + s(9) = 0.5 + 0.1 + 0.1 = sumA + +

+This is exactly the same term order that was used above to produce the + result stored in sumA. +

+

+  if (localPet == 0) then
+    print *, "result SRCPET#1 = ", farrayPtr(1), " expect: ", sumA
+    if (farrayPtr(1) /= sumA) &
+      finalrc = ESMF_FAILURE
+  endif
+
+ +

+The sequence indices of the source terms are the only relevant aspect in + determining the source term order. Consider, for example, the following + sparse matrix, where again all source terms are located on the same PET + (PET 2): +

+

+    factorIndexList(1,1) = 11 ! src seq index
+    factorIndexList(2,1) = 1  ! dst seq index
+    factorList(1) = 1.
+    factorIndexList(1,2) = 5  ! src seq index
+    factorIndexList(2,2) = 1  ! dst seq index
+    factorList(2) = 1.
+    factorIndexList(1,3) = 7  ! src seq index
+    factorIndexList(2,3) = 1  ! dst seq index
+    factorList(3) = 1.
+
+ +

+This time the source term order in memory is not the same + as their sequence index order. Specifically, the sequence indices of the + source terms, in the order they are stored in memory, is 11, 7, 5 (see the + source Array diagram above for reference). + Further, as mentioned already, the order of entries in the sparse matrix + also have not bearing on the term order in the SMM sums. + Then, for the ESMF_TERMORDER_SRCPET option, and because all source + terms are located on the same PET, the resulting source term order is the + canonical one determined by the source term sequence indices alone: + +

+d(1) = s(5) + s(7) + s(11) + +

+Filling in the source element data, we find + +

+d(1) = 0.1 + 0.1 + 0.5, + +

+which is expected to be bfb equivalent to the result stored in sumB + from above. +

+

+  ! forced srcTermProcessing
+  srcTermProcessing=0
+  
+  call ESMF_ArraySMMStore(srcArray, dstArray, &
+    factorIndexList=factorIndexList, factorList=factorList, &
+    routehandle=rh, srcTermProcessing=srcTermProcessing, rc=rc)
+
+ +

+

+  call ESMF_ArraySMM(srcArray, dstArray, routehandle=rh, &
+    termorderflag=ESMF_TERMORDER_SRCPET, rc=rc)
+
+ +

+

+  if (localPet == 0) then
+    print *, "result SRCPET#2 = ", farrayPtr(1), " expect: ", sumB
+    if (farrayPtr(1) /= sumB) &
+      finalrc = ESMF_FAILURE
+  endif
+
+ +

+Source terms coming from different PETs + +

+When the source terms are distributed across multiple PETs, the + ESMF_TERMORDER_SRCPET option first bundles the terms according to + the PET on which they are stored. These source term "bundles" are then + arranged in an order that depends on the source PET position relative to the + destination PET: starting with the bundle for which the source PET is the + same as the destination PET, the source term bundles are placed in descending + order with respect to their source PET, modulo petCount. The terms within + each source term bundle are further sorted in the canonical order according + to their sequence index. + +

+The following sparse matrix demonstrates the effect of the + ESMF_TERMORDER_SRCPET option. +

+

+    factorIndexList(1,1) = 1  ! src seq index
+    factorIndexList(2,1) = 1  ! dst seq index
+    factorList(1) = 1.
+    factorIndexList(1,2) = 3  ! src seq index
+    factorIndexList(2,2) = 1  ! dst seq index
+    factorList(2) = 1.
+    factorIndexList(1,3) = 7  ! src seq index
+    factorIndexList(2,3) = 1  ! dst seq index
+    factorList(3) = 1.
+
+ +

+Here the source terms are located on PETs 0, 1, and 2. Using a [] notion to + indicate the source PET of each term, the term order under + ESMF_TERMORDER_SRCPET is given by: + +

+d(1) = s(1)[0] + s(7)[2] + s(3)[1] = 0.5 + 0.1 + 0.1 + +

+This is again the same order of terms that was used to produce the result + stored in sumA above. +

+

+  ! forced srcTermProcessing
+  srcTermProcessing=0
+    
+  call ESMF_ArraySMMStore(srcArray, dstArray, &
+    factorIndexList=factorIndexList, factorList=factorList, &
+    routehandle=rh, srcTermProcessing=srcTermProcessing, rc=rc)
+
+ +

+

+  call ESMF_ArraySMM(srcArray, dstArray, routehandle=rh, &
+    termorderflag=ESMF_TERMORDER_SRCPET, rc=rc)
+
+ +

+

+  if (localPet == 0) then
+    print *, "result SRCPET#3 = ", farrayPtr(1), " expect: ", sumA
+    if (farrayPtr(1) /= sumA) &
+      finalrc = ESMF_FAILURE
+  endif
+
+ +

+In the above example, the fact that the terms were ordered by source PET + first, did not lead to numerical bfb differences compared to the canonical + source term order. However, this was purely coincidental in the way the + numbers worked out for this example. The following case looks at a situation + where the source PET order does lead to a result that shows bfb + differences compared to the canonical term order. +

+

+    factorIndexList(1,1) = 4  ! src seq index
+    factorIndexList(2,1) = 1  ! dst seq index
+    factorList(1) = 1.
+    factorIndexList(1,2) = 5  ! src seq index
+    factorIndexList(2,2) = 1  ! dst seq index
+    factorList(2) = 1.
+    factorIndexList(1,3) = 12 ! src seq index
+    factorIndexList(2,3) = 1  ! dst seq index
+    factorList(3) = 1.
+
+ +

+The canonical source term order of this SMM sum, determined by the source + sequence indices alone, is: + +

+d(1) = s(4) + s(5) + s(12) = 0.5 + 0.1 + 0.1, + +

+which again would lead to a result that is bfb identical to sumA. + However, this is not the term order resulting from the + ESMF_TERMORDER_SRCPET option. The actual order for this option is: + +

+d(1) = s(12)[3] + s(5)[2] + s(4)[1] = 0.1 + 0.1 + 0.5, + +

+resulting in a sum that is bfb identical to sumB instead. +

+

+  ! forced srcTermProcessing
+  srcTermProcessing=0
+  
+  call ESMF_ArraySMMStore(srcArray, dstArray, &
+    factorIndexList=factorIndexList, factorList=factorList, &
+    routehandle=rh, srcTermProcessing=srcTermProcessing, rc=rc)
+
+ +

+

+  call ESMF_ArraySMM(srcArray, dstArray, routehandle=rh, &
+    termorderflag=ESMF_TERMORDER_SRCPET, rc=rc)
+
+ +

+

+  if (localPet == 0) then
+    print *, "result SRCPET#4 = ", farrayPtr(1), " expect: ", sumB
+    if (farrayPtr(1) /= sumB) &
+      finalrc = ESMF_FAILURE
+  endif
+
+ +

+Grouping of source terms coming from the same PET + +

+So far the srcTermProcessing argument was kept at 0, and therefore + source term grouping had not to be considered. Source term grouping is only + possible for terms that originate from the same PET. In preparation + for a closer look at the bfb effects of source term grouping, consider a + sparse matrix where two of the source terms are located on the same PET. +

+

+    factorIndexList(1,1) = 1  ! src seq index
+    factorIndexList(2,1) = 1  ! dst seq index
+    factorList(1) = 1.
+    factorIndexList(1,2) = 5  ! src seq index
+    factorIndexList(2,2) = 1  ! dst seq index
+    factorList(2) = 1.
+    factorIndexList(1,3) = 7  ! src seq index
+    factorIndexList(2,3) = 1  ! dst seq index
+    factorList(3) = 1.
+
+ +

+Here one of the source terms is located on PET 0 while the other two + source terms are originating on PET 2. Keeping the srcTermProcessing + argument at 0 first, the term order under ESMF_TERMORDER_SRCPET is + given by: + +

+d(1) = s(1)[0] + s(5)[2] + s(7)[2] = 0.5 + 0.1 + 0.1 + +

+And again the result is expected to be bfb identical to the number stored + in sumA. +

+

+  ! forced srcTermProcessing
+  srcTermProcessing=0
+  
+  call ESMF_ArraySMMStore(srcArray, dstArray, &
+    factorIndexList=factorIndexList, factorList=factorList, &
+    routehandle=rh, srcTermProcessing=srcTermProcessing, rc=rc)
+
+ +

+

+  call ESMF_ArraySMM(srcArray, dstArray, routehandle=rh, &
+    termorderflag=ESMF_TERMORDER_SRCPET, rc=rc)
+
+ +

+

+  if (localPet == 0) then
+    print *, "result SRCPET#5 = ", farrayPtr(1), " expect: ", sumA
+    if (farrayPtr(1) /= sumA) &
+      finalrc = ESMF_FAILURE
+  endif
+
+ +

+The same result is also expected with srcTermProcessing set to 1. A + value of 1 indicates that the multiplication of the source term with its + sparse matrix factor is carried out on the source side before being sent to + the destination PET. The final sum is still carried out in the same order on + the destination PET, essentially resulting in the exact same bfb identical + sum as for srcTermProcessing set to 0. +

+

+  ! forced srcTermProcessing
+  srcTermProcessing=1
+  
+  call ESMF_ArraySMMStore(srcArray, dstArray, &
+    factorIndexList=factorIndexList, factorList=factorList, &
+    routehandle=rh, srcTermProcessing=srcTermProcessing, rc=rc)
+
+ +

+

+  call ESMF_ArraySMM(srcArray, dstArray, routehandle=rh, &
+    termorderflag=ESMF_TERMORDER_SRCPET, rc=rc)
+
+ +

+

+  if (localPet == 0) then
+    print *, "result SRCPET#6 = ", farrayPtr(1), " expect: ", sumA
+    if (farrayPtr(1) /= sumA) &
+      finalrc = ESMF_FAILURE
+  endif
+
+ +

+Increasing the srcTermProcessing argument to 2 (or higher) results in + source term grouping of the terms (up to the number specified in + srcTermProcessing) that are on the same source PET. + +

+d(1) = s(1)[0] + ( s(5)[2] + s(7)[2] ) = 0.5 + (0.1 + 0.1) + +

+This result is bfb identical to first adding 0.1 and 0.1 into a partial sum, + and then adding this sum to 0.5. This is the exact grouping of + terms that was used to obtain the result stored in sumB from above. +

+

+  ! forced srcTermProcessing
+  srcTermProcessing=2
+  
+  call ESMF_ArraySMMStore(srcArray, dstArray, &
+    factorIndexList=factorIndexList, factorList=factorList, &
+    routehandle=rh, srcTermProcessing=srcTermProcessing, rc=rc)
+
+ +

+

+  call ESMF_ArraySMM(srcArray, dstArray, routehandle=rh, &
+    termorderflag=ESMF_TERMORDER_SRCPET, rc=rc)
+
+ +

+

+  if (localPet == 0) then
+    print *, "result SRCPET#7 = ", farrayPtr(1), " expect: ", sumB
+    if (farrayPtr(1) /= sumB) &
+      finalrc = ESMF_FAILURE
+  endif
+
+ +

+In order to explore the effects of the srcTermProcessing argument + further, more terms on the same source PET are needed in the SMM sum. + The following sparse matrix has four entries, three of which originate from + the same PET (PET 3). +

+

+    factorIndexList(1,1) = 1  ! src seq index
+    factorIndexList(2,1) = 1  ! dst seq index
+    factorList(1) = 1.
+    factorIndexList(1,2) = 2  ! src seq index
+    factorIndexList(2,2) = 1  ! dst seq index
+    factorList(2) = 1.
+    factorIndexList(1,3) = 8  ! src seq index
+    factorIndexList(2,3) = 1  ! dst seq index
+    factorList(3) = 1.
+    factorIndexList(1,4) = 12 ! src seq index
+    factorIndexList(2,4) = 1  ! dst seq index
+    factorList(4) = 1.
+
+ +

+Setting the srcTermProcessing argument back to 0 puts the terms in + PET order, and canonical order for each PET bundle. + +

+d(1) = s(1)[0] + s(2)[3] + s(8)[3] + s(12)[3] = 0.5 + 0.2 + 0.1 + 0.1 + +

+The bfb identical result for this sum was calculated and stored in variable + sumC above. +

+

+  ! forced srcTermProcessing
+  srcTermProcessing=0
+  
+  call ESMF_ArraySMMStore(srcArray, dstArray, &
+    factorIndexList=factorIndexList, factorList=factorList, &
+    routehandle=rh, srcTermProcessing=srcTermProcessing, rc=rc)
+
+ +

+

+  call ESMF_ArraySMM(srcArray, dstArray, routehandle=rh, &
+    termorderflag=ESMF_TERMORDER_SRCPET, rc=rc)
+
+ +

+

+  if (localPet == 0) then
+    print *, "result SRCPET#8 = ", farrayPtr(1), " expect: ", sumC
+    if (farrayPtr(1) /= sumC) &
+      finalrc = ESMF_FAILURE
+  endif
+
+ +

+Setting the srcTermProcessing argument to a value of 2 results in the + following source term grouping: + +

+d(1) = s(1)[0] + ( s(2)[3] + s(8)[3] ) + s(12)[3] + = 0.5 + ( 0.2 + 0.1 ) + 0.1, + +

+where the (0.2 + 0.1) partial sum is carried out on source PET 3, and + then sent to the destination PET (PET 0), together with the unmodified data + from source element 8 (0.1). The final sum is performed on PET 0. The + result is identical to the precomputed value stored in sumD. The + numbers work out in a way where this result is bfb identical to the + previous result, i.e. sumC. However, this bfb match is purely + coincidental. +

+

+  ! forced srcTermProcessing
+  srcTermProcessing=2
+  
+  call ESMF_ArraySMMStore(srcArray, dstArray, &
+    factorIndexList=factorIndexList, factorList=factorList, &
+    routehandle=rh, srcTermProcessing=srcTermProcessing, rc=rc)
+
+ +

+

+  call ESMF_ArraySMM(srcArray, dstArray, routehandle=rh, &
+    termorderflag=ESMF_TERMORDER_SRCPET, rc=rc)
+
+ +

+

+  if (localPet == 0) then
+    print *, "result SRCPET#9 = ", farrayPtr(1), " expect: ", sumD
+    if (farrayPtr(1) /= sumD) &
+      finalrc = ESMF_FAILURE
+  endif
+
+ +

+Increasing the srcTermProcessing argument up to 3 results in a three + term partial sum on PET 3: + +

+d(1) = s(1)[0] + ( s(2)[3] + s(8)[3] + s(12)[3] ) + = 0.5 + ( 0.2 + 0.1 + 0.1 ). + +

+Again the final sum is performed on PET 0. The result is bfb identical to + the number stored in sumE, which, for the chosen numbers, works out to + have a bfb difference compared to sumC and sumD. +

+

+  ! forced srcTermProcessing
+  srcTermProcessing=3
+  
+  call ESMF_ArraySMMStore(srcArray, dstArray, &
+    factorIndexList=factorIndexList, factorList=factorList, &
+    routehandle=rh, srcTermProcessing=srcTermProcessing, rc=rc)
+
+ +

+

+  call ESMF_ArraySMM(srcArray, dstArray, routehandle=rh, &
+    termorderflag=ESMF_TERMORDER_SRCPET, rc=rc)
+
+ +

+

+  if (localPet == 0) then
+    print *, "result SRCPET#10 = ", farrayPtr(1), " expect: ", sumE
+    if (farrayPtr(1) /= sumE) &
+      finalrc = ESMF_FAILURE
+  endif
+
+ +

+Reproducibility and Performance + +

+The above examples show how bit-for-bit (bfb) reproducibility is a result of + controlling the term order. ESMF offers several options to control the term + order in the sparse matrix multiplication (SMM) implementation: + +

    +
  • To guarantee bfb reproducibility between consecutive executions of the + same RouteHandle object, the ESMF_TERMORDER_SRCPET execution-time + option suffices. +
  • +
  • If bfb reproducibility is required between different RouteHandles, + e.g. a RouteHandle that is precomputed each time the application starts, + then it must be further ensured that the same value of srcTermProcessing + is specified during the store call. Under these conditions the ESMF SMM + implementation guarantees bfb identical results between runs, as long as the + number of PETs does not change. +
  • +
  • To guarantee bfb reproducibility between different runs, even when the + number of PETs, and therefore the data distribution changes, the execution + option ESMF_TERMORDER_SRCSEQ must be chosen together with + srcTermProcessing equal to 0 or 1 (in order to prevent partial sums). + +
  • +
+ +

+The term order in a SMM operation does not only affect the bfb + reproducibility of the result, but also affects the SMM performance. + The precise performance implications of a specific term order are + complicated and strongly depend on the exact problem structure, as well as + on the details of the compute hardware. ESMF implements an auto-tuning + mechanism that can be used to conveniently determine a close to optimal set + of SMM performance parameters. + +

+There are two SMM performance parameters in ESMF that are encoded into a + RouteHandle during store-time: srcTermProcessing and + pipelineDepth. The first one affects the term order in the SMM sums and + has been discussed in detail above. The second parameter, pipelineDepth, + determines how many in- and out-bound messages may be outstanding on each + PET. It has no effect on the term order and does not lead to bfb differences + in the SMM results. However, in order to achieve good performance + reproducibility, the user has the option to pass in a fixed value of the + pipelineDepth argument when precomputing RouteHandles. + +

+Store calls that take the srcTermProcessing and/or pipelineDepth + argument specify them as optional with intent(inout). Omitting the + argument when calling, or passing a variable that is set to a negative + number, indicates that the respective parameter needs to be determined by + the library. Further, if a variable with a negative value was passed in, then + the variable is overwritten and replaced by the auto-tuned value on return. Through + this mechanism a user can leverage the built-in auto-tuning feature of ESMF to + obtain the best possible performance for a specific problem on a particular + compute hardware, while still ensuring bfb and performance + reproducibility between runs. The following example shows code that first + checks if previously stored SMM performance parameters are available in a + file on disk, and then either reads and uses them, or else uses auto-tuning + to determine the parameters before writing them to file. For simplicity the + same sparse matrix as in the previous example is used. + +

+

+  ! precondition the arguments for auto-tuning and overwriting
+  srcTermProcessing = -1  ! init negative value
+  pipelineDepth     = -1  ! init negative value
+
+  ! get a free Fortran i/o unit
+  call ESMF_UtilIOUnitGet(unit=iounit, rc=rc)
+
+ +

+

+  ! try to open the file that holds the SMM parameters
+  open(unit=iounit, file="smmParameters.dat", status="old", action="read", &
+    form="unformatted", iostat=iostat)
+  
+  if (iostat == 0) then
+    ! the file was present -> read from it and close it again
+    read(unit=iounit, iostat=iostat) srcTermProcessing, pipelineDepth, &
+      sumCompare
+    close(unit=iounit)
+  endif
+  
+  if ((localPet == 0) .and. (iostat == 0)) then
+    print *, "SMM parameters successfully read from file"
+    print *, " srcTermProcessing=", srcTermProcessing, " pipelineDepth=", &
+      pipelineDepth, " ==>> sumCompare=", sumCompare
+  endif
+
+  call ESMF_ArraySMMStore(srcArray, dstArray, &
+    factorIndexList=factorIndexList, factorList=factorList, &
+    routehandle=rh, srcTermProcessing=srcTermProcessing, &
+    pipelineDepth=pipelineDepth, rc=rc)
+
+ +

+

+  call ESMF_ArraySMM(srcArray, dstArray, routehandle=rh, &
+    termorderflag=ESMF_TERMORDER_SRCPET, rc=rc)
+
+ +

+

+  if ((localPet == 0) .and. (iostat /= 0)) then
+    print *, "SMM parameters determined via auto-tuning -> dump to file"
+    open(unit=iounit, file="smmParameters.dat", status="unknown", &
+      action="write", form="unformatted")
+    write(unit=iounit) srcTermProcessing, pipelineDepth, farrayPtr(1)
+    close(unit=iounit)
+  endif
+  
+  if (localPet == 0) then
+    if (iostat /= 0) then
+      ! cannot do bfb comparison of the result without reference
+      print *, "result SRCPET#11 = ", farrayPtr(1)
+    else
+      ! do bfb comparison of the result against reference
+      print *, "result SRCPET#11 = ", farrayPtr(1), " expect: ", sumCompare
+      if (farrayPtr(1) /= sumCompare) then
+        finalrc = ESMF_FAILURE
+        write (msg, *) "Numerical difference detected: ", &
+          farrayPtr(1)-sumCompare
+        call ESMF_LogWrite(msg, ESMF_LOGMSG_INFO)
+      endif
+    endif
+  endif
+
+ +

+Running this example for the first time exercises the auto-tuning branch. The + auto-tuned srcTermProcessing and pipelineDepth parameters are + then used in the SMM execution, as well as written to file. The SMM result + variable is also written to the same file for test purposes. + Any subsequent execution of the same example branches into the code that + reads the previously determined SMM execution parameters from file, re-using + them during store-time. This ensures bfb reproducibility of the SMM result, + which is tested in this example by comparing to the previously stored value. + + +

+ +

+ +

+ +

+ +
+37.2.2 Asynchronous RouteHandle communication with VMEpoch +

+ +

+The RouteHandle based communication calls of the Array and Field classes + provide the routesyncflag argument. This argument allows the user to + specify that the initiated call should not block. Additional calls are + necessary to wait for a previously initiated communication call to finish. + For a detailed discussion see section 28.2.20. + Building on these primitives, asynchronous communications patterns can be + implemented in user code. However, a more elegant option to achive + asynchronous behavior between sending and receiving PETs of RouteHandle based + communications is provided by the VMEpoch feature discussed here. + +

+The VMEpoch is a low level message aggregation and buffering approach. + The VM level details are discussed under the ESMF_VM section in + 51.3.11. + +

+There are several advantages of VMEpoch over the direct use of non-blocking + RouteHandle based communication calls: + +

+ +

    +
  • Multiple different RouteHandles can be aggregated within the same epoch. + This allows mixing of Redist(), Regrid(), and SMM() operations, and the + aggregating of all messages. + +

    +

  • +
  • The same RouteHandle can be used several times within the same + epoch. This is not possible under the direct non-blocking execution. + +

    +

  • +
  • ArrayBundle and FieldBundle communications are supported. This is not + available for the direct non-blocking execution. + +

    +

  • +
+ +

+The ESMF_VMEpoch API consists of two interfaces: + ESMF_VMEpochEnter() and ESMF_VMEpochExit(). Inside an epoch, + communication calls are aggregated. Data transfers on the + src side are not issued until the epoch is exited. On the dst + side, a single data transfer is received from any of the sending PETs, and + then divided over the individual receive calls. + +

+In the following code example, the srcArray has DEs on PET 0 and 1, + while dstArray has DEs on PET 2 and 3. Both Arrays are operating on + the same global index space. A Redist() RouteHandle rh is created in + the usual manner. +

+

+  call ESMF_ArrayRedistStore(srcArray, dstArray, routehandle=rh, rc=rc)
+
+ +

+The precomputed rh can be used as usual. Here the use inside an active + VMEpoch is demonstrated. + +

+First enter the VMEpoch using ESMF_VMEpochEnter(), specifying the kind + of epoch. Currently only a single VMEpoch kind is available: + ESMF_VMEPOCH_BUFFER. +

+

+  call ESMF_VMEpochEnter(epoch=ESMF_VMEPOCH_BUFFER, rc=rc)
+
+ +

+SRC side (PET 0 & 1): + The sending PETs do not block. + +

+DST side (PET 2 & 3): + The receiving PETs do not block. + +

+Notice that ESMF implements a throttle on the VMEpoch as to limit the number + of queued message between PETs. This is necessary to protect the receiving + side in the EAGER regime where MPI implementations send the + data from the sending to the receiving side, assuming the receiving side + will always be able to buffer. In cases where the sending side runs far + ahead of the receiving side, this strategy can lead to + increasing memory pressure on the receiving side, ultimatily resulting in + out-of-memory conditions. The default throttle in VMEpoch is set to $10$ + outstanding message between any two PETs. It can be adjusted by specifying + the throttle argument when calling ESMF_VMEpochEnter(). + +

+Next the actual communication method, ESMF_ArrayRedist(), is called in + the usual manner. +

+

+  call ESMF_ArrayRedist(srcArray, dstArray, routehandle=rh, rc=rc)
+
+ +

+SRC side (PET 0 & 1): + The sending PETs block until the locally needed send buffers are available, + and all local data manipulations and data movements into the send buffers have + completed. + +

+Waiting for the send buffers comes into play when a VMEpoch is entered and + exited multiple times. The same send buffer is reused each time for the + same src-dst-PET pairs (and grown automatically if needed). Each send buffer + becomes available once the MPI layer has indicated that the associated, + previous MPI_Isend() has completed locally. + +

+Once the send buffer for a specific PET pair is available, the local data + movements defined by the rh and message aggregation must complete before + returning. For Regrid() and SMM() operations the + srcTermProcessing argument specified during Store() determines the + amount of local data processing. Once returned, it is safe to modify the + srcArray data on the local PET. + +

+DST side (PET 2 & 3): + The receiving PETs block on the aggregated data from the src side for which + the local PET has a dependency defined via the rh. Once received, the + data is processed locally, and moved into the final location under the + dstArray. On return, it is safe to access the data in dstArray + on the local PET. + +

+Notice that any number of RouteHandle based communication calls can be made + inside the same active VMEpoch. In fact, aggregating messages from multiple + exchanges is the typical use case of the VMEpoch approach. Additional + communication calls cam either involve different RouteHandles, or even the + same rh for different src/dst Array pairs. + +

+When using communication calls that allow the specification of the + termorderflag, e.g. ESMF_FieldRegrid(), ESMF_ArraySMM(), + etc. inside a VMEpoch, it is important to set it to either + ESMF_TERMORDER_SRCPET or ESMF_TERMORDER_SRCSEQ. The default + value of ESMF_TERMORDER_FREE is not compatible with VMEpoch. + +

+Finally the active VMEpoch is exited by calling ESMF_VMEpochExit(). +

+

+  call ESMF_VMEpochExit(rc=rc)
+
+ +

+SRC side (PET 0 & 1): + The sending PETs post their local MPI_Isend() calls. This is + non-blocking. + +

+DST side (PET 2 & 3): + The receiving PETs do not block. + +

+As part of the final clean-up the rh is being released as usual. +

+

+  call ESMF_ArrayRedistRelease(routehandle=rh, rc=rc)
+
+ +

+ + +

+ +

+ +

+ +

+ +
+37.2.3 Creating a RouteHandle from an existing RouteHandle - + Transfer to a different set of PETs +

+ +

+Typically a RouteHandle object is created indirectly, i.e. without explicitly + calling the ESMF_RouteHandleCreate() method. The RouteHandle + object is a byproduct of calling communication Store() methods like + ESMF_FieldRegridStore(). + +

+One exception to this rule is when creating a duplicate RouteHandle from an + existing RouteHandle object. In this case the ESMF_RouteHandleCreate() + method is used explicitly. While this method allows to create a duplicate + RouteHandle on the exact same set of PETs as the original RouteHandle, the + real purpose of duplication is the transfer of a precomputed RouteHandle to a + different set of PETs. This is an efficient way to reduce the total time + spent in Store() calls, for situations where the same communication pattern + repeats for multiple components. + +

+This example demonstrates the transfer of a RouteHandle from one set of PETs + to another by first introducing three components. Component A is defined + on the first half of available PETs. +

+

+  petCountA = petCount/2  ! component A gets half the PETs
+
+  allocate(petListA(petCountA))
+  do i=1, petCountA
+    petListA(i) = i-1 ! PETs are base 0
+  enddo
+  
+  compA = ESMF_GridCompCreate(petList=petListA, rc=rc)
+  if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, &
+    line=__LINE__, &
+    file=__FILE__)) &
+    call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+ +

+The other two components, B1 and B2, split the remaining PETs evenly. +

+

+  petCountR = petCount - petCountA
+  petCountB1 = petCountR / 2
+  
+  allocate(petListB1(petCountB1))
+  do i=1, petCountB1
+    petListB1(i) = petCountA + i-1 ! PETs are base 0
+  enddo
+
+  allocate(petListB2(petCountR-petCountB1))
+  do i=1, petCountR-petCountB1
+    petListB2(i) = petCountA + petCountB1 + i-1 ! PETs are base 0
+  enddo
+
+  compB1 = ESMF_GridCompCreate(petList=petListB1, rc=rc)
+  if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, &
+    line=__LINE__, &
+    file=__FILE__)) &
+    call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+  compB2 = ESMF_GridCompCreate(petList=petListB2, rc=rc)
+  if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, &
+    line=__LINE__, &
+    file=__FILE__)) &
+    call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+ +

+Skipping all of the standard superstructure code, assume that fieldA + has been created by component A, has been reconciled across all PETs via + a StateReconcile() call, and accessed via a StateGet(). The same is true for + fieldB1 and fieldB2 from components B1 and B2, respectively. + +

+Now the RouteHandle rh1 for a Redist operation is precomputed between + fieldA and fieldB1. +

+

+  call ESMF_FieldRedistStore(srcField=fieldA, dstField=fieldB1, &
+    routehandle=rh1, rc=rc)
+  if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, &
+    line=__LINE__, &
+    file=__FILE__)) &
+    call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+ +

+The communication pattern stored in rh1 is between the PETs associated + with component A and those associated with component B1. Now component B2 is + simply a second instance of the same component code as B1, but on a different + set of PETs. The ESMF_RouteHandleCreate() method can be used to + transfer rh1 to the set of PETs that is consistent with fieldA to + fieldB2 communication. + +

+In order to transfer a RouteHandle to a different set of PETs, the + originPetList and targetPetList must be constructed. The + originPetList is the union of source and destination PETs (in that + order) for which rh1 was explicitly computed via the Store() call: +

+

+  allocate(originPetList(size(petListA)+size(petListB1)))
+  originPetList(1:size(petListA)) = petListA(:)
+  originPetList(size(petListA)+1:) = petListB1(:)
+
+ +

+The targetPetList is the union of source and destination PETs (in that + order) for which the target RouteHandle (i.e. rh2) will be defined: +

+

+  allocate(targetPetList(size(petListA)+size(petListB2)))
+  targetPetList(1:size(petListA)) = petListA(:)
+  targetPetList(size(petListA)+1:) = petListB2(:)
+
+ +

+Now the new RouteHandle rh2 can be created easily from the exising + RouteHandle rh1, suppling the origin and target petLists. +

+

+  rh2 = ESMF_RouteHandleCreate(rh1, originPetList=originPetList, &
+    targetPetList=targetPetList, rc=rc)
+  if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, &
+    line=__LINE__, &
+    file=__FILE__)) &
+    call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+ +

+The new RouteHandle rh2 is completely independent of the original + RouteHandle. In fact, it is perfectly fine to destroy (or release) rh1 + while holding on to rh2. +

+

+  call ESMF_RouteHandleDestroy(rh1, noGarbage=.true., rc=rc)
+  if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, &
+    line=__LINE__, &
+    file=__FILE__)) &
+    call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+ +

+Finally the rh2 object can be used to redistribute data from + fieldA to fieldB2. +

+

+  call ESMF_FieldRedist(srcField=fieldA, dstField=fieldB2, &
+    routehandle=rh2, rc=rc)
+  if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, &
+    line=__LINE__, &
+    file=__FILE__)) &
+    call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+ +

+The communication pattern held by rh2 + is idential to what whould have been created by an explicit + ESMF_FieldRedistStore() call. However, the + ESMF_RouteHandleCreate() call used to create rh2 from rh1 + is much faster than the full RedistStore() operation. + + +

+ +

+ +

+ +

+ +
+37.2.4 Write a RouteHandle to file and creating a RouteHandle from file +

+ +

+Communication Store() methods, like ESMF_FieldRegridStore(), are used + to create RouteHandles. These methods can be expensive, both with respect to + temporary memory requirements as well as the time they require to execute. + Often the associated cost is acceptable because Store() calls are typically + used during the initialization phase of the application. The cost of + RouteHandle generation is therefore armorized over the entire run phase + of the application, where the RouteHandle is applied over and over to + transfer data according to the same communication pattern. + +

+However, especially for short production runs, an expensive initialization + time can become problematic. In such cases it is useful to write the + RouteHandle to file. Subsequent application runs can then re-create the + RouteHandle during initialization, simply from file at a fraction of the time + of the original Store() call. + +

+First a RouteHandle must be created using one of the ESMF Store() methods. +

+

+  call ESMF_FieldRedistStore(srcField=fieldA, dstField=fieldB, &
+    routehandle=rh1, rc=rc)
+
+ +

+Now the RouteHandle object rh1 can be written to file using the + collective ESMF_RouteHandleWrite() method. +

+

+  call ESMF_RouteHandleWrite(rh1, fileName="testWrite.RH", rc=rc)
+
+ +

+This creates a single binary file with name testWrite.RH. The + information from across all PETs that define rh1 is contained in this + file. + +

+At this point, the original RouteHandle is no longer needed and can be + destroyed. +

+

+  call ESMF_RouteHandleDestroy(rh1, noGarbage=.true., rc=rc)
+
+ +

+The RouteHandle just deleted can easily be re-created using the + ESMF_RouteHandleCreate() method that accepts the file name as an + argument. This is a collective method that must be called on exactly + the same number of PETs that was used for the original Store() and Write() + calls that generated the file. +

+

+  rh2 = ESMF_RouteHandleCreate(fileName="testWrite.RH", rc=rc)
+
+ +

+Finally the re-created RouteHandle, rh2, can be used to execute the + communication pattern originally computed in rh1. +

+

+  call ESMF_FieldRedist(srcField=fieldA, dstField=fieldB, &
+    routehandle=rh2, rc=rc)
+
+ +

+Once done with rh2, the RouteHandle can be destroyed as usual. +

+

+  call ESMF_RouteHandleDestroy(rh2, noGarbage=.true., rc=rc)
+
+ +

+ + +

+ +

+ +

+ +

+ +
+37.2.5 Reusablity of RouteHandles and interleaved distributed + and undistributed dimensions +

+ +

+A RouteHandle object is typically created during a communication Store() + call, e.g. an ESMF_FieldRegridStore(). Other communication methods + with Store() are Halo, Redist, and SMM. The primary + input objects of a Store() call are either Fields, Arrays, + FieldBundles, or ArrayBundles. There will be an object for the source side, + and another object for the destination side. Both objects must be of the + same type. +

+

+  srcField = ESMF_FieldCreate(srcGrid, ESMF_TYPEKIND_R8, rc=rc)
+
+ +

+

+  dstField = ESMF_FieldCreate(dstGrid, ESMF_TYPEKIND_R8, rc=rc)
+
+ +

+

+  call ESMF_FieldRegridStore(srcField=srcField, dstField=dstField, &
+    routehandle=routehandle, rc=rc)
+
+ +

+The purpose of the explicit Store() call is to separate out the + expensive part of creating the RouteHandle object for a specific + communication patter, from the less expensive part of applying it. + Applying the RouteHandle results in data movement between + the source and destination objects. Once a RouteHandle is available, it is + reusable. This means it can be applied over and over again to communicate + data from the source to the destination object. +

+

+  do i=1, 10
+    ! repeatedly applying the routehandle
+    call ESMF_FieldRegrid(srcField=srcField, dstField=dstField, &
+      routehandle=routehandle, rc=rc)
+  enddo
+
+ +

+Reusability of a RouteHandle object extends beyond re-applying it to the same + source/destination object pair that was used during Store(). The same + RouteHandle can be applied to a different object pair, as long as these + criterial are met: + +

    +
  • The new pair matches the original pair with respect to type, + and kind. +
  • +
  • The memory layout of the distributed (i.e. gridded) + dimensions of the new pair is congruent with the original pair. This means + the DistGrids must match, as well as any extra padding on the + distributed/gridded dimensions. +
  • +
  • Size, number, and position (i.e. index order) of potentially present + undistributed (i.e. ungridded) dimensions does not affect the + reusability of a RouteHandle. + +
  • +
+ The following examples will discuss in detail what this means in practice. + +

+First consider the case where a second pair of source and destination Fields + is created identical to the first set. The precomputed RouteHandle is + immediatly reusable for this new Field pair to carry out the regrid operation. +

+

+  srcField2 = ESMF_FieldCreate(srcGrid, ESMF_TYPEKIND_R8, rc=rc)
+
+ +

+

+  dstField2 = ESMF_FieldCreate(dstGrid, ESMF_TYPEKIND_R8, rc=rc)
+
+ +

+

+  ! applying the same routehandle to a different pair of fields
+  call ESMF_FieldRegrid(srcField=srcField2, dstField=dstField2, &
+    routehandle=routehandle, rc=rc)
+
+ +

+The same RouteHandle stays re-usable even for a Field pair where source and + destination have one or more additional undistributed dimensions. Here a + single undistributed dimension is added. By default all undistributed + dimensions will be ordered after the distributed dimensions provided + by the Grid object. +

+

+  srcField3 = ESMF_FieldCreate(srcGrid, ESMF_TYPEKIND_R8, &
+    ungriddedLBound=(/1/), ungriddedUBound=(/10/), &  ! undistributed dim last
+    rc=rc)
+
+ +

+

+  dstField3 = ESMF_FieldCreate(dstGrid, ESMF_TYPEKIND_R8, &
+    ungriddedLBound=(/1/), ungriddedUBound=(/10/), & ! undistributed dim last
+    rc=rc)
+
+ +

+

+  ! applying the same routehandle to a different pair of fields
+  call ESMF_FieldRegrid(srcField=srcField3, dstField=dstField3, &
+    routehandle=routehandle, rc=rc)
+
+ +

+The undistributed dimension can also be moved into the first position, + and the same RouteHandle can still be re-used. Specifying the order + of dimensions in a Field is accomplished by providing the + gridToFieldMap. Here the Grid dimensions are mapped to 2nd and 3rd + Field dimensions, moving the undistributed dimension into the leading + position. +

+

+  srcField4 = ESMF_FieldCreate(srcGrid, ESMF_TYPEKIND_R8, &
+    ungriddedLBound=(/1/), ungriddedUBound=(/10/), &
+    gridToFieldMap=(/2,3/), rc=rc)  ! undistributed dim 1st
+
+ +

+

+  dstField4 = ESMF_FieldCreate(dstGrid, ESMF_TYPEKIND_R8, &
+    ungriddedLBound=(/1/), ungriddedUBound=(/10/), &
+    gridToFieldMap=(/2,3/), rc=rc)  ! undistributed dim 1st
+
+ +

+

+  ! applying the same routehandle to a different pair of fields
+  call ESMF_FieldRegrid(srcField=srcField4, dstField=dstField4, &
+    routehandle=routehandle, rc=rc)
+
+ +

+It is not necessary that the undistributed dimension is in the same position + on the source and destination Field. The only criteria that needs to be + satisfied is that both source and destination have the same number of + undistributed elements. Here the RouteHandle is re-used for a + Field pair where the destination Field interleaves the undistributed dimension + between the two distributed dimensions. At the same time the source Field + keeps the undistributed dimension in leading position. +

+

+  srcField5 = ESMF_FieldCreate(srcGrid, ESMF_TYPEKIND_R8, &
+    ungriddedLBound=(/1/), ungriddedUBound=(/10/), &
+    gridToFieldMap=(/2,3/), rc=rc)  ! undistributed dim 1st
+
+ +

+

+  dstField5 = ESMF_FieldCreate(dstGrid, ESMF_TYPEKIND_R8, &
+    ungriddedLBound=(/1/), ungriddedUBound=(/10/), &
+    gridToFieldMap=(/1,3/), rc=rc)  ! undistributed dim 2nd
+
+ +

+

+  ! applying the same routehandle to a different pair of fields
+  call ESMF_FieldRegrid(srcField=srcField5, dstField=dstField5, &
+    routehandle=routehandle, rc=rc)
+
+ +

+In the following example the undistributed elements on the source side are + spread across two undistributed dimensions. Of course the product of the two + dimension sizes must equal the number of undistributed elements on the + destination side, in order to fulfil the element count criteria. Here this + number is 10. At two undistributed dimension on the source side are placed + in first and fourth position using the gridToFieldMap. The same + RouteHandle is applied to this Field pair, resulting in the desired + regrid operation. +

+

+  srcField6 = ESMF_FieldCreate(srcGrid, ESMF_TYPEKIND_R8, &
+    ungriddedLBound=(/1,1/), ungriddedUBound=(/2,5/), &
+    gridToFieldMap=(/2,3/), rc=rc)  ! undistributed dims 1st and 4th
+
+ +

+

+  dstField6 = ESMF_FieldCreate(dstGrid, ESMF_TYPEKIND_R8, &
+    ungriddedLBound=(/1/), ungriddedUBound=(/10/), &
+    gridToFieldMap=(/1,3/), rc=rc)  ! undistributed dim 2nd
+
+ +

+

+  ! applying the same routehandle to a different pair of fields
+  call ESMF_FieldRegrid(srcField=srcField6, dstField=dstField6, &
+    routehandle=routehandle, rc=rc)
+
+ +

+While the RouteHandle was precomputed using a specific source/destination + Field pair, we have seen how it can be re-used as long as the memory layout + associated with the distributed (i.e. gridded) dimensions does not change. + A natural extension of this feature is to allow the same RouteHandle to be + re-used when source and destination are FieldBundles instead of Fields. The + only requirement here is that both sides contain the same number of elements, + and that + each pair constructed from the source and destination side is compatible with + the original pair used as shown in the examples above. Here this criteria is + simply met by constructing the source and destination FieldBundles from the + exact Fields used in the previous examples. +

+

+  srcFieldBundle = ESMF_FieldBundleCreate(fieldList=(/srcField, &
+    srcField2, srcField3, srcField4, srcField5, srcField6/), rc=rc)
+
+ +

+

+  dstFieldBundle = ESMF_FieldBundleCreate(fieldList=(/dstField, &
+    dstField2, dstField3, dstField4, dstField5, dstField6/), rc=rc)
+
+ +

+

+  ! applying the same routehandle to a pair of FieldBundles
+  call ESMF_FieldBundleRegrid(srcFieldBundle, dstFieldBundle, &
+    routehandle=routehandle, rc=rc)
+
+ +

+On a fundamental level, RouteHandles are re-usable across objects that + have the same memory layout for their distributed dimensions. Since ESMF + Fields are built on top of ESMF Arrays, it is + possible to re-use the same RouteHandle that was precomputed for a Field + pair and apply it to a matching Array pair. + +

+For this example, the easiest way to create Arrays with the same memory + layout in the distributed dimensions is to query the source and destination + Grid objects for their DistGrids. Then source and destination Arrays can be + easily constructed. +

+

+  call ESMF_GridGet(srcGrid, distgrid=srcDistGrid, rc=rc)
+
+ +

+

+  call ESMF_GridGet(dstGrid, distgrid=dstDistGrid, rc=rc)
+
+ +

+

+  srcArray = ESMF_ArrayCreate(srcDistGrid, ESMF_TYPEKIND_R8, rc=rc)
+
+ +

+

+  dstArray = ESMF_ArrayCreate(dstDistGrid, ESMF_TYPEKIND_R8, rc=rc)
+
+ +

+

+  ! applying the same routehandle to an Array pair
+  call ESMF_ArraySMM(srcArray=srcArray, dstArray=dstArray, &
+    routehandle=routehandle, rc=rc)
+
+ +

+Finally the resources associated with the RouteHandle object are released. + The recommended way to do this is by calling into the Release() method + associated with the Store() method used to create the RouteHandle. +

+

+  call ESMF_FieldRegridRelease(routehandle, rc=rc)
+
+ +

+ + +

+ +

+ +

+ +

+ +
+37.2.6 Dynamic Masking +

+ +

+When a RouteHandle object is created during an ESMF_FieldRegridStore() + call, masking information can be provided by the user. This type of masking + is said to be static, and is described in section 24.2.10. + It is static, because the masks set the maximum limits of the regrid + operation, which cannot be changed later. All subsequent executions of the + same RouteHandle can only use elements - source or destination - + that were not masked during the Store() call. + +

+Once a RouteHandle object is available, whether it was created with or without + static masking, the associated regrid operation can further be masking + during RouteHandle execution . This is called dynamic masking, because + it can dynamically change between subsequent RouteHandle executions. The + RouteHandle itself remains unchange during this process. The dynamic + masking information is processed on the fly as the RouteHandle is applied. + +

+The following example demonstrates dynamic masking for a regrid operation + between two Field objects. Although it is supported, here + the regrid operation between srcField and dstField is computed + without static masking. + +

+Note that since the intention is to later use the generated RouteHandle for + dynamic masking, it is important to provide the srcTermProcessing + argument, which must be set equal to 0. Doing this ensures that all + of the multiplying with interpolation weights, and summing of terms, is + carried out on the destination side. This is critical for dynamic masking. +

+

+  srcTermProcessing=0
+
+  call ESMF_FieldRegridStore(srcField=srcField, dstField=dstField, &
+    srcTermProcessing=srcTermProcessing, routehandle=routehandle, rc=rc)
+
+ +

+Now that routehandle is available, it can be used to execute the + regrid operation over and over during the course of the simualtion run. +

+

+  call ESMF_FieldRegrid(srcField=srcField, dstField=dstField, &
+    routehandle=routehandle, rc=rc)
+
+ +

+Assume that during the course of the simulation the srcField becomes + partially masked. This masking may be dynamically changing, as would be the + case for the ice cover over the arctic ocean. Then the regrid operation + represented by routehandle should dynamically adjust to only use + unmasked source elements. + +

+The dynamic masking behavior can be achieved in ESMF by setting srcField + elements to a special value. +

+

+  call ESMF_FieldGet(srcField, farrayPtr=farrayPtr, rc=rc)
+
+ +

+

+  ! setting an arbitrary local source element to special value 'srcMaskValue'
+  farrayPtr(lbound(farrayPtr,1)+3,lbound(farrayPtr,2)+3) = srcMaskValue
+
+ +

+Then set up an ESMF_DynamicMask object that holds information about + the special mask value. The dynamic mask object + further holds a pointer to the routine that will be called in order to handle + dynamically masked elements. +

+

+  call ESMF_DynamicMaskSetR8R8R8(dynamicMask, &
+    dynamicSrcMaskValue=srcMaskValue, &
+    dynamicMaskRoutine=simpleDynMaskProc, &
+    rc=rc)
+
+ +

+The names of the specific DynamicMaskSet methods all carry a + typekind-triplet suffix. Here the suffix is R8R8R8. + This indicates that the dynamicMaskRoutine argument + provided is expected to deal with real(ESMF_KIND_R8) destination data + (first R8 typekind), real(ESMF_KIND_R8) factors (second R8 typekind), + and real(ESMF_KIND_R8) source data (third R8 typekind). + +

+Now when the routehandle is executed, and the dynamicMask object + is passed into the ESMF_FieldRegrid() call, +

+

+  call ESMF_FieldRegrid(srcField=srcField, dstField=dstField, &
+    routehandle=routehandle, dynamicMask=dynamicMask, rc=rc)
+
+ +

+ESMF will scan the srcField for elements that have data equal to + that set by dynamicSrcMaskValue. If any are found, they + are passed into the routine provided via the dynamicMaskRoutine + argument. + +

+The procedure passed through the dynamicMaskRoutine argument must + satisfy exactly the following predefined interface: + +

+

+    interface
+      subroutine ESMF_DynamicMaskRoutineR8R8R8(dynMaskList, &
+        dynamicSrcMaskValue, dynamicDstMaskValue, rc)
+        use ESMF_UtilTypesMod
+        implicit none
+        type(ESMF_DynamicMaskElementR8R8R8), pointer        :: dynMaskList(:)
+        real(ESMF_KIND_R8),            intent(in), optional :: dynamicSrcMaskValue
+        real(ESMF_KIND_R8),            intent(in), optional :: dynamicDstMaskValue
+        integer,                       intent(out)  :: rc
+      end subroutine
+    end interface
+
+ +

+The first argument accepted according to this interface is an array of type + ESMF_DynamicMaskElement. Each element of this array corresponds to a + single element in the dstField that is affected by dynamic masking. + For each such dstElement the complete interpolation stencile is + provided by the ESMF_DynamicMaskElement derived type: + +

+

+    type ESMF_DynamicMaskElementR8R8R8
+      real(ESMF_KIND_R8), pointer       :: dstElement
+      real(ESMF_KIND_R8), allocatable   :: factor(:)
+      real(ESMF_KIND_R8), allocatable   :: srcElement(:)
+    end type
+
+ +

+Here the dstElement is a pointer to the actual element in the + dstField. Thus, assigning dstElement to a value, immediately + results in a value change of the element inside the dstField object. + Further, the size of the factor(:) and srcElement(:) arrays is + identical to each other and corresponds to the number of source elements in + the interpolation stencile. Without dynamic masking, the dstElement + would simply be calculated as the scalar product of factor(:) and + srcElement(:). + +

+By providing the dynamicMaskRoutine, the user has full control as to + what exactly happens to destination elements that are affected by dynamic + masking. For the current example, where some source elements may be marked by + a special masking value, a simple scheme could be to only use non-masked + source elements to calculate destination elements. The result then needs to + be renormalized in order to account for the missing source elements. This + could be implemented similar to the following subroutine: + +

+

+    subroutine simpleDynMaskProc(dynamicMaskList, dynamicSrcMaskValue, &
+      dynamicDstMaskValue, rc)
+      type(ESMF_DynamicMaskElementR8R8R8), pointer        :: dynamicMaskList(:)
+      real(ESMF_KIND_R8),            intent(in), optional :: dynamicSrcMaskValue
+      real(ESMF_KIND_R8),            intent(in), optional :: dynamicDstMaskValue
+      integer,                       intent(out)          :: rc
+      integer :: i, j
+      real(ESMF_KIND_R8)  :: renorm
+      if (associated(dynamicMaskList)) then
+        do i=1, size(dynamicMaskList)
+          dynamicMaskList(i)%dstElement = 0.d0 ! set to zero
+          renorm = 0.d0 ! reset
+          do j=1, size(dynamicMaskList(i)%factor)
+            if (.not. &
+              match(dynamicSrcMaskValue,dynamicMaskList(i)%srcElement(j))) then
+              dynamicMaskList(i)%dstElement = dynamicMaskList(i)%dstElement &
+                + dynamicMaskList(i)%factor(j) &
+                * dynamicMaskList(i)%srcElement(j)
+              renorm = renorm + dynamicMaskList(i)%factor(j)
+            endif
+          enddo
+          if (renorm > 0.d0) then
+            dynamicMaskList(i)%dstElement = dynamicMaskList(i)%dstElement / renorm
+          else if (present(dynamicSrcMaskValue)) then
+            dynamicMaskList(i)%dstElement = dynamicSrcMaskValue
+          else
+            rc = ESMF_RC_ARG_BAD  ! error detected
+            return
+          endif
+        enddo
+      endif
+      ! return successfully
+      rc = ESMF_SUCCESS
+    end subroutine
+
+ +

+So far in the example only the srcField had been dynamically masked. + However, elements in the dstField can be masked as well, following + exactly the same manner. + +

+First ensure that the dstField is in a well defined condition. This can + be achived by reseting it, e.g. to zero, using the ESMF_FieldFill() + method. +

+

+  call ESMF_FieldFill(dstField, dataFillScheme="const", const1=0.d0, rc=rc)
+
+ +

+Now some of the destination elements are set to a defined masking value. +

+

+  call ESMF_FieldGet(dstField, farrayPtr=farrayPtr, rc=rc)
+
+ +

+

+  ! setting an arbitrary local destination element to special value 'dstMaskValue'
+  farrayPtr(lbound(farrayPtr,1)+1,lbound(farrayPtr,2)+1) = dstMaskValue
+
+ +

+The dynamicMask is reset using the same DynamicMaskSet method as + before, but in addition to the previous arguments, dynamicDstMaskValue + is also specified. +

+

+  call ESMF_DynamicMaskSetR8R8R8(dynamicMask, &
+    dynamicSrcMaskValue=srcMaskValue, &
+    dynamicDstMaskValue=dstMaskValue, &
+    dynamicMaskRoutine=simpleDynMaskProc, &
+    rc=rc)
+
+ +

+Passing the reset dynamicMask object into ESMF_FieldRegrid() + causes ESMF to not only look for source elements that match + dynamicSrcMaskValue, but also destination elements that + match dynamicDstMaskValue. +

+

+  call ESMF_FieldRegrid(srcField=srcField, dstField=dstField, &
+    routehandle=routehandle, zeroregion=ESMF_REGION_EMPTY, &
+    dynamicMask=dynamicMask, rc=rc)
+
+ +

+Again an adequate procedure is supplied through + dynamicMaskRoutine. For the current case, however, a suitable procedure + would be inspecting the dstElement as well as all the dstElements + provided via the dynMaskList argument. + +

+Notice the zeroregion = ESMF_REGION_EMPTY specification in the + ESMF_FieldRegrid() call. This setting ensures that values in the + dstField remain unchanged until they are checked for + dynamicDstMaskValue. + +

+The DynamicMaskSet methods provide an argument of logical type, + called handleAllElements. By default it is set to .false., + which means that only elements affected by dynamic masking - as described + above - are passed to the dynamicMaskRoutine. However, when + handleAllElements is set to .true., all local + elements on each PET are made available to the dynamicMaskRoutine. + This allows the user supplied procedure to implement fully customized + handling of the interpolation from source to destination, using the + information supplied by ESMF. + +

+To demonstrate this, a custom routine simpleHandleAllProc() is + passed in as dynamicMaskRoutine, and handleAllElements is + set to .true.. All other aspects of the user interface remain unchanged. +

+

+  call ESMF_DynamicMaskSetR8R8R8(dynamicMask, &
+    dynamicSrcMaskValue=srcMaskValue, &
+    dynamicDstMaskValue=-2.d0, &
+    dynamicMaskRoutine=simpleHandleAllProc, &
+    handleAllElements=.true., &
+    rc=rc)
+
+ +

+

+  call ESMF_FieldRegrid(srcField=srcField, dstField=dstField, &
+    routehandle=routehandle, zeroregion=ESMF_REGION_EMPTY, &
+    dynamicMask=dynamicMask, rc=rc)
+
+ +

+Dynamic masking is also available for source and destination fields that + contain leading undistributed dimensions. When ESMF applies the regridding + weights, it interprets the product space of leading undistributed dimensions + of a Field or Array as the elements of a vector. In this approach the + interpolation becomes a vector operation. When applying the concept + of dynamic masking to such a vector operation, without making further + assumptions, it must be assumed that different vector elements may be + affected differently by the dynamic mask. ESMF therefore unrolls the vector + dimension when constructing the information passed to the + dynamicMaskRoutine. As a consequence of this, masking routines + do not generally have to consider vectorization explicitly. + +

+The concept is demonstrated by creating source and destination fields + with one leading undistributed dimension. +

+

+  srcField = ESMF_FieldCreate(srcGrid, ESMF_TYPEKIND_R8, &
+    gridToFieldMap=(/2,3/), ungriddedLBound=(/1/), ungriddedUBound=(/20/), &
+    rc=rc)
+
+ +

+

+  dstField = ESMF_FieldCreate(dstGrid, ESMF_TYPEKIND_R8, &
+    gridToFieldMap=(/2,3/), ungriddedLBound=(/1/), ungriddedUBound=(/20/), &
+    rc=rc)
+
+ +

+A regrid operation is computed in the usual manner. In order to make the + resulting RouteHandle object suitable for dynamic masking, computations are + pushed completely onto the destination PETs, as in previous examples, by + setting the srcTermProcessing argument to zero. +

+

+  srcTermProcessing=0
+
+  call ESMF_FieldRegridStore(srcField=srcField, dstField=dstField, &
+    srcTermProcessing=srcTermProcessing, routehandle=routehandle, rc=rc)
+
+ +

+The same dynamicMaskRoutine as before can be used when setting up + the ESMF_DynamicMask object. However, the source and destination + Fields now contain 20 undistributed elements at each distributed location, + and the dynamic mask routine will handle all elements that are affected + by the dynamic mask conditions. +

+

+  call ESMF_DynamicMaskSetR8R8R8(dynamicMask, &
+    dynamicSrcMaskValue=srcMaskValue, &
+    dynamicDstMaskValue=dstMaskValue, &
+    dynamicMaskRoutine=simpleDynMaskProc, &
+    rc=rc)
+
+ +

+

+  call ESMF_FieldRegrid(srcField=srcField, dstField=dstField, &
+    routehandle=routehandle, zeroregion=ESMF_REGION_EMPTY, &
+    dynamicMask=dynamicMask, rc=rc)
+
+ +

+Setting the handleAllElements to .true. will pass all elements + to the dynamicMaskRoutine. There are 20 times as many elements + on the source and destination side, and therefore the dynamic masking routine + will handle exactly 20 times as many elements compared to the case without + undistributed dimension. +

+

+  call ESMF_DynamicMaskSetR8R8R8(dynamicMask, &
+    dynamicSrcMaskValue=srcMaskValue, &
+    dynamicDstMaskValue=-2.d0, &
+    dynamicMaskRoutine=simpleHandleAllProc, &
+    handleAllElements=.true., &
+    rc=rc)
+
+ +

+

+  call ESMF_FieldRegrid(srcField=srcField, dstField=dstField, &
+    routehandle=routehandle, zeroregion=ESMF_REGION_EMPTY, &
+    dynamicMask=dynamicMask, rc=rc)
+
+ +

+For the case with handleAllElements=.true., where the entire + vector of undistributed elements is passed to dynamicMaskRoutine at + every distributed location, an alternative implementation option exists for + the dynamic masking routine. In some cases this alternative may result in + more efficient code because it allows to vectorize over the undistributed + elements when summing up the interpolation terms. The alternative interface + for dynamicMaskRoutine is: + +

+

+    interface
+      subroutine ESMF_DynamicMaskRoutineR8R8R8V(dynMaskList, &
+        dynamicSrcMaskValue, dynamicDstMaskValue, rc)
+        use ESMF_UtilTypesMod
+        implicit none
+        type(ESMF_DynamicMaskElementR8R8R8V), pointer       :: dynMaskList(:)
+        real(ESMF_KIND_R8),            intent(in), optional :: dynamicSrcMaskValue
+        real(ESMF_KIND_R8),            intent(in), optional :: dynamicDstMaskValue
+        integer,                       intent(out)  :: rc
+      end subroutine
+    end interface
+
+ +

+The difference compared to the previously used interface is that the first + argument now is of type ESMF_DynamicMaskElementR8R8R8V. This type is + declared as follows: + +

+

+    type ESMF_DynamicMaskElementR8R8R8V
+      real(ESMF_KIND_R8), pointer       :: dstElement(:)
+      real(ESMF_KIND_R8), allocatable   :: factor(:)
+      type(ESMF_PtrR8D1), allocatable   :: srcElement(:)
+    end type
+
+ +

+Here size(dstElement) for every element in dynMaskList is + identical to the vector size, i.e. the number of undistributed elements to + be handled. The same is true for size(srcElement(j)%ptr)), for every + element j of the interpolation stencile. +

+

+  call ESMF_DynamicMaskSetR8R8R8V(dynamicMask, &
+    dynamicSrcMaskValue=srcMaskValue, &
+    dynamicDstMaskValue=-2.d0, &
+    dynamicMaskRoutine=simpleHandleAllProcV, &
+    handleAllElements=.true., &
+    rc=rc)
+
+ +

+

+  call ESMF_FieldRegrid(srcField=srcField, dstField=dstField, &
+    routehandle=routehandle, zeroregion=ESMF_REGION_EMPTY, &
+    dynamicMask=dynamicMask, rc=rc)
+
+ +

+Applying dynamic masking to source and destination fields of other typekind + than R8 only requires that the correct DynamicMaskSet method is chosen. + Here we create real(ESMF_KIND_R4) source and destination fields. +

+

+  srcField = ESMF_FieldCreate(srcGrid, ESMF_TYPEKIND_R4, rc=rc)
+
+ +

+

+  dstField = ESMF_FieldCreate(dstGrid, ESMF_TYPEKIND_R4, rc=rc)
+
+ +

+Computing a suitable RouteHandle is unchanged. +

+

+  srcTermProcessing=0
+
+  call ESMF_FieldRegridStore(srcField=srcField, dstField=dstField, &
+    srcTermProcessing=srcTermProcessing, routehandle=routehandle, rc=rc)
+
+ +

+Now setting some source and destination elements to defined special values + of the correct typekind. +

+

+  call ESMF_FieldGet(srcField, farrayPtr=farrayPtrR4, rc=rc)
+
+ +

+

+  farrayPtrR4(lbound(farrayPtrR4,1)+3,lbound(farrayPtrR4,2)+3) = srcMaskValueR4
+
+ +

+

+  call ESMF_FieldFill(dstField, dataFillScheme="const", const1=0.d0, rc=rc)
+
+ +

+

+  call ESMF_FieldGet(dstField, farrayPtr=farrayPtrR4, rc=rc)
+
+ +

+

+  farrayPtrR4(lbound(farrayPtrR4,1)+1,lbound(farrayPtrR4,2)+1) = dstMaskValueR4
+
+ +

+Setting up the ESMF_DynamicMask object is practically the same as + before, just that the correct typekind-triplet suffix for the + DynamicMaskSet method must be selected, indicating that the + destination data is of typekind R4, the factors are still of typekind R8, + and the source data is of typekind R4. +

+

+  call ESMF_DynamicMaskSetR4R8R4(dynamicMask, &
+    dynamicSrcMaskValue=srcMaskValueR4, &
+    dynamicDstMaskValue=dstMaskValueR4, &
+    dynamicMaskRoutine=simpleDynMaskProcR4R8R4, &
+    rc=rc)
+
+ +

+Finally calling into ESMF_FieldRegrid() with the dynamicMask + object is unchanged. +

+

+  call ESMF_FieldRegrid(srcField=srcField, dstField=dstField, &
+    routehandle=routehandle, zeroregion=ESMF_REGION_EMPTY, &
+    dynamicMask=dynamicMask, rc=rc)
+
+ +

+ + +

+37.3 Restrictions and Future Work +

+ +

+ +

    +
  • Non-blocking communication via the routesyncflag option is implemented for Fields and Arrays. It is not available for FieldBundles and ArrayBundles. The user is advised to use the VMEpoch approach for all cases to achive asynchronicity. + +

    +

  • +
  • The dynamic masking feature currently has the following limitations: + +

    + +

      +
    • Only available for ESMF_TYPEKIND_R8 and ESMF_TYPEKIND_R4 Fields and Arrays. + +

      +

    • +
    • Only available through the ESMF_FieldRegrid() and ESMF_ArraySMM() methods. + +

      +

    • +
    • Destination objects that have undistributed dimensions after any distributed dimension are not supported. + +

      +

    • +
    • No check is implemented that ensure the user-provided RouteHandle object is suitable for dynamic masking. + +

      +

    • +
    + +

    +

  • +
+ +

+37.4 Design and Implementation Notes +

+ +

+Internally all route-based communication calls are implemented as sparse matrix multiplications. The precompute step for all of the supported communication methods can be broken up into three steps: + +

    +
  1. Construction of the sparse matrix for the specific communication method. +
  2. +
  3. Generation of the communication pattern according to the sparse matrix. +
  4. +
  5. Encoding of the communication pattern for each participating PET in form of an XXE stream. +
  6. +
+ +

+37.5 Class API +

+ +

+ +

+ +

+ +

+37.5.1 ESMF_RouteHandleCreate - Create a new RouteHandle from RouteHandle +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_RouteHandleCreate()
+   function ESMF_RouteHandleCreateRH(routehandle, &
+     originPetList, targetPetList, rc)
+
RETURN VALUE: +
     type(ESMF_RouteHandle) :: ESMF_RouteHandleCreateRH
+
ARGUMENTS: +
     type(ESMF_RouteHandle), intent(in)            :: routehandle
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,                intent(in),  optional :: originPetList(:)
+     integer,                intent(in),  optional :: targetPetList(:)
+     integer,                intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Create a new ESMF_RouteHandle object from and existing RouteHandle. + The new RouteHandle can be created to function on a different petList than + the incoming RouteHandle. + +

+The arguments are: +

+
routehandle
+
The RouteHandle object to be duplicated. + +
+
[originPetList]
+
The petList on which the incoming routehandle is defined to operate. + If present, then targetPetList must also be present and of the same + size. The petLists are used to map origin PETs to target PETs. By + convention the petLists are constructed to first list the PETs of the + source component, followed by the PETs of the destination component. + Defaults, to the petList of the current component context, meaning that + the PETs in the RouteHandle are not modified. + +
+
[targetPetList]
+
The petList on which the newly created RouteHandle is defined to operate. + If present, then originPetList must also be present and of the same + size. The petLists are used to map origin PETs to target PETs. By + convention the petLists are constructed to first list the PETs of the + source component, followed by the PETs of the destination component. + Defaults, to the petList of the current component context, meaning that + the PETs in the RouteHandle are not modified. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+37.5.2 ESMF_RouteHandleCreate - Create a new RouteHandle from file +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_RouteHandleCreate()
+   function ESMF_RouteHandleCreateFile(fileName, rc)
+
RETURN VALUE: +
     type(ESMF_RouteHandle) :: ESMF_RouteHandleCreateFile
+
ARGUMENTS: +
     character(*),           intent(in)            :: fileName
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,                intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Create a new ESMF_RouteHandle object from a file. This method must + be called from a VM context that holds exactly as many PETs as were used + when generating the file. + +

+The arguments are: +

+
fileName
+
The name of the RouteHandle file to be read in. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+37.5.3 ESMF_RouteHandleDestroy - Release resources associated with a RouteHandle +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_RouteHandleDestroy(routehandle, &
+     noGarbage, rc)
+
ARGUMENTS: +
     type(ESMF_RouteHandle), intent(inout)          :: routehandle
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     logical,                intent(in),   optional :: noGarbage
+     integer,                intent(out),  optional :: rc
+
+DESCRIPTION: +
+ +

+Destroys an ESMF_RouteHandle, releasing the resources associated + with the object. + +

+The arguments are: +

+
routehandle
+
The ESMF_RouteHandle to be destroyed. + +
+
[noGarbage]
+
If set to .TRUE. the object will be fully destroyed and removed + from the ESMF garbage collection system. Note however that under this + condition ESMF cannot protect against accessing the destroyed object + through dangling aliases - a situation which may lead to hard to debug + application crashes. + +

+It is generally recommended to leave the noGarbage argument + set to .FALSE. (the default), and to take advantage of the ESMF + garbage collection system which will prevent problems with dangling + aliases or incorrect sequences of destroy calls. However this level of + support requires that a small remnant of the object is kept in memory + past the destroy call. This can lead to an unexpected increase in memory + consumption over the course of execution in applications that use + temporary ESMF objects. For situations where the repeated creation and + destruction of temporary objects leads to memory issues, it is + recommended to call with noGarbage set to .TRUE., fully + removing the entire temporary object from memory. + +

+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+37.5.4 ESMF_RouteHandleGet - Get values from a RouteHandle +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_RouteHandleGet()
+   subroutine ESMF_RouteHandleGetP(routehandle, name, vm, rc)
+
ARGUMENTS: +
     type(ESMF_RouteHandle), intent(in)            :: routehandle
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     character(len=*),       intent(out), optional :: name
+     type(ESMF_VM),          intent(out), optional :: vm
+     integer,                intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Returns information about an ESMF_RouteHandle. + +

+The arguments are: +

+
routehandle
+
ESMF_RouteHandle to be queried. + +
+
[name]
+
Name of the RouteHandle object. + +
+
[vm
+
The VM on which the RouteHandle object was created. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+37.5.5 ESMF_RouteHandleIsCreated - Check whether a RouteHandle object has been created +

+ +

+ +

+
+INTERFACE: +

   function ESMF_RouteHandleIsCreated(routehandle, rc)
+
RETURN VALUE: +
     logical :: ESMF_RouteHandleIsCreated
+
ARGUMENTS: +
     type(ESMF_RouteHandle), intent(in)            :: routehandle
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,                intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Return .true. if the routehandle has been created. Otherwise return + .false.. If an error occurs, i.e. rc /= ESMF_SUCCESS is + returned, the return value of the function will also be .false.. + +

+The arguments are: +

+
routehandle
+
ESMF_RouteHandle queried. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+37.5.6 ESMF_RouteHandleSet - Set values in a RouteHandle +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_RouteHandleSet()
+   subroutine ESMF_RouteHandleSetP(routehandle, name, rc)
+
ARGUMENTS: +
     type(ESMF_RouteHandle), intent(inout)         :: routehandle
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     character(len = *),     intent(in),  optional :: name
+     integer,                intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Set an ESMF_RouteHandle attribute with the given value. + +

+The arguments are: +

+
routehandle
+
ESMF_RouteHandle to be modified. + +
+
[name]
+
The RouteHandle name. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+37.5.7 ESMF_RouteHandleWrite - Write the RouteHandle to file +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_RouteHandleWrite(routehandle, fileName, rc)
+
ARGUMENTS: +
     type(ESMF_RouteHandle), intent(inout)         :: routehandle
+     character(*),           intent(in)            :: fileName
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,                intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Write the RouteHandle to file. The generated file can then be used to + re-create the same RouteHandle, on the same number of PETs, using the + ESMF_RouteHandleCreate(fileName=...) method. + +

+The arguments are: +

+
routehandle
+
The ESMF_RouteHandle to be written. + +
+
fileName
+
The name of the output file to which the RouteHandle is written. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ + +

+38 I/O Capability +

+ +

+38.1 Description +

+ +

+The ESMF I/O provides a unified interface for input and output of +high level ESMF objects such as Fields. ESMF I/O capability is integrated +with third-party software such as Parallel I/O (PIO) +to read and write Fortran array data in NetCDF format, and +JSON for Modern C++ +Library to read Info attribute data in JSON format. Other file I/O +functionalities, such as writing of error and log messages, input of +configuration parameters from an ASCII file, and lower-level I/O utilities are +covered in different sections of this document. See the Log Class +49.1, the Config Class 47.1, and the Fortran +I/O Utilities, 53.1 respectively. + +

+ +

+ +
+38.2 Data I/O +

+ +

+ESMF provides interfaces for high performance, parallel I/O using ESMF data +objects such as Arrays and Fields. Currently ESMF only supports I/O of +NetCDF files. The current ESMF implementation relies on the +Parallel I/O (PIO) +library developed as a collaboration between NCAR and DOE laboratories. PIO +is built as part of the ESMF build when the environment variable ESMF_PIO is +set to "internal", or is linked against when ESMF_PIO is set to "external"; by +default ESMF_PIO is not set (which results in using the internal PIO if other +aspects of the ESMF build configuration allow it). When PIO is built with ESMF, +the ESMF methods internally call the PIO interfaces. When ESMF is not built with +PIO, the ESMF methods are non-operable (no-op) stubs that simply return with +a return code of ESMF_RC_LIB_NOT_PRESENT. Details about the environment +variables can be found in ESMF User Guide, "Building and Installing the ESMF", +"Third Party Libraries". + +

+The following methods support parallel data I/O using PIO: + +

+

+
+
ESMF_FieldBundleRead(), section 25.5.19. +
+
+
ESMF_FieldBundleWrite(), section 25.5.39. +
+
+
ESMF_FieldRead(), section 26.6.63. +
+
+
ESMF_FieldWrite(), section 26.6.85. +
+
+
ESMF_ArrayBundleRead(), section 27.5.17. +
+
+
ESMF_ArrayBundleWrite(), section 27.5.28. +
+
+
ESMF_ArrayRead(), section 28.5.28. +
+
+
ESMF_ArrayWrite(), section 28.5.48. +
+
+ +

+ +

+38.3 Data formats +

+ +

+The only format currently supported is NetCDF. The environment variables +ESMF_NETCDF and/or ESMF_PNETCDF must be set to enable this NetCDF-based I/O. +Details about the environment variables can be found in ESMF User Guide, +"Building and Installing the ESMF", "Third Party Libraries". + +

+

+
NetCDF
+
Network Common Data Form (NetCDF) is an interface for +array-oriented data access. The NetCDF library provides an +implementation of the interface. It also defines a +machine-independent format for representing scientific data. Together, +the interface, library, and format support the creation, access, and +sharing of scientific data. The NetCDF software was developed at the +Unidata Program Center in Boulder, Colorado. See [16]. +In geoscience, NetCDF can be naturally used to represent fields +defined on logically rectangular grids. NetCDF use in geosciences is +specified by CF conventions mentioned above [15]. + +

+To the extent that data on unstructured grids (or even observations) can be +represented as one-dimensional arrays, NetCDF can also be used to store these +data. However, it does not provide a high-level abstraction for this type of +data. + +

+

+
+ +

+ +

+38.4 Restrictions and Future Work +

+ +

+ +

    +
  1. Limited data formats supported. +Currently a small fraction of the anticipated data formats is implemented by +ESMF. The data I/O uses NetCDF format, and ESMF Info +I/O uses JSON format. Different libraries are employed for these +different formats. In future development, a more centralized I/O technique +will likely be defined to provide efficient utilities with a set of standard +APIs that will allow manipulation of multiple standard formats. Also, the +ability to automatically detect file formats at runtime will be developed. + +

    +

  2. +
  3. Some limitations with multi-tile I/O. +There are a few limitations when doing I/O on multi-tile Arrays and +Fields (e.g., a cubed sphere grid represented as a six-tile grid): This +I/O requires at least as many PETs as there are tiles, and for I/O of +ArrayBundles and FieldBundles, all Arrays / Fields in the bundle must +contain the same number of tiles. + +

    +

  4. +
  5. Replicated dimensions. +I/O of Arrays / Fields with replicated dimensions (section +28.2.12) is only partially working. In +most situations, replicated dimensions appear as dimensions in the +output file; ideally, these replicated dimensions would be removed in +the output file, and we plan to make that change in the future. +Furthermore, slices of the replicated dimensions other than the first +can have garbage values in the output file. In addition, there is an +inconsistency when outputting Arrays / Fields that have a decomposition +with more than one DE per PET: in this case, replicated dimensions are +removed in the output file. Finally, I/O cannot be performed on +multi-tile Arrays / Fields with replicated dimensions. + +

    +

  6. +
+ +

+ +

+38.5 Design and Implementation Notes +

+ +

+For data I/O, the ESMF I/O capability relies on the +PIO +and +NetCDF +libraries, and optionally the +PNetCDF +library. For Info attribute I/O, the ESMF I/O capability uses the +JSON for Modern C++ +library to perform reading of JSON files. PIO and JSON for Modern C++ +are included with the ESMF distribution; the other libraries must be +installed on the machine of interest. + +

+ +
+esmf_support@ucar.edu +
+ + diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/node6.html b/docs/nightly/fix/reconcile-info/ESMF_refdoc/node6.html new file mode 100644 index 000000000..416ec07e6 --- /dev/null +++ b/docs/nightly/fix/reconcile-info/ESMF_refdoc/node6.html @@ -0,0 +1,30400 @@ + + + + + +5 Infrastructure: Utilities + + + + + + + + + + + + + + + + + + + + + +Subsections + + + +
+ +

+5 Infrastructure: Utilities +

+ + +

+ +

+39 Overview of Infrastructure Utility Classes +

+ +

+The ESMF utilities are a set of tools for quickly assembling modeling applications. + +

+The ESMF Info class enables models to be self-describing via metadata, which are instances of JSON-compatible key-value pairs. + +

+The Time Management Library provides utilities for time and time interval representation and calculation, and higher-level utilities that control model time stepping, via clocks, as well as alarming. + +

+The ESMF Config class provides configuration management based on NASA DAO's Inpak package, a collection of methods for accessing files containing input parameters stored in an ASCII format. + +

+The ESMF LogErr class consists of a variety of methods for writing error, warning, and informational messages to log files. A default Log is created during ESMF initialization. Other Logs can be created later in the code by the user. + +

+The DELayout class provides a layer of abstraction on top of the Virtual Machine (VM) layer. DELayout does this by introducing DEs (Decomposition Elements) as logical resource units. The DELayout object keeps track of the relationship between its DEs and the resources of the associated VM object. A DELayout can be shaped by the user at creation time to best match the computational problem or other design criteria. + +

+The ESMF VM (Virtual Machine) class is a generic representation of hardware and system software resources. There is exactly one VM object per ESMF Component, providing the execution environment for the Component code. The VM class handles all resource management tasks for the Component class and provides a description of the underlying configuration of the compute resources used by a Component. In addition to resource description and management, the VM class offers the lowest level of ESMF communication methods. + +

+The ESMF Fortran I/O utilities provide portable methods to access capabilities which are often implemented in different ways amongst different environments. Currently, two utility methods are implemented: one to find an unopened unit number, and one to flush an I/O buffer. + +

+ +
+40 Info Class (Object Attributes) +

+ +

+All ESMF base objects (i.e. Array, ArrayBundle, Field, FieldBundle, Grid, Mesh, DistGrid) contain a key-value attribute storage object called ESMF_Info. ESMF_Info objects may also be created independent of a base object. ESMF_Info supports setting and getting key-value pairs where the key is a string and the value is a scalar or a list of common data types. An ESMF_Info object may have a flat or nested data structure. The purpose of ESMF_Info is to support I/O-compatible metadata structures (i.e. netCDF), internal record-keeping for model execution (NUOPC), and provide a mechanism for custom user metadata attributes. + +

+ESMF_Info is designed for interoperability. To achieve this goal, ESMF_Info adopted the JSON (Javascript Object Notation) specification. Internally, ESMF_Info uses JSON for Modern C++ [1] to manage its storage map. There are numerous resources for JSON on the web [11]. Quoting from the json.org site [11] when it introduces the format: +

+JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read and write. It is easy for machines to parse and generate. It is based on a subset of the JavaScript Programming Language Standard ECMA-262 3rd Edition - December 1999. JSON is a text format that is completely language independent but uses conventions that are familiar to programmers of the C-family of languages, including C, C++, C#, Java, JavaScript, Perl, Python, and many others. These properties make JSON an ideal data-interchange language. + JSON is built on two structures: +
+
    +
  • A collection of name/value pairs. In various languages, this is realized as an object, record, struct, dictionary, hash table, keyed list, or associative array. +
  • +
  • An ordered list of values. In most languages, this is realized as an array, vector, list, or sequence. + +
  • +
+ These are universal data structures. Virtually all modern programming languages support them in one form or another. It makes sense that a data format that is interchangeable with programming languages also be based on these structures. + +
+ +

+By adopting JSON compliance for ESMF_Info, ESMF made its core metadata capabilities explicitly interoperable with a widely used data structure. If data may be represented with JSON, then it is compatible with ESMF_Info. + +

+There are some aspects of the ESMF_Info implementation related to JSON and JSON for Modern C++ that should be noted: + +

    +
  1. JSON supports 64-bit data types for integers and reals ([3], [2]). I4/R4 is converted to I8/R8 and vice versa. ESMF_Info internally tracks 32-bit sets to ensure the data type may be appropriately queried. +
  2. +
  3. The memory overhead per JSON object (e.g. a key-value pair) requires an additional allocator pointer for type generalization [6]. Hence, the JSON map is not suited for big data storage, offering flexibility in exchange. +
  4. +
  5. Keys are stored in an unordered map sorted in lexicographical order. +
  6. +
+ +

+ +

+40.1 Migrating from Attribute +

+The ESMF_Info class is a replacement for the ESMF_Attribute class and is the preferred way of managing metadata attributes in ESMF moving forward. It is recommended that users migrate existing ESMF_Attribute calls to the new ESMF_Info API. The ESMF_Info class provides the backend for ESMF_Attribute since ESMF version 8.1. The ESMF_Attribute docs are located in appendix 57. In practice, users should experience no friction when migrating client code. Please email ESMF support in the case of a migration issue. Some structural changes to ESMF_Attribute did occur: + +
    +
  • Changed behavior when getting fixed-size lists. List size in storage must match the size of the outgoing list. +
  • +
  • Removed ability to use a default value with list gets. +
  • +
  • Removed attPackInstanceName from all interfaces. +
  • +
  • Removed attcopyFlag from all interfaces. +
  • +
  • Removed ESMF_Attribute-managed object linking. +
  • +
  • Modified ESMF_AttributeAdd to set the target key to a null JSON value. +
  • +
  • Modified ESMF_AttributeSet to not require an attribute added to an ESMF_AttPack be added through ESMF_AttributeAdd before setting. +
  • +
  • Removed support for attribute XML I/O. +
  • +
  • Removed ability to add multiple nested Attribute packages. +
  • +
  • Removed retrieval of "internal" ESMF object Attributes. +
  • +
+ +

+Below are examples for setting and getting an attribute using ESMF_Info and the legacy ESMF_Attribute. The ESMF_Info interfaces are not overloaded for ESMF object types but rather work off a handle retrieved via a get call. + +

+ +

+40.1.1 Setting an Attribute +

+With ESMF_Attribute: +
+call ESMF_AttributeSet(array, "aKey", 15, rc=rc)
+
+With ESMF_Info: +
+call ESMF_InfoGetFromHost(array, info, rc=rc)
+call ESMF_InfoSet(info, "aKey", 15, rc=rc)
+
+ +

+Notice that the legacy ESMF_Attribute API expects the usage of what was called an "Attribute Package". This essentially corresponds to a namespace similar to what ESMF_Info provides for keys via the JSON Pointer syntax (see 40.2). In the above ESMF_AttributeSet() call, without specification of convention and purpose arguments, the resulting JSON pointer of the key is "/ESMF/General/aKey". This is important to account for when mixing deprecated ESMF_Attribute calls with the ESMF_Info API. + +

+ +

+40.1.2 Getting an Attribute +

+With ESMF_Attribute: +
+call ESMF_AttributeGet(array, "aKey", aKeyValue, rc=rc)
+
+With ESMF_Info: +
+call ESMF_InfoGetFromHost(array, info, rc=rc)
+call ESMF_InfoGet(info, "aKey", aKeyValue, rc=rc)
+
+ +

+Notice again that the ESMF_Attribute API automatically prepends "/ESMF/General/" to the JSON pointer used for key in the absence of convention and purpose arguments. + +

+ +

+ +
+40.2 Key Format Overview +

+A key in the ESMF_Info interface provides the location of a value to retrieve from the key-value storage. Keys in the ESMF_Info class use the JSON Pointer syntax [5]. A forward slash is prepended to string keys if it does not exist. Hence, "aKey" and "/aKey" are equivalent. Note the indexing aspect of the JSON Pointer syntax is not supported. + +

+Some examples for valid "key" arguments: + +

    +
  • altitude :: A simple key argument with no nesting. +
  • +
  • /altitude :: A simple key argument with no nesting with the prepended pointer forward slash. +
  • +
  • /altitude/height_above_mean_sea_level :: A key for an attribute "height_above_mean_sea_level" nested in a map identified with key "altitude". +
  • +
+ +

+40.3 Usage and Examples +

+ +

+ +

+ +

+ +

+ +
+40.3.1 Retrieve an Info Handle +

+ This example demonstrates how to retrieve an ESMF_Info object handle + from an ESMF object. ESMF_Info handles are a view into the object's + ESMF_Info storage and should not be created/destroyed + as the ESMF_Info's lifetime is determined by its host object's lifetime. + Destroying the host object will leave a handle in an undefined state. + +

+Variable declarations: +

+

+    type(ESMF_DistGrid) :: distgrid
+    type(ESMF_Array) :: array
+    type(ESMF_Info) :: infoh
+    real(ESMF_KIND_R8), dimension(10,10) :: farray
+    integer :: rc
+
+ +

+Create an ESMF Array. +

+

+    distgrid = ESMF_DistGridCreate(minIndex=(/1,1/), maxIndex=(/10,10/), rc=rc)
+
+ +

+

+    array = ESMF_ArrayCreate(distgrid, farray, indexflag=ESMF_INDEX_DELOCAL, rc=rc)
+
+ +

+Get the ESMF_Info handle from the object. See example 40.3.2 for + additional usage examples. +

+

+    call ESMF_InfoGetFromHost(array, infoh, rc=rc)
+
+ +

+

+
+ +

+Destroy everything except the ESMF_Info object. Attempting to destroy + the ESMF_Info handle will result in an error. +

+

+    call ESMF_ArrayDestroy(array, rc=rc)
+
+ +

+

+    call ESMF_DistGridDestroy(distgrid, rc=rc)
+
+ +

+ + +

+ +

+ +

+ +

+ +
+40.3.2 General Usage Examples +

+ General usage examples for the ESMF_Info class. The demonstrated capabilities are: + +
    +
  • Creating an ESMF_Info object. +
  • +
  • Setting/getting a key-value pair. +
  • +
  • Setting/getting a list value and a list value by index. +
  • +
  • Printing and dumping ESMF_Info contents. +
  • +
  • Checking for key presence and set state (null value check). +
  • +
  • Setting/getting with nesting (hierarchies). +
  • +
  • Inquiring the ESMF_Info object for general item metadata and iteration purposes. +
  • +
  • Copying ESMF_Info contents. +
  • +
  • Removing a key-value pair from the ESMF_Info storage. +
  • +
  • Destroying the ESMF_Info object. + +
  • +
+ +

+Variable declarations: +

+

+    type(ESMF_Info) :: info, infoCopy, infoFromCh
+    type(ESMF_TypeKind_Flag) :: typekind
+    character(len=ESMF_MAXSTR) :: ikey
+    character(:), allocatable :: output, getCh
+    real(ESMF_KIND_R8), dimension(4) :: realList
+    real(ESMF_KIND_R8), dimension(:), allocatable :: realListAlloc
+    integer(ESMF_KIND_I4) :: getInt
+    real(ESMF_KIND_R8) :: getReal
+    integer :: rc, infoSize, ii
+    logical :: isPresent, isSet
+
+ +

+Create an ESMF_Info object. This object contains an empty key-value + store called a JSON object [8]. + +

+An ESMF_Info handle may also be retrieved from an ESMF object as opposed to + creating a standalone ESMF_Info object. See example 40.3.1. +

+

+    info = ESMF_InfoCreate(rc=rc)
+
+ +

+Add an integer value. +

+

+    call ESMF_InfoSet(info, "myIntegerKey", 54, rc=rc)
+
+ +

+Get the integer value we just set. +

+

+    call ESMF_InfoGet(info, "myIntegerKey", getInt, rc=rc)
+
+ +

+Set a list of reals. +

+

+    call ESMF_InfoSet(info, "myListOfReals", (/ 33.3, 44.4, 0.0, 99.0 /), rc=rc)
+
+ +

+Set an index in the new list then retrieve the value. +

+

+    call ESMF_InfoSet(info, "myListOfReals", 1234.0, idx=3, rc=rc)
+
+ +

+

+    call ESMF_InfoGet(info, "myListOfReals", getReal, idx=3, rc=rc)
+
+ +

+Get the values from a list. +

+

+    call ESMF_InfoGet(info, "myListOfReals", realList, rc=rc)
+
+ +

+Allocatable lists may be used through a specific interface. +

+

+    call ESMF_InfoGetAlloc(info, "myListOfReals", realListAlloc, rc=rc)
+
+ +

+The storage contents may be printed directly or dumped to a character. +

+

+    call ESMF_InfoPrint(info, indent=4, rc=rc)
+
+ +

+

+    output = ESMF_InfoDump(info, rc=rc)
+
+ +

+

+    print *, "the Info dump: "//output
+
+ +

+Check if a key is present. +

+

+    isPresent = ESMF_InfoIsPresent(info, "myIntegerKey", rc=rc)
+
+ +

+

+    if (.not. isPresent) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+ +

+Add a null value and check if it is set (has a non-null value). +

+

+    call ESMF_InfoSetNULL(info, "aNullKey", rc=rc)
+
+ +

+

+    isSet = ESMF_InfoIsSet(info, "aNullKey", rc=rc)
+
+ +

+

+    if (isSet) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+    isSet = ESMF_InfoIsSet(info, "myIntegerKey", rc=rc)
+
+ +

+

+    if (.not. isSet) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+ +

+The force flag, when set to false, will cause an error if the key exists in the + map. The force flag is set to true by default. +

+

+    call ESMF_InfoSet(info, "myIntegerKey", 33, force=.false., rc=rc)
+    if (rc .ne. ESMC_RC_CANNOT_SET) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+ +

+Nesting uses the JSON Pointer 40.2 syntax. All key arguments + in ESMF_Info may use this syntax unless noted otherwise. When creating + a nested object, objects are created if they do not exist. Hence, it is not necessary + to create the individual nested elements for deep hierarchies. +

+

+    call ESMF_InfoSet(info, "/Universe/Galaxy/Star/Planet", "Venus", rc=rc)
+
+ +

+Using the get interface, it is possible to iterate over the storage contents. + In the call below, we are retrieving the number of elements (key-value pairs) + that exist in our root storage object. We then select the target element in root + using an index and retrieve some additional metadata for the target object. +

+

+    call ESMF_InfoGet(info, size=infoSize, rc=rc)
+
+ +

+

+    do ii=1,infoSize
+      call ESMF_InfoGet(info, idx=ii, ikey=ikey, typekind=typekind, rc=rc)
+
+ +

+

+      if (localPet == 0) then
+        print *, "ESMF_Info inquire loop: "
+        print *, "       idx= ", ii
+        print *, "      ikey= ", trim(ikey)
+        print *, "  typekind= ", typekind
+      endif
+    enddo
+
+ +

+Copying the ESMF_Info object requires the copy to be destroyed/deallocated. +

+

+    infoCopy = ESMF_InfoCreate(info, rc=rc)
+
+ +

+Comparison operators = and /= are implemented for ESMF_Info objects. +

+

+    if (infoCopy /= info) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+ +

+After removing a key from the copied ESMF_Info object, the two objects will no + longer be equal. +

+

+    call ESMF_InfoRemove(infoCopy, "myIntegerKey", rc=rc)
+
+ +

+

+    if (infoCopy == info) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+ +

+Destroy the copied object. +

+

+    call ESMF_InfoDestroy(infoCopy, rc=rc)
+
+ +

+An ESMF_Info object may be created from a JSON string. Note the usage of quotes + is required as below. +

+

+    infoFromCh = ESMF_InfoCreate('{"hello":"world"}', rc=rc)
+
+ +

+The contents of an ESMF_Info object may be set in another ESMF_Info object. +

+

+    call ESMF_InfoSet(info, "infoFromCh", infoFromCh, rc=rc)
+
+ +

+

+    call ESMF_InfoDestroy(infoFromCh, rc=rc)
+
+ +

+An allocatable character get interface is available. +

+

+    call ESMF_InfoGetCharAlloc(info, "/infoFromCh/hello", getCh, rc=rc)
+
+ +

+Destroy the ESMF_Info object. +

+

+    call ESMF_InfoDestroy(info, rc=rc)
+
+ +

+ + +

+40.4 Class API +

+ +

+ +

+ +

+ +

+40.4.1 ESMF_InfoAssignment(=) - Info assignment +

+ +

+ +

+
+INTERFACE: +

     interface assignment(=)
+     info1 = info2
+
ARGUMENTS: +
     type(ESMF_Info) :: info1
+     type(ESMF_Info) :: info2
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Assign info1 as an alias to the same ESMF Info object in memory + as info2. If info2 is invalid, then info1 will be equally invalid after + the assignment. + +

+The arguments are: +

+
info1
+
The ESMF_Info object on the left hand side of the assignment. + +
+
info2
+
The ESMF_Info object on the right hand side of the assignment. + +
+
+ +

+ +

+ +

+40.4.2 ESMF_InfoOperator(==) - Info equality operator +

+ +

+ +

+
+INTERFACE: +

 interface operator(==)
+
RETURN VALUE: +
     logical :: result
+
ARGUMENTS: +
      type(ESMF_Info), intent(in) :: info1
+      type(ESMF_Info), intent(in) :: info2
+
+DESCRIPTION: +
+ +

+Test if the contents of two ESMF_Info objects are equal. + +

+The arguments are: +

+
info1
+
The ESMF_Info object on the left hand side of the operation. + +
+
info1
+
The ESMF_Info object on the right hand side of the operation. + +
+
+ +

+ +

+ +

+40.4.3 ESMF_InfoOperator(/=) - Info not equal operator +

+ +

+ +

+
+INTERFACE: +

 interface operator(/=)
+
RETURN VALUE: +
     logical :: result
+
ARGUMENTS: +
      type(ESMF_Info), intent(in) :: info1
+      type(ESMF_Info), intent(in) :: info2
+
+DESCRIPTION: +
+ +

+Test if the contents of two ESMF_Info objects are not equal. + +

+The arguments are: +

+
info1
+
The ESMF_Info object on the left hand side of the operation. + +
+
info1
+
The ESMF_Info object on the right hand side of the operation. + +
+
+ +

+ +

+ +

+40.4.4 ESMF_InfoBroadcast - Broadcast Info contents +

+ +

+ +

+ +

+
+INTERFACE: +

 subroutine ESMF_InfoBroadcast(info, rootPet, rc)
+
ARGUMENTS: +
   type(ESMF_Info), intent(inout) :: info
+   integer, intent(in) :: rootPet
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+   integer, intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Broadcast an ESMF_Info object collectively across the current VM. + +

+Users wishing to synchronize via broadcast an attribute hierarchy associated + with an ESMF object should consult the ESMF_InfoSync documentation + 40.4.29 + +

+The arguments are: +

+
info
+
The ESMF_Info object that is the source (on rootPet) or the + destination object to populate (on all other PETs). On destination PETs, + the structure of info is overwritten with data from rootPet. + +
+
rootPet
+
The root PET identifier. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+40.4.5 ESMF_InfoCreate - Create a new Info object +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_InfoCreate()
+ function ESMF_InfoCreateEmpty(rc)
+
ARGUMENTS: +
   integer, intent(out), optional :: rc
+
RETURN VALUE: +
   type(ESMF_Info) :: ESMF_InfoCreateEmpty
+
+DESCRIPTION: +
+ +

+Create an ESMF_Info object. This object must be destroyed using + ESMF_InfoDestroy to free its memory allocation + +

+The arguments are: +

+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+40.4.6 ESMF_InfoCreate - Create a new Info object using a key +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_InfoCreate()
+ function ESMF_InfoCreateByKey(info, key, rc)
+
ARGUMENTS: +
   type(ESMF_Info), intent(in) :: info
+   character(len=*), intent(in) :: key
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+   integer, intent(out), optional :: rc
+
RETURN VALUE: +
   type(ESMF_Info) :: ESMF_InfoCreateByKey
+
+DESCRIPTION: +
+ +

+Create an ESMF_Info object from a location in info + defined by key. Returned object is a deep copy. The value associated + with key must be a nested object (i.e. a collection of key/value + pairs). + +

+The arguments are: +

+
info
+
The ESMF_Info object providing source data. + +
+
key
+
String key to access in ESMF_Info storage. See section 40.2 + for an overview of the key format. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+40.4.7 ESMF_InfoCreate - Create an Info object from another Info object +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_InfoCreate()
+ function ESMF_InfoCreateFromInfo(info, rc)
+
ARGUMENTS: +
   type(ESMF_Info), intent(in) :: info
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+   integer, intent(out), optional :: rc
+
RETURN VALUE: +
   type(ESMF_Info) :: ESMF_InfoCreateFromInfo
+
+DESCRIPTION: +
+ +

+Create an ESMF_Info object from another ESMF_Info object. + The returned object is a deep copy of the source object. + +

+The arguments are: +

+
info
+
The ESMF_Info object acting as the source data. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+40.4.8 ESMF_InfoCreate - Create a new Info object by string parsing +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_InfoCreate()
+ function ESMF_InfoCreateByParse(jsonString, rc)
+
ARGUMENTS: +
   character(len=*), intent(in) :: jsonString
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+   integer, intent(out), optional :: rc
+
RETURN VALUE: +
   type(ESMF_Info) :: ESMF_InfoCreateByParse
+
+DESCRIPTION: +
+ +

+Create an ESMF_Info object by parsing a JSON-formatted string. + +

+The arguments are: +

+
jsonString
+
The string to parse. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+40.4.9 ESMF_InfoDestroy - Destroy an Info object +

+ +

+ +

+
+INTERFACE: +

 subroutine ESMF_InfoDestroy(info, rc)
+
ARGUMENTS: +
   type(ESMF_Info), intent(inout) :: info
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+   integer, intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Destroy an ESMF_Info object. Destroying an ESMF_Info + object created internally by an ESMF object results in an error + +

+The arguments are: +

+
info
+
Target ESMF_Info object. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+40.4.10 ESMF_InfoDump - Dump Info contents to string +

+ +

+ +

+
+INTERFACE: +

 function ESMF_InfoDump(info, key, indent, rc) result(output)
+
ARGUMENTS: +
   type(ESMF_Info), intent(in) :: info
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+   character(*), intent(in), optional :: key
+   integer, intent(in), optional :: indent
+   integer, intent(out), optional :: rc
+   RESULT:
+   character(:), allocatable :: output
+
+DESCRIPTION: +
+ +

+Dump the contents of an ESMF_Info object as a JSON string. + +

+The arguments are: +

+
info
+
Target ESMF_Info object. + +
+
[key]
+
String key to access in ESMF_Info storage. See section 40.2 + for an overview of the key format. + +
+
[indent]
+
Default is 0. Specifying an indentation greater than 0 will result in a + "pretty print" for JSON output string (string includes new line breaks). + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+40.4.11 ESMF_InfoGet - Get a numeric, logical, or fixed-size character value +

+ +

+ +

+
+INTERFACE: +

  subroutine ESMF_InfoGet(info, key, value, default, idx, attnestflag, rc)
+
ARGUMENTS: +
    type(ESMF_Info), intent(in) :: info
+    character(len=*), intent(in) :: key
+    <value>, see below for supported value
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+    <default, optional> see below for supported default value
+    integer, intent(in), optional :: idx
+    type(ESMF_AttNest_Flag), intent(in), optional :: attnestflag
+    integer, intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Get a value from an ESMF_Info object using a key. If the key is + not found, rc will not equal ESMF_SUCCESS. The returned + value is always a copy including gets with a default. + +

+Overloaded value for the following types: + +

    +
  • integer(kind=ESMF_KIND_I4) +
  • +
  • integer(kind=ESMF_KIND_I8) +
  • +
  • real(kind=ESMF_KIND_R4) +
  • +
  • real(kind=ESMF_KIND_R8) +
  • +
  • logical +
  • +
  • character(:) + +
  • +
+ +

+The arguments are: +

+
info
+
Target ESMF_Info object. + +
+
key
+
String key to access in ESMF_Info storage. See section 40.2 + for an overview of the key format. + +
+
value
+
The output value associated with the key. + +
+
[default]
+
A default value to use if the key is not present in the target ESMF_Info + object. Must be the same typekind and size as value. + +
+
[idx]
+
An integer index to get if the target key's value is a list. + +
+
[attnestflag]
+
Setting to ESMF_ATTNEST_ON triggers a recursive search. The + first instance of the key (searching by depth) will be found in the hierarchy. + Default is ESMF_ATTNEST_OFF. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+40.4.12 ESMF_InfoGetCharAlloc - Get an allocatable character value +

+ +

+ +

+
+INTERFACE: +

  subroutine ESMF_InfoGetCharAlloc(info, key, value, default, idx, attnestflag, rc)
+
ARGUMENTS: +
    type(ESMF_Info), intent(in) :: info
+    character(len=*), intent(in) :: key
+    character(:), allocatable, intent(out) :: value
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+    character(len=*), intent(in), optional :: default
+    integer, intent(in), optional :: idx
+    type(ESMF_AttNest_Flag), intent(in), optional :: attnestflag
+    integer, intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Get a value from an ESMF_Info object using a key. If the key is + not found, rc will not equal ESMF_SUCCESS. The returned + value is always a copy including gets with a default. + +

+The arguments are: +

+
info
+
Target ESMF_Info object. + +
+
key
+
String key to access in ESMF_Info storage. See section 40.2 + for an overview of the key format. + +
+
value
+
The output value associated with the key. + +
+
[default]
+
A default value to use if the key is not present in the target ESMF_Info + object. Must be the same typekind and size as value. + +
+
[idx]
+
An integer index to get if the target key's value is a list. + +
+
[attnestflag]
+
Setting to ESMF_ATTNEST_ON triggers a recursive search. The + first instance of the key (searching by depth) will be found in the hierarchy. + Default is ESMF_ATTNEST_OFF. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+40.4.13 ESMF_InfoGet - Get a list +

+ +

+ +

+
+INTERFACE: +

  subroutine ESMF_InfoGet(info, key, values, itemCount, attnestflag, scalarToArray, rc)
+
ARGUMENTS: +
    type(ESMF_Info), intent(in) :: info
+    character(len=*), intent(in) :: key
+    <values>, see below for supported values
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+    integer, intent(out), optional :: itemCount
+    type(ESMF_AttNest_Flag), intent(in), optional :: attnestflag
+    logical, intent(in), optional :: scalarToArray
+    integer, intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Get a value list from an ESMF_Info object using a key. If the key + is not found, rc will not equal ESMF_SUCCESS. The returned + value is always a copy. + +

+The length of values must match its length in storage. + +

+Overloaded values for the following types: + +

    +
  • integer(kind=ESMF_KIND_I4), dimension(:) +
  • +
  • integer(kind=ESMF_KIND_I8), dimension(:) +
  • +
  • real(kind=ESMF_KIND_R4), dimension(:) +
  • +
  • real(kind=ESMF_KIND_R8), dimension(:) +
  • +
  • logical, dimension(:) +
  • +
  • character(:), dimension(:) + +
  • +
+ +

+The arguments are: +

+
info
+
Target ESMF_Info object. + +
+
key
+
String key to access in ESMF_Info storage. See section 40.2 + for an overview of the key format. + +
+
values
+
The output value list associated with the key. + +
+
[itemCount]
+
The number of items in values. + +
+
[attnestflag]
+
Default is ESMF_ATTNEST_OFF. Setting to ESMF_ATTNEST_ON + triggers a recursive search. The first instance of the key will be found + in the hierarchy. + +
+
[scalarToArray]
+
Default is false. If true, allow conversion of scalar values in storage + to single-valued lists. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+40.4.14 ESMF_InfoGetAlloc - Get an allocatable list +

+ +

+ +

+
+INTERFACE: +

  subroutine ESMF_InfoGetAlloc(info, key, values, itemCount, attnestflag, scalarToArray, rc)
+
ARGUMENTS: +
    type(ESMF_Info), intent(in) :: info
+    character(len=*), intent(in) :: key
+    <values>, see below for supported values
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+    integer, intent(out), optional :: itemCount
+    type(ESMF_AttNest_Flag), intent(in), optional :: attnestflag
+    logical, intent(in), optional :: scalarToArray
+    integer, intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Get a value list from an ESMF_Info object using a key. If the key + is not found, rc will not equal ESMF_SUCCESS. The returned + value is always a copy. + +

+Overloaded values for the following types: + +

    +
  • integer(kind=ESMF_KIND_I4), dimension(:), allocatable +
  • +
  • integer(kind=ESMF_KIND_I8), dimension(:), allocatable +
  • +
  • real(kind=ESMF_KIND_R4), dimension(:), allocatable +
  • +
  • real(kind=ESMF_KIND_R8), dimension(:), allocatable +
  • +
  • logical, dimension(:), allocatable +
  • +
  • character(:), dimension(:), allocatable + +
  • +
+ +

+The arguments are: +

+
info
+
Target ESMF_Info object. + +
+
key
+
String key to access in ESMF_Info storage. See section 40.2 + for an overview of the key format. + +
+
values
+
The output value list associated with the key. + +
+
[itemCount]
+
The number of items in values. + +
+
[attnestflag]
+
Default is ESMF_ATTNEST_OFF. Setting to ESMF_ATTNEST_ON + triggers a recursive search. The first instance of the key will be found + in the hierarchy. + +
+
[scalarToArray]
+
Default is false. If true, allow conversion of scalar values in storage + to single-valued lists. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+40.4.15 ESMF_InfoGet - Inquire an Info object for metadata +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_InfoGet()
+  subroutine ESMF_InfoInquire(info, size, key, jsonType, isArray, &
+    isDirty, idx, typekind, ikey, isPresent, isStructured, isNull, rc)
+
ARGUMENTS: +
    type(ESMF_Info), intent(in) :: info
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+    integer, intent(out), optional :: size
+    character(len=*), intent(in), optional :: key
+    character(len=*), intent(out), optional :: jsonType
+    logical, intent(out), optional :: isArray
+    logical, intent(out), optional :: isDirty
+    integer, intent(in), optional :: idx
+    type(ESMF_TypeKind_Flag), intent(out), optional :: typekind
+    character(len=*), intent(out), optional :: ikey
+    logical, intent(out), optional :: isPresent
+    logical, intent(out), optional :: isStructured
+    logical, intent(out), optional :: isNull
+    integer, intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Inquire an ESMF_Info object for metadata. + +

+The arguments are: +

+
info
+
Target ESMF_Info object. + +
+
[size]
+
Returns the size of the target. The following rules apply: + +
    +
  • If the target is an object, return the number of key-value pairs. +
  • +
  • If the target is a scalar, return 1. +
  • +
  • If the target is an array, return its length. + +
  • +
+ +
+
[key]
+
If provided, use this location as the origin instead of root. See section + 40.2 for an overview of the key format. + +
+
[jsonType]
+
Returns the JSON object type name [9]. + +
+
[isArray]
+
Returns true if the target is an array. + +
+
[isDirty]
+
Returns true if the ESMF_Info object should be synchronized during + an ESMF_InfoSync operation. + +
+
[idx]
+
An integer index to use. This will index into an object type providing + the primary mechanism for iteration. + +
+
[typekind]
+
Get the ESMF typekind for the target. The minimum typekind required to + hold the value is returned. + See section 54.61 for valid values. + +
+
[ikey]
+
If present, this will be set to the key's name for the current inquire. + Useful when iterating using an index. This does not return the full key + path if nested. + +
+
[isPresent]
+
Returns true if the key exists in storage. If no key + is provided, this will return true. + +
+
[isStructured]
+
Returns true if the target is structured [4]. + This means it is either an object (a map) or an array. + +
+
[isNull]
+
Returns true if the target is null [7]. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+40.4.16 ESMF_InfoGetFromHost - Get an Info handle from an ESMF object +

+ +

+ +

+
+INTERFACE: +

  subroutine ESMF_InfoGetFromHost(host, info, rc)
+
ARGUMENTS: +
    type(ESMF_*), intent(inout) :: host
+    type(ESMF_Info), intent(out) :: info
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+    integer, intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Get an ESMF_Info object handle from a host ESMF object. The returned + handle should not be destroyed. + +

+The arguments are: +

+
host
+
Target ESMF object. Overloaded for: + +
    +
  • ESMF_Array +
  • +
  • ESMF_ArrayBundle +
  • +
  • ESMF_CplComp +
  • +
  • ESMF_GridComp +
  • +
  • ESMF_SciComp +
  • +
  • ESMF_DistGrid +
  • +
  • ESMF_Field +
  • +
  • ESMF_FieldBundle +
  • +
  • ESMF_Grid +
  • +
  • ESMF_State +
  • +
  • ESMF_LocStream +
  • +
  • ESMF_Mesh + +
  • +
+ +
+
info
+
Outgoing ESMF_Info object. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+40.4.17 ESMF_InfoGetTK - Retrieve the ESMF TypeKind for a key +

+ +

+ +

+
+INTERFACE: +

 function ESMF_InfoGetTK(info, key, attnestflag, rc) result(typekind)
+
ARGUMENTS: +
   type(ESMF_Info), intent(in) :: info
+   character(len=*), intent(in) :: key
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+   type(ESMF_AttNest_Flag), intent(in), optional :: attnestflag
+   integer, intent(out), optional :: rc
+
RETURN VALUE: +
   type(ESMF_TypeKind_Flag) :: typekind
+
+DESCRIPTION: +
+ +

+Return the ESMF TypeKind of the value associated with key. + See section 54.61 for valid return values. + +

+The arguments are: +

+
info
+
Target ESMF_Info object. + +
+
key
+
String key to access in ESMF_Info storage. See section 40.2 + for an overview of the key format. + +
+
[attnestflag]
+
Setting to ESMF_ATTNEST_ON triggers a recursive search for + keyParent. The first instance of the key will be found in the + hierarchy. Default is ESMF_ATTNEST_OFF. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+40.4.18 ESMF_InfoGetArrayMeta - Retrieve array metadata information +

+ +

+ +

+
+INTERFACE: +

 subroutine ESMF_InfoGetArrayMeta(info, key, isArray, size, attnestflag, rc)
+
ARGUMENTS: +
   type(ESMF_Info), intent(in) :: info
+   character(len=*), intent(in) :: key
+   logical, intent(out) :: isArray
+   integer(C_INT), intent(out) :: size
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+   type(ESMF_AttNest_Flag), intent(in), optional :: attnestflag
+   integer, intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Return a value's array status and size using a key. + +

+The arguments are: +

+
info
+
Target ESMF_Info object. + +
+
key
+
String key to access in ESMF_Info storage. See section 40.2 + for an overview of the key format. + +
+
isArray
+
Set to true if the target is an array in storage. + +
+
size
+
Set to the size of the target object in storage (i.e. length of the array). + +
+
[attnestflag]
+
Setting to ESMF_ATTNEST_ON triggers a recursive search for + keyParent. The first instance of the key will be found in the + hierarchy. Default is ESMF_ATTNEST_OFF. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+40.4.19 ESMF_InfoIsPresent - Check for key presence +

+ +

+ +

+
+INTERFACE: +

 function ESMF_InfoIsPresent(info, key, attnestflag, isPointer, rc) result(is_present)
+
ARGUMENTS: +
   type(ESMF_Info), intent(in) :: info
+   character(len=*), intent(in) :: key
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+   type(ESMF_AttNest_Flag), intent(in), optional :: attnestflag
+   logical, intent(in), optional :: isPointer
+   integer, intent(out), optional :: rc
+
RETURN VALUE: +
   logical :: is_present
+
+DESCRIPTION: +
+ +

+Return true if key exists in ESMF_Info's storage. + +

+The arguments are: +

+
info
+
Target ESMF_Info object. + +
+
key
+
String key to access in ESMF_Info storage. See section 40.2 + for an overview of the key format. + +
+
[attnestflag]
+
Setting to ESMF_ATTNEST_ON triggers a recursive search for + keyParent. The first instance of the key will be found in the + hierarchy. Default is ESMF_ATTNEST_OFF. + +
+
[isPointer]
+
Default is true. If true, expect the key is using JSON Pointer + syntax (see section 40.2). Setting to false will trigger + a slightly faster search. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+40.4.20 ESMF_InfoIsSet - Check if a value is null +

+ +

+ +

+
+INTERFACE: +

 function ESMF_InfoIsSet(info, key, rc) result(is_set)
+
ARGUMENTS: +
   type(ESMF_Info), intent(in) :: info
+   character(len=*), intent(in) :: key
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+   integer, intent(out), optional :: rc
+
RETURN VALUE: +
   logical :: is_set
+
+DESCRIPTION: +
+ +

+Returns true if the target value is not null [7]. + +

+The arguments are: +

+
info
+
Target ESMF_Info object. + +
+
key
+
String key to access in ESMF_Info storage. See section 40.2 + for an overview of the key format. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+40.4.21 ESMF_InfoPrint - Print contents of an Info object +

+ +

+ +

+
+INTERFACE: +

 subroutine ESMF_InfoPrint(info, indent, preString, unit, rc)
+
ARGUMENTS: +
   type(ESMF_Info), intent(in) :: info
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+   character(*), intent(in), optional :: preString
+   character(*), intent(out), optional :: unit
+   integer, intent(in), optional :: indent
+   integer, intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Print ESMF_Info contents in JSON format. + +

+The arguments are: +

+
info
+
Target ESMF_Info object. + +
+
[indent]
+
Default is 0. Specify a "pretty print" indentation for the JSON output string. + +
+
[preString]
+
Optionally prepended string. Default to empty string. + +
+
[unit]
+
Internal unit, i.e. a string. Default to printing to stdout. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+40.4.22 ESMF_InfoReadJSON - Read JSON data from file +

+ +

+ +

+
+INTERFACE: +

 function ESMF_InfoReadJSON(filename, rc) result(info_r)
+
ARGUMENTS: +
   character(len=*), intent(in) :: filename
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+   integer, intent(out), optional :: rc
+
RETURN VALUE: +
   type(ESMF_Info) :: info_r
+
+DESCRIPTION: +
+ +

+Read JSON data from a file and return a new ESMF_Info object. + +

+The arguments are: +

+
filename
+
Path to the input file. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+40.4.23 ESMF_InfoRemove - Remove a key-value pair from an Info object +

+ +

+ +

+
+INTERFACE: +

 subroutine ESMF_InfoRemove(info, keyParent, keyChild, attnestflag, rc)
+
ARGUMENTS: +
   type(ESMF_Info), intent(inout) :: info
+   character(len=*), intent(in) :: keyParent
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+   character(len=*), intent(in), optional :: keyChild
+   type(ESMF_AttNest_Flag), intent(in), optional :: attnestflag
+   integer, intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Remove a key-value pair from an ESMF_Info object. + +

+The arguments are: +

+
info
+
Target ESMF_Info object. + +
+
keyParent
+
String key to identify the parent location for the removal. If no keyChild + is specified, then the root location is assumed. See section 40.2 + for an overview of the key format. + +
+
[keyChild]
+
String key to identify the value for the removal. This may not + be a path. + +
+
[attnestflag]
+
Setting to ESMF_ATTNEST_ON triggers a recursive search for + keyParent. The first instance of the key will be found in the + hierarchy. Default is ESMF_ATTNEST_OFF. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+40.4.24 ESMF_InfoSet - Set a value +

+ +

+ +

+
+INTERFACE: +

  subroutine ESMF_InfoSet(info, key, value, force, idx, pkey, rc)
+
ARGUMENTS: +
    type(ESMF_Info), intent(inout) :: info
+    character(len=*), intent(in) :: key
+    <value>, see below for supported value
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+    logical, intent(in), optional :: force
+    integer, intent(in), optional :: idx
+    character(len=*), intent(in), optional :: pkey
+    integer, intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Set a value in an ESMF_Info object using a key. + +

+Overloaded value for the following types: + +

    +
  • integer(kind=ESMF_KIND_I4) +
  • +
  • integer(kind=ESMF_KIND_I8) +
  • +
  • real(kind=ESMF_KIND_R4) +
  • +
  • real(kind=ESMF_KIND_R8) +
  • +
  • logical +
  • +
  • character(:) + +
  • +
+ +

+The arguments are: +

+
info
+
Target ESMF_Info object. + +
+
key
+
String key to access in ESMF_Info storage. See section 40.2 + for an overview of the key format. + +
+
value
+
The input value associated with the key. + +
+
[force]
+
Default is true. When true, insert the key even if it already exists in + storage. If false, rc will not return ESMF_SUCCESS if the + key already exists. + +
+
[idx]
+
An integer index to set if the target key's value is a list. + +
+
[pkey]
+
Use this key's location as the origin for the set call. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+40.4.25 ESMF_InfoSet - Set a key to the contents of an Info object +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_InfoSet
+ subroutine ESMF_InfoSetINFO(info, key, value, force, rc)
+
ARGUMENTS: +
   type(ESMF_Info), intent(inout) :: info
+   character(len=*), intent(in) :: key
+   type(ESMF_Info), intent(in) :: value
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+   logical, intent(in), optional :: force
+   integer, intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Set a value to the contents of an ESMF_Info object. A copy of + the source contents is made. + +

+The arguments are: +

+
info
+
Target ESMF_Info object. + +
+
key
+
String key to access in ESMF_Info storage. See section 40.2 + for an overview of the key format. + +
+
value
+
The ESMF_Info object to use as source data. + +
+
[force]
+
Default is true. When true, insert the key even if it already exists in + storage. If false, rc will not return ESMF_SUCCESS if the + key already exists. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+40.4.26 ESMF_InfoSet - Set contents from a HConfig object +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_InfoSet
+ recursive subroutine ESMF_InfoSetHConfig(info, value, keyPrefix, force, rc)
+
ARGUMENTS: +
   type(ESMF_Info), intent(inout) :: info
+   type(ESMF_HConfig), intent(in) :: value
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+   character(len=*), intent(in), optional :: keyPrefix
+   logical, intent(in), optional :: force
+   integer, intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+The provided ESMF_HConfig object is expected to be a map. + An error is returned if this condition is not met. Each key-value pair + held by the ESMF_HConfig object is added to the + ESMF_Info object. A copy of the source contents is made. + +

+Transfer of scalar, sequence, and map values + from ESMF_HConfig to ESMF_Info are supported. + Maps are treated recursively. Sequences are restricted to scalar elements + of the same typekind. + +

+The keys of any map provided by the ESMF_HConfig object must + be of scalar type. Keys are interpreted as strings when transferred to the + ESMF_Info object. YAML merge keys "«" are supported. + +

+When existing keys in info are overridden by this operation, the + typekind of the associated value element is allowed to change. + +

+The arguments are: +

+
info
+
Target ESMF_Info object. + +
+
value
+
The ESMF_HConfig object to use as source data. + +
+
[keyPrefix]
+
If provided, prepend keyPrefix to each of the keys found in the + value map. + +
+
[force]
+
Default is true. When true, insert the key even if it already exists in + storage. If false, rc will not return ESMF_SUCCESS if the + key already exists. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+40.4.27 ESMF_InfoSet - Set a value list +

+ +

+ +

+
+INTERFACE: +

  subroutine ESMF_InfoSet(info, key, values, force, pkey, rc)
+
ARGUMENTS: +
    type(ESMF_Info), intent(inout) :: info
+    character(len=*), intent(in) :: key
+    <values>, see below for supported values
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+    logical, intent(in), optional :: force
+    character(len=*), intent(in), optional :: pkey
+    integer, intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Set a value list in an ESMF_Info object using a key. List values + are initialized to null. + +

+Overloaded values for the following types: + +

    +
  • integer(kind=ESMF_KIND_I4), dimension(:) +
  • +
  • integer(kind=ESMF_KIND_I8), dimension(:) +
  • +
  • real(kind=ESMF_KIND_R4), dimension(:) +
  • +
  • real(kind=ESMF_KIND_R8), dimension(:) +
  • +
  • logical, dimension(:) +
  • +
  • character(:), dimension(:) + +
  • +
+ +

+The arguments are: +

+
info
+
Target ESMF_Info object. + +
+
key
+
String key to access in ESMF_Info storage. See section 40.2 + for an overview of the key format. + +
+
values
+
The input value list associated with the key. + +
+
[force]
+
Default is true. When true, insert the key even if it already exists in + storage. If false, rc will not return ESMF_SUCCESS if the + key already exists. + +
+
[pkey]
+
Use this key's location as the origin for the set call. Used primarily + for recursive requirements related to ESMF_Attribute. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+40.4.28 ESMF_InfoSetNULL - Set a value to null +

+ +

+ +

+
+INTERFACE: +

 subroutine ESMF_InfoSetNULL(info, key, force, rc)
+
ARGUMENTS: +
   type(ESMF_Info), intent(inout) :: info
+   character(len=*), intent(in) :: key
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+   logical, intent(in), optional :: force
+   integer, intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Set a value to null [7]. + +

+The arguments are: +

+
info
+
Target ESMF_Info object. + +
+
key
+
String key to access in ESMF_Info storage. See section 40.2 + for an overview of the key format. + +
+
[force]
+
Default is true. When true, insert the key even if it already exists in + storage. If false, rc will not return ESMF_SUCCESS if the + key already exists. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+40.4.29 ESMF_InfoSync - Synchronize Info contents across a VM +

+ +

+ +

+ +

+
+INTERFACE: +

  subroutine ESMF_InfoSync(host, rootPet, vm, markClean, &
+     rc)
+
ARGUMENTS: +
    type(ESMF_*), intent(inout) :: host
+    integer, intent(in) :: rootPet
+    type(ESMF_VM), intent(in) :: vm
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+    logical, intent(in), optional :: markClean
+    integer, intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Synchronize ESMF_Info contents collectively across the current VM. + Contents on the rootPet are set as the contents on matching objects + sharing the VM. An attempt is made to optimize by only communicating updated + contents (i.e. something set or modified). This subroutine will traverse + the ESMF object hierarchy associated with host (i.e. Arrays in + an ArrayBundle, Fields in a FieldBundle, etc.). + +

+Users interested in broadcasting only the ESMF_Info object should + consult the ESMF_InfoBroadcast documentation 40.4.4. + +

+The arguments are: +

+
host
+
Target ESMF object. Overloaded for: + +
    +
  • ESMF_State +
  • +
  • ESMF_CplComp +
  • +
  • ESMF_GridComp +
  • +
  • ESMF_SciComp +
  • +
  • ESMF_Field +
  • +
  • ESMF_FieldBundle + +
  • +
+ +
+
rootPet
+
The root PET to use for the synchronization. + +
+
vm
+
The VM to synchronize across. + +
+
[markClean]
+
Default is false. If true, mark changed ESMF_Info contents as + clean once synchronized. These contents will no longer be broadcast in + consecutive calls to ESMF_InfoSync. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+40.4.30 ESMF_InfoUpdate - Update the contents of an Info object +

+ +

+ +

+
+INTERFACE: +

 subroutine ESMF_InfoUpdate(lhs, rhs, recursive, overwrite, rc)
+
ARGUMENTS: +
   type(ESMF_Info), intent(inout) :: lhs
+   type(ESMF_Info), intent(in) :: rhs
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+   logical, intent(in), optional :: recursive
+   logical, intent(in), optional :: overwrite
+   integer, intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Update the contents of lhs using the contents of rhs. The + operation inserts or overwrites any key in lhs if it exists in rhs. + Otherwise, the contents of lhs is left unaltered. See the JSON + documentation for implementation details [10]. + If recursive is .true. (default is .false.), + nested objects will be updated by their component key/values. Otherwise, + the first instance or top-level key is replaced without the child contents + being updated element-by-element. + +

+The arguments are: +

+
lhs
+
The ESMF_Info object to update. + +
+
rhs
+
The ESMF_Info object whose contents are used to update lhs. + +
+
[recursive]
+
Default is .false.. If .true., descend into nested objects + and recursively update the contents. + +
+
[overwrite]
+
Default is .false.. If .true., key-values that exist + in lhs will be overwritten by key-values in rhs. Flag + is only applicable when recursive is .true.. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+40.4.31 ESMF_InfoWriteJSON - Write Info contents to file +

+ +

+ +

+
+INTERFACE: +

 subroutine ESMF_InfoWriteJSON(info, filename, rc)
+
ARGUMENTS: +
   type(ESMF_Info), intent(in) :: info
+   character(len=*), intent(in) :: filename
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+   integer, intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Write ESMF_Info contents to file using the JSON format. + +

+The arguments are: +

+
info
+
Target ESMF_Info object. + +
+
filename
+
Path to the output file. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ + +

+41 Time Manager Utility +

+ +

+The ESMF Time Manager utility includes software for time and date +representation and calculations, model time advancement, and the +identification of unique and periodic events. Since multi-component +geophysical applications often require synchronization across +the time management schemes of the individual components, the +Time Manager's standard calendars and consistent time representation +promote component interoperability. +

+ + + + + + + + + + + + + +
+
+Key Features
Drift-free timekeeping through an integer-based internal time +representation. Both integers and reals can be specified at the interface.
The ability to represent time as a rational fraction, to support +exact timekeeping in applications that involve grid refinement.
Support for many calendar kinds, including user-customized calendars.
Support for both concurrent and sequential modes of component execution.
Support for varying and negative time steps.
+
+ +

+ +

+41.1 Time Manager Classes +

+There are five ESMF classes that represent time concepts: + +
    +
  • Calendar A Calendar can be used to keep track of the +date as an ESMF Gridded Component advances in time. Standard calendars +(such as Gregorian and 360-day) and user-specified calendars are +supported. Calendars can be queried for quantities such as seconds +per day, days per month, and days per year. +
  • +
  • Time A Time represents a time instant in a particular +calendar, such as November 28, 1964, at 7:31pm EST in the Gregorian +calendar. The Time class can be used +to represent the start and stop time of a time integration. +
  • +
  • TimeInterval TimeIntervals represent a period +of time, such as 300 milliseconds. Time steps can be represented +using TimeIntervals. +
  • +
  • Clock Clocks collect the parameters and +methods used for model time advancement into a convenient +package. A Clock can be queried for quantities such +as start time, stop time, current time, and time step. Clock +methods include incrementing the current time, and determining +if it is time to stop. +
  • +
  • Alarm Alarms identify unique or periodic events +by “ringing” - returning a true value - at specified times. +For example, an Alarm might be set to ring on the day of the +year when leaves start falling from the trees in a climate model. +
  • +
+ +

+

+\includegraphics{TimeMgr_desc} + +
+ +

+In the remainder of this section, we briefly summarize the +functionality that the Time Manager classes provide. Detailed +descriptions and usage examples precede the API listing for each +class. + +

+ +

+41.2 Calendar +

+An ESMF Calendar can be queried for seconds per day, days per month +and days per year. The flexible definition of Calendars allows them +to be defined for planetary bodies other than Earth. The set of supported +calendars includes: +
+
Gregorian
+
The standard Gregorian calendar. +
+
no-leap
+
The Gregorian calendar with no leap years. +
+
Julian
+
The standard Julian date calendar. +
+
Julian Day
+
The standard Julian days calendar. +
+
Modified Julian Day
+
The Modified Julian days calendar. +
+
360-day
+
A 30-day-per-month, 12-month-per-year calendar. +
+
no calendar
+
Tracks only elapsed model time in hours, minutes, seconds. +
+
+See Section 42.1 for more details on supported standard +calendars, and how to create a customized ESMF Calendar. + +

+ +

+41.3 Time Instants and TimeIntervals +

+ +

+TimeIntervals and Time instants (simply called Times) are the computational +building blocks of the Time Manager utility. TimeIntervals support operations +such as add, subtract, compare size, reset value, copy value, and subdivide +by a scalar. Times, which are moments in time associated with specific +Calendars, can be incremented or decremented by TimeIntervals, compared to +determine which of two Times is later, differenced to obtain the TimeInterval +between two Times, copied, reset, and manipulated in other useful ways. +Times support a host of different queries, both for values of individual Time +components such as year, month, day, and second, and for derived values such +as day of year, middle of current month and Julian day. It is also possible +to retrieve the value of the hardware realtime clock in the form of a +Time. See Sections 43.1 and 44.1, respectively, +for use and examples of Times and TimeIntervals. + +

+Since climate modeling, numerical weather prediction and other +Earth and space applications have widely varying time scales and require +different sorts of calendars, Times and TimeIntervals must support +a wide range of time specifiers, spanning nanoseconds to years. The +interfaces to these time classes are defined so that the user can specify a time +using a combination of units selected from the list shown in +Table 41.4. + +

+ +

+41.4 Clocks and Alarms +

+Although it is possible to repeatedly step a Time forward by a +TimeInterval using arithmetic on these basic types, it is useful to +identify a higher-level concept to represent this function. We refer to +this capability as a Clock, and include in its required features the +ability to store the start and stop times of +a model run, to check when time advancement should cease, +and to query the value of quantities such as the current time and the +time at the previous time step. The Time Manager includes a class +with methods that return a true value when a periodic or unique event +has taken place; we refer to these as Alarms. Applications may contain +temporary or multiple Clocks and Alarms. Sections 45.1 and +46.1 describe the use of Clocks and Alarms in detail. + +

+ + +

+
+

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 4: +Specifiers for Times and TimeIntervals
UnitMeaning
<yy|yy_i8>Year.
mmMonth of the year.
ddDay of the month.
<d|d_i8|d_r8>Julian or Modified Julian day.
<h|h_r8>Hour.
<m|m_r8>Minute.
<s|s_i8|s_r8>Second.
<ms|ms_r8>Millisecond.
<us|us_r8>Microsecond.
<ns|ns_r8>Nanosecond.
OTime zone offset in integer number of hours and minutes.
<sN|sN_i8>Numerator for times of the form s +$+
+\frac{{\rm sN}}{{\rm sD}}$, where s is seconds and s, sN, and +sD are integers. This format provides a mechanism for supporting +exact behavior.
<sD|sD_i8Denominator for times of the form s +$+
+\frac{{\rm sN}}{{\rm sD}}$, where s is seconds and s, sN, and +sD are integers.
+
+
+
+
+ +

+ +

+41.5 Design and Implementation Notes +

+ +
    +
  1. Base TimeIntervals and Times on the same integer representation. +It is useful to allow both TimeIntervals and Times to +inherit from a single class, BaseTime. In C++, this can be +implemented by using inheritance. In Fortran, it can be implemented +by having the derived types TimeIntervals and Times +contain a derived type BaseTime. In both cases, the +BaseTime class can be made private and invisible to the user. + +

    +The result of this strategy is that Time Intervals and +Times gain a consistent core representation of time as well a set +of basic methods. + +

    +The BaseTime class can be designed with a minimum number of elements +to represent any required time. The design is based on the idea used +in the real-time POSIX 1003.1b-1993 standard. That is, to represent +time simply as a pair of integers: one for seconds (whole) and one for +nanoseconds (fractional). These can then be converted at the interface +level to any desired format. + +

    +For ESMF, this idea can be modified and extended, in order to handle the +requirements for a large time range (> 200,000 years) and to exactly +represent any rational fraction, not just nanoseconds. To handle the +large time range, a 64-bit or greater integer is used for whole seconds. +Any rational fractional second is expressed using two additional integers: +a numerator and a denominator. Both the whole seconds and fractional +numerator are signed to handle negative time intervals and instants. +For arithmetic consistency both must carry the same sign (both positive +or both negative), except, of course, for zero values. The fractional +seconds element (numerator) is bounded with respect to whole seconds. +If the absolute value of the +numerator becomes greater than or equal to the denominator, whole +seconds are incremented or decremented accordingly and the numerator is +reset to the remainder. Conversions are performed upon demand by +interface methods within the TimeInterval and +Time classes. This is done because different applications require different +representations of time intervals and time instances. Floating point values as well as integers can be specified for the various time units in the interfaces, see Table 41.4. Floating point values are represented internally as integer-based rational fractions. + +

    +The BaseTime class defines increment and decrement methods for basic +TimeInterval calculations between Time instants. It is done here rather +than in the Calendar class because it can be done with simple +second-based arithmetic that is calendar independent. + +

    +Comparison methods can also be defined in the BaseTime class. These +perform equality/inequality, less than, and greater than comparisons +between any two TimeIntervals or Times. These methods capture +the common comparison logic between TimeIntervals and Times and +hence are defined here for sharing. + +

    +

  2. +
  3. The Time class depends on a calendar. The Time class contains +an internal Calendar class. +Upon demand by a user, the results of an increment or decrement operation are +converted to user units, which may be calendar-dependent, via methods +obtained from their internal Calendar. + +

    +

  4. +
+ +

+ +

+ +

+41.6 Object Model +

+ +

+The following is a simplified UML diagram showing the structure of the +Time Manager utility. See Appendix A, A Brief Introduction to UML, +for a translation table that lists the symbols in the diagram and their +meaning. + +

+

+\includegraphics{TimeMgr_obj} + +
+ +

+42 Calendar Class +

+ +

+42.1 Description +

+ +

+The Calendar class represents the standard calendars used in +geophysical modeling: Gregorian, Julian, Julian Day, Modified Julian Day, +no-leap, 360-day, and no-calendar. It also supports a user-customized +calendar. Brief descriptions are provided for each calendar below. For more +information on standard calendars, see [30] and [26]. + +

+42.2 Constants +

+ +

+ +

+ +

+ +
+42.2.1 ESMF_CALKIND +

+ +

+DESCRIPTION: +
+Supported calendar kinds. + +

+The type of this flag is: + +

+type(ESMF_CalKind_Flag) + +

+The valid values are: +

+
ESMF_CALKIND_360DAY
+
Valid range: machine limits +
+In the 360-day calendar, there are 12 months, each of which has 30 days. +Like the no-leap calendar, this is a simple approximation to the Gregorian +calendar sometimes used by modelers. + +

+

+
ESMF_CALKIND_CUSTOM
+
Valid range: machine limits +
+The user can set calendar parameters in the generic calendar. + +

+

+
ESMF_CALKIND_GREGORIAN
+
Valid range: 3/1/4801 BC to 10/29/292,277,019,914 +
+The Gregorian calendar is the calendar currently in use +throughout Western countries. Named after Pope Gregory XIII, it is a minor +correction to the older Julian calendar. In the Gregorian calendar every +fourth year is a leap year in which February has 29 and not 28 days; +however, years divisible by 100 are not leap years unless they are also +divisible by 400. As in the Julian calendar, days begin at midnight. + +

+

+
ESMF_CALKIND_JULIAN
+
Valid range: 3/1/4713 BC to 4/24/292,271,018,333 +
+The Julian calendar was introduced by Julius Caesar in 46 B.C., and +reached its final form in 4 A.D. The Julian calendar differs from the +Gregorian only in the determination of leap years, lacking the correction +for years divisible by 100 and 400 in the Gregorian calendar. In the Julian +calendar, any year is a leap year if divisible by 4. Days are considered to +begin at midnight. + +

+

+
ESMF_CALKIND_JULIANDAY
+
Valid range: +/- 1x10$^{14}$ +
+Julian days simply enumerate the days and fraction of a day which +have elapsed since the start of the Julian era, defined as beginning at noon +on Monday, 1st January of year 4713 B.C. in the Julian calendar. Julian days, +unlike the dates in the Julian and Gregorian calendars, begin at noon. + +

+

+
ESMF_CALKIND_MODJULIANDAY
+
Valid range: +/- 1x10$^{14}$ +
+The Modified Julian Day (MJD) was introduced by space scientists in + the late 1950's. It is defined as an offset from the Julian Day (JD): + +

+MJD = JD - 2400000.5 + +

+The half day is subtracted so that the day starts at midnight. + +

+

+
ESMF_CALKIND_NOCALENDAR
+
Valid range: machine limits +
+The no-calendar option simply tracks the elapsed model time in seconds. + +

+

+
ESMF_CALKIND_NOLEAP
+
Valid range: machine limits +
+The no-leap calendar is the Gregorian calendar with no leap years - +February is always assumed to have 28 days. Modelers sometimes use this +calendar as a simple, close approximation to the Gregorian calendar. + +

+

+
+ +

+42.3 Use and Examples +

+ +

+In most multi-component Earth system applications, the timekeeping in +each component +must refer to the same standard calendar in order for the components +to properly synchronize. It therefore makes sense to create as few +ESMF Calendars as possible, preferably one per application. +A typical strategy would be to create a single Calendar at the start +of an application, and use that Calendar in all subsequent calls that +accept a Calendar, such as ESMF_TimeSet. + +

+The following example shows how to set up an ESMF Calendar. + +

+ +

+ +

+

+! !PROGRAM: ESMF_CalendarEx - Calendar creation examples
+!
+! !DESCRIPTION:
+!
+! This program shows examples of how to create different calendar kinds
+!-----------------------------------------------------------------------------
+#include "ESMF.h"
+
+      ! ESMF Framework module
+      use ESMF
+      use ESMF_TestMod
+      implicit none
+
+      ! instantiate calendars
+      type(ESMF_Calendar) :: gregorianCalendar
+      type(ESMF_Calendar) :: julianDayCalendar
+      type(ESMF_Calendar) :: marsCalendar
+
+      ! local variables for Get methods
+      integer :: sols
+      integer(ESMF_KIND_I8) :: dl
+      type(ESMF_Time) :: time, marsTime
+      type(ESMF_TimeInterval) :: marsTimeStep
+
+      ! return code
+      integer:: rc
+
+ +

+

+      ! initialize ESMF framework
+      call ESMF_Initialize(defaultlogfilename="CalendarEx.Log", &
+                    logkindflag=ESMF_LOGKIND_MULTI, rc=rc)
+
+ +

+ +

+42.3.1 Calendar creation +

+ +

+This example shows how to create three ESMF_Calendars. +

+

+      ! create a Gregorian calendar
+      gregorianCalendar = ESMF_CalendarCreate(ESMF_CALKIND_GREGORIAN, &
+                                              name="Gregorian", rc=rc)
+
+ +

+

+      ! create a Julian Day calendar
+      julianDayCalendar = ESMF_CalendarCreate(ESMF_CALKIND_JULIANDAY, &
+                                              name="JulianDay", rc=rc)
+
+ +

+

+      ! create a Custom calendar for the planet Mars
+      ! 1 Mars solar day = 24 hours, 39 minutes, 35 seconds = 88775 seconds
+      ! 1 Mars solar year = 668.5921 Mars solar days = 668 5921/10000 sols/year
+      ! http://www.giss.nasa.gov/research/briefs/allison_02
+      ! http://www.giss.nasa.gov/tools/mars24/help/notes.html
+      marsCalendar = ESMF_CalendarCreate(secondsPerDay=88775, &
+                                         daysPerYear=668, &
+                                         daysPerYearDn=5921, &
+                                         daysPerYearDd=10000, &
+                                         name="MarsCalendar", rc=rc)
+
+ +

+ +

+42.3.2 Calendar comparison +

+ +

+This example shows how to compare an ESMF_Calendar with a known + calendar kind. +

+

+      ! compare calendar kind against a known type
+      if (gregorianCalendar == ESMF_CALKIND_GREGORIAN) then
+        print *, "gregorianCalendar is of type ESMF_CALKIND_GREGORIAN."
+      else
+        print *, "gregorianCalendar is not of type ESMF_CALKIND_GREGORIAN."
+      end if
+
+ +

+ +

+42.3.3 Time conversion between Calendars +

+ +

+This example shows how to convert a time from one ESMF_Calendar + to another. +

+

+      call ESMF_TimeSet(time, yy=2004, mm=4, dd=17, &
+                        calendar=gregorianCalendar, rc=rc)
+
+ +

+

+      ! switch time's calendar to perform conversion
+      call ESMF_TimeSet(time, calendar=julianDayCalendar, rc=rc)
+
+ +

+

+      call ESMF_TimeGet(time, d_i8=dl, rc=rc)
+      print *, "Gregorian date 2004/4/17 is ", dl, &
+               " days in the Julian Day calendar."
+
+ +

+ +

+42.3.4 Add a time interval to a time on a Calendar +

+ +

+This example shows how to increment a time using a custom ESMF_Calendar. +

+

+      ! Set a time to Mars solar year 3, sol 100
+      call ESMF_TimeSet(marsTime, yy=3, d=100, &
+                        calendar=marsCalendar, rc=rc)
+
+ +

+

+      ! Set a 1 solar year time step
+      call ESMF_TimeIntervalSet(marsTimeStep, yy=1, rc=rc)
+
+ +

+

+      ! Perform the increment
+      marsTime = marsTime + marsTimeStep
+
+ +

+

+      ! Get the result in sols (2774 = (3+1)*668.5921 + 100)
+      call ESMF_TimeGet(marsTime, d=sols, rc=rc)
+      print *, "For Mars, 3 solar years, 100 sols + 1 solar year = ", &
+                sols, "sols."
+
+ +

+ +

+42.3.5 Calendar destruction +

+ +

+This example shows how to destroy three ESMF_Calendars. +

+

+      call ESMF_CalendarDestroy(julianDayCalendar, rc=rc)
+
+ +

+

+      call ESMF_CalendarDestroy(gregorianCalendar, rc=rc)
+
+ +

+

+      call ESMF_CalendarDestroy(marsCalendar, rc=rc)
+
+ +

+

+      ! finalize ESMF framework
+      call ESMF_Finalize(rc=rc)
+
+ +

+

+      end program ESMF_CalendarEx
+
+ +

+ + +

+42.4 Restrictions and Future Work +

+ +

+ +

+ +

    +
  1. Months per year set to 12. Due to the requirement of only Earth modeling, the number of months per year is hard-coded at 12. However, for easy modification, this is implemented via a C preprocessor #define MONTHS_PER_YEAR in ESMCI_Calendar.h. + +

    +

  2. +
  3. Calendar date conversions. Date conversions are currently defined between the Gregorian, Julian, Julian Day, and Modified Julian Day calendars. Further research and work would need to be done to determine conversion algorithms with and between the other calendars: No Leap, 360 Day, and Custom. + +

    +

  4. +
  5. ESMF_CALKIND_CUSTOM. Currently, there is no provision for a custom calendar to define a leap year rule, so ESMF_CalendarIsLeapYear() will always return .false. in this case. However, the arguments daysPerYear, daysPerYearDn, and daysPerYearDd in ESMF_CalendarCreate() and ESMF_CalendarSet() can be used to set a fractional number of days per year, for example, 365.25 = 365 25/100. Also, if further timekeeping precision is required, fractional and/or floating point secondsPerDay and secondsPerYear could be added to the interfaces ESMF_CalendarCreate(), ESMF_CalendarSet(), and ESMF_CalendarGet() and implemented. + +

    +

  6. +
+ +

+42.5 Class API +

+ +

+ +

+ +

+ +

+42.5.1 ESMF_CalendarAssignment(=) - Assign a Calendar to another Calendar +

+ +

+ +

+
+INTERFACE: +

       interface assignment(=)
+       calendar1 = calendar2
+
ARGUMENTS: +
       type(ESMF_Calendar) :: calendar1
+       type(ESMF_Calendar) :: calendar2
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Assign calendar1 as an alias to the same ESMF_Calendar + object in memory as calendar2. If calendar2 is invalid, then + calendar1 will be equally invalid after the assignment. + +

+The arguments are: +

+
calendar1
+
The ESMF_Calendar object on the left hand side of the + assignment. + +
+
calendar2
+
The ESMF_Calendar object on the right hand side of the + assignment. + +
+
+ +

+ +

+ +

+42.5.2 ESMF_CalendarOperator(==) - Test if Calendar argument 1 is equal to Calendar argument 2 +

+ +

+ +

+
+INTERFACE: +

       interface operator(==)
+       if (<calendar argument 1> == <calendar argument 2>) then ... endif
+                                   OR
+       result = (<calendar argument 1> == <calendar argument 2>)
+
RETURN VALUE: +
       logical :: result
+
ARGUMENTS: +
       <calendar argument 1>, see below for supported values
+       <calendar argument 2>, see below for supported values
+
+DESCRIPTION: +
+ +

+Overloads the (==) operator for the ESMF_Calendar class. + Compare an ESMF_Calendar object or ESMF_CalKind_Flag with + another calendar object or calendar kind for equality. Return + .true. if equal, .false. otherwise. Comparison is based on + calendar kind, which is a property of a calendar object. + +

+If both arguments are ESMF_Calendar objects, and both are of + type ESMF_CALKIND_CUSTOM, then all the calendar's properties, + except name, are compared. + +

+If both arguments are ESMF_Calendar objects, and either of them + is not in the ESMF_INIT_CREATED status, an error will be logged. + However, this does not affect the return value, which is .true. + when both arguments are in the same status, and .false. + otherwise. + +

+If one argument is an ESMF_Calendar object, and the other is an + ESMF_CalKind_Flag, and the calendar object is not in the + ESMF_INIT_CREATED status, an error will be logged and + .false. will be returned. + +

+Supported values for <calendar argument 1> are: +

+
+
type(ESMF_Calendar), intent(in) :: calendar1 + +
+
+
type(ESMF_CalKind_Flag), intent(in) :: calkindflag1 + +
+
+ Supported values for <calendar argument 2> are: +
+
+
type(ESMF_Calendar), intent(in) :: calendar2 + +
+
+
type(ESMF_CalKind_Flag), intent(in) :: calkindflag2 + +
+
+ +

+The arguments are: +

+
<calendar argument 1>
+
The ESMF_Calendar object or ESMF_CalKind_Flag on the + left hand side of the equality operation. + +
+
<calendar argument 2>
+
The ESMF_Calendar object or ESMF_CalKind_Flag on the + right hand side of the equality operation. + +
+
+ +

+ +

+ +

+42.5.3 ESMF_CalendarOperator(/=) - Test if Calendar argument 1 is not equal to Calendar argument 2 +

+ +

+ +

+
+INTERFACE: +

       interface operator(/=)
+       if (<calendar argument 1> /= <calendar argument 2>) then ... endif
+                                   OR
+       result = (<calendar argument 1> /= <calendar argument 2>)
+
RETURN VALUE: +
       logical :: result
+
ARGUMENTS: +
       <calendar argument 1>, see below for supported values
+       <calendar argument 2>, see below for supported values
+
+DESCRIPTION: +
+ +

+Overloads the (/=) operator for the ESMF_Calendar class. + Compare a ESMF_Calendar object or ESMF_CalKind_Flag with + another calendar object or calendar kind for inequality. Return + .true. if not equal, .false. otherwise. Comparison is based + on calendar kind, which is a property of a calendar object. + +

+If both arguments are ESMF_Calendar objects, and both are of + type ESMF_CALKIND_CUSTOM, then all the calendar's properties, + except name, are compared. + +

+If both arguments are ESMF_Calendar objects, and either of them + is not in the ESMF_INIT_CREATED status, an error will be logged. + However, this does not affect the return value, which is .true. + when both arguments are not in the same status, and + .false. otherwise. + +

+If one argument is an ESMF_Calendar object, and the other is an + ESMF_CalKind_Flag, and the calendar object is not in the + ESMF_INIT_CREATED status, an error will be logged and + .true. will be returned. + +

+Supported values for <calendar argument 1> are: +

+
+
type(ESMF_Calendar), intent(in) :: calendar1 + +
+
+
type(ESMF_CalKind_Flag), intent(in) :: calkindflag1 + +
+
+ Supported values for <calendar argument 2> are: +
+
+
type(ESMF_Calendar), intent(in) :: calendar2 + +
+
+
type(ESMF_CalKind_Flag), intent(in) :: calkindflag2 + +
+
+ +

+The arguments are: +

+
<calendar argument 1>
+
The ESMF_Calendar object or ESMF_CalKind_Flag on the + left hand side of the non-equality operation. + +
+
<calendar argument 2>
+
The ESMF_Calendar object or ESMF_CalKind_Flag on the + right hand side of the non-equality operation. + +
+
+ +

+ +

+ +

+42.5.4 ESMF_CalendarCreate - Create a new ESMF Calendar of built-in type +

+ +

+ +

+
+INTERFACE: +

       ! Private name; call using ESMF_CalendarCreate()
+       function ESMF_CalendarCreateBuiltIn(calkindflag, &
+         name, rc)
+
RETURN VALUE: +
       type(ESMF_Calendar) :: ESMF_CalendarCreateBuiltIn
+
ARGUMENTS: +
       type(ESMF_CalKind_Flag), intent(in)            :: calkindflag
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       character (len=*),       intent(in),  optional :: name
+       integer,                 intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Creates and sets a calendar to the given built-in + ESMF_CalKind_Flag. + +

+The arguments are: +

+
calkindflag
+
The built-in ESMF_CalKind_Flag. Valid values are: +
+ ESMF_CALKIND_360DAY, +
+ ESMF_CALKIND_GREGORIAN, +
+ ESMF_CALKIND_JULIAN, +
+ ESMF_CALKIND_JULIANDAY, +
+ ESMF_CALKIND_MODJULIANDAY, +
+ ESMF_CALKIND_NOCALENDAR, +
+and ESMF_CALKIND_NOLEAP. +
+See Section 42.2 for a description of each + calendar kind. + +
+
[name]
+
The name for the newly created calendar. If not specified, a + default unique name will be generated: "CalendarNNN" where NNN + is a unique sequence number from 001 to 999. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+42.5.5 ESMF_CalendarCreate - Create a copy of an ESMF Calendar +

+ +

+ +

+
+INTERFACE: +

       ! Private name; call using ESMF_CalendarCreate()
+       function ESMF_CalendarCreateCopy(calendar, rc)
+
RETURN VALUE: +
       type(ESMF_Calendar) :: ESMF_CalendarCreateCopy
+
ARGUMENTS: +
       type(ESMF_Calendar), intent(in)            :: calendar
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       integer,             intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Creates a complete (deep) copy of a given ESMF_Calendar. + +

+The arguments are: +

+
calendar
+
The ESMF_Calendar to copy. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+42.5.6 ESMF_CalendarCreate - Create a new custom ESMF Calendar +

+ +

+ +

+
+INTERFACE: +

       ! Private name; call using ESMF_CalendarCreate()
+       function ESMF_CalendarCreateCustom(&
+         daysPerMonth, secondsPerDay, &
+         daysPerYear, daysPerYearDn, daysPerYearDd, name, rc)
+
RETURN VALUE: +
       type(ESMF_Calendar) :: ESMF_CalendarCreateCustom
+
ARGUMENTS: +
 -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       integer,               intent(in),  optional :: daysPerMonth(:)
+       integer(ESMF_KIND_I4), intent(in),  optional :: secondsPerDay
+       integer(ESMF_KIND_I4), intent(in),  optional :: daysPerYear
+       integer(ESMF_KIND_I4), intent(in),  optional :: daysPerYearDn
+       integer(ESMF_KIND_I4), intent(in),  optional :: daysPerYearDd
+       character (len=*),     intent(in),  optional :: name
+       integer,               intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Creates a custom ESMF_Calendar and sets its properties. + +

+The arguments are: +

+
[daysPerMonth]
+
Integer array of days per month, for each month of the year. + The number of months per year is variable and taken from the + size of the array. If unspecified, months per year = 0, + with the days array undefined. + +
+
[secondsPerDay]
+
Integer number of seconds per day. Defaults to 0 if not + specified. + +
+
[daysPerYear]
+
Integer number of days per year. Use with daysPerYearDn and + daysPerYearDd (see below) to specify a days-per-year calendar + for any planetary body. Default = 0. + +
+
[daysPerYearDn]
+
Integer numerator portion of fractional number of days per year + (daysPerYearDn/daysPerYearDd). + Use with daysPerYear (see above) and daysPerYearDd (see below) to + specify a days-per-year calendar for any planetary body. + Default = 0. + +
+
[daysPerYearDd]
+
Integer denominator portion of fractional number of days per year + (daysPerYearDn/daysPerYearDd). + Use with daysPerYear and daysPerYearDn (see above) to + specify a days-per-year calendar for any planetary body. + Default = 1. + +
+
[name]
+
The name for the newly created calendar. If not specified, a + default unique name will be generated: "CalendarNNN" where NNN + is a unique sequence number from 001 to 999. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+42.5.7 ESMF_CalendarDestroy - Release resources associated with a Calendar +

+ +

+ +

+
+INTERFACE: +

       subroutine ESMF_CalendarDestroy(calendar, rc)
+
ARGUMENTS: +
       type(ESMF_Calendar), intent(inout)          :: calendar
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       integer,             intent(out),  optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Releases resources associated with this ESMF_Calendar. + +

+The arguments are: +

+
calendar
+
Release resources associated with this ESMF_Calendar and mark the + object as invalid. It is an error to pass this object into any other + routines after being destroyed. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+42.5.8 ESMF_CalendarGet - Get Calendar properties +

+ +

+ +

+
+INTERFACE: +

       subroutine ESMF_CalendarGet(calendar, &
+         name, calkindflag, daysPerMonth, monthsPerYear, &
+         secondsPerDay, secondsPerYear, &
+         daysPerYear, daysPerYearDn, daysPerYearDd, rc)
+
ARGUMENTS: +
       type(ESMF_Calendar),    intent(in)            :: calendar
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       type(ESMF_CalKind_Flag),intent(out), optional :: calkindflag
+       integer,                intent(out), optional :: daysPerMonth(:)
+       integer,                intent(out), optional :: monthsPerYear
+       integer(ESMF_KIND_I4),  intent(out), optional :: secondsPerDay
+       integer(ESMF_KIND_I4),  intent(out), optional :: secondsPerYear
+       integer(ESMF_KIND_I4),  intent(out), optional :: daysPerYear
+       integer(ESMF_KIND_I4),  intent(out), optional :: daysPerYearDn
+       integer(ESMF_KIND_I4),  intent(out), optional :: daysPerYearDd
+       character (len=*),      intent(out), optional :: name
+       integer,                intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Gets one or more of an ESMF_Calendar's properties. + +

+The arguments are: +

+
calendar
+
The object instance to query. + +
+
[calkindflag]
+
The CalKind_Flag ESMF_CALKIND_GREGORIAN, + ESMF_CALKIND_JULIAN, etc. + +
+
[daysPerMonth]
+
Integer array of days per month, for each month of the year. + +
+
[monthsPerYear]
+
Integer number of months per year; the size of the + daysPerMonth array. + +
+
[secondsPerDay]
+
Integer number of seconds per day. + +
+
[secondsPerYear]
+
Integer number of seconds per year. + +
+
[daysPerYear]
+
Integer number of days per year. For calendars with + intercalations, daysPerYear is the number of days for years without + an intercalation. For other calendars, it is the number of days in + every year. + +
+
[daysPerYearDn]
+
Integer fractional number of days per year (numerator). + For calendars with intercalations, daysPerYearDn/daysPerYearDd is + the average fractional number of days per year (e.g. 25/100 for + Julian 4-year intercalation). For other calendars, it is zero. + +
+
[daysPerYearDd]
+
Integer fractional number of days per year (denominator). See + daysPerYearDn above. + +
+
[name]
+
The name of this calendar. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+42.5.9 ESMF_CalendarIsCreated - Check whether a Calendar object has been created +

+ +

+ +

+
+INTERFACE: +

   function ESMF_CalendarIsCreated(calendar, rc)
+
RETURN VALUE: +
     logical :: ESMF_CalendarIsCreated
+
ARGUMENTS: +
     type(ESMF_Calendar), intent(in)            :: calendar
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,             intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Return .true. if the calendar has been created. Otherwise return + .false.. If an error occurs, i.e. rc /= ESMF_SUCCESS is + returned, the return value of the function will also be .false.. + +

+The arguments are: +

+
calendar
+
ESMF_Calendar queried. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+42.5.10 ESMF_CalendarIsLeapYear - Determine if given year is a leap year +

+ +

+ +

+
+INTERFACE: +

       ! Private name; call using ESMF_CalendarIsLeapYear()
+       function ESMF_CalendarIsLeapYear<kind>(calendar, yy, rc)
+
RETURN VALUE: +
       logical :: ESMF_CalendarIsLeapYear<kind>
+
ARGUMENTS: +
       type(ESMF_Calendar),       intent(in)            :: calendar
+       integer(ESMF_KIND_<kind>), intent(in)            :: yy
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       integer,                   intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Returns .true. if the given year is a leap year within the given + calendar, and .false. otherwise. Custom calendars do not define + leap years, so .false. will always be returned in this case; + see Section 42.4. + See also ESMF_TimeIsLeapYear(). + +

+The arguments are: +

+
calendar
+
ESMF_Calendar to determine leap year within. + +
+
yy
+
Year to check for leap year. The type is integer and the <kind> can + be either I4 or I8: ESMF_KIND_I4 or ESMF_KIND_I8. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+42.5.11 ESMF_CalendarPrint - Print Calendar information +

+ +

+ +

+
+INTERFACE: +

       subroutine ESMF_CalendarPrint(calendar, options, rc)
+
ARGUMENTS: +
       type(ESMF_Calendar), intent(in)            :: calendar
+       character (len=*),   intent(in),  optional :: options
+       integer,             intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Prints out an ESMF_Calendar's properties to stdio, + in support of testing and debugging. The options control the + type of information and level of detail. +
+

+The arguments are: +

+
calendar
+
ESMF_Calendar to be printed out. + +
+
[options]
+
Print options. If none specified, prints all calendar property + values. +
"calkindflag" - print the calendar's type + (e.g. ESMF_CALKIND_GREGORIAN). +
"daysPerMonth" - print the array of number of days for + each month. +
"daysPerYear" - print the number of days per year + (integer and fractional parts). +
"monthsPerYear" - print the number of months per year. +
"name" - print the calendar's name. +
"secondsPerDay" - print the number of seconds in a day. +
"secondsPerYear" - print the number of seconds in a year. +
+
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+42.5.12 ESMF_CalendarSet - Set a Calendar to a built-in type +

+ +

+ +

+
+INTERFACE: +

       ! Private name; call using ESMF_CalendarSet()
+       subroutine ESMF_CalendarSetBuiltIn(calendar, calkindflag, &
+         name, rc)
+
ARGUMENTS: +
       type(ESMF_Calendar),     intent(inout)         :: calendar
+       type(ESMF_CalKind_Flag), intent(in)            :: calkindflag
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       character (len=*),       intent(in),  optional :: name
+       integer,                 intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Sets calendar to the given built-in ESMF_CalKind_Flag. + +

+The arguments are: +

+
calendar
+
The object instance to initialize. + +
+
calkindflag
+
The built-in CalKind_Flag. Valid values are: +
+ ESMF_CALKIND_360DAY, +
+ ESMF_CALKIND_GREGORIAN, +
+ ESMF_CALKIND_JULIAN, +
+ ESMF_CALKIND_JULIANDAY, +
+ ESMF_CALKIND_MODJULIANDAY, +
+ ESMF_CALKIND_NOCALENDAR, +
+and ESMF_CALKIND_NOLEAP. +
+See Section 42.2 for a description of each + calendar kind. + +
+
[name]
+
The new name for this calendar. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+42.5.13 ESMF_CalendarSet - Set properties of a custom Calendar +

+ +

+ +

+
+INTERFACE: +

       ! Private name; call using ESMF_CalendarSet()
+       subroutine ESMF_CalendarSetCustom(calendar, &
+         daysPerMonth, secondsPerDay, &
+         daysPerYear, daysPerYearDn, daysPerYearDd, name, rc)
+
ARGUMENTS: +
       type(ESMF_Calendar),  intent(inout)         :: calendar
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       integer,              intent(in),  optional :: daysPerMonth(:)
+       integer(ESMF_KIND_I4),intent(in),  optional :: secondsPerDay
+       integer(ESMF_KIND_I4),intent(in),  optional :: daysPerYear
+       integer(ESMF_KIND_I4),intent(in),  optional :: daysPerYearDn
+       integer(ESMF_KIND_I4),intent(in),  optional :: daysPerYearDd
+       character (len=*),    intent(in),  optional :: name
+       integer,              intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Sets properties in a custom ESMF_Calendar. + +

+The arguments are: +

+
calendar
+
The object instance to initialize. + +
+
[daysPerMonth]
+
Integer array of days per month, for each month of the year. + The number of months per year is variable and taken from the + size of the array. If unspecified, months per year = 0, + with the days array undefined. + +
+
[secondsPerDay]
+
Integer number of seconds per day. Defaults to 0 if not + specified. + +
+
[daysPerYear]
+
Integer number of days per year. Use with daysPerYearDn and + daysPerYearDd (see below) to specify a days-per-year calendar + for any planetary body. Default = 0. + +
+
[daysPerYearDn]
+
Integer numerator portion of fractional number of days per year + (daysPerYearDn/daysPerYearDd). + Use with daysPerYear (see above) and daysPerYearDd (see below) to + specify a days-per-year calendar for any planetary body. + Default = 0. + +
+
[daysPerYearDd]
+
Integer denominator portion of fractional number of days per year + (daysPerYearDn/daysPerYearDd). + Use with daysPerYear and daysPerYearDn (see above) to + specify a days-per-year calendar for any planetary body. + Default = 1. + +
+
[name]
+
The new name for this calendar. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+42.5.14 ESMF_CalendarSetDefault - Set the default Calendar kind +

+ +

+ +

+
+INTERFACE: +

       ! Private name; call using ESMF_CalendarSetDefault()
+       subroutine ESMF_CalendarSetDefaultKind(calkindflag, rc)
+
ARGUMENTS: +
       type(ESMF_CalKind_Flag), intent(in)            :: calkindflag
+       integer,                 intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Sets the default calendar to the given type. Subsequent Time + Manager operations requiring a calendar where one isn't specified will + use the internal calendar of this type. + +

+The arguments are: +

+
calkindflag
+
The calendar kind to be the default. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+42.5.15 ESMF_CalendarSetDefault - Set the default Calendar +

+ +

+ +

+
+INTERFACE: +

       ! Private name; call using ESMF_CalendarSetDefault()
+       subroutine ESMF_CalendarSetDefaultCal(calendar, rc)
+
ARGUMENTS: +
       type(ESMF_Calendar),     intent(in)            :: calendar
+       integer,                 intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Sets the default calendar to the one given. Subsequent Time + Manager operations requiring a calendar where one isn't specified will + use this calendar. + +

+The arguments are: +

+
calendar
+
The object instance to be the default. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+42.5.16 ESMF_CalendarValidate - Validate a Calendar's properties +

+ +

+ +

+
+INTERFACE: +

       subroutine ESMF_CalendarValidate(calendar, rc)
+
ARGUMENTS: +
       type(ESMF_Calendar), intent(in)            :: calendar
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       integer,             intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Checks whether a calendar is valid. + Must be one of the defined calendar kinds. daysPerMonth, daysPerYear, + secondsPerDay must all be greater than or equal to zero. + +

+The arguments are: +

+
calendar
+
ESMF_Calendar to be validated. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ + +

+43 Time Class +

+ +

+43.1 Description +

+ +

+A Time represents a specific point in time. In order to accommodate +the range of time scales in Earth system applications, Times in +the ESMF can be specified in many different ways, from years to +nanoseconds. The Time interface is designed so that you select one or +more options from a list of time units in order to specify a +Time. The options for specifying a Time are shown in +Table 41.4. + +

+There are Time methods defined for setting and getting a +Time, incrementing and decrementing a Time by a TimeInterval, +taking the difference between two Times, and comparing Times. +Special quantities such as the middle of the month and the +day of the year associated with a particular Time can be retrieved. +There is a method for returning the Time value as a string in +the ISO 8601 format YYYY-MM-DDThh:mm:ss [24]. + +

+A Time that is specified in hours, minutes, seconds, or subsecond intervals +does not need to be associated with a standard calendar; a Time whose +specification includes time units of a day and greater must be. The +ESMF representation +of a calendar, the Calendar class, is described in Section 42.1. +The ESMF_TimeSet method is used to initialize a Time as well as +associate it with a Calendar. If a Time method is invoked in which a Calendar +is necessary and one has not been set, the ESMF method will return an error +condition. + +

+In the ESMF the TimeInterval class is used to represent time periods. +This class is frequently used in combination with the Time class. +The Clock class, for example, advances model time by incrementing a +Time with a TimeInterval. + +

+ +

+43.2 Use and Examples +

+ +

+Times are most frequently used to represent start, stop, and current +model times. The following examples show how to create, initialize, and +manipulate Time. + +

+ +

+ +

+ +

+

+! !PROGRAM: ESMF_TimeEx - Time initialization and manipulation examples
+!
+! !DESCRIPTION:
+!
+! This program shows examples of Time initialization and manipulation
+!-----------------------------------------------------------------------------
+#include "ESMF.h"
+
+      ! ESMF Framework module
+      use ESMF
+      use ESMF_TestMod
+      implicit none
+
+      ! instantiate two times
+      type(ESMF_Time) :: time1, time2
+
+      type(ESMF_VM) :: vm
+
+      ! instantiate a time interval
+      type(ESMF_TimeInterval) :: timeinterval1
+
+      ! local variables for Get methods
+      integer :: YY, MM, DD, H, M, S
+
+      ! return code
+      integer:: rc
+
+ +

+

+      ! initialize ESMF framework
+      call ESMF_Initialize(vm=vm, defaultCalKind=ESMF_CALKIND_GREGORIAN, &
+        defaultlogfilename="TimeEx.Log", &
+        logkindflag=ESMF_LOGKIND_MULTI, rc=rc)
+
+ +

+ +

+43.2.1 Time initialization +

+ +

+This example shows how to initialize an ESMF_Time. +

+

+      ! initialize time1 to 2/28/2000 2:24:45
+      call ESMF_TimeSet(time1, yy=2000, mm=2, dd=28, h=2, m=24, s=45, rc=rc)
+
+ +

+

+      print *, "Time1 = "
+      call ESMF_TimePrint(time1, options="string", rc=rc)
+
+ +

+ +

+43.2.2 Time increment +

+ +

+This example shows how to increment an ESMF_Time by + an ESMF_TimeInterval. +

+

+      ! initialize a time interval to 2 days, 8 hours, 36 minutes, 15 seconds
+      call ESMF_TimeIntervalSet(timeinterval1, d=2, h=8, m=36, s=15, rc=rc)
+
+ +

+

+      print *, "Timeinterval1 = "
+      call ESMF_TimeIntervalPrint(timeinterval1, options="string", rc=rc)
+
+ +

+

+      ! increment time1 with timeinterval1
+      time2 = time1 + timeinterval1
+
+      call ESMF_TimeGet(time2, yy=YY, mm=MM, dd=DD, h=H, m=M, s=S, rc=rc)
+      print *, "time2 = time1 + timeinterval1 = ", YY, "/", MM, "/", DD, &
+               " ",  H, ":", M, ":", S
+
+ +

+ +

+43.2.3 Time comparison +

+ +

+This example shows how to compare two ESMF_Times. +

+

+      if (time2 > time1) then
+        print *, "time2 is larger than time1"
+      else
+        print *, "time1 is smaller than or equal to time2"
+      endif
+
+ +

+

+      ! finalize ESMF framework
+      call ESMF_Finalize(rc=rc)
+
+ +

+

+      end program ESMF_TimeEx
+
+ +

+ + +

+43.3 Restrictions and Future Work +

+ +

+ +

    +
  1. Limits on size and resolution of Time. The limits on the size and +resolution of the time representation are based on the +64-bit integer types used. For seconds, a signed 64-bit integer +will have a range of +/- $2^{63}$-1, or +/- 9,223,372,036,854,775,807. This +corresponds to a maximum size of +/- ($2^{63}$-1)/(86400 * 365.25) or ++/- 292,271,023,045 years. + +

    +For fractional seconds, a signed 64-bit integer will handle a resolution of ++/- $2^{31}$-1, or +/- 9,223,372,036,854,775,807 parts of a second. + +

    +

  2. +
+ +

+43.4 Class API +

+ +

+ +

+ +

+ +

+43.4.1 ESMF_TimeAssignment(=) - Assign a Time to another Time +

+ +

+ +

+
+INTERFACE: +

       interface assignment(=)
+       time1 = time2
+
ARGUMENTS: +
       type(ESMF_Time) :: time1
+       type(ESMF_Time) :: time2
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Set time1 equal to time2. This is the default Fortran + assignment, which creates a complete, independent copy of time2 + as time1. If time2 is an invalid ESMF_Time object then + time1 will be equally invalid after the assignment. + +

+The arguments are: +

+
time1
+
The ESMF_Time to be set. + +
+
time2
+
The ESMF_Time to be copied. + +
+
+ +

+ +

+ +

+43.4.2 ESMF_TimeOperator(+) - Increment a Time by a TimeInterval +

+ +

+ +

+
+INTERFACE: +

       interface operator(+)
+       time2 = time1 + timeinterval
+
RETURN VALUE: +
       type(ESMF_Time) :: time2
+
ARGUMENTS: +
       type(ESMF_Time),         intent(in) :: time1
+       type(ESMF_TimeInterval), intent(in) :: timeinterval
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Overloads the (+) operator for the ESMF_Time class to increment + time1 with timeinterval and return the result as an + ESMF_Time. + +

+The arguments are: +

+
time1
+
The ESMF_Time to increment. + +
+
timeinterval
+
The ESMF_TimeInterval to add to the given ESMF_Time. + +
+
+ +

+ +

+ +

+43.4.3 ESMF_TimeOperator(-) - Decrement a Time by a TimeInterval +

+ +

+ +

+
+INTERFACE: +

       interface operator(-)
+       time2 = time1 - timeinterval
+
RETURN VALUE: +
       type(ESMF_Time) :: time2
+
ARGUMENTS: +
       type(ESMF_Time),         intent(in) :: time1
+       type(ESMF_TimeInterval), intent(in) :: timeinterval
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Overloads the (-) operator for the ESMF_Time class to decrement + time1 with timeinterval, and return the result as an + ESMF_Time. + +

+The arguments are: +

+
time1
+
The ESMF_Time to decrement. + +
+
timeinterval
+
The ESMF_TimeInterval to subtract from the given + ESMF_Time. + +
+
+ +

+ +

+ +

+43.4.4 ESMF_TimeOperator(-) - Return the difference between two Times +

+ +

+ +

+
+INTERFACE: +

       interface operator(-)
+       timeinterval = time1 - time2
+
RETURN VALUE: +
       type(ESMF_TimeInterval) :: timeinterval
+
ARGUMENTS: +
       type(ESMF_Time),         intent(in) :: time1
+       type(ESMF_Time),         intent(in) :: time2
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Overloads the (-) operator for the ESMF_Time class to return the + difference between time1 and time2 as an + ESMF_TimeInterval. It is assumed that time1 is later than + time2; if not, the resulting ESMF_TimeInterval will have a + negative value. + +

+The arguments are: +

+
time1
+
The first ESMF_Time in comparison. + +
+
time2
+
The second ESMF_Time in comparison. + +
+
+ +

+ +

+ +

+43.4.5 ESMF_TimeOperator(==) - Test if Time 1 is equal to Time 2 +

+ +

+ +

+
+INTERFACE: +

       interface operator(==)
+       if (time1 == time2) then ... endif
+                    OR
+       result = (time1 == time2)
+
RETURN VALUE: +
       logical :: result
+
ARGUMENTS: +
       type(ESMF_Time), intent(in) :: time1
+       type(ESMF_Time), intent(in) :: time2
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Overloads the (==) operator for the ESMF_Time class to return + .true. if time1 and time2 represent the same instant + in time, and .false. otherwise. + +

+The arguments are: +

+
time1
+
First ESMF_Time in comparison. + +
+
time2
+
Second ESMF_Time in comparison. + +
+
+ +

+ +

+ +

+43.4.6 ESMF_TimeOperator(/=) - Test if Time 1 is not equal to Time 2 +

+ +

+ +

+
+INTERFACE: +

       interface operator(/=)
+       if (time1 /= time2) then ... endif
+                    OR
+       result = (time1 /= time2)
+
RETURN VALUE: +
       logical :: result
+
ARGUMENTS: +
       type(ESMF_Time), intent(in) :: time1
+       type(ESMF_Time), intent(in) :: time2
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Overloads the (/=) operator for the ESMF_Time class to return + .true. if time1 and time2 do not represent the same + instant in time, and .false. otherwise. + +

+The arguments are: +

+
time1
+
First ESMF_Time in comparison. + +
+
time2
+
Second ESMF_Time in comparison. + +
+
+ +

+ +

+ +

+43.4.7 ESMF_TimeOperator(<) - Test if Time 1 is less than Time 2 +

+ +

+ +

+
+INTERFACE: +

       interface operator(<)
+       if (time1 < time2) then ... endif
+                    OR
+       result = (time1 < time2)
+
RETURN VALUE: +
       logical :: result
+
ARGUMENTS: +
       type(ESMF_Time), intent(in) :: time1
+       type(ESMF_Time), intent(in) :: time2
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Overloads the (<) operator for the ESMF_Time class to return + .true. if time1 is earlier in time than time2, and + .false. otherwise. + +

+The arguments are: +

+
time1
+
First ESMF_Time in comparison. + +
+
time2
+
Second ESMF_Time in comparison. + +
+
+ +

+ +

+ +

+43.4.8 ESMF_TimeOperator(<=) - Test if Time 1 is less than or equal to Time 2 +

+ +

+ +

+
+INTERFACE: +

       interface operator(<=)
+       if (time1 <= time2) then ... endif
+                    OR
+       result = (time1 <= time2)
+
RETURN VALUE: +
       logical :: result
+
ARGUMENTS: +
       type(ESMF_Time), intent(in) :: time1
+       type(ESMF_Time), intent(in) :: time2
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Overloads the (<=) operator for the ESMF_Time class to return + .true. if time1 is earlier in time or the same time as + time2, and .false. otherwise. + +

+The arguments are: +

+
time1
+
First ESMF_Time in comparison. + +
+
time2
+
Second ESMF_Time in comparison. + +
+
+ +

+ +

+ +

+43.4.9 ESMF_TimeOperator(>) - Test if Time 1 is greater than Time 2 +

+ +

+ +

+
+INTERFACE: +

       interface operator(>)
+       if (time1 > time2) then ... endif
+                    OR
+       result = (time1 > time2)
+
RETURN VALUE: +
       logical :: result
+
ARGUMENTS: +
       type(ESMF_Time), intent(in) :: time1
+       type(ESMF_Time), intent(in) :: time2
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Overloads the (>) operator for the ESMF_Time class to return + .true. if time1 is later in time than time2, and + .false. otherwise. + +

+The arguments are: +

+
time1
+
First ESMF_Time in comparison. + +
+
time2
+
Second ESMF_Time in comparison. + +
+
+ +

+ +

+ +

+43.4.10 ESMF_TimeOperator(>=) - Test if Time 1 is greater than or equal to Time 2 +

+ +

+ +

+
+INTERFACE: +

       interface operator(>=)
+       if (time1 >= time2) then ... endif
+                    OR
+       result = (time1 >= time2)
+
RETURN VALUE: +
       logical :: result
+
ARGUMENTS: +
       type(ESMF_Time), intent(in) :: time1
+       type(ESMF_Time), intent(in) :: time2
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Overloads the (>=) operator for the ESMF_Time class to return + .true. if time1 is later in time or the same time as + time2, and .false. otherwise. + +

+The arguments are: +

+
time1
+
First ESMF_Time in comparison. + +
+
time2
+
Second ESMF_Time in comparison. + +
+
+ +

+ +

+ +

+43.4.11 ESMF_TimeGet - Get a Time value +

+ +

+ +

+
+INTERFACE: +

       subroutine ESMF_TimeGet(time, &
+         yy, yy_i8, &
+         mm, dd, &
+         d, d_i8, &
+         h, m, &
+         s, s_i8, &
+         ms, us, ns, &
+         d_r8, h_r8, m_r8, s_r8, &
+         ms_r8, us_r8, ns_r8, &
+         sN, sN_i8, sD, sD_i8, &
+         calendar, calkindflag, timeZone, &
+         timeString, timeStringISOFrac, &
+         dayOfWeek, midMonth, &
+         dayOfYear,  dayOfYear_r8, &
+         dayOfYear_intvl, rc)
+
ARGUMENTS: +
       type(ESMF_Time),         intent(in)            :: time
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       integer(ESMF_KIND_I4),   intent(out), optional :: yy
+       integer(ESMF_KIND_I8),   intent(out), optional :: yy_i8
+       integer,                 intent(out), optional :: mm
+       integer,                 intent(out), optional :: dd
+       integer(ESMF_KIND_I4),   intent(out), optional :: d
+       integer(ESMF_KIND_I8),   intent(out), optional :: d_i8
+       integer(ESMF_KIND_I4),   intent(out), optional :: h
+       integer(ESMF_KIND_I4),   intent(out), optional :: m
+       integer(ESMF_KIND_I4),   intent(out), optional :: s
+       integer(ESMF_KIND_I8),   intent(out), optional :: s_i8
+       integer(ESMF_KIND_I4),   intent(out), optional :: ms
+       integer(ESMF_KIND_I4),   intent(out), optional :: us
+       integer(ESMF_KIND_I4),   intent(out), optional :: ns
+       real(ESMF_KIND_R8),      intent(out), optional :: d_r8
+       real(ESMF_KIND_R8),      intent(out), optional :: h_r8
+       real(ESMF_KIND_R8),      intent(out), optional :: m_r8
+       real(ESMF_KIND_R8),      intent(out), optional :: s_r8
+       real(ESMF_KIND_R8),      intent(out), optional :: ms_r8
+       real(ESMF_KIND_R8),      intent(out), optional :: us_r8
+       real(ESMF_KIND_R8),      intent(out), optional :: ns_r8
+       integer(ESMF_KIND_I4),   intent(out), optional :: sN
+       integer(ESMF_KIND_I8),   intent(out), optional :: sN_i8
+       integer(ESMF_KIND_I4),   intent(out), optional :: sD
+       integer(ESMF_KIND_I8),   intent(out), optional :: sD_i8
+       type(ESMF_Calendar),     intent(out), optional :: calendar
+       type(ESMF_CalKind_Flag), intent(out), optional :: calkindflag
+       integer,                 intent(out), optional :: timeZone ! not imp
+       character (len=*),       intent(out), optional :: timeString
+       character (len=*),       intent(out), optional :: timeStringISOFrac
+       integer,                 intent(out), optional :: dayOfWeek
+       type(ESMF_Time),         intent(out), optional :: midMonth
+       integer(ESMF_KIND_I4),   intent(out), optional :: dayOfYear
+       real(ESMF_KIND_R8),      intent(out), optional :: dayOfYear_r8
+       type(ESMF_TimeInterval), intent(out), optional :: dayOfYear_intvl
+       integer,                 intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Gets the value of time in units specified by the user + via Fortran optional arguments. See ESMF_TimeSet() above for a + description of time units and calendars. + +

+The ESMF Time Manager represents and manipulates time internally with + integers to maintain precision. Hence, user-specified floating point + values are converted internally from integers. For example, if a time + value is 5 and 3/8 seconds (s=5, sN=3, sD=8), and you want to get it as + floating point seconds, you would get 5.375 (s_r8=5.375). + +

+Units are bound (normalized) by the next larger unit specified. For + example, if a time is defined to be 2:00 am on February 2, 2004, then + ESMF_TimeGet(dd=day, h=hours, s=seconds) would return + day = 2, hours = 2, seconds = 0, + whereas ESMF_TimeGet(dd = day, s=seconds) would return + day = 2, seconds = 7200. + Note that hours and seconds are bound by a day. If bound + by a month, + ESMF_TimeGet(mm=month, h=hours, s=seconds) would return + month = 2, hours = 26, seconds = 0, + and ESMF_TimeGet(mm = month, s=seconds) would return + month = 2, seconds = 93600 (26 * 3600). + Similarly, if bound to a year, + ESMF_TimeGet(yy=year, h=hours, s=seconds) would return + year = 2004, hours = 770 (32*24 + 2), seconds = 0, + and ESMF_TimeGet(yy = year, s=seconds) would return + year = 2004, seconds = 2772000 (770 * 3600). + +

+For timeString, timeStringISOFrac, dayOfWeek, + midMonth, dayOfYear, dayOfYear_intvl, and + dayOfYear_r8 described below, valid calendars are Gregorian, + Julian, No Leap, 360 Day and Custom calendars. Not valid for + Julian Day, Modified Julian Day, or No Calendar. +
+

+For timeString and timeStringISOFrac, YYYY format returns + at least 4 digits; years <= 999 are padded on the left with zeroes and + years >= 10000 return the number of digits required. + +

+For timeString, convert ESMF_Time's value into partial ISO 8601 + format YYYY-MM-DDThh:mm:ss[:n/d]. See [24] and [14]. + See also method ESMF_TimePrint(). + +

+For timeStringISOFrac, convert ESMF_Time's value into full ISO 8601 + format YYYY-MM-DDThh:mm:ss[.f]. See [24] and [14]. + See also method ESMF_TimePrint(). + +

+For dayOfWeek, gets the day of the week the given ESMF_Time + instant falls on. ISO 8601 standard: Monday = 1 through Sunday = 7. + See [24] and [14]. + +

+For midMonth, gets the middle time instant of the month that the given + ESMF_Time instant falls on. + +

+For dayOfYear, gets the day of the year that the given ESMF_Time + instant falls on. See range discussion in argument list below. + Return as an integer value. + +

+For dayOfYear_r8, gets the day of the year the given ESMF_Time + instant falls on. See range discussion in argument list below. + Return as floating point value; fractional part represents the time of + day. + +

+For dayOfYear_intvl, gets the day of the year the given ESMF_Time + instant falls on. Return as an ESMF_TimeInterval. + +

+The arguments are: +

+
time
+
The object instance to query. + +
+
[yy]
+
Integer year (32-bit). + +
+
[yy_i8]
+
Integer year (large, 64-bit). + +
+
[mm]
+
Integer month. + +
+
[dd]
+
Integer day of the month. + +
+
[d]
+
Integer Julian date, or Modified Julian date (32-bit). + +
+
[d_i8]
+
Integer Julian date, or Modified Julian date (large, 64-bit). + +
+
[h]
+
Integer hour. + +
+
[m]
+
Integer minute. + +
+
[s]
+
Integer second (32-bit). + +
+
[s_i8]
+
Integer second (large, 64-bit). + +
+
[ms]
+
Integer millisecond. + +
+
[us]
+
Integer microsecond. + +
+
[ns]
+
Integer nanosecond. + +
+
[d_r8]
+
Double precision day. + +
+
[h_r8]
+
Double precision hour. + +
+
[m_r8]
+
Double precision minute. + +
+
[s_r8]
+
Double precision second. + +
+
[ms_r8]
+
Double precision millisecond. + +
+
[us_r8]
+
Double precision microsecond. + +
+
[ns_r8]
+
Double precision nanosecond. + +
+
[sN]
+
Integer numerator of fractional second (sN/sD). + +
+
[sN_i8]
+
Integer numerator of fractional second (sN_i8/sD_i8) + (large, <= 64-bit). + +
+
[sD]
+
Integer denominator of fractional second (sN/sD). + +
+
[sD_i8]
+
Integer denominator of fractional second (sN_i8/sD_i8) + (large, <= 64-bit). + +
+
[calendar]
+
Associated Calendar. + +
+
[calkindflag]
+
Associated CalKind_Flag. + +
+
[timeZone]
+
Associated timezone (hours offset from UCT, e.g. EST = -5). + (Not implemented yet). + +
+
[timeString]
+
Convert time value to format string YYYY-MM-DDThh:mm:ss[:n/d], + where n/d is numerator/denominator of any fractional seconds and + all other units are in ISO 8601 format. See [24] and + [14]. See also method ESMF_TimePrint(). + +
+
[timeStringISOFrac]
+
Convert time value to strict ISO 8601 format string + YYYY-MM-DDThh:mm:ss[.f], where f is decimal form of any fractional + seconds. See [24] and [14]. See also method + ESMF_TimePrint(). + +
+
[dayOfWeek]
+
The time instant's day of the week [1-7]. + +
+
[MidMonth]
+
The given time instant's middle-of-the-month time instant. + +
+
[dayOfYear]
+
The ESMF_Time instant's integer day of the year. + [1-366] for Gregorian and Julian calendars, [1-365] for No-Leap + calendar. [1-360] for 360-Day calendar. User-defined range + for Custom calendar. + +
+
[dayOfYear_r8]
+
The ESMF_Time instant's floating point day of the year. + [1.x-366.x] for Gregorian and Julian calendars, [1.x-365.x] for + No-Leap calendar. [1.x-360.x] for 360-Day calendar. User-defined + range for Custom calendar. + +
+
[dayOfYear_intvl]
+
The ESMF_Time instant's day of the year as an + ESMF_TimeInterval. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+43.4.12 ESMF_TimeIsLeapYear - Determine if a Time is in a leap year +

+ +

+ +

+
+INTERFACE: +

       function ESMF_TimeIsLeapYear(time, rc)
+
RETURN VALUE: +
       logical :: ESMF_TimeIsLeapYear
+
ARGUMENTS: +
       type(ESMF_Time), intent(in)            :: time
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       integer,         intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Returns .true. if given time is in a leap year, and .false. + otherwise. See also ESMF_CalendarIsLeapYear(). + +

+The arguments are: +

+
time
+
The ESMF_Time to check for leap year. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+43.4.13 ESMF_TimeIsSameCalendar - Compare Calendars of two Times +

+ +

+ +

+
+INTERFACE: +

       function ESMF_TimeIsSameCalendar(time1, time2, rc)
+
RETURN VALUE: +
       logical :: ESMF_TimeIsSameCalendar
+
ARGUMENTS: +
       type(ESMF_Time), intent(in)            :: time1
+       type(ESMF_Time), intent(in)            :: time2
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       integer,         intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Returns .true. if the Calendars in these Times are + the same, .false. otherwise. + +

+The arguments are: +

+
time1
+
The first ESMF_Time in comparison. + +
+
time2
+
The second ESMF_Time in comparison. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+43.4.14 ESMF_TimePrint - Print Time information +

+ +

+ +

+
+INTERFACE: +

       subroutine ESMF_TimePrint(time, options, preString, unit, rc)
+
ARGUMENTS: +
       type(ESMF_Time),   intent(in)            :: time
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       character (len=*), intent(in),  optional :: options
+       character(*),      intent(in),  optional :: preString
+       character(*),      intent(out), optional :: unit
+       integer,           intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Prints out the contents of an ESMF_Time to stdout, in + support of testing and debugging. The options control the type of + information and level of detail. For options "string" and "string + isofrac", YYYY format returns at least 4 digits; years <= 999 are + padded on the left with zeroes and years >= 10000 return the number + of digits required. +
+

+The arguments are: +

+
time
+
The ESMF_Time to be printed out. + +
+
[options]
+
Print options. If none specified, prints all Time property values. +
"string" - prints time's value in ISO 8601 format for all units + through seconds. For any non-zero fractional seconds, + prints in integer rational fraction form n/d. Format is + YYYY-MM-DDThh:mm:ss[:n/d], where [:n/d] is the + integer numerator and denominator of the fractional + seconds value, if present. See [24] and + [14]. See also method + ESMF_TimeGet(..., timeString= , ...) +
"string isofrac" - prints time's value in strict ISO 8601 + format for all units, including any fractional seconds + part. Format is YYYY-MM-DDThh:mm:ss[.f] where [.f] + represents fractional seconds in decimal form, if present. + See [24] and [14]. See also method + ESMF_TimeGet(..., timeStringISOFrac= , ...) +
+
+
[preString]
+
Optionally prepended string. Default to empty string. + +
+
[unit]
+
Internal unit, i.e. a string. Default to printing to stdout. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+43.4.15 ESMF_TimeSet - Initialize or set a Time +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_TimeSet()
+       subroutine ESMF_TimeSetDefault(time, &
+         yy, yy_i8, &
+         mm, dd, &
+         d, d_i8, &
+         h, m, &
+         s, s_i8, &
+         ms, us, ns, &
+         d_r8, h_r8, m_r8, s_r8, &
+         ms_r8, us_r8, ns_r8, &
+         sN, sN_i8, sD, sD_i8, &
+         calendar, calkindflag, &
+         timeZone, rc)
+
ARGUMENTS: +
       type(ESMF_Time),         intent(inout)         :: time
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       integer(ESMF_KIND_I4),   intent(in),  optional :: yy
+       integer(ESMF_KIND_I8),   intent(in),  optional :: yy_i8
+       integer,                 intent(in),  optional :: mm
+       integer,                 intent(in),  optional :: dd
+       integer(ESMF_KIND_I4),   intent(in),  optional :: d
+       integer(ESMF_KIND_I8),   intent(in),  optional :: d_i8
+       integer(ESMF_KIND_I4),   intent(in),  optional :: h
+       integer(ESMF_KIND_I4),   intent(in),  optional :: m
+       integer(ESMF_KIND_I4),   intent(in),  optional :: s
+       integer(ESMF_KIND_I8),   intent(in),  optional :: s_i8
+       integer(ESMF_KIND_I4),   intent(in),  optional :: ms
+       integer(ESMF_KIND_I4),   intent(in),  optional :: us
+       integer(ESMF_KIND_I4),   intent(in),  optional :: ns
+       real(ESMF_KIND_R8),      intent(in),  optional :: d_r8
+       real(ESMF_KIND_R8),      intent(in),  optional :: h_r8
+       real(ESMF_KIND_R8),      intent(in),  optional :: m_r8
+       real(ESMF_KIND_R8),      intent(in),  optional :: s_r8
+       real(ESMF_KIND_R8),      intent(in),  optional :: ms_r8
+       real(ESMF_KIND_R8),      intent(in),  optional :: us_r8
+       real(ESMF_KIND_R8),      intent(in),  optional :: ns_r8
+       integer(ESMF_KIND_I4),   intent(in),  optional :: sN
+       integer(ESMF_KIND_I8),   intent(in),  optional :: sN_i8
+       integer(ESMF_KIND_I4),   intent(in),  optional :: sD
+       integer(ESMF_KIND_I8),   intent(in),  optional :: sD_i8
+       type(ESMF_Calendar),     intent(in),  optional :: calendar
+       type(ESMF_CalKind_Flag), intent(in),  optional :: calkindflag
+       integer,                 intent(in),  optional :: timeZone ! not imp
+       integer,                 intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Initializes an ESMF_Time with a set of user-specified units + via Fortran optional arguments. + +

+The range of valid values for mm and dd depend on the calendar used. + For Gregorian, Julian, and No-Leap calendars, mm is [1-12] and dd is + [1-28,29,30, or 31], depending on the value of mm and whether yy or + yy_i8 is a leap year. For the 360-day calendar, mm is [1-12] and dd is + [1-30]. For Julian Day, Modified Julian Day, and No-Calendar, + yy, yy_i8, mm, and dd are invalid inputs, since these calendars do not + define them. When valid, the yy and yy_i8 arguments should be fully + specified, e.g. 2003 instead of 03. yy and yy_i8 ranges are only + limited by machine word size, except for the Gregorian and Julian + calendars, where the lowest (proleptic) date limits are 3/1/-4800 and + 3/1/-4712, respectively. This is a limitation of the Gregorian + date-to-Julian day and Julian date-to-Julian day conversion algorithms + used to convert Gregorian and Julian dates to the internal representation + of seconds. See [21] for a description of the Gregorian + date-to-Julian day algorithm and [23] for a description of the + Julian date-to-Julian day algorithm. The Custom calendar will have + user-defined values for yy, yy_i8, mm, and dd. + +

+The Julian day specifier, d or d_i8, can only be used with the + Julian Day and Modified Julian Day calendars, and has a valid range + depending on the word size. For a signed 32-bit d, the range for + Julian day is [+/- 24855]. For a signed 64-bit d_i8, the valid + range for Julian day is [+/- 106,751,991,167,300]. The Julian day + number system adheres to the conventional standard where the reference + day of d=0 corresponds to 11/24/-4713 in the proleptic Gregorian calendar + and 1/1/-4712 in the proleptic Julian calendar. See [27] and + [12]. + +

+The Modified Julian Day system, introduced by space scientists in the late + 1950's, is defined as Julian Day - 2400000.5. See [31]. + +

+Note that d and d_i8 are not valid for the No-Calendar. To remain + consistent with non-Earth calendars added to ESMF in the future, ESMF + requires a calendar to be planet-specific. Hence the No-Calendar does + not know what a day is; it cannot assume an Earth day of 86400 seconds. + +

+Hours, minutes, seconds, and sub-seconds can be used with any calendar, + since they are standardized units that are the same for any planet. + +

+Time manager represents and manipulates time internally with integers + to maintain precision. Hence, user-specified floating point values are + converted internally to integers. Sub-second values are represented + internally with an integer numerator and denominator fraction (sN/sD). + The smallest required resolution is nanoseconds (denominator). + For example, pi can be represented as s=3, + sN=141592654, sD=1000000000. However, via sN_i8 and sD_i8, larger + values can be used. If specifying a constant floating point value, be + sure to provide at least 16 digits to take full advantage of double + precision, for example s_r8=2.718281828459045d0 for 'e' seconds. + +

+The arguments are: +

+
time
+
The object instance to initialize. + +
+
[yy]
+
Integer year (32-bit). Default = 0. + +
+
[yy_i8]
+
Integer year (large, 64-bit). Default = 0. + +
+
[mm]
+
Integer month. Default = 1. + +
+
[dd]
+
Integer day of the month. Default = 1. + +
+
[d]
+
Integer Julian Day, or Modified Julian Day (32-bit). Must not be + specified with Gregorian calendars. Default = 0. + +
+
[d_i8]
+
Integer Julian Day, or Modified Julian Day (large, 64-bit). Must not be + specified with Gregorian calendars. Default = 0. + +
+
[h]
+
Integer hour. Default = 0. + +
+
[m]
+
Integer minute. Default = 0. + +
+
[s]
+
Integer second (32-bit). Default = 0. + +
+
[s_i8]
+
Integer second (large, 64-bit). Default = 0. + +
+
[ms]
+
Integer millisecond. Default = 0. + +
+
[us]
+
Integer microsecond. Default = 0. + +
+
[ns]
+
Integer nanosecond. Default = 0. + +
+
[d_r8]
+
Double precision day. Default = 0.0. + +
+
[h_r8]
+
Double precision hour. Default = 0.0. + +
+
[m_r8]
+
Double precision minute. Default = 0.0. + +
+
[s_r8]
+
Double precision second. Default = 0.0. + +
+
[ms_r8]
+
Double precision millisecond. Default = 0.0. + +
+
[us_r8]
+
Double precision microsecond. Default = 0.0. + +
+
[ns_r8]
+
Double precision nanosecond. Default = 0.0. + +
+
[sN]
+
Integer numerator of fractional second (sN/sD). + Default = 0. + +
+
[sN_i8]
+
Integer numerator of fractional second (sN_i8/sD_i8) + (large, 64-bit). + Default = 0. + +
+
[sD]
+
Integer denominator of fractional second (sN/sD). + Default = 1. + +
+
[sD_i8]
+
Integer denominator of fractional second (sN_i8/sD_i8) + (large, 64-bit). + Default = 1. + +
+
[calendar]
+
Associated Calendar. Defaults to calendar + ESMF_CALKIND_NOCALENDAR or default specified in + ESMF_Initialize() or ESMF_CalendarSetDefault(). + Alternate to, and mutually exclusive with, calkindflag + below. Primarily for specifying a custom calendar kind. + +
+
[calkindflag]
+
Alternate to, and mutually exclusive with, calendar above. More + convenient way of specifying a built-in calendar kind. + +
+
[timeZone]
+
Associated timezone (hours offset from UTC, e.g. EST = -5). + Default = 0 (UTC). (Not implemented yet). + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+43.4.16 ESMF_TimeSet - Initialize or set a Time from ISO format string +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_TimeSet()
+       subroutine ESMF_TimeSetString(time, timeString, rc)
+
ARGUMENTS: +
       type(ESMF_Time),         intent(inout)         :: time
+       character(*),            intent(in)            :: timeString
+       integer,                 intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Initializes an ESMF_Time with a set of user-specified string. + +

+The arguments are: +

+
time
+
The object instance to initialize. + +
+
timeString
+
ISO format time string. E.g. 2012-10-24T18:00:00. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+43.4.17 ESMF_TimeSyncToRealTime - Get system real time (wall clock time) +

+ +

+ +

+
+INTERFACE: +

       subroutine ESMF_TimeSyncToRealTime(time, rc)
+
ARGUMENTS: +
       type(ESMF_Time), intent(inout) :: time
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       integer, intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Gets the system real time (wall clock time), and returns it as an + ESMF_Time. Accurate to the nearest second. + +

+The arguments are: +

+
time
+
The object instance to receive the real time. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+43.4.18 ESMF_TimeValidate - Validate a Time +

+ +

+ +

+
+INTERFACE: +

       subroutine ESMF_TimeValidate(time, options, rc)
+
ARGUMENTS: +
       type(ESMF_Time),   intent(in)            :: time
+       character (len=*), intent(in),  optional :: options
+       integer,           intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Checks whether an ESMF_Time is valid. + Must be a valid date/time on a valid calendar. + The options control the type of validation. + +

+The arguments are: +

+
time
+
ESMF_Time instant to be validated. + +
+
[options]
+
Validation options. If none specified, validates all time property + values. +
"calendar" - validate only the time's calendar. +
"timezone" - validate only the time's timezone. +
+
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ + +

+44 TimeInterval Class +

+ +

+44.1 Description +

+A TimeInterval represents a period between time instants. +It can be either positive or negative. Like the Time interface, +the TimeInterval interface is designed so that you can choose +one or more options from a list of time units in order +to specify a TimeInterval. +See Section 41.3, +Table 41.4 for the available options. + +

+There are TimeInterval methods defined for setting and getting +a TimeInterval, for incrementing and decrementing a TimeInterval +by another TimeInterval, and for multiplying and dividing +TimeIntervals by integers, reals, fractions and other TimeIntervals. +Methods are also defined to take the absolute value and negative +absolute value of a TimeInterval, and for comparing the length of two +TimeIntervals. + +

+The class used to represent time instants in ESMF is Time, +and this class is frequently used in operations along with +TimeIntervals. For example, the difference between two +Times is a TimeInterval. + +

+When a TimeInterval is used in calculations that involve an absolute +reference time, such as incrementing a Time with a TimeInterval, calendar +dependencies may be introduced. The length of the time period that the +TimeInterval represents will depend on the reference Time and the +standard calendar that is associated with it. The calendar dependency becomes +apparent when, for example, adding a TimeInterval of 1 day to the Time +of February 28, 1996, at 4:00pm EST. In a 360 day calendar, the +resulting date would be February 29, 1996, at 4:00pm EST. In a no-leap +calendar, the result would be March 1, 1996, at 4:00pm EST. + +

+TimeIntervals are used by other parts of the ESMF timekeeping +system, such as Clocks (Section 45.1) and Alarms +(Section 46.1). + +

+ +

+44.2 Use and Examples +

+ +

+A typical use for a TimeInterval in a geophysical model +is representation of the time step by which the model is +advanced. Some models change the size of their time step as +the model run progresses; this could +be done by incrementing or decrementing the original time +step by another TimeInterval, or by dividing or multiplying +the time step by an integer value. An example of advancing +model time using a TimeInterval representation of a time +step is shown in Section 45.1. + +

+The following brief example shows how to create, initialize +and manipulate TimeInterval. + +

+ +

+ +

+ +

+

+! !PROGRAM: ESMF_TimeIntervalEx - Time Interval initialization and 
+!                                 manipulation examples
+!
+! !DESCRIPTION:
+!
+! This program shows examples of Time Interval initialization and manipulation
+!-----------------------------------------------------------------------------
+#include "ESMF.h"
+
+      ! ESMF Framework module
+      use ESMF
+      use ESMF_TestMod
+      implicit none
+
+      ! instantiate some time intervals
+      type(ESMF_TimeInterval) :: timeinterval1, timeinterval2, timeinterval3
+
+      ! local variables
+      integer :: d, h, m, s
+
+      ! return code
+      integer:: rc
+
+ +

+

+      ! initialize ESMF framework
+      call ESMF_Initialize(defaultCalKind=ESMF_CALKIND_GREGORIAN, &
+        defaultlogfilename="TimeIntervalEx.Log", &
+                    logkindflag=ESMF_LOGKIND_MULTI, rc=rc)
+
+ +

+ +

+44.2.1 TimeInterval initialization +

+ +

+This example shows how to initialize two ESMF_TimeIntervals. +

+

+      ! initialize time interval1 to 1 day
+      call ESMF_TimeIntervalSet(timeinterval1, d=1, rc=rc)
+
+ +

+

+      call ESMF_TimeIntervalPrint(timeinterval1, options="string", rc=rc)
+
+ +

+

+      ! initialize time interval2 to 4 days, 1 hour, 30 minutes, 10 seconds
+      call ESMF_TimeIntervalSet(timeinterval2, d=4, h=1, m=30, s=10, rc=rc)
+
+ +

+

+      call ESMF_TimeIntervalPrint(timeinterval2, options="string", rc=rc)
+
+ +

+ +

+44.2.2 TimeInterval conversion +

+ +

+This example shows how to convert ESMF_TimeIntervals into + different units. +

+

+      call ESMF_TimeIntervalGet(timeinterval1, s=s, rc=rc)
+      print *, "Time Interval1 = ", s, " seconds."
+
+ +

+

+      call ESMF_TimeIntervalGet(timeinterval2, h=h, m=m, s=s, rc=rc)
+      print *, "Time Interval2 = ", h, " hours, ", m, " minutes, ", &
+                                    s, " seconds."
+
+ +

+ +

+44.2.3 TimeInterval difference +

+ +

+This example shows how to calculate the difference between two + ESMF_TimeIntervals. +

+

+      ! difference between two time intervals
+      timeinterval3 = timeinterval2 - timeinterval1
+     call ESMF_TimeIntervalGet(timeinterval3, d=d, h=h, m=m, s=s, rc=rc)
+     print *, "Difference between TimeInterval2 and TimeInterval1 = ", &
+           d, " days, ", h, " hours, ", m, " minutes, ", s, " seconds."
+
+ +

+ +

+44.2.4 TimeInterval multiplication +

+ +

+This example shows how to multiply an ESMF_TimeInterval. +

+

+      ! multiply time interval by an integer
+      timeinterval3 = timeinterval2 * 3
+      call ESMF_TimeIntervalGet(timeinterval3, d=d, h=h, m=m, s=s, rc=rc)
+      print *, "TimeInterval2 multiplied by 3 = ", d, " days, ", h, &
+               " hours, ", m, " minutes, ", s, " seconds."
+
+ +

+ +

+44.2.5 TimeInterval comparison +

+ +

+This example shows how to compare two ESMF_TimeIntervals. +

+

+      ! comparison
+      if (timeinterval1 < timeinterval2) then
+        print *, "TimeInterval1 is smaller than TimeInterval2"
+      else 
+        print *, "TimeInterval1 is larger than or equal to TimeInterval2"
+      end if
+
+ +

+

+      end program ESMF_TimeIntervalEx
+
+ +

+ + +

+44.3 Restrictions and Future Work +

+ +

+ +

    +
  1. Limits on time span. The limits on the time span that can be +represented are based on the 64-bit integer types used. For +seconds, a signed 64-bit integer will have a range of +/- $2^{63}$-1, or ++/- 9,223,372,036,854,775,807. This corresponds to a range of ++/- ($2^{63}$-1)/(86400 * 365.25) or +/- 292,271,023,045 years. + +

    +For fractional seconds, a signed 64-bit integer will handle a resolution of ++/- $2^{31}$-1, or +/- 9,223,372,036,854,775,807 parts of a second. + +

    +

  2. +
+ +

+44.4 Class API +

+ +

+ +

+ +

+ +

+44.4.1 ESMF_TimeIntervalAssignment(=) - Assign a TimeInterval to another TimeInterval +

+ +

+ +

+
+INTERFACE: +

       interface assignment(=)
+       timeinterval1 = timeinterval2
+
ARGUMENTS: +
       type(ESMF_TimeInterval) :: timeinterval1
+       type(ESMF_TimeInterval) :: timeinterval2
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Set timeinterval1 equal to timeinterval2. This is the default + Fortran assignment, which creates a complete, independent copy of + timeinterval2 as timeinterval1. If timeinterval2 is an + invalid ESMF_TimeInterval object then timeinterval1 will be + equally invalid after the assignment. + +

+The arguments are: +

+
timeinterval1
+
The ESMF_TimeInterval to be set. + +
+
timeinterval2
+
The ESMF_TimeInterval to be copied. + +
+
+ +

+ +

+ +

+44.4.2 ESMF_TimeIntervalOperator(+) - Add two TimeIntervals +

+ +

+ +

+
+INTERFACE: +

       interface operator(+)
+       sum = timeinterval1 + timeinterval2
+
RETURN VALUE: +
       type(ESMF_TimeInterval) :: sum
+
ARGUMENTS: +
       type(ESMF_TimeInterval), intent(in) :: timeinterval1
+       type(ESMF_TimeInterval), intent(in) :: timeinterval2
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Overloads the (+) operator for the ESMF_TimeInterval class to + add timeinterval1 to timeinterval2 and return the + sum as an ESMF_TimeInterval. + +

+The arguments are: +

+
timeinterval1
+
The augend. + +
+
timeinterval2
+
The addend. + +
+
+ +

+ +

+ +

+44.4.3 ESMF_TimeIntervalOperator(-) - Subtract one TimeInterval from another +

+ +

+ +

+
+INTERFACE: +

       interface operator(-)
+       difference = timeinterval1 - timeinterval2
+
RETURN VALUE: +
       type(ESMF_TimeInterval) :: difference
+
ARGUMENTS: +
       type(ESMF_TimeInterval), intent(in) :: timeinterval1
+       type(ESMF_TimeInterval), intent(in) :: timeinterval2
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Overloads the (-) operator for the ESMF_TimeInterval class to + subtract timeinterval2 from timeinterval1 and return + the difference as an ESMF_TimeInterval. + +

+The arguments are: +

+
timeinterval1
+
The minuend. + +
+
timeinterval2
+
The subtrahend. + +
+
+ +

+ +

+ +

+44.4.4 ESMF_TimeIntervalOperator(-) - Perform unary negation on a TimeInterval +

+ +

+ +

+
+INTERFACE: +

       interface operator(-)
+       timeinterval = -timeinterval
+
RETURN VALUE: +
       type(ESMF_TimeInterval) :: -timeInterval
+
ARGUMENTS: +
       type(ESMF_TimeInterval), intent(in) :: timeinterval
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Overloads the (-) operator for the ESMF_TimeInterval class to + perform unary negation on timeinterval and return the result. + +

+The arguments are: +

+
timeinterval
+
The time interval to be negated. + +
+
+ +

+ +

+ +

+44.4.5 ESMF_TimeIntervalOperator(/) - Divide two TimeIntervals, return double precision quotient +

+ +

+ +

+
+INTERFACE: +

       interface operator(/)
+       quotient = timeinterval1 / timeinterval2
+
RETURN VALUE: +
       real(ESMF_KIND_R8) :: quotient
+
ARGUMENTS: +
       type(ESMF_TimeInterval), intent(in) :: timeinterval1
+       type(ESMF_TimeInterval), intent(in) :: timeinterval2
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Overloads the (/) operator for the ESMF_TimeInterval class to + return timeinterval1 divided by timeinterval2 as a + double precision quotient. + +

+The arguments are: +

+
timeinterval1
+
The dividend. + +
+
timeinterval2
+
The divisor. + +
+
+ +

+ +

+ +

+44.4.6 ESMF_TimeIntervalOperator(/) - Divide a TimeInterval by an integer, return TimeInterval quotient +

+ +

+ +

+
+INTERFACE: +

       interface operator(/)
+       quotient = timeinterval / divisor
+
RETURN VALUE: +
       type(ESMF_TimeInterval) :: quotient
+
ARGUMENTS: +
       type(ESMF_TimeInterval), intent(in) :: timeinterval
+       integer(ESMF_KIND_I4),   intent(in) :: divisor
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Overloads the (/) operator for the ESMF_TimeInterval class to + divide a timeinterval by an integer divisor, and + return the quotient as an ESMF_TimeInterval. + +

+The arguments are: +

+
timeinterval
+
The dividend. + +
+
divisor
+
Integer divisor. + +
+
+ +

+ +

+ +

+44.4.7 ESMF_TimeIntervalFunction(MOD) - Divide two TimeIntervals, return TimeInterval remainder +

+ +

+ +

+
+INTERFACE: +

       interface MOD
+       function MOD(timeinterval1, timeinterval2)
+
RETURN VALUE: +
       type(ESMF_TimeInterval) :: MOD
+
ARGUMENTS: +
       type(ESMF_TimeInterval), intent(in) :: timeinterval1
+       type(ESMF_TimeInterval), intent(in) :: timeinterval2
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Overloads the Fortran intrinsic MOD() function for the + ESMF_TimeInterval class to return the remainder of + timeinterval1 divided by timeinterval2 as an + ESMF_TimeInterval. + +

+The arguments are: +

+
timeinterval1
+
The dividend. + +
+
timeinterval2
+
The divisor. + +
+
+ +

+ +

+ +

+44.4.8 ESMF_TimeIntervalOperator(*) - Multiply a TimeInterval by an integer +

+ +

+ +

+
+INTERFACE: +

       interface operator(*)
+       product = timeinterval * multiplier
+                     OR
+       product = multiplier * timeinterval
+
RETURN VALUE: +
       type(ESMF_TimeInterval) :: product
+
ARGUMENTS: +
       type(ESMF_TimeInterval), intent(in) :: timeinterval
+       integer(ESMF_KIND_I4),   intent(in) :: multiplier
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Overloads the (*) operator for the ESMF_TimeInterval class to + multiply a timeinterval by an integer multiplier, + and return the product as an ESMF_TimeInterval. + +

+The arguments are: +

+
timeinterval
+
The multiplicand. + +
+
multiplier
+
The integer multiplier. + +
+
+ +

+ +

+ +

+44.4.9 ESMF_TimeIntervalOperator(==) - Test if TimeInterval 1 is equal to TimeInterval 2 +

+ +

+ +

+
+INTERFACE: +

       interface operator(==)
+       if (timeinterval1 == timeinterval2) then ... endif
+                    OR
+       result = (timeinterval1 == timeinterval2)
+
RETURN VALUE: +
       logical :: result
+
ARGUMENTS: +
       type(ESMF_TimeInterval), intent(in) :: timeinterval1
+       type(ESMF_TimeInterval), intent(in) :: timeinterval2
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Overloads the (==) operator for the ESMF_TimeInterval class to + return .true. if timeinterval1 and timeinterval2 + represent an equal duration of time, and .false. otherwise. + +

+The arguments are: +

+
timeinterval1
+
First ESMF_TimeInterval in comparison. + +
+
timeinterval2
+
Second ESMF_TimeInterval in comparison. + +
+
+ +

+ +

+ +

+44.4.10 ESMF_TimeIntervalOperator(/=) - Test if TimeInterval 1 is not equal to TimeInterval 2 +

+ +

+ +

+
+INTERFACE: +

       interface operator(/=)
+       if (timeinterval1 /= timeinterval2) then ... endif
+                    OR
+       result = (timeinterval1 /= timeinterval2)
+
RETURN VALUE: +
       logical :: result
+
ARGUMENTS: +
       type(ESMF_TimeInterval), intent(in) :: timeinterval1
+       type(ESMF_TimeInterval), intent(in) :: timeinterval2
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Overloads the (/=) operator for the ESMF_TimeInterval class to + return .true. if timeinterval1 and timeinterval2 do not + represent an equal duration of time, and .false. otherwise. + +

+The arguments are: +

+
timeinterval1
+
First ESMF_TimeInterval in comparison. + +
+
timeinterval2
+
Second ESMF_TimeInterval in comparison. + +
+
+ +

+ +

+ +

+44.4.11 ESMF_TimeIntervalOperator(<) - Test if TimeInterval 1 is less than TimeInterval 2 +

+ +

+ +

+
+INTERFACE: +

       interface operator(<)
+       if (timeinterval1 < timeinterval2) then ... endif
+                    OR
+       result = (timeinterval1 < timeinterval2)
+
RETURN VALUE: +
       logical :: result
+
ARGUMENTS: +
       type(ESMF_TimeInterval), intent(in) :: timeinterval1
+       type(ESMF_TimeInterval), intent(in) :: timeinterval2
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Overloads the (<) operator for the ESMF_TimeInterval class to + return .true. if timeinterval1 is a lesser duration of time + than timeinterval2, and .false. otherwise. + +

+The arguments are: +

+
timeinterval1
+
First ESMF_TimeInterval in comparison. + +
+
timeinterval2
+
Second ESMF_TimeInterval in comparison. + +
+
+ +

+ +

+ +

+44.4.12 ESMF_TimeIntervalOperator(<=) - Test if TimeInterval 1 is less than or equal to TimeInterval 2 +

+ +

+ +

+
+INTERFACE: +

       interface operator(<=)
+       if (timeinterval1 <= timeinterval2) then ... endif
+                    OR
+       result = (timeinterval1 <= timeinterval2)
+
RETURN VALUE: +
       logical :: result
+
ARGUMENTS: +
       type(ESMF_TimeInterval), intent(in) :: timeinterval1
+       type(ESMF_TimeInterval), intent(in) :: timeinterval2
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Overloads the (<=) operator for the ESMF_TimeInterval class to + return .true. if timeinterval1 is a lesser or equal duration + of time than timeinterval2, and .false. otherwise. + +

+The arguments are: +

+
timeinterval1
+
First ESMF_TimeInterval in comparison. + +
+
timeinterval2
+
Second ESMF_TimeInterval in comparison. + +
+
+ +

+ +

+ +

+44.4.13 ESMF_TimeIntervalOperator(>) - Test if TimeInterval 1 is greater than TimeInterval 2 +

+ +

+ +

+
+INTERFACE: +

       interface operator(>)
+       if (timeinterval1 > timeinterval2) then ... endif
+                    OR
+       result = (timeinterval1 > timeinterval2)
+
RETURN VALUE: +
       logical :: result
+
ARGUMENTS: +
       type(ESMF_TimeInterval), intent(in) :: timeinterval1
+       type(ESMF_TimeInterval), intent(in) :: timeinterval2
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Overloads the (>) operator for the ESMF_TimeInterval class to + return .true. if timeinterval1 is a greater duration of time + than timeinterval2, and .false. otherwise. + +

+The arguments are: +

+
timeinterval1
+
First ESMF_TimeInterval in comparison. + +
+
timeinterval2
+
Second ESMF_TimeInterval in comparison. + +
+
+ +

+ +

+ +

+44.4.14 ESMF_TimeIntervalOperator(>=) - Test if TimeInterval 1 is greater than or equal to TimeInterval 2 +

+ +

+ +

+
+INTERFACE: +

       interface operator(>=)
+       if (timeinterval1 >= timeinterval2) then ... endif
+                    OR
+       result = (timeinterval1 >= timeinterval2)
+
RETURN VALUE: +
       logical :: result
+
ARGUMENTS: +
       type(ESMF_TimeInterval), intent(in) :: timeinterval1
+       type(ESMF_TimeInterval), intent(in) :: timeinterval2
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Overloads the (>=) operator for the ESMF_TimeInterval class to + return .true. if timeinterval1 is a greater or equal + duration of time than timeinterval2, and .false. otherwise. + +

+The arguments are: +

+
timeinterval1
+
First ESMF_TimeInterval in comparison. + +
+
timeinterval2
+
Second ESMF_TimeInterval in comparison. + +
+
+ +

+ +

+ +

+44.4.15 ESMF_TimeIntervalAbsValue - Get the absolute value of a TimeInterval +

+ +

+ +

+
+INTERFACE: +

       function ESMF_TimeIntervalAbsValue(timeinterval)
+
RETURN VALUE: +
       type(ESMF_TimeInterval) :: ESMF_TimeIntervalAbsValue
+
ARGUMENTS: +
       type(ESMF_TimeInterval), intent(in) :: timeinterval
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Returns the absolute value of timeinterval. + +

+The argument is: +

+
timeinterval
+
The object instance to take the absolute value of. + Absolute value is returned as the value of the function. + +
+
+ +

+ +

+ +

+44.4.16 ESMF_TimeIntervalGet - Get a TimeInterval value +

+ +

+ +

+
+INTERFACE: +

       ! Private name; call using ESMF_TimeIntervalGet()
+       subroutine ESMF_TimeIntervalGetDur(timeinterval, &
+         yy, yy_i8, &
+         mm, mm_i8, &
+         d, d_i8, &
+         h, m, &
+         s, s_i8, &
+         ms, us, ns, &
+         d_r8, h_r8, m_r8, s_r8, &
+         ms_r8, us_r8, ns_r8, &
+         sN, sN_i8, sD, sD_i8, &
+         startTime, calendar, calkindflag, &
+         timeString, timeStringISOFrac, rc)
+
ARGUMENTS: +
       type(ESMF_TimeInterval), intent(in)            :: timeinterval
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       integer(ESMF_KIND_I4),   intent(out), optional :: yy
+       integer(ESMF_KIND_I8),   intent(out), optional :: yy_i8
+       integer(ESMF_KIND_I4),   intent(out), optional :: mm
+       integer(ESMF_KIND_I8),   intent(out), optional :: mm_i8
+       integer(ESMF_KIND_I4),   intent(out), optional :: d
+       integer(ESMF_KIND_I8),   intent(out), optional :: d_i8
+       integer(ESMF_KIND_I4),   intent(out), optional :: h
+       integer(ESMF_KIND_I4),   intent(out), optional :: m
+       integer(ESMF_KIND_I4),   intent(out), optional :: s
+       integer(ESMF_KIND_I8),   intent(out), optional :: s_i8
+       integer(ESMF_KIND_I4),   intent(out), optional :: ms
+       integer(ESMF_KIND_I4),   intent(out), optional :: us
+       integer(ESMF_KIND_I4),   intent(out), optional :: ns
+       real(ESMF_KIND_R8),      intent(out), optional :: d_r8
+       real(ESMF_KIND_R8),      intent(out), optional :: h_r8
+       real(ESMF_KIND_R8),      intent(out), optional :: m_r8
+       real(ESMF_KIND_R8),      intent(out), optional :: s_r8
+       real(ESMF_KIND_R8),      intent(out), optional :: ms_r8
+       real(ESMF_KIND_R8),      intent(out), optional :: us_r8
+       real(ESMF_KIND_R8),      intent(out), optional :: ns_r8
+       integer(ESMF_KIND_I4),   intent(out), optional :: sN
+       integer(ESMF_KIND_I8),   intent(out), optional :: sN_i8
+       integer(ESMF_KIND_I4),   intent(out), optional :: sD
+       integer(ESMF_KIND_I8),   intent(out), optional :: sD_i8
+       type(ESMF_Time),         intent(out), optional :: startTime
+       type(ESMF_Calendar),     intent(out), optional :: calendar
+       type(ESMF_CalKind_Flag), intent(out), optional :: calkindflag
+       character (len=*),       intent(out), optional :: timeString
+       character (len=*),       intent(out), optional :: timeStringISOFrac
+       integer,                 intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Gets the value of timeinterval in units specified by the + user via Fortran optional arguments. + +

+The ESMF Time Manager represents and manipulates time internally with + integers to maintain precision. Hence, user-specified floating point + values are converted internally from integers. + +

+Units are bound (normalized) to the next larger unit specified. For + example, if a time interval is defined to be one day, then + ESMF_TimeIntervalGet(d = days, s = seconds) would return + days = 1, seconds = 0, + whereas ESMF_TimeIntervalGet(s = seconds) would return + seconds = 86400. + +

+For timeString, converts ESMF_TimeInterval's value into + partial ISO 8601 format PyYmMdDThHmMs[:n/d]S. See [24] and + [14]. See also method ESMF_TimeIntervalPrint(). + +

+For timeStringISOFrac, converts ESMF_TimeInterval's value into + full ISO 8601 format PyYmMdDThHmMs[.f]S. See [24] and + [14]. See also method ESMF_TimeIntervalPrint(). + +

+The arguments are: +

+
timeinterval
+
The object instance to query. + +
+
[yy]
+
Integer year (32-bit). + +
+
[yy_i8]
+
Integer year (large, 64-bit). + +
+
[mm]
+
Integer month (32-bit). + +
+
[mm_i8]
+
Integer month (large, 64-bit). + +
+
[d]
+
Integer Julian day, or Modified Julian day (32-bit). + +
+
[d_i8]
+
Integer Julian day, or Modified Julian day (large, 64-bit). + +
+
[h]
+
Integer hour. + +
+
[m]
+
Integer minute. + +
+
[s]
+
Integer second (32-bit). + +
+
[s_i8]
+
Integer second (large, 64-bit). + +
+
[ms]
+
Integer millisecond. + +
+
[us]
+
Integer microsecond. + +
+
[ns]
+
Integer nanosecond. + +
+
[d_r8]
+
Double precision day. + +
+
[h_r8]
+
Double precision hour. + +
+
[m_r8]
+
Double precision minute. + +
+
[s_r8]
+
Double precision second. + +
+
[ms_r8]
+
Double precision millisecond. + +
+
[us_r8]
+
Double precision microsecond. + +
+
[ns_r8]
+
Double precision nanosecond. + +
+
[sN]
+
Integer numerator of fractional second (sN/sD). + +
+
[sN_i8]
+
Integer numerator of fractional second (sN_i8/sD_i8) + (large, 64-bit). + +
+
[sD]
+
Integer denominator of fractional second (sN/sD). + +
+
[sD_i8]
+
Integer denominator of fractional second (sN_i8/sD_i8) + (large, 64-bit). + +
+
[startTime]
+
Starting time, if set, of an absolute calendar interval + (yy, mm, and/or d). + +
+
[calendar]
+
Associated Calendar, if any. + +
+
[calkindflag]
+
Associated CalKind_Flag, if any. + +
+
[timeString]
+
Convert time interval value to format string PyYmMdDThHmMs[:n/d]S, + where n/d is numerator/denominator of any fractional seconds and + all other units are in ISO 8601 format. See [24] and + [14]. See also method ESMF_TimeIntervalPrint(). + +
+
[timeStringISOFrac]
+
Convert time interval value to strict ISO 8601 format string + PyYmMdDThHmMs[.f], where f is decimal form of any fractional + seconds. See [24] and [14]. See also method + ESMF_TimeIntervalPrint(). + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+44.4.17 ESMF_TimeIntervalGet - Get a TimeInterval value +

+ +

+ +

+
+INTERFACE: +

       ! Private name; call using ESMF_TimeIntervalGet()
+       subroutine ESMF_TimeIntervalGetDurStart(timeinterval, startTimeIn, &
+         &
+         yy, yy_i8, &
+         mm, mm_i8, &
+         d, d_i8, &
+         h, m, &
+         s, s_i8, &
+         ms, us, ns, &
+         d_r8, h_r8, m_r8, s_r8, &
+         ms_r8, us_r8, ns_r8, &
+         sN, sN_i8, sD, sD_i8, &
+         startTime, &
+         calendar, calkindflag, &
+         timeString, timeStringISOFrac, rc)
+
ARGUMENTS: +
       type(ESMF_TimeInterval), intent(in)            :: timeinterval
+       type(ESMF_Time),         intent(in)            :: startTimeIn ! Input
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       integer(ESMF_KIND_I4),   intent(out), optional :: yy
+       integer(ESMF_KIND_I8),   intent(out), optional :: yy_i8
+       integer(ESMF_KIND_I4),   intent(out), optional :: mm
+       integer(ESMF_KIND_I8),   intent(out), optional :: mm_i8
+       integer(ESMF_KIND_I4),   intent(out), optional :: d
+       integer(ESMF_KIND_I8),   intent(out), optional :: d_i8
+       integer(ESMF_KIND_I4),   intent(out), optional :: h
+       integer(ESMF_KIND_I4),   intent(out), optional :: m
+       integer(ESMF_KIND_I4),   intent(out), optional :: s
+       integer(ESMF_KIND_I8),   intent(out), optional :: s_i8
+       integer(ESMF_KIND_I4),   intent(out), optional :: ms
+       integer(ESMF_KIND_I4),   intent(out), optional :: us
+       integer(ESMF_KIND_I4),   intent(out), optional :: ns
+       real(ESMF_KIND_R8),      intent(out), optional :: d_r8
+       real(ESMF_KIND_R8),      intent(out), optional :: h_r8
+       real(ESMF_KIND_R8),      intent(out), optional :: m_r8
+       real(ESMF_KIND_R8),      intent(out), optional :: s_r8
+       real(ESMF_KIND_R8),      intent(out), optional :: ms_r8
+       real(ESMF_KIND_R8),      intent(out), optional :: us_r8
+       real(ESMF_KIND_R8),      intent(out), optional :: ns_r8
+       integer(ESMF_KIND_I4),   intent(out), optional :: sN
+       integer(ESMF_KIND_I8),   intent(out), optional :: sN_i8
+       integer(ESMF_KIND_I4),   intent(out), optional :: sD
+       integer(ESMF_KIND_I8),   intent(out), optional :: sD_i8
+       type(ESMF_Time),         intent(out), optional :: startTime
+       type(ESMF_Calendar),     intent(out), optional :: calendar
+       type(ESMF_CalKind_Flag), intent(out), optional :: calkindflag
+       character (len=*),       intent(out), optional :: timeString
+       character (len=*),       intent(out), optional :: timeStringISOFrac
+       integer,                 intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Gets the value of timeinterval in units specified by the + user via Fortran optional arguments. + +

+The ESMF Time Manager represents and manipulates time internally with + integers to maintain precision. Hence, user-specified floating point + values are converted internally from integers. + +

+Units are bound (normalized) to the next larger unit specified. For + example, if a time interval is defined to be one day, then + ESMF_TimeIntervalGet(d = days, s = seconds) would return + days = 1, seconds = 0, + whereas ESMF_TimeIntervalGet(s = seconds) would return + seconds = 86400. + +

+For timeString, converts ESMF_TimeInterval's value into + partial ISO 8601 format PyYmMdDThHmMs[:n/d]S. See [24] and + [14]. See also method ESMF_TimeIntervalPrint(). + +

+For timeStringISOFrac, converts ESMF_TimeInterval's value into + full ISO 8601 format PyYmMdDThHmMs[.f]S. See [24] and + [14]. See also method ESMF_TimeIntervalPrint(). + +

+The arguments are: +

+
timeinterval
+
The object instance to query. + +
+
startTimeIn
+
INPUT argument: pins a calendar interval to a specific point + in time to allow conversion between relative units (yy, mm, d) and + absolute units (d, h, m, s). Overrides any startTime and/or endTime + previously set. Mutually exclusive with endTimeIn and calendarIn. + +
+
[yy]
+
Integer year (32-bit). + +
+
[yy_i8]
+
Integer year (large, 64-bit). + +
+
[mm]
+
Integer month (32-bit). + +
+
[mm_i8]
+
Integer month (large, 64-bit). + +
+
[d]
+
Integer Julian day, or Modified Julian day (32-bit). + +
+
[d_i8]
+
Integer Julian day, or Modified Julian day (large, 64-bit). + +
+
[h]
+
Integer hour. + +
+
[m]
+
Integer minute. + +
+
[s]
+
Integer second (32-bit). + +
+
[s_i8]
+
Integer second (large, 64-bit). + +
+
[ms]
+
Integer millisecond. + +
+
[us]
+
Integer microsecond. + +
+
[ns]
+
Integer nanosecond. + +
+
[d_r8]
+
Double precision day. + +
+
[h_r8]
+
Double precision hour. + +
+
[m_r8]
+
Double precision minute. + +
+
[s_r8]
+
Double precision second. + +
+
[ms_r8]
+
Double precision millisecond. + +
+
[us_r8]
+
Double precision microsecond. + +
+
[ns_r8]
+
Double precision nanosecond. + +
+
[sN]
+
Integer numerator of fractional second (sN/sD). + +
+
[sN_i8]
+
Integer numerator of fractional second (sN_i8/sD_i8) + (large, 64-bit). + +
+
[sD]
+
Integer denominator of fractional second (sN/sD). + +
+
[sD_i8]
+
Integer denominator of fractional second (sN_i8/sD_i8) + (large, 64-bit). + +
+
[startTime]
+
Starting time, if set, of an absolute calendar interval + (yy, mm, and/or d). + +
+
[calendar]
+
Associated Calendar, if any. + +
+
[calkindflag]
+
Associated CalKind_Flag, if any. + +
+
[timeString]
+
Convert time interval value to format string PyYmMdDThHmMs[:n/d]S, + where n/d is numerator/denominator of any fractional seconds and + all other units are in ISO 8601 format. See [24] and + [14]. See also method ESMF_TimeIntervalPrint(). + +
+
[timeStringISOFrac]
+
Convert time interval value to strict ISO 8601 format string + PyYmMdDThHmMs[.f], where f is decimal form of any fractional + seconds. See [24] and [14]. See also method + ESMF_TimeIntervalPrint(). + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+44.4.18 ESMF_TimeIntervalGet - Get a TimeInterval value +

+ +

+ +

+
+INTERFACE: +

       ! Private name; call using ESMF_TimeIntervalGet()
+       subroutine ESMF_TimeIntervalGetDurCal(timeinterval, calendarIn, &
+         &
+         yy, yy_i8, &
+         mm, mm_i8, &
+         d, d_i8, &
+         h, m, &
+         s, s_i8, &
+         ms, us, ns, &
+         d_r8, h_r8, m_r8, s_r8, &
+         ms_r8, us_r8, ns_r8, &
+         sN, sN_i8, sD, sD_i8, &
+         startTime, &
+         calendar, calkindflag, &
+         timeString, timeStringISOFrac, rc)
+
ARGUMENTS: +
       type(ESMF_TimeInterval), intent(in)            :: timeinterval
+       type(ESMF_Calendar),     intent(in)            :: calendarIn ! Input
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       integer(ESMF_KIND_I4),   intent(out), optional :: yy
+       integer(ESMF_KIND_I8),   intent(out), optional :: yy_i8
+       integer(ESMF_KIND_I4),   intent(out), optional :: mm
+       integer(ESMF_KIND_I8),   intent(out), optional :: mm_i8
+       integer(ESMF_KIND_I4),   intent(out), optional :: d
+       integer(ESMF_KIND_I8),   intent(out), optional :: d_i8
+       integer(ESMF_KIND_I4),   intent(out), optional :: h
+       integer(ESMF_KIND_I4),   intent(out), optional :: m
+       integer(ESMF_KIND_I4),   intent(out), optional :: s
+       integer(ESMF_KIND_I8),   intent(out), optional :: s_i8
+       integer(ESMF_KIND_I4),   intent(out), optional :: ms
+       integer(ESMF_KIND_I4),   intent(out), optional :: us
+       integer(ESMF_KIND_I4),   intent(out), optional :: ns
+       real(ESMF_KIND_R8),      intent(out), optional :: d_r8
+       real(ESMF_KIND_R8),      intent(out), optional :: h_r8
+       real(ESMF_KIND_R8),      intent(out), optional :: m_r8
+       real(ESMF_KIND_R8),      intent(out), optional :: s_r8
+       real(ESMF_KIND_R8),      intent(out), optional :: ms_r8
+       real(ESMF_KIND_R8),      intent(out), optional :: us_r8
+       real(ESMF_KIND_R8),      intent(out), optional :: ns_r8
+       integer(ESMF_KIND_I4),   intent(out), optional :: sN
+       integer(ESMF_KIND_I8),   intent(out), optional :: sN_i8
+       integer(ESMF_KIND_I4),   intent(out), optional :: sD
+       integer(ESMF_KIND_I8),   intent(out), optional :: sD_i8
+       type(ESMF_Time),         intent(out), optional :: startTime
+       type(ESMF_Calendar),     intent(out), optional :: calendar
+       type(ESMF_CalKind_Flag), intent(out), optional :: calkindflag
+       character (len=*),       intent(out), optional :: timeString
+       character (len=*),       intent(out), optional :: timeStringISOFrac
+       integer,                 intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Gets the value of timeinterval in units specified by the + user via Fortran optional arguments. + +

+The ESMF Time Manager represents and manipulates time internally with + integers to maintain precision. Hence, user-specified floating point + values are converted internally from integers. + +

+Units are bound (normalized) to the next larger unit specified. For + example, if a time interval is defined to be one day, then + ESMF_TimeIntervalGet(d = days, s = seconds) would return + days = 1, seconds = 0, + whereas ESMF_TimeIntervalGet(s = seconds) would return + seconds = 86400. + +

+For timeString, converts ESMF_TimeInterval's value into + partial ISO 8601 format PyYmMdDThHmMs[:n/d]S. See [24] and + [14]. See also method ESMF_TimeIntervalPrint(). + +

+For timeStringISOFrac, converts ESMF_TimeInterval's value into + full ISO 8601 format PyYmMdDThHmMs[.f]S. See [24] and + [14]. See also method ESMF_TimeIntervalPrint(). + +

+The arguments are: +

+
timeinterval
+
The object instance to query. + +
+
calendarIn
+
INPUT argument: pins a calendar interval to a specific calendar + to allow conversion between relative units (yy, mm, d) and + absolute units (d, h, m, s). Mutually exclusive with startTimeIn + and endTimeIn since they contain a calendar. Alternate to, and + mutually exclusive with, calkindflagIn below. Primarily for + specifying a custom calendar kind. + +
+
[yy]
+
Integer year (32-bit). + +
+
[yy_i8]
+
Integer year (large, 64-bit). + +
+
[mm]
+
Integer month (32-bit). + +
+
[mm_i8]
+
Integer month (large, 64-bit). + +
+
[d]
+
Integer Julian day, or Modified Julian day (32-bit). + +
+
[d_i8]
+
Integer Julian day, or Modified Julian day (large, 64-bit). + +
+
[h]
+
Integer hour. + +
+
[m]
+
Integer minute. + +
+
[s]
+
Integer second (32-bit). + +
+
[s_i8]
+
Integer second (large, 64-bit). + +
+
[ms]
+
Integer millisecond. + +
+
[us]
+
Integer microsecond. + +
+
[ns]
+
Integer nanosecond. + +
+
[d_r8]
+
Double precision day. + +
+
[h_r8]
+
Double precision hour. + +
+
[m_r8]
+
Double precision minute. + +
+
[s_r8]
+
Double precision second. + +
+
[ms_r8]
+
Double precision millisecond. + +
+
[us_r8]
+
Double precision microsecond. + +
+
[ns_r8]
+
Double precision nanosecond. + +
+
[sN]
+
Integer numerator of fractional second (sN/sD). + +
+
[sN_i8]
+
Integer numerator of fractional second (sN_i8/sD_i8) + (large, 64-bit). + +
+
[sD]
+
Integer denominator of fractional second (sN/sD). + +
+
[sD_i8]
+
Integer denominator of fractional second (sN_i8/sD_i8) + (large, 64-bit). + +
+
[startTime]
+
Starting time, if set, of an absolute calendar interval + (yy, mm, and/or d). + +
+
[calendar]
+
Associated Calendar, if any. + +
+
[calkindflag]
+
Associated CalKind_Flag, if any. + +
+
[timeString]
+
Convert time interval value to format string PyYmMdDThHmMs[:n/d]S, + where n/d is numerator/denominator of any fractional seconds and + all other units are in ISO 8601 format. See [24] and + [14]. See also method ESMF_TimeIntervalPrint(). + +
+
[timeStringISOFrac]
+
Convert time interval value to strict ISO 8601 format string + PyYmMdDThHmMs[.f], where f is decimal form of any fractional + seconds. See [24] and [14]. See also method + ESMF_TimeIntervalPrint(). + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+44.4.19 ESMF_TimeIntervalGet - Get a TimeInterval value +

+ +

+ +

+
+INTERFACE: +

       ! Private name; call using ESMF_TimeIntervalGet()
+       subroutine ESMF_TimeIntervalGetDurCalTyp(timeinterval, calkindflagIn, &
+         &
+         yy, yy_i8, &
+         mm, mm_i8, &
+         d, d_i8, &
+         h, m, &
+         s, s_i8, &
+         ms, us, ns, &
+         d_r8, h_r8, m_r8, s_r8, &
+         ms_r8, us_r8, ns_r8, &
+         sN, sN_i8, sD, sD_i8, &
+         startTime, &
+         calendar, calkindflag, &
+         timeString, &
+         timeStringISOFrac, rc)
+
ARGUMENTS: +
       type(ESMF_TimeInterval), intent(in)            :: timeinterval
+       type(ESMF_CalKind_Flag), intent(in)            :: calkindflagIn ! Input
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       integer(ESMF_KIND_I4),   intent(out), optional :: yy
+       integer(ESMF_KIND_I8),   intent(out), optional :: yy_i8
+       integer(ESMF_KIND_I4),   intent(out), optional :: mm
+       integer(ESMF_KIND_I8),   intent(out), optional :: mm_i8
+       integer(ESMF_KIND_I4),   intent(out), optional :: d
+       integer(ESMF_KIND_I8),   intent(out), optional :: d_i8
+       integer(ESMF_KIND_I4),   intent(out), optional :: h
+       integer(ESMF_KIND_I4),   intent(out), optional :: m
+       integer(ESMF_KIND_I4),   intent(out), optional :: s
+       integer(ESMF_KIND_I8),   intent(out), optional :: s_i8
+       integer(ESMF_KIND_I4),   intent(out), optional :: ms
+       integer(ESMF_KIND_I4),   intent(out), optional :: us
+       integer(ESMF_KIND_I4),   intent(out), optional :: ns
+       real(ESMF_KIND_R8),      intent(out), optional :: d_r8
+       real(ESMF_KIND_R8),      intent(out), optional :: h_r8
+       real(ESMF_KIND_R8),      intent(out), optional :: m_r8
+       real(ESMF_KIND_R8),      intent(out), optional :: s_r8
+       real(ESMF_KIND_R8),      intent(out), optional :: ms_r8
+       real(ESMF_KIND_R8),      intent(out), optional :: us_r8
+       real(ESMF_KIND_R8),      intent(out), optional :: ns_r8
+       integer(ESMF_KIND_I4),   intent(out), optional :: sN
+       integer(ESMF_KIND_I8),   intent(out), optional :: sN_i8
+       integer(ESMF_KIND_I4),   intent(out), optional :: sD
+       integer(ESMF_KIND_I8),   intent(out), optional :: sD_i8
+       type(ESMF_Time),         intent(out), optional :: startTime
+       type(ESMF_Calendar),     intent(out), optional :: calendar
+       type(ESMF_CalKind_Flag), intent(out), optional :: calkindflag
+       character (len=*),       intent(out), optional :: timeString
+       character (len=*),       intent(out), optional :: timeStringISOFrac
+       integer,                 intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Gets the value of timeinterval in units specified by the + user via Fortran optional arguments. + +

+The ESMF Time Manager represents and manipulates time internally with + integers to maintain precision. Hence, user-specified floating point + values are converted internally from integers. + +

+Units are bound (normalized) to the next larger unit specified. For + example, if a time interval is defined to be one day, then + ESMF_TimeIntervalGet(d = days, s = seconds) would return + days = 1, seconds = 0, + whereas ESMF_TimeIntervalGet(s = seconds) would return + seconds = 86400. + +

+For timeString, converts ESMF_TimeInterval's value into + partial ISO 8601 format PyYmMdDThHmMs[:n/d]S. See [24] and + [14]. See also method ESMF_TimeIntervalPrint(). + +

+For timeStringISOFrac, converts ESMF_TimeInterval's value into + full ISO 8601 format PyYmMdDThHmMs[.f]S. See [24] and + [14]. See also method ESMF_TimeIntervalPrint(). + +

+The arguments are: +

+
timeinterval
+
The object instance to query. + +
+
calkindflagIn
+
INPUT argument: Alternate to, and mutually exclusive with, + calendarIn above. More convenient way of specifying a built-in + calendar kind. + +
+
[yy]
+
Integer year (32-bit). + +
+
[yy_i8]
+
Integer year (large, 64-bit). + +
+
[mm]
+
Integer month (32-bit). + +
+
[mm_i8]
+
Integer month (large, 64-bit). + +
+
[d]
+
Integer Julian day, or Modified Julian day (32-bit). + +
+
[d_i8]
+
Integer Julian day, or Modified Julian day (large, 64-bit). + +
+
[h]
+
Integer hour. + +
+
[m]
+
Integer minute. + +
+
[s]
+
Integer second (32-bit). + +
+
[s_i8]
+
Integer second (large, 64-bit). + +
+
[ms]
+
Integer millisecond. + +
+
[us]
+
Integer microsecond. + +
+
[ns]
+
Integer nanosecond. + +
+
[d_r8]
+
Double precision day. + +
+
[h_r8]
+
Double precision hour. + +
+
[m_r8]
+
Double precision minute. + +
+
[s_r8]
+
Double precision second. + +
+
[ms_r8]
+
Double precision millisecond. + +
+
[us_r8]
+
Double precision microsecond. + +
+
[ns_r8]
+
Double precision nanosecond. + +
+
[sN]
+
Integer numerator of fractional second (sN/sD). + +
+
[sN_i8]
+
Integer numerator of fractional second (sN_i8/sD_i8) + (large, 64-bit). + +
+
[sD]
+
Integer denominator of fractional second (sN/sD). + +
+
[sD_i8]
+
Integer denominator of fractional second (sN_i8/sD_i8) + (large, 64-bit). + +
+
[startTime]
+
Starting time, if set, of an absolute calendar interval + (yy, mm, and/or d). + +
+
[calendar]
+
Associated Calendar, if any. + +
+
[calkindflag]
+
Associated CalKind_Flag, if any. + +
+
[timeString]
+
Convert time interval value to format string PyYmMdDThHmMs[:n/d]S, + where n/d is numerator/denominator of any fractional seconds and + all other units are in ISO 8601 format. See [24] and + [14]. See also method + ESMF_TimeIntervalPrint(). + +
+
[timeStringISOFrac]
+
Convert time interval value to strict ISO 8601 format string + PyYmMdDThHmMs[.f], where f is decimal form of any fractional + seconds. See [24] and [14]. See also method + ESMF_TimeIntervalPrint(). + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+44.4.20 ESMF_TimeIntervalNegAbsValue - Return the negative absolute value of a TimeInterval +

+ +

+ +

+
+INTERFACE: +

       function ESMF_TimeIntervalNegAbsValue(timeinterval)
+
RETURN VALUE: +
       type(ESMF_TimeInterval) :: ESMF_TimeIntervalNegAbsValue
+
ARGUMENTS: +
       type(ESMF_TimeInterval), intent(in) :: timeinterval
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Returns the negative absolute value of timeinterval. + +

+The argument is: +

+
timeinterval
+
The object instance to take the negative absolute value of. + Negative absolute value is returned as the value of the function. + +
+
+ +

+ +

+ +

+44.4.21 ESMF_TimeIntervalPrint - Print TimeInterval information +

+ +

+ +

+
+INTERFACE: +

       subroutine ESMF_TimeIntervalPrint(timeinterval, options, rc)
+
ARGUMENTS: +
       type(ESMF_TimeInterval), intent(in)            :: timeinterval
+       character (len=*),       intent(in),  optional :: options
+       integer,                 intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Prints out the contents of an ESMF_TimeInterval to stdout, + in support of testing and debugging. The options control the type of + information and level of detail. +
+

+The arguments are: +

+
timeinterval
+
Time interval to be printed out. + +
+
[options]
+
Print options. If none specified, prints all timeinterval + property values. +
"string" - prints timeinterval's value in ISO 8601 format + for all units through seconds. For any non-zero + fractional seconds, prints in integer rational + fraction form n/d. Format is PyYmMdDThHmMs[:n/d]S, + where [:n/d] is the integer numerator and denominator + of the fractional seconds value, if present. + See [24] and [14]. See also method + ESMF_TimeIntervalGet(..., timeString= , ...) +
"string isofrac" - prints timeinterval's value in strict + ISO 8601 format for all units, including any fractional + seconds part. Format is PyYmMdDThHmMs[.f]S, where [.f] + represents fractional seconds in decimal form, + if present. See [24] and [14]. + See also method ESMF_TimeIntervalGet(..., timeStringISOFrac= , ...) +
+
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+44.4.22 ESMF_TimeIntervalSet - Initialize or set a TimeInterval +

+ +

+ +

+
+INTERFACE: +

       ! Private name; call using ESMF_TimeIntervalSet()
+       subroutine ESMF_TimeIntervalSetDur(timeinterval, &
+         yy, yy_i8, &
+         mm, mm_i8, &
+         d, d_i8, &
+         h, m, &
+         s, s_i8, &
+         ms, us, ns, &
+         d_r8, h_r8, m_r8, s_r8, &
+         ms_r8, us_r8, ns_r8, &
+         sN, sN_i8, sD, sD_i8, rc)
+
ARGUMENTS: +
       type(ESMF_TimeInterval), intent(inout)         :: timeinterval
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       integer(ESMF_KIND_I4),   intent(in),  optional :: yy
+       integer(ESMF_KIND_I8),   intent(in),  optional :: yy_i8
+       integer(ESMF_KIND_I4),   intent(in),  optional :: mm
+       integer(ESMF_KIND_I8),   intent(in),  optional :: mm_i8
+       integer(ESMF_KIND_I4),   intent(in),  optional :: d
+       integer(ESMF_KIND_I8),   intent(in),  optional :: d_i8
+       integer(ESMF_KIND_I4),   intent(in),  optional :: h
+       integer(ESMF_KIND_I4),   intent(in),  optional :: m
+       integer(ESMF_KIND_I4),   intent(in),  optional :: s
+       integer(ESMF_KIND_I8),   intent(in),  optional :: s_i8
+       integer(ESMF_KIND_I4),   intent(in),  optional :: ms
+       integer(ESMF_KIND_I4),   intent(in),  optional :: us
+       integer(ESMF_KIND_I4),   intent(in),  optional :: ns
+       real(ESMF_KIND_R8),      intent(in),  optional :: d_r8
+       real(ESMF_KIND_R8),      intent(in),  optional :: h_r8
+       real(ESMF_KIND_R8),      intent(in),  optional :: m_r8
+       real(ESMF_KIND_R8),      intent(in),  optional :: s_r8
+       real(ESMF_KIND_R8),      intent(in),  optional :: ms_r8
+       real(ESMF_KIND_R8),      intent(in),  optional :: us_r8
+       real(ESMF_KIND_R8),      intent(in),  optional :: ns_r8
+       integer(ESMF_KIND_I4),   intent(in),  optional :: sN
+       integer(ESMF_KIND_I8),   intent(in),  optional :: sN_i8
+       integer(ESMF_KIND_I4),   intent(in),  optional :: sD
+       integer(ESMF_KIND_I8),   intent(in),  optional :: sD_i8
+       integer,                 intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Sets the value of the ESMF_TimeInterval in units specified by + the user via Fortran optional arguments. + +

+The ESMF Time Manager represents and manipulates time internally with + integers to maintain precision. Hence, user-specified floating point + values are converted internally to integers. + +

+Ranges are limited only by machine word size. Numeric defaults are 0, + except for sD, which is 1. + +

+The arguments are: +

+
timeinterval
+
The object instance to initialize. + +
+
[yy]
+
Integer year (32-bit). Default = 0. + +
+
[yy_i8]
+
Integer year (large, 64-bit). Default = 0. + +
+
[mm]
+
Integer month (32-bit). Default = 0. + +
+
[mm_i8]
+
Integer month (large, 64-bit). Default = 0. + +
+
[d]
+
Integer Julian day, or Modified Julian day (32-bit). Default = 0. + +
+
[d_i8]
+
Integer Julian day, or Modified Julian day (large, 64-bit). + Default = 0. + +
+
[h]
+
Integer hour. Default = 0. + +
+
[m]
+
Integer minute. Default = 0. + +
+
[s]
+
Integer second (32-bit). Default = 0. + +
+
[s_i8]
+
Integer second (large, 64-bit). Default = 0. + +
+
[ms]
+
Integer millisecond. Default = 0. + +
+
[us]
+
Integer microsecond. Default = 0. + +
+
[ns]
+
Integer nanosecond. Default = 0. + +
+
[d_r8]
+
Double precision day. Default = 0.0. + +
+
[h_r8]
+
Double precision hour. Default = 0.0. + +
+
[m_r8]
+
Double precision minute. Default = 0.0. + +
+
[s_r8]
+
Double precision second. Default = 0.0. + +
+
[ms_r8]
+
Double precision millisecond. Default = 0.0. + +
+
[us_r8]
+
Double precision microsecond. Default = 0.0. + +
+
[ns_r8]
+
Double precision nanosecond. Default = 0.0. + +
+
[sN]
+
Integer numerator of fractional second (sN/sD). + Default = 0. + +
+
[sN_i8]
+
Integer numerator of fractional second (sN_i8/sD_i8) + (large, 64-bit). + Default = 0. + +
+
[sD]
+
Integer denominator of fractional second (sN/sD). + Default = 1. + +
+
[sD_i8]
+
Integer denominator of fractional second (sN_i8/sD_i8) + (large, 64-bit). + Default = 1. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+44.4.23 ESMF_TimeIntervalSet - Initialize or set a TimeInterval +

+ +

+ +

+
+INTERFACE: +

       ! Private name; call using ESMF_TimeIntervalSet()
+       subroutine ESMF_TimeIntervalSetDurStart(timeinterval, startTime, &
+         &
+         yy, yy_i8, &
+         mm, mm_i8, &
+         d, d_i8, &
+         h, m, &
+         s, s_i8, &
+         ms, us, ns, &
+         d_r8, h_r8, m_r8, s_r8, &
+         ms_r8, us_r8, ns_r8, &
+         sN, sN_i8, sD, sD_i8, &
+         rc)
+
ARGUMENTS: +
       type(ESMF_TimeInterval), intent(inout)         :: timeinterval
+       type(ESMF_Time),         intent(in)            :: startTime
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       integer(ESMF_KIND_I4),   intent(in),  optional :: yy
+       integer(ESMF_KIND_I8),   intent(in),  optional :: yy_i8
+       integer(ESMF_KIND_I4),   intent(in),  optional :: mm
+       integer(ESMF_KIND_I8),   intent(in),  optional :: mm_i8
+       integer(ESMF_KIND_I4),   intent(in),  optional :: d
+       integer(ESMF_KIND_I8),   intent(in),  optional :: d_i8
+       integer(ESMF_KIND_I4),   intent(in),  optional :: h
+       integer(ESMF_KIND_I4),   intent(in),  optional :: m
+       integer(ESMF_KIND_I4),   intent(in),  optional :: s
+       integer(ESMF_KIND_I8),   intent(in),  optional :: s_i8
+       integer(ESMF_KIND_I4),   intent(in),  optional :: ms
+       integer(ESMF_KIND_I4),   intent(in),  optional :: us
+       integer(ESMF_KIND_I4),   intent(in),  optional :: ns
+       real(ESMF_KIND_R8),      intent(in),  optional :: d_r8
+       real(ESMF_KIND_R8),      intent(in),  optional :: h_r8
+       real(ESMF_KIND_R8),      intent(in),  optional :: m_r8
+       real(ESMF_KIND_R8),      intent(in),  optional :: s_r8
+       real(ESMF_KIND_R8),      intent(in),  optional :: ms_r8
+       real(ESMF_KIND_R8),      intent(in),  optional :: us_r8
+       real(ESMF_KIND_R8),      intent(in),  optional :: ns_r8
+       integer(ESMF_KIND_I4),   intent(in),  optional :: sN
+       integer(ESMF_KIND_I8),   intent(in),  optional :: sN_i8
+       integer(ESMF_KIND_I4),   intent(in),  optional :: sD
+       integer(ESMF_KIND_I8),   intent(in),  optional :: sD_i8
+       integer,                 intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Sets the value of the ESMF_TimeInterval in units specified by + the user via Fortran optional arguments. + +

+The ESMF Time Manager represents and manipulates time internally with + integers to maintain precision. Hence, user-specified floating point + values are converted internally to integers. + +

+Ranges are limited only by machine word size. Numeric defaults are 0, + except for sD, which is 1. + +

+The arguments are: +

+
timeinterval
+
The object instance to initialize. + +
+
startTime
+
Starting time of an absolute calendar interval + (yy, mm, and/or d); pins a calendar interval to a specific point + in time. If not set, and calendar also not set, calendar interval + "floats" across all calendars and times. + +
+
[yy]
+
Integer year (32-bit). Default = 0. + +
+
[yy_i8]
+
Integer year (large, 64-bit). Default = 0. + +
+
[mm]
+
Integer month (32-bit). Default = 0. + +
+
[mm_i8]
+
Integer month (large, 64-bit). Default = 0. + +
+
[d]
+
Integer Julian day, or Modified Julian day (32-bit). Default = 0. + +
+
[d_i8]
+
Integer Julian day, or Modified Julian day (large, 64-bit). + Default = 0. + +
+
[h]
+
Integer hour. Default = 0. + +
+
[m]
+
Integer minute. Default = 0. + +
+
[s]
+
Integer second (32-bit). Default = 0. + +
+
[s_i8]
+
Integer second (large, 64-bit). Default = 0. + +
+
[ms]
+
Integer millisecond. Default = 0. + +
+
[us]
+
Integer microsecond. Default = 0. + +
+
[ns]
+
Integer nanosecond. Default = 0. + +
+
[d_r8]
+
Double precision day. Default = 0.0. + +
+
[h_r8]
+
Double precision hour. Default = 0.0. + +
+
[m_r8]
+
Double precision minute. Default = 0.0. + +
+
[s_r8]
+
Double precision second. Default = 0.0. + +
+
[ms_r8]
+
Double precision millisecond. Default = 0.0. + +
+
[us_r8]
+
Double precision microsecond. Default = 0.0. + +
+
[ns_r8]
+
Double precision nanosecond. Default = 0.0. + +
+
[sN]
+
Integer numerator of fractional second (sN/sD). + Default = 0. + +
+
[sN_i8]
+
Integer numerator of fractional second (sN_i8/sD_i8) + (large, 64-bit). + Default = 0. + +
+
[sD]
+
Integer denominator of fractional second (sN/sD). + Default = 1. + +
+
[sD_i8]
+
Integer denominator of fractional second (sN_i8/sD_i8). + (large, 64-bit). + Default = 1. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+44.4.24 ESMF_TimeIntervalSet - Initialize or set a TimeInterval +

+ +

+ +

+
+INTERFACE: +

       ! Private name; call using ESMF_TimeIntervalSet()
+       subroutine ESMF_TimeIntervalSetDurCal(timeinterval, calendar, &
+         &
+         yy, yy_i8, &
+         mm, mm_i8, &
+         d, d_i8, &
+         h, m, &
+         s, s_i8, &
+         ms, us, ns, &
+         d_r8, h_r8, m_r8, s_r8, &
+         ms_r8, us_r8, ns_r8, &
+         sN, sN_i8, sD, sD_i8, rc)
+
ARGUMENTS: +
       type(ESMF_TimeInterval), intent(inout)         :: timeinterval
+       type(ESMF_Calendar),     intent(in)            :: calendar
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       integer(ESMF_KIND_I4),   intent(in),  optional :: yy
+       integer(ESMF_KIND_I8),   intent(in),  optional :: yy_i8
+       integer(ESMF_KIND_I4),   intent(in),  optional :: mm
+       integer(ESMF_KIND_I8),   intent(in),  optional :: mm_i8
+       integer(ESMF_KIND_I4),   intent(in),  optional :: d
+       integer(ESMF_KIND_I8),   intent(in),  optional :: d_i8
+       integer(ESMF_KIND_I4),   intent(in),  optional :: h
+       integer(ESMF_KIND_I4),   intent(in),  optional :: m
+       integer(ESMF_KIND_I4),   intent(in),  optional :: s
+       integer(ESMF_KIND_I8),   intent(in),  optional :: s_i8
+       integer(ESMF_KIND_I4),   intent(in),  optional :: ms
+       integer(ESMF_KIND_I4),   intent(in),  optional :: us
+       integer(ESMF_KIND_I4),   intent(in),  optional :: ns
+       real(ESMF_KIND_R8),      intent(in),  optional :: d_r8
+       real(ESMF_KIND_R8),      intent(in),  optional :: h_r8
+       real(ESMF_KIND_R8),      intent(in),  optional :: m_r8
+       real(ESMF_KIND_R8),      intent(in),  optional :: s_r8
+       real(ESMF_KIND_R8),      intent(in),  optional :: ms_r8
+       real(ESMF_KIND_R8),      intent(in),  optional :: us_r8
+       real(ESMF_KIND_R8),      intent(in),  optional :: ns_r8
+       integer(ESMF_KIND_I4),   intent(in),  optional :: sN
+       integer(ESMF_KIND_I8),   intent(in),  optional :: sN_i8
+       integer(ESMF_KIND_I4),   intent(in),  optional :: sD
+       integer(ESMF_KIND_I8),   intent(in),  optional :: sD_i8
+       integer,                 intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Sets the value of the ESMF_TimeInterval in units specified by + the user via Fortran optional arguments. + +

+The ESMF Time Manager represents and manipulates time internally with + integers to maintain precision. Hence, user-specified floating point + values are converted internally to integers. + +

+Ranges are limited only by machine word size. Numeric defaults are 0, + except for sD, which is 1. + +

+The arguments are: +

+
timeinterval
+
The object instance to initialize. + +
+
calendar
+
Calendar used to give better definition to + calendar interval (yy, mm, and/or d) for arithmetic, comparison, + and conversion operations. Allows calendar interval to "float" + across all times on a specific calendar. Default = NULL; + if startTime also not specified, calendar interval "floats" across + all calendars and times. Mutually exclusive with startTime since + it contains a calendar. Alternate to, and mutually exclusive with, + calkindflag below. Primarily for specifying a custom calendar kind. + +
+
[yy]
+
Integer year (32-bit). Default = 0. + +
+
[yy_i8]
+
Integer year (large, 64-bit). Default = 0. + +
+
[mm]
+
Integer month (32-bit). Default = 0. + +
+
[mm_i8]
+
Integer month (large, 64-bit). Default = 0. + +
+
[d]
+
Integer Julian day, or Modified Julian day (32-bit). Default = 0. + +
+
[d_i8]
+
Integer Julian day, or Modified Julian day (large, 64-bit). + Default = 0. + +
+
[h]
+
Integer hour. Default = 0. + +
+
[m]
+
Integer minute. Default = 0. + +
+
[s]
+
Integer second (32-bit). Default = 0. + +
+
[s_i8]
+
Integer second (large, 64-bit). Default = 0. + +
+
[ms]
+
Integer millisecond. Default = 0. + +
+
[us]
+
Integer microsecond. Default = 0. + +
+
[ns]
+
Integer nanosecond. Default = 0. + +
+
[d_r8]
+
Double precision day. Default = 0.0. + +
+
[h_r8]
+
Double precision hour. Default = 0.0. + +
+
[m_r8]
+
Double precision minute. Default = 0.0. + +
+
[s_r8]
+
Double precision second. Default = 0.0. + +
+
[ms_r8]
+
Double precision millisecond. Default = 0.0. + +
+
[us_r8]
+
Double precision microsecond. Default = 0.0. + +
+
[ns_r8]
+
Double precision nanosecond. Default = 0.0. + +
+
[sN]
+
Integer numerator of fractional second (sN/sD). + Default = 0. + +
+
[sN_i8]
+
Integer numerator of fractional second (sN_i8/sD_i8). + (large, 64-bit). + Default = 0. + +
+
[sD]
+
Integer denominator of fractional second (sN/sD). + Default = 1. + +
+
[sD_i8]
+
Integer denominator of fractional second (sN_i8/sD_i8). + (large, 64-bit). + Default = 1. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+44.4.25 ESMF_TimeIntervalSet - Initialize or set a TimeInterval +

+ +

+ +

+
+INTERFACE: +

       ! Private name; call using ESMF_TimeIntervalSet()
+       subroutine ESMF_TimeIntervalSetDurCalTyp(timeinterval, calkindflag, &
+         &
+         yy, yy_i8, &
+         mm, mm_i8, &
+         d, d_i8, &
+         h, m, &
+         s, s_i8, &
+         ms, us, ns, &
+         d_r8, h_r8, m_r8, s_r8, &
+         ms_r8, us_r8, ns_r8, &
+         sN, sN_i8, sD, sD_i8, &
+         rc)
+
ARGUMENTS: +
       type(ESMF_TimeInterval), intent(inout)         :: timeinterval
+       type(ESMF_CalKind_Flag), intent(in)            :: calkindflag
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       integer(ESMF_KIND_I4),   intent(in),  optional :: yy
+       integer(ESMF_KIND_I8),   intent(in),  optional :: yy_i8
+       integer(ESMF_KIND_I4),   intent(in),  optional :: mm
+       integer(ESMF_KIND_I8),   intent(in),  optional :: mm_i8
+       integer(ESMF_KIND_I4),   intent(in),  optional :: d
+       integer(ESMF_KIND_I8),   intent(in),  optional :: d_i8
+       integer(ESMF_KIND_I4),   intent(in),  optional :: h
+       integer(ESMF_KIND_I4),   intent(in),  optional :: m
+       integer(ESMF_KIND_I4),   intent(in),  optional :: s
+       integer(ESMF_KIND_I8),   intent(in),  optional :: s_i8
+       integer(ESMF_KIND_I4),   intent(in),  optional :: ms
+       integer(ESMF_KIND_I4),   intent(in),  optional :: us
+       integer(ESMF_KIND_I4),   intent(in),  optional :: ns
+       real(ESMF_KIND_R8),      intent(in),  optional :: d_r8
+       real(ESMF_KIND_R8),      intent(in),  optional :: h_r8
+       real(ESMF_KIND_R8),      intent(in),  optional :: m_r8
+       real(ESMF_KIND_R8),      intent(in),  optional :: s_r8
+       real(ESMF_KIND_R8),      intent(in),  optional :: ms_r8
+       real(ESMF_KIND_R8),      intent(in),  optional :: us_r8
+       real(ESMF_KIND_R8),      intent(in),  optional :: ns_r8
+       integer(ESMF_KIND_I4),   intent(in),  optional :: sN
+       integer(ESMF_KIND_I8),   intent(in),  optional :: sN_i8
+       integer(ESMF_KIND_I4),   intent(in),  optional :: sD
+       integer(ESMF_KIND_I8),   intent(in),  optional :: sD_i8
+       integer,                 intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Sets the value of the ESMF_TimeInterval in units specified by + the user via Fortran optional arguments. + +

+The ESMF Time Manager represents and manipulates time internally with + integers to maintain precision. Hence, user-specified floating point + values are converted internally to integers. + +

+Ranges are limited only by machine word size. Numeric defaults are 0, + except for sD, which is 1. + +

+The arguments are: +

+
timeinterval
+
The object instance to initialize. + +
+
calkindflag
+
Alternate to, and mutually exclusive with, + calendar above. More convenient way of specifying a built-in + calendar kind. + +
+
[yy]
+
Integer year (32-bit). Default = 0. + +
+
[yy_i8]
+
Integer year (large, 64-bit). Default = 0. + +
+
[mm]
+
Integer month (32-bit). Default = 0. + +
+
[mm_i8]
+
Integer month (large, 64-bit). Default = 0. + +
+
[d]
+
Integer Julian day, or Modified Julian day (32-bit). Default = 0. + +
+
[d_i8]
+
Integer Julian day, or Modified Julian day (large, 64-bit). + Default = 0. + +
+
[h]
+
Integer hour. Default = 0. + +
+
[m]
+
Integer minute. Default = 0. + +
+
[s]
+
Integer second (32-bit). Default = 0. + +
+
[s_i8]
+
Integer second (large, 64-bit). Default = 0. + +
+
[ms]
+
Integer millisecond. Default = 0. + +
+
[us]
+
Integer microsecond. Default = 0. + +
+
[ns]
+
Integer nanosecond. Default = 0. + +
+
[d_r8]
+
Double precision day. Default = 0.0. + +
+
[h_r8]
+
Double precision hour. Default = 0.0. + +
+
[m_r8]
+
Double precision minute. Default = 0.0. + +
+
[s_r8]
+
Double precision second. Default = 0.0. + +
+
[ms_r8]
+
Double precision millisecond. Default = 0.0. + +
+
[us_r8]
+
Double precision microsecond. Default = 0.0. + +
+
[ns_r8]
+
Double precision nanoseconds. Default = 0.0. + +
+
[sN]
+
Integer numerator of fractional second (sN/sD). + Default = 0. + +
+
[sN_i8]
+
Integer numerator of fractional second (sN_i8/sD_i8) + (large, 64-bit). + Default = 0. + +
+
[sD]
+
Integer denominator of fractional second (sN/sD). + Default = 1. + +
+
[sD_i8]
+
Integer denominator of fractional second (sN_i8/sD_i8) + (large, 64-bit). + Default = 1. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+44.4.26 ESMF_TimeIntervalSet - Initialize or set a TimeInterval from an ISO 8601 format string +

+ +

+ +

+ +

+
+INTERFACE: +

   Private name; call using ESMF_TimeIntervalSet()
+ 
+       subroutine ESMF_TimeIntervalSetStr(timeinterval, timeIntervalString, rc)
+
ARGUMENTS: +
       type(ESMF_TimeInterval), intent(inout)         :: timeinterval
+       character(*),            intent(in)            :: timeIntervalString  
+       integer,                 intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Sets the value of an ESMF_TimeInterval using a + string in ISO 8601 duration format P[y]Y[mm]M[d]DT[h]H[m]M[s]S. See [24] and [14] for information about the format. In ESMF's implementation the time values can have the following types: +

+
y
+
- the number of years expressed in up to a 64-bit integer + +
+
mm
+
- the number of months expressed in up to a 64-bit integer + +
+
d
+
- the number of days expressed in up to a 64-bit integer or a 64-bit floating point value (double) + +
+
h
+
- the number of hours expressed in up to a 32-bit integer or a 64-bit floating point value (double) + +
+
m
+
- the number of minutes expressed in up to a 32-bit integer or a 64-bit floating point value (double) + +
+
s
+
- the number of seconds expressed in up to a 64-bit integer or a 64-bit floating point value (double) + +
+
+ +

+As with the ISO format, in ESMF's implementation the specifier and value can be left out if the value is 0. For example, P1YT1H3M4S is a valid format if the number of months and + days are both 0. The time part including the T can also be left off if the time values are all 0, so P1Y is a valid string if just 1 year is being specified. + +

+The arguments are: +

+
timeinterval
+
The object instance to initialize. + +
+
timeIntervalString
+
ISO 8601 format duration string (e.g. P[y]Y[mm]M[d]DT[h]H[m]M[s]S). + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+44.4.27 ESMF_TimeIntervalSet - Initialize or set a TimeInterval from an ISO 8601 format string and calendar +

+ +

+ +

+
+INTERFACE: +

       ! Private name; call using ESMF_TimeIntervalSet()
+       subroutine ESMF_TimeIntervalSetStrCal(timeinterval, calendar, &
+            timeIntervalString, rc)
+
ARGUMENTS: +
       type(ESMF_TimeInterval), intent(inout)         :: timeinterval
+       type(ESMF_Calendar),     intent(in)            :: calendar
+       character(*),            intent(in)            :: timeIntervalString  
+       integer,                 intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Sets the value of an ESMF_TimeInterval using a + string in ISO 8601 duration format P[y]Y[mm]M[d]DT[h]H[m]M[s]S. See [24] and [14] for + information about the format. Also, see the description for the method + ESMF_TimeIntervalSetStr() 44.4.26 + for the specific types supported by ESMF for the values in the duration string. + +

+The arguments are: +

+
timeinterval
+
The object instance to initialize. + +
+
calendar
+
Calendar used to give better definition to + calendar interval (yy, mm, and/or d) for arithmetic, comparison, + and conversion operations. Allows calendar interval to "float" + across all times on a specific calendar. Default = NULL; + if startTime also not specified, calendar interval "floats" across + all calendars and times. Mutually exclusive with startTime since + it contains a calendar. Alternate to, and mutually exclusive with, + calkindflag below. Primarily for specifying a custom calendar kind. + +
+
timeIntervalString
+
ISO 8601 format duration string (e.g. P[y]Y[mm]M[d]DT[h]H[m]M[s]S). + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+44.4.28 ESMF_TimeIntervalSet - Initialize or set a TimeInterval from an ISO 8601 format string and calendar kind +

+ +

+ +

+
+INTERFACE: +

       ! Private name; call using ESMF_TimeIntervalSet()
+       subroutine ESMF_TimeIntervalSetStrCalTyp(timeinterval, calkindflag, &
+            timeIntervalString, rc)
+
ARGUMENTS: +
       type(ESMF_TimeInterval), intent(inout)         :: timeinterval
+       type(ESMF_CalKind_Flag), intent(in)            :: calkindflag
+       character(*),            intent(in)            :: timeIntervalString  
+       integer,                 intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Sets the value of an ESMF_TimeInterval using a + string in ISO 8601 duration format P[y]Y[mm]M[d]DT[h]H[m]M[s]S. See [24] and [14] for + information about the format. Also, see the description for the method + ESMF_TimeIntervalSetStr() 44.4.26 + for the specific types supported by ESMF for the values in the duration string. + +

+The arguments are: +

+
timeinterval
+
The object instance to initialize. + +
+
calkindflag
+
Alternate to, and mutually exclusive with, + calendar above. More convenient way of specifying a built-in + calendar kind. + +
+
timeIntervalString
+
ISO 8601 format duration string (e.g. P[y]Y[mm]M[d]DT[h]H[m]M[s]S). + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+44.4.29 ESMF_TimeIntervalSet - Initialize or set a TimeInterval from an ISO 8601 format string and start time +

+ +

+ +

+
+INTERFACE: +

       ! Private name; call using ESMF_TimeIntervalSet()
+       subroutine ESMF_TimeIntervalSetStrStart(timeinterval, startTime, &
+            timeIntervalString, rc)
+
ARGUMENTS: +
       type(ESMF_TimeInterval), intent(inout)         :: timeinterval
+       type(ESMF_Time),         intent(in)            :: startTime
+       character(*),            intent(in)            :: timeIntervalString  
+       integer,                 intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Sets the value of an ESMF_TimeInterval using a + string in ISO 8601 duration format P[y]Y[mm]M[d]DT[h]H[m]M[s]S. See [24] and [14] for + information about the format. Also, see the description for the method + ESMF_TimeIntervalSetStr() 44.4.26 + for the specific types supported by ESMF for the values in the duration string. + +

+The arguments are: +

+
timeinterval
+
The object instance to initialize. + +
+
startTime
+
Starting time of an absolute calendar interval + (yy, mm, and/or d); pins a calendar interval to a specific point + in time. If not set, and calendar also not set, calendar interval + "floats" across all calendars and times. + +
+
timeIntervalString
+
ISO 8601 format duration string (e.g. P[y]Y[mm]M[d]DT[h]H[m]M[s]S). + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+44.4.30 ESMF_TimeIntervalValidate - Validate a TimeInterval +

+ +

+ +

+
+INTERFACE: +

       subroutine ESMF_TimeIntervalValidate(timeinterval, rc)
+
ARGUMENTS: +
       type(ESMF_TimeInterval), intent(in)            :: timeinterval
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       integer,                 intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Checks whether a timeinterval is valid. + If fractional value, denominator must be non-zero. + +

+The arguments are: +

+
timeinterval
+
ESMF_TimeInterval to be validated. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ + +

+45 Clock Class +

+ +

+45.1 Description +

+ +

+ +

+The Clock class advances model time and tracks its associated +date on a specified Calendar. It stores start time, stop time, +current time, previous time, and a time step. It can also store +a reference time, typically the time instant at which a simulation +originally began. For a restart run, the reference time can be +different than the start time, when the application execution resumes. + +

+A user can call the ESMF_ClockSet method and reset the time +step as desired. + +

+A Clock also stores a list of Alarms, which can be set to flag +events that occur at a specified time instant or at +a specified time interval. See Section 46.1 for +details on how to use Alarms. + +

+There are methods for setting and getting the Times and +Alarms associated with a Clock. Methods are defined for +advancing the Clock's current time, checking if the +stop time has been reached, reversing direction, and +synchronizing with a real clock. + +

+45.2 Constants +

+ +

+ +

+ +
+45.2.1 ESMF_DIRECTION +

+ +

+DESCRIPTION: +
+ +Specifies the time-stepping direction of a clock. Use with "direction" +argument to methods ESMF_ClockSet() and ESMF_ClockGet(). +Cannot be used with method ESMF_ClockCreate(), since it only +initializes a clock in the default forward mode; a clock must be advanced +(timestepped) at least once before reversing direction via +ESMF_ClockSet(). This also holds true for negative timestep clocks +which are initialized (created) with stopTime < startTime, since "forward" +means timestepping from startTime towards stopTime +(see ESMF_DIRECTION_FORWARD below). + +

+"Forward" and "reverse" directions are distinct from positive and negative +timesteps. "Forward" means timestepping in the direction established at +ESMF_ClockCreate(), from startTime towards stopTime, regardless +of the timestep sign. "Reverse" means timestepping in the opposite direction, +back towards the clock's startTime, regardless of the timestep sign. + +

+Clocks and alarms run in reverse in such a way that the state of a clock and +its alarms after each time step is precisely replicated as it was in forward +time-stepping mode. All methods which query clock and alarm state will +return the same result for a given timeStep, regardless of the direction of +arrival. + +

+The type of this flag is: + +

+type(ESMF_Direction_Flag) + +

+The valid values are: +

+
ESMF_DIRECTION_FORWARD
+
Upon calling ESMF_ClockAdvance(), the clock will timestep from +its startTime toward its stopTime. This is the default direction. A user +can use either ESMF_ClockIsStopTime() or ESMF_ClockIsDone() +methods to determine when stopTime is reached. This forward behavior also +holds for negative timestep clocks which are initialized (created) with +stopTime < startTime. + +

+

+
ESMF_DIRECTION_REVERSE
+
Upon calling ESMF_ClockAdvance(), the clock will timestep backwards +toward its startTime. Use method ESMF_ClockIsDone() to determine when +startTime is reached. This reverse behavior also holds for negative timestep +clocks which are initialized (created) with stopTime < startTime. + +

+

+
+ +

+45.3 Use and Examples +

+ +

+The following is a typical sequence for using a Clock in a +geophysical model. + +

+At initialize: + +

    +
  • Set a Calendar. +
  • +
  • Set start time, stop time and time step as Times and +Time Intervals. +
  • +
  • Create and Initialize a Clock using the start time, stop time and time +step. +
  • +
  • Define Times and Time Intervals associated with special +events, and use these to set Alarms. +
  • +
+ +

+At run: + +

    +
  • Advance the Clock, checking for ringing alarms as needed. +
  • +
  • Check if it is time to stop. +
  • +
+ +

+At finalize: + +

    +
  • Since Clocks and Alarms are deep classes, they need to be explicitly +destroyed at finalization. Times and TimeIntervals are lightweight classes, +so they don't need explicit destruction. +
  • +
+ +

+The following code example illustrates Clock usage. + +

+ +

+ +

+

+! !PROGRAM: ESMF_ClockEx - Clock initialization and time-stepping
+!
+! !DESCRIPTION:
+!
+! This program shows an example of how to create, initialize, advance, and
+! examine a basic clock
+!-----------------------------------------------------------------------------
+#include "ESMF.h"
+
+      ! ESMF Framework module
+      use ESMF
+      use ESMF_TestMod
+      implicit none
+
+      ! instantiate a clock 
+      type(ESMF_Clock) :: clock
+
+      ! instantiate time_step, start and stop times
+      type(ESMF_TimeInterval) :: timeStep
+      type(ESMF_Time) :: startTime
+      type(ESMF_Time) :: stopTime
+
+      ! local variables for Get methods
+      type(ESMF_Time) :: currTime
+      integer(ESMF_KIND_I8) :: advanceCount
+      integer :: YY, MM, DD, H, M, S
+
+      ! return code
+      integer :: rc
+
+ +

+

+      ! initialize ESMF framework
+      call ESMF_Initialize(defaultCalKind=ESMF_CALKIND_GREGORIAN, &
+        defaultlogfilename="ClockEx.Log", &
+                    logkindflag=ESMF_LOGKIND_MULTI, rc=rc)
+
+ +

+ +

+45.3.1 Clock creation +

+ +

+This example shows how to create and initialize an ESMF_Clock. +

+

+      ! initialize time interval to 2 days, 4 hours (6 timesteps in 13 days)
+      call ESMF_TimeIntervalSet(timeStep, d=2, h=4, rc=rc)
+
+ +

+

+      ! initialize start time to 4/1/2003 2:24:00 ( 1/10 of a day )
+      call ESMF_TimeSet(startTime, yy=2003, mm=4, dd=1, h=2, m=24, rc=rc)
+
+ +

+

+      ! initialize stop time to 4/14/2003 2:24:00 ( 1/10 of a day )
+      call ESMF_TimeSet(stopTime, yy=2003, mm=4, dd=14, h=2, m=24, rc=rc)
+
+ +

+

+      ! initialize the clock with the above values
+      clock = ESMF_ClockCreate(timeStep, startTime, stopTime=stopTime, &
+                               name="Clock 1", rc=rc)
+
+ +

+ +

+45.3.2 Clock advance +

+ +

+This example shows how to time-step an ESMF_Clock. +

+

+      ! time step clock from start time to stop time
+      do while (.not.ESMF_ClockIsStopTime(clock, rc=rc))
+
+ +

+

+        call ESMF_ClockPrint(clock, options="currTime string", rc=rc)
+
+ +

+

+        call ESMF_ClockAdvance(clock, rc=rc)
+
+ +

+

+      end do
+
+ +

+ +

+45.3.3 Clock examination +

+ +

+This example shows how to examine an ESMF_Clock. +

+

+      ! get the clock's final current time
+      call ESMF_ClockGet(clock, currTime=currTime, rc=rc)
+
+ +

+

+      call ESMF_TimeGet(currTime, yy=YY, mm=MM, dd=DD, h=H, m=M, s=S, rc=rc) 
+      print *, "The clock's final current time is ", YY, "/", MM, "/", DD, &
+               " ", H, ":", M, ":", S
+
+ +

+

+      ! get the number of times the clock was advanced
+      call ESMF_ClockGet(clock, advanceCount=advanceCount, rc=rc)
+      print *, "The clock was advanced ", advanceCount, " times."
+
+ +

+ +

+45.3.4 Clock reversal +

+ +

+This example shows how to time-step an ESMF_Clock in reverse mode. +

+

+      call ESMF_ClockSet(clock, direction=ESMF_DIRECTION_REVERSE, rc=rc)
+
+ +

+

+      ! time step clock in reverse from stop time back to start time;
+      !  note use of ESMF_ClockIsDone() rather than ESMF_ClockIsStopTime()
+      do while (.not.ESMF_ClockIsDone(clock, rc=rc))
+
+ +

+

+        call ESMF_ClockPrint(clock, options="currTime string", rc=rc)
+
+ +

+

+        call ESMF_ClockAdvance(clock, rc=rc)
+
+ +

+

+      end do
+
+ +

+ +

+45.3.5 Clock destruction +

+ +

+This example shows how to destroy an ESMF_Clock. +

+

+      ! destroy clock
+      call ESMF_ClockDestroy(clock, rc=rc)
+
+ +

+

+      ! finalize ESMF framework
+      call ESMF_Finalize(rc=rc)
+
+ +

+

+      end program ESMF_ClockEx
+
+ +

+ + +

+45.4 Restrictions and Future Work +

+ +

+ +

    +
  1. Alarm list allocation factor The alarm list within a clock is +dynamically allocated automatically, 200 alarm references at a time. +This constant is defined in both Fortran and C++ with a #define for ease +of modification. + +

    +

  2. +
  3. Clock variable timesteps in reverse + +In order for a clock with +variable timesteps to be run in ESMF_DIRECTION_REVERSE, the user must +supply those timesteps to ESMF_ClockAdvance(). Essentially, the user +must save the timesteps while in forward mode. In a future release, the +Time Manager will assume this responsibility by saving the clock state +(including the timeStep) at every timestep while in forward mode. + +

    +

  4. +
+ +

+45.5 Class API +

+ +

+ +

+ +

+ +

+45.5.1 ESMF_ClockAssignment(=) - Assign a Clock to another Clock +

+ +

+ +

+
+INTERFACE: +

       interface assignment(=)
+       clock1 = clock2
+
ARGUMENTS: +
       type(ESMF_Clock) :: clock1
+       type(ESMF_Clock) :: clock2
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Assign clock1 as an alias to the same ESMF_Clock object in + memory as clock2. If clock2 is invalid, then clock1 + will be equally invalid after the assignment. + +

+The arguments are: +

+
clock1
+
The ESMF_Clock object on the left hand side of the + assignment. + +
+
clock2
+
The ESMF_Clock object on the right hand side of the + assignment. + +
+
+ +

+ +

+ +

+45.5.2 ESMF_ClockOperator(==) - Test if Clock 1 is equal to Clock 2 +

+ +

+ +

+
+INTERFACE: +

       interface operator(==)
+       if (clock1 == clock2) then ... endif
+                    OR
+       result = (clock1 == clock2)
+
RETURN VALUE: +
       logical :: result
+
ARGUMENTS: +
       type(ESMF_Clock), intent(in) :: clock1
+       type(ESMF_Clock), intent(in) :: clock2
+
+DESCRIPTION: +
+ +

+Overloads the (==) operator for the ESMF_Clock class. + Compare two clocks for equality; return .true. if equal, + .false. otherwise. Comparison is based on IDs, which are distinct + for newly created clocks and identical for clocks created as copies. + +

+If either side of the equality test is not in the + ESMF_INIT_CREATED status an error will be logged. However, this + does not affect the return value, which is .true. when both + sides are in the same status, and .false. otherwise. + +

+The arguments are: +

+
clock1
+
The ESMF_Clock object on the left hand side of the equality + operation. + +
+
clock2
+
The ESMF_Clock object on the right hand side of the equality + operation. + +
+
+ +

+ +

+ +

+45.5.3 ESMF_ClockOperator(/=) - Test if Clock 1 is not equal to Clock 2 +

+ +

+ +

+
+INTERFACE: +

       interface operator(/=)
+       if (clock1 /= clock2) then ... endif
+                    OR
+       result = (clock1 /= clock2)
+
RETURN VALUE: +
       logical :: result
+
ARGUMENTS: +
       type(ESMF_Clock), intent(in) :: clock1
+       type(ESMF_Clock), intent(in) :: clock2
+
+DESCRIPTION: +
+ +

+Overloads the (/=) operator for the ESMF_Clock class. + Compare two clocks for inequality; return .true. if not equal, + .false. otherwise. Comparison is based on IDs, which are distinct + for newly created clocks and identical for clocks created as copies. + +

+If either side of the equality test is not in the + ESMF_INIT_CREATED status an error will be logged. However, this + does not affect the return value, which is .true. when both sides + are not in the same status, and .false. otherwise. + +

+The arguments are: +

+
clock1
+
The ESMF_Clock object on the left hand side of the + non-equality operation. + +
+
clock2
+
The ESMF_Clock object on the right hand side of the + non-equality operation. + +
+
+ +

+ +

+ +

+45.5.4 ESMF_ClockAdvance - Advance a Clock's current time by one time step +

+ +

+ +

+
+INTERFACE: +

       subroutine ESMF_ClockAdvance(clock, &
+         timeStep, ringingAlarmList, ringingAlarmCount, rc)
+
ARGUMENTS: +
       type(ESMF_Clock),        intent(inout)         :: clock
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       type(ESMF_TimeInterval), intent(in),  optional :: timeStep
+       type(ESMF_Alarm),        intent(out), optional :: ringingAlarmList(:)
+       integer,                 intent(out), optional :: ringingAlarmCount
+       integer,                 intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Advances the clock's current time by one time step: either the + clock's, or the passed-in timeStep (see below). When the + clock is in ESMF_DIRECTION_FORWARD (default), this method + adds the timeStep to the clock's current time. + In ESMF_DIRECTION_REVERSE, timeStep is subtracted from the + current time. In either case, timeStep can be positive or negative. + See the "direction" argument in method ESMF_ClockSet(). + ESMF_ClockAdvance() optionally returns a list and number of ringing + ESMF_Alarms. See also method ESMF_ClockGetRingingAlarms(). + +

+The arguments are: +

+
clock
+
The object instance to advance. + +
+
[timeStep]
+
Time step is performed with given timeStep, instead of + the ESMF_Clock's. Does not replace the ESMF_Clock's + timeStep; use ESMF_ClockSet(clock, timeStep, ...) for + this purpose. Supports applications with variable time steps. + timeStep can be positive or negative. + +
+
[ringingAlarmList]
+
Returns the array of alarms that are ringing after the + time step. + +
+
[ringingAlarmCount]
+
The number of alarms ringing after the time step. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+45.5.5 ESMF_ClockCreate - Create a new ESMF Clock +

+ +

+ +

+
+INTERFACE: +

       ! Private name; call using ESMF_ClockCreate()
+       function ESMF_ClockCreateNew(timeStep, startTime, &
+         stopTime, runDuration, runTimeStepCount, refTime, repeatDuration, name, rc)
+
RETURN VALUE: +
       type(ESMF_Clock) :: ESMF_ClockCreateNew
+
ARGUMENTS: +
       type(ESMF_TimeInterval), intent(in)            :: timeStep
+       type(ESMF_Time),         intent(in)            :: startTime
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       type(ESMF_Time),         intent(in),  optional :: stopTime
+       type(ESMF_TimeInterval), intent(in),  optional :: runDuration
+       integer,                 intent(in),  optional :: runTimeStepCount
+       type(ESMF_Time),         intent(in),  optional :: refTime
+       type(ESMF_TimeInterval), intent(in),  optional :: repeatDuration
+       character (len=*),       intent(in),  optional :: name
+       integer,                 intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    8.7.0
    +
    Added argument repeatDuration. + The new argument allows the user to specify that they want the + clock to be a repeat clock and repeatedly go through the same + interval of time. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Creates and sets the initial values in a new ESMF_Clock. + +

+The arguments are: +

+
timeStep
+
The ESMF_Clock's time step interval, which can be + positive or negative. + +
+
startTime
+
The ESMF_Clock's starting time. Can be less than or + or greater than stopTime, depending on a positive or negative + timeStep, respectively, and whether a stopTime is specified; + see below. + +
+
[stopTime]
+
The ESMF_Clock's stopping time. Can be greater than or + less than the startTime, depending on a positive or negative + timeStep, respectively. If neither stopTime, runDuration, nor + runTimeStepCount is specified, clock runs "forever"; user must + use other means to know when to stop (e.g. ESMF_Alarm or + ESMF_ClockGet(clock, currTime)). Mutually exclusive with + runDuration and runTimeStepCount. + +
+
[runDuration]
+
Alternative way to specify ESMF_Clock's stopping time; + stopTime = startTime + runDuration. + Can be positive or negative, consistent with the timeStep's sign. + Mutually exclusive with stopTime and runTimeStepCount. + +
+
[runTimeStepCount]
+
Alternative way to specify ESMF_Clock's stopping time; + stopTime = startTime + (runTimeStepCount * timeStep). + stopTime can be before startTime if timeStep is negative. + Mutually exclusive with stopTime and runDuration. + +
+
[refTime]
+
The ESMF_Clock's reference time. Provides reference point + for simulation time (see currSimTime in ESMF_ClockGet() below). + +
+
[repeatDuration]
+
If specified and not 0, then makes ESMF_Clock a repeating clock that stays within + the range of startTime to startTime+repeatDuration. For example, when advancing + if the current time goes past startTime+repeatDuration, then it resets + back to startTime to continue. Currently, the repeat functionality is not supported with clocks + that run backwards (e.g. that have a negative timeStep). + +
+
[name]
+
The name for the newly created clock. If not specified, a + default unique name will be generated: "ClockNNN" where NNN + is a unique sequence number from 001 to 999. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+45.5.6 ESMF_ClockCreate - Create a copy of an existing ESMF Clock +

+ +

+ +

+
+INTERFACE: +

       ! Private name; call using ESMF_ClockCreate()
+       function ESMF_ClockCreateCopy(clock, rc)
+
RETURN VALUE: +
       type(ESMF_Clock) :: ESMF_ClockCreateCopy
+
ARGUMENTS: +
       type(ESMF_Clock), intent(in)            :: clock
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       integer,          intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Creates a deep copy of a given ESMF_Clock, but does not copy its + list of ESMF_Alarms (pointers), since an ESMF_Alarm can only + be associated with one ESMF_Clock. Hence, the returned + ESMF_Clock copy has no associated ESMF_Alarms, the same as + with a newly created ESMF_Clock. If desired, new + ESMF_Alarms must be created and associated with this copied + ESMF_Clock via ESMF_AlarmCreate(), or existing + ESMF_Alarms must be re-associated with this copied + ESMF_Clock via ESMF_AlarmSet(...clock=...). + +

+The arguments are: +

+
clock
+
The ESMF_Clock to copy. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+45.5.7 ESMF_ClockDestroy - Release resources associated with a Clock +

+ +

+ +

+
+INTERFACE: +

       subroutine ESMF_ClockDestroy(clock, rc)
+
ARGUMENTS: +
       type(ESMF_Clock), intent(inout)          :: clock
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       integer,          intent(out),  optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Releases resources associated with this ESMF_Clock. This releases + the list of associated ESMF_Alarms (pointers), but not the + ESMF_Alarms themselves; the user must explicitly call + ESMF_AlarmDestroy() on each ESMF_Alarm to release its + resources. ESMF_ClockDestroy() and corresponding + ESMF_AlarmDestroy()s can be called in either order. + +

+If ESMF_ClockDestroy() is called before ESMF_AlarmDestroy(), + any ESMF_Alarms that were in the ESMF_Clock's list will + no longer be associated with any ESMF_Clock. If desired, + these "orphaned" ESMF_Alarms can be associated with a different + ESMF_Clock via a call to ESMF_AlarmSet(...clock=...). + +

+The arguments are: +

+
clock
+
Release resources associated with this ESMF_Clock and mark the + object as invalid. It is an error to pass this object into any other + routines after being destroyed. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+45.5.8 ESMF_ClockGet - Get a Clock's properties +

+ +

+ +

+
+INTERFACE: +

       subroutine ESMF_ClockGet(clock, &
+         timeStep, startTime, stopTime, &
+         runDuration, runTimeStepCount, refTime, currTime, prevTime, &
+         currSimTime, prevSimTime, calendar, calkindflag, timeZone, &
+         advanceCount, alarmCount, direction, repeatDuration, repeatCount, &
+         name, rc)
+
ARGUMENTS: +
       type(ESMF_Clock),        intent(in)            :: clock
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       type(ESMF_TimeInterval), intent(out), optional :: timeStep
+       type(ESMF_Time),         intent(out), optional :: startTime
+       type(ESMF_Time),         intent(out), optional :: stopTime
+       type(ESMF_TimeInterval), intent(out), optional :: runDuration
+       real(ESMF_KIND_R8),      intent(out), optional :: runTimeStepCount
+       type(ESMF_Time),         intent(out), optional :: refTime
+       type(ESMF_Time),         intent(out), optional :: currTime
+       type(ESMF_Time),         intent(out), optional :: prevTime
+       type(ESMF_TimeInterval), intent(out), optional :: currSimTime
+       type(ESMF_TimeInterval), intent(out), optional :: prevSimTime
+       type(ESMF_Calendar),     intent(out), optional :: calendar
+       type(ESMF_CalKind_Flag), intent(out), optional :: calkindflag
+       integer,                 intent(out), optional :: timeZone
+       integer(ESMF_KIND_I8),   intent(out), optional :: advanceCount
+       integer,                 intent(out), optional :: alarmCount
+       type(ESMF_Direction_Flag),    intent(out), optional :: direction
+       type(ESMF_TimeInterval), intent(out), optional :: repeatDuration
+       integer(ESMF_KIND_I8),   intent(out), optional :: repeatCount
+       character (len=*),       intent(out), optional :: name
+       integer,                 intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    8.7.0
    +
    Added arguments repeatDuration and repeatCount. + The argument repeatDuration allows the user to get information + about how far the clock will advance before repeating. The argument + repeatCount tells how many times the clock has repeated. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Gets one or more of the properties of an ESMF_Clock. + +

+The arguments are: +

+
clock
+
The object instance to query. + +
+
[timeStep]
+
The ESMF_Clock's time step interval. + +
+
[startTime]
+
The ESMF_Clock's starting time. + +
+
[stopTime]
+
The ESMF_Clock's stopping time. + +
+
[runDuration]
+
Alternative way to get ESMF_Clock's stopping time; + runDuration = stopTime - startTime. + +
+
[runTimeStepCount]
+
Alternative way to get ESMF_Clock's stopping time; + runTimeStepCount = (stopTime - startTime) / timeStep. + +
+
[refTime]
+
The ESMF_Clock's reference time. + +
+
[currTime]
+
The ESMF_Clock's current time. + +
+
[prevTime]
+
The ESMF_Clock's previous time. Equals currTime at + the previous time step. + +
+
[currSimTime]
+
The current simulation time (currTime - refTime). + +
+
[prevSimTime]
+
The previous simulation time. Equals currSimTime at + the previous time step. + +
+
[calendar]
+
The Calendar on which all the Clock's times are defined. + +
+
[calkindflag]
+
The CalKind_Flag on which all the Clock's times are + defined. + +
+
[timeZone]
+
The timezone within which all the Clock's times are defined. + +
+
[advanceCount]
+
The number of times the ESMF_Clock has been advanced. + Increments in ESMF_DIRECTION_FORWARD and decrements in + ESMF_DIRECTION_REVERSE; see "direction" argument below and + in ESMF_ClockSet(). + +
+
[alarmCount]
+
The number of ESMF_Alarms in the ESMF_Clock's + ESMF_Alarm list. + +
+
[direction]
+
The ESMF_Clock's time stepping direction. See also + ESMF_ClockIsReverse(), an alternative for convenient use in + "if" and "do while" constructs. + +
+
[repeatDuration]
+
If not 0, then tells how long the clock will advance before going back to + startTime. If 0, then the clock is not a repeat clock. + +
+
[repeatCount]
+
If this clock is a repeat clock, then gives the number of times this + clock has gone back to startTime. + +
+
[name]
+
The name of this clock. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+45.5.9 ESMF_ClockGetAlarm - Get an Alarm in a Clock's Alarm list +

+ +

+ +

+
+INTERFACE: +

       subroutine ESMF_ClockGetAlarm(clock, alarmname, alarm, &
+         rc)
+
ARGUMENTS: +
       type(ESMF_Clock),  intent(in)            :: clock
+       character (len=*), intent(in)            :: alarmname
+       type(ESMF_Alarm),  intent(out)           :: alarm
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       integer,           intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Gets the alarm whose name is the value of alarmname in the + clock's ESMF_Alarm list. + +

+The arguments are: +

+
clock
+
The object instance to get the ESMF_Alarm from. + +
+
alarmname
+
The name of the desired ESMF_Alarm. + +
+
alarm
+
The desired alarm. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+45.5.10 ESMF_ClockGetAlarmList - Get a list of Alarms from a Clock +

+ +

+ +

+
+INTERFACE: +

       subroutine ESMF_ClockGetAlarmList(clock, alarmlistflag, &
+         timeStep, alarmList, alarmCount, rc)
+
ARGUMENTS: +
       type(ESMF_Clock),          intent(in)            :: clock
+       type(ESMF_AlarmList_Flag), intent(in)            :: alarmlistflag
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       type(ESMF_TimeInterval),   intent(in),  optional :: timeStep
+       type(ESMF_Alarm),          intent(out), optional :: alarmList(:)
+       integer,                   intent(out), optional :: alarmCount
+       integer,                   intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Gets the clock's list of alarms and/or number of alarms. + +

+The arguments are: +

+
clock
+
The object instance from which to get an ESMF_Alarm list + and/or count of ESMF_Alarms. + +
+
alarmlistflag
+
The kind of list to get: + +

+ESMF_ALARMLIST_ALL : + Returns the ESMF_Clock's entire list of alarms. + +

+ESMF_ALARMLIST_NEXTRINGING : + Return only those alarms that will ring upon the next + clock time step. Can optionally specify argument + timeStep (see below) to use instead of the clock's. + See also method ESMF_AlarmWillRingNext() for checking a + single alarm. + +

+ESMF_ALARMLIST_PREVRINGING : + + Return only those alarms that were ringing on the previous + ESMF_Clock time step. See also method + ESMF_AlarmWasPrevRinging() for checking a single alarm. + +

+ESMF_ALARMLIST_RINGING : + Returns only those clock alarms that are currently + ringing. See also method ESMF_ClockAdvance() for + getting the list of ringing alarms subsequent to a time step. + See also method ESMF_AlarmIsRinging() for checking a + single alarm. + +

+
[timeStep]
+
Optional time step to be used instead of the clock's. + Only used with ESMF_ALARMLIST_NEXTRINGING alarmlistflag + (see above); ignored if specified with other alarmlistflags. + +
+
[alarmList]
+
The array of returned alarms. If given, the array must be large + enough to hold the number of alarms of the specified + alarmlistflag in the specified clock. + +
+
[alarmCount]
+
If specified, returns the number of ESMF_Alarms of the + specified alarmlistflag in the specified clock. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+45.5.11 ESMF_ClockGetNextTime - Calculate a Clock's next time +

+ +

+ +

+
+INTERFACE: +

       subroutine ESMF_ClockGetNextTime(clock, nextTime, &
+         timeStep, rc)
+
ARGUMENTS: +
       type(ESMF_Clock),        intent(in)            :: clock
+       type(ESMF_Time),         intent(out)           :: nextTime
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       type(ESMF_TimeInterval), intent(in),  optional :: timeStep
+       integer,                 intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Calculates what the next time of the clock will be, based on + the clock's current time step or an optionally passed-in + timeStep. + +

+The arguments are: +

+
clock
+
The object instance for which to get the next time. + +
+
nextTime
+
The resulting ESMF_Clock's next time. + +
+
[timeStep]
+
The time step interval to use instead of the clock's. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+45.5.12 ESMF_ClockIsCreated - Check whether a Clock object has been created +

+ +

+ +

+
+INTERFACE: +

   function ESMF_ClockIsCreated(clock, rc)
+
RETURN VALUE: +
     logical :: ESMF_ClockIsCreated
+
ARGUMENTS: +
     type(ESMF_Clock), intent(in)            :: clock
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,             intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Return .true. if the clock has been created. Otherwise return + .false.. If an error occurs, i.e. rc /= ESMF_SUCCESS is + returned, the return value of the function will also be .false.. + +

+The arguments are: +

+
clock
+
ESMF_Clock queried. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+45.5.13 ESMF_ClockIsDone - Based on its direction, test if the Clock has reached or exceeded its stop time or start time +

+ +

+ +

+
+INTERFACE: +

       function ESMF_ClockIsDone(clock, rc)
+
RETURN VALUE: +
       logical :: ESMF_ClockIsDone
+
ARGUMENTS: +
       type(ESMF_Clock), intent(in)            :: clock
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       integer,          intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Returns true if currentTime is greater than or equal to stopTime + in ESMF_DIRECTION_FORWARD, or if currentTime is less than or + equal to startTime in ESMF_DIRECTION_REVERSE. It returns false + otherwise. + +

+The arguments are: +

+
clock
+
The object instance to check. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+45.5.14 ESMF_ClockIsReverse - Test if the Clock is in reverse mode +

+ +

+ +

+
+INTERFACE: +

       function ESMF_ClockIsReverse(clock, rc)
+
RETURN VALUE: +
       logical :: ESMF_ClockIsReverse
+
ARGUMENTS: +
       type(ESMF_Clock), intent(in)            :: clock
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       integer,          intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Returns true if clock is in ESMF_DIRECTION_REVERSE, and false if + in ESMF_DIRECTION_FORWARD. Allows convenient use in "if" and + "do while" constructs. Alternative to + ESMF_ClockGet(...direction=...). + +

+The arguments are: +

+
clock
+
The object instance to check. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+45.5.15 ESMF_ClockIsStopTime - Test if the Clock has reached or exceeded its stop time +

+ +

+ +

+
+INTERFACE: +

       function ESMF_ClockIsStopTime(clock, rc)
+
RETURN VALUE: +
       logical :: ESMF_ClockIsStopTime
+
ARGUMENTS: +
       type(ESMF_Clock), intent(in)            :: clock
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       integer,          intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Returns true if the clock has reached or exceeded its stop time, + and false otherwise. + +

+The arguments are: +

+
clock
+
The object instance to check. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+45.5.16 ESMF_ClockIsStopTimeEnabled - Test if the Clock's stop time is enabled +

+ +

+ +

+
+INTERFACE: +

       function ESMF_ClockIsStopTimeEnabled(clock, rc)
+
RETURN VALUE: +
       logical :: ESMF_ClockIsStopTimeEnabled
+
ARGUMENTS: +
       type(ESMF_Clock), intent(in)            :: clock
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       integer,          intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Returns true if the clock's stop time is set and enabled, + and false otherwise. + +

+The arguments are: +

+
clock
+
The object instance to check. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+45.5.17 ESMF_ClockPrint - Print Clock information +

+ +

+ +

+
+INTERFACE: +

       subroutine ESMF_ClockPrint(clock, options, preString, unit, rc)
+
ARGUMENTS: +
       type(ESMF_Clock),  intent(in)            :: clock
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       character (len=*), intent(in),  optional :: options
+       character(*),      intent(in),  optional :: preString
+       character(*),      intent(out), optional :: unit
+       integer,           intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Prints out an ESMF_Clock's properties to stdout, in + support of testing and debugging. The options control the type of + information and level of detail. +
+

+The arguments are: +

+
clock
+
ESMF_Clock to be printed out. + +
+
[options]
+
Print options. If none specified, prints all clock property + values. +
"advanceCount" - print the number of times the clock has been + advanced. +
"alarmCount" - print the number of alarms in the clock's list. +
"alarmList" - print the clock's alarm list. +
"currTime" - print the current clock time. +
"direction" - print the clock's timestep direction. +
"name" - print the clock's name. +
"prevTime" - print the previous clock time. +
"refTime" - print the clock's reference time. +
"startTime" - print the clock's start time. +
"stopTime" - print the clock's stop time. +
"timeStep" - print the clock's time step. +
+
+
[preString]
+
Optionally prepended string. Default to empty string. + +
+
[unit]
+
Internal unit, i.e. a string. Default to printing to stdout. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+45.5.18 ESMF_ClockSet - Set one or more properties of a Clock +

+ +

+ +

+
+INTERFACE: +

       subroutine ESMF_ClockSet(clock, &
+         timeStep, startTime, stopTime, &
+         runDuration, runTimeStepCount, refTime, currTime, advanceCount, &
+         direction, name, rc)
+
ARGUMENTS: +
       type(ESMF_Clock),        intent(inout)         :: clock
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       type(ESMF_TimeInterval), intent(in),  optional :: timeStep
+       type(ESMF_Time),         intent(in),  optional :: startTime
+       type(ESMF_Time),         intent(in),  optional :: stopTime
+       type(ESMF_TimeInterval), intent(in),  optional :: runDuration
+       integer,                 intent(in),  optional :: runTimeStepCount
+       type(ESMF_Time),         intent(in),  optional :: refTime
+       type(ESMF_Time),         intent(in),  optional :: currTime
+       integer(ESMF_KIND_I8),   intent(in),  optional :: advanceCount
+       type(ESMF_Direction_Flag),    intent(in),  optional :: direction
+       character (len=*),       intent(in),  optional :: name
+       integer,                 intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Sets/resets one or more of the properties of an ESMF_Clock that + was previously initialized via ESMF_ClockCreate(). + +

+The arguments are: +

+
clock
+
The object instance to set. + +
+
[timeStep]
+
The ESMF_Clock's time step interval, which can be positive or + negative. This is used to change a clock's timestep property for + those applications that need variable timesteps. See + ESMF_ClockAdvance() below for specifying variable timesteps + that are NOT saved as the clock's internal time step property. + See "direction" argument below for behavior with + +
+t ESMF_DIRECTION_REVERSE direction. + +
+
[startTime]
+
The ESMF_Clock's starting time. Can be less than or + or greater than stopTime, depending on a positive or negative + timeStep, respectively, and whether a stopTime is specified; + see below. + +
+
[stopTime]
+
The ESMF_Clock's stopping time. Can be greater than or + less than the startTime, depending on a positive or negative + timeStep, respectively. If neither stopTime, runDuration, nor + runTimeStepCount is specified, clock runs "forever"; user must + use other means to know when to stop (e.g. ESMF_Alarm or + ESMF_ClockGet(clock, currTime)). + Mutually exclusive with runDuration and runTimeStepCount. + +
+
[runDuration]
+
Alternative way to specify ESMF_Clock's stopping time; + stopTime = startTime + runDuration. + Can be positive or negative, consistent with the timeStep's sign. + Mutually exclusive with stopTime and runTimeStepCount. + +
+
[runTimeStepCount]
+
Alternative way to specify ESMF_Clock's stopping time; + stopTime = startTime + (runTimeStepCount * timeStep). + stopTime can be before startTime if timeStep is negative. + Mutually exclusive with stopTime and runDuration. + +
+
[refTime]
+
The ESMF_Clock's reference time. + See description in ESMF_ClockCreate() above. + +
+
[currTime]
+
The current time. + +
+
[advanceCount]
+
The number of times the clock has been timestepped. + +
+
[direction]
+
Sets the clock's time-stepping direction. If called with + ESMF_DIRECTION_REVERSE, sets the clock in "reverse" mode, + causing it to timestep back towards its startTime. If called + with ESMF_DIRECTION_FORWARD, sets the clock in normal, + "forward" mode, causing it to timestep in the direction of its + startTime to stopTime. This holds true for negative timestep + clocks as well, which are initialized (created) with + stopTime < startTime. The default mode is + ESMF_DIRECTION_FORWARD, established at + ESMF_ClockCreate(). timeStep can also be specified as an + argument at the same time, which allows for a change in magnitude + and/or sign of the clock's timeStep. If not specified with + ESMF_DIRECTION_REVERSE, the clock's current timeStep is + effectively negated. If timeStep is specified, its sign is used as + specified; it is not negated internally. E.g., if the specified + timeStep is negative and the clock is placed in + ESMF_DIRECTION_REVERSE, subsequent calls to + ESMF_ClockAdvance() will cause the clock's current time to + be decremented by the new timeStep's magnitude. + +
+
[name]
+
The new name for this clock. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+45.5.19 ESMF_ClockStopTimeDisable - Disable a Clock's stop time +

+ +

+ +

+
+INTERFACE: +

       subroutine ESMF_ClockStopTimeDisable(clock, rc)
+
ARGUMENTS: +
       type(ESMF_Clock), intent(inout)         :: clock
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       integer,          intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Disables a ESMF_Clock's stop time; ESMF_ClockIsStopTime() + will always return false, allowing a clock to run past its stopTime. + +

+The arguments are: +

+
clock
+
The object instance whose stop time to disable. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+45.5.20 ESMF_ClockStopTimeEnable - Enable an Clock's stop time +

+ +

+ +

+
+INTERFACE: +

       subroutine ESMF_ClockStopTimeEnable(clock, stopTime, rc)
+
ARGUMENTS: +
       type(ESMF_Clock), intent(inout)         :: clock
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       type(ESMF_Time),  intent(in),  optional :: stopTime
+       integer,          intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Enables a ESMF_Clock's stop time, allowing + ESMF_ClockIsStopTime() to respect the stopTime. + +

+The arguments are: +

+
clock
+
The object instance whose stop time to enable. + +
+
[stopTime]
+
The stop time to set or reset. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+45.5.21 ESMF_ClockSyncToRealTime - Set Clock's current time to wall clock time +

+ +

+ +

+
+INTERFACE: +

       subroutine ESMF_ClockSyncToRealTime(clock, rc)
+
ARGUMENTS: +
       type(ESMF_Clock), intent(inout)         :: clock
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       integer,          intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Sets a clock's current time to the wall clock time. It is + accurate to the nearest second. + +

+The arguments are: +

+
clock
+
The object instance to be synchronized with wall clock time. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+45.5.22 ESMF_ClockValidate - Validate a Clock's properties +

+ +

+ +

+
+INTERFACE: +

       subroutine ESMF_ClockValidate(clock, rc)
+
ARGUMENTS: +
       type(ESMF_Clock),  intent(in)            :: clock
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       integer,           intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Checks whether a clock is valid. + Must have a valid startTime and timeStep. If clock has a + stopTime, its currTime must be within startTime to stopTime, inclusive; + also startTime's and stopTime's calendars must be the same. + +

+The arguments are: +

+
clock
+
ESMF_Clock to be validated. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ + +

+46 Alarm Class +

+ +

+46.1 Description +

+ +

+The Alarm class identifies events that occur at specific Times +or specific TimeIntervals by returning a true value at those times +or subsequent times, and a false value otherwise. + +

+46.2 Constants +

+ +

+ +

+ +
+46.2.1 ESMF_ALARMLIST +

+ +

+DESCRIPTION: +
+Specifies the characteristics of Alarms that populate +a retrieved Alarm list. + +

+The type of this flag is: + +

+type(ESMF_AlarmList_Flag) + +

+The valid values are: +

+
ESMF_ALARMLIST_ALL
+
All alarms. + +

+

+
ESMF_ALARMLIST_NEXTRINGING
+
Alarms that will ring before or at the next timestep. + +

+

+
ESMF_ALARMLIST_PREVRINGING
+
Alarms that rang at or since the last timestep. + +

+

+
ESMF_ALARMLIST_RINGING
+
Only ringing alarms. + +

+

+
+ +

+46.3 Use and Examples +

+ +

+Alarms are used in conjunction with Clocks (see Section 45.1). +Multiple Alarms can be associated with a Clock. During the +ESMF_ClockAdvance() method, a Clock iterates over its internal Alarms +to determine if any are ringing. Alarms ring when a specified Alarm +time is reached or exceeded, taking into account whether the time step is +positive or negative. In ESMF_DIRECTION_REVERSE +(see Section 45.1), alarms ring in reverse, i.e., they begin +ringing when they originally ended, and end ringing when they originally +began. On completion of the time advance call, the Clock optionally returns +a list of ringing alarms. + +

+Each ringing Alarm can then be processed using Alarm methods for identifying, +turning off, disabling or resetting the Alarm. + +

+Alarm methods are defined for obtaining the ringing state, turning the +ringer on/off, enabling/disabling the Alarm, and getting/setting +associated times. + +

+The following example shows how to set and process Alarms. + +

+ +

+ +

+

+! !PROGRAM: ESMF_AlarmEx - Alarm examples
+!
+! !DESCRIPTION:
+!
+! This program shows an example of how to create, initialize, and process
+! alarms associated with a clock.
+!-----------------------------------------------------------------------------
+#include "ESMF.h"
+
+      ! ESMF Framework module
+      use ESMF
+      use ESMF_TestMod
+      implicit none
+
+      ! instantiate time_step, start, stop, and alarm times
+      type(ESMF_TimeInterval) :: timeStep, alarmInterval
+      type(ESMF_Time) :: alarmTime, startTime, stopTime
+
+      ! instantiate a clock 
+      type(ESMF_Clock) :: clock
+
+      ! instantiate Alarm lists
+      integer, parameter :: NUMALARMS = 2
+      type(ESMF_Alarm) :: alarm(NUMALARMS)
+
+      ! local variables for Get methods
+      integer :: ringingAlarmCount  ! at any time step (0 to NUMALARMS)
+
+      ! name, loop counter, result code
+      character (len=ESMF_MAXSTR) :: name
+      integer :: i, rc, result
+
+ +

+

+      ! initialize ESMF framework
+      call ESMF_Initialize(defaultCalKind=ESMF_CALKIND_GREGORIAN, &
+        defaultlogfilename="AlarmEx.Log", &
+        logkindflag=ESMF_LOGKIND_MULTI, rc=rc)
+
+ +

+ +

+46.3.1 Clock initialization +

+ +

+This example shows how to create and initialize an ESMF_Clock. +

+

+      ! initialize time interval to 1 day
+      call ESMF_TimeIntervalSet(timeStep, d=1, rc=rc)
+
+ +

+

+      ! initialize start time to 9/1/2003
+      call ESMF_TimeSet(startTime, yy=2003, mm=9, dd=1, rc=rc)
+
+ +

+

+      ! initialize stop time to 9/30/2003
+      call ESMF_TimeSet(stopTime, yy=2003, mm=9, dd=30, rc=rc)
+
+ +

+

+      ! create & initialize the clock with the above values
+      clock = ESMF_ClockCreate(timeStep, startTime, stopTime=stopTime, &
+                               name="The Clock", rc=rc)
+
+ +

+ +

+46.3.2 Alarm initialization +

+ +

+This example shows how to create and initialize two ESMF_Alarms and + associate them with the clock. +

+

+      ! Initialize first alarm to be a one-shot on 9/15/2003 and associate
+      ! it with the clock
+      call ESMF_TimeSet(alarmTime, yy=2003, mm=9, dd=15, rc=rc)
+
+ +

+

+      alarm(1) = ESMF_AlarmCreate(clock, &
+         ringTime=alarmTime, name="Example alarm 1", rc=rc)
+
+ +

+

+      ! Initialize second alarm to ring on a 1 week interval starting 9/1/2003
+      ! and associate it with the clock
+      call ESMF_TimeSet(alarmTime, yy=2003, mm=9, dd=1, rc=rc)
+
+ +

+

+      call ESMF_TimeIntervalSet(alarmInterval, d=7, rc=rc)
+
+ +

+

+      ! Alarm gets default name "Alarm002"
+      alarm(2) = ESMF_AlarmCreate(clock=clock, ringTime=alarmTime, &
+                                  ringInterval=alarmInterval, rc=rc)
+
+ +

+ +

+46.3.3 Clock advance and Alarm processing +

+ +

+This example shows how to advance an ESMF_Clock and process any + resulting ringing alarms. +

+

+      ! time step clock from start time to stop time
+      do while (.not.ESMF_ClockIsStopTime(clock, rc=rc))
+
+ +

+

+        ! perform time step and get the number of any ringing alarms
+        call ESMF_ClockAdvance(clock, ringingAlarmCount=ringingAlarmCount, &
+                               rc=rc)
+
+ +

+

+        call ESMF_ClockPrint(clock, options="currTime string", rc=rc)
+
+ +

+

+        ! check if alarms are ringing
+        if (ringingAlarmCount > 0) then
+          print *, "number of ringing alarms = ", ringingAlarmCount
+
+          do i = 1, NUMALARMS
+            if (ESMF_AlarmIsRinging(alarm(i), rc=rc)) then
+
+ +

+

+              call ESMF_AlarmGet(alarm(i), name=name, rc=rc)
+              print *, trim(name), " is ringing!"
+
+ +

+

+              ! after processing alarm, turn it off
+              call ESMF_AlarmRingerOff(alarm(i), rc=rc)
+
+ +

+

+            end if ! this alarm is ringing
+          end do ! each ringing alarm
+        endif ! ringing alarms
+      end do ! timestep clock
+
+ +

+ +

+46.3.4 Alarm and Clock destruction +

+ +

+This example shows how to destroy ESMF_Alarms and ESMF_Clocks. +

+

+      call ESMF_AlarmDestroy(alarm(1), rc=rc)
+
+ +

+

+      call ESMF_AlarmDestroy(alarm(2), rc=rc)
+
+ +

+

+      call ESMF_ClockDestroy(clock, rc=rc)
+
+ +

+

+      ! finalize ESMF framework
+      call ESMF_Finalize(rc=rc)
+
+ +

+

+      end program ESMF_AlarmEx
+
+ +

+ + +

+46.4 Restrictions and Future Work +

+ +

+ +

    +
  1. Alarm list allocation factor The alarm list within a clock is +dynamically allocated automatically, 200 alarm references at a time. +This constant is defined in both Fortran and C++ with a #define for ease +of modification. + +

    +

  2. +
  3. Sticky alarm end times in reverse For sticky alarms, there is +an implicit limitation that in order to properly reverse timestep through a +ring end time, that time must have already been traversed in the forward +direction. This is due to the fact that the Time Manager cannot predict +when user code will call ESMF_AlarmRingerOff(). An error message +will be logged when this limitation is not satisfied. + +

    +

  4. +
  5. Sticky alarm ring interval in reverse + +For repeating sticky alarms, +it is currently assumed that the ringInterval is constant, so that only the +time of the last call to ESMF_AlarmRingerOff() is saved. In +ESMF_DIRECTION_REVERSE, this information is used to turn sticky alarms +back on. In a future release, ringIntervals will be allowed to be variable, +by saving alarm state at every timestep. + +

    +

  6. +
+ +

+ +

+46.5 Design and Implementation Notes +

+ +

+The Alarm class is designed as a deep, dynamically allocatable class, +based on a pointer type. This allows for both indirect and direct +manipulation of alarms. Indirect alarm manipulation is where ESMF_Alarm API +methods, such as ESMF_AlarmRingerOff(), are invoked on alarm references +(pointers) returned from ESMF_Clock queries such as "return ringing alarms." +Since the method is performed on an alarm reference, the actual alarm held +by the clock is affected, not just a user's local copy. Direct alarm +manipulation is the more common case where alarm API methods are invoked on +the original alarm objects created by the user. + +

+For consistency, the ESMF_Clock class is also designed as a deep, dynamically +allocatable class. + +

+An additional benefit from this approach is that Clocks and Alarms can be +created and used from anywhere in a user's code without regard to the scope +in which they were created. In contrast, statically created Alarms and +Clocks would disappear if created within a user's routine that returns, +whereas dynamically allocated Alarms and Clocks will persist until explicitly +destroyed by the user. + +

+46.6 Class API +

+ +

+ +

+ +

+ +

+46.6.1 ESMF_AlarmAssignment(=) - Assign an Alarm to another Alarm +

+ +

+ +

+
+INTERFACE: +

       interface assignment(=)
+       alarm1 = alarm2
+
ARGUMENTS: +
       type(ESMF_Alarm) :: alarm1
+       type(ESMF_Alarm) :: alarm2
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Assign alarm1 as an alias to the same ESMF_Alarm object in + memory as alarm2. If alarm2 is invalid, then alarm1 + will be equally invalid after the assignment. + +

+The arguments are: +

+
alarm1
+
The ESMF_Alarm object on the left hand side of the + assignment. + +
+
alarm2
+
The ESMF_Alarm object on the right hand side of the + assignment. + +
+
+ +

+ +

+ +

+46.6.2 ESMF_AlarmOperator(==) - Test if Alarm 1 is equal to Alarm 2 +

+ +

+ +

+
+INTERFACE: +

       interface operator(==)
+       if (alarm1 == alarm2) then ... endif
+                    OR
+       result = (alarm1 == alarm2)
+
RETURN VALUE: +
       logical :: result
+
ARGUMENTS: +
       type(ESMF_Alarm), intent(in) :: alarm1
+       type(ESMF_Alarm), intent(in) :: alarm2
+
+DESCRIPTION: +
+ +

+Overloads the (==) operator for the ESMF_Alarm class. + Compare two alarms for equality; return .true. if equal, + .false. otherwise. Comparison is based on IDs, which are distinct + for newly created alarms and identical for alarms created as copies. + +

+If either side of the equality test is not in the + ESMF_INIT_CREATED status an error will be logged. However, this + does not affect the return value, which is .true. when both + sides are in the same status, and .false. otherwise. + +

+The arguments are: +

+
alarm1
+
The ESMF_Alarm object on the left hand side of the equality + operation. + +
+
alarm2
+
The ESMF_Alarm object on the right hand side of the equality + operation. + +
+
+ +

+ +

+ +

+46.6.3 ESMF_AlarmOperator(/=) - Test if Alarm 1 is not equal to Alarm 2 +

+ +

+ +

+
+INTERFACE: +

       interface operator(/=)
+       if (alarm1 /= alarm2) then ... endif
+                    OR
+       result = (alarm1 /= alarm2)
+
RETURN VALUE: +
       logical :: result
+
ARGUMENTS: +
       type(ESMF_Alarm), intent(in) :: alarm1
+       type(ESMF_Alarm), intent(in) :: alarm2
+
+DESCRIPTION: +
+ +

+Overloads the (/=) operator for the ESMF_Alarm class. + Compare two alarms for inequality; return .true. if not equal, + .false. otherwise. Comparison is based on IDs, which are distinct + for newly created alarms and identical for alarms created as copies. + +

+If either side of the equality test is not in the + ESMF_INIT_CREATED status an error will be logged. However, this + does not affect the return value, which is .true. when both sides + are not in the same status, and .false. otherwise. + +

+The arguments are: +

+
alarm1
+
The ESMF_Alarm object on the left hand side of the + non-equality operation. + +
+
alarm2
+
The ESMF_Alarm object on the right hand side of the + non-equality operation. + +
+
+ +

+ +

+ +

+46.6.4 ESMF_AlarmCreate - Create a new ESMF Alarm +

+ +

+ +

+
+INTERFACE: +

       ! Private name; call using ESMF_AlarmCreate()
+       function ESMF_AlarmCreateNew(clock, &
+         ringTime, ringInterval, stopTime, ringDuration, ringTimeStepCount, &
+         refTime, enabled, sticky, name, rc)
+
RETURN VALUE: +
       type(ESMF_Alarm) :: ESMF_AlarmCreateNew
+
ARGUMENTS: +
       type(ESMF_Clock),        intent(in)            :: clock
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       type(ESMF_Time),         intent(in),  optional :: ringTime
+       type(ESMF_TimeInterval), intent(in),  optional :: ringInterval
+       type(ESMF_Time),         intent(in),  optional :: stopTime
+       type(ESMF_TimeInterval), intent(in),  optional :: ringDuration
+       integer,                 intent(in),  optional :: ringTimeStepCount
+       type(ESMF_Time),         intent(in),  optional :: refTime
+       logical,                 intent(in),  optional :: enabled
+       logical,                 intent(in),  optional :: sticky
+       character (len=*),       intent(in),  optional :: name
+       integer,                 intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Creates and sets the initial values in a new ESMF_Alarm. + +

+In ESMF_DIRECTION_REVERSE (see Section 45.1), alarms + ring in reverse, i.e., they begin ringing when they originally ended, + and end ringing when they originally began. + +

+The arguments are: +

+
clock
+
The clock with which to associate this newly created alarm. + +
+
[ringTime]
+
The ring time for a one-shot alarm or the first ring time for a + repeating (interval) alarm. Must specify at least one of ringTime + or ringInterval. + +
+
[ringInterval]
+
The ring interval for repeating (interval) alarms. If + ringTime is not also specified (first ring time), it will be + calculated as the clock's current time plus ringInterval. + Must specify at least one of ringTime or ringInterval. + +
+
[stopTime]
+
The stop time for repeating (interval) alarms. If not + specified, an interval alarm will repeat forever. + +
+
[ringDuration]
+
The absolute ring duration. If not sticky (see argument below), + alarms rings for ringDuration, then turns itself off. Default is + zero (unused). Mutually exclusive with ringTimeStepCount (below); + used only if set to a non-zero duration and ringTimeStepCount is 1 + (see below). + See also ESMF_AlarmSticky(), ESMF_AlarmNotSticky(). + +
+
[ringTimeStepCount]
+
The relative ring duration. If not sticky (see argument below), + alarms rings for ringTimeStepCount, then turns itself off. + Default is 1: a non-sticky alarm will ring for one clock time step. + Mutually exclusive with ringDuration (above); used if + ringTimeStepCount > 1. If ringTimeStepCount is 1 (default) and + ringDuration is non-zero, ringDuration is used (see above), otherwise + ringTimeStepCount is used. + See also ESMF_AlarmSticky(), ESMF_AlarmNotSticky(). + +
+
[refTime]
+
The reference (i.e. base) time for an interval alarm. + +
+
[enabled]
+
Sets the enabled state; default is on (true). If disabled, + an alarm will not function at all. + See also ESMF_AlarmEnable(), ESMF_AlarmDisable(). + +
+
[sticky]
+
Sets the sticky state; default is on (true). If sticky, + once an alarm is ringing, it will remain ringing until turned off + manually via a user call to ESMF_AlarmRingerOff(). + If not sticky, an alarm will turn itself off after a certain + ring duration specified by either ringDuration or + ringTimeStepCount (see above). There is an implicit limitation + that in order to properly reverse timestep through a ring end + time in ESMF_DIRECTION_REVERSE, that time must have already + been traversed in the forward direction. This is due to the fact + that the Time Manager cannot predict when user code will call + ESMF_AlarmRingerOff(). An error message will be logged + when this limitation is not satisfied. + See also ESMF_AlarmSticky(), ESMF_AlarmNotSticky(). + +
+
[name]
+
The name for the newly created alarm. If not specified, + a default unique name will be generated: "AlarmNNN" where NNN + is a unique sequence number from 001 to 999. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+46.6.5 ESMF_AlarmCreate - Create a copy of an existing ESMF Alarm +

+ +

+ +

+
+INTERFACE: +

       ! Private name; call using ESMF_AlarmCreate()
+       function ESMF_AlarmCreateCopy(alarm, rc)
+
RETURN VALUE: +
       type(ESMF_Alarm) :: ESMF_AlarmCreateCopy
+
ARGUMENTS: +
       type(ESMF_Alarm), intent(in)            :: alarm
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       integer,          intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Creates a complete (deep) copy of a given ESMF_Alarm. + The returned ESMF_Alarm copy is associated with the same + ESMF_Clock as the original ESMF_Alarm. If desired, use + ESMF_AlarmSet(...clock=...) to re-associate the + ESMF_Alarm copy with a different ESMF_Clock. + +

+The arguments are: +

+
alarm
+
The ESMF_Alarm to copy. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+46.6.6 ESMF_AlarmDestroy - Release resources associated with an Alarm +

+ +

+ +

+
+INTERFACE: +

       subroutine ESMF_AlarmDestroy(alarm, rc)
+
ARGUMENTS: +
       type(ESMF_Alarm), intent(inout)          :: alarm
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       integer,          intent(out),  optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Releases resources associated with this ESMF_Alarm. Also + removes this ESMF_Alarm from its associated ESMF_Clock's + list of ESMF_Alarms (removes the ESMF_Alarm pointer from + the list). + +

+The arguments are: +

+
alarm
+
Release resources associated with this ESMF_Alarm and mark the + object as invalid. It is an error to pass this object into any other + routines after being destroyed. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+46.6.7 ESMF_AlarmDisable - Disable an Alarm +

+ +

+ +

+
+INTERFACE: +

       subroutine ESMF_AlarmDisable(alarm, rc)
+
ARGUMENTS: +
       type(ESMF_Alarm), intent(inout)         :: alarm
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       integer,          intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Disables an ESMF_Alarm. + +

+The arguments are: +

+
alarm
+
The object instance to disable. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+46.6.8 ESMF_AlarmEnable - Enable an Alarm +

+ +

+ +

+
+INTERFACE: +

       subroutine ESMF_AlarmEnable(alarm, rc)
+
ARGUMENTS: +
       type(ESMF_Alarm), intent(inout)         :: alarm
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       integer,          intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Enables an ESMF_Alarm to function. + +

+The arguments are: +

+
alarm
+
The object instance to enable. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+46.6.9 ESMF_AlarmGet - Get Alarm properties +

+ +

+ +

+
+INTERFACE: +

       subroutine ESMF_AlarmGet(alarm, &
+         clock, ringTime, prevRingTime, ringInterval, stopTime, ringDuration, &
+         ringTimeStepCount, timeStepRingingCount, ringBegin, ringEnd, &
+         refTime, ringing, ringingOnPrevTimeStep, enabled, sticky, name, rc)
+
ARGUMENTS: +
       type(ESMF_Alarm),        intent(in)            :: alarm
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       type(ESMF_Clock),        intent(out), optional :: clock
+       type(ESMF_Time),         intent(out), optional :: ringTime
+       type(ESMF_Time),         intent(out), optional :: prevRingTime
+       type(ESMF_TimeInterval), intent(out), optional :: ringInterval
+       type(ESMF_Time),         intent(out), optional :: stopTime
+       type(ESMF_TimeInterval), intent(out), optional :: ringDuration
+       integer,                 intent(out), optional :: ringTimeStepCount
+       integer,                 intent(out), optional :: timeStepRingingCount
+       type(ESMF_Time),         intent(out), optional :: ringBegin
+       type(ESMF_Time),         intent(out), optional :: ringEnd
+       type(ESMF_Time),         intent(out), optional :: refTime
+       logical,                 intent(out), optional :: ringing
+       logical,                 intent(out), optional :: ringingOnPrevTimeStep
+       logical,                 intent(out), optional :: enabled
+       logical,                 intent(out), optional :: sticky
+       character (len=*),       intent(out), optional :: name
+       integer,                 intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Gets one or more of an ESMF_Alarm's properties. + +

+The arguments are: +

+
alarm
+
The object instance to query. + +
+
[clock]
+
The associated clock. + +
+
[ringTime]
+
The ring time for a one-shot alarm or the next repeating alarm. + +
+
[prevRingTime]
+
The previous ring time. + +
+
[ringInterval]
+
The ring interval for repeating (interval) alarms. + +
+
[stopTime]
+
The stop time for repeating (interval) alarms. + +
+
[ringDuration]
+
The ring duration. Mutually exclusive with + ringTimeStepCount (see below). + +
+
[ringTimeStepCount]
+
The number of time steps comprising the ring duration. Mutually + exclusive with ringDuration (see above). + +
+
[timeStepRingingCount]
+
The number of time steps for which the alarm has been ringing thus + far. Used internally for tracking ringTimeStepCount ring + durations (see above). Mutually exclusive with ringBegin + (see below). Increments in ESMF_DIRECTION_FORWARD and + decrements in ESMF_DIRECTION_REVERSE; + see Section 45.1. + +
+
[ringBegin]
+
The time when the alarm began ringing. Used internally for tracking + ringDuration (see above). Mutually exclusive with + timeStepRingingCount (see above). + +
+
[ringEnd]
+
The time when the alarm ended ringing. Used internally for + re-ringing alarm in ESMF_DIRECTION_REVERSE. + +
+
[refTime]
+
The reference (i.e. base) time for an interval alarm. + +
+
[ringing]
+
The current ringing state. + See also ESMF_AlarmRingerOn(), ESMF_AlarmRingerOff(). + +
+
[ringingOnPrevTimeStep]
+
The ringing state upon the previous time step. Same as + ESMF_AlarmWasPrevRinging(). + +
+
[enabled]
+
The enabled state. + See also ESMF_AlarmEnable(), ESMF_AlarmDisable(). + +
+
[sticky]
+
The sticky state. + See also ESMF_AlarmSticky(), ESMF_AlarmNotSticky(). + +
+
[name]
+
The name of this alarm. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+46.6.10 ESMF_AlarmIsCreated - Check whether a Alarm object has been created +

+ +

+ +

+
+INTERFACE: +

   function ESMF_AlarmIsCreated(alarm, rc)
+
RETURN VALUE: +
     logical :: ESMF_AlarmIsCreated
+
ARGUMENTS: +
     type(ESMF_Alarm), intent(in)            :: alarm
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,             intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Return .true. if the alarm has been created. Otherwise return + .false.. If an error occurs, i.e. rc /= ESMF_SUCCESS is + returned, the return value of the function will also be .false.. + +

+The arguments are: +

+
alarm
+
ESMF_Alarm queried. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+46.6.11 ESMF_AlarmIsEnabled - Check if Alarm is enabled +

+ +

+ +

+
+INTERFACE: +

       function ESMF_AlarmIsEnabled(alarm, rc)
+
RETURN VALUE: +
       logical :: ESMF_AlarmIsEnabled
+
ARGUMENTS: +
       type(ESMF_Alarm), intent(in)            :: alarm
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       integer,          intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Check if ESMF_Alarm is enabled. + +

+The arguments are: +

+
alarm
+
The object instance to check for enabled state. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+46.6.12 ESMF_AlarmIsRinging - Check if Alarm is ringing +

+ +

+ +

+
+INTERFACE: +

       function ESMF_AlarmIsRinging(alarm, rc)
+
RETURN VALUE: +
       logical :: ESMF_AlarmIsRinging
+
ARGUMENTS: +
       type(ESMF_Alarm), intent(in)            :: alarm
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       integer,          intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Check if ESMF_Alarm is ringing. + +

+See also method + ESMF_ClockGetAlarmList(clock, ESMF_ALARMLIST_RINGING, ...) + to get a list of all ringing alarms belonging to an ESMF_Clock. + +

+The arguments are: +

+
alarm
+
The alarm to check for ringing state. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+46.6.13 ESMF_AlarmIsSticky - Check if Alarm is sticky +

+ +

+ +

+
+INTERFACE: +

       function ESMF_AlarmIsSticky(alarm, rc)
+
RETURN VALUE: +
       logical :: ESMF_AlarmIsSticky
+
ARGUMENTS: +
       type(ESMF_Alarm), intent(in)            :: alarm
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       integer,          intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Check if alarm is sticky. + +

+The arguments are: +

+
alarm
+
The object instance to check for sticky state. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+46.6.14 ESMF_AlarmNotSticky - Unset an Alarm's sticky flag +

+ +

+ +

+
+INTERFACE: +

       subroutine ESMF_AlarmNotSticky(alarm, &
+         ringDuration, ringTimeStepCount, rc)
+
ARGUMENTS: +
       type(ESMF_Alarm),        intent(inout)         :: alarm
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       type(ESMF_TimeInterval), intent(in),  optional :: ringDuration
+       integer,                 intent(in),  optional :: ringTimeStepCount
+       integer,                 intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Unset an ESMF_Alarm's sticky flag; once alarm is ringing, + it turns itself off after ringDuration. + +

+The arguments are: +

+
alarm
+
The object instance to unset sticky. + +
+
[ringDuration]
+
If not sticky, alarms rings for ringDuration, then turns itself off. + Mutually exclusive with ringTimeStepCount (see below and full + description in method ESMF_AlarmCreate() or + ESMF_AlarmSet()). + +
+
[ringTimeStepCount]
+
If not sticky, alarms rings for ringTimeStepCount, then turns + itself off. Mutually exclusive with ringDuration (see above and + full description in method ESMF_AlarmCreate() or + ESMF_AlarmSet()). + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+46.6.15 ESMF_AlarmPrint - Print Alarm information +

+ +

+ +

+
+INTERFACE: +

       subroutine ESMF_AlarmPrint(alarm, options, rc)
+
ARGUMENTS: +
       type(ESMF_Alarm),  intent(in)            :: alarm
+       character (len=*), intent(in),  optional :: options
+       integer,           intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Prints out an ESMF_Alarm's properties to stdout, in support + of testing and debugging. The options control the type of information + and level of detail. +
+

+The arguments are: +

+
alarm
+
ESMF_Alarm to be printed out. + +
+
[options]
+
Print options. If none specified, prints all alarm property values. +
"clock" - print the associated clock's name. +
"enabled" - print the alarm's ability to ring. +
"name" - print the alarm's name. +
"prevRingTime" - print the alarm's previous ring time. +
"ringBegin" - print time when the alarm actually begins to ring. +
"ringDuration" - print how long this alarm is to remain ringing. +
"ringEnd" - print time when the alarm actually ends ringing. +
"ringing" - print the alarm's current ringing state. +
"ringingOnPrevTimeStep" - print whether the alarm was ringing + immediately after the previous clock + time step. +
"ringInterval" - print the alarm's periodic ring interval. +
"ringTime" - print the alarm's next time to ring. +
"ringTimeStepCount" - print how long this alarm is to remain + ringing, in terms of a number of clock time + steps. +
"refTime" - print the alarm's interval reference (base) time. +
"sticky" - print whether the alarm must be turned off + manually. +
"stopTime" - print when alarm intervals end. +
"timeStepRingingCount" - print the number of time steps the + alarm has been ringing thus far. +
+
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+46.6.16 ESMF_AlarmRingerOff - Turn off an Alarm +

+ +

+ +

+
+INTERFACE: +

       subroutine ESMF_AlarmRingerOff(alarm, rc)
+
ARGUMENTS: +
       type(ESMF_Alarm), intent(inout)         :: alarm
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       integer,          intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Turn off an ESMF_Alarm; unsets ringing state. For a sticky + alarm, this method must be called to turn off its ringing state. + This is true for either ESMF_DIRECTION_FORWARD (default) or + ESMF_DIRECTION_REVERSE. See Section 45.1. + +

+The arguments are: +

+
alarm
+
The object instance to turn off. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+46.6.17 ESMF_AlarmRingerOn - Turn on an Alarm +

+ +

+ +

+
+INTERFACE: +

       subroutine ESMF_AlarmRingerOn(alarm, rc)
+
ARGUMENTS: +
       type(ESMF_Alarm), intent(inout)         :: alarm
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       integer,          intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Turn on an ESMF_Alarm; sets ringing state. + +

+The arguments are: +

+
alarm
+
The object instance to turn on. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+46.6.18 ESMF_AlarmSet - Set Alarm properties +

+ +

+ +

+
+INTERFACE: +

       subroutine ESMF_AlarmSet(alarm, &
+         clock, ringTime, ringInterval, stopTime, ringDuration, &
+         ringTimeStepCount, refTime, ringing, enabled, sticky, name, rc)
+
ARGUMENTS: +
       type(ESMF_Alarm),        intent(inout)         :: alarm
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       type(ESMF_Clock),        intent(in),  optional :: clock
+       type(ESMF_Time),         intent(in),  optional :: ringTime
+       type(ESMF_TimeInterval), intent(in),  optional :: ringInterval
+       type(ESMF_Time),         intent(in),  optional :: stopTime
+       type(ESMF_TimeInterval), intent(in),  optional :: ringDuration
+       integer,                 intent(in),  optional :: ringTimeStepCount
+       type(ESMF_Time),         intent(in),  optional :: refTime
+       logical,                 intent(in),  optional :: ringing
+       logical,                 intent(in),  optional :: enabled
+       logical,                 intent(in),  optional :: sticky
+       character (len=*),       intent(in),  optional :: name
+       integer,                 intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Sets/resets one or more of the properties of an ESMF_Alarm that + was previously initialized via ESMF_AlarmCreate(). + +

+The arguments are: +

+
alarm
+
The object instance to set. + +
+
[clock]
+
Re-associates this alarm with a different clock. + +
+
[ringTime]
+
The next ring time for a one-shot alarm or a repeating (interval) + alarm. + +
+
[ringInterval]
+
The ring interval for repeating (interval) alarms. + +
+
[stopTime]
+
The stop time for repeating (interval) alarms. + +
+
[ringDuration]
+
The absolute ring duration. If not sticky (see argument below), + alarms rings for ringDuration, then turns itself off. Default is + zero (unused). Mutually exclusive with ringTimeStepCount (below); + used only if set to a non-zero duration and ringTimeStepCount is 1 + (see below). + See also ESMF_AlarmSticky(), ESMF_AlarmNotSticky(). + +
+
[ringTimeStepCount]
+
The relative ring duration. If not sticky (see argument below), + alarms rings for ringTimeStepCount, then turns itself off. + Default is 1: a non-sticky alarm will ring for one clock time step. + Mutually exclusive with ringDuration (above); used if + ringTimeStepCount > 1. If ringTimeStepCount is 1 (default) and + ringDuration is non-zero, ringDuration is used (see above), otherwise + ringTimeStepCount is used. + See also ESMF_AlarmSticky(), ESMF_AlarmNotSticky(). + +
+
[refTime]
+
The reference (i.e. base) time for an interval alarm. + +
+
[ringing]
+
Sets the ringing state. + See also ESMF_AlarmRingerOn(), ESMF_AlarmRingerOff(). + +
+
[enabled]
+
Sets the enabled state. If disabled, an alarm will not function + at all. + See also ESMF_AlarmEnable(), ESMF_AlarmDisable(). + +
+
[sticky]
+
Sets the sticky state. If sticky, once an alarm is ringing, it + will remain ringing until turned off manually via a user call to + ESMF_AlarmRingerOff(). If not sticky, an alarm will turn + itself off after a certain ring duration specified by either + ringDuration or ringTimeStepCount (see above). + There is an implicit limitation that in order to properly reverse + timestep through a ring end time in ESMF_DIRECTION_REVERSE, + that time must have already been traversed in the forward direction. + This is due to the fact that the Time Manager cannot predict when + user code will call ESMF_AlarmRingerOff(). An error message + will be logged when this limitation is not satisfied. + See also ESMF_AlarmSticky(), ESMF_AlarmNotSticky(). + +
+
[name]
+
The new name for this alarm. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+46.6.19 ESMF_AlarmSticky - Set an Alarm's sticky flag +

+ +

+ +

+
+INTERFACE: +

       subroutine ESMF_AlarmSticky(alarm, rc)
+
ARGUMENTS: +
       type(ESMF_Alarm), intent(inout)         :: alarm
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       integer,          intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Set an ESMF_Alarm's sticky flag; once alarm is ringing, + it remains ringing until ESMF_AlarmRingerOff() is called. + There is an implicit limitation that in order to properly reverse + timestep through a ring end time in ESMF_DIRECTION_REVERSE, that + time must have already been traversed in the forward direction. + This is due to the fact that an ESMF_Alarm cannot predict when + user code will call ESMF_AlarmRingerOff(). An error message + will be logged when this limitation is not satisfied. + +

+The arguments are: +

+
alarm
+
The object instance to be set sticky. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+46.6.20 ESMF_AlarmValidate - Validate an Alarm's properties +

+ +

+ +

+
+INTERFACE: +

       subroutine ESMF_AlarmValidate(alarm, rc)
+
ARGUMENTS: +
       type(ESMF_Alarm),  intent(in)            :: alarm
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       integer,           intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Performs a validation check on an ESMF_Alarm's properties. + Must have a valid ringTime, set either directly or indirectly via + ringInterval. See ESMF_AlarmCreate(). + +

+The arguments are: +

+
alarm
+
ESMF_Alarm to be validated. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+46.6.21 ESMF_AlarmWasPrevRinging - Check if Alarm was ringing on the previous Clock timestep +

+ +

+ +

+
+INTERFACE: +

       function ESMF_AlarmWasPrevRinging(alarm, rc)
+
RETURN VALUE: +
       logical :: ESMF_AlarmWasPrevRinging
+
ARGUMENTS: +
       type(ESMF_Alarm), intent(in)            :: alarm
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       integer,          intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Check if ESMF_Alarm was ringing on the previous clock timestep. + +

+See also method + ESMF_ClockGetAlarmList(clock, ESMF_ALARMLIST_PREVRINGING, ...) + get a list of all alarms belonging to a ESMF_Clock that were + ringing on the previous time step. + +

+The arguments are: +

+
alarm
+
The object instance to check for previous ringing state. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+46.6.22 ESMF_AlarmWillRingNext - Check if Alarm will ring upon the next Clock timestep +

+ +

+ +

+
+INTERFACE: +

       function ESMF_AlarmWillRingNext(alarm, timeStep, rc)
+
RETURN VALUE: +
       logical :: ESMF_AlarmWillRingNext
+
ARGUMENTS: +
       type(ESMF_Alarm),        intent(in)            :: alarm
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       type(ESMF_TimeInterval), intent(in),  optional :: timeStep
+       integer,                 intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Check if ESMF_Alarm will ring on the next clock timestep, either + the current clock timestep or a passed-in timestep. + +

+See also method + ESMF_ClockGetAlarmList(clock, ESMF_ALARMLIST_NEXTRINGING, ...) + to get a list of all alarms belonging to a ESMF_Clock that will + ring on the next time step. + +

+The arguments are: +

+
alarm
+
The alarm to check for next ringing state. + +
+
[timeStep]
+
Optional timestep to use instead of the clock's. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ + +

+47 Config Class +

+ +

+47.1 Description +

+ +

+ +

+ESMF Configuration Management is based on NASA DAO's +Inpak 90 package, a Fortran 90 collection of routines/functions +for accessing Resource Files in ASCII format.The package +is optimized for minimizing formatted I/O, performing all of its +string operations in memory using Fortran intrinsic functions. +
+

+ +

+47.1.1 Package history +

+ +

+The ESMF Configuration Management Package was evolved by +Leonid Zaslavsky and Arlindo da Silva from Ipack90 package +created by Arlindo da Silva at NASA DAO. + +

+Back in the 70's Eli Isaacson wrote IOPACK in Fortran +66. In June of 1987 Arlindo da Silva wrote Inpak77 using +Fortran 77 string functions; Inpak 77 is a vastly +simplified IOPACK, but has its own goodies not found in +IOPACK. Inpak 90 removes some obsolete functionality in +Inpak77, and parses the whole resource file in memory for +performance. + +

+ +

+47.1.2 Resource files +

+ +

+A Resource File (RF) is a text file consisting of list of + label-value pairs. There is a buffer limit of 256,000 + characters for the entire Resource File. Each label is limited + to 1,000 characters. Each label should be followed by some data, the + value. An example Resource File follows. It is the file used + in the example below. + +

+

+ # This is an example Resource File.  
+ # It contains a list of <label,value> pairs.
+ # The colon after the label is required. 
+
+ # The values after the label can be an list.
+ # Multiple types are authorized.
+  
+  my_file_names:         jan87.dat jan88.dat jan89.dat  # all strings
+  constants:             3.1415   25                    # float and integer
+  my_favorite_colors:    green blue 022               
+
+
+ # Or, the data can be a list of single value pairs. 
+ # It is simplier to retrieve data in this format:
+
+  radius_of_the_earth:   6.37E6         
+  parameter_1:           89
+  parameter_2:           78.2
+  input_file_name:       dummy_input.nc
+
+
+ # Or, the data can be located in a table using the following
+ # syntax:
+
+  my_table_name::
+   1000     3000     263.0
+    925     3000     263.0
+    850     3000     263.0
+    700     3000     269.0
+    500     3000     287.0
+    400     3000     295.8
+    300     3000     295.8
+  ::
+
+ +

+Note that the colon after the label is required and that the double colon is required + to declare tabular data. + +

+Resource files are intended for random access (except between ::'s in a + table definition). This means that order in which a particular + label-value pair is retrieved is not dependent upon the original order + of the pairs. The only exception to this, however, is when the same label appears + multiple times within the Resource File. + +

+ +

+47.2 Use and Examples +

+ +

+ +

+ +

+This example/test code performs simple Config/Resource File routines. It does not + include attaching a Config to a component. The important thing to remember there + is that you can have one Config per component. + +

+There are two methodologies for accessing data in a Resource File. This example will + demonstrate both. + +

+Note the API section contains a complete description of arguments in + the methods/functions demonstrated in this example. + +

+ +

+47.2.1 Variable declarations +

+ +

+The following are the variable declarations used as arguments in the following code + fragments. They represent the locals names for the variables listed in the Resource + File (RF). Note they do not need to be the same. +

+

+      character(ESMF_MAXPATHLEN) :: fname ! config file name
+      character(ESMF_MAXPATHLEN) :: fn1, fn2, fn3, input_file ! strings to be read in
+      integer       :: rc            ! error return code (0 is OK)
+      integer       :: i_n           ! the first constant in the RF
+      real          :: param_1       ! the second constant in the RF
+      real          :: radius        ! radius of the earth
+      real          :: table(7,3)    ! an array to hold the table in the RF
+
+      type(ESMF_Config)   :: cf      ! the Config itself
+      type(ESMF_HConfig)  :: hconfig ! HConfig variable
+
+ +

+ +

+47.2.2 Creation of a Config +

+ +

+While there are two methodologies for accessing the data within a Resource File, + there is only one way to create the initial Config and load its ASCII text into + memory. This is the first step in the process. + +

+Note that subsequent calls to ESMF_ConfigLoadFile will OVERWRITE the current + Config NOT append to it. There is no means of appending to a Config. + +

+

+      cf = ESMF_ConfigCreate(rc=rc)             ! Create the empty Config
+
+ +

+

+      fname = "myResourceFile.rc"                ! Name the Resource File
+      call ESMF_ConfigLoadFile(cf, fname, rc=rc) ! Load the Resource File 
+                                                 ! into the empty Config
+
+ +

+ +

+47.2.3 How to retrieve a label with a single value +

+ The first method for retrieving information from the + Resource File takes advantage of the <label,value> relationship + within the file and access the data in a dictionary-like manner. This is the + simplest methodology, but it does imply the use of only one value per label + in the Resource File. + +

+Remember, + that the order in which a particular label/value pair is retrieved + is not dependent upon the order which they exist within the Resource File. +

+

+    call ESMF_ConfigGetAttribute(cf, radius, label='radius_of_the_earth:', &
+                                 default=1.0, rc=rc)
+
+ +

+Note that the colon must be included in the label string when using this + methodology. It is also important to provide a default value in case the label + does not exist in the file + +

+This methodology works for all types. The following is an example of retrieving a + string: +

+

+    call ESMF_ConfigGetAttribute(cf, input_file, label='input_file_name:', &
+                                 default="./default.nc", rc=rc)
+
+ +

+The same code fragment can be used to demonstrate what happens when the label is not + present. Note that "file_name" does not exist in the Resource File. The result of + its absence is the default value provided in the call. +

+

+    call ESMF_ConfigGetAttribute(cf, input_file, label='file_name:', &
+                                 default="./default.nc", rc=rc)
+
+ +

+ +

+47.2.4 How to retrieve a label with multiple values +

+ When there are multiple, mixed-typed values associated with a label, the + values can be retrieved in two steps: 1) Use ESMF_ConfigFindLabel() + to find the label in the Config class; 2) use + ESMF_ConfigGetAttribute() without the optional 'label' argument to + retrieve the values one at a time, reading from left to right in + the record. + +

+A second reminder that the order in which a particular label/value pair is + retrieved is not dependent upon the order which they exist within the + Resource File. The label used in this method allows the user to skip to + any point in the file. +

+

+      call ESMF_ConfigFindLabel(cf, 'constants:', rc=rc) ! Step a) Find the 
+                                                         ! label
+
+ +

+Two constants, radius and i_n, can now be retrieved without having to specify their + label or use an array. They are also different types. +

+

+      call ESMF_ConfigGetAttribute(cf, param_1, rc=rc) ! Step b) read in the 
+                                                       ! first constant in 
+                                                       ! the sequence
+      call ESMF_ConfigGetAttribute(cf, i_n, rc=rc)     ! Step c) read in the 
+                                                       ! second constant in 
+                                                       ! the sequence
+
+ +

+This methodology also works with strings. +

+

+       call ESMF_ConfigFindLabel(cf, 'my_file_names:', &
+               rc=rc)                       ! Step a) find the label
+
+ +

+

+       call ESMF_ConfigGetAttribute(cf, fn1, &
+                 rc=rc)                    ! Step b) retrieve the 1st filename
+       call ESMF_ConfigGetAttribute(cf, fn2, &
+                 rc=rc)                    ! Step c) retrieve the 2nd filename
+       call ESMF_ConfigGetAttribute(cf, fn3, &
+                 rc=rc)                    ! Step d) retrieve the 3rd filename
+
+ +

+ +

+47.2.5 How to retrieve a table +

+ +

+To access tabular data, the user must use the multi-value method. +

+

+      call ESMF_ConfigFindLabel(cf, 'my_table_name::', &
+               rc=rc)        ! Step a) Set the label location to the 
+                             ! beginning of the table
+
+ +

+Subsequently, call ESMF_ConfigNextLine() is used to move the location + to the next row of the table. The example table in the Resource File contains + 7 rows and 3 columns (7,3). +

+

+      do i = 1, 7
+        call ESMF_ConfigNextLine(cf, rc=rc) ! Step b) Increment the rows
+        do j = 1, 3                         ! Step c) Fill in the table 
+          call ESMF_ConfigGetAttribute(cf, table(i,j), rc=rc)
+        enddo
+      enddo
+
+ +

+ +

+47.2.6 Destruction of a Config +

+ +

+The work with the Config object cf is finalized by callling + ESMF_ConfigDestroy(). +

+

+      call ESMF_ConfigDestroy(cf, rc=rc) ! Destroy the Config object
+
+ +

+ +

+47.2.7 Loading a YAML file +

+ +

+The Config class supports loading of YAML files. As before, an empty Config + object is created with ESMF_ConfigCreate() and then populated via the + ESMF_ConfigLoadFile() method. +

+

+      cf = ESMF_ConfigCreate(rc=rc)          ! Create the empty Config object
+
+ +

+Files ending in .yaml, .yml, or any combination of upper and lower + case letters that can be mapped to these two options, are interpreted as YAML + files. All other names are interpreted as classic Config RFs as + documented earlier. +

+

+      call ESMF_ConfigLoadFile(cf, "myResourceFile.yaml", & ! Load the YAML File
+        rc=rc)                                    ! into the empty Config object
+
+ +

+Here the myResourceFile.yaml contains a YAML version of the previously + used myResourceFile.rc file contents: + +

+

+  # YAML representation of the myResourceFile.rc RF
+  
+  # mapping to sequences
+  
+  my_file_names:      [jan87.dat, jan88.dat, jan89.dat]  # all strings
+  constants:          [3.1415, 25]                       # float and integer
+  my_favorite_colors: [green, blue, 022]
+  
+  # mapping to scalars
+  
+  radius_of_the_earth:   6.37E6
+  parameter_1:           89
+  parameter_2:           78.2
+  input_file_name:       dummy_input.nc
+  
+  # represent table as mapping to sequence of sequences
+  
+  my_table_name:
+  - [1000,    3000,    263.0]
+  - [ 925,    3000,    263.0]
+  - [ 850,    3000,    263.0]
+  - [ 700,    3000,    269.0]
+  - [ 500,    3000,    287.0]
+  - [ 400,    3000,    295.8]
+  - [ 300,    3000,    295.8]
+
+ +

+Notice that YAML support is limited to a small subset of the full YAML + language specification, allowing access through the classic Config API. + Specifically, the top level in the YAML file is expected to be a mapping + (dictionary) of scalar keys to any of the following three value options: + +

    +
  • Scalars +
  • +
  • List of scalars +
  • +
  • List of lists of scalars + +
  • +
+ All other YAML constructs are silently ignored when loaded through this + interface. Constructs successfully ingested become available in the + cf object, and can be accessed via the regular ESMF_Config + methods as outlined in the previous sections. + +

+As an example, access the my_table_name element: +

+

+      call ESMF_ConfigFindLabel(cf, 'my_table_name::', &
+               rc=rc)        ! Step a) Set the label location to the 
+                             ! beginning of the table
+
+ +

+When done, the resources held by the Config object are released by calling + the ESMF_ConfigDestroy() method. +

+

+      call ESMF_ConfigDestroy(cf, rc=rc) ! Destroy the Config object
+
+ +

+ +

+47.2.8 Creating from HConfig object +

+ +

+The Config class supports creating a Config object from a HConfig object. + Here the HConfig object is created from the same YAML file as used before. +

+

+      ! Create HConfig object
+      hconfig = ESMF_HConfigCreate(filename="myResourceFile.yaml", rc=rc)
+
+ +

+The myResourceFile.yaml contains the following YAML contents: + +

+

+  # YAML representation of the myResourceFile.rc RF
+  
+  # mapping to sequences
+  
+  my_file_names:      [jan87.dat, jan88.dat, jan89.dat]  # all strings
+  constants:          [3.1415, 25]                       # float and integer
+  my_favorite_colors: [green, blue, 022]
+  
+  # mapping to scalars
+  
+  radius_of_the_earth:   6.37E6
+  parameter_1:           89
+  parameter_2:           78.2
+  input_file_name:       dummy_input.nc
+  
+  # represent table as mapping to sequence of sequences
+  
+  my_table_name:
+  - [1000,    3000,    263.0]
+  - [ 925,    3000,    263.0]
+  - [ 850,    3000,    263.0]
+  - [ 700,    3000,    269.0]
+  - [ 500,    3000,    287.0]
+  - [ 400,    3000,    295.8]
+  - [ 300,    3000,    295.8]
+
+ +

+A Config object can be created from the HConfig object simply by passing + hconfig into ESMF_CreateConfig() as argument. +

+

+      ! Create Config object from HConfig
+      cf = ESMF_ConfigCreate(hconfig=hconfig, rc=rc)
+
+ +

+Notice that cf uses the specified hconfig object via reference. + It remains the callers responsibility to destroy the hconfig object + when finished. Care must be taken to not destroy until access via + cf is complete. + +

+Here, as an example, access the my_table_name element: +

+

+      call ESMF_ConfigFindLabel(cf, 'my_table_name::', &
+               rc=rc)        ! Step a) Set the label location to the 
+                             ! beginning of the table
+
+ +

+

+      call ESMF_ConfigDestroy(cf, rc=rc) ! Destroy the Config object
+
+ +

+As discussed above, the hconfig object requires its own destroy call + for a complete release. +

+

+      call ESMF_HConfigDestroy(hconfig, rc=rc) ! Destroy the HConfig object
+
+ +

+ + +

+47.3 Class API +

+ +

+ +

+ +

+ +

+47.3.1 ESMF_ConfigAssignment(=) - Config assignment +

+ +

+ +

+
+INTERFACE: +

     interface assignment(=)
+     config1 = config2
+
ARGUMENTS: +
     type(ESMF_Config) :: config1
+     type(ESMF_Config) :: config2
+
+DESCRIPTION: +
+ +

+Assign config1 as an alias to the same ESMF_Config object in memory + as config2. If config2 is invalid, then config1 will be + equally invalid after the assignment. + +

+The arguments are: +

+
config1
+
The ESMF_Config object on the left hand side of the assignment. + +
+
config2
+
The ESMF_Config object on the right hand side of the assignment. + +
+
+ +

+ +

+ +

+47.3.2 ESMF_ConfigOperator(==) - Test if Config objects are equivalent +

+ +

+ +

+
+INTERFACE: +

       interface operator(==)
+       if (config1 == config2) then ... endif
+                    OR
+       result = (config1 == config2)
+
RETURN VALUE: +
       configical :: result
+
ARGUMENTS: +
       type(ESMF_Config), intent(in) :: config1
+       type(ESMF_Config), intent(in) :: config2
+
+DESCRIPTION: +
+ +

+Overloads the (==) operator for the ESMF_Config class. + Compare two configs for equality; return .true. if equal, + .false. otherwise. Comparison is based on whether the objects + are distinct, as with two newly created objects, or are simply aliases + to the same object as would be the case when assignment was involved. + +

+The arguments are: +

+
config1
+
The ESMF_Config object on the left hand side of the equality + operation. + +
+
config2
+
The ESMF_Config object on the right hand side of the equality + operation. + +
+
+ +

+ +

+ +

+47.3.3 ESMF_ConfigOperator(/=) - Test if Config objects are not equivalent +

+ +

+ +

+
+INTERFACE: +

       interface operator(/=)
+       if (config1 /= config2) then ... endif
+                    OR
+       result = (config1 /= config2)
+
RETURN VALUE: +
       configical :: result
+
ARGUMENTS: +
       type(ESMF_Config), intent(in) :: config1
+       type(ESMF_Config), intent(in) :: config2
+
+DESCRIPTION: +
+ +

+Overloads the (/=) operator for the ESMF_Config class. + Compare two configs for equality; return .true. if not equivalent, + .false. otherwise. Comparison is based on whether the Config objects + are distinct, as with two newly created objects, or are simply aliases + to the same object as would be the case when assignment was involved. + +

+The arguments are: +

+
config1
+
The ESMF_Config object on the left hand side of the equality + operation. + +
+
config2
+
The ESMF_Config object on the right hand side of the equality + operation. + +
+
+ +

+ +

+ +

+47.3.4 ESMF_ConfigCreate - Instantiate a Config object +

+ +

+ +

+
+INTERFACE: +

     ! Private name; call using ESMF_ConfigCreate()
+     type(ESMF_Config) function ESMF_ConfigCreateDefault(hconfig, rc)
+
ARGUMENTS: +
 -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       type(ESMF_HConfig), intent(in),  optional   :: hconfig
+       integer,            intent(out), optional   :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    8.6.0
    +
    Added the hconfig argument to support creation from HConfig + object. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Instantiates an ESMF_Config object. Optionally create from HConfig. + +

+The arguments are: +

+
[hconfig]
+
If specified, create Config from HConfig. By default create an empty + Config object. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+47.3.5 ESMF_ConfigCreate - Instantiate a new Config object from a Config section +

+ +

+ +

+
+INTERFACE: +

     ! Private name; call using ESMF_ConfigCreate()
+     type(ESMF_Config) function ESMF_ConfigCreateFromSection(config, &
+       openlabel, closelabel, rc)
+
ARGUMENTS: +
       type(ESMF_Config)             :: config
+       character(len=*),  intent(in) :: openlabel, closelabel
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       integer,intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Instantiates an ESMF_Config object from a section of an existing + ESMF_Config object delimited by openlabel and closelabel. + An error is returned if neither of the input labels is found in input + config. + +

+Note that a section is intended as the content of a given ESMF_Config + object delimited by two distinct labels. Such content, as well as each of the + surrounding labels, are still within the scope of the parent ESMF_Config + object. Therefore, including in a section labels used outside that + section should be done carefully to prevent parsing conflicts. + +

+The arguments are: +

+
config
+
The input ESMF_Config object. + +
+
openlabel
+
Label marking the beginning of a section in config. + +
+
closelabel
+
Label marking the end of a section in config. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if a section is found + and a new ESMF_Config object returned. + +
+
+ +

+ +

+ +

+47.3.6 ESMF_ConfigDestroy - Destroy a Config object +

+ +

+ +

+
+INTERFACE: +

     subroutine ESMF_ConfigDestroy(config, rc)
+
ARGUMENTS: +
       type(ESMF_Config), intent(inout)          :: config
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       integer,           intent(out),  optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Destroys the config object. + +

+The arguments are: +

+
config
+
Already created ESMF_Config object. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+47.3.7 ESMF_ConfigFindLabel - Find a label in a Config object +

+ +

+ +

+
+INTERFACE: +

     subroutine ESMF_ConfigFindLabel(config, label, isPresent, rc)
+
ARGUMENTS: +
       type(ESMF_Config), intent(inout)           :: config 
+       character(len=*),  intent(in)              :: label
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       logical,           intent(out),  optional  :: isPresent
+       integer,           intent(out),  optional  :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    6.1.0
    +
    Added the isPresent argument. Allows detection of + end-of-line condition to be separate from the rc. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Finds the label (key) string in the config object + starting from the beginning of its content. + +

+Since the search is done by looking for a string, possibly multi-worded, + in the whole Config object, it is important to use special + conventions to distinguish labels from other words. This is done + in the Resource File by using the NASA/DAO convention to finish + line labels with a colon (:) and table labels with a double colon (::). + +

+The arguments are: +

+
config
+
Already created ESMF_Config object. + +
+
label
+
Identifying label. + +
+
[isPresent]
+
Set to .true. if the item is found. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + If the label is not found, and the isPresent argument is + not present, an error is returned. + +
+
+ +

+ +

+ +

+47.3.8 ESMF_ConfigFindNextLabel - Find a label in Config object starting from current position +

+ +

+ +

+
+INTERFACE: +

     subroutine ESMF_ConfigFindNextLabel(config, label, isPresent, rc)
+
ARGUMENTS: +
       type(ESMF_Config), intent(inout)           :: config
+       character(len=*),  intent(in)              :: label
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       logical,           intent(out),  optional  :: isPresent
+       integer,           intent(out),  optional  :: rc
+
+DESCRIPTION: +
+ +

+Finds the label (key) string in the config object, + starting from the current position pointer. + +

+This method is equivalent to ESMF_ConfigFindLabel, but the search + is performed starting from the current position pointer. + +

+The arguments are: +

+
config
+
Already created ESMF_Config object. + +
+
label
+
Identifying label. + +
+
[isPresent]
+
Set to .true. if the item is found. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + If the label is not found, and the isPresent argument is + not present, an error is returned. + +
+
+ +

+ +

+ +

+47.3.9 ESMF_ConfigGet - Generic accessor method +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_ConfigGet(config, hconfig, rc)
+
ARGUMENTS: +
     type(ESMF_Config),  intent(inout)          :: config
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     type(ESMF_HConfig), intent(out),  optional :: hconfig
+     integer,            intent(out),  optional :: rc
+
+DESCRIPTION: +
+ +

+Access Config internals. + +

+The arguments are: +

+
config
+
Already created ESMF_Config object. + +
+
[hconfig]
+
Internally kept ESMF_HConfig object. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+47.3.10 ESMF_ConfigGetAttribute - Get an attribute value from Config object +

+ +

+ +

+
+INTERFACE: +

        subroutine ESMF_ConfigGetAttribute(config, <value>, &
+          label, default, rc)
+
ARGUMENTS: +
        type(ESMF_Config), intent(inout)         :: config
+        <value argument>, see below for supported values
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+        character(len=*),  intent(in),  optional :: label
+        character(len=*),  intent(in),  optional :: default
+        integer,           intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Gets a value from the config object. When the + value is a sequence of characters + it will be terminated by the first white space. + +

+Supported values for <value argument> are: +

+
+
character(len=*), intent(out) :: value + +
+
+
real(ESMF_KIND_R4), intent(out) :: value + +
+
+
real(ESMF_KIND_R8), intent(out) :: value + +
+
+
integer(ESMF_KIND_I4), intent(out) :: value + +
+
+
integer(ESMF_KIND_I8), intent(out) :: value + +
+
+
logical, intent(out) :: value + +
+
+ +

+The arguments are: +

+
config
+
Already created ESMF_Config object. + +
+
<value argument>
+
Returned value. + +
+
[label]
+
Identifing label. + +
+
[default]
+
Default value if label is not found in config object. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+47.3.11 ESMF_ConfigGetAttribute - Get a list of attribute values from Config object +

+ +

+ +

+
+INTERFACE: +

        subroutine ESMF_ConfigGetAttribute(config, <value list argument>, &
+          count, label, default, rc)
+
ARGUMENTS: +
        type(ESMF_Config), intent(inout)         :: config
+        <value list argument>, see below for values
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+        integer,           intent(in)   optional :: count
+        character(len=*),  intent(in),  optional :: label
+        character(len=*),  intent(in),  optional :: default
+        integer,           intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Gets a list of values from the config object. + +

+Supported values for <value list argument> are: +

+
+
character(len=*), intent(out) :: valueList(:) + +
+
+
real(ESMF_KIND_R4), intent(inout) :: valueList(:) + +
+
+
real(ESMF_KIND_R8), intent(inout) :: valueList(:) + +
+
+
integer(ESMF_KIND_I4), intent(inout) :: valueList(:) + +
+
+
integer(ESMF_KIND_I8), intent(inout) :: valueList(:) + +
+
+
logical, intent(inout) :: valueList(:) + +
+
+ +

+The arguments are: +

+
config
+
Already created ESMF_Config object. + +
+
<value list argument>
+
Returned value. + +
+
count
+
Number of returned values expected. + +
+
[label]
+
Identifing label. + +
+
[default]
+
Default value if label is not found in config object. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+47.3.12 ESMF_ConfigGetChar - Get a character attribute value from Config object +

+ +

+ +

+
+INTERFACE: +

       subroutine ESMF_ConfigGetChar(config, value, &
+         label, default, rc)
+
ARGUMENTS: +
       type(ESMF_Config), intent(inout)         :: config
+       character,         intent(out)           :: value
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       character(len=*),  intent(in),  optional :: label
+       character,         intent(in),  optional :: default
+       integer,           intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Gets a character value from the config object. + +

+The arguments are: +

+
config
+
Already created ESMF_Config object. + +
+
value
+
Returned value. + +
+
[label]
+
Identifying label. + +
+
[default]
+
Default value if label is not found in configuration object. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+47.3.13 ESMF_ConfigGetDim - Get table sizes from Config object +

+ +

+ +

+
+INTERFACE: +

     subroutine ESMF_ConfigGetDim(config, lineCount, columnCount, &
+       label, rc)
+
ARGUMENTS: +
       type(ESMF_Config), intent(inout)         :: config
+       integer,           intent(out)           :: lineCount
+       integer,           intent(out)           :: columnCount
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       character(len=*),  intent(in),  optional :: label
+       integer,           intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Returns the number of lines in the table in lineCount and + the maximum number of words in a table line in columnCount. + +

+After the call, the line pointer is positioned to the end of the table. + To reset it to the beginning of the table, use ESMF_ConfigFindLabel. + +

+The arguments are: +

+
config
+
Already created ESMF_Config object. + +
+
lineCount
+
Returned number of lines in the table. + +
+
columnCount
+
Returned maximum number of words in a table line. + +
+
[label]
+
Identifying label (if present), otherwise current line. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+47.3.14 ESMF_ConfigGetLen - Get the length of the line in words from Config object +

+ +

+ +

+
+INTERFACE: +

     integer function ESMF_ConfigGetLen(config, label, rc)
+
ARGUMENTS: +
       type(ESMF_Config), intent(inout)          :: config 
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       character(len=*),  intent(in),   optional :: label
+       integer,           intent(out),  optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Gets the length of the line in words by counting words + disregarding types. Returns the word count as an integer. + +

+The arguments are: +

+
config
+
Already created ESMF_Config object. + +
+
[label]
+
Identifying label. If not specified, use the current line. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+47.3.15 ESMF_ConfigIsCreated - Check whether a Config object has been created +

+ +

+ +

+
+INTERFACE: +

   function ESMF_ConfigIsCreated(config, rc)
+
RETURN VALUE: +
     logical :: ESMF_ConfigIsCreated
+
ARGUMENTS: +
     type(ESMF_Config), intent(in)            :: config
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,           intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Return .true. if the config has been created. Otherwise return + .false.. If an error occurs, i.e. rc /= ESMF_SUCCESS is + returned, the return value of the function will also be .false.. + +

+The arguments are: +

+
config
+
ESMF_Config queried. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+47.3.16 ESMF_ConfigLoadFile - Load resource file into Config object memory +

+ +

+ +

+
+INTERFACE: +

     subroutine ESMF_ConfigLoadFile(config, filename, &
+       delayout, & ! DEPRECATED ARGUMENT
+       unique, rc)
+
ARGUMENTS: +
       type(ESMF_Config),   intent(inout)         :: config
+       character(len=*),    intent(in)            :: filename
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       type(ESMF_DELayout), intent(in),  optional :: delayout  ! DEPRECATED ARGUMENT
+       logical,             intent(in),  optional :: unique
+       integer,             intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    8.5.0
    +
    Added support for loading basic YAML files. +
    +Marked argument delayout as deprecated. This argument was + never used internally, and it is unclear what the original intention was. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+The resource file named filename is loaded into memory. Both the + classic Config file format, described in this document, and the YAML file + format are supported. YAML support is limited to a small subset of the full + YAML language specification, allowing access through the classic Config API. + Specifically, in YAML mode, the top level is expected to be a mapping + (dictionary) of scalar keys to the following value options: + +

    +
  • Scalars +
  • +
  • List of scalars +
  • +
  • List of lists of scalars + +
  • +
+ All other YAML constructs are silently ignored when loaded through this + interface. Constructs successfully ingested become available in the + config object, and can be accessed via the regular ESMF_Config + methods. + +

+The arguments are: +

+
config
+
Already created ESMF_Config object. + +
+
filename
+
Name of the configuration file. Files ending in .yaml, .yml, + or any combination of upper and lower case letters that can be mapped + to these two options, are interpreted as YAML files. All other names + are interpreted as classic Config files. + +
+
[delayout]
+
! DEPRECATED ARGUMENT + ESMF_DELayout associated with this config object. + This argument is not currently used. + +
+
[unique]
+
If specified as true, uniqueness of labels are checked and + error code set if duplicates found. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+47.3.17 ESMF_ConfigLog - Write content of Config object to log +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_ConfigLog(config, raw, prefix, logMsgFlag, &
+     log, rc)
+
ARGUMENTS: +
     type(ESMF_Config),      intent(in)              :: config
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     logical,                intent(in),    optional :: raw
+     character (len=*),      intent(in),    optional :: prefix
+     type(ESMF_LogMsg_Flag), intent(in),    optional :: logMsgFlag
+     type(ESMF_Log),         intent(inout), optional :: log
+     integer,                intent(out),   optional :: rc
+
+DESCRIPTION: +
+ +

+Write content of ESMF_Config object to ESMF log. + +

+The arguments are: +

+
config
+
The ESMF_Config object to be logged. + +
+
[raw]
+
For .true. output the internal buffer as is, for .false. + output in the interpreted format. The default is .false.. + +
+
[prefix]
+
String to prefix the memory info message. Default is no prefix. + +
+
[logMsgFlag]
+
Type of log message generated. See section 49.2.3 for + a list of valid message types. Default is ESMF_LOGMSG_INFO. + +
+
[log]
+
ESMF_Log object that can be used instead of the default Log. + Default is to use the default log. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+47.3.18 ESMF_ConfigNextLine - Find next line in a Config object +

+ +

+ +

+
+INTERFACE: +

     subroutine ESMF_ConfigNextLine(config, tableEnd, rc)
+
ARGUMENTS: +
       type(ESMF_Config), intent(inout)          :: config 
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       logical,           intent(out),  optional :: tableEnd
+       integer,           intent(out),  optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Selects the next line (for tables). + +

+The arguments are: +

+
config
+
Already created ESMF_Config object. + +
+
[tableEnd]
+
Returns .true. if end of table mark (::) is encountered. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+47.3.19 ESMF_ConfigPrint - Write content of Config object to unit +

+ +

+ +

+
+INTERFACE: +

     subroutine ESMF_ConfigPrint(config, unit, rc)
+
ARGUMENTS: +
       type(ESMF_Config), intent(in)  :: config
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       integer, optional, intent(in)  :: unit
+       integer, optional, intent(out) :: rc
+
+DESCRIPTION: +
+ +

+Write content of input ESMF_Config object to unit unit. + If unit not provided, writes to standard output. + +

+The arguments are: +

+
config
+
The input ESMF_Config object. + +
+
[unit]
+
Output unit. Defaults to stdout. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+47.3.20 ESMF_ConfigSetAttribute - Set a value in Config object +

+ +

+ +

+
+INTERFACE: +

       subroutine ESMF_ConfigSetAttribute(config, <value argument>, &
+         label, rc)
+
ARGUMENTS: +
       type(ESMF_Config), intent(inout)           :: config
+       <value argument>, see below for supported values
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       character(len=*),  intent(in),   optional  :: label
+       integer,           intent(out),  optional  :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Sets a value in the config object. + +

+Supported values for <value argument> are: +

+
+
character(len=*), intent(in) :: value + +
+
+
integer(ESMF_KIND_I4), intent(in) :: value + +
+
+ +

+The arguments are: +

+
config
+
Already created ESMF_Config object. + +
+
<value argument>
+
Value to set. + +
+
[label]
+
Identifying attribute label. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+47.3.21 ESMF_ConfigValidate - Validate a Config object +

+ +

+ +

+
+INTERFACE: +

     subroutine ESMF_ConfigValidate(config, &
+       options, rc)
+
ARGUMENTS: +
       type(ESMF_Config), intent(inout)          :: config 
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       character (len=*), intent(in),   optional :: options
+       integer,           intent(out),  optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Checks whether a config object is valid. + +

+The arguments are: +

+
config
+
ESMF_Config object to be validated. + +
+
[options]
+
If none specified: simply check that the buffer is not full and the + pointers are within range. + "unusedAttributes" - Report to the default logfile all attributes not + retrieved via a call to ESMF_ConfigGetAttribute() or + ESMF_ConfigGetChar(). The attribute name (label) will be + logged via ESMF_LogErr with the WARNING log message type. + For an array-valued attribute, retrieving at least one value via + ESMF_ConfigGetAttribute() or ESMF_ConfigGetChar() + constitutes being "used." + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + Equals ESMF_RC_ATTR_UNUSED if any unused attributes are found + with option "unusedAttributes" above. + +
+
+ +

+ + +

+48 HConfig Class +

+ +

+48.1 Description +

+ +

+ +

+The ESMF HConfig class implements a hierarchical configuration facility that is +compatible with YAML Ain't Markup Language (YAMLTM). ESMF HConfig +can be understood as a Fortran interface to YAML. However, no claim is made that +all YAML language features are supported in their entirety. + +

+The purpose of the HConfig class under ESMF is to provide a migration path +toward more standard configuration management for ESMF applications. To this end +ESMF_HConfig integrates with the traditional ESMF_Config class. Through this +integration the traditional Config class API offers basic access to YAML +configuration files, in addition to providing backward compatible support of the +traditional config file format. This is discussed in more detail in the Config +class section. For more complete YAML support, applications are encouraged to +migrate to the HConfig API discussed in this section. + +

+48.2 Constants +

+ +

+ +

+ +
+48.2.1 ESMF_HCONFIGMATCH +

+ +

+DESCRIPTION: +
+Indicates the level to which two HConfig variables match. + +

+The type of this flag is: + +

+type(ESMF_HConfigMatch_Flag) + +

+The valid values in ascending order are: +

+
ESMF_HCONFIGMATCH_INVALID:
+
Indicates a non-valid matching level. One + or both HConfig objects are invalid. +
+
ESMF_HCONFIGMATCH_NONE:
+
The lowest valid level of HConfig matching. + This indicates that the HConfig objects are valid, but their YAML + representation does not match. +
+
ESMF_HCONFIGMATCH_EXACT:
+
There is an exact match between the YAML + representation of both HConfig objects. They may or may not be aliases to + the same object in memory. +
+
ESMF_HCONFIGMATCH_ALIAS:
+
Both HConfig variables are aliases to the + exact same HConfig object in memory. +
+
+ +

+48.3 Use and Examples +

+ +

+The following examples demonstrate how a user typically interacts with the +HConfig API. The HConfig class introduces two derived types: + +

    +
  • ESMF_HConfig +
  • +
  • ESMF_HConfigIter +
  • +
+ +

+ESMF_HConfig objects can be created explicitly by the user, or they +can be accessed from an existing ESMF_Config object, e.g. queried from +a Component. They can play a number of roles when interacting with +a HConfig hierarchy: + +

+ +

    +
  1. The root node of the entire hierarchy. In YAML terminology, this +refers to a document. +
  2. +
  3. Any node within the hierarchy. +
  4. +
  5. Collection of hierarchies, i.e. a set of YAML documents. +
  6. +
+ +

+ESMF_HConfigIter objects are iterators, referencing a specific +node within the hierarchy. They are created from ESMF_HConfig objects. +The iterator approach allows convenient sequential traversal of a particular +location in the HConfig hierarchy. There are two flavors of iterators in +HConfig: sequence and map iterators. +Both are represented by the same ESMF_HConfigIter derived type, and the +distinction is made at run-time. + +

+Notice that there are redundancies built into the HConfig API, where different +ways are available to achieve the same goal. This is mostly done for +convenience, allowing the user to pick the approach most suitable to their +needs. + +

+For instance, while it can be convenient to use iterators in some cases, in +others, it might be more appropriate to access elements directly by index +(for sequences) or key (for maps). Both options are available. + +

+ +

+ +

+ +

+ +

+48.3.1 Create an empty HConfig object +

+ +

+By default, ESMF_HConfigCreate() creates an empty HConfig object. +

+

+  ! type(ESMF_HConfig) :: hconfig
+  hconfig = ESMF_HConfigCreate(rc=rc)
+
+ +

+ +

+48.3.2 Set HConfig from string using YAML syntax +

+ +

+An empty HConfig object can be set directly from a string using YAML + syntax. +

+

+  call ESMF_HConfigSet(hconfig, content="[1, 2, 3, abc, b, TRUE]", rc=rc)
+
+ +

+This sets hconfig as a sequence of six scalar members. + +

+ +

+48.3.3 Iterator based HConfig sequence parsing +

+ +

+One way to parse the elements contained in hconfig is to use the + iterator pattern known from laguages such as C++ or Python. HConfig + iterators are implemented as type(ESMF_HConfigIter) objects that + are initialized using one of the HConfigIter*() methods. An iterator + can then be used to traverse the elements in a sequence or map + by calling the ESMF_HConfigIterNext() method, taking one step forward + each time the method is called. + +

+Being a HConfig object, an iterator can be passed into any of the usual + HConfig methods. The operation is applied to the element that the iterator is + currently referencing. + +

+Notice that iterators are merely references, not associated with their own + deep allocation. This is reflected in the fact that iterators are + not created by an assignment that has a Create() call on the right + hand side. As such, HConfig iterators need not be destroyed + explicitly when done. + +

+Two special HConfig iterators are defined, referencing the beginning and + the end of a HConfig sequence or map object. +

+

+  ! type(ESMF_HConfigIter) :: hconfigIterBegin, hconfigIterEnd
+  hconfigIterBegin = ESMF_HConfigIterBegin(hconfig, rc=rc)
+
+ +

+

+  hconfigIterEnd = ESMF_HConfigIterEnd(hconfig, rc=rc)
+
+ +

+In analogy to the C++ iterator pattern, hconfigIterBegin points to the + first element in hconfig, while hconfigIterEnd points one step + beyond the last element. Using these elements together, an iterator loop + can be written in the following intuitive way, using hconfigIter as the + loop variable. +

+

+  ! type(ESMF_HConfigIter) :: hconfigIter
+  hconfigIter = hconfigIterBegin
+  do while (hconfigIter /= hconfigIterEnd)
+
+    ! Code here that uses hconfigIter
+    ! to access the currently referenced
+    ! element in hconfig.  .......
+
+    call ESMF_HConfigIterNext(hconfigIter, rc=rc)
+
+ +

+

+  enddo
+
+ +

+One major concern with the above iterator loop implementation is when + Fortran cycle statements are introduced. In orde to make the above loop + cycle-safe, each such cycle statement needs to be matched with + its own call to ESMF_HConfigIterNext(). This needs to be done to + prevent endless-loop conditions, where the exit condition of the + do while is never reached. + +

+The cycle-safe alternative implementation of the iterator loop + leverages the ESMF_HConfigIterLoop() function instead of + ESMF_HConfigIterNext(). This approach is more akin to the + C++ +

+     for (element : container){
+       ...
+     }
+
+ or the Python +
+     for element in container:
+       ...
+
+ approach. It is the preferable way to write HConfig iterator loops due to its + simplicity and inherent cycle-safety. + +

+The ESMF_HConfigIterLoop() function takes three required arguments. + The first is the loop iterator, followed by the begin and end iterators. The + loop iterator must enter equal to the begin iterator at the start of the loop. + Each time the ESMF_HConfigIterLoop() function is called, the loop + iterator is stepped forward as appropriate, and the exit condition of having + reached the end iterator is checked. Having both the stepping and exit logic + in one place provided by the HConfig API simplifies the usage. In addition, + the approach is cycle-safe: no matter where a cycle statement is + inserted in the loop body, it always brings the execution back to the top of + the while loop, which in turn calls the ESMF_HConfigIterLoop() + function. +

+

+  ! type(ESMF_HConfigIter) :: hconfigIter
+  hconfigIter = hconfigIterBegin
+  do while (ESMF_HConfigIterLoop(hconfigIter, hconfigIterBegin, hconfigIterEnd, rc=rc))
+
+ +

+

+    ! Check whether the current element is a scalar.
+    ! logical :: isScalar
+    isScalar = ESMF_HConfigIsScalar(hconfigIter, rc=rc)
+
+ +

+

+    if (isScalar) then
+
+      ! Any scalar can be accessed as a string.
+      ! character(len=:), allocatable :: string
+      string = ESMF_HConfigAsString(hconfigIter, rc=rc)
+
+ +

+

+      ! The attempt can be made to interpret the scalar as any of the other
+      ! supported data types. By default, if the scalar cannot be interpreted
+      ! as the requested data type, rc /= ESMF_SUCCESS is returned. To prevent
+      ! such error condition, the optional, intent(out) argument "asOkay" can
+      ! be provided. If asOkay == .true. is returned, the interpretation was
+      ! successful. Otherwise asOkay == .false. is returned.
+
+      ! logical :: asOkay
+
+      ! integer(ESMF_KIND_I4) :: valueI4
+      valueI4 = ESMF_HConfigAsI4(hconfigIter, asOkay=asOkay, rc=rc)
+
+ +

+

+      ! integer(ESMF_KIND_I8) :: valueI8
+      valueI8 = ESMF_HConfigAsI8(hconfigIter, asOkay=asOkay, rc=rc)
+
+ +

+

+      ! real(ESMF_KIND_R4) :: valueR4
+      valueR4 = ESMF_HConfigAsR4(hconfigIter, asOkay=asOkay, rc=rc)
+
+ +

+

+      ! real(ESMF_KIND_R8) :: valueR8
+      valueR8 = ESMF_HConfigAsR8(hconfigIter, asOkay=asOkay, rc=rc)
+
+ +

+

+      ! logical :: valueL
+      valueL = ESMF_HConfigAsLogical(hconfigIter, asOkay=asOkay, rc=rc)
+
+ +

+

+    else
+      ! Possible recursive iteration over the current hconfigIter element.
+    endif
+
+  enddo
+
+ +

+ +

+48.3.4 Index based random access HConfig sequence parsing +

+ +

+An alternative way to loop over the elements contained in hconfig, + and parsing them, is to use an index variable. For this approach the + size of hconfig is queried. +

+

+  ! integer :: size
+  size = ESMF_HConfigGetSize(hconfig, rc=rc)
+
+ +

+Then looping over the elements is done with a simple do loop. Index based + access allows random order of access, versus the iterator approach that + only supports begin to end iteration. This is demonstrated here by writing + the do loop in reverse order. +

+

+  ! integer :: i
+  do i=size, 1, -1
+
+    ! Check whether the current element is a scalar.
+    ! logical :: isScalar
+    isScalar = ESMF_HConfigIsScalar(hconfig, index=i, rc=rc)
+
+ +

+

+    if (isScalar) then
+
+      ! Any scalar can be accessed as a string.
+      ! character(len=:), allocatable :: string
+      string = ESMF_HConfigAsString(hconfig, index=i, rc=rc)
+
+ +

+

+      ! The attempt can be made to interpret the scalar as any of the other
+      ! supported data types. By default, if the scalar cannot be interpreted
+      ! as the requested data type, rc /= ESMF_SUCCESS is returned. To prevent
+      ! such error condition, the optional, intent(out) argument "asOkay" can
+      ! be provided. If asOkay == .true. is returned, the interpretation was
+      ! successful. Otherwise asOkay == .false. is returned.
+      ! logical :: asOkay
+
+      ! integer(ESMF_KIND_I4) :: valueI4
+      valueI4 = ESMF_HConfigAsI4(hconfig, index=i, asOkay=asOkay, rc=rc)
+
+ +

+

+      ! integer(ESMF_KIND_I8) :: valueI8
+      valueI8 = ESMF_HConfigAsI8(hconfig, index=i, asOkay=asOkay, rc=rc)
+
+ +

+

+      ! real(ESMF_KIND_R4) :: valueR4
+      valueR4 = ESMF_HConfigAsR4(hconfig, index=i, asOkay=asOkay, rc=rc)
+
+ +

+

+      ! real(ESMF_KIND_R8) :: valueR8
+      valueR8 = ESMF_HConfigAsR8(hconfig, index=i, asOkay=asOkay, rc=rc)
+
+ +

+

+      ! logical :: valueL
+      valueL = ESMF_HConfigAsLogical(hconfig, index=i, asOkay=asOkay, rc=rc)
+
+ +

+

+    else
+      ! Possible recursive iteration over the current index=i element.
+    endif
+  enddo
+
+ +

+The above loop is safe with respect to index potentially being specified + with an out-of-range value. This is because ESMF_HConfigIsScalar() + returns .false. in this case. There are only four valid options of what + type a valid HConfig element can be. Each has an associated Is + method: + +

    +
  • Null: ESMF_HConfigIsNull() +
  • +
  • Scalar: ESMF_HConfigIsScalar() +
  • +
  • Sequence: ESMF_HConfigIsSequence() +
  • +
  • Map: ESMF_HConfigIsMap() + +
  • +
+ The general check to see whether an index points to a valid element is + provided by ESMF_HConfigIsDefined(). +

+

+  ! logical :: isDefined
+  isDefined = ESMF_HConfigIsDefined(hconfig, index=10, rc=rc)
+
+ +

+This returns isDefined == .false. because for hconfig a value of + index=10 is out of range. + +

+ +

+48.3.5 Destroy a HConfig object +

+ +

+When done with hconfig, it should be destroyed in the usual manner. +

+

+  call ESMF_HConfigDestroy(hconfig, rc=rc)
+
+ +

+ +

+48.3.6 Create a HConfig object directly loading from YAML string +

+ +

+The ESMF_HConfigCreate() method supports loading contents from + string using YAML syntax directly via the optional content argument. +

+

+  ! type(ESMF_HConfig) :: hconfig
+  hconfig = ESMF_HConfigCreate(content="{car: red, bike: 22, plane: TRUE}", rc=rc)
+
+ +

+Here a map is created. In this case, all of the keys are scalars (car, + bike, plane), as are all of the associated values (red, 22, TRUE). + +

+ +

+48.3.7 Iterator based HConfig map parsing +

+ +

+The elements of the map contained in hconfig can be iterated over + analogous to the sequence case demonstrated earlier. Again the begin + and end iterator variables are defined. +

+

+  ! type(ESMF_HConfigIter) :: hconfigIterBegin, hconfigIterEnd
+  hconfigIterBegin = ESMF_HConfigIterBegin(hconfig, rc=rc)
+
+ +

+

+  hconfigIterEnd = ESMF_HConfigIterEnd(hconfig, rc=rc)
+
+ +

+Then iterate over the elements in hconfig using an iterator loop + variable as before. + +

+The difference of the code below, compared to the sequence case, is + that all the As access methods here are either of the form + As*MapKey or As*MapVal. This is necessary to selectively access + the map key or map value, respectively. +

+

+  ! type(ESMF_HConfigIter) :: hconfigIter
+  hconfigIter = hconfigIterBegin
+  do while (ESMF_HConfigIterLoop(hconfigIter, hconfigIterBegin, hconfigIterEnd, rc=rc))
+
+ +

+

+    ! Check whether the current element is a scalar both for the map key
+    ! and the map value.
+    ! logical :: isScalar
+    isScalar = ESMF_HConfigIsScalarMapKey(hconfigIter, rc=rc)
+
+ +

+

+    isScalar = isScalar .and. ESMF_HConfigIsScalarMapVal(hconfigIter, rc=rc)
+
+ +

+

+    if (isScalar) then
+
+      ! Any scalar can be accessed as a string. Use this for the map key.
+      ! character(len=:), allocatable :: stringKey
+      stringKey = ESMF_HConfigAsStringMapKey(hconfigIter, rc=rc)
+
+ +

+

+      ! Now access the map value. Again first access as a string, which
+      ! always works.
+      ! character(len=:), allocatable :: string
+      string = ESMF_HConfigAsStringMapVal(hconfigIter, rc=rc)
+
+ +

+

+      ! The attempt can be made to interpret the scalar as any of the other
+      ! supported data types. By default, if the scalar cannot be interpreted
+      ! as the requested data type, rc /= ESMF_SUCCESS is returned. To prevent
+      ! such error condition, the optional, intent(out) argument "asOkay" can
+      ! be provided. If asOkay == .true. is returned, the interpretation was
+      ! successful. Otherwise asOkay == .false. is returned.
+      ! logical :: asOkay
+
+      ! integer(ESMF_KIND_I4) :: valueI4
+      valueI4 = ESMF_HConfigAsI4MapVal(hconfigIter, asOkay=asOkay, rc=rc)
+
+ +

+

+      ! integer(ESMF_KIND_I8) :: valueI8
+      valueI8 = ESMF_HConfigAsI8MapVal(hconfigIter, asOkay=asOkay, rc=rc)
+
+ +

+

+      ! real(ESMF_KIND_R4) :: valueR4
+      valueR4 = ESMF_HConfigAsR4MapVal(hconfigIter, asOkay=asOkay, rc=rc)
+
+ +

+

+      ! real(ESMF_KIND_R8) :: valueR8
+      valueR8 = ESMF_HConfigAsR8MapVal(hconfigIter, asOkay=asOkay, rc=rc)
+
+ +

+

+      ! logical :: valueL
+      valueL = ESMF_HConfigAsLogicalMapVal(hconfigIter, asOkay=asOkay, rc=rc)
+
+ +

+

+    else
+      ! Deal with case where either key or value are not scalars themselves.
+    endif
+
+  enddo
+
+ +

+ +

+48.3.8 Key based random access HConfig map parsing +

+ +

+The map values stored in hconfig can be accessed + in random order providing the map key. + +

+To demonstrate this, a temporary array holding keys in random order is defined. +

+

+  ! character(5) :: keyList(3)
+  keyList = ["bike ", "plane", "car  "]
+
+ +

+Then loop over the elements of keyList and use them as map key + to access the map values in hconfig. +

+

+  ! integer :: i
+  do i=1,3
+
+    ! Ensure that all white space padding is removed.
+    ! character :: stringKey
+    stringKey = trim(keyList(i))
+
+    ! Check whether the accessed map value is a scalar.
+    ! logical :: isScalar
+    isScalar = ESMF_HConfigIsScalar(hconfig, keyString=stringKey, rc=rc)
+
+ +

+

+    if (isScalar) then
+
+      ! Access as a string always works.
+      ! character(len=:), allocatable :: string
+      string = ESMF_HConfigAsString(hconfig, keyString=stringKey, rc=rc)
+
+ +

+

+      ! The attempt can be made to interpret the scalar as any of the other
+      ! supported data types. By default, if the scalar cannot be interpreted
+      ! as the requested data type, rc /= ESMF_SUCCESS is returned. To prevent
+      ! such error condition, the optional, intent(out) argument "asOkay" can
+      ! be provided. If asOkay == .true. is returned, the interpretation was
+      ! successful. Otherwise asOkay == .false. is returned.
+      ! logical :: asOkay
+
+      ! integer(ESMF_KIND_I4) :: valueI4
+      valueI4 = ESMF_HConfigAsI4(hconfig, keyString=stringKey, asOkay=asOkay, rc=rc)
+
+ +

+

+      ! integer(ESMF_KIND_I8) :: valueI8
+      valueI8 = ESMF_HConfigAsI8(hconfig, keyString=stringKey, asOkay=asOkay, rc=rc)
+
+ +

+

+      ! real(ESMF_KIND_R4) :: valueR4
+      valueR4 = ESMF_HConfigAsR4(hconfig, keyString=stringKey, asOkay=asOkay, rc=rc)
+
+ +

+

+      ! real(ESMF_KIND_R8) :: valueR8
+      valueR8 = ESMF_HConfigAsR8(hconfig, keyString=stringKey, asOkay=asOkay, rc=rc)
+
+ +

+

+      ! logical :: valueL
+      valueL = ESMF_HConfigAsLogical(hconfig, keyString=stringKey, asOkay=asOkay, rc=rc)
+
+ +

+

+    else
+      ! Deal with case where either key or value are not scalars themselves.
+    endif
+
+  enddo
+
+ +

+The above loop is safe with respect to stringKey potentially + specifying a value that is not a valid map key. This is because + ESMF_HConfigIsScalar() returns .false. in this case. + +

+The general check to see whether a map key refers to a valid element + is provided by ESMF_HConfigIsDefined(). +

+

+  ! logical :: isDefined
+  isDefined = ESMF_HConfigIsDefined(hconfig, keyString="bad-key", rc=rc)
+
+ +

+This returns isDefined == .false. because hconfig does not + contain "bad-key" as one of its valid map keys. + +

+Finally destroy hconfig when done. +

+

+  call ESMF_HConfigDestroy(hconfig, rc=rc)
+
+ +

+ +

+48.3.9 Access HConfig from Config +

+ +

+The ESMF_Config class can be queried for a HConfig object. This allows + the use of the HConfig API to access information contained in a Config object. +

+

+  ! type(ESMF_Config) :: config
+  ! type(ESMF_HConfig) :: hconfig
+  call ESMF_ConfigGet(config, hconfig=hconfig, rc=rc)
+
+ +

+The hconfig obtained this way is indistinguishable from an explicitly + created HConfig instance. E.g. it can be queried for its type using the + Is methods: +

+

+  ! logical :: isDefined
+  isDefined = ESMF_HConfigIsDefined(hconfig, rc=rc)
+
+ +

+

+  ! logical :: isNull
+  isNull = ESMF_HConfigIsNull(hconfig, rc=rc)
+
+ +

+

+  ! logical :: isSequence
+  isSequence = ESMF_HConfigIsSequence(hconfig, rc=rc)
+
+ +

+

+  ! logical :: isMap
+  isMap = ESMF_HConfigIsMap(hconfig, rc=rc)
+
+ +

+Once done with hconfig it must not be destroyed explicitly by + the user. The hconfig is still owned by the config object, and + will be destroyed automatically when the config object is destroyed. + This follows the simple rule that a user only owns those objects created + explicitly by calling a Create() method. + +

+ +

+48.3.10 Load HConfig from YAML file +

+ +

+One option to load a YAML file is to first create an empty HConfig object, + followed by calling ESMF_HConfigFileLoad(). +

+

+  ! type(ESMF_HConfig) :: hconfig
+  hconfig = ESMF_HConfigCreate(rc=rc)
+
+ +

+

+  call ESMF_HConfigFileLoad(hconfig, filename="example.yaml", rc=rc)
+
+ +

+

+  ! When done destroy as usual.
+  call ESMF_HConfigDestroy(hconfig, rc=rc)
+
+ +

+The alternative option is to create and load the HConfig object in a single + call to ESMF_HConfigCreate() using the optional filename + argument to specify the YAML file. +

+

+  ! type(ESMF_HConfig) :: hconfig
+  hconfig = ESMF_HConfigCreate(filename="example.yaml", rc=rc)
+
+ +

+

+  ! And again destroy hconfig when done with it.
+  call ESMF_HConfigDestroy(hconfig, rc=rc)
+
+ +

+ +

+48.3.11 Save HConfig to YAML file +

+ +

+A HConfig object can be saved to a YAML file by calling the + ESMF_HConfigFileSave() method. To demonstrate this, a YAML file + containing: +

+   # An example of YAML configuration file
+  
+   simple_list: [1, 2, 3, abc, b, TRUE]
+   simple_map:
+     car: red
+     [bike, {p1: 10, p2: 20}]: [bmx, mountain, street]
+     plane: [TRUE, FALSE]
+
+ +

+is loaded to create the hconfig object: +

+

+  hconfig = ESMF_HConfigCreate(filename="example.yaml", rc=rc)
+
+ +

+Now the hconfig object can be saved to file using the + ESMF_HConfigFileSave() method. +

+

+  call ESMF_HConfigFileSave(hconfig, filename="saveMe.yml", rc=rc)
+
+ +

+Notice that the resulting contents of file saveMe.yml does not + contain the comments of the original file. The YAML structure is saved. +

+   simple_list: [1, 2, 3, abc, b, TRUE]
+   simple_map:
+     car: red
+     [bike, {p1: 10, p2: 20}]: [bmx, mountain, street]
+     plane: [TRUE, FALSE]
+
+ +

+The object specified in ESMF_HConfigFileSave() can be a regular node + (of any type) or a sequence iterator. In either case the file written + represents the YAML hierarchy with the specified object as the root node. + +

+In the case of a map iterator, it is necessary to first create an + appropriate root node utilizing the appropriate CreateAt method. This + allows saving either the map key or map value node at the + current iterator. This is demonstrated below. + +

+In the current example, where hconfig is a map with two elements, a + map iterator can be set to the beginning using the following call. +

+

+  ! type(ESMF_HConfigIter) :: hconfigIter
+  hconfigIter = ESMF_HConfigIterBegin(hconfig, rc=rc)
+
+ +

+Here hconfigIter cannot be saved to file directly. To write the + key node, first create a HConfig object for it using method + ESMF_HConfigCreateAtMapKey(). +

+

+  ! type(ESMF_HConfig) :: hconfigTemp
+  hconfigTemp = ESMF_HConfigCreateAtMapKey(hconfigIter, rc=rc)
+
+ +

+Then save it. +

+

+  call ESMF_HConfigFileSave(hconfigTemp, filename="mapKeyBegin.yaml", rc=rc)
+
+ +

+And finally destroy hconfigTemp again. +

+

+  call ESMF_HConfigDestroy(hconfigTemp, rc=rc)
+
+ +

+Similarly, to write the value node to file, first create a HConfig + object for it using method ESMF_HConfigCreateAtMapVal(). +

+

+  ! type(ESMF_HConfig) :: hconfigTemp
+  hconfigTemp = ESMF_HConfigCreateAtMapVal(hconfigIter, rc=rc)
+
+ +

+Then save it. +

+

+  call ESMF_HConfigFileSave(hconfigTemp, filename="mapValBegin.yaml", rc=rc)
+
+ +

+And destroy it. +

+

+  call ESMF_HConfigDestroy(hconfigTemp, rc=rc)
+
+ +

+Since hconfig is a map node, it is also possible to directly + create a value node by calling ESMF_HConfigCreateAt() + on it, using the desired key. +

+

+  ! type(ESMF_HConfig) :: hconfigTemp
+  hconfigTemp = ESMF_HConfigCreateAt(hconfig, keyString="simple_map", rc=rc)
+
+ +

+Now hconfigTemp points to the value node, that is + associated with the "simple_map" key, which is in turn a map: +

+   car: red
+   [bike, {p1: 10, p2: 20}]: [bmx, mountain, street]
+   plane: [TRUE, FALSE]
+
+ It can be saved to file as usual. +

+

+  call ESMF_HConfigFileSave(hconfigTemp, filename="mapValAtKey.yaml", rc=rc)
+
+ +

+Any of the value nodes of hconfigTemp can be accessed through + recursive usage of the ESMF_HConfigCreateAt() method. + For example, the following call accesses the value node that is + associated with keyString="[bike, p1: 10, p2: 20]". Here the + keyString is interpreted as YAML syntax, for which an internal HConfig + representation is created, and finally the map held by hconfigTemp is + searched for a matching key. +

+

+  ! type(ESMF_HConfig) :: hconfigTemp2
+  hconfigTemp2 = ESMF_HConfigCreateAt(hconfigTemp, &
+    keyString="[bike, {p1: 10, p2: 20}]", rc=rc)
+
+ +

+Now hconfigTemp2 points to the sequence node with contents + [bmx, mountain, street]. It, too, can be saved to file. +

+

+  call ESMF_HConfigFileSave(hconfigTemp2, filename="mapValRecursive.yaml", rc=rc)
+
+ +

+Finally hconfigTemp2, hconfigTemp and hconfig should be destroyed. +

+

+  call ESMF_HConfigDestroy(hconfigTemp2, rc=rc)
+
+ +

+

+  call ESMF_HConfigDestroy(hconfigTemp, rc=rc)
+
+ +

+

+  call ESMF_HConfigDestroy(hconfig, rc=rc)
+
+ +

+ +

+48.3.12 Tags and Schemas +

+ +

+The HConfig class implements tags to identify a node's data type according to + the YAML standard. The combination of a set of defined tags and a mechanism + to resolve non-specific tags is called a schema under YAML. The HConfig class + implements the YAML Core schema, which is an extension of the JSON schema. + +

+This example starts with an empty HConfig object. +

+

+  ! type(ESMF_HConfig) :: hconfig
+  hconfig = ESMF_HConfigCreate(rc=rc)
+
+ +

+Method ESMF_HConfigGetTag() is used to query the tag. +

+

+  ! character(len=:), allocatable :: tag
+  tag = ESMF_HConfigGetTag(hconfig, rc=rc)
+
+ +

+ +

+48.3.12.1 Null +

+ The hconfig is an empty object, in other words it is associated with + NULL. The Core schema tag for this situation is + tag:yaml.org,2002:null. + +

+Next, file exampleWithTags.yaml is loaded. +

+

+  call ESMF_HConfigFileLoad(hconfig, filename="exampleWithTags.yaml", rc=rc)
+
+ +

+The file contains the following YAML: +

+   value_one:    {word1: this, word2: is, word3: a, word4: map}
+   value_two:    [this, is, a, list]
+   value_three:            123
+   value_four:   !!float   123
+   value_five:             2.5
+   value_six:    !!str     2.5
+   value_seven:            False
+   value_eight:  !!str     true
+   value_nine:             0x234
+   value_ten:              Null
+   value_eleven:
+   value_twelve:  !myStuff xyz
+   value_thirteen:         NO
+   value_fourteen:         "NO"
+
+ +

+The value associated with map key "value_ten" is explicitly set to + Null. The associated tag for this node can be obtained + directly by supplying the keyString argument. +

+

+  tag = ESMF_HConfigGetTag(hconfig, keyString="value_ten", rc=rc)
+
+ +

+The resolved Core schema tag is again tag:yaml.org,2002:null. There + are four special values that resolve to this tag: null, Null, + NULL, and $\sim$. In addition to those special values, an empty + value, as demonstrated by key "value_eleven", also automatically + resolves to tag:yaml.org,2002:null. +

+

+  tag = ESMF_HConfigGetTag(hconfig, keyString="value_eleven", rc=rc)
+
+ +

+ +

+48.3.12.2 Map +

+ On the top level, after loading the YAML file, hconfig is a map. + Querying again for the tag of hconfig, +

+

+  tag = ESMF_HConfigGetTag(hconfig, rc=rc)
+
+ +

+results in the Core schema tag of tag:yaml.org,2002:map. + +

+ +

+48.3.12.3 Sequence +

+ The value associated with map key "value_two" in the current + hconfig object is a sequence. The tag for this node can be obtained + directly by supplying the keyString argument. +

+

+  tag = ESMF_HConfigGetTag(hconfig, keyString="value_two", rc=rc)
+
+ +

+The resolved Core schema tag for a sequence is tag:yaml.org,2002:seq. + +

+ +

+48.3.12.4 String +

+ All of the keys of the currently loaded hconfig object are + strings. To obtain the tag that is associated with the first key node, + an iterator is used to access the map nodes individually. +

+

+  ! type(ESMF_HConfigIter) :: hconfigIter
+  hconfigIter = ESMF_HConfigIterBegin(hconfig, rc=rc)
+
+ +

+Now the ESMF_HConfigGetTagMapKey() method can be used to obtain + the tag for the first key node. +

+

+  tag = ESMF_HConfigGetTagMapKey(hconfigIter, rc=rc)
+
+ +

+Here the Core schema tag resolves to tag:yaml.org,2002:str. + +

+ +

+48.3.12.5 Integer +

+ The value associated with map key "value_three" in the current + hconfig object is an integer number. The tag for this node can be + obtained as before by directly supplying the keyString argument. +

+

+  tag = ESMF_HConfigGetTag(hconfig, keyString="value_three", rc=rc)
+
+ +

+The Core schema tag resolves to tag:yaml.org,2002:int. + +

+The value associated with map key "value_nine" in the current + hconfig object is an integer number in hex. The tag for this node can be + obtained as before by directly supplying the keyString argument. +

+

+  tag = ESMF_HConfigGetTag(hconfig, keyString="value_nine", rc=rc)
+
+ +

+The Core schema tag resolves to tag:yaml.org,2002:int. + +

+ +

+48.3.12.6 Floating Point +

+ The value associated with map key "value_five" in the current + hconfig object is a floating point number. The tag for this node can be + obtained as before by directly supplying the keyString argument. +

+

+  tag = ESMF_HConfigGetTag(hconfig, keyString="value_five", rc=rc)
+
+ +

+The Core schema tag resolves to tag:yaml.org,2002:float. + +

+ +

+48.3.12.7 Boolean +

+ The value associated with map key "value_seven" in the current + hconfig object is a boolean. The tag for this node can be + obtained as before by directly supplying the keyString argument. +

+

+  tag = ESMF_HConfigGetTag(hconfig, keyString="value_seven", rc=rc)
+
+ +

+The Core schema tag resolves to tag:yaml.org,2002:bool. The + supported boolean values are: +

+        true   |   false
+        True   |   False
+        TRUE   |   FALSE
+
+ +

+ +

+48.3.12.8 Additional Boolean values and the "Norway problem" +

+ The YAMLCPP backend used by ESMF_HConfig interprets all of the values + recognized as such under YAML 1.1 +as boolean. This extends the above list with + additional options: +
+        yes    |   no
+        Yes    |   No
+        YES    |   NO
+        y      |   n
+        Y      |   N
+        on     |   off
+        On     |   Off
+        ON     |   OFF
+
+ The interpretation of value NO as a boolean, instead of a literal + string, can be problematic. It leads to the so-called "Norway problem", + because the same string is often used as country code instead. The underlying + problem is the misinterpretation of values by YAML. + +

+Strictly speaking this is not a YAML problem, but instead a schema specific + issue. Fortunately there are two simple solutions to ensure the correct and + intended interpretation of values by ESMF_HConfig: + +

+ +

    +
  1. Explicit quotation of strings: See for instance the map value + for value_fourteen in the current example. Using explicit quotes for + "NO", the entry is safely interpreted as a literal string, and if + queried for its tag, will return tag:yaml.org,2002:str. + +

    +

  2. +
  3. Explicit standard tags: This option allows explicit specificaiton of any + tag, e.g. the standard short-hand tag !str for literal strings. This + approach is discussed in more detal below. + +
  4. +
+ +

+ +

+48.3.12.9 Explicit standard tags +

+ Standard short-hand tags can be specified to change the default resolution. + This is demonstrated for map keys "value_four", "value_six", and + "value_eight". +

+

+  tag = ESMF_HConfigGetTag(hconfig, keyString="value_four", rc=rc)
+
+ +

+

+  tag = ESMF_HConfigGetTag(hconfig, keyString="value_six", rc=rc)
+
+ +

+

+  tag = ESMF_HConfigGetTag(hconfig, keyString="value_eight", rc=rc)
+
+ +

+The default resolution of these three keys would be + tag:yaml.org,2002:int, tag:yaml.org,2002:float, and + tag:yaml.org,2002:bool, respectively. However, with the explict tags + in place, they are resolved to tag:yaml.org,2002:float, + tag:yaml.org,2002:str, tag:yaml.org,2002:str, instead. + +

+ +

+48.3.12.10 Explicit custom tags +

+ The HConfig class supports application-specific local tags as per the YAML + standard. These are tags that are not known by the Core schema. If such a + tag is encountered on a node, it is preserved and no further automatic + tag resolution is performed. + +

+The value associated with map key "value_twelve" in the current + hconfig object has a custom tag. The tag for this node can be + obtained as before by directly supplying the keyString argument. +

+

+  tag = ESMF_HConfigGetTag(hconfig, keyString="value_twelve", rc=rc)
+
+ +

+The returned tag is !myStuff. + +

+Finally clean up hconfig. +

+

+  ! Destroy hconfig when done with it.
+  call ESMF_HConfigDestroy(hconfig, rc=rc)
+
+ +

+ +

+48.3.13 Comparing HConfig objects +

+ +

+The HConfig class follows the standard behavior of ESMF deep classes as + described in section 8.4. To demonstrate + the operations of assignment, equality, and comparison based on content, we + start by creating a simple HConfig object. +

+

+  ! type(ESMF_HConfig) :: hconfig
+  hconfig = ESMF_HConfigCreate(content="{car: red, bike: 22, plane: TRUE}", rc=rc)
+
+ +

+A simple assignment results in an alias to the same deep HConfig object. +

+

+  ! type(ESMF_HConfig) :: hconfigTemp
+  hconfigTemp = hconfig
+
+ +

+The equality (==) and inequality (/=) operators are + overloaded to check for the alias condition when used between two + HConfig objects. +

+

+  ! logical :: isAlias
+  isAlias = (hconfigTemp == hconfig)
+
+ +

+

+  ! logical :: isNotAlias
+  isNotAlias = (hconfigTemp /= hconfig)
+
+ +

+Alias equality can also be tested by using the ESMF_HConfigMatch() + function. The return value of this function is of type + ESMF_HConfigMatch_Flag, which allows for a wider range of possible + comparison results. See section 48.2.1 for all the + implemented return values. +

+

+  ! type(ESMF_HConfigMatch_Flag)  :: match
+  match = ESMF_HConfigMatch(hconfig, hconfigTemp, rc=rc)
+
+ +

+For the case of an alias match, the value of ESMF_HCONFIGMATCH_ALIAS + is returned. +

+

+  isAlias = (match == ESMF_HCONFIGMATCH_ALIAS)
+
+ +

+To demonstrate content matching for HConfig objects that are not aliases, we + create a separate object with the same content as hconfig. +

+

+  ! type(ESMF_HConfig) :: hconfigTemp
+  hconfigTemp = ESMF_HConfigCreate(content="{car: red, bike: 22, plane: TRUE}", rc=rc)
+
+ +

+The simple alias check now returns .false.. +

+

+  ! logical :: isAlias
+  isAlias = (hconfigTemp == hconfig)
+
+ +

+However, for two separate HConfig objects that have exactly matching + content, as is the case for hconfig and hconfigTemp, function + ESMF_HConfigMatch() returns value ESMF_HCONFIGMATCH_EXACT. +

+

+  ! type(ESMF_HConfigMatch_Flag)  :: match
+  match = ESMF_HConfigMatch(hconfig, hconfigTemp, rc=rc)
+
+ +

+

+  ! logical :: isExact
+  isExact = (match == ESMF_HCONFIGMATCH_EXACT)
+
+ +

+The values returned by ESMF_HConfigMatch() are constructed in + a monotonically increasing manner to simplify general comparisons that + ensure two objects are either aliases of each other or their content + matches exactly. This common case is demonstrated in the following code that + sets isMatch to .true. for the alias or exact match condition, + and .false. otherwise, using (>=) logic. +

+

+  ! logical :: isMatch
+  isMatch = (match >= ESMF_HCONFIGMATCH_EXACT)
+
+ +

+While there is an exact match of the content of hconfig and + hconfigTemp, they are distinct objects in memory, which can be modified + independent of each other. E.g. another key-value pair can be added to + hconfigTemp without affecting the content of hconfig. +

+

+  call ESMF_HConfigAdd(hconfigTemp, addKeyString="kNew", content=7, rc=rc)
+
+ +

+Now that the content of hconfig and hconfigTemp differs, function + ESMF_HConfigMatch() returns value ESMF_HCONFIGMATCH_NONE. +

+

+  ! type(ESMF_HConfigMatch_Flag)  :: match
+  match = ESMF_HConfigMatch(hconfig, hconfigTemp, rc=rc)
+
+ +

+

+  ! logical :: isNone
+  isNone = (match == ESMF_HCONFIGMATCH_NONE)
+
+ +

+Finally clean up both HConfig objects. +

+

+  ! Destroy hconfig when done with it.
+  call ESMF_HConfigDestroy(hconfig, rc=rc)
+
+ +

+

+  ! Destroy hconfigTemp when done with it.
+  call ESMF_HConfigDestroy(hconfigTemp, rc=rc)
+
+ +

+ +

+48.3.14 Adding, Setting, and Removing elements from HConfig object +

+ +

+After creating a HConfig object without specifying content or + filename, it is empty. +

+

+  ! type(ESMF_HConfig) :: hconfig
+  hconfig = ESMF_HConfigCreate(rc=rc)
+
+ +

+Now the ESMF_HConfigAdd() method can be used to add new elements to + an existing HConfig object. The Add() interfaces are heavily overloaded, + each specific entry point featuring a number of optional arguments. The two + fundamentally different ways of using Add() are: (1) adding an element + at the end of a sequence or (2) adding an element to a map. + Here, where hconfig is empty, either option is possible. The way the + first element is added determines whether hconfig is a sequence or + a map. + +

+The following call adds an element to hconfig without specifying the + addKey or addKeyString argument. This indicates that a sequence + element is added to the end, and as a consequence rendering hconfig + a sequence. +

+

+  call ESMF_HConfigAdd(hconfig, "first added item", rc=rc)
+
+ +

+Additional elements can be added at the end of hconfig. +

+

+  call ESMF_HConfigAdd(hconfig, 12.57_ESMF_KIND_R8, rc=rc)
+
+ +

+At this point, the content of hconfig is a sequence with two elements. +

+   - first added item
+   - 12.5700000000
+
+ +

+It is also possible to add an entire HConfig structure as an item to the + existing sequence. One way to do this is to use standar YAML syntax when + adding the element. Here a map is added to the end of hconfig. +

+

+  call ESMF_HConfigAdd(hconfig, "{k1: 7, k2: 25}", rc=rc)
+
+ +

+This results in the following content, where the third element of the sequence + is the map that was just added. +

+   - first added item
+   - 12.5700000000
+   - {k1: 7, k2: 25}
+
+ +

+A HConfig structure can even be loaded from file and added to the end of + hconfig. This requires a temporary HConfig object. +

+

+  ! type(ESMF_HConfig) :: hconfigTemp
+  hconfigTemp = ESMF_HConfigCreate(filename="example.yaml", rc=rc)
+
+ +

+

+  call ESMF_HConfigAdd(hconfig, hconfigTemp, rc=rc)
+
+ +

+

+  call ESMF_HConfigDestroy(hconfigTemp, rc=rc)
+
+ +

+The result is the following content for hconfig. +

+   - first added item
+   - 12.5700000000
+   - {k1: 7, k2: 25}
+   - simple_list: [1, 2, 3, abc, b, TRUE]
+     simple_map:
+       car: red
+       [bike, {p1: 10, p2: 20}]: [bmx, mountain, street]
+       plane: [TRUE, FALSE]
+
+ +

+Using the CreateAt() method, it is easy to gain access to any specific + element in hconfig. Since hconfig is a sequence, the proper + access is by index. +

+

+  ! type(ESMF_HConfig) :: hconfigTemp
+  hconfigTemp = ESMF_HConfigCreateAt(hconfig, index=3, rc=rc)
+
+ +

+This creates a temporary HConfig object that references the 3rd element + of the sequence stored by hconfig. If hconfigTemp were to be + saved to file, it would have the following content. +

+   {k1: 7, k2: 25}
+
+ +

+Using the Set() methods, contents in hconfigTemp, and thus in + the 3rd element of hconfig can be modified. The content of + hconfigTemp is a map, and the proper access is by map key. + Here key "k2" is being modified. +

+

+  call ESMF_HConfigSet(hconfigTemp, 12.5, keyString="k2", rc=rc)
+
+ +

+The hconfigTemp is a reference to a map, and new elements can be + added using the addKeyString argument. +

+

+  call ESMF_HConfigAdd(hconfigTemp, .true., addKeyString="k3", rc=rc)
+
+ +

+

+  call ESMF_HConfigDestroy(hconfigTemp, rc=rc)
+
+ +

+After these operations, the content of hconfig has changed to +

+   - first added item
+   - 12.5700000000
+   - {k1: 7, k2: 12.5000000000, k3: True}
+   - simple_list: [1, 2, 3, abc, b, TRUE]
+     simple_map:
+       car: red
+       [bike, {p1: 10, p2: 20}]: [bmx, mountain, street]
+       plane: [TRUE, FALSE]
+
+ Notice that while hconfigTemp should be destroyed explicitly, as in the + example above, doing so does not affect the referenced node inside the + hconfig object. In other words, hconfigTemp was a reference, and + not a deep copy of the node! There is some allocated memory associated + with the hconfigTemp reference that gets cleaned up with the + Destroy() call, but it does not affect the reference itself. + +

+The Set() method can also be used to edit the element referenced + itself. Here the 4th element in the hconfig sequence is set to be a + simple scalar string value using this approach. +

+

+  ! type(ESMF_HConfig) :: hconfigTemp
+  hconfigTemp = ESMF_HConfigCreateAt(hconfig, index=4, rc=rc)
+
+ +

+

+  call ESMF_HConfigSet(hconfigTemp, "Simple scalar string value", rc=rc)
+
+ +

+

+  call ESMF_HConfigDestroy(hconfigTemp, rc=rc)
+
+ +

+The content of hconfig has been updated as below. +

+   - first added item
+   - 12.5700000000
+   - {k1: 7, k2: 12.5000000000, k3: True}
+   - Simple scalar string value
+
+ +

+There is a simpler alternative for direct element editing in an + HConfig object via the Set() method. Using the index or + keyString argument, a sequence or map element, respectively, can + be edited directly. For instance, +

+

+  call ESMF_HConfigSet(hconfig, "[a, b, c]", index=4, rc=rc)
+
+ +

+sets the 4th element of hconfig directly, without the need of a + temporary HConfig variable. This updates the content to: +

+   - first added item
+   - 12.5700000000
+   - {k1: 7, k2: 12.5000000000, k3: True}
+   - [a, b, c]
+
+ +

+Elements can be deleted from a HConfig object holding a sequence or map + using the Remove() method, specifying the index or + map key, respectively. Here the 2nd element of the sequence held by + hconfig is removed. +

+

+  call ESMF_HConfigRemove(hconfig, index=2, rc=rc)
+
+ +

+The result is a sequence with only three remaining elements. +

+   - first added item
+   - {k1: 7, k2: 12.5000000000, k3: True}
+   - [a, b, c]
+
+ +

+To demonstrate removal of an element from a map, the second + hconfig element is referenced by a temporary HConfig object. The element + with key "k2" is then removed using the respective Remove() method. +

+

+  ! type(ESMF_HConfig) :: hconfigTemp
+  hconfigTemp = ESMF_HConfigCreateAt(hconfig, index=2, rc=rc)
+
+ +

+

+  call ESMF_HConfigRemove(hconfigTemp, keyString="k2", rc=rc)
+
+ +

+

+  call ESMF_HConfigDestroy(hconfigTemp, rc=rc)
+
+ +

+The resulting hconfig content is as expected. +

+   - first added item
+   - {k1: 7, k3: True}
+   - [a, b, c]
+
+ +

+Finally the entire contents of hconfig can be deleted by setting the + node itself to one of the special NULL values. +

+

+  call ESMF_HConfigSet(hconfig, "NULL", rc=rc)
+
+ +

+If saved to file, the contents of hconfig shows up as a simple tilde + character, indicating its NULL value. +

+   ~
+
+ +

+At this point hconfig is neither a sequence nor a map. It is + NULL. Adding a map element, i.e. an element with a key, turns + hconfig into a map. +

+

+  call ESMF_HConfigAdd(hconfig, "first added item", addKeyString="item1", rc=rc)
+
+ +

+The contents of hconfig now is a map with a single entry: + character, indicating its NULL value. +

+   item1: first added item
+
+ +

+As in other contexts before, the content as well as the specified + addKeyString can be of any legal YAML syntax. This is demonstrated + in the following Add() calls. +

+

+  ! Add YAML sequence content with simple scalar key.
+  call ESMF_HConfigAdd(hconfig, "[2, added, item]", addKeyString="item2", rc=rc)
+
+ +

+

+  ! Add simple scalar content with a YAML map as key.
+  call ESMF_HConfigAdd(hconfig, "third added item", addKeyString="{item: 3}", &
+    rc=rc)
+
+ +

+

+  ! Add complex YAML content with YAML sequence as key.
+  call ESMF_HConfigAdd(hconfig, "{4th: item, 5th: [true, false]}", &
+    addKeyString="[1, 2, 3, 4]", rc=rc)
+
+ +

+Resulting in the final contents of hconfig: +

+   item1: first added item
+   item2: [2, added, item]
+   {item: 3}: third added item
+   [1, 2, 3, 4]: {4th: item, 5th: [true, false]}
+
+ Finally clean up hconfig. +

+

+  ! Destroy hconfig when done with it.
+  call ESMF_HConfigDestroy(hconfig, rc=rc)
+
+ +

+ +

+48.3.15 Working with multiple YAML documents +

+ +

+The YAML standard supports multiple documents in a single file by separating + each document with a line containing three dashes (--). Optionally the + end of each document may be indicated by three periods (...). For example, + the following YAML file contains three documents (notice the optional usage + of the document end marker): +

+   ---
+   - This
+   - is
+   - the
+   - first document.
+   ...
+   ---
+   - And
+   - a second document.
+   ---
+   - And
+   - finally a
+   - third document.
+
+ All of the documents contained in a YAML file can be loaded into a single + HConfig object all at once. +

+

+  ! type(ESMF_HConfig) :: hconfig
+  hconfig = ESMF_HConfigCreate(filename="multiDoc.yaml", rc=rc)
+
+ +

+The number of documents held by hconfig can be queried. +

+

+  ! integer :: docCount
+  docCount = ESMF_HConfigGetDocCount(hconfig, rc=rc)
+
+ +

+When saving hconfig, a multi-document YAML file will be written. +

+

+  call ESMF_HConfigFileSave(hconfig, filename="multi_00.yaml", rc=rc)
+
+ +

+The ESMF_HConfigFileSave() method implements strict usage of both + document markers when saving a multi-document HConfig object. +

+   ---
+   - This
+   - is
+   - the
+   - first document.
+   ...
+   ---
+   - And
+   - a second document.
+   ...
+   ---
+   - And
+   - finally a
+   - third document.
+   ...
+
+ +

+The content of the hconfig object can be written to the ESMF log file + as usual. +

+

+  call ESMF_HConfigLog(hconfig, prefix="my-multi-doc: ", rc=rc)
+
+ +

+The optional doc argument can be specified to save or log a specific + document of the multi-document hconfig object. +

+

+  call ESMF_HConfigFileSave(hconfig, filename="multi_01.yaml", doc=2, rc=rc)
+
+ +

+This operation results in a single document file: +

+   - And
+   - a second document.
+
+ The ESMF_HConfigFileLoad() method also accepts the optional doc + argument. When specified, the result is a single-document hconfig + object, holding the content of the indicated document within the loaded file. +

+

+  call ESMF_HConfigFileLoad(hconfig, filename="multiDoc.yaml", doc=3, rc=rc)
+
+ +

+Saving hconfig to file shows the expected situation. +

+

+  call ESMF_HConfigFileSave(hconfig, filename="multi_02.yaml", rc=rc)
+
+ +

+Resulting in: +

+   - And
+   - finally a
+   - third document.
+
+ +

+Most HConfig methods provide the optional doc argument. If present, + the method applies to the specified document. The default for when the + doc argument is not present, for most methods is to use the first + document in the object. The exceptions to this rule are the + ESMF_HConfigFileSave() and ESMF_HConfigFileLoad() methods. + Here the default is to apply the operation to all documents. + +

+When done, clean up hconfig as usual. +

+

+  ! Destroy hconfig when done with it.
+  call ESMF_HConfigDestroy(hconfig, rc=rc)
+
+ +

+ +

+48.3.16 Sequence shortcuts for: Create, As, Add, and Set +

+ +

+The HConfig class offers shortcut methods for the sake of convenience when + working with sequences where all elements are of the same typekind. In these + cases a sequence can be represented as a one-dimensional Fortran array. The + interfaces are overloaded for one-dimensional string, logical, I4, I8, R4, + and R8 typekinds. + +

+Using a Fortran array constructor for the actual argument, a sequence of I4 + data is created. +

+

+  ! type(ESMF_HConfig) :: hconfig
+  hconfig = ESMF_HConfigCreate([1,2,3], rc=rc)
+
+ +

+The content of hconfig can be accessed in the usual manner, via + iterators or indexed access. Alternatively, the sequence of I4 elements + can be retrieved in a single call using a one-dimensional allocatable + Fortran array of the appropriate typekind. +

+

+  ! integer(ESMF_KIND_I4), allocatable :: valueI4Seq(:)
+  valueI4Seq = ESMF_HConfigAsI4Seq(hconfig, rc=rc)
+
+ +

+The optional, intent(out) argument asOkay is available as in the scalar + access methods. If specified, errors triggered by unsupported typekind + conversion exceptions are suppressed, and instead asOkay == .false. is + returned by the call. + +

+Here an attempt is made to access the content of hconfig as a sequence + of logicals. This is not supported, and will be flagged in the return value + of asOkay. +

+

+  ! logical, allocatable :: valueLSeq(:)
+  valueLSeq = ESMF_HConfigAsLogicalSeq(hconfig, asOkay=asOkay, rc=rc)
+
+ +

+Finally the content of hconfig is accessed as a sequence of strings. + This is always supported since every typekind can be represented in string + form. +

+

+  ! character(len=:), allocatable :: valueSSeq(:)
+  valueSSeq = ESMF_HConfigAsStringSeq(hconfig, stringLen=10, asOkay=asOkay, rc=rc)
+
+ +

+Next hconfig is cleaned up before re-creating it as an empty HConfig + object. +

+

+  ! Clean up hconfig.
+  call ESMF_HConfigDestroy(hconfig, rc=rc)
+
+ +

+

+  ! type(ESMF_HConfig) :: hconfig
+  hconfig = ESMF_HConfigCreate(rc=rc)
+
+ +

+Sequences can be added to hconfig conveniently using the overloaded + Add() interfaces that accept one-dimensional Fortran arrays. Here a + sequence of strings is added as the value of a map entry with key string "k1". +

+

+  call ESMF_HConfigAdd(hconfig, ["aaa","bbb","ccc"], addKeyString="k1", rc=rc)
+
+ +

+Next a sequence of R4 values is added to the map held by hconfig, + under key string "k2". +

+

+  call ESMF_HConfigAdd(hconfig, [1.0,1.25,1.5], addKeyString="k2", rc=rc)
+
+ +

+At this point hconfig contains the following information: +

+   k1:
+     - aaa
+     - bbb
+     - ccc
+   k2:
+     - 1
+     - 1.25
+     - 1.5
+
+ +

+The Set() interfaces are also overloaded to accept one-dimensional + Fortran arrays as input. This makes it easy to set any node to a sequence + that is available as Fortran array. Here the value associated with key "k1" + is changed to a list of two logicals. +

+

+  call ESMF_HConfigSet(hconfig, [.true.,.false.], keyString="k1", rc=rc)
+
+ +

+This changes the content of hconfig as expected. +

+   k1:
+     - True
+     - False
+   k2:
+     - 1
+     - 1.25
+     - 1.5
+
+ +

+Finally clean up hconfig as usual. +

+

+  ! Destroy hconfig when done with it.
+  call ESMF_HConfigDestroy(hconfig, rc=rc)
+
+ +

+ + +

+48.4 Restrictions and Future Work +

+ +

+ +

    +
  • The YAML Core schema, which is an extension of the JSON schema, is + implemented and used to resolve non-specific tags under HConfig. + There is currently no mechanism implemented to switch to a different schema + for tag resolution. +
  • +
  • Currently the only available removal method for HConfig map + objects requires that keys be simple scalar strings. +
  • +
  • There is currently no method implemented that allows setting of tags from + from the API. +
  • +
+ +

+48.5 Design and Implementation Notes +

+ +

+The ESMF HConfig class is implemented on top of YAML-CPP (https://github.com/jbeder/yaml-cpp). +A copy of YAML-CPP is included in the ESMF source tree under ./src/prologue/yaml-cpp. It is +used by a number of ESMF/NUOPC functions, including HConfig. + +

+48.6 Class API +

+ +

+ +

+ +

+ +

+48.6.1 ESMF_HConfigAssignment(=) - HConfig assignment +

+ +

+ +

+
+INTERFACE: +

     interface assignment(=)
+     hconfig1 = hconfig2
+
ARGUMENTS: +
     type(ESMF_HConfig) :: hconfig1
+     type(ESMF_HConfig) :: hconfig2
+
+DESCRIPTION: +
+ +

+Assign hconfig1 as an alias to the same ESMF HConfig object in memory + as hconfig2. If hconfig2 is invalid, then hconfig1 will be equally + invalid after the assignment. + +

+The arguments are: +

+
hconfig1
+
The ESMF_HConfig object on the left hand side of the assignment. + +
+
hconfig2
+
The ESMF_HConfig object on the right hand side of the assignment. + +
+
+ +

+ +

+ +

+48.6.2 ESMF_HConfigOperator(==) - HConfig equality operator +

+ +

+ +

+
+INTERFACE: +

   interface operator(==)
+     if (hconfig1 == hconfig2) then ... endif
+               OR
+     result = (hconfig1 == hconfig2)
+
RETURN VALUE: +
     logical :: result
+
ARGUMENTS: +
     type(ESMF_HConfig), intent(in) :: hconfig1
+     type(ESMF_HConfig), intent(in) :: hconfig2
+
+DESCRIPTION: +
+ +

+Test whether hconfig1 and hconfig2 are valid aliases to the same ESMF + HConfig object in memory. For a more general comparison of two + ESMF HConfigs, going beyond the simple alias test, the + ESMF_HConfigMatch() function (48.6.44) must + be used. + +

+The arguments are: +

+
hconfig1
+
The ESMF_HConfig object on the left hand side of the equality + operation. + +
+
hconfig2
+
The ESMF_HConfig object on the right hand side of the equality + operation. + +
+
+ +

+ +

+ +

+48.6.3 ESMF_HConfigOperator(/=) - HConfig not equal operator +

+ +

+ +

+
+INTERFACE: +

   interface operator(/=)
+     if (hconfig1 /= hconfig2) then ... endif
+               OR
+     result = (hconfig1 /= hconfig2)
+
RETURN VALUE: +
     logical :: result
+
ARGUMENTS: +
     type(ESMF_HConfig), intent(in) :: hconfig1
+     type(ESMF_HConfig), intent(in) :: hconfig2
+
+DESCRIPTION: +
+ +

+Test whether hconfig1 and hconfig2 are not valid aliases to the + same ESMF HConfig object in memory. For a more general comparison of two + ESMF HConfigs, going beyond the simple alias test, the + ESMF_HConfigMatch() function (48.6.44) must + be used. + +

+The arguments are: +

+
hconfig1
+
The ESMF_HConfig object on the left hand side of the non-equality + operation. + +
+
hconfig2
+
The ESMF_HConfig object on the right hand side of the non-equality + operation. + +
+
+ +

+ +

+ +

+48.6.4 ESMF_HConfigAdd - Add <Type> content to HConfig object +

+ +

+ +

+
+INTERFACE: +

    subroutine ESMF_HConfigAdd(hconfig, content, &
+      addKey, addKeyString, index, keyString, doc, rc)
+
ARGUMENTS: +
      type(ESMF_HConfig[Iter]), intent(in)      :: hconfig
+      <Type>,             intent(in)            :: content[(:)]
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+      type(ESMF_HConfig), intent(in),  optional :: addKey
+      character(*),       intent(in),  optional :: addKeyString
+      integer,            intent(in),  optional :: index
+      character(*),       intent(in),  optional :: keyString
+      integer,            intent(in),  optional :: doc
+      integer,            intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Add the content of type <Type> to the hconfig, + at the current location, or as specified by index or keyString + (mutually exclusive!). + Most <Type> options support the sequence array variant (:) in + addition to the scalar variant. + +

+If either addKey or addKeyString (mutually exclusive!) is + specified, then add a new map element with the respective key. + Otherwise add a new list element at the end of the list. Error checking + is implemented to ensure respective conditions are met. + +

+The supported <Type> options are: + +

    +
  • type(HConfig) (Scalar only variant! + Only a single HConfig object can be provided.) +
  • +
  • integer(ESMF_KIND_I4) +
  • +
  • integer(ESMF_KIND_I8) +
  • +
  • logical +
  • +
  • real(ESMF_KIND_R4) +
  • +
  • real(ESMF_KIND_R8) +
  • +
  • character(*) + +
  • +
+ +

+The arguments are: +

+
hconfig
+
ESMF_HConfig or ESMF_HConfigIter object. + +
+
content
+
The content to be added. + +
+
[addKey]
+
The key under which to add the new map item. + Muturally exclusive with addKeyString. + +
+
[addKeyString]
+
The key string under which to add the new map item. + Muturally exclusive with addKey. + +
+
[index]
+
Attempt to access by index if specified. + Requires hconfig of NodeType Sequence. + Muturally exclusive with keyString. + +
+
[keyString]
+
Attempt to access by key string if specified. + Requires hconfig of NodeType Map. + Muturally exclusive with index. + +
+
[doc]
+
The doc index. Defaults to the first document. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+48.6.5 ESMF_HConfigAddMapKey - Add <Type> content to HConfig MapKey object +

+ +

+ +

+
+INTERFACE: +

    subroutine ESMF_HConfigAddMapKey(hconfig, content, &
+      addKey, addKeyString, index, keyString, doc, rc)
+
ARGUMENTS: +
      type(ESMF_HConfigIter), intent(in)        :: hconfig
+      <Type>,             intent(in)            :: content[(:)]
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+      type(ESMF_HConfig), intent(in),  optional :: addKey
+      character(*),       intent(in),  optional :: addKeyString
+      integer,            intent(in),  optional :: index
+      character(*),       intent(in),  optional :: keyString
+      integer,            intent(in),  optional :: doc
+      integer,            intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Add the content of type <Type> to the hconfig map key, + at the current location, or as specified by index or keyString + (mutually exclusive!). + Most <Type> options support the sequence array variant (:) in + addition to the scalar variant. + +

+If either addKey or addKeyString (mutually exclusive!) is + specified, then add a new map element with the respective key. + Otherwise add a new list element at the end of the list. Error checking + is implemented to ensure respective conditions are met. + +

+The supported <Type> options are: + +

    +
  • type(HConfig) (Scalar only variant! + Only a single HConfig object can be provided.) +
  • +
  • integer(ESMF_KIND_I4) +
  • +
  • integer(ESMF_KIND_I8) +
  • +
  • logical +
  • +
  • real(ESMF_KIND_R4) +
  • +
  • real(ESMF_KIND_R8) +
  • +
  • character(*) + +
  • +
+ +

+The arguments are: +

+
hconfig
+
ESMF_HConfigIter object. + +
+
content
+
The content to be added. + +
+
[addKey]
+
The key under which to add the new map item. + Muturally exclusive with addKeyString. + +
+
[addKeyString]
+
The key string under which to add the new map item. + Muturally exclusive with addKey. + +
+
[index]
+
Attempt to access by index if specified. + Requires hconfig of NodeType Sequence. + Muturally exclusive with keyString. + +
+
[keyString]
+
Attempt to access by key string if specified. + Requires hconfig of NodeType Map. + Muturally exclusive with index. + +
+
[doc]
+
The doc index. Defaults to the first document. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+48.6.6 ESMF_HConfigAddMapVal - Add <Type> content to HConfig MapVal object +

+ +

+ +

+
+INTERFACE: +

    subroutine ESMF_HConfigAddMapVal(hconfig, content, &
+      addKey, addKeyString, index, keyString, doc, rc)
+
ARGUMENTS: +
      type(ESMF_HConfigIter), intent(in)        :: hconfig
+      <Type>,             intent(in)            :: content[(:)]
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+      type(ESMF_HConfig), intent(in),  optional :: addKey
+      character(*),       intent(in),  optional :: addKeyString
+      integer,            intent(in),  optional :: index
+      character(*),       intent(in),  optional :: keyString
+      integer,            intent(in),  optional :: doc
+      integer,            intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Add the content of type <Type> to the hconfig map value, + at the current location, or as specified by index or keyString + (mutually exclusive!). + Most <Type> options support the sequence array variant (:) in + addition to the scalar variant. + +

+If either addKey or addKeyString (mutually exclusive!) is + specified, then add a new map element with the respective key. + Otherwise add a new list element at the end of the list. Error checking + is implemented to ensure respective conditions are met. + +

+The supported <Type> options are: + +

    +
  • type(HConfig) (Scalar only variant! + Only a single HConfig object can be provided.) +
  • +
  • integer(ESMF_KIND_I4) +
  • +
  • integer(ESMF_KIND_I8) +
  • +
  • logical +
  • +
  • real(ESMF_KIND_R4) +
  • +
  • real(ESMF_KIND_R8) +
  • +
  • character(*) + +
  • +
+ +

+The arguments are: +

+
hconfig
+
ESMF_HConfigIter object. + +
+
content
+
The content to be added. + +
+
[addKey]
+
The key under which to add the new map item. + Muturally exclusive with addKeyString. + +
+
[addKeyString]
+
The key string under which to add the new map item. + Muturally exclusive with addKey. + +
+
[index]
+
Attempt to access by index if specified. + Requires hconfig of NodeType Sequence. + Muturally exclusive with keyString. + +
+
[keyString]
+
Attempt to access by key string if specified. + Requires hconfig of NodeType Map. + Muturally exclusive with index. + +
+
[doc]
+
The doc index. Defaults to the first document. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+48.6.7 ESMF_HConfigAs<TypeSpec> - Return value as <Type> +

+ +

+ +

+
+INTERFACE: +

    function ESMF_HConfigAs<TypeSpec>(hconfig, index, keyString, &
+      doc, asOkay, rc)
+
RETURN VALUE: +
      <Type> :: ESMF_HConfigAs<TypeSpec>
+
ARGUMENTS: +
      type(ESMF_HConfig[Iter]) , intent(in)     :: hconfig
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+      integer,            intent(in),  optional :: index
+      character(*),       intent(in),  optional :: keyString
+      integer,            intent(in),  optional :: doc
+      logical,            intent(out), optional :: asOkay
+      integer,            intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Return the value of item hconfig interpreted as <Type>. + The returned value is only valid if rc == ESMF_SUCCESS, and, if + provided, asOkay == .true.. + +

+The supported <Type> / <TypeSpec> options are: + +

    +
  • integer(ESMF_KIND_I4) / I4 +
  • +
  • integer(ESMF_KIND_I8) / I8 +
  • +
  • logical / Logical +
  • +
  • real(ESMF_KIND_R4) / R4 +
  • +
  • real(ESMF_KIND_R8) / R8 +
  • +
  • character(len=:), allocatable / String + +
  • +
+ +

+The arguments are: +

+
hconfig
+
ESMF_HConfig or ESMF_HConfigIter object. + +
+
[index]
+
Attempt to access by index if specified. + Requires hconfig of NodeType Sequence. + Muturally exclusive with keyString. + +
+
[keyString]
+
Attempt to access by key string if specified. + Requires hconfig of NodeType Map. + Muturally exclusive with index. + +
+
[doc]
+
The doc index. Defaults to the first document. + +
+
[asOkay]
+
Set to .true. for successful convertion to the requested typekind. + Set to .false. otherwise. By default, i.e. without asOkay, + the latter condition leads to rc /= ESMF_SUCCESS. + Providing asOkay returns rc == ESMF_SUCCESS in either case, + and the validity of the returned converted value is determined by + asOkay. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+48.6.8 ESMF_HConfigAs<TypeSpec>MapKey - Return map key as <Type> +

+ +

+ +

+
+INTERFACE: +

    function ESMF_HConfigAs<TypeSpec>MapKey(hconfig, index, keyString, &
+      doc, asOkay, rc)
+
RETURN VALUE: +
      <Type> :: ESMF_HConfigAs<TypeSpec>MapKey
+
ARGUMENTS: +
      type(ESMF_HConfigIter), intent(in)        :: hconfig
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+      integer,            intent(in),  optional :: index
+      character(*),       intent(in),  optional :: keyString
+      integer,            intent(in),  optional :: doc
+      logical,            intent(out), optional :: asOkay
+      integer,            intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Return the map key of item hconfig interpreted as <Type>. + The returned value is only valid if rc == ESMF_SUCCESS, and, if + provided, asOkay == .true.. + +

+The supported <Type> / <TypeSpec> options are: + +

    +
  • integer(ESMF_KIND_I4) / I4 +
  • +
  • integer(ESMF_KIND_I8) / I8 +
  • +
  • logical / Logical +
  • +
  • real(ESMF_KIND_R4) / R4 +
  • +
  • real(ESMF_KIND_R8) / R8 +
  • +
  • character(len=:), allocatable / String + +
  • +
+ +

+The arguments are: +

+
hconfig
+
ESMF_HConfigIter object. + +
+
[index]
+
Attempt to access by index if specified. + Requires hconfig of NodeType Sequence. + Muturally exclusive with keyString. + +
+
[keyString]
+
Attempt to access by key string if specified. + Requires hconfig of NodeType Map. + Muturally exclusive with index. + +
+
[doc]
+
The doc index. Defaults to the first document. + +
+
[asOkay]
+
Set to .true. for successful convertion to the requested typekind. + Set to .false. otherwise. By default, i.e. without asOkay, + the latter condition leads to rc /= ESMF_SUCCESS. + Providing asOkay returns rc == ESMF_SUCCESS in either case, + and the validity of the returned converted value is determined by + asOkay. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+48.6.9 ESMF_HConfigAs<TypeSpec>MapVal - Return map value as <Type> +

+ +

+ +

+
+INTERFACE: +

    function ESMF_HConfigAs<TypeSpec>MapVal(hconfig, index, keyString, &
+      doc, asOkay, rc)
+
RETURN VALUE: +
      <Type> :: ESMF_HConfigAs<TypeSpec>MapVal
+
ARGUMENTS: +
      type(ESMF_HConfigIter), intent(in)        :: hconfig
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+      integer,            intent(in),  optional :: index
+      character(*),       intent(in),  optional :: keyString
+      integer,            intent(in),  optional :: doc
+      logical,            intent(out), optional :: asOkay
+      integer,            intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Return the map value of item hconfig interpreted as <Type>. + The returned value is only valid if rc == ESMF_SUCCESS, and, if + provided, asOkay == .true.. + +

+The supported <Type> / <TypeSpec> options are: + +

    +
  • integer(ESMF_KIND_I4) / I4 +
  • +
  • integer(ESMF_KIND_I8) / I8 +
  • +
  • logical / Logical +
  • +
  • real(ESMF_KIND_R4) / R4 +
  • +
  • real(ESMF_KIND_R8) / R8 +
  • +
  • character(len=:), allocatable / String + +
  • +
+ +

+The arguments are: +

+
hconfig
+
ESMF_HConfigIter object. + +
+
[index]
+
Attempt to access by index if specified. + Requires hconfig of NodeType Sequence. + Muturally exclusive with keyString. + +
+
[keyString]
+
Attempt to access by key string if specified. + Requires hconfig of NodeType Map. + Muturally exclusive with index. + +
+
[doc]
+
The doc index. Defaults to the first document. + +
+
[asOkay]
+
Set to .true. for successful convertion to the requested typekind. + Set to .false. otherwise. By default, i.e. without asOkay, + the latter condition leads to rc /= ESMF_SUCCESS. + Providing asOkay returns rc == ESMF_SUCCESS in either case, + and the validity of the returned converted value is determined by + asOkay. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+48.6.10 ESMF_HConfigAs<TypeSpec>Seq - Return value as sequence array of <Type> +

+ +

+ +

+
+INTERFACE: +

    function ESMF_HConfigAs<TypeSpec>Seq(hconfig, index, keyString, &
+      doc, asOkay, rc)
+
RETURN VALUE: +
      <Type>, allocatable :: ESMF_HConfigAs<TypeSpec>Seq(:)
+
ARGUMENTS: +
      type(ESMF_HConfig[Iter]), intent(in)      :: hconfig
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+      integer,            intent(in),  optional :: index
+      character(*),       intent(in),  optional :: keyString
+      integer,            intent(in),  optional :: doc
+      logical,            intent(out), optional :: asOkay
+      integer,            intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Return the value of item hconfig interpreted as sequence of <Type>. + The returned value is only valid if rc == ESMF_SUCCESS, and, if + provided, asOkay == .true.. + +

+The supported <Type> / <TypeSpec> options are: + +

    +
  • integer(ESMF_KIND_I4) / I4 +
  • +
  • integer(ESMF_KIND_I8) / I8 +
  • +
  • logical / Logical +
  • +
  • real(ESMF_KIND_R4) / R4 +
  • +
  • real(ESMF_KIND_R8) / R8 +
  • +
  • character(len=:), allocatable / String (See note about stringLen argument below!) + +
  • +
+ +

+An extra non-optional argument stringLen must be provided for the + String option. This argument specifies the number of characters in + each of the output strings. Longer actual string values are tuncated, while + shorter actual string values are padded with white space. + +

+The arguments are: +

+
hconfig
+
ESMF_HConfig or ESMF_HConfigIter object. + +
+
[index]
+
Attempt to access by index if specified. + Requires hconfig of NodeType Sequence. + Muturally exclusive with keyString. + +
+
[keyString]
+
Attempt to access by key string if specified. + Requires hconfig of NodeType Map. + Muturally exclusive with index. + +
+
[doc]
+
The doc index. Defaults to the first document. + +
+
[asOkay]
+
Set to .true. for successful convertion to the requested typekind. + Set to .false. otherwise. By default, i.e. without asOkay, + the latter condition leads to rc /= ESMF_SUCCESS. + Providing asOkay returns rc == ESMF_SUCCESS in either case, + and the validity of the returned converted value is determined by + asOkay. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+48.6.11 ESMF_HConfigAs<TypeSpec>SeqMapKey - Return map key value as sequence array of <Type> +

+ +

+ +

+
+INTERFACE: +

    function ESMF_HConfigAs<TypeSpec>SeqMapKey(hconfig, index, keyString, &
+      doc, asOkay, rc)
+
RETURN VALUE: +
      <Type>, allocatable :: ESMF_HConfigAs<TypeSpec>SeqMapKey(:)
+
ARGUMENTS: +
      type(ESMF_HConfigIter), intent(in)        :: hconfig
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+      integer,            intent(in),  optional :: index
+      character(*),       intent(in),  optional :: keyString
+      integer,            intent(in),  optional :: doc
+      logical,            intent(out), optional :: asOkay
+      integer,            intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Return the map key of item hconfig interpreted as sequence of <Type>. + The returned value is only valid if rc == ESMF_SUCCESS, and, if + provided, asOkay == .true.. + +

+The supported <Type> / <TypeSpec> options are: + +

    +
  • integer(ESMF_KIND_I4) / I4 +
  • +
  • integer(ESMF_KIND_I8) / I8 +
  • +
  • logical / Logical +
  • +
  • real(ESMF_KIND_R4) / R4 +
  • +
  • real(ESMF_KIND_R8) / R8 +
  • +
  • character(len=:), allocatable / String (See note about stringLen argument below!) + +
  • +
+ +

+An extra non-optional argument stringLen must be provided for the + String option. This argument specifies the number of characters in + each of the output strings. Longer actual string values are tuncated, while + shorter actual string values are padded with white space. + +

+The arguments are: +

+
hconfig
+
ESMF_HConfig object. + +
+
[index]
+
Attempt to access by index if specified. + Requires hconfig of NodeType Sequence. + Muturally exclusive with keyString. + +
+
[keyString]
+
Attempt to access by key string if specified. + Requires hconfig of NodeType Map. + Muturally exclusive with index. + +
+
[doc]
+
The doc index. Defaults to the first document. + +
+
[asOkay]
+
Set to .true. for successful convertion to the requested typekind. + Set to .false. otherwise. By default, i.e. without asOkay, + the latter condition leads to rc /= ESMF_SUCCESS. + Providing asOkay returns rc == ESMF_SUCCESS in either case, + and the validity of the returned converted value is determined by + asOkay. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+48.6.12 ESMF_HConfigAs<TypeSpec>SeqMapVal - Return map value as sequence array of <Type> +

+ +

+ +

+
+INTERFACE: +

    function ESMF_HConfigAs<TypeSpec>SeqMapVal(hconfig, index, keyString, &
+      doc, asOkay, rc)
+
RETURN VALUE: +
      <Type>, allocatable :: ESMF_HConfigAs<TypeSpec>SeqMapVal(:)
+
ARGUMENTS: +
      type(ESMF_HConfigIter), intent(in)        :: hconfig
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+      integer,            intent(in),  optional :: index
+      character(*),       intent(in),  optional :: keyString
+      integer,            intent(in),  optional :: doc
+      logical,            intent(out), optional :: asOkay
+      integer,            intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Return the map value of item hconfig interpreted as sequence of <Type>. + The returned value is only valid if rc == ESMF_SUCCESS, and, if + provided, asOkay == .true.. + +

+The supported <Type> / <TypeSpec> options are: + +

    +
  • integer(ESMF_KIND_I4) / I4 +
  • +
  • integer(ESMF_KIND_I8) / I8 +
  • +
  • logical / Logical +
  • +
  • real(ESMF_KIND_R4) / R4 +
  • +
  • real(ESMF_KIND_R8) / R8 +
  • +
  • character(len=:), allocatable / String (See note about stringLen argument below!) + +
  • +
+ +

+An extra non-optional argument stringLen must be provided for the + String option. This argument specifies the number of characters in + each of the output strings. Longer actual string values are tuncated, while + shorter actual string values are padded with white space. + +

+The arguments are: +

+
hconfig
+
ESMF_HConfigIter object. + +
+
[index]
+
Attempt to access by index if specified. + Requires hconfig of NodeType Sequence. + Muturally exclusive with keyString. + +
+
[keyString]
+
Attempt to access by key string if specified. + Requires hconfig of NodeType Map. + Muturally exclusive with index. + +
+
[doc]
+
The doc index. Defaults to the first document. + +
+
[asOkay]
+
Set to .true. for successful convertion to the requested typekind. + Set to .false. otherwise. By default, i.e. without asOkay, + the latter condition leads to rc /= ESMF_SUCCESS. + Providing asOkay returns rc == ESMF_SUCCESS in either case, + and the validity of the returned converted value is determined by + asOkay. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+48.6.13 ESMF_HConfigCreate - Create HConfig object from YAML string or file +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_HConfigCreate()
+   function ESMF_HConfigCreateDefault(content, filename, rc)
+
RETURN VALUE: +
     type(ESMF_HConfig) :: ESMF_HConfigCreateDefault
+
ARGUMENTS: +
 -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     character(len=*),   intent(in),  optional :: content
+     character(len=*),   intent(in),  optional :: filename
+     integer,            intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Create a new HConfig object. The object is empty unless either the + content or filename argument is specified. + +

+The arguments are: +

+
[content]
+
String containing the YAML text. Mutually exclusive with + filename argument. + +
+
[filename]
+
Name of the YAML file to be loaded. Mutually exclusive with + content argument. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+48.6.14 ESMF_HConfigCreate - Create HConfig object from HConfig object +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_HConfigCreate()
+   function ESMF_HConfigCreateHConfig(content, rc)
+
RETURN VALUE: +
     type(ESMF_HConfig) :: ESMF_HConfigCreateHConfig
+
ARGUMENTS: +
     type(ESMF_HConfig), intent(in)            :: content
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,            intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Create a new HConfig object from existing HConfig object as a deep copy. + +

+The arguments are: +

+
content
+
HConfig content. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+48.6.15 ESMF_HConfigCreate - Create HConfig object from <Type> content +

+ +

+ +

+
+INTERFACE: +

    function ESMF_HConfigCreate(content, rc)
+
RETURN VALUE: +
      type(ESMF_HConfig) :: ESMF_HConfigCreate
+
ARGUMENTS: +
      <Type>,  intent(in)            :: content[(:)]
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+      integer, intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Create a new HConfig object from content of type <Type>. All <Type> options + support the sequence array variant (:) in addition to the scalar + variant. + +

+The supported <Type> options are: + +

    +
  • integer(ESMF_KIND_I4) +
  • +
  • integer(ESMF_KIND_I8) +
  • +
  • logical +
  • +
  • real(ESMF_KIND_R4) +
  • +
  • real(ESMF_KIND_R8) + +
  • +
+ +

+The arguments are: +

+
content
+
Content of type <Type>. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+48.6.16 ESMF_HConfigCreate - Create HConfig object from String sequence array +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_HConfigCreate()
+   function ESMF_HConfigCreateStringSeq(content, rc)
+
RETURN VALUE: +
     type(ESMF_HConfig) :: ESMF_HConfigCreateStringSeq
+
ARGUMENTS: +
     character(len=*),   intent(in)            :: content(:)
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,            intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Create a new HConfig object. + +

+The arguments are: +

+
content
+
String content. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+48.6.17 ESMF_HConfigCreateAt - Return HConfig object at location +

+ +

+ +

+
+INTERFACE: +

    function ESMF_HConfigCreateAt(hconfig, index, key, &
+      keyString, doc, rc)
+
RETURN VALUE: +
      type(ESMF_HConfig) :: ESMF_HConfigCreateAt
+
ARGUMENTS: +
      type(ESMF_HConfig[Iter]), intent(in)      :: hconfig
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+      integer,            intent(in),  optional :: index
+      type(ESMF_HConfig), intent(in),  optional :: key
+      character(*),       intent(in),  optional :: keyString
+      integer,            intent(in),  optional :: doc
+      integer,            intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Create a new HConfig object at the current iteration, or + as specified by index, key or keyString. + The hconfig must not be a map iterator. + +

+The arguments are: +

+
hconfig
+
ESMF_HConfig or ESMF_HConfigIter object. + +
+
[index]
+
Attempt to access by index if specified. + Requires hconfig of NodeType Sequence. + Muturally exclusive with key and keyString. + +
+
[key]
+
Attempt to access by key if specified. Muturally exclusive with + index and keyString, + +
+
[keyString]
+
Attempt to access by key string if specified. + Requires hconfig of NodeType Map. + Muturally exclusive with index and key. + +
+
[doc]
+
The doc index. Defaults to the first document. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+48.6.18 ESMF_HConfigCreateAtMapKey - Return HConfig object at location +

+ +

+ +

+
+INTERFACE: +

   function ESMF_HConfigCreateAtMapKey(hconfig, index, key, &
+     keyString, doc, rc)
+
RETURN VALUE: +
     type(ESMF_HConfig) :: ESMF_HConfigCreateAtMapKey
+
ARGUMENTS: +
     type(ESMF_HConfigIter), intent(in)        :: hconfig
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,            intent(in),  optional :: index
+     type(ESMF_HConfig), intent(in),  optional :: key
+     character(*),       intent(in),  optional :: keyString
+     integer,            intent(in),  optional :: doc
+     integer,            intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Create a new HConfig object for a map key at the current iteration, or + as specified by index, key or keyString. + The hconfig must be a map iterator. + +

+The arguments are: +

+
hconfig
+
ESMF_HConfigIter object. + +
+
[index]
+
Attempt to access by index if specified. + Requires hconfig of NodeType Sequence. + Muturally exclusive with key and keyString. + +
+
[key]
+
Attempt to access by key if specified. Muturally exclusive with + index and keyString, + +
+
[keyString]
+
Attempt to access by key string if specified. + Requires hconfig of NodeType Map. + Muturally exclusive with index and key. + +
+
[doc]
+
The doc index. Defaults to the first document. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+48.6.19 ESMF_HConfigCreateAtMapVal - Return HConfig object at location +

+ +

+ +

+
+INTERFACE: +

   function ESMF_HConfigCreateAtMapVal(hconfig, index, key, &
+     keyString, doc, rc)
+
RETURN VALUE: +
     type(ESMF_HConfig) :: ESMF_HConfigCreateAtMapVal
+
ARGUMENTS: +
     type(ESMF_HConfigIter), intent(in)        :: hconfig
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,            intent(in),  optional :: index
+     type(ESMF_HConfig), intent(in),  optional :: key
+     character(*),       intent(in),  optional :: keyString
+     integer,            intent(in),  optional :: doc
+     integer,            intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Create a new HConfig object for a map value at the current iteration, or + as specified by index, key or keyString. + The hconfig must be a map iterator. + +

+The arguments are: +

+
hconfig
+
ESMF_HConfigIter object. + +
+
[index]
+
Attempt to access by index if specified. + Requires hconfig of NodeType Sequence. + Muturally exclusive with key and keyString. + +
+
[key]
+
Attempt to access by key if specified. Muturally exclusive with + index and keyString, + +
+
[keyString]
+
Attempt to access by key string if specified. + Requires hconfig of NodeType Map. + Muturally exclusive with index and key. + +
+
[doc]
+
The doc index. Defaults to the first document. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+48.6.20 ESMF_HConfigDestroy - Release resources associated with a HConfig +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_HConfigDestroy(hconfig, rc)
+
ARGUMENTS: +
     type(ESMF_HConfig), intent(inout)          :: hconfig
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+      integer,            intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Destroys an ESMF_HConfig, releasing the resources associated + with the object. + +

+The arguments are: +

+
hconfig
+
ESMF_HConfig object to be destroyed. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+48.6.21 ESMF_HConfigFileLoad - Load file into HConfig +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_HConfigFileLoad(hconfig, filename, doc, rc)
+
ARGUMENTS: +
     type(ESMF_HConfig), intent(in)            :: hconfig
+     character(len=*),   intent(in)            :: filename
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,            intent(in),  optional :: doc
+     integer,            intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Load YAML file into hconfig. + +

+The arguments are: +

+
hconfig
+
ESMF_HConfig object. + +
+
filename
+
Name of the YAML file to be loaded. + +
+
[doc]
+
The doc index inside the file. If specified, only this single document + is loaded from file, resulting in a single document hconfig object. + Defaults to all docs. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+48.6.22 ESMF_HConfigFileSave - Save HConfig to file +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_HConfigFileSave(hconfig, filename, doc, rc)
+
ARGUMENTS: +
     type(ESMF_HConfig), intent(in)            :: hconfig
+     character(len=*),   intent(in)            :: filename
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,            intent(in),  optional :: doc
+     integer,            intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Save HConfig into YAML file. Only localPet == 0 does the writing. + The hconfig must not be a map iterator. + +

+The arguments are: +

+
hconfig
+
ESMF_HConfig object. + +
+
filename
+
Name of the YAML file into which to save. + +
+
[doc]
+
The doc index inside hconfig. Defaults to all docs. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+48.6.23 ESMF_HConfigGetDocCount - Get number of docs in HConfig +

+ +

+ +

+
+INTERFACE: +

   function ESMF_HConfigGetDocCount(hconfig, rc)
+
RETURN VALUE: +
     integer :: ESMF_HConfigGetDocCount
+
ARGUMENTS: +
     type(ESMF_HConfig), intent(in)            :: hconfig
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,            intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Return the number of documents held by hconfig. + +

+The arguments are: +

+
hconfig
+
ESMF_HConfig object. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+48.6.24 ESMF_HConfigGetSize - Get size of HConfig node +

+ +

+ +

+
+INTERFACE: +

    function ESMF_HConfigGetSize(hconfig, index, keyString, doc, rc)
+
RETURN VALUE: +
      integer :: ESMF_HConfigGetSize
+
ARGUMENTS: +
      type(ESMF_HConfig[Iter]), intent(in)      :: hconfig
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+      integer,            intent(in),  optional :: index
+      character(*),       intent(in),  optional :: keyString
+      integer,            intent(in),  optional :: doc
+      integer,            intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Return the number of elements in collection hconfig. + +

+The arguments are: +

+
hconfig
+
ESMF_HConfig or ESMF_HConfigIter object. + +
+
[index]
+
Attempt to access by index if specified. + Requires hconfig of NodeType Sequence. + Muturally exclusive with keyString. + +
+
[keyString]
+
Attempt to access by key string if specified. + Requires hconfig of NodeType Map. + Muturally exclusive with index. + +
+
[doc]
+
The doc index. Defaults to the first document. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+48.6.25 ESMF_HConfigGetSizeMapKey - Get size of HConfig node +

+ +

+ +

+
+INTERFACE: +

   function ESMF_HConfigGetSizeMapKey(hconfig, index, keyString, &
+     doc, rc)
+
RETURN VALUE: +
     integer :: ESMF_HConfigGetSizeMapKey
+
ARGUMENTS: +
     type(ESMF_HConfigIter), intent(in)        :: hconfig
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,            intent(in),  optional :: index
+     character(*),       intent(in),  optional :: keyString
+     integer,            intent(in),  optional :: doc
+     integer,            intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Return size of the hconfig node. + +

+The arguments are: +

+
hconfig
+
ESMF_HConfigIter object. + +
+
[index]
+
Attempt to access by index if specified. + Requires hconfig of NodeType Sequence. + Muturally exclusive with keyString. + +
+
[keyString]
+
Attempt to access by key string if specified. + Requires hconfig of NodeType Map. + Muturally exclusive with index. + +
+
[doc]
+
The doc index. Defaults to the first document. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+48.6.26 ESMF_HConfigGetSizeMapVal - Get size of HConfig node +

+ +

+ +

+
+INTERFACE: +

   function ESMF_HConfigGetSizeMapVal(hconfig, index, keyString, &
+     doc, rc)
+
RETURN VALUE: +
     integer :: ESMF_HConfigGetSizeMapVal
+
ARGUMENTS: +
     type(ESMF_HConfigIter), intent(in)        :: hconfig
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,            intent(in),  optional :: index
+     character(*),       intent(in),  optional :: keyString
+     integer,            intent(in),  optional :: doc
+     integer,            intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Return size of the hconfig node. + +

+The arguments are: +

+
hconfig
+
ESMF_HConfigIter object. + +
+
[index]
+
Attempt to access by index if specified. + Requires hconfig of NodeType Sequence. + Muturally exclusive with keyString. + +
+
[keyString]
+
Attempt to access by key string if specified. + Requires hconfig of NodeType Map. + Muturally exclusive with index. + +
+
[doc]
+
The doc index. Defaults to the first document. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+48.6.27 ESMF_HConfigGetTag - Get tag of HConfig node +

+ +

+ +

+
+INTERFACE: +

    function ESMF_HConfigGetTag(hconfig, index, keyString, doc, rc)
+
RETURN VALUE: +
      character(len=:), allocatable :: ESMF_HConfigGetTag
+
ARGUMENTS: +
      type(ESMF_HConfig[Iter]), intent(in)      :: hconfig
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+      integer,            intent(in),  optional :: index
+      character(*),       intent(in),  optional :: keyString
+      integer,            intent(in),  optional :: doc
+      integer,            intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Return tag string of the hconfig node. + +

+The arguments are: +

+
hconfig
+
ESMF_HConfig or ESMF_HConfigIter object. + +
+
[index]
+
Attempt to access by index if specified. + Requires hconfig of NodeType Sequence. + Muturally exclusive with keyString. + +
+
[keyString]
+
Attempt to access by key string if specified. + Requires hconfig of NodeType Map. + Muturally exclusive with index. + +
+
[doc]
+
The doc index. Defaults to the first document. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+48.6.28 ESMF_HConfigGetTagMapKey - Get tag of map key node +

+ +

+ +

+
+INTERFACE: +

   function ESMF_HConfigGetTagMapKey(hconfig, index, keyString, &
+     doc, rc)
+
RETURN VALUE: +
     character(len=:), allocatable :: ESMF_HConfigGetTagMapKey
+
ARGUMENTS: +
     type(ESMF_HConfigIter), intent(in)        :: hconfig
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,            intent(in),  optional :: index
+     character(*),       intent(in),  optional :: keyString
+     integer,            intent(in),  optional :: doc
+     integer,            intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Return tag string of map key of the hconfig node. + +

+The arguments are: +

+
hconfig
+
ESMF_HConfigIter object. + +
+
[index]
+
Attempt to access by index if specified. + Requires hconfig of NodeType Sequence. + Muturally exclusive with keyString. + +
+
[keyString]
+
Attempt to access by key string if specified. + Requires hconfig of NodeType Map. + Muturally exclusive with index. + +
+
[doc]
+
The doc index. Defaults to the first document. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+48.6.29 ESMF_HConfigGetTagMapVal - Get tag of map key node +

+ +

+ +

+
+INTERFACE: +

   function ESMF_HConfigGetTagMapVal(hconfig, index, keyString, &
+     doc, rc)
+
RETURN VALUE: +
     character(len=:), allocatable :: ESMF_HConfigGetTagMapVal
+
ARGUMENTS: +
     type(ESMF_HConfigIter), intent(in)        :: hconfig
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,            intent(in),  optional :: index
+     character(*),       intent(in),  optional :: keyString
+     integer,            intent(in),  optional :: doc
+     integer,            intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Return tag string of map key of the hconfig node. + +

+The arguments are: +

+
hconfig
+
ESMF_HConfigIter object. + +
+
[index]
+
Attempt to access by index if specified. + Requires hconfig of NodeType Sequence. + Muturally exclusive with keyString. + +
+
[keyString]
+
Attempt to access by key string if specified. + Requires hconfig of NodeType Map. + Muturally exclusive with index. + +
+
[doc]
+
The doc index. Defaults to the first document. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+48.6.30 ESMF_HConfigIs<NodeType> - Check for HConfig node type +

+ +

+ +

+
+INTERFACE: +

    function ESMF_HConfigIs<NodeType>(hconfig, index, keyString, &
+      doc, rc)
+
RETURN VALUE: +
      logical :: ESMF_HConfigIs<NodeType>
+
ARGUMENTS: +
      type(ESMF_HConfig[Iter]), intent(in)      :: hconfig
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+      integer,            intent(in),  optional :: index
+      character(*),       intent(in),  optional :: keyString
+      integer,            intent(in),  optional :: doc
+      integer,            intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Return .true. if the hconfig node is of node type + <NodeType>. Otherwise return .false.. If an error occurs, i.e. + rc /= ESMF_SUCCESS is returned, the return value of the function + will be .false.. + +

+The supported <NodeType> options are: + +

    +
  • Defined +
  • +
  • Null +
  • +
  • Map +
  • +
  • Scalar +
  • +
  • Sequence + +
  • +
+ +

+The arguments are: +

+
hconfig
+
ESMF_HConfig or ESMF_HConfigIter object. + +
+
[index]
+
Attempt to access by index if specified. + Requires hconfig of NodeType Sequence. + Muturally exclusive with keyString. + +
+
[keyString]
+
Attempt to access by key string if specified. + Requires hconfig of NodeType Map. + Muturally exclusive with index. + +
+
[doc]
+
The doc index. Defaults to the first document. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+48.6.31 ESMF_HConfigIs<NodeType>MapKey - Check for HConfig MapKey node type +

+ +

+ +

+
+INTERFACE: +

    function ESMF_HConfigIs<NodeType>MapKey(hconfig, index, keyString, &
+      doc, rc)
+
RETURN VALUE: +
      logical :: ESMF_HConfigIs<NodeType>MapKey
+
ARGUMENTS: +
      type(ESMF_HConfigIter), intent(in)       :: hconfig
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+      integer,            intent(in),  optional :: index
+      character(*),       intent(in),  optional :: keyString
+      integer,            intent(in),  optional :: doc
+      integer,            intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Return .true. if the hconfig MapKey node is of node type + <NodeType>. Otherwise return .false.. If an error occurs, i.e. + rc /= ESMF_SUCCESS is returned, the return value of the function + will be .false.. + +

+The supported <NodeType> options are: + +

    +
  • Defined +
  • +
  • Null +
  • +
  • Map +
  • +
  • Scalar +
  • +
  • Sequence + +
  • +
+ +

+The arguments are: +

+
hconfig
+
ESMF_HConfigIter object. + +
+
[index]
+
Attempt to access by index if specified. + Requires hconfig of NodeType Sequence. + Muturally exclusive with keyString. + +
+
[keyString]
+
Attempt to access by key string if specified. + Requires hconfig of NodeType Map. + Muturally exclusive with index. + +
+
[doc]
+
The doc index. Defaults to the first document. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+48.6.32 ESMF_HConfigIs<NodeType>MapVal - Check for HConfig MapVal node type +

+ +

+ +

+
+INTERFACE: +

    function ESMF_HConfigIs<NodeType>MapVal(hconfig, index, keyString, &
+      doc, rc)
+
RETURN VALUE: +
      logical :: ESMF_HConfigIs<NodeType>MapVal
+
ARGUMENTS: +
      type(ESMF_HConfigIter), intent(in)       :: hconfig
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+      integer,            intent(in),  optional :: index
+      character(*),       intent(in),  optional :: keyString
+      integer,            intent(in),  optional :: doc
+      integer,            intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Return .true. if the hconfig MapVal node is of node type + <NodeType>. Otherwise return .false.. If an error occurs, i.e. + rc /= ESMF_SUCCESS is returned, the return value of the function + will be .false.. + +

+The supported <NodeType> options are: + +

    +
  • Defined +
  • +
  • Null +
  • +
  • Map +
  • +
  • Scalar +
  • +
  • Sequence + +
  • +
+ +

+The arguments are: +

+
hconfig
+
ESMF_HConfigIter object. + +
+
[index]
+
Attempt to access by index if specified. + Requires hconfig of NodeType Sequence. + Muturally exclusive with keyString. + +
+
[keyString]
+
Attempt to access by key string if specified. + Requires hconfig of NodeType Map. + Muturally exclusive with index. + +
+
[doc]
+
The doc index. Defaults to the first document. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+48.6.33 ESMF_HConfigIterBegin - Iterator at the beginning +

+ +

+ +

+
+INTERFACE: +

    function ESMF_HConfigIterBegin(hconfig, rc)
+
RETURN VALUE: +
      type(ESMF_HConfigIter) :: ESMF_HConfigIterBegin
+
ARGUMENTS: +
      type(ESMF_HConfig[Iter]), intent(in)      :: hconfig
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+      integer,            intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Return an iterator that points to the first item in hconfig. + +

+The arguments are: +

+
hconfig
+
ESMF_HConfig or ESMF_HConfigIter object. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+48.6.34 ESMF_HConfigIterBeginMapKey - Iterator at the beginning +

+ +

+ +

+
+INTERFACE: +

   function ESMF_HConfigIterBeginMapKey(hconfig, rc)
+
RETURN VALUE: +
     type(ESMF_HConfigIter) :: ESMF_HConfigIterBeginMapKey
+
ARGUMENTS: +
     type(ESMF_HConfigIter), intent(in)        :: hconfig
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,            intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Return an iterator that points to the first item in hconfig. + +

+The arguments are: +

+
hconfig
+
ESMF_HConfigIter object. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+48.6.35 ESMF_HConfigIterBeginMapVal - Iterator at the beginning +

+ +

+ +

+
+INTERFACE: +

   function ESMF_HConfigIterBeginMapVal(hconfig, rc)
+
RETURN VALUE: +
     type(ESMF_HConfigIter) :: ESMF_HConfigIterBeginMapVal
+
ARGUMENTS: +
     type(ESMF_HConfigIter), intent(in)        :: hconfig
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,            intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Return an iterator that points to the first item in hconfig. + +

+The arguments are: +

+
hconfig
+
ESMF_HConfigIter object. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+48.6.36 ESMF_HConfigIterEnd - Iterator at the end +

+ +

+ +

+
+INTERFACE: +

    function ESMF_HConfigIterEnd(hconfig, rc)
+
RETURN VALUE: +
      type(ESMF_HConfigIter) :: ESMF_HConfigIterEnd
+
ARGUMENTS: +
      type(ESMF_HConfig[Iter]), intent(in)      :: hconfig
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+      integer,            intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Return an iterator that points to one past the last item in hconfig. + +

+The arguments are: +

+
hconfig
+
ESMF_HConfig or ESMF_HConfigIter object. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+48.6.37 ESMF_HConfigIterEndMapKey - Iterator at the end +

+ +

+ +

+
+INTERFACE: +

   function ESMF_HConfigIterEndMapKey(hconfig, rc)
+
RETURN VALUE: +
     type(ESMF_HConfigIter) :: ESMF_HConfigIterEndMapKey
+
ARGUMENTS: +
     type(ESMF_HConfigIter), intent(in)        :: hconfig
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,            intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Return an iterator that points to one past the last item in hconfig. + +

+The arguments are: +

+
hconfig
+
ESMF_HConfigIter object. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+48.6.38 ESMF_HConfigIterEndMapVal - Iterator at the end +

+ +

+ +

+
+INTERFACE: +

   function ESMF_HConfigIterEndMapVal(hconfig, rc)
+
RETURN VALUE: +
     type(ESMF_HConfigIter) :: ESMF_HConfigIterEndMapVal
+
ARGUMENTS: +
     type(ESMF_HConfigIter), intent(in)        :: hconfig
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,            intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Return an iterator that points to one past the last item in hconfig. + +

+The arguments are: +

+
hconfig
+
ESMF_HConfigIter object. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+48.6.39 ESMF_HConfigIterIsMap - Check whether HConfig iterator is Map +

+ +

+ +

+
+INTERFACE: +

   function ESMF_HConfigIterIsMap(hconfig, rc)
+
RETURN VALUE: +
     logical :: ESMF_HConfigIterIsMap
+
ARGUMENTS: +
     type(ESMF_HConfigIter), intent(in)        :: hconfig
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,            intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Return .true. if the hconfig node is Null. Otherwise return + .false.. If an error occurs, i.e. rc /= ESMF_SUCCESS is + returned, the return value of the function will also be .false.. + +

+The arguments are: +

+
hconfig
+
ESMF_HConfigIter object. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+48.6.40 ESMF_HConfigIterIsSequence - Check whether HConfig iterator is Sequence +

+ +

+ +

+
+INTERFACE: +

   function ESMF_HConfigIterIsSequence(hconfig, rc)
+
RETURN VALUE: +
     logical :: ESMF_HConfigIterIsSequence
+
ARGUMENTS: +
     type(ESMF_HConfigIter), intent(in)        :: hconfig
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,            intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Return .true. if the hconfig node is Null. Otherwise return + .false.. If an error occurs, i.e. rc /= ESMF_SUCCESS is + returned, the return value of the function will also be .false.. + +

+The arguments are: +

+
hconfig
+
ESMF_HConfigIter object. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+48.6.41 ESMF_HConfigIterLoop - Step iterator forward +

+ +

+ +

+
+INTERFACE: +

   function ESMF_HConfigIterLoop(hconfig, hconfigBegin, hconfigEnd, rc)
+
RETURN VALUE: +
     logical :: ESMF_HConfigIterLoop
+
ARGUMENTS: +
     type(ESMF_HConfigIter), intent(inout)     :: hconfig
+     type(ESMF_HConfigIter), intent(in)        :: hconfigBegin
+     type(ESMF_HConfigIter), intent(in)        :: hconfigEnd
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,            intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Step the iterator hconfig forward. starting at hconfigBegin + until hconfigEnd is reached. Returns .true. as long as + hconfig has not reached hconfigEnd. Once this condition has + been reached, returns .false.. + +

+The intended usage of ESMF_HConfigIterLoop() is as the conditional + in a do while loop, iterating over the elements of a HConfig object. + +

+The arguments are: +

+
hconfig
+
The ESMF_HConfigIter object. Must enter equal to + hconfigBegin on the first loop step. + +
+
hconfigBegin
+
The ESMF_HConfigIter to begin at. + +
+
hconfigEnd
+
The ESMF_HConfigIter that marks the end of the loop. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+48.6.42 ESMF_HConfigIterNext - Step iterator forward +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_HConfigIterNext(hconfig, rc)
+
ARGUMENTS: +
     type(ESMF_HConfigIter), intent(inout)         :: hconfig
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,            intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Step the iterator hconfig one step forward. + +

+The arguments are: +

+
hconfig
+
ESMF_HConfigIter object. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+48.6.43 ESMF_HConfigLog - Log HConfig contents +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_HConfigLog(hconfig, prefix, logMsgFlag, doc, rc)
+
ARGUMENTS: +
     type(ESMF_HConfig),     intent(in)            :: hconfig
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     character(len=*),       intent(in),  optional :: prefix
+     type(ESMF_LogMsg_Flag), intent(in),  optional :: logMsgFlag
+     integer,                intent(in),  optional :: doc
+     integer,                intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Write the contents of hconfig to the ESMF default Log. + +

+The arguments are: +

+
hconfig
+
ESMF_HConfig object written to log. + +
+
[prefix]
+
String to prefix the log message. Default is no prefix. + +
+
[logMsgFlag]
+
Type of log message generated. See section 49.2.3 for + a list of valid message types. Default is ESMF_LOGMSG_INFO. + +
+
[doc]
+
The doc index. If specified, only content of the indicated + single document is written to log. Defaults to all docs. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+48.6.44 ESMF_HConfigMatch - Check if two HConfig objects match +

+ +

+ +

+
+INTERFACE: +

   function ESMF_HConfigMatch(hconfig1, hconfig2, rc)
+
RETURN VALUE: +
     type(ESMF_HConfigMatch_Flag) :: ESMF_HConfigMatch
+
ARGUMENTS: +
     type(ESMF_HConfig),  intent(in)             :: hconfig1
+     type(ESMF_HConfig),  intent(in)             :: hconfig2
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,              intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+ Determine the level to which hconfig1 and hconfig2 match. + +

+Returns a value of type ESMF_HConfigMatch_Flag, + indicating how closely the two HConfig objects match. For a description of + the possible return values, see 48.2.1. + Note that this call only performs PET local matching. Different match values + may be returned on different PETs for the same HConfig pair. + +

+The arguments are: +

+
hconfig1
+
ESMF_HConfig object. + +
+
hconfig2
+
ESMF_HConfig object. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+48.6.45 ESMF_HConfigRemove - Remove element from HConfig object +

+ +

+ +

+
+INTERFACE: +

    subroutine ESMF_HConfigRemove(hconfig, index, keyString, rc)
+
ARGUMENTS: +
      type(ESMF_HConfig[Iter]), intent(in)      :: hconfigIter
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+      integer,            intent(in),  optional :: index
+      character(*),       intent(in),  optional :: keyString
+      integer,            intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Remove an element from a squence or map HConfig object. Either index + (for sequence) or keyString (for map) must be provided. An error is + flagged if neither optional argument is specified. + +

+The arguments are: +

+
hconfig
+
ESMF_HConfig object. + +
+
[index]
+
Attempt to access by index if specified. + Requires hconfig of NodeType Sequence. + Muturally exclusive with keyString. + +
+
[keyString]
+
Attempt to access by key string if specified. + Requires hconfig of NodeType Map. + Muturally exclusive with index. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+48.6.46 ESMF_HConfigSet - Set <Type> content in HConfig object +

+ +

+ +

+
+INTERFACE: +

    subroutine ESMF_HConfigSet(hconfig, content, &
+      index, keyString, doc, rc)
+
ARGUMENTS: +
      type(ESMF_HConfig[Iter]), intent(in)      :: hconfig
+      <Type>,             intent(in)            :: content[(:)]
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+      integer,            intent(in),  optional :: index
+      character(*),       intent(in),  optional :: keyString
+      integer,            intent(in),  optional :: doc
+      integer,            intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Set the content of type <Type> to hconfig, + at the current location, or as specified by index or keyString + (mutually exclusive!). + Most <Type> options support the sequence array variant (:) in + addition to the scalar variant. + +

+The supported <Type> options are: + +

    +
  • type(HConfig) (Scalar only variant! + Only a single HConfig object can be provided.) +
  • +
  • integer(ESMF_KIND_I4) +
  • +
  • integer(ESMF_KIND_I8) +
  • +
  • logical +
  • +
  • real(ESMF_KIND_R4) +
  • +
  • real(ESMF_KIND_R8) +
  • +
  • character(*) + +
  • +
+ +

+The arguments are: +

+
hconfig
+
ESMF_HConfig or ESMF_HConfigIter object. + +
+
content
+
The content to be set. + +
+
[index]
+
Attempt to access by index if specified. + Requires hconfig of NodeType Sequence. + Muturally exclusive with keyString. + +
+
[keyString]
+
Attempt to access by key string if specified. + Requires hconfig of NodeType Map. + Muturally exclusive with index. + +
+
[doc]
+
The doc index. Defaults to the first document. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+48.6.47 ESMF_HConfigSetMapKey - Set <Type> content in HConfig MapKey object +

+ +

+ +

+
+INTERFACE: +

    subroutine ESMF_HConfigSet(hconfig, content, &
+      index, keyString, doc, rc)
+
ARGUMENTS: +
      type(ESMF_HConfigIter), intent(in)        :: hconfig
+      <Type>,             intent(in)            :: content[(:)]
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+      integer,            intent(in),  optional :: index
+      character(*),       intent(in),  optional :: keyString
+      integer,            intent(in),  optional :: doc
+      integer,            intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Set the content of type <Type> to the hconfig map key, + at the current location, or as specified by index or keyString + (mutually exclusive!). + Most <Type> options support the sequence array variant (:) in + addition to the scalar variant. + +

+The supported <Type> options are: + +

    +
  • type(HConfig) (Scalar only variant! + Only a single HConfig object can be provided.) +
  • +
  • integer(ESMF_KIND_I4) +
  • +
  • integer(ESMF_KIND_I8) +
  • +
  • logical +
  • +
  • real(ESMF_KIND_R4) +
  • +
  • real(ESMF_KIND_R8) +
  • +
  • character(*) + +
  • +
+ +

+The arguments are: +

+
hconfig
+
ESMF_HConfig or ESMF_HConfigIter object. + +
+
content
+
The content to be set. + +
+
[index]
+
Attempt to access by index if specified. + Requires hconfig of NodeType Sequence. + Muturally exclusive with keyString. + +
+
[keyString]
+
Attempt to access by key string if specified. + Requires hconfig of NodeType Map. + Muturally exclusive with index. + +
+
[doc]
+
The doc index. Defaults to the first document. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+48.6.48 ESMF_HConfigSetMapVal - Set <Type> content in HConfig MapVal object +

+ +

+ +

+
+INTERFACE: +

    subroutine ESMF_HConfigSet(hconfig, content, &
+      index, keyString, doc, rc)
+
ARGUMENTS: +
      type(ESMF_HConfigIter), intent(in)        :: hconfig
+      <Type>,             intent(in)            :: content[(:)]
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+      integer,            intent(in),  optional :: index
+      character(*),       intent(in),  optional :: keyString
+      integer,            intent(in),  optional :: doc
+      integer,            intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Set the content of type <Type> to the hconfig map value, + at the current location, or as specified by index or keyString + (mutually exclusive!). + Most <Type> options support the sequence array variant (:) in + addition to the scalar variant. + +

+The supported <Type> options are: + +

    +
  • type(HConfig) (Scalar only variant! + Only a single HConfig object can be provided.) +
  • +
  • integer(ESMF_KIND_I4) +
  • +
  • integer(ESMF_KIND_I8) +
  • +
  • logical +
  • +
  • real(ESMF_KIND_R4) +
  • +
  • real(ESMF_KIND_R8) +
  • +
  • character(*) + +
  • +
+ +

+The arguments are: +

+
hconfig
+
ESMF_HConfig or ESMF_HConfigIter object. + +
+
content
+
The content to be set. + +
+
[index]
+
Attempt to access by index if specified. + Requires hconfig of NodeType Sequence. + Muturally exclusive with keyString. + +
+
[keyString]
+
Attempt to access by key string if specified. + Requires hconfig of NodeType Map. + Muturally exclusive with index. + +
+
[doc]
+
The doc index. Defaults to the first document. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+48.6.49 ESMF_HConfigValidateMapKeys - Validate map keys against list of vocabulary +

+ +

+ +

+
+INTERFACE: +

   function ESMF_HConfigValidateMapKeys(hconfig, vocabulary, &
+     badKey, rc)
+
RETURN VALUE: +
     logical :: ESMF_HConfigValidateMapKeys
+
ARGUMENTS: +
     type(ESMF_HConfig),        intent(in)            :: hconfig
+     character(len=*),          intent(in)            :: vocabulary(:)
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     character(:), allocatable, intent(out), optional :: badKey
+     integer,                   intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Validate that the map held in hconfig only uses keys that + are listed in vocabulary. + +

+The arguments are: +

+
hconfig
+
A map HConfig object. + +
+
vocabulary
+
List of keys to validate against. + +
+
[badKey]
+
If returning .false. with ESMF_SUCCESS, then badKey is + set to the first key in hconfig that was not found in + vocabulary. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ + +

+ +
+49 Log Class +

+ +

+49.1 Description +

+ +

+ +

+The Log class consists of a variety of methods for writing error, warning, and +informational messages to files. A default Log is created at ESMF +initialization. Other Logs can be created later in the code by the user. Most +Log methods take a Log as an optional argument and apply to the default Log +when another Log is not specified. A set of standard return codes and +associated messages are provided for error handling. + +

+Log provides capabilities to store message entries in a buffer, which is +flushed to a file, either when the buffer is full, or when the user calls an +ESMF_LogFlush() method. Currently, the default is for the Log to flush +after every ten entries. This can easily be changed by using the +ESMF_LogSet() method and setting the maxElements property to +another value. The ESMF_LogFlush() method is automatically called when +the program exits by any means (program completion, halt on error, or when the +Log is closed). + +

+The user has the capability to abort the program on conditions such as +an error or on a warning by using the ESMF_LogSet() method with +the logmsgAbort argument. For example if the logmsgAbort array +is set to (ESMF_LOGMSG_ERROR,ESMF_LOGMSG_WARNING), the program will +stop on any and all warning or errors. When the logmsgAbort argument +is set to ESMF_LOGMSG_ERROR, the program will only abort on +errors. Lastly, the user can choose to never abort by using +ESMF_LOGMSG_NONE; this is the default. + +

+Log will automatically put the PET number into the Log. Also, the user can +either specify ESMF_LOGKIND_SINGLE which writes all the entries to a single +Log or ESMF_LOGKIND_MULTI which writes entries to multiple Logs according to +the PET number. To distinguish Logs from each other when using +ESMF_LOGKIND_MULTI, the PET number (in the format PETx.) will be +prepended to the file name where x is the PET number. + +

+Opening multiple log files and writing log messages from all the processors +may affect the application performance while running on a large number of +processors. For that reason, ESMF_LOGKIND_NONE is provided to +switch off the Log capability. All the Log methods have no effect +in the ESMF_LOGKIND_NONE mode. + +

+A tracing capability may be enabled by setting the trace flag by +using the ESMF_LogSet() method. When tracing is enabled, calls to +methods such as ESMF_LogFoundError, ESMF_LogFoundAllocError, +and ESMF_LogFoundDeallocError are logged in the default log file. +This can result in voluminous output. It is typically used only around areas +of code which are being debugged. + +

+Other options that are planned for Log are to adjust the verbosity of output, and to optionally write to stdout instead of file(s). + +

+ +

+49.2 Constants +

+ +

+ +

+ +
+49.2.1 ESMF_LOGERR +

+ +

+The valid values are: +

+
ESMF_LOGERR_PASSTHRU
+
A named character constant, with a predefined generic error message, + that can be used for the msg argument in any ESMF_Log + routine. The message indicated + by this named constant is “Passing error in return code." +
+
+ +

+ +

+ +
+49.2.2 ESMF_LOGKIND +

+ +

+DESCRIPTION: +
+Specifies a single log file, multiple log files (one per PET), or no log files. + +

+The type of this flag is: + +

+type(ESMF_LogKind_Flag) + +

+The valid values are: +

+
ESMF_LOGKIND_SINGLE
+
Use a single log file, combining messages from all of the PETs. Not supported on some platforms. + +
+
ESMF_LOGKIND_MULTI
+
Use multiple log files -- one per PET. + +
+
ESMF_LOGKIND_MULTI_ON_ERROR
+
Use multiple log files -- one per PET. A log file is only opened when a message + of type ESMF_LOGMSG_ERROR is encountered. + +
+
ESMF_LOGKIND_NONE
+
Do not issue messages to a log file. +
+
+ +

+ +

+ +
+49.2.3 ESMF_LOGMSG +

+ +

+DESCRIPTION: +
+ +Specifies a message level + +

+The type of this flag is: + +

+type(ESMF_LogMsg_Flag) + +

+The valid values are: +

+
ESMF_LOGMSG_INFO
+
Informational messages + +
+
ESMF_LOGMSG_WARNING
+
Warning messages + +
+
ESMF_LOGMSG_ERROR
+
Error messages + +
+
ESMF_LOGMSG_TRACE
+
Trace messages + +
+
ESMF_LOGMSG_DEBUG
+
DEBUG messages + +
+
ESMF_LOGMSG_JSON
+
JSON format messages +
+
+ +

+Valid predefined named array constant values are: + +

+

+
ESMF_LOGMSG_ALL
+
All messages + +
+
ESMF_LOGMSG_NONE
+
No messages + +
+
ESMF_LOGMSG_NOTRACE
+
All messages EXCEPT trace messages +
+
+ +

+ +

+49.3 Use and Examples +

+ +

+By default ESMF_Initialize() opens a default Log in +ESMF_LOGKIND_MULTI mode. ESMF handles the initialization and finalization +of the default Log so the user can immediately start using it. If additional Log +objects are desired, they must be explicitly created or opened using +ESMF_LogOpen(). + +

+ESMF_LogOpen() requires a Log object and filename argument. Additionally, +the user can specify single or multi Logs by setting the logkindflag property +to ESMF_LOGKIND_SINGLE or ESMF_LOGKIND_MULTI. +This is useful as the PET numbers are automatically added to the Log entries. +A single Log will put all entries, regardless of PET number, into a single +log while a multi Log will create multiple Logs with the PET number prepended +to the filename and all entries will be written to their corresponding Log +by their PET number. + +

+By default, the Log file is not truncated at the start of a new run; it just +gets appended each time. Future functionality may include an option to +either truncate or append to the Log file. + +

+In all cases where a Log is opened, a Fortran unit number is assigned to a specific +Log. A Log is assigned an unused unit number using the algorithm described in +the ESMF_IOUnitGet() method. + +

+The user can then set or get options on how the Log should be used +with the ESMF_LogSet() and ESMF_LogGet() methods. These are +partially implemented at this time. + +

+Depending on how the options are set, ESMF_LogWrite() either writes user +messages directly to a Log file or writes to a buffer that can be flushed when +full or by using the ESMF_LogFlush() method. The default is to flush +after every ten entries because maxElements is initialized to ten +(which means the buffer reaches its full state after every ten writes and then +flushes). + +

+A message filtering option may be set with ESMF_LogSet() so +that only selected message types are actually written to the log. One key +use of this feature is to allow placing informational log write requests +into the code for debugging or tracing. Then, when the informational entries +are not needed, the messages at that level may be turned off -- leaving only +warning and error messages in the logs. + +

+For every ESMF_LogWrite(), a time and date stamp is prepended to the +Log entry. The time is given in microsecond precision. The user can call +other methods to write to the Log. In every case, all methods eventually make +a call implicitly to ESMF_LogWrite() even though the user may never +explicitly call it. + +

+When calling ESMF_LogWrite(), the user can supply an optional line, +file and method. These arguments can be passed in explicitly or with the help +of cpp macros. In the latter case, a define for an ESMF_FILENAME must +be placed at the beginning of a file and a define for ESMF_METHOD must +be placed at the beginning of each method. The user can then use the +ESMF_CONTEXT cpp macro in place of line, file and method to insert the +parameters into the method. The user does not have to specify line number as +it is a value supplied by cpp. + +

+An example of Log output is given below running with logkindflag +property set to ESMF_LOGKIND_MULTI (default) using the default Log: + +

+(Log file PET0.ESMF_LogFile) +

+20041105 163418.472210 INFO      PET0     Running with ESMF Version 2.2.1
+
+ +

+(Log file PET1.ESMF_LogFile) +

+20041105 163419.186153 ERROR     PET1     ESMF_Field.F90             812  
+ESMF_FieldGet No Grid or Bad Grid attached to Field
+
+ +

+The first entry shows date and time stamp. The time is given in microsecond +precision. The next item shown is the type of message (INFO in this case). +Next, the PET number is added. Lastly, the content is written. + +

+The second entry shows something slightly different. In this case, we have +an ERROR. The method name (ESMF_Field.F90) is automatically provided from +the cpp macros as well as the line number (812). Then the content of the +message is written. + +

+When done writing messages, the default Log is closed by calling +ESMF_LogFinalize() or ESMF_LogClose() for user created Logs. +Both methods will release the assigned unit number. + +

+ +

+ +

+

+! !PROGRAM: ESMF_LogErrEx - Log Error examples
+!
+! !DESCRIPTION:
+!
+! This program shows examples of Log Error writing
+!-----------------------------------------------------------------------------
+
+ +

+

+! Macros for cpp usage
+! File define
+#define ESMF_FILENAME "ESMF_LogErrEx.F90"
+! Method define
+#define ESMF_METHOD "program ESMF_LogErrEx"
+#include "ESMF_LogMacros.inc"
+
+    ! ESMF Framework module
+    use ESMF
+    use ESMF_TestMod
+    implicit none
+
+    ! return variables
+    integer :: rc1, rc2, rc3, rcToTest, allocRcToTest, result
+    type(ESMF_LOG) :: alog  ! a log object that is not the default log
+    type(ESMF_LogKind_Flag) :: logkindflag
+    type(ESMF_Time) :: time
+    type(ESMF_VM) :: vm
+    integer, pointer :: intptr(:)
+
+ +

+ +

+49.3.1 Default Log +

+ +

+This example shows how to use the default Log. This example does not use cpp + macros but does use multi Logs. A separate Log will be created for each PET. +

+

+    ! Initialize ESMF to initialize the default Log
+    call ESMF_Initialize(vm=vm, defaultlogfilename="LogErrEx.Log", &
+                     logkindflag=ESMF_LOGKIND_MULTI, rc=rc1)
+
+ +

+

+    ! LogWrite
+    call ESMF_LogWrite("Log Write 2", ESMF_LOGMSG_INFO, rc=rc2)
+
+ +

+

+    ! LogMsgSetError
+    call ESMF_LogSetError(ESMF_RC_OBJ_BAD, msg="Convergence failure", &
+                             rcToReturn=rc2)
+
+ +

+

+    ! LogMsgFoundError
+    call ESMF_TimeSet(time, calkindflag=ESMF_CALKIND_NOCALENDAR)
+    call ESMF_TimeSyncToRealTime(time, rc=rcToTest)
+    if (ESMF_LogFoundError(rcToTest, msg="getting wall clock time", &
+                              rcToReturn=rc2)) then
+        ! Error getting time. The previous call will have printed the error
+        ! already into the log file.  Add any additional error handling here.
+        ! (This call is expected to provoke an error from the Time Manager.)
+    endif
+
+    ! LogMsgFoundAllocError
+    allocate(intptr(10), stat=allocRcToTest)
+    if (ESMF_LogFoundAllocError(allocRcToTest, msg="integer array", &
+                                   rcToReturn=rc2)) then
+        ! Error during allocation.  The previous call will have logged already
+        ! an error message into the log.
+    endif
+    deallocate(intptr)
+
+ +

+ +

+49.3.2 User created Log +

+ This example shows how to use a user created Log. This example uses + cpp macros. +

+

+    ! Open a Log named "Testlog.txt" associated with alog.
+    call ESMF_LogOpen(alog, "TestLog.txt", rc=rc1)
+
+ +

+

+%/////////////////////////////////////////////////////////////
+
+ \begin{verbatim}
+    ! LogWrite
+    call ESMF_LogWrite("Log Write 2", ESMF_LOGMSG_INFO, &
+                       line=__LINE__, file=ESMF_FILENAME, &
+                       method=ESMF_METHOD, log=alog, rc=rc2)
+
+ +

+

+    ! LogMsgSetError
+    call ESMF_LogSetError(ESMF_RC_OBJ_BAD,  msg="Interpolation Failure", &
+                          line=__LINE__, file=ESMF_FILENAME, &
+                           method=ESMF_METHOD, rcToReturn=rc2, log=alog)
+
+ +

+ +

+49.3.3 Get and Set +

+ This example shows how to use Get and Set routines, on both the default Log + and the user created Log from the previous examples. +

+

+    ! This is an example showing a query of the default Log.  Please note that
+    ! no Log is passed in the argument list, so the default Log will be used.
+    call ESMF_LogGet(logkindflag=logkindflag, rc=rc3)
+
+ +

+

+    ! This is an example setting a property of a Log that is not the default.
+    ! It was opened in a previous example, and the handle for it must be
+    ! passed in the argument list.
+    call ESMF_LogSet(log=alog, logmsgAbort=(/ESMF_LOGMSG_ERROR/), rc=rc2)
+
+ +

+

+    ! Close the user log.
+    call ESMF_LogClose(alog, rc=rc3)
+
+ +

+

+    ! Finalize ESMF to close the default log
+    call ESMF_Finalize(rc=rc1)
+
+ +

+ + +

+49.4 Restrictions and Future Work +

+ +

+ +

    +
  1. Line, file and method are only available when using the C +preprocessor +Message writing methods are expanded using the ESMF macro ESMF_CONTEXT +that adds the predefined symbolic constants __LINE__ and __FILE__ (or +the ESMF constant ESMF_FILENAME if defined) and the ESMF constant ESMF_METHOD +to the argument list. Using these constants, we can associate a file name, +line number and method name with the message. If the CPP preprocessor is not +used, this expansion will not be done and hence the ESMF macro ESMF_CONTEXT +can not be used, leaving the file name, line number and method out of the Log +text. + +

    +

  2. +
  3. Get and set methods are partially implemented. +Currently, the ESMF_LogGet() and ESMF_LogSet() methods are +partially implemented. + +

    +

  4. +
  5. Log only appends entries. +All writing to the Log is appended rather than overwriting the Log. Future +enhancements include the option to either append to an existing Log or +overwrite the existing Log. + +

    +

  6. +
  7. Avoiding conflicts with the default Log. + +The private methods ESMF_LogInitialize() and ESMF_LogFinalize() +are called during ESMF_Initialize() and ESMF_Finalize() +respectively, so they do not need to be called if the default Log is used. +If a new Log is required, ESMF_LogOpen() is used with a new Log object +passed in so that there are no conflicts with the default Log. + +

    +

  8. +
  9. ESMF_LOGKIND_SINGLE does not work properly. +When the ESMF_LogKind_Flag is set to ESMF_LOGKIND_SINGLE, different system may behave +differently. The log messages from some processors may be lost or overwritten +by other processors. Users are advised not to use this mode. The MPI-based +I/O will be implemented to fix the problem in the future release. + +

    +

  10. +
+ +

+49.5 Design and Implementation Notes +

+ +
    +
  1. The Log class was implemented in Fortran and uses the Fortran I/O +libraries when the class methods are called from Fortran. The C/C++ Log +methods use the Fortran I/O library by calling utility functions that are +written in Fortran. These utility functions call the standard Fortran write, +open and close functions. At initialization an ESMF_LOG is created. +The ESMF_LOG stores information for a specific Log file. When working +with more than one Log file, multiple ESMF_LOG's are required (one +ESMF_LOG for each Log file). For each Log, a handle is returned +through the ESMF_LogInitialize method for the default log or ESMF_LogOpen for a user created log. The user can specify single or multi logs by +setting the logkindflag property in the ESMF_LogInitialize or +ESMF_Open method to ESMF_LOGKIND_SINGLE or ESMF_LOGKIND_MULTI. +Similarly, the user can set the logkindflag property for the default +Log with the ESMF_Initialize method call. +The logkindflag is useful as the PET numbers are automatically added to the +log entries. A single log will put all entries, regardless of PET number, +into a single log while a multi log will create multiple logs with the PET +number prepended to the filename and all entries will be written to their +corresponding log by their PET number. + +

    +The properties for a Log are set with the ESMF_LogSet() method and +retrieved with the ESMF_LogGet() method. + +

    +Additionally, buffering is enabled. Buffering allows ESMF to manage +output data streams in a desired way. Writing to the buffer is transparent +to the user because all the Log entries are handled automatically by the +ESMF_LogWrite() method. All the user has to do is specify the buffer +size (the default is ten) by setting the maxElements property. Every +time the ESMF_LogWrite() method is called, a LogEntry element is +populated with the ESMF_LogWrite() information. When the buffer is +full (i.e., when all the LogEntry elements are populated), the buffer will be +flushed and all the contents will be written to file. If buffering is not +needed, that is maxElements=1 or flushImmediately=ESMF_TRUE, +the ESMF_LogWrite() method will immediately write to the Log file(s). +

  2. +
+ +

+49.6 Object Model +

+ +

+The following is a simplified UML diagram showing the structure of the +Log class. See Appendix A, A Brief Introduction to UML, +for a translation table that lists the symbols in the diagram and their +meaning. + +

+

+\includegraphics{Log_obj} + +
+ +

+49.7 Class API +

+ +

+ +

+ +

+ +

+49.7.1 ESMF_LogAssignment(=) - Log assignment +

+ +

+ +

+
+INTERFACE: +

     interface assignment(=)
+     log1 = log2
+
ARGUMENTS: +
     type(ESMF_Log) :: log1
+     type(ESMF_Log) :: log2
+
+DESCRIPTION: +
+ +

+Assign log1 as an alias to the same ESMF_Log object in memory + as log2. If log2 is invalid, then log1 will be + equally invalid after the assignment. + +

+The arguments are: +

+
log1
+
The ESMF_Log object on the left hand side of the assignment. + +
+
log2
+
The ESMF_Log object on the right hand side of the assignment. + +
+
+ +

+ +

+ +

+49.7.2 ESMF_LogOperator(==) - Test if Log 1 is equivalent to Log 2 +

+ +

+ +

+
+INTERFACE: +

       interface operator(==)
+       if (log1 == log2) then ... endif
+                    OR
+       result = (log1 == log2)
+
RETURN VALUE: +
       logical :: result
+
ARGUMENTS: +
       type(ESMF_Log), intent(in) :: log1
+       type(ESMF_Log), intent(in) :: log2
+
+DESCRIPTION: +
+ +

+Overloads the (==) operator for the ESMF_Log class. + Compare two logs for equality; return .true. if equal, + .false. otherwise. Comparison is based on whether the objects + are distinct, as with two newly created logs, or are simply aliases + to the same log as would be the case when assignment was involved. + +

+The arguments are: +

+
log1
+
The ESMF_Log object on the left hand side of the equality + operation. + +
+
log2
+
The ESMF_Log object on the right hand side of the equality + operation. + +
+
+ +

+ +

+ +

+49.7.3 ESMF_LogOperator(/=) - Test if Log 1 is not equivalent to Log 2 +

+ +

+ +

+
+INTERFACE: +

       interface operator(/=)
+       if (log1 /= log2) then ... endif
+                    OR
+       result = (log1 /= log2)
+
RETURN VALUE: +
       logical :: result
+
ARGUMENTS: +
       type(ESMF_Log), intent(in) :: log1
+       type(ESMF_Log), intent(in) :: log2
+
+DESCRIPTION: +
+ +

+Overloads the (/=) operator for the ESMF_Log class. + Compare two logs for inequality; return .true. if equal, + .false. otherwise. Comparison is based on whether the objects + are distinct, as with two newly created logs, or are simply aliases + to the same log as would be the case when assignment was involved. + +

+The arguments are: +

+
log1
+
The ESMF_Log object on the left hand side of the non-equality + operation. + +
+
log2
+
The ESMF_Log object on the right hand side of the non-equality + operation. + +
+
+ +

+ +

+ +

+49.7.4 ESMF_LogClose - Close Log file(s) +

+ +

+ +

+
+INTERFACE: +

       subroutine ESMF_LogClose(log, rc)
+
ARGUMENTS: +
       type(ESMF_Log), intent(inout), optional :: log
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       integer,        intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+This routine closes the log file(s) associated with log. + If the log is not explicitly closed, it will be closed by + ESMF_Finalize. + +

+The arguments are: +

+
[log]
+
An ESMF_Log object. If not specified, the default log is closed. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+49.7.5 ESMF_LogFlush - Flush the Log file(s) +

+ +

+ +

+
+INTERFACE: +

       subroutine ESMF_LogFlush(log, rc)
+
ARGUMENTS: +
       type(ESMF_Log), intent(inout), optional :: log
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       integer,        intent(out),   optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+This subroutine flushes the file buffer associated with log. + +

+The arguments are: +

+
[log]
+
An optional ESMF_Log object that can be used instead + of the default Log. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+49.7.6 ESMF_LogFoundAllocError - Check Fortran allocation status error and write message +

+ +

+ +

+
+INTERFACE: +

       function ESMF_LogFoundAllocError(statusToCheck,  &
+                                        msg,line,file, &
+                                        method,rcToReturn,log)
+
RETURN VALUE: +
       logical                                    :: ESMF_LogFoundAllocError
+
ARGUMENTS: +
       integer,          intent(in)              :: statusToCheck
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       character(len=*), intent(in),    optional :: msg
+       integer,          intent(in),    optional :: line
+       character(len=*), intent(in),    optional :: file
+       character(len=*), intent(in),    optional :: method
+       integer,          intent(inout), optional :: rcToReturn
+       type(ESMF_Log),   intent(inout), optional :: log
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+This function returns .true. when statusToCheck indicates + an allocation error, otherwise it returns .false.. The status + value is typically returned from a Fortran ALLOCATE statement. + If an error is indicated, a ESMF memory allocation error message + will be written to the ESMF_Log along with a user added msg, + line, file and method. + +

+The arguments are: +

+
statusToCheck
+
Fortran allocation status to check. Fortran specifies + that a status of 0 (zero) indicates success. + +
+
[msg]
+
User-provided message string. + +
+
[line]
+
Integer source line number. Expected to be set by + using the preprocessor __LINE__ macro. + +
+
[file]
+
User-provided source file name. + +
+
[method]
+
User-provided method string. + +
+
[rcToReturn]
+
If specified, when the allocation status indicates an error, + set the rcToReturn value to ESMF_RC_MEM. Otherwise, + rcToReturn is not modified. + +
+
[log]
+
An optional ESMF_Log object that can be used instead + of the default Log. + +

+

+
+ +

+ +

+ +

+49.7.7 ESMF_LogFoundDeallocError - Check Fortran deallocation status error and write message +

+ +

+ +

+
+INTERFACE: +

       function ESMF_LogFoundDeallocError(statusToCheck,  &
+                                          msg,line,file, &
+                                          method,rcToReturn,log)
+
RETURN VALUE: +
       logical ::ESMF_LogFoundDeallocError
+
ARGUMENTS: +
       integer,          intent(in)              :: statusToCheck
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       character(len=*), intent(in),    optional :: msg
+       integer,          intent(in),    optional :: line
+       character(len=*), intent(in),    optional :: file
+       character(len=*), intent(in),    optional :: method
+       integer,          intent(inout), optional :: rcToReturn
+       type(ESMF_Log),   intent(inout), optional :: log
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+This function returns .true. when statusToCheck indicates + a deallocation error, otherwise it returns .false.. The status + value is typically returned from a Fortran DEALLOCATE statement. + If an error is indicated, a ESMF memory allocation error message + will be written to the ESMF_Log along with a user added msg, + line, file and method. + +

+The arguments are: +

+
statusToCheck
+
Fortran deallocation status to check. Fortran specifies + that a status of 0 (zero) indicates success. + +
+
[msg]
+
User-provided message string. + +
+
[line]
+
Integer source line number. Expected to be set by + using the preprocessor __LINE__ macro. + +
+
[file]
+
User-provided source file name. + +
+
[method]
+
User-provided method string. + +
+
[rcToReturn]
+
If specified, when the deallocation status indicates an error, + set the rcToReturn value to ESMF_RC_MEM. Otherwise, + rcToReturn is not modified. + +
+
[log]
+
An optional ESMF_Log object that can be used instead + of the default Log. + +

+

+
+ +

+ +

+ +

+49.7.8 ESMF_LogFoundError - Check ESMF return code for error and write message +

+ +

+ +

+
+INTERFACE: +

   recursive function ESMF_LogFoundError(rcToCheck,   &
+                                   msg, line, file, method, &
+                                   rcToReturn, log) result (LogFoundError)
+
RETURN VALUE: +
       logical :: LogFoundError
+
ARGUMENTS: +
       integer,          intent(in),    optional :: rcToCheck
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       character(len=*), intent(in),    optional :: msg
+       integer,          intent(in),    optional :: line
+       character(len=*), intent(in),    optional :: file
+       character(len=*), intent(in),    optional :: method
+       integer,          intent(inout), optional :: rcToReturn
+       type(ESMF_Log),   intent(inout), optional :: log
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+This function returns .true. when rcToCheck indicates + an return code other than ESMF_SUCCESS, otherwise it returns + .false.. + If an error is indicated, a ESMF predefined error message + will be written to the ESMF_Log along with a user added msg, + line, file and method. + +

+The arguments are: +

+
[rcToCheck]
+
Return code to check. Default is ESMF_SUCCESS. + +
+
[msg]
+
User-provided message string. + +
+
[line]
+
Integer source line number. Expected to be set by + using the preprocessor __LINE__ macro. + +
+
[file]
+
User-provided source file name. + +
+
[method]
+
User-provided method string. + +
+
[rcToReturn]
+
If specified, when rcToCheck indicates an error, + set the rcToReturn to the value of rcToCheck. + Otherwise, rcToReturn is not modified. + This is not the return code for this function; it allows + the calling code to do an assignment of the error code + at the same time it is testing the value. + +
+
[log]
+
An optional ESMF_Log object that can be used instead + of the default Log. + +

+

+
+ +

+ +

+ +

+49.7.9 ESMF_LogFoundNetCDFError - Check NetCDF status code for success or log the associated NetCDF error message. +

+ +

+ +

+
+INTERFACE: +

 function ESMF_LogFoundNetCDFError(ncerrToCheck, msg, line, &
+                                   file, method, rcToReturn, log)
+ 
+ #if defined ESMF_NETCDF
+   use netcdf
+ #elif defined ESMF_PNETCDF
+   use pnetcdf
+ #endif
+
RETURN VALUE: +
   logical :: ESMF_LogFoundNetCDFError
+
ARGUMENTS: +
   integer,          intent(in)              :: ncerrToCheck
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+   character(len=*), intent(in),    optional :: msg
+   integer,          intent(in),    optional :: line
+   character(len=*), intent(in),    optional :: file
+   character(len=*), intent(in),    optional :: method
+   integer,          intent(inout), optional :: rcToReturn
+   type(ESMF_Log),   intent(inout), optional :: log
+
+DESCRIPTION: +
+ +

+This function returns .true. when ncerrToCheck indicates + an return code other than 0 (the success code from NetCDF Fortran) + or NF_NOERR (the success code for PNetCDF). Otherwise it returns + .false.. + If an error is indicated, a predefined ESMF error message + will be written to the ESMF_Log along with a user added msg, + line, file and method. The NetCDF string error + representation will also be logged. + +

+The arguments are: +

+
[ncerrToCheck]
+
NetCDF error code to check. + +
+
[msg]
+
User-provided message string. + +
+
[line]
+
Integer source line number. Expected to be set by using the + preprocessor __LINE__ macro. + +
+
[file]
+
User-provided source file name. + +
+
[method]
+
User-provided method string. + +
+
[rcToReturn]
+
If specified, when ncerrToCheck indicates an error, + set rcToReturn to ESMF_RC_NETCDF_ERROR. The string + representation for the error code will be retrieved from the NetCDF + Fortran library and logged alongside any user-provided message + string. + Otherwise, rcToReturn is not modified. + This is not the return code for this function; it allows the + calling code to do an assignment of the error code at the same time + it is testing the value. + +
+
[log]
+
An optional ESMF_Log object that can be used instead + of the default Log. + +

+

+
+ +

+ +

+ +

+49.7.10 ESMF_LogGet - Return information about a log object +

+ +

+ +

+
+INTERFACE: +

       subroutine ESMF_LogGet(log,  &
+                              flush,    &
+                              logmsgAbort, logkindflag, &
+                              maxElements, trace, fileName,  &
+                              highResTimestampFlag, indentCount,  &
+                              noPrefix, rc)
+
ARGUMENTS: +
       type(ESMF_Log),          intent(in),  optional :: log
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       logical,                 intent(out), optional :: flush
+       type(ESMF_LogMsg_Flag),  pointer,     optional :: logmsgAbort(:)
+       type(ESMF_LogKind_Flag), intent(out), optional :: logkindflag
+       integer,                 intent(out), optional :: maxElements
+       logical,                 intent(out), optional :: trace
+       character(*),            intent(out), optional :: fileName
+       logical,                 intent(out), optional :: highResTimestampFlag
+       integer,                 intent(out), optional :: indentCount
+       logical,                 intent(out), optional :: noPrefix
+       integer,                 intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+This subroutine returns properties about a Log object. + +

+The arguments are: +

+
[log]
+
An optional ESMF_Log object that can be used instead + of the default Log. + +
+
[flush]
+
Flush flag. + +
+
[logmsgAbort]
+
Returns an array containing current message halt settings. + If the array is not pre-allocated, ESMF_LogGet will + allocate an array of the correct size. If no message types + are defined, an array of length zero is returned. It is the + callers responsibility to deallocate the array. + +
+
[logkindflag]
+
Defines either single or multilog. + +
+
[maxElements]
+
Maximum number of elements in the Log. + +
+
[trace]
+
Current setting of the Log call tracing flag. + +
+
[fileName]
+
Current file name. When the log has been opened with + ESMF_LOGKIND_MULTI, the filename has a PET number + prefix. + +
+
[highResTimestampFlag]
+
Current setting of the extended elapsed timestamp flag. + +
+
[indentCount]
+
Current setting of the leading white space padding. + +
+
[noPrefix]
+
Current setting of the message prefix enable/disable flag. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+49.7.11 ESMF_LogOpen - Open Log file(s) +

+ +

+ +

+
+INTERFACE: +

     subroutine ESMF_LogOpen(log, filename,  &
+         appendflag, logkindflag, noPrefix, rc)
+
ARGUMENTS: +
     type(ESMF_Log),          intent(inout)         :: log
+     character(len=*),        intent(in)            :: filename
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     logical,                 intent(in),  optional :: appendFlag
+     type(ESMF_LogKind_Flag), intent(in),  optional :: logkindFlag
+     logical,                 intent(in),  optional :: noPrefix
+     integer,                 intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+This routine opens a file named filename and associates + it with the ESMF_Log. When logkindflag is set to + ESMF_LOGKIND_MULTI or ESMF_LOGKIND_MULTI_ON_ERROR + the file name is prepended with PET number identification. If the + incoming log is already open, an error is returned. + +

+The arguments are: +

+
log
+
An ESMF_Log object. + +
+
filename
+
Name of log file to be opened. + +
+
[appendFlag]
+
If the log file exists, setting to .false. will set the file position + to the beginning of the file. Otherwise, new records will be appended to the + end of the file. If not specified, defaults to .true.. + +
+
[logkindFlag]
+
Set the logkindflag. See section 49.2.2 for a list of + valid options. When the ESMF_LOGKIND_MULTI_ON_ERROR is selected, + the log opening is deferred until a ESMF_LogWrite with log message of + type ESMF_LOGMSG_ERROR is written. + If not specified, defaults to ESMF_LOGKIND_MULTI. + +
+
[noPrefix]
+
Set the noPrefix flag. If set to .false., log messages are prefixed + with time stamps, message type, and PET number. If set to .true. the + messages will be written without prefixes. If not specified, defaults to + .false.. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+49.7.12 ESMF_LogOpen - Open Default Log file(s) +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_LogOpen ()
+     subroutine ESMF_LogOpenDefault (filename,  &
+         appendflag, logkindflag, rc)
+
ARGUMENTS: +
     character(len=*),        intent(in)            :: filename
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     logical,                 intent(in),  optional :: appendflag
+     type(ESMF_LogKind_Flag), intent(in),  optional :: logkindflag
+     integer,                 intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+This routine opens a file named filename and associates + it with the default log. When logkindflag is set to + ESMF_LOGKIND_MULTI the file name is prepended with PET + number identification. If the incoming default log is already open, + an error is returned. + +

+The arguments are: +

+
filename
+
Name of DEFAULT log file to be opened. + +
+
[appendflag]
+
If the log file exists, setting to .false. will set the file position + to the beginning of the file. Otherwise, new records will be appended to the + end of the file. If not specified, defaults to .true.. + +
+
[logkindflag]
+
Set the logkindflag. See section 49.2.2 for a list of + valid options. + If not specified, defaults to ESMF_LOGKIND_MULTI. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+49.7.13 ESMF_LogSet - Set Log parameters +

+ +

+ +

+
+INTERFACE: +

     subroutine ESMF_LogSet(log,  &
+         flush,  &
+         logmsgAbort, maxElements, logmsgList,  &
+         errorMask, trace, highResTimestampFlag, indentCount,  &
+         noPrefix, rc)
+
ARGUMENTS: +
       type(ESMF_Log),         intent(inout), optional :: log
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       logical,                intent(in),    optional :: flush
+       type(ESMF_LogMsg_Flag), intent(in),    optional :: logmsgAbort(:)
+       integer,                intent(in),    optional :: maxElements
+       type(ESMF_LogMsg_Flag), intent(in),    optional :: logmsgList(:)
+       integer,                intent(in),    optional :: errorMask(:)
+       logical,                intent(in),    optional :: trace
+       logical,                intent(in),    optional :: highResTimestampFlag
+       integer,                intent(in),    optional :: indentCount
+       logical,                intent(in),    optional :: noPrefix
+       integer,                intent(out),   optional :: rc
+
+DESCRIPTION: +
+ +

+This subroutine sets the properties for the Log object. + +

+The arguments are: +

+
[log]
+
An optional ESMF_Log object. The default is to use the + default log that was opened at ESMF_Initialize time. + +
+
[flush]
+
If set to .true., flush log messages immediately, rather + than buffering them. Default is to flush after maxElements + messages. + +
+
[logmsgAbort]
+
Sets the condition on which ESMF aborts. The array + can contain any combination of ESMF_LOGMSG named constants. These + named constants are described in section 49.2.3. + Default is to always continue processing. + +
+
[maxElements]
+
Maximum number of elements in the Log buffer before flushing occurs. + Default is to flush when 10 messages have been accumulated. + +
+
[logmsgList]
+
An array of message types that will be logged. Log write requests + not matching the list will be ignored. If an empty array is + provided, no messages will be logged. + See section 49.2.3 for a list of + valid message types. By default, all non-trace messages will be + logged. + +
+
[errorMask]
+
List of error codes that will not be logged as errors. + Default is to log all error codes. + +
+
[trace]
+
If set to .true., calls such as ESMF_LogFoundError(), + ESMF_LogFoundAllocError(), and + ESMF_LogFoundDeallocError() + will be logged in the default log files. This option is intended + to be used as a tool for debugging and program flow tracing + within the ESMF library. Voluminous output may appear in the log, + with a consequent slowdown in performance. Therefore, it is + recommended that this option only be enabled before a problematic + call to a ESMF method, and disabled afterwards. Default is to + not trace these calls. + +
+
[highResTimestampFlag]
+
Sets the extended elapsed timestamp flag. If set to .true., a timestamp + from ESMF_VMWtime will be included in each log message. Default is + to not add the additional timestamps. + +
+
[indentCount]
+
Number of leading white spaces. + +
+
[noPrefix]
+
If set to .false., log messages are prefixed with time stamps, + message type and PET number. If set to .true. the messages will be + written without the prefixes. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+49.7.14 ESMF_LogSetError - Set ESMF return code for error and write msg +

+ +

+ +

+
+INTERFACE: +

       subroutine ESMF_LogSetError(rcToCheck,  &
+                                   msg, line, file, method, &
+                                   rcToReturn, log)
+
ARGUMENTS: +
       integer,          intent(in)              :: rcToCheck
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       character(len=*), intent(in),    optional :: msg
+       integer,          intent(in),    optional :: line
+       character(len=*), intent(in),    optional :: file
+       character(len=*), intent(in),    optional :: method
+       integer,          intent(out),   optional :: rcToReturn
+       type(ESMF_Log),   intent(inout), optional :: log
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+This subroutine sets the rcToReturn value to rcToCheck if + rcToReturn is present and writes this error code to the ESMF_Log + if an error is generated. A predefined error message will added to the + ESMF_Log along with a user added msg, line, file + and method. + +

+The arguments are: +

+
rcToCheck
+
rc value for set + +
+
[msg]
+
User-provided message string. + +
+
[line]
+
Integer source line number. Expected to be set by + using the preprocessor macro __LINE__ macro. + +
+
[file]
+
User-provided source file name. + +
+
[method]
+
User-provided method string. + +
+
[rcToReturn]
+
If specified, copy the rcToCheck value to rcToreturn. + This is not the return code for this function; it allows + the calling code to do an assignment of the error code + at the same time it is testing the value. + +
+
[log]
+
An optional ESMF_Log object that can be used instead + of the default Log. + +

+

+
+ +

+ +

+ +

+49.7.15 ESMF_LogWrite - Write to Log file(s) +

+ +

+ +

+
+INTERFACE: +

       recursive subroutine ESMF_LogWrite(msg, logmsgFlag, &
+                         logmsgList,      & ! DEPRECATED ARGUMENT
+                         line, file, method, log, rc)
+
ARGUMENTS: +
       character(len=*),      intent(in)             :: msg
+       type(ESMF_LogMsg_Flag),intent(in),optional    :: logmsgFlag
+       type(ESMF_LogMsg_Flag),intent(in),optional::logmsgList ! DEPRECATED ARG
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       integer,               intent(in),   optional :: line
+       character(len=*),      intent(in),   optional :: file
+       character(len=*),      intent(in),   optional :: method
+       type(ESMF_Log),        intent(inout),optional :: log
+       integer,               intent(out),  optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    5.2.0rp1
    +
    Added argument logmsgFlag. + Started to deprecate argument logmsgList. + This corrects inconsistent use of the List suffix on + the argument name. In ESMF this suffix indicates + one-dimensional array arguments. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+This subroutine writes to the file associated with an ESMF_Log. + A message is passed in along with the logmsgFlag, line, + file and method. If the write to the ESMF_Log + is successful, the function will return a logical true. This + function is the base function used by all the other ESMF_Log + writing methods. + +

+The arguments are: +

+
msg
+
User-provided message string. + +
+
[logmsgFlag]
+
The type of message. See Section 49.2.3 for + possible values. If not specified, the default is ESMF_LOGMSG_INFO. + +
+
[logmsgList]
+
DEPRECATED ARGUMENT! Please use the argument logmsgFlag instead. + +
+
[line]
+
Integer source line number. Expected to be set by + using the preprocessor macro __LINE__ macro. + +
+
[file]
+
User-provided source file name. + +
+
[method]
+
User-provided method string. + +
+
[log]
+
An optional ESMF_Log object that can be used instead + of the default Log. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ + +

+50 DELayout Class +

+ +

+50.1 Description +

+ +

+The DELayout class provides an additional layer of abstraction on top of the Virtual Machine (VM) layer. DELayout does this by introducing DEs (Decomposition Elements) as logical resource units. The DELayout object keeps track of the relationship between its DEs and the resources of the associated VM object. + +

+The relationship between DEs and VM resources (PETs (Persistent Execution Threads) and VASs (Virtual Address Spaces)) contained in a DELayout object is defined during its creation and cannot be changed thereafter. There are, however, a number of hint and specification arguments that can be used to shape the DELayout during its creation. + +

+Contrary to the number of PETs and VASs contained in a VM object, which are fixed by the available resources, the number of DEs contained in a DELayout can be chosen freely to best match the computational problem or other design criteria. Creating a DELayout with less DEs than there are PETs in the associated VM object can be used to share resources between decomposed objects within an ESMF component. Creating a DELayout with more DEs than there are PETs in the associated VM object can be used to evenly partition the computation over the available resources. + +

+The simplest case, however, is where the DELayout contains the same number of DEs as there are PETs in the associated VM context. In this case the DELayout may be used to re-label the hardware and operating system resources held by the VM. For instance, it is possible to order the resources so that specific DEs have best available communication paths. The DELayout will map the DEs to the PETs of the VM according to the resource details provided by the VM instance. + +

+Furthermore, general DE to PET mapping can be used to offer computational resources with finer granularity than the VM does. The DELayout can be queried for computational and communication capacities of DEs and DE pairs, respectively. This information can be used to best utilize the DE resources when partitioning the computational problem. In combination with other ESMF classes, general DE to PET mapping can be used to realize cache blocking, communication hiding and dynamic load balancing. + +

+Finally, the DELayout layer offers primitives that allow a work queue style dynamic load balancing between DEs. + +

+50.2 Constants +

+ +

+ +

+ +
+50.2.1 ESMF_PIN +

+ +

+DESCRIPTION: +
+Specifies which VM resource DEs are pinned to (PETs, VASs, SSIs). + +

+The type of this flag is: + +

+type(ESMF_Pin_Flag) + +

+The valid values are: +

+
ESMF_PIN_DE_TO_PET
+
Pin DEs to PETs. Only the owning PET has access to a DE. + +
+
ESMF_PIN_DE_TO_VAS
+
Pin DEs to virtual address spaces (VAS). DEs are accessible from all PETs + within the same VAS. + +
+
ESMF_PIN_DE_TO_SSI
+
Pin DEs to single system images (SSI) - typically shared memory nodes. + DEs are accessible from all PETs within the same SSI. The memory allocation + between different DEs is allowed to be non-contiguous. + +
+
ESMF_PIN_DE_TO_SSI_CONTIG
+
Same as ESMF_PIN_DE_TO_SSI, but the shared memory allocation + across DEs located on the same SSI must be contigous throughout. +
+
+ +

+ +

+ +
+50.2.2 ESMF_SERVICEREPLY +

+ +

+DESCRIPTION: +
+Reply when a PET offers to service a DE. + +

+The type of this flag is: + +

+type(ESMF_ServiceReply_Flag) + +

+The valid values are: +

+
ESMF_SERVICEREPLY_ACCEPT
+
The service offer has been accepted. The PET is expected to service the DE. + +
+
ESMF_SERVICEREPLY_DENY
+
The service offer has been denied. The PET is expected to not service the + DE. +
+
+ +

+50.3 Use and Examples +

+ +

+The following examples demonstrate how to create, use and destroy DELayout objects. + +

+ +

+ +

+ +

+50.3.1 Default DELayout +

+ +

+Without specifying any of the optional parameters the created + ESMF_DELayout + defaults into having as many DEs as there are PETs in the associated VM + object. Consequently the resulting DELayout describes a simple 1-to-1 DE to + PET mapping. +

+

+  delayout = ESMF_DELayoutCreate(rc=rc)
+
+ +

+The default DE to PET mapping is simply: +

+   DE 0  -> PET 0
+   DE 1  -> PET 1
+   ...
+
+ +

+DELayout objects that are not used any longer should be destroyed. +

+

+  call ESMF_DELayoutDestroy(delayout, rc=rc)
+
+ +

+The optional vm argument can be provided to DELayoutCreate() to lower + the method's overhead by the amount it takes to determine the current VM. +

+

+  delayout = ESMF_DELayoutCreate(vm=vm, rc=rc)
+
+ +

+By default all PETs of the associated VM will be considered. However, if the + optional argument petList is present DEs will only be mapped against + the PETs contained in the list. When the following example is executed on + four PETs it creates a DELayout with four DEs by default that are mapped + to the provided PETs in their given order. It is erroneous to specify PETs + that are not part of the VM context on which the DELayout is defined. +

+

+  delayout = ESMF_DELayoutCreate(petList=(/(i,i=petCount-1,1,-1)/), rc=rc)
+
+ +

+Once the end of the petList has been reached the DE to PET mapping + continues from the beginning of the list. For a 4 PET VM the above created + DELayout will end up with the following DE to PET mapping: + +

+

+   DE 0  -> PET 3
+   DE 1  -> PET 2
+   DE 2  -> PET 1
+   DE 2  -> PET 3
+
+ +

+ +

+50.3.2 DELayout with specified number of DEs +

+ +

+The deCount argument can be used to specify the number of DEs. In this + example a DELayout is created that contains four times as many DEs as there + are PETs in the VM. +

+

+  delayout = ESMF_DELayoutCreate(deCount=4*petCount, rc=rc)
+
+ +

+Cyclic DE to PET mapping is the default. For 4 PETs this means: +

+   DE 0, 4,  8, 12  -> PET 0
+   DE 1, 5,  9, 13  -> PET 1
+   DE 2, 6, 10, 14  -> PET 2
+   DE 3, 7, 11, 15  -> PET 3
+
+ The default DE to PET mapping can be overridden by providing the + deGrouping argument. This argument provides a positive integer group + number for each DE in the DELayout. All of the DEs of a group will be mapped + against the same PET. The actual group index is arbitrary (but must be + positive) and its value is of no consequence. +

+

+  delayout = ESMF_DELayoutCreate(deCount=4*petCount, &
+    deGrouping=(/(i/4,i=0,4*petCount-1)/), rc=rc)
+
+ +

+This will achieve blocked DE to PET mapping. For 4 PETs this means: +

+   DE  0,  1,  2,  3  -> PET 0
+   DE  4,  5,  6,  7  -> PET 1
+   DE  8,  9, 10, 11  -> PET 2
+   DE 12, 13, 14, 15  -> PET 3
+
+ +

+ +

+50.3.3 DELayout with computational and communication weights +

+ +

+The quality of the partitioning expressed by the DE to PET mapping depends + on the amount and quality of information provided during DELayout creation. + In the following example the compWeights argument is used to specify + relative computational weights for all DEs and communication weights for + DE pairs are provided by the commWeights argument. The example assumes + four DEs. +

+

+  allocate(compWeights(4))
+  allocate(commWeights(4, 4))
+  ! setup compWeights and commWeights according to computational problem
+  delayout = ESMF_DELayoutCreate(deCount=4, compWeights=compWeights, &
+    commWeights=commWeights, rc=rc)
+  deallocate(compWeights, commWeights)
+
+ +

+The resulting DE to PET mapping depends on the specifics of the VM object and + the provided compWeights and commWeights arrays. + +

+ +

+50.3.4 DELayout from petMap +

+ +

+Full control over the DE to PET mapping is provided via the petMap + argument. This example maps the DEs to PETs in reverse order. In the 4-PET + case this will result in the following mapping: +

+   DE 0 -> PET 3
+   DE 1 -> PET 2
+   DE 2 -> PET 1
+   DE 3 -> PET 0
+
+

+

+  delayout = ESMF_DELayoutCreate(petMap=(/(i,i=petCount-1,0,-1)/), rc=rc)
+
+ +

+ +

+50.3.5 DELayout from petMap with multiple DEs per PET +

+ +

+The petMap argument gives full control over DE to PET mapping. The + following example run on 4 or more PETs maps DEs to PETs according to the + following table: +

+   DE 0 -> PET 3
+   DE 1 -> PET 3
+   DE 2 -> PET 1
+   DE 3 -> PET 0
+   DE 4 -> PET 2
+   DE 5 -> PET 1
+   DE 6 -> PET 3
+   DE 7 -> PET 1
+
+

+

+  delayout = ESMF_DELayoutCreate(petMap=(/3, 3, 1, 0, 2, 1, 3, 1/), rc=rc)
+
+ +

+ +

+50.3.6 Working with a DELayout - simple 1-to-1 DE-to-PET mapping +

+ +

+The simplest case is a DELayout where there is exactly one DE for every PET. + Of course this implies that the number of DEs equals the number of PETs. + This special 1-to-1 DE-to-PET mapping is very common and many applications + assume it. The following example shows how a DELayout can be queried about + its mapping. + +

+First a default DELayout is created where the number of DEs equals the number + of PETs, and are associated 1-to-1. +

+

+  delayout = ESMF_DELayoutCreate(rc=rc)
+
+ +

+Next the DELayout is queried for the oneToOneFlag, and the user code + makes a decision based on its value. +

+

+  call ESMF_DELayoutGet(delayout, oneToOneFlag=oneToOneFlag, rc=rc)
+  if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+  if (.not. oneToOneFlag) then
+    ! handle the unexpected case of not dealing with a 1-to-1 mapping
+  else
+
+ +

+1-to-1 mapping is guaranteed in this branch and the following code can + work under the simplifying assumption that every PET holds exactly one DE: +

+

+    allocate(localDeToDeMap(1))
+    call ESMF_DELayoutGet(delayout, localDeToDeMap=localDeToDeMap, rc=rc)
+    if (rc /= ESMF_SUCCESS) finalrc=rc
+    myDe = localDeToDeMap(1)
+    deallocate(localDeToDeMap)
+    if (finalrc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+  endif
+
+ +

+ +

+ +
+50.3.7 Working with a DELayout - general DE-to-PET mapping +

+ +

+In general a DELayout may map any number (including zero) of DEs against + a single PET. The exact situation can be detected by querying the DELayout + for the oneToOneFlag. If this flag comes back as .true. then the + DELayout maps exactly one DE against each PET, but if it comes back as + .false. the DELayout describes a more general DE-to-PET layout. The + following example shows how code can be be written to work for a general + DELayout. + +

+First a DELayout is created with two more DEs than there are PETs. The + DELayout will consequently map some DEs to the same PET. +

+

+  delayout = ESMF_DELayoutCreate(deCount=petCount+2, rc=rc)
+
+ +

+The first piece of information needed on each PET is the localDeCount. + This number may be different on each PET and indicates how many DEs are + mapped against the local PET. +

+

+  call ESMF_DELayoutGet(delayout, localDeCount=localDeCount, rc=rc)
+
+ +

+The DELayout can further be queried for a list of DEs that are held by + the local PET. This information is provided by the localDeToDeMap + argument. In ESMF a localDe is an index that enumerates the DEs that + are associated with the local PET. In many cases the exact bounds of the + localDe index range, e.g. +$[0...localDeCount-1]$, or +$[1...localDeCount]$ + does not matter, since it only affects how user code indexes into variables + the user allocated, and therefore set the specific bounds. However, there are + a few Array and Field level calls that take localDe input arguments. In + all those cases where the localDe index variable is passed into an ESMF + call as an input argument, it must be defined with a range starting at + zero, i.e. +$[0...localDeCount-1]$. + +

+For consistency with Array and Field, the following code uses a + +$[0...localDeCount-1]$ range for the localDe index variable, + although it is not strictly necessary here: +

+

+  allocate(localDeToDeMap(0:localDeCount-1))
+  call ESMF_DELayoutGet(delayout, localDeToDeMap=localDeToDeMap, rc=rc)
+  if (rc /= ESMF_SUCCESS) finalrc=rc
+  do localDe=0, localDeCount-1
+    workDe = localDeToDeMap(localDe)
+!    print *, "I am PET", localPET, " and I am working on DE ", workDe
+  enddo
+  deallocate(localDeToDeMap)
+  if (finalrc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+ +

+ +

+50.3.8 Work queue dynamic load balancing +

+ +

+The DELayout API includes two calls that can be used to easily implement + work queue dynamic load balancing. The workload is broken up into DEs + (more than there are PETs) and processed by the PETs. Load balancing is + only possible for ESMF multi-threaded VMs and requires that DEs are pinned + to VASs instead of the PETs (default). The following example will + run for any VM and DELayout, however, load balancing will only occur under the + mentioned conditions. +

+

+  delayout = ESMF_DELayoutCreate(deCount=petCount+2, &
+    pinflag=ESMF_PIN_DE_TO_VAS, rc=rc)
+
+ +

+

+  call ESMF_DELayoutGet(delayout, vasLocalDeCount=localDeCount, rc=rc)
+  if (rc /= ESMF_SUCCESS) finalrc=rc
+  allocate(localDeToDeMap(localDeCount))
+  call ESMF_DELayoutGet(delayout, vasLocalDeToDeMap=localDeToDeMap, rc=rc)
+  if (rc /= ESMF_SUCCESS) finalrc=rc
+  do i=1, localDeCount
+    workDe = localDeToDeMap(i)
+    print *, "I am PET", localPET, &
+             " and I am offering service for DE ", workDe
+    reply = ESMF_DELayoutServiceOffer(delayout, de=workDe, rc=rc)
+    if (rc /= ESMF_SUCCESS) finalrc=rc
+    if (reply == ESMF_SERVICEREPLY_ACCEPT) then
+      ! process work associated with workDe
+      print *, "I am PET", localPET, ", service offer for DE ", workDe, &
+        " was accepted."
+      call ESMF_DELayoutServiceComplete(delayout, de=workDe, rc=rc)
+      if (rc /= ESMF_SUCCESS) finalrc=rc
+    endif
+  enddo
+  deallocate(localDeToDeMap)
+  if (finalrc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)
+
+ +

+ + +

+50.4 Restrictions and Future Work +

+ +

+ +

+50.5 Design and Implementation Notes +

+ +

+The DELayout class is a light weight object. It stores the DE to PET and VAS mapping for all DEs within all PET instances and a list of local DEs for each PET instance. The DELayout does not store the computational and communication weights optionally provided as arguments to the create method. These hints are only used during create while they are available in user owned arrays. + +

+50.6 Class API +

+ +

+ +

+ +

+ +

+50.6.1 ESMF_DELayoutAssignment(=) - DELayout assignment +

+ +

+ +

+
+INTERFACE: +

     interface assignment(=)
+     delayout1 = delayout2
+
ARGUMENTS: +
     type(ESMF_DELayout) :: delayout1
+     type(ESMF_DELayout) :: delayout2
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Assign delayout1 as an alias to the same ESMF DELayout object in memory + as delayout2. If delayout2 is invalid, then delayout1 will be equally + invalid after the assignment. + +

+The arguments are: +

+
delayout1
+
The ESMF_DELayout object on the left hand side of the assignment. + +
+
delayout2
+
The ESMF_DELayout object on the right hand side of the assignment. + +
+
+ +

+ +

+ +

+50.6.2 ESMF_DELayoutOperator(==) - DELayout equality operator +

+ +

+ +

+
+INTERFACE: +

   interface operator(==)
+     if (delayout1 == delayout2) then ... endif
+               OR
+     result = (delayout1 == delayout2)
+
RETURN VALUE: +
     logical :: result
+
ARGUMENTS: +
     type(ESMF_DELayout), intent(in) :: delayout1
+     type(ESMF_DELayout), intent(in) :: delayout2
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Test whether delayout1 and delayout2 are valid aliases to the same ESMF + DELayout object in memory. For a more general comparison of two + ESMF DELayouts, going beyond the simple alias test, the + ESMF_DELayoutMatch() function (not yet implemented) must + be used. + +

+The arguments are: +

+
delayout1
+
The ESMF_DELayout object on the left hand side of the equality + operation. + +
+
delayout2
+
The ESMF_DELayout object on the right hand side of the equality + operation. + +
+
+ +

+ +

+ +

+50.6.3 ESMF_DELayoutOperator(/=) - DELayout not equal operator +

+ +

+ +

+
+INTERFACE: +

   interface operator(/=)
+     if (delayout1 /= delayout2) then ... endif
+               OR
+     result = (delayout1 /= delayout2)
+
RETURN VALUE: +
     logical :: result
+
ARGUMENTS: +
     type(ESMF_DELayout), intent(in) :: delayout1
+     type(ESMF_DELayout), intent(in) :: delayout2
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Test whether delayout1 and delayout2 are not valid aliases to the + same ESMF DELayout object in memory. For a more general comparison of two + ESMF DELayouts, going beyond the simple alias test, the + ESMF_DELayoutMatch() function (not yet implemented) must + be used. + +

+The arguments are: +

+
delayout1
+
The ESMF_DELayout object on the left hand side of the non-equality + operation. + +
+
delayout2
+
The ESMF_DELayout object on the right hand side of the non-equality + operation. + +
+
+ +

+ +

+ +

+50.6.4 ESMF_DELayoutCreate - Create DELayout object +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_DELayoutCreate()
+   recursive function ESMF_DELayoutCreateDefault(deCount, &
+     deGrouping, pinflag, petList, vm, rc)
+
RETURN VALUE: +
     type(ESMF_DELayout) :: ESMF_DELayoutCreateDefault
+
ARGUMENTS: +
 -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,                      intent(in),  optional :: deCount
+     integer, target,              intent(in),  optional :: deGrouping(:)
+     type(ESMF_Pin_Flag),          intent(in),  optional :: pinflag
+     integer, target,              intent(in),  optional :: petList(:)
+     type(ESMF_VM),                intent(in),  optional :: vm
+     integer,                      intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Create an ESMF_DELayout object on the basis of optionally provided + restrictions. By default a DELayout with deCount equal to petCount will + be created, each DE mapped to a single PET. However, the number of DEs + as well grouping of DEs and PETs can be specified via the optional + arguments. + +

+The arguments are: +

+
[deCount]
+
Number of DEs to be provided by the created DELayout. By default + the number of DEs equals the number of PETs in the associated VM + context. Specifying a deCount smaller than the number + of PETs will result in unassociated PETs. + This may be used to share VM resources between DELayouts within the + same ESMF component. Specifying a deCount greater than the + number of PETs will result in multiple DE to PET mapping. + +
+
[deGrouping]
+
This optional argument must be of size deCount. Its content assigns + a DE group index to each DE of the DELayout. A group index of -1 + indicates that the associated DE isn't member of any particular + group. The significance of DE groups is that all the DEs belonging + to a certain group will be mapped against the same PET. This + does not, however, mean that DEs belonging to different DE groups + must be mapped to different PETs. + +
+
[pinflag]
+
This flag specifies which type of resource DEs are pinned to. + The default is to pin DEs to PETs. Alternatively it is + also possible to pin DEs to VASs. See section + 50.2.1 for a list of valid pinning options. + +
+
[petList]
+
List specifying PETs to be used by this DELayout. This can be used + to control the PET overlap between DELayouts within the same + ESMF component. It is erroneous to specify PETs that are not within + the provided VM context. The default is to include all the PETs of + the VM. + +
+
[vm]
+
If present, the DELayout object is created on the specified + ESMF_VM object. The default is to create on the VM of the + current context. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+50.6.5 ESMF_DELayoutCreate - Create DELayout from petMap +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_DELayoutCreate()
+   recursive function ESMF_DELayoutCreateFromPetMap(petMap, &
+     pinflag, vm, rc)
+
RETURN VALUE: +
     type(ESMF_DELayout) :: ESMF_DELayoutCreateFromPetMap
+
ARGUMENTS: +
     integer,                      intent(in)            :: petMap(:)
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     type(ESMF_Pin_Flag),          intent(in),  optional :: pinflag
+     type(ESMF_VM),                intent(in),  optional :: vm
+     integer,                      intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Create an ESMF_DELayout with exactly specified DE to PET mapping. + +

+This ESMF method must be called in unison by all PETs of the VM. Calling + this method from a PET not part of the VM or not calling it from a PET + that is part of the VM will result in undefined behavior. ESMF does not + guard against violation of the unison requirement. The call is not + collective, there is no communication between PETs. + +

+The arguments are: +

+
petMap
+
List specifying the DE-to-PET mapping. The list elements correspond + to DE 0, 1, 2, ... and map against the specified PET of the VM + context. The size of the petMap + argument determines the number of DEs in the created DELayout. It is + erroneous to specify a PET identifier that lies outside the VM + context. + +
+
[pinflag]
+
This flag specifies which type of resource DEs are pinned to. + The default is to pin DEs to PETs. Alternatively it is + also possible to pin DEs to VASs. See section + 50.2.1 for a list of valid pinning options. + +
+
[vm]
+
If present, the DELayout object is created on the specified + ESMF_VM object. The default is to create on the VM of the + current context. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+50.6.6 ESMF_DELayoutDestroy - Release resources associated with DELayout object +

+ +

+ +

+
+INTERFACE: +

   recursive subroutine ESMF_DELayoutDestroy(delayout, noGarbage, rc)
+
ARGUMENTS: +
     type(ESMF_DELayout),  intent(inout)          :: delayout
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     logical,              intent(in),   optional :: noGarbage
+     integer,              intent(out),  optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    7.0.0
    +
    Added argument noGarbage. + The argument provides a mechanism to override the default garbage collection + mechanism when destroying an ESMF object. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Destroy an ESMF_DELayout object, releasing the resources associated + with the object. + +

+By default a small remnant of the object is kept in memory in order to + prevent problems with dangling aliases. The default garbage collection + mechanism can be overridden with the noGarbage argument. + +

+The arguments are: +

+
delayout
+
ESMF_DELayout object to be destroyed. + +
+
[noGarbage]
+
If set to .TRUE. the object will be fully destroyed and removed + from the ESMF garbage collection system. Note however that under this + condition ESMF cannot protect against accessing the destroyed object + through dangling aliases - a situation which may lead to hard to debug + application crashes. + +

+It is generally recommended to leave the noGarbage argument + set to .FALSE. (the default), and to take advantage of the ESMF + garbage collection system which will prevent problems with dangling + aliases or incorrect sequences of destroy calls. However this level of + support requires that a small remnant of the object is kept in memory + past the destroy call. This can lead to an unexpected increase in memory + consumption over the course of execution in applications that use + temporary ESMF objects. For situations where the repeated creation and + destruction of temporary objects leads to memory issues, it is + recommended to call with noGarbage set to .TRUE., fully + removing the entire temporary object from memory. + +

+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+50.6.7 ESMF_DELayoutGet - Get object-wide DELayout information +

+ +

+ +

+
+INTERFACE: +

   recursive subroutine ESMF_DELayoutGet(delayout, vm, deCount,&
+     petMap, vasMap, oneToOneFlag, pinflag, localDeCount, localDeToDeMap, &
+     localDeList, &      ! DEPRECATED ARGUMENT
+     vasLocalDeCount, vasLocalDeToDeMap, &
+     vasLocalDeList, &   ! DEPRECATED ARGUMENT
+     rc)
+
ARGUMENTS: +
     type(ESMF_DELayout),      intent(in)            :: delayout
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     type(ESMF_VM),            intent(out), optional :: vm
+     integer,                  intent(out), optional :: deCount
+     integer, target,          intent(out), optional :: petMap(:)
+     integer, target,          intent(out), optional :: vasMap(:)
+     logical,                  intent(out), optional :: oneToOneFlag
+     type(ESMF_Pin_Flag),      intent(out), optional :: pinflag
+     integer,                  intent(out), optional :: localDeCount
+     integer, target,          intent(out), optional :: localDeToDeMap(:)
+     integer, target, intent(out), optional :: localDeList(:)  !DEPRECATED ARG
+     integer,                  intent(out), optional :: vasLocalDeCount
+     integer, target,          intent(out), optional :: vasLocalDeToDeMap(:)
+     integer, target, intent(out), optional :: vasLocalDeList(:) !DEPRECATED ARG
+     integer,                  intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    5.2.0rp1
    +
    Added arguments localDeToDeMap and vasLocalDeToDeMap. + Started to deprecate arguments localDeList and + vasLocalDeList. + The new argument names correctly use the Map suffix and + better describe the returned information. + This was pointed out by user request. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Access to DELayout information. + +

+The arguments are: +

+
delayout
+
Queried ESMF_DELayout object. + +
+
[vm]
+
The ESMF_VM object on which delayout is defined. + +
+
[deCount]
+
The total number of DEs in the DELayout. + +
+
[petMap]
+
List of PETs against which the DEs are mapped. The petMap + argument must at least be of size deCount. + +
+
[vasMap]
+
List of VASs against which the DEs are mapped. The vasMap + argument must at least be of size deCount. + +
+
[oneToOneFlag]
+
A value of .TRUE. indicates that delayout maps each DE to a + single PET, and each PET maps to a single DE. All other layouts return + a value of .FALSE.. + +
+
[pinflag]
+
The type of DE pinning. See section 50.2.1 for a list + of valid pinning options. + +
+
[localDeCount]
+
The number of DEs in the DELayout associated with the local PET. + +
+
[localDeToDeMap]
+
Mapping between localDe indices and the (global) DEs associated with + the local PET. The localDe index variables are discussed in sections + 50.3.7 and 28.2.5. + The provided actual argument must be of size localDeCount. + +
+
[localDeList]
+
DEPRECATED ARGUMENT! Please use the argument localDeToDeMap instead. + +
+
[vasLocalDeCount]
+
The number of DEs in the DELayout associated with the local VAS. + +
+
[vasLocalDeToDeMap]
+
Mapping between localDe indices and the (global) DEs associated with + the local VAS. The localDe index variables are discussed in sections + 50.3.7 and 28.2.5. + The provided actual argument must be of size localDeCount. + +
+
[vasLocalDeList]
+
DEPRECATED ARGUMENT! Please use the argument vasLocalDeToDeMap instead. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+50.6.8 ESMF_DELayoutIsCreated - Check whether a DELayout object has been created +

+ +

+ +

+
+INTERFACE: +

   function ESMF_DELayoutIsCreated(delayout, rc)
+
RETURN VALUE: +
     logical :: ESMF_DELayoutIsCreated
+
ARGUMENTS: +
     type(ESMF_DELayout), intent(in)            :: delayout
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,             intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Return .true. if the delayout has been created. Otherwise return + .false.. If an error occurs, i.e. rc /= ESMF_SUCCESS is + returned, the return value of the function will also be .false.. + +

+The arguments are: +

+
delayout
+
ESMF_DELayout queried. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+50.6.9 ESMF_DELayoutPrint - Print DELayout information +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_DELayoutPrint(delayout, rc)
+
ARGUMENTS: +
     type(ESMF_DELayout),  intent(in)            :: delayout
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,              intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Prints internal information about the specified ESMF_DELayout + object to stdout. +
+

+The arguments are: +

+
delayout
+
Specified ESMF_DELayout object. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+50.6.10 ESMF_DELayoutServiceComplete - Close service window +

+ +

+ +

+
+INTERFACE: +

   recursive subroutine ESMF_DELayoutServiceComplete(delayout, de, rc)
+
ARGUMENTS: +
     type(ESMF_DELayout),  intent(in)            :: delayout
+     integer,              intent(in)            :: de
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,              intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+The PET who's service offer was accepted for de must use + ESMF_DELayoutServiceComplete to close the service window. + +

+The arguments are: +

+
delayout
+
Specified ESMF_DELayout object. + +
+
de
+
DE for which to close service window. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+50.6.11 ESMF_DELayoutServiceOffer - Offer service for a DE in DELayout +

+ +

+ +

+
+INTERFACE: +

   recursive function ESMF_DELayoutServiceOffer(delayout, de, rc)
+
RETURN VALUE: +
     type(ESMF_ServiceReply_Flag) :: ESMF_DELayoutServiceOffer
+
ARGUMENTS: +
     type(ESMF_DELayout),  intent(in)            :: delayout
+     integer,              intent(in)            :: de
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,              intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Offer service for a DE in the ESMF_DELayout object. This call + together with ESMF_DELayoutServiceComplete() provides the + synchronization primitives between the PETs of an ESMF multi-threaded VM + necessary for dynamic load balancing via a work queue approach. + +

+The calling PET will either receive ESMF_SERVICEREPLY_ACCEPT if + the service offer has been accepted by DELayout or + ESMF_SERVICEREPLY_DENY if the service offer was denied. The + service offer paradigm is different from a simple mutex approach in that + the DELayout keeps track of the number of service offers issued for each + DE by each PET and accepts only one PET's offer for each offer increment. + This requires that all PETs use ESMF_DELayoutServiceOffer() in + unison. See section 50.2.2 for the potential return + values. + +

+The arguments are: +

+
delayout
+
Specified ESMF_DELayout object. + +
+
de
+
DE for which service is offered by the calling PET. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+50.6.12 ESMF_DELayoutValidate - Validate DELayout internals +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_DELayoutValidate(delayout, rc)
+
ARGUMENTS: +
     type(ESMF_DELayout),  intent(in)            :: delayout
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,              intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Validates that the delayout is internally consistent. + The method returns an error code if problems are found. + +

+The arguments are: +

+
delayout
+
Specified ESMF_DELayout object. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ + +

+51 VM Class +

+ +

+51.1 Description +

+ +

+The ESMF VM (Virtual Machine) class is a generic representation of hardware and system software resources. There is exactly one VM object per ESMF Component, providing the execution environment for the Component code. The VM class handles all resource management tasks for the Component class and provides a description of the underlying configuration of the compute resources used by a Component. + +

+In addition to resource description and management, the VM class offers the lowest level of ESMF communication methods. The VM communication calls are very similar to MPI. Data references in VM communication calls must be provided as raw, language-specific, one-dimensional, contiguous data arrays. The similarity between VM and MPI communication calls is striking and there are many equivalent point-to-point and collective communication calls. However, unlike MPI, the VM communication calls support communication between threaded PETs in a completely transparent fashion. + +

+Many ESMF applications do not interact with the VM class directly very much. The resource management aspect is wrapped completely transparent into the ESMF Component concept. Often the only reason that user code queries a Component +object for the associated VM object is to inquire about resource information, such as the localPet or the petCount. Further, for most applications the use of higher level communication APIs, such as provided by Array and Field, are much more convenient than using the low level VM communication calls. + +

+The basic elements of a VM are called PETs, which stands for Persistent Execution Threads. These are equivalent to OS threads with a lifetime of at least that of the associated component. All VM functionality is expressed in terms of PETs. In the simplest, and most common case, a PET is equivalent to an MPI process. However, ESMF also supports multi-threading, where multiple PETs run as Pthreads inside the same virtual address space (VAS). + +

+The resource management functions of the VM class become visible when a component, or the driver code, creates sub-components. Section 16.4.8 discusses this aspect from the Superstructure +perspective and provides links to the relevant Component examples in the documentation. + +

+There are two parts to resource management, the parent and the child. When the parent component creates a child component, the parent VM object provides the resources on which the child is created with ESMF_GridCompCreate() or ESMF_CplCompCreate(). The optional petList argument to these calls limits the resources that the parent gives to a specific child. The child component, may specify - during its optional +ESMF_<Grid/Cpl>CompSetVM() method - how it wants to arrange the inherited resources in its own VM. After this, all standard ESMF methods of the Component, including ESMF_<Grid/Cpl>CompSetServices(), will execute in the child VM. Notice that the ESMF_<Grid/Cpl>CompSetVM() routine, although part of the child Component, must execute before the child VM has been started up. It runs in the parent VM context. The child VM is created and started up just before the user-written set services routine, specified as an argument to ESMF_<Grid/Cpl>CompSetServices(), is entered. + +

+51.2 Constants +

+ +

+ +

+ +
+51.2.1 ESMF_VMEPOCH +

+ +

+DESCRIPTION: +
+Specifies the kind of VM Epoch being entered. + +

+The type of this flag is: + +

+type(ESMF_VMEpoch_Flag) + +

+The valid values are: +

+
ESMF_VMEPOCH_NONE
+
An epoch wihout special behavior. + +
+
ESMF_VMEPOCH_BUFFER
+
This option must only be used for parts of the code with distinct sending + and receiving PETs, i.e. where no PETs are both sender and receiver. + All non-blocking messages are being buffered. A single message is sent + between unique pairs of src-dst PETs. This can significantly improve + performance for cases with a large imbalance in the number of sending + versus receiving PETs. The extra buffering also improves the overall + asynchronous behavior between the sending and receiving side. +
+
+ +

+51.3 Use and Examples +

+ +

+The concept of the ESMF Virtual Machine (VM) is so fundamental to the framework that every ESMF application uses it. However, for many user applications the VM class is transparently hidden behind the ESMF Component concept and higher data classes (e.g. Array, Field). The interaction between user code and VM is often only indirect. The following examples provide an overview of where the VM class can come into play in user code. + +

+ +

+ +

+ +

+51.3.1 Global VM +

+ +

+This complete example program demonstrates the simplest ESMF application, + consisting of only a main program without any Components. The global + VM, which is automatically created during the ESMF_Initialize() call, + is obtained using two different methods. First the global VM will be returned + by ESMF_Initialize() if the optional vm argument is specified. + The example uses the VM object obtained this way to call the VM print method. + Second, the global VM can be obtained anywhere in the user application using + the ESMF_VMGetGlobal() call. The identical VM is returned and several + VM query methods are called to inquire about the associated resources. + +

+

+program ESMF_VMDefaultBasicsEx
+#include "ESMF.h"
+
+  use ESMF
+  use ESMF_TestMod
+  
+  implicit none
+  
+  ! local variables
+  integer:: rc
+  type(ESMF_VM):: vm
+  integer:: localPet, petCount, peCount, ssiId, vas
+
+ +

+

+  call ESMF_Initialize(vm=vm, defaultlogfilename="VMDefaultBasicsEx.Log", &
+                    logkindflag=ESMF_LOGKIND_MULTI, rc=rc)
+  ! Providing the optional vm argument to ESMF_Initialize() is one way of
+  ! obtaining the global VM.
+
+ +

+

+  call ESMF_VMPrint(vm, rc=rc)
+
+ +

+

+  call ESMF_VMGetGlobal(vm=vm, rc=rc)
+  ! Calling ESMF_VMGetGlobal() anywhere in the user application is the other
+  ! way to obtain the global VM object.
+
+ +

+

+  call ESMF_VMGet(vm, localPet=localPet, petCount=petCount, peCount=peCount, &
+    rc=rc)
+  ! The VM object contains information about the associated resources. If the
+  ! user code requires this information it must query the VM object.
+
+ +

+

+  print *, "This PET is localPet: ", localPet
+  print *, "of a total of ",petCount," PETs in this VM."
+  print *, "There are ", peCount," PEs referenced by this VM"
+
+  call ESMF_VMGet(vm, localPet, peCount=peCount, ssiId=ssiId, vas=vas, rc=rc)
+
+ +

+

+  print *, "This PET is executing in virtual address space (VAS) ", vas
+  print *, "located on single system image (SSI) ", ssiId
+  print *, "and is associated with ", peCount, " PEs."
+
+ +

+

+end program
+
+ +

+ + +

+ +

+ +

+ +

+51.3.2 VM and Components +

+ +

+The following example shows the role that the VM plays in connection with ESMF + Components. A single Component is created in the main program. Through the + optional petList argument the driver code specifies that only resources + associated with PET 0 are given to the gcomp object. + +

+When the Component code is invoked through the standard ESMF Component methods + Initialize, Run, or Finalize the Component's VM is automatically entered. + Inside of the user-written Component code the Component VM can be obtained + by querying the Component object. The VM object will indicate that only a + single PET is executing the Component code. + +

+

+module ESMF_VMComponentEx_gcomp_mod
+
+ +

+

+  recursive subroutine mygcomp_init(gcomp, istate, estate, clock, rc)
+    type(ESMF_GridComp)   :: gcomp
+    type(ESMF_State)      :: istate, estate
+    type(ESMF_Clock)      :: clock
+    integer, intent(out)  :: rc
+
+    ! local variables
+    type(ESMF_VM):: vm
+    
+    ! get this Component's vm    
+    call ESMF_GridCompGet(gcomp, vm=vm)
+    
+    ! the VM object contains information about the execution environment of
+    ! the Component
+
+    call ESMF_VMPrint(vm, rc=rc)
+    
+    rc = 0
+  end subroutine !--------------------------------------------------------------
+
+  
+  recursive subroutine mygcomp_run(gcomp, istate, estate, clock, rc)
+    type(ESMF_GridComp)   :: gcomp
+    type(ESMF_State)      :: istate, estate
+    type(ESMF_Clock)      :: clock
+    integer, intent(out)  :: rc
+    
+    ! local variables
+    type(ESMF_VM):: vm
+    
+    ! get this Component's vm    
+    call ESMF_GridCompGet(gcomp, vm=vm)
+    
+    ! the VM object contains information about the execution environment of
+    ! the Component
+
+    call ESMF_VMPrint(vm, rc=rc)
+    
+    rc = 0
+  end subroutine !--------------------------------------------------------------
+
+  recursive subroutine mygcomp_final(gcomp, istate, estate, clock, rc)
+    type(ESMF_GridComp)   :: gcomp
+    type(ESMF_State)      :: istate, estate
+    type(ESMF_Clock)      :: clock
+    integer, intent(out)  :: rc
+    
+    ! local variables
+    type(ESMF_VM):: vm
+    
+    ! get this Component's vm    
+    call ESMF_GridCompGet(gcomp, vm=vm)
+    
+    ! the VM object contains information about the execution environment of
+    ! the Component
+
+    call ESMF_VMPrint(vm, rc=rc)
+    
+    rc = 0
+  end subroutine !--------------------------------------------------------------
+
+end module
+
+ +

+

+program ESMF_VMComponentEx
+#include "ESMF.h"
+  use ESMF
+  use ESMF_TestMod
+  use ESMF_VMComponentEx_gcomp_mod
+  implicit none
+  
+  ! local variables
+
+ +

+

+  gcomp = ESMF_GridCompCreate(petList=(/0/), rc=rc)
+
+ +

+

+  call ESMF_GridCompSetServices(gcomp, userRoutine=mygcomp_register, rc=rc)
+
+ +

+

+  call ESMF_GridCompInitialize(gcomp, rc=rc)
+
+ +

+

+  call ESMF_GridCompRun(gcomp, rc=rc)
+
+ +

+

+  call ESMF_GridCompFinalize(gcomp, rc=rc)
+
+ +

+

+  call ESMF_GridCompDestroy(gcomp, rc=rc)
+
+ +

+

+  call ESMF_Finalize(rc=rc)
+
+ +

+

+end program
+
+ +

+ + +

+ +

+ +

+ +

+51.3.3 Accessing the MPI Communicator from an VM object +

+ +

+Sometimes user code requires access to the MPI communicator, e.g. to support + legacy code that contains explict MPI communication calls. The correct way of + wrapping such code into ESMF is to obtain the MPI intra-communicator out of + the VM object. In order not to interfere with ESMF communications it is + advisable to duplicate the communicator before using it in user-level MPI + calls. In this example the duplicated communicator is used for a user + controlled MPI_Barrier(). + +

+

+  integer:: mpic
+
+ +

+

+  integer:: mpic2
+
+ +

+

+  call ESMF_VMGet(vm, mpiCommunicator=mpic, rc=rc)
+  ! The returned MPI communicator spans the same MPI processes that the VM
+  ! is defined on.
+
+ +

+

+  call MPI_Comm_dup(mpic, mpic2, ierr)
+  ! Duplicate the MPI communicator not to interfere with ESMF communications.
+  ! The duplicate MPI communicator can be used in any MPI call in the user
+  ! code. Here the MPI_Barrier() routine is called.
+  call MPI_Barrier(mpic2, ierr)
+
+ +

+ + +

+ +

+ +

+ +

+51.3.4 Using the MPI Communicator with the Fortran 2008 MPI binding +

+ +

+The Fortran 2008 MPI language binding defines type MPI_Comm to + represent the MPI communicator. The following example demonstrates + how the MPI communicator queried from the VM object can be used with the + Fortran 2008 MPI binding. + +

+

+  use mpi_f08
+
+ +

+

+  integer       :: int_mpic
+  type(MPI_Comm):: mpic
+
+ +

+

+  type(MPI_Comm):: mpic2
+
+ +

+

+  call ESMF_VMGet(vm, mpiCommunicator=int_mpic, rc=rc)
+  ! The returned MPI communicator spans the same MPI processes that the VM
+  ! is defined on.
+
+ +

+

+  mpic%mpi_val = int_mpic ! integer version of communicator -> type(MPI_Comm)
+
+  ! Now mpic can be used in the Fortran 2008 MPI binding interfaces
+
+  call MPI_Comm_dup(mpic, mpic2, ierr)
+  ! Duplicate the MPI communicator not to interfere with ESMF communications.
+  ! The duplicate MPI communicator can be used in any MPI call in the user
+  ! code. Here the MPI_Barrier() routine is called.
+  call MPI_Barrier(mpic2, ierr)
+
+ +

+ + +

+ +

+ +

+ +

+ +
+51.3.5 Nesting ESMF inside a user MPI application +

+ +

+It is possible to nest an ESMF application inside a user application that + explicitly calls MPI_Init() and MPI_Finalize(). The + ESMF_Initialize() call automatically checks whether MPI has already + been initialized, and if so does not call MPI_Init() internally. + On the finalize side, ESMF_Finalize() can be instructed to not + call MPI_Finalize(), making it the responsibility of the outer code + to finalize MPI. + + +

+

+  ! For cases where ESMF resource management is desired (e.g. for threading),
+  ! ESMF_InitializePreMPI() must be called before MPI_Init().
+  call ESMF_InitializePreMPI(rc=rc)
+
+ +

+

+  ! User code initializes MPI.
+  call MPI_Init(ierr)
+
+ +

+

+  ! ESMF_Initialize() does not call MPI_Init() if it finds MPI initialized.
+  call ESMF_Initialize(defaultlogfilename="VMUserMpiEx.Log", &
+    logkindflag=ESMF_LOGKIND_MULTI, rc=rc)
+
+ +

+

+  ! Use ESMF here...
+
+ +

+

+  ! Calling ESMF_Finalize() with endflag=ESMF_END_KEEPMPI instructs ESMF
+  ! to keep MPI active.
+  call ESMF_Finalize(endflag=ESMF_END_KEEPMPI, rc=rc)
+
+ +

+

+  ! It is the responsibility of the outer user code to finalize MPI.
+  call MPI_Finalize(ierr)
+
+ +

+ + +

+ +

+ +

+ +

+ +
+51.3.6 Nesting ESMF inside a user MPI application on a subset of MPI ranks +

+ +

+The previous example demonstrated that it is possible to nest an ESMF + application, i.e. ESMF_Initialize()...ESMF_Finalize() inside + MPI_Init()...MPI_Finalize(). It is not necessary that all + MPI ranks enter the ESMF application. The following example shows how the + user code can pass an MPI communicator to ESMF_Initialize(), and + enter the ESMF application on a subset of MPI ranks. + + +

+

+  ! User code initializes MPI.
+  call MPI_Init(ierr)
+
+ +

+

+  ! User code determines the local rank.
+  call MPI_Comm_rank(MPI_COMM_WORLD, rank, ierr)
+
+ +

+

+  ! User code prepares MPI communicator "esmfComm", that allows rank 0 and 1
+  ! to be grouped together.
+  if (rank < 2) then
+    ! first communicator split with color=0
+    call MPI_Comm_split(MPI_COMM_WORLD, 0, 0, esmfComm, ierr)
+  else
+    ! second communicator split with color=1
+    call MPI_Comm_split(MPI_COMM_WORLD, 1, 0, esmfComm, ierr)
+  endif
+
+ +

+

+  if (rank < 2) then
+    ! Only call ESMF_Initialize() on rank 0 and 1, passing the prepared MPI
+    ! communicator that spans these ranks.
+    call ESMF_Initialize(mpiCommunicator=esmfComm, &
+      defaultlogfilename="VMUserMpiCommEx.Log", &
+      logkindflag=ESMF_LOGKIND_MULTI, rc=rc)
+
+ +

+

+    ! Use ESMF here...
+
+ +

+

+    ! Calling ESMF_Finalize() with endflag=ESMF_END_KEEPMPI instructs ESMF
+    ! to keep MPI active.
+    call ESMF_Finalize(endflag=ESMF_END_KEEPMPI, rc=rc)
+
+ +

+

+  else
+    ! Ranks 2 and above do non-ESMF work...
+
+ +

+

+  endif
+
+ +

+

+  ! Free the MPI communicator before finalizing MPI.
+  call MPI_Comm_free(esmfComm, ierr)
+  
+  ! It is the responsibility of the outer user code to finalize MPI.
+  call MPI_Finalize(ierr)
+
+ +

+ + +

+ +

+ +

+ +

+ +
+51.3.7 Multiple concurrent instances of ESMF under separate MPI communicators +

+ +

+Multiple instances of ESMF can run concurrently under the same user main + program on separate MPI communicators. The user program first splits + MPI_COMM_WORLD into separate MPI communicators. Each communicator is + then used to run a separate ESMF instance by passing it into + ESMF_Initialize() on the appropriate MPI ranks. + +

+Care must be taken to set the defaultlogfilename to be unique on each + ESMF instances. This prevents concurrent ESMF instances from writing to the + same log file. + Further, each ESMF instances must call + ESMF_Finalize() with the endflag=ESMF_END_KEEPMPI option in + order to hand MPI control back to the user program. The outer user program is + ultimately responsible for destroying the MPI communicators and to cleanly + shut down MPI. + + +

+

+  ! User code initializes MPI.
+  call MPI_Init(ierr)
+
+ +

+

+  ! User code determines the local rank and overall size of MPI_COMM_WORLD
+  call MPI_Comm_rank(MPI_COMM_WORLD, rank, ierr)
+  call MPI_Comm_size(MPI_COMM_WORLD, size, ierr)
+
+ +

+

+  ! User code prepares different MPI communicators.
+  ! Here a single MPI_Comm_split() call is used to split MPI_COMM_WORLD
+  ! into two non-overlapping communicators:
+  ! One communicator for ranks 0 and 1, and the other for ranks 2 and above.
+  if (rank < 2) then
+    ! first communicator split with color=0
+    call MPI_Comm_split(MPI_COMM_WORLD, 0, 0, esmfComm, ierr)
+  else
+    ! second communicator split with color=1
+    call MPI_Comm_split(MPI_COMM_WORLD, 1, 0, esmfComm, ierr)
+  endif
+
+ +

+

+  if (rank < 2) then
+    ! Ranks 0 and 1 enter ESMF_Initialize() with the prepared communicator.
+    ! Care is taken to set a unique log file name.
+    call ESMF_Initialize(mpiCommunicator=esmfComm, &
+      defaultlogfilename="VMUserMpiCommMultiEx1.Log", &
+      logkindflag=ESMF_LOGKIND_MULTI, rc=rc)
+
+ +

+

+    ! Use ESMF here...
+
+ +

+

+    ! Finalize ESMF without finalizing MPI. The user application will call
+    ! MPI_Finalize() on all ranks.
+    call ESMF_Finalize(endflag=ESMF_END_KEEPMPI, rc=rc)
+
+ +

+

+  else
+    ! Ranks 2 and above enter ESMF_Initialize() with the prepared communicator.
+    ! Care is taken to set a unique log file name.
+    call ESMF_Initialize(mpiCommunicator=esmfComm, &
+      defaultlogfilename="VMUserMpiCommMultiEx2.Log", &
+      logkindflag=ESMF_LOGKIND_MULTI, rc=rc)
+
+ +

+

+    ! Use ESMF here...
+
+ +

+

+    ! Finalize ESMF without finalizing MPI. The user application will call
+    ! MPI_Finalize() on all ranks.
+    call ESMF_Finalize(endflag=ESMF_END_KEEPMPI, rc=rc)
+
+ +

+

+  endif
+
+ +

+

+  ! Free the MPI communicator(s) before finalizing MPI.
+  call MPI_Comm_free(esmfComm, ierr)
+  
+  ! It is the responsibility of the outer user code to finalize MPI.
+  call MPI_Finalize(ierr)
+
+ +

+ + +

+ +

+ +

+ +

+51.3.8 Communication - Send and Recv +

+ +

+The VM layer provides MPI-like point-to-point communication. Use + ESMF_VMSend() and ESMF_VMRecv() to pass data between two PETs. + The following code sends data from PET 'src' and receives it on PET 'dst'. + Both PETs must be part of the same VM. + +

+Set up the localData array. +

+

+  count = 10
+  allocate(localData(count))
+  do i=1, count
+    localData(i) = localPet*100 + i
+  enddo
+
+ +

+Carry out the data transfer between src PET and dst PET. +

+

+  if (localPet==src) then
+    call ESMF_VMSend(vm, sendData=localData, count=count, dstPet=dst, rc=rc)
+  endif
+
+ +

+

+  if (localPet==dst) then
+    call ESMF_VMRecv(vm, recvData=localData, count=count, srcPet=src, rc=rc)
+  endif
+
+ +

+Finally, on dst PET, test the received data for correctness. +

+

+  if (localPet==dst) then
+    do i=1, count
+      if (localData(i) /= src*100 + i) then
+        finalrc = ESMF_RC_VAL_WRONG
+      endif
+    enddo 
+  endif
+
+ +

+ + +

+ +

+ +

+ +

+51.3.9 Communication - Scatter and Gather +

+ +

+The VM layer provides MPI-like collective communication. ESMF_VMScatter() + scatters data located on root PET across all the PETs of the VM. + ESMF_VMGather() provides the opposite operation, gathering data from + all the PETs of the VM onto root PET. + +

+

+  integer, allocatable:: array1(:), array2(:)
+
+ +

+

+  ! allocate data arrays
+  nsize = 2
+  nlen = nsize * petCount
+  allocate(array1(nlen))
+  allocate(array2(nsize))
+
+  ! prepare data array1
+  do i=1, nlen
+    array1(i) = localPet * 100 + i
+  enddo
+
+ +

+

+  call ESMF_VMScatter(vm, sendData=array1, recvData=array2, count=nsize, &
+    rootPet=scatterRoot, rc=rc)
+
+ +

+

+  call ESMF_VMGather(vm, sendData=array2, recvData=array1, count=nsize, &
+    rootPet=gatherRoot, rc=rc)
+
+ +

+ + +

+ +

+ +

+ +

+51.3.10 Communication - AllReduce and AllFullReduce +

+ +

+Use ESMF_VMAllReduce() to reduce data distributed across the PETs of a + VM into a result vector, returned on all the PETs. Further, use + ESMF_VMAllFullReduce() to reduce the data into a single scalar returned + on all PETs. + +

+

+  integer, allocatable:: array1(:), array2(:)
+
+ +

+

+  ! allocate data arrays
+  nsize = 2
+  allocate(array1(nsize))
+  allocate(array2(nsize))
+
+  ! prepare data array1
+  do i=1, nsize
+    array1(i) = localPet * 100 + i
+  enddo
+
+ +

+

+  call ESMF_VMAllReduce(vm, sendData=array1, recvData=array2, count=nsize, &
+    reduceflag=ESMF_REDUCE_SUM, rc=rc)
+  ! Reduce distributed sendData, element by element into recvData and
+  ! return it on all the PETs.
+
+ +

+

+  call ESMF_VMAllFullReduce(vm, sendData=array1, recvData=result, &
+    count=nsize, reduceflag=ESMF_REDUCE_SUM, rc=rc)
+  ! Fully reduce the distributed sendData into a single scalar and
+  ! return it in recvData on all PETs.
+
+ +

+ + +

+ +

+ +

+ +

+ +
+51.3.11 Communication - Non-blocking option and VMEpochs +

+ The VM communication methods offer the option to execute in non-blocking + mode. In this mode, both sending and receving calls return immediatly on each + local PET. A separate synchronization call is needed to assure completion of + the data transfer. + +

+The separation of initiation and completion of the data transfer provides + the opportunity for the underlying communication system to progress + concurrently with other operations on the same PET. This can be leveraged to + have profound impact on the performance of an algorithm that requires both + computation and communication. + +

+Another critical application of the non-blocking communication mode is the + prevention of deadlocks. In the default blocking mode, a receiving method + will not return until the data transfer has completed. Sending methods may + also not return, especially if the message being sent is above the + implementation dependent internal buffer size. This behavior makes it often + hard, if not impossible, to write safe algorithms that guarantee to not + deadlock when communicating between a group of PETs. + Using the communication calls in non-blocking mode simplifies this problem + immensely. + +

+The following code shows how ESMF_VMSend() and ESMF_VMRecv() + are used in non-blocking mode by passing in the ESMF_SYNC_NONBLOCKING + argument. + +

+Set up the localData array. +

+

+  do i=1, count
+    localData(i) = localPet*100 + i
+  enddo
+
+ +

+Initiate the data transfer between src PET and dst PET. +

+

+  if (localPet==src) then
+    call ESMF_VMSend(vm, sendData=localData, count=count, dstPet=dst, &
+      syncflag=ESMF_SYNC_NONBLOCKING, rc=rc)
+  endif
+
+ +

+

+  if (localPet==dst) then
+    call ESMF_VMRecv(vm, recvData=localData, count=count, srcPet=src, &
+      syncflag=ESMF_SYNC_NONBLOCKING, rc=rc)
+  endif
+
+ +

+There is no garantee at this point that the data transfer has actually + started, let along completed. For this reason it is unsafe to overwrite + the data in the localData array on src PET, or to access + the localData array on dst PET. However both PETs are free + to engage in other work while the data transfer may proceed concurrently. +

+

+  ! local computational work here, or other communications
+
+ +

+Wait for the completion of all outstanding non-blocking communication calls + by issuing the ESMF_VMCommWaitAll() call. +

+

+  call ESMF_VMCommWaitAll(vm, rc=rc)
+
+ +

+Finally, on dst PET, test the received data for correctness. +

+

+  if (localPet==dst) then
+    do i=1, count
+      if (localData(i) /= src*100 + i) then
+        finalrc = ESMF_RC_VAL_WRONG
+      endif
+    enddo 
+  endif
+
+ +

+Sometimes it is necessary to wait for individual outstanding communications + specifically. This can be accomplished by using ESMF_CommHandle + objects. To demonstrate this, first re-initialize the localData array. +

+

+  do i=1, count
+    localData(i) = localPet*100 + i
+    localData2(i) = localPet*1000 + i
+  enddo
+
+ +

+Initiate the data transfer between src PET and dst PET, but this + time also pass the commhandle variable of type ESMF_CommHandle. + Here send two message between src and dst in order to have + different outstanding messages to wait for. +

+

+  if (localPet==src) then
+    call ESMF_VMSend(vm, sendData=localData, count=count, dstPet=dst, &
+      syncflag=ESMF_SYNC_NONBLOCKING, commhandle=commhandle(1), rc=rc)
+    call ESMF_VMSend(vm, sendData=localData2, count=count, dstPet=dst, &
+      syncflag=ESMF_SYNC_NONBLOCKING, commhandle=commhandle(2), rc=rc)
+  endif
+
+ +

+

+  if (localPet==dst) then
+    call ESMF_VMRecv(vm, recvData=localData, count=count, srcPet=src, &
+      syncflag=ESMF_SYNC_NONBLOCKING, commhandle=commhandle(1), rc=rc)
+    call ESMF_VMRecv(vm, recvData=localData2, count=count, srcPet=src, &
+      syncflag=ESMF_SYNC_NONBLOCKING, commhandle=commhandle(2), rc=rc)
+  endif
+
+ +

+Now it is possible to specifically wait for the first data transfer, e.g. on + the dst PET. +

+

+  if (localPet==dst) then
+    call ESMF_VMCommWait(vm, commhandle=commhandle(1), rc=rc)
+  endif
+
+ +

+At this point there are still 2 outstanding communications on the src + PET, and one outstanding communication on the dst PET. However, having + returned from the specific ESMF_VMCommWait() call guarantees that the + first communication on the dst PET has completed, i.e. the data has + been received from the src PET, and can now be accessed in the + localData array. +

+

+  if (localPet==dst) then
+    do i=1, count
+      if (localData(i) /= src*100 + i) then
+        finalrc = ESMF_RC_VAL_WRONG
+      endif
+    enddo
+  endif
+
+ +

+Before accessing data from the second transfer, it is necessary to wait on + the associated commhandle for completion. +

+

+  if (localPet==dst) then
+    call ESMF_VMCommWait(vm, commhandle=commhandle(2), rc=rc)
+  endif
+
+ +

+

+  if (localPet==dst) then
+    do i=1, count
+      if (localData2(i) /= src*1000 + i) then
+        finalrc = ESMF_RC_VAL_WRONG
+      endif
+    enddo
+  endif
+
+ +

+Finally the commhandle elements on the src side need to be + cleared by waiting for them. This could be done using specific + ESMF_VMCommWait() calls, similar to the dst side, or simply + by waiting for all/any outstanding communications using + ESMF_VMCommWaitAll() as in the previous example. This call can be + issued without commhandle on all of the PETs. +

+

+  call ESMF_VMCommWaitAll(vm, rc=rc)
+
+ +

+For cases where multiple messages are being sent between the same + src-dst pairs using non-blocking communications, performance + can often be improved by aggregating individual messages. An extra buffer + is needed to hold the collected messages. The result is a single data + transfer for each PET pair. In many cases this can significantly reduce the + time spent in communications. The ESMF VM class provides access to such a + buffering technique through the ESMF_VMEpoch API. + +

+The ESMF_VMEpoch API consists of two interfaces: + ESMF_VMEpochEnter() and ESMF_VMEpochExit(). When entering an + epoch, the user specifies the type of epoch that is to be entered. Currently + only ESMF_VMEPOCH_BUFFER is available. Inside this epoch, + non-blocking communication calls are aggregated and data transfers on the + src side are not issued until the epoch is exited. On the dst side + a single data transfer is received, and then divided over the actual + non-blocking receive calls. + +

+The following code repeates the previous example with two messages between + src and dst. It is important that every PET only must act either + as sender or receiver. A sending PET can send to many different PETs, and a + receiving PET can receive from many PETs, but no PET must send and + receive within the same epoch! + +

+First re-initialize the localData array. +

+

+  do i=1, count
+    localData(i) = localPet*100 + i
+    localData2(i) = localPet*1000 + i
+  enddo
+
+ +

+Enter the ESMF_VMEPOCH_BUFFER. +

+

+  call ESMF_VMEpochEnter(epoch=ESMF_VMEPOCH_BUFFER, rc=rc)
+
+ +

+Now issue non-blocking send and receive calls as usual. +

+

+  if (localPet==src) then
+    call ESMF_VMSend(vm, sendData=localData, count=count, dstPet=dst, &
+      syncflag=ESMF_SYNC_NONBLOCKING, commhandle=commhandle(1), rc=rc)
+
+ +

+

+    call ESMF_VMSend(vm, sendData=localData2, count=count, dstPet=dst, &
+      syncflag=ESMF_SYNC_NONBLOCKING, commhandle=commhandle(2), rc=rc)
+
+ +

+

+  endif
+  if (localPet==dst) then
+    call ESMF_VMRecv(vm, recvData=localData, count=count, srcPet=src, &
+      syncflag=ESMF_SYNC_NONBLOCKING, commhandle=commhandle(1), rc=rc)
+
+ +

+

+    call ESMF_VMRecv(vm, recvData=localData2, count=count, srcPet=src, &
+      syncflag=ESMF_SYNC_NONBLOCKING, commhandle=commhandle(2), rc=rc)
+
+ +

+

+  endif
+
+ +

+No data transfer has been initiated at this point due to the fact that this + code is inside the ESMF_VMEPOCH_BUFFER. On the dst side the + same methods are used to wait for the data transfer. However, it is not until + the exit of the epoch on the src side that data is transferred to the + dst side. +

+

+  if (localPet==dst) then
+    call ESMF_VMCommWait(vm, commhandle=commhandle(1), rc=rc)
+
+ +

+

+  endif
+
+ +

+

+  if (localPet==dst) then
+    do i=1, count
+      if (localData(i) /= src*100 + i) then
+        finalrc = ESMF_RC_VAL_WRONG
+      endif
+    enddo 
+  endif
+
+ +

+

+  if (localPet==dst) then
+    call ESMF_VMCommWait(vm, commhandle=commhandle(2), rc=rc)
+
+ +

+

+  endif
+
+ +

+

+  if (localPet==dst) then
+    do i=1, count
+      if (localData2(i) /= src*1000 + i) then
+        finalrc = ESMF_RC_VAL_WRONG
+      endif
+    enddo
+  endif
+
+ +

+Now exit the epoch, to trigger the data transfer on the src side. +

+

+  call ESMF_VMEpochExit(rc=rc)
+
+ +

+Finally clear the outstanding communication handles on the src side. + This needs to happen first inside the next ESMF_VMEPOCH_BUFFER. + As before, waits could be issued either for the specific commhandle + elements not yet explicitly cleared, or a general call to + ESMF_VMCommWaitAll() can be used for simplicity. +

+

+  call ESMF_VMEpochEnter(epoch=ESMF_VMEPOCH_BUFFER, rc=rc)
+
+ +

+

+  call ESMF_VMCommWaitAll(vm, rc=rc)
+
+ +

+

+  call ESMF_VMEpochExit(rc=rc)
+
+ +

+ + +

+ +

+ +

+ +

+ +
+51.3.12 Using VM communication methods with data of rank greater than one +

+ +

+In the current implementation of the VM communication methods all the data + array arguments are declared as assumed shape dummy arrays of rank one. + The assumed shape flavor was chosen in order to minimize the chance of + copy in/out problems, associated with the other options for declaring the + dummy data arguments. + However, currently the interfaces are not overloaded for higher ranks. This + restriction requires that users that need to communicate data arrays with + rank greater than one, must only pass the first dimension of the data array + into the VM communication calls. Specifying the full size of the data arrays + (considering all dimensions) ensure that the complete data is + transferred in or out of the contiguous array memory. +

+

+  integer, allocatable:: sendData(:,:)
+  integer, allocatable:: recvData(:,:,:,:)
+
+ +

+

+  count1 = 5
+  count2 = 8
+  allocate(sendData(count1,count2)) ! 5 x 8 = 40 elements
+  do j=1, count2
+    do i=1, count1
+      sendData(i,j) = localPet*100 + i + (j-1)*count1
+    enddo
+  enddo
+  
+  count1 = 2
+  count2 = 5
+  count3 = 1
+  count4 = 4
+  allocate(recvData(count1,count2,count3,count4)) ! 2 x 5 x 1 x 4 = 40 elements
+  do l=1, count4
+    do k=1, count3
+      do j=1, count2
+        do i=1, count1
+          recvData(i,j,k,l) = 0
+        enddo
+      enddo
+    enddo
+  enddo
+
+ +

+

+  if (localPet==src) then
+    call ESMF_VMSend(vm, &
+      sendData=sendData(:,1), & ! 1st dimension as contiguous array section
+      count=count1*count2, &    ! total count of elements
+      dstPet=dst, rc=rc)
+  endif
+
+ +

+

+  if (localPet==dst) then
+    call ESMF_VMRecv(vm, &
+      recvData=recvData(:,1,1,1), & ! 1st dimension as contiguous array section
+      count=count1*count2*count3*count4, &  ! total count of elements
+      srcPet=src, rc=rc)
+  endif
+
+ +

+ + +

+51.4 Restrictions and Future Work +

+ +

+ +

    +
  1. Only array section syntax that leads to contiguous sub sections is supported. The source and destination arguments in VM communication calls must reference contiguous data arrays. Fortran array sections are not guaranteed to be contiguous in all cases. + +

    +

  2. +
  3. Non-blocking Reduce() operations not implemented. None of the reduce communication calls have an implementation for the non-blocking feature. This affects: + +
      +
    • ESMF_VMAllFullReduce(), +
    • +
    • ESMF_VMAllReduce(), +
    • +
    • ESMF_VMReduce(). +
    • +
    + +

    +

  4. +
  5. Limitations when using mpiuni mode. In mpiuni mode non-blocking communications are limited to one outstanding message per source-destination PET pair. Furthermore, in mpiuni mode the message length must be smaller than the internal ESMF buffer size. + +

    +

  6. +
  7. Alternative communication paths not accessible. All user accessible VM communication calls are currently implemented using MPI-1.2. VM's implementation of alternative communication techniques, such as shared memory between threaded PETs and POSIX IPC between PETs located on the same single system image, are currently inaccessible to the user. (One exception to this is the mpiuni case for which the VM automatically utilizes a shared memory path.) + +

    +

  8. +
  9. Data arrays in VM comm calls are assumed shape with rank=1. Currently all dummy arrays in VM comm calls are defined as assumed shape arrays of rank=1. The motivation for this choice is that the use of assumed shape dummy arrays guards against the Fortran copy in/out problem. However it may not be as flexible as desired from the user perspective. Alternatively all dummy arrays could be defined as assumed size arrays, as it is done in most MPI implementations, allowing arrays of various rank to be passed into the comm methods. Arrays of higher rank can be passed into the current interfaces using Fortran array syntax. This approach is explained in section 51.3.12. + +

    +

  10. +
  11. Limitations when using VMEpoch. Using a blocking collective call (e.g. ESMF_VMBroadcast(), the MPI_Bcast() used by ESMF_InfoBroadcast(), etc.) within the region enclosed by ESMF_VMEpochEnter() and ESMF_VMEpochExit() will result in a deadlock. + +

    +

  12. +
+ +

+ +

+51.5 Design and Implementation Notes +

+ +

+The VM class provides an additional layer of abstraction on top of the POSIX machine model, making it suitable for HPC applications. There are four key aspects the VM class deals with. + +

+ +

    +
  1. Encapsulation of hardware and operating system details within the concept of Persistent Execution Threads (PETs). + +

    +

  2. +
  3. Resource management in terms of PETs with a guard against over-subscription. + +

    +

  4. +
  5. Topological description of the underlying configuration of the compute resources in terms of PETs. + +

    +

  6. +
  7. Transparent communication API for point-to-point and collective PET-based primitives, hiding the many different communication channels and offering best possible performance. + +

    +

  8. +
+ +

+

+ +\scalebox{0.6}{\includegraphics{VM_design}} +
+ +

+Definition of terms used in the diagram + +

+ +

    +
  • PE: A processing element (PE) is an alias for the smallest physical processing unit available on a particular hardware platform. In the language of today's microprocessor architecture technology a PE is identical to a core, however, if future microprocessor designs change the smallest physical processing unit the mapping of the PE to actual hardware will change accordingly. Thus the PE layer separates the hardware specific part of the VM from the hardware-independent part. Each PE is labeled with an id number which identifies it uniquely within all of the VM instances of an ESMF application. + +

    +

  • +
  • Core: A Core is the smallest physical processing unit which typically comprises a register set, an integer arithmetic unit, a floating-point unit and various control units. Each Core is labeled with an id number which identifies it uniquely within all of the VM instances of an ESMF application. + +

    +

  • +
  • CPU: The central processing unit (CPU) houses single or multiple cores, providing them with the interface to system memory, interconnects and I/O. Typically the CPU provides some level of caching for the instruction and data streams in and out of the Cores. Cores in a multi-core CPU typically share some caches. Each CPU is labeled with an id number which identifies it uniquely within all of the VM instances of an ESMF application. + +

    +

  • +
  • SSI: A single system image (SSI) spans all the CPUs controlled by a single running instance of the operating system. SMP and NUMA are typical multi-CPU SSI architectures. Each SSI is labeled with an id number which identifies it uniquely within all of the VM instances of an ESMF application. + +

    +

  • +
  • TOE: A thread of execution (TOE) executes an instruction sequence. TOE's come in two flavors: PET and TET. + +

    +

  • +
  • PET: A persistent execution thread (PET) executes an instruction sequence on an associated set of data. The PET has a lifetime at least as long as the associated data set. In ESMF the PET is the central concept of abstraction provided by the VM class. The PETs of an VM object are labeled from 0 to N-1 where N is the total number of PETs in the VM object. + +

    +

  • +
  • TET: A transient execution thread (TET) executes an instruction sequence on an associated set of data. A TET's lifetime might be shorter than that of the associated data set. + +

    +

  • +
  • OS-Instance: The OS-Instance of a TOE describes how a particular TOE is instantiated on the OS level. Using POSIX terminology a TOE will run as a single thread within a single- or multi-threaded process. + +

    +

  • +
  • Pthreads: Communication via the POSIX Thread interface. + +

    +

  • +
  • MPI-1, MPI-2: Communication via MPI standards 1 and 2. + +

    +

  • +
  • armci: Communication via the aggregate remote memory copy interface. + +

    +

  • +
  • SHMEM: Communication via the SHMEM interface. + +

    +

  • +
  • OS-IPC: Communication via the operating system's inter process communication interface. Either POSIX IPC or System V IPC. + +

    +

  • +
  • InterCon-lib: Communication via the interconnect's library native interface. An example is the Elan library for Quadrics. + +

    +

  • +
+ +

+The POSIX machine abstraction, while a very powerful concept, needs augmentation when applied to HPC applications. Key elements of the POSIX abstraction are processes, which provide virtually unlimited resources (memory, I/O, sockets, ...) to possibly multiple threads of execution. Similarly POSIX threads create the illusion that there is virtually unlimited processing power available to each POSIX process. While the POSIX abstraction is very suitable for many multi-user/multi-tasking applications that need to share limited physical resources, it does not directly fit the HPC workload where over-subscription of resources is one of the most expensive modes of operation. + +

+ESMF's virtual machine abstraction is based on the POSIX machine model but holds additional information about the available physical processing units in terms of Processing Elements (PEs). A PE is the smallest physical processing unit and encapsulates the hardware details (Cores, CPUs and SSIs). + +

+There is exactly one physical machine layout for each application, and all VM instances have access to this information. The PE is the smallest processing unit which, in today's microprocessor technology, corresponds to a single Core. Cores are arranged in CPUs which in turn are arranged in SSIs. The setup of the physical machine layout is part of the ESMF initialization process. + +

+On top of the PE concept the key abstraction provided by the VM is the PET. All user code is executed by PETs while OS and hardware details are hidden. The VM class contains a number of methods which allow the user to prescribe how the PETs of a desired virtual machine should be instantiated on the OS level and how they should map onto the hardware. This prescription is kept in a private virtual machine plan object which is created at the same time the associated component is being created. Each time component code is entered through one of the component's registered top-level methods (Initialize/Run/Finalize), the virtual machine plan along with a pointer to the respective user function is used to instantiate the user code on the PETs of the associated VM in form of single- or multi-threaded POSIX processes. + +

+The process of starting, entering, exiting and shutting down a VM is very transparent, all spawning and joining of threads is handled by VM methods "behind the scenes". Furthermore, fundamental synchronization and communication primitives are provided on the PET level through a uniform API, hiding details related to the actual instantiation of the participating PETs. + +

+Within a VM object each PE of the physical machine maps to 0 or 1 PETs. Allowing unassigned PEs provides a means to prevent over-subscription between multiple concurrently running virtual machines. Similarly a maximum of one PET per PE prevents over-subscription within a single VM instance. However, over-subscription is possible by subscribing PETs from different virtual machines to the same PE. This type of over-subscription can be desirable for PETs associated with I/O workloads expected to be used infrequently and to block often on I/O requests. + +

+On the OS level each PET of a VM object is represented by a POSIX thread (Pthread) either belonging to a single- or multi-threaded process and maps to at least 1 PE of the physical machine, ensuring its execution. Mapping a single PET to multiple PEs provides resources for user-level multi-threading, in which case the user code inquires how many PEs are associated with its PET and if there are multiple PEs available the user code can spawn an equal number of threads (e.g. OpenMP) without risking over-subscription. Typically these user spawned threads are short-lived and used for fine-grained parallelization in form of TETs. All PEs mapped against a single PET must be part of a unique SSI in order to allow user-level multi-threading! + +

+In addition to discovering the physical machine the ESMF initialization process sets up the default global virtual machine. This VM object, which is the ultimate parent of all VMs created during the course of execution, contains as many PETs as there are PEs in the physical machine. All of its PETs are instantiated in form of single-threaded MPI processes and a 1:1 mapping of PETs to PEs is used for the default global VM. + +

+The VM design and implementation is based on the POSIX process and thread model as well as the MPI-1.2 standard. As a consequence of the latter standard the number of processes is static during the course of execution and is determined at start-up. The VM implementation further requires that the user starts up the ESMF application with as many MPI processes as there are PEs in the available physical machine using the platform dependent mechanism to ensure proper process placement. + +

+All MPI processes participating in a VM are grouped together by means of an MPI_Group object and their context is defined via an MPI_Comm object (MPI intra-communicator). The PET local process id within each virtual machine is equal to the MPI_Comm_rank in the local MPI_Comm context whereas the PET process id is equal to the MPI_Comm_rank in MPI_COMM_WORLD. The PET process id is used within the VM methods to determine the virtual memory space a PET is operating in. + +

+In order to provide a migration path for legacy MPI-applications the VM offers accessor functions to its MPI_Comm object. Once obtained this object may be used in explicit user-code MPI calls within the same context. + +

+ +

+51.6 Class API +

+ +

+ +

+ +

+ +

+51.6.1 ESMF_VMAssignment(=) - VM assignment +

+ +

+ +

+
+INTERFACE: +

     interface assignment(=)
+     vm1 = vm2
+
ARGUMENTS: +
     type(ESMF_VM) :: vm1
+     type(ESMF_VM) :: vm2
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Assign vm1 as an alias to the same ESMF VM object in memory + as vm2. If vm2 is invalid, then vm1 will be equally invalid after + the assignment. + +

+The arguments are: +

+
vm1
+
The ESMF_VM object on the left hand side of the assignment. + +
+
vm2
+
The ESMF_VM object on the right hand side of the assignment. + +
+
+ +

+ +

+ +

+51.6.2 ESMF_VMOperator(==) - VM equality operator +

+ +

+ +

+
+INTERFACE: +

   interface operator(==)
+     if (vm1 == vm2) then ... endif
+               OR
+     result = (vm1 == vm2)
+
RETURN VALUE: +
     logical :: result
+
ARGUMENTS: +
     type(ESMF_VM), intent(in) :: vm1
+     type(ESMF_VM), intent(in) :: vm2
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Test whether vm1 and vm2 are valid aliases to the same ESMF + VM object in memory. For a more general comparison of two ESMF VMs, + going beyond the simple alias test, the ESMF_VMMatch() function (not yet + implemented) must be used. + +

+The arguments are: +

+
vm1
+
The ESMF_VM object on the left hand side of the equality + operation. + +
+
vm2
+
The ESMF_VM object on the right hand side of the equality + operation. + +
+
+ +

+ +

+ +

+51.6.3 ESMF_VMOperator(/=) - VM not equal operator +

+ +

+ +

+
+INTERFACE: +

   interface operator(/=)
+     if (vm1 /= vm2) then ... endif
+               OR
+     result = (vm1 /= vm2)
+
RETURN VALUE: +
     logical :: result
+
ARGUMENTS: +
     type(ESMF_VM), intent(in) :: vm1
+     type(ESMF_VM), intent(in) :: vm2
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Test whether vm1 and vm2 are not valid aliases to the + same ESMF VM object in memory. For a more general comparison of two ESMF + VMs, going beyond the simple alias test, the ESMF_VMMatch() function + (not yet implemented) must be used. + +

+The arguments are: +

+
vm1
+
The ESMF_VM object on the left hand side of the non-equality + operation. + +
+
vm2
+
The ESMF_VM object on the right hand side of the non-equality + operation. + +
+
+ +

+ +

+ +

+51.6.4 ESMF_VMAllFullReduce - Fully reduce data across VM, result on all PETs +

+ +

+ +

+
+INTERFACE: +

    subroutine ESMF_VMAllFullReduce(vm, sendData, recvData, &
+      count, reduceflag, syncflag, commhandle, rc)
+
ARGUMENTS: +
      type(ESMF_VM),                    intent(in)            :: vm
+      <type>(ESMF_KIND_<kind>), target, intent(in)            :: sendData(:)
+      <type>(ESMF_KIND_<kind>),         intent(out)           :: recvData
+      integer,                          intent(in)            :: count
+      type(ESMF_Reduce_Flag),           intent(in)            :: reduceflag
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+      type(ESMF_Sync_Flag),             intent(in),  optional :: syncflag
+      type(ESMF_CommHandle),            intent(out), optional :: commhandle
+      integer,                          intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Collective ESMF_VM communication call that reduces a contiguous data + array of <type><kind> across the ESMF_VM object + into a single value of the same <type><kind>. The result is + returned on all PETs. Different reduction operations can be specified. + +

+This method is overloaded for: + ESMF_TYPEKIND_I4, ESMF_TYPEKIND_I8, + ESMF_TYPEKIND_R4, ESMF_TYPEKIND_R8. + +

+TODO: The current version of this method does not provide an + implementation of the non-blocking feature. When calling this + method with syncflag = ESMF_SYNC_NONBLOCKING, error code + ESMF_RC_NOT_IMPL will be returned and an error will be + logged. + +

+The arguments are: +

+
vm
+
ESMF_VM object. + +
+
sendData
+
Contiguous data array holding data to be sent. All PETs must specify a + valid source array. + +
+
recvData
+
Single data variable to be received. All PETs must specify a + valid result variable. + +
+
count
+
Number of elements in sendData. Allowed to be different across the + PETs, as long as count > 0. + +
+
reduceflag
+
Reduction operation. See section 54.49 for a list of + valid reduce operations. + +
+
[syncflag]
+
Flag indicating whether this call behaves blocking or non-blocking. + The default is ESMF_SYNC_BLOCKING. See section + 54.59 for a complete list of options. + +
+
[commhandle]
+
If present, a communication handle will be returned in case of a + non-blocking request (see argument syncflag). The + commhandle can be used in ESMF_VMCommWait() to block the + calling PET until the communication call has finished PET-locally. If + no commhandle was supplied to a non-blocking call the VM method + ESMF_VMCommWaitAll() may be used to block on all currently queued + communication calls of the VM context. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+51.6.5 ESMF_VMAllGather - Gather data across VM, result on all PETs +

+ +

+ +

+
+INTERFACE: +

    subroutine ESMF_VMAllGather(vm, sendData, recvData, count, &
+      syncflag, commhandle, rc)
+
ARGUMENTS: +
      type(ESMF_VM),                    intent(in)            :: vm
+      <type>(ESMF_KIND_<kind>), target, intent(in)            :: sendData(:)
+      <type>(ESMF_KIND_<kind>), target, intent(out)           :: recvData(:)
+      integer,                          intent(in)            :: count
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+      type(ESMF_Sync_Flag),             intent(in),  optional :: syncflag
+      type(ESMF_CommHandle),            intent(out), optional :: commhandle
+      integer,                          intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Collective ESMF_VM communication call that gathers contiguous data + of <type><kind> from all PETs of an ESMF_VM object into an array on + each PET. The data received in recvData is identical across all PETs. + The count elements sent from the sendData array on PET i + are stored contiguously in the recvData array starting at position + i $\times$ count $+$ 1. + +

+This method is overloaded for: + ESMF_TYPEKIND_I4, ESMF_TYPEKIND_I8, + ESMF_TYPEKIND_R4, ESMF_TYPEKIND_R8, + ESMF_TYPEKIND_LOGICAL. + +

+The arguments are: +

+
vm
+
ESMF_VM object. + +
+
sendData
+
Contiguous data array holding data to be sent. All PETs must specify a + valid source array. The first count elements on each PET are sent. + +
+
recvData
+
Contiguous data array for data to be received. All PETs must specify a + valid recvData argument large enough to accommodate the received + data. + +
+
count
+
Number of elements to be gathered from each PET. Must be the + same on all PETs. + +
+
[syncflag]
+
Flag indicating whether this call behaves blocking or non-blocking. + The default is ESMF_SYNC_BLOCKING. See section + 54.59 for a complete list of options. + +
+
[commhandle]
+
If present, a communication handle will be returned in case of a + non-blocking request (see argument syncflag). The + commhandle can be used in ESMF_VMCommWait() to block the + calling PET until the communication call has finished PET-locally. If + no commhandle was supplied to a non-blocking call the VM method + ESMF_VMCommWaitAll() may be used to block on all currently queued + communication calls of the VM context. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+51.6.6 ESMF_VMAllGatherV - GatherV data across VM, result on all PETs +

+ +

+ +

+
+INTERFACE: +

    subroutine ESMF_VMAllGatherV(vm, sendData, sendCount, &
+      recvData, recvCounts, recvOffsets, syncflag, commhandle, rc)
+
ARGUMENTS: +
      type(ESMF_VM),                    intent(in)            :: vm
+      <type>(ESMF_KIND_<kind>), target, intent(in)            :: sendData(:)
+      integer,                          intent(in)            :: sendCount
+      <type>(ESMF_KIND_<kind>), target, intent(out)           :: recvData(:)
+      integer,                          intent(in)            :: recvCounts(:)
+      integer,                          intent(in)            :: recvOffsets(:)
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+      type(ESMF_Sync_Flag),             intent(in),  optional :: syncflag
+      type(ESMF_CommHandle),            intent(out), optional :: commhandle
+      integer,                          intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Collective ESMF_VM communication call that gathers contiguous data + of <type><kind> from all PETs of an ESMF_VM object into an array on + each PET. The data received in recvData is identical across all PETs. + The sendCount elements sent from the sendData array on PET + i are stored contiguously in the recvData array starting at + position recvOffsets(i). + +

+This method is overloaded for: + ESMF_TYPEKIND_I4, ESMF_TYPEKIND_I8, + ESMF_TYPEKIND_R4, ESMF_TYPEKIND_R8. + +

+TODO: The current version of this method does not provide an + implementation of the non-blocking feature. When calling this + method with syncflag = ESMF_SYNC_NONBLOCKING, error code + ESMF_RC_NOT_IMPL will be returned and an error will be + logged. + +

+The arguments are: +

+
vm
+
ESMF_VM object. + +
+
sendData
+
Contiguous data array holding data to be sent. All PETs must specify a + valid source array. + +
+
sendCount
+
Number of sendData elements to send from local PET to all other + PETs. + +
+
recvData
+
Contiguous data array for data to be received. All PETs must specify a + valid recvData argument large enough to accommodate the received + data. + +
+
recvCounts
+
Number of recvData elements to be received from the corresponding + source PET. + +
+
recvOffsets
+
Offsets in units of elements in recvData marking the start of + element sequence to be received from source PET. + +
+
[syncflag]
+
Flag indicating whether this call behaves blocking or non-blocking. + The default is ESMF_SYNC_BLOCKING. See section + 54.59 for a complete list of options. + +
+
[commhandle]
+
If present, a communication handle will be returned in case of a + non-blocking request (see argument syncflag). The + commhandle can be used in ESMF_VMCommWait() to block the + calling PET until the communication call has finished PET-locally. If + no commhandle was supplied to a non-blocking call the VM method + ESMF_VMCommWaitAll() may be used to block on all currently queued + communication calls of the VM context. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+51.6.7 ESMF_VMAllReduce - Reduce data across VM, result on all PETs +

+ +

+ +

+
+INTERFACE: +

    subroutine ESMF_VMAllReduce(vm, sendData, recvData, count, &
+      reduceflag, syncflag, commhandle, rc)
+
ARGUMENTS: +
      type(ESMF_VM),                    intent(in)            :: vm
+      <type>(ESMF_KIND_<kind>), target, intent(in)            :: sendData(:)
+      <type>(ESMF_KIND_<kind>), target, intent(out)           :: recvData(:)
+      integer,                          intent(in)            :: count
+      type(ESMF_Reduce_Flag),           intent(in)            :: reduceflag
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+      type(ESMF_Sync_Flag),             intent(in),  optional :: syncflag
+      type(ESMF_CommHandle),            intent(out), optional :: commhandle
+      integer,                          intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Collective ESMF_VM communication call that reduces a contiguous data + array across the ESMF_VM object into a contiguous data array of the + same <type><kind>. The result array is returned on all PETs. + Different reduction operations can be specified. + +

+This method is overloaded for: + ESMF_TYPEKIND_I4, ESMF_TYPEKIND_I8, + ESMF_TYPEKIND_R4, ESMF_TYPEKIND_R8. + +

+TODO: The current version of this method does not provide an + implementation of the non-blocking feature. When calling this + method with syncflag = ESMF_SYNC_NONBLOCKING, error code + ESMF_RC_NOT_IMPL will be returned and an error will be + logged. + +

+The arguments are: +

+
vm
+
ESMF_VM object. + +
+
sendData
+
Contiguous data array holding data to be sent. All PETs must specify a + valid source array. + +
+
recvData
+
Contiguous data array for data to be received. All PETs must specify a + valid recvData argument. + +
+
count
+
Number of elements in sendData and recvData. Must be the same on all + PETs. + +
+
reduceflag
+
Reduction operation. See section 54.49 for a list of + valid reduce operations. + +
+
[syncflag]
+
Flag indicating whether this call behaves blocking or non-blocking. + The default is ESMF_SYNC_BLOCKING. See section + 54.59 for a complete list of options. + +
+
[commhandle]
+
If present, a communication handle will be returned in case of a + non-blocking request (see argument syncflag). The + commhandle can be used in ESMF_VMCommWait() to block the + calling PET until the communication call has finished PET-locally. If + no commhandle was supplied to a non-blocking call the VM method + ESMF_VMCommWaitAll() may be used to block on all currently queued + communication calls of the VM context. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+51.6.8 ESMF_VMAllToAll - AllToAll communications across VM +

+ +

+ +

+
+INTERFACE: +

    subroutine ESMF_VMAllToAll(vm, sendData, sendCount, &
+      recvData, recvCount, syncflag, &
+      commhandle, rc)
+
ARGUMENTS: +
      type(ESMF_VM),                    intent(in)            :: vm
+      <type>(ESMF_KIND_<kind>), target, intent(in)            :: sendData(:)
+      integer,                          intent(in)            :: sendCount
+      <type>(ESMF_KIND_<kind>), target, intent(out)           :: recvData(:)
+      integer,                          intent(in)            :: recvCount
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+      type(ESMF_Sync_Flag),             intent(in),  optional :: syncflag
+      type(ESMF_CommHandle),            intent(out), optional :: commhandle
+      integer,                          intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.3.0r. If code using this interface compiles with any version of ESMF starting with 5.3.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Collective ESMF_VM communication call that performs a total exchange + operation on the contiguous data of <type><kind>. PET i sends + contiguous sendCount elements of its sendData array to every + PET, including itself. The sendCount elements sent to PET j are + those starting at position j $\times$ sendCount $+$ 1, and are + stored in recvData on PET $j$ in position i $\times$ + recvCount $+$ 1. + +

+This method is overloaded for: + ESMF_TYPEKIND_I4, ESMF_TYPEKIND_I8, + ESMF_TYPEKIND_R4, ESMF_TYPEKIND_R8. + +

+TODO: The current version of this method does not provide an + implementation of the non-blocking feature. When calling this + method with syncflag = ESMF_SYNC_NONBLOCKING, error code + ESMF_RC_NOT_IMPL will be returned and an error will be + logged. + +

+The arguments are: +

+
vm
+
ESMF_VM object. + +
+
sendData
+
Contiguous data array holding data to be sent. All PETs must specify a + valid source array. + +
+
sendCount
+
Number of sendData elements to send from local PET to + each destination PET. + +
+
recvData
+
Contiguous data array for data to be received. All PETs must specify a + valid recvData argument large enough to accommodate the received + data. + +
+
recvCount
+
Number of recvData elements to be received by local PET from + each source PET. + +
+
[syncflag]
+
Flag indicating whether this call behaves blocking or non-blocking. + The default is ESMF_SYNC_BLOCKING. See section + 54.59 for a complete list of options. + +
+
[commhandle]
+
If present, a communication handle will be returned in case of a + non-blocking request (see argument syncflag). The + commhandle can be used in ESMF_VMCommWait() to block the + calling PET until the communication call has finished PET-locally. If + no commhandle was supplied to a non-blocking call the VM method + ESMF_VMCommWaitAll() may be used to block on all currently queued + communication calls of the VM context. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+51.6.9 ESMF_VMAllToAllV - AllToAllV communications across VM +

+ +

+ +

+
+INTERFACE: +

    subroutine ESMF_VMAllToAllV(vm, sendData, sendCounts, &
+      sendOffsets, recvData, recvCounts, recvOffsets, syncflag, &
+      commhandle, rc)
+
ARGUMENTS: +
      type(ESMF_VM),                    intent(in)            :: vm
+      <type>(ESMF_KIND_<kind>), target, intent(in)            :: sendData(:)
+      integer,                          intent(in)            :: sendCounts(:)
+      integer,                          intent(in)            :: sendOffsets(:)
+      <type>(ESMF_KIND_<kind>), target, intent(out)           :: recvData(:)
+      integer,                          intent(in)            :: recvCounts(:)
+      integer,                          intent(in)            :: recvOffsets(:)
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+      type(ESMF_Sync_Flag),             intent(in),  optional :: syncflag
+      type(ESMF_CommHandle),            intent(out), optional :: commhandle
+      integer,                          intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Collective ESMF_VM communication call that performs a total exchange + operation on the contiguous data of <type><kind>. PET i sends + contiguous elements of its sendData array to all PETs, including + itself. The sendCounts(j) elements sent to PET j are + those starting at position sendOffsets(j), and are + stored in recvData on PET $j$ in position recvOffsets(i). + +

+This method is overloaded for: + ESMF_TYPEKIND_I4, ESMF_TYPEKIND_I8, + ESMF_TYPEKIND_R4, ESMF_TYPEKIND_R8, + ESMF_TYPEKIND_LOGICAL. + +

+TODO: The current version of this method does not provide an + implementation of the non-blocking feature. When calling this + method with syncflag = ESMF_SYNC_NONBLOCKING, error code + ESMF_RC_NOT_IMPL will be returned and an error will be + logged. + +

+The arguments are: +

+
vm
+
ESMF_VM object. + +
+
sendData
+
Contiguous data array holding data to be sent. All PETs must specify a + valid source array. + +
+
sendCounts
+
Number of sendData elements to send from local PET to + destination PET. + +
+
sendOffsets
+
Offsets in units of elements in sendData marking to start of + element sequence to be sent from local PET to destination PET. + +
+
recvData
+
Contiguous data array for data to be received. All PETs must specify a + valid recvData argument large enough to accommodate the received + data. + +
+
recvCounts
+
Number of recvData elements to be received by local PET from + source PET. + +
+
recvOffsets
+
Offsets in units of elements in recvData marking to start of + element sequence to be received by local PET from source PET. + +
+
[syncflag]
+
Flag indicating whether this call behaves blocking or non-blocking. + The default is ESMF_SYNC_BLOCKING. See section + 54.59 for a complete list of options. + +
+
[commhandle]
+
If present, a communication handle will be returned in case of a + non-blocking request (see argument syncflag). The + commhandle can be used in ESMF_VMCommWait() to block the + calling PET until the communication call has finished PET-locally. If + no commhandle was supplied to a non-blocking call the VM method + ESMF_VMCommWaitAll() may be used to block on all currently queued + communication calls of the VM context. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+51.6.10 ESMF_VMBarrier - VM wide barrier +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_VMBarrier(vm, rc)
+
ARGUMENTS: +
     type(ESMF_VM),  intent(in),  optional :: vm
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,        intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    8.1.0
    +
    Made argument vm optional to simplify usage when calling + on the current VM. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Collective ESMF_VM communication call that blocks calling PET until + all PETs of the VM context have issued the call. + +

+The arguments are: +

+
[vm]
+
ESMF_VM object. Default use current VM. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+51.6.11 ESMF_VMBroadcast - Broadcast data across VM +

+ +

+ +

+
+INTERFACE: +

    subroutine ESMF_VMBroadcast(vm, bcstData, count, rootPet, &
+      syncflag, commhandle, rc)
+
ARGUMENTS: +
      type(ESMF_VM),                    intent(in)            :: vm
+      <type>(ESMF_KIND_<kind>), target, intent(inout)         :: bcstData(:)
+      integer,                          intent(in)            :: count
+      integer,                          intent(in)            :: rootPet
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+      type(ESMF_Sync_Flag),             intent(in),  optional :: syncflag
+      type(ESMF_CommHandle),            intent(out), optional :: commhandle
+      integer,                          intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Collective ESMF_VM communication call that broadcasts a contiguous + data array of <type><kind> from rootPet to all other PETs of the + ESMF_VM object. When the call returns, the bcstData array + on all PETs contains the same data as on rootPet. + +

+This method is overloaded for: + ESMF_TYPEKIND_I4, ESMF_TYPEKIND_I8, + ESMF_TYPEKIND_R4, ESMF_TYPEKIND_R8, + ESMF_TYPEKIND_LOGICAL, + ESMF_TYPEKIND_CHARACTER. + +

+The arguments are: +

+
vm
+
ESMF_VM object. + +
+
bcstData
+
Contiguous data array. On rootPet bcstData holds data that + is to be broadcasted to all other PETs. On all other PETs + bcstData is used to receive the broadcasted data and must be + large enough to accommodate the received data. + +
+
count
+
Number of elements in /bcstData. Must be the same on all PETs. + +
+
rootPet
+
PET that holds data that is being broadcast. + +
+
[syncflag]
+
Flag indicating whether this call behaves blocking or non-blocking. + The default is ESMF_SYNC_BLOCKING. See section + 54.59 for a complete list of options. + +
+
[commhandle]
+
If present, a communication handle will be returned in case of a + non-blocking request (see argument syncflag). The + commhandle can be used in ESMF_VMCommWait() to block the + calling PET until the communication call has finished PET-locally. If + no commhandle was supplied to a non-blocking call the VM method + ESMF_VMCommWaitAll() may be used to block on all currently queued + communication calls of the VM context. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+51.6.12 ESMF_VMCommWait - Wait for non-blocking VM communication to complete +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_VMCommWait(vm, commhandle, rc)
+
ARGUMENTS: +
     type(ESMF_VM),         intent(in)            :: vm
+     type(ESMF_CommHandle), intent(in)            :: commhandle
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,               intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Wait for non-blocking VM communication specified by the commhandle to + complete. + +

+The arguments are: +

+
vm
+
ESMF_VM object. + +
+
commhandle
+
Handle specifying a previously issued non-blocking communication + request. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+51.6.13 ESMF_VMCommWaitAll - Wait for all non-blocking VM comms to complete +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_VMCommWaitAll(vm, rc)
+
ARGUMENTS: +
     type(ESMF_VM), intent(in)            :: vm
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,       intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Wait for all pending non-blocking VM communication within the + specified VM context to complete. + +

+The arguments are: +

+
vm
+
ESMF_VM object. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+51.6.14 ESMF_VMEpochEnter - Enter an ESMF epoch +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_VMEpochEnter(vm, epoch, keepAlloc, throttle, rc)
+
ARGUMENTS: +
 -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     type(ESMF_VM),            intent(in),  optional :: vm
+     type(ESMF_VMEpoch_Flag),  intent(in),  optional :: epoch
+     logical,                  intent(in),  optional :: keepAlloc
+     integer,                  intent(in),  optional :: throttle
+     integer,                  intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Enter a specific VM epoch. VM epochs change low level communication behavior + which can have significant performance implications. It is an error to call + ESMF_VMEpochEnter() again before exiting a previous epoch with + ESMF_VMEpochExit(). Also, blocking collective calls + (e.g. ESMF_VMBroadcast()) should not be used within a VMEpoch region. + Doing so will result in a deadlock. + +

+The arguments are: +

+
[vm]
+
ESMF_VM object. Defaults to the current VM. + +
+
[epoch]
+
The epoch to be entered. See section 51.2.1 for a + complete list of options. Defaults to ESMF_VMEPOCH_NONE. + +
+
[keepAlloc]
+
For .true., keep internal allocations to be reused by consecutive + epoch phases. For .false., deallocate all internal buffers not + actively used. + The flag only affects the local PET. Defaults to .true.. + +
+
[throttle]
+
Maximum number of outstanding communication calls beween any two PETs. + Lower numbers reduce memory pressure at the expense of the level of + asynchronizity achievable. Defaults to 10. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+51.6.15 ESMF_VMEpochExit - Exit an ESMF epoch +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_VMEpochExit(vm, keepAlloc, rc)
+
ARGUMENTS: +
 -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     type(ESMF_VM),            intent(in),  optional :: vm
+     logical,                  intent(in),  optional :: keepAlloc
+     integer,                  intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Exit the current VM epoch. + +

+The arguments are: +

+
[vm]
+
ESMF_VM object. Defaults to the current VM. + +
+
[keepAlloc]
+
For .true., keep internal allocations to be reused by consecutive + epoch phases. For .false., deallocate all internal buffers not + actively used. + The flag only affects the local PET. Defaults to .true.. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+51.6.16 ESMF_VMGather - Gather data from across VM +

+ +

+ +

+
+INTERFACE: +

    subroutine ESMF_VMGather(vm, sendData, recvData, count, rootPet, &
+      syncflag, commhandle, rc)
+
ARGUMENTS: +
      type(ESMF_VM),                    intent(in)            :: vm
+      <type>(ESMF_KIND_<kind>), target, intent(in)            :: sendData(:)
+      <type>(ESMF_KIND_<kind>), target, intent(out)           :: recvData(:)
+      integer,                          intent(in)            :: count
+      integer,                          intent(in)            :: rootPet
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+      type(ESMF_Sync_Flag),             intent(in),  optional :: syncflag
+      type(ESMF_CommHandle),            intent(out), optional :: commhandle
+      integer,                          intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Collective ESMF_VM communication call that gathers contiguous data + of <type><kind> from all PETs of an ESMF_VM object (including the + rootPet itself) into an array on rootPet. + The count elements sent from the sendData array on PET i + are stored contiguously in the recvData array on rootPet + starting at position i $\times$ count $+$ 1. + +

+This method is overloaded for: + ESMF_TYPEKIND_I4, ESMF_TYPEKIND_I8, + ESMF_TYPEKIND_R4, ESMF_TYPEKIND_R8, + ESMF_TYPEKIND_LOGICAL. + +

+The arguments are: +

+
vm
+
ESMF_VM object. + +
+
sendData
+
Contiguous data array holding data to be sent. All PETs must specify a + valid source array. + +
+
recvData
+
Contiguous data array for data to be received. Only recvData + specified by the rootPet will be used by this method, and must + be large enough to accommodate the received data. + +
+
count
+
Number of elements to be sent from each PET to rootPet. Must be + the same on all PETs. + +
+
rootPet
+
PET on which data is gathereds. + +
+
[syncflag]
+
Flag indicating whether this call behaves blocking or non-blocking. + The default is ESMF_SYNC_BLOCKING. See section + 54.59 for a complete list of options. + +
+
[commhandle]
+
If present, a communication handle will be returned in case of a + non-blocking request (see argument syncflag). The + commhandle can be used in ESMF_VMCommWait() to block the + calling PET until the communication call has finished PET-locally. If + no commhandle was supplied to a non-blocking call the VM method + ESMF_VMCommWaitAll() may be used to block on all currently queued + communication calls of the VM context. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+51.6.17 ESMF_VMGatherV - GatherV data from across VM +

+ +

+ +

+
+INTERFACE: +

    subroutine ESMF_VMGatherV(vm, sendData, sendCount, recvData, &
+      recvCounts, recvOffsets, rootPet, rc)
+
ARGUMENTS: +
      type(ESMF_VM),                    intent(in)            :: vm
+      <type>(ESMF_KIND_<kind>), target, intent(in)            :: sendData(:)
+      integer,                          intent(in)            :: sendCount
+      <type>(ESMF_KIND_<kind>), target, intent(out)           :: recvData(:)
+      integer,                          intent(in)            :: recvCounts(:)
+      integer,                          intent(in)            :: recvOffsets(:)
+      integer,                          intent(in)            :: rootPet
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+      integer,                          intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Collective ESMF_VM communication call that gathers contiguous data + of <type><kind> from all PETs of an ESMF_VM object (including the + rootPet itself) into an array on rootPet. + The sendCount elements sent from the sendData array on PET + i are stored contiguously in the recvData array on rootPet + starting at position recvOffsets(i). + +

+This method is overloaded for: + ESMF_TYPEKIND_I4, ESMF_TYPEKIND_I8, + ESMF_TYPEKIND_R4, ESMF_TYPEKIND_R8. + +

+TODO: The current version of this method does not provide an + implementation of the non-blocking feature. When calling this + method with syncflag = ESMF_SYNC_NONBLOCKING, error code + ESMF_RC_NOT_IMPL will be returned and an error will be + logged. + +

+The arguments are: +

+
vm
+
ESMF_VM object. + +
+
sendData
+
Contiguous data array holding data to be sent. All PETs must specify a + valid source array. + +
+
sendCount
+
Number of sendData elements to send from local PET to all other + PETs. + +
+
recvData
+
Contiguous data array for data to be received. Only recvData + specified by the rootPet will be used by this method, and must + be large enough to accommodate the received data. + +
+
recvCounts
+
An integer array (of length group size, specified in VM object) containing + number of recvData elements to be received from corresponding + source PET. This argument is significant only at rootPet. + +
+
recvOffsets
+
Offsets in units of elements in recvData marking the start of + element sequence to be received from source PET. + +
+
rootPet
+
PET on which data is gathered. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+51.6.18 ESMF_VMGet - Get general information from a VM +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_VMGet()
+   recursive subroutine ESMF_VMGetDefault(vm, localPet, &
+     currentSsiPe, petCount, peCount, ssiCount, ssiMap, ssiMinPetCount, ssiMaxPetCount, &
+     ssiLocalPetCount, ssiLocalPet, ssiLocalDevCount, ssiLocalDevList, mpiCommunicator, &
+     pthreadsEnabledFlag, openMPEnabledFlag, ssiSharedMemoryEnabledFlag, esmfComm, rc)
+
ARGUMENTS: +
     type(ESMF_VM),        intent(in)            :: vm
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,              intent(out), optional :: localPet
+     integer,              intent(out), optional :: currentSsiPe
+     integer,              intent(out), optional :: petCount
+     integer,              intent(out), optional :: peCount
+     integer,              intent(out), optional :: ssiCount
+     integer, allocatable, intent(out), optional :: ssiMap(:)
+     integer,              intent(out), optional :: ssiMinPetCount
+     integer,              intent(out), optional :: ssiMaxPetCount
+     integer,              intent(out), optional :: ssiLocalPetCount
+     integer,              intent(out), optional :: ssiLocalPet
+     integer,              intent(out), optional :: ssiLocalDevCount
+     integer, allocatable, intent(out), optional :: ssiLocalDevList(:)
+     integer,              intent(out), optional :: mpiCommunicator
+     logical,              intent(out), optional :: pthreadsEnabledFlag
+     logical,              intent(out), optional :: openMPEnabledFlag
+     logical,              intent(out), optional :: ssiSharedMemoryEnabledFlag
+     character(:), allocatable, intent(out), optional :: esmfComm
+     integer,              intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    8.0.0
    +
    Added arguments ssiCount, ssiMinPetCount, + ssiMaxPetCount, and ssiLocalPetCount to provide access + to information about how the VM is mapped across the single system images + (SSIs) - typically synonymous to nodes - of the compute environment. This + information is useful when constructing custom petLists.
    +Added argument ssiSharedMemoryEnabledFlag that allows the user to + query whether ESMF was compiled with support for shared memory + access between PETs on the same SSI. + +
    +
    8.1.0
    +
    Added argument currentSsiPe for easy query of the + current PE within the local SSI that is executing the request. +
    +Added argument ssiMap for a convenient way to obtain a view + of the mapping of PETs to single system images across the entire VM. + +
    +
    8.2.0
    +
    Added argument esmfComm to provide easy access to the + ESMF_COMM setting used by the ESMF installation. + +
    +
    8.6.0
    +
    Added arguments ssiLocalDevCount and ssiLocalDevCount + to provide information about devices associated with the VM on the local + SSI.
    +Added argument ssiLocalPet to help with SSI specific assignment + between PET and device resources. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Get internal information about the specified ESMF_VM object. + +

+The arguments are: +

+
vm
+
Queried ESMF_VM object. + +
+
[localPet]
+
Upon return this holds the id of the local PET that issued this call. + The valid range of localPet is +$[0..petCount-1]$. A value of $-1$ + is returned on PETs that are not active under the specified vm. + +
+
[currentSsiPe]
+
Upon return this holds the id of the PE within the local SSI on which + the calling PET (i.e. localPet) is currently executing. If the PET is + associated with a set of PEs, or PETs are not pinned, the returned + value might change each time the call is made. + +
+
[petCount]
+
Upon return this holds the number of PETs running under vm. + +
+
[peCount]
+
Upon return this holds the number of PEs referenced by vm. + +
+
[ssiCount]
+
Upon return this holds the number of single system images referenced + by vm. + +
+
[ssiMap]
+
Upon return this array is allocated and holds the single system image + id for each PET across the vm. The size of ssiMap is + equal to petCount, with lower bound 0 and upper bound + petCount - 1. + +
+
[ssiMinPetCount]
+
Upon return this holds the smallest number of PETs running in the same + single system images under vm. + +
+
[ssiMaxPetCount]
+
Upon return this holds the largest number of PETs running in the same + single system images under vm. + +
+
[ssiLocalPetCount]
+
Upon return this holds the number of PETs running in the same + single system as localPet. + +
+
[ssiLocalPet]
+
Upon return this holds the SSI local index of the executing + localPet. + +
+
[ssiLocalDevCount]
+
Upon return this holds the number of devices associated with this VM + on the local single system. + +
+
[ssiLocalDevList]
+
Upon return this array is allocated and holds the local device ids + of devices associated with this VM. The size of ssiLocalDevList + is equal to ssiLocalDevCount, with lower bound 0 and upper + bound ssiLocalDevCount - 1. Local device ids can be used to + target specific devices using OpenMP, OpenACC, or similar device + API. + +
+
[mpiCommunicator]
+
Upon return this holds the MPI intra-communicator used by the + specified ESMF_VM object. This communicator may be used for + user-level MPI communications. It is recommended that the user + duplicates the communicator via MPI_Comm_Dup() in order to + prevent any interference with ESMF communications. + MPI_COMM_NULL is returned on PETs that are not active + under the specified vm. + +
+
[pthreadsEnabledFlag]
+
+
.TRUE.
+
ESMF has been compiled with Pthreads, and the MPI environment + supports threading. + +
+
.FALSE.
+
ESMF has not been compiled with Pthreads, or the MPI + environment does not support threading. + +
+
+ +
+
[openMPEnabledFlag]
+
+
.TRUE.
+
ESMF has been compiled with OpenMP. + +
+
.FALSE.
+
ESMF has not been compiled with OpenMP. + +
+
+ +
+
[ssiSharedMemoryEnabledFlag]
+
+
.TRUE.
+
ESMF has been compiled to support shared memory access + between PETs that are on the same single system image (SSI). + +
+
.FALSE.
+
ESMF has not been compiled to support shared memory access + between PETs that are on the same single system image (SSI). + +
+
+ +
+
[esmfComm]
+
Upon return this string is allocated to the appropriate size and holds + the exact value of the ESMF_COMM build environment variable used + by the ESMF installation. This provides a convenient way for the user + to determine the underlying MPI implementation. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+51.6.19 ESMF_VMGet - Get PET specific information from a VM +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using ESMF_VMGet()
+   subroutine ESMF_VMGetPetSpecific(vm, pet, peCount, &
+     accDeviceCount, &   ! DEPRECATED ARGUMENT
+     ssiId, threadCount, threadId, vas, rc)
+
ARGUMENTS: +
     type(ESMF_VM), intent(in)            :: vm
+     integer,       intent(in)            :: pet
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,       intent(out), optional :: peCount
+     integer,       intent(out), optional :: accDeviceCount ! DEPRECATED ARGUMENT
+     integer,       intent(out), optional :: ssiId
+     integer,       intent(out), optional :: threadCount
+     integer,       intent(out), optional :: threadId
+     integer,       intent(out), optional :: vas
+     integer,       intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. +
  • +
  • This interface was modified since ESMF version 5.2.0r. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version 5.2.0r is desired then care must be taken to limit the use of this interface to features that were available in the 5.2.0r release. +
    +Changes made after the 5.2.0r release: +
    +
    7.0.0
    +
    Added argument accDeviceCount. + The argument provides access to the number of available accelerator devices. + +
    +
    8.6.0
    +
    Started deprecation of argument accDeviceCount in favor of + the new arguments ssiLocalDevCount and ssiLocalDevList offered + by the general ESMF_VMGet() method. + +
    +
    +
  • +
+ +

+DESCRIPTION: +
+ +

+Get internal information about a specific PET within an ESMF_VM + object. + +

+The arguments are: +

+
vm
+
Queried ESMF_VM object. + +
+
pet
+
Queried PET id within the specified ESMF_VM object. + +
+
[peCount]
+
Upon return this holds the number of PEs associated with the specified + PET in the ESMF_VM object. + +
+
[accDeviceCount]
+
Upon return this holds the number of accelerated devices accessible + from the specified PET in the ESMF_VM object. + DEPRECATED ARGUMENT! Please use the argument ssiLocalDevCount instead. + +
+
[ssiId]
+
Upon return this holds the id of the single-system image (SSI) the + specified PET is running on. + +
+
[threadCount]
+
Upon return this holds the number of PETs in the specified PET"s + thread group. + +
+
[threadId]
+
Upon return this holds the thread id of the specified PET within the + PET"s thread group. + +
+
[vas]
+
Virtual address space in which this PET operates. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+51.6.20 ESMF_VMGetGlobal - Get Global VM +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_VMGetGlobal(vm, rc)
+
ARGUMENTS: +
     type(ESMF_VM), intent(out)            :: vm
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,       intent(out), optional  :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Get the global ESMF_VM object. This is the VM object + that is created during ESMF_Initialize() and is the ultimate + parent of all VM objects in an ESMF application. It is identical to the VM + object returned by ESMF_Initialize(..., vm=vm, ...). + +

+The ESMF_VMGetGlobal() call provides access to information about the + global execution context via the global VM. This call is necessary because + ESMF does not created a global ESMF Component during + ESMF_Initialize() that could be queried for information about + the global execution context of an ESMF application. + +

+Usage of ESMF_VMGetGlobal() from within Component code is + strongly discouraged. ESMF Components should only access their own VM + objects through Component methods. Global information, if required by + the Component user code, should be passed down to the Component from the + driver through the Component calling interface. + +

+The arguments are: +

+
vm
+
Upon return this holds the ESMF_VM object of the global execution + context. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+51.6.21 ESMF_VMGetCurrent - Get Current VM +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_VMGetCurrent(vm, rc)
+
ARGUMENTS: +
     type(ESMF_VM), intent(out)           :: vm
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,       intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Get the ESMF_VM object of the current execution context. Calling + ESMF_VMGetCurrent() within an ESMF Component, will return the + same VM object as + ESMF_GridCompGet(..., vm=vm, ...) or + ESMF_CplCompGet(..., vm=vm, ...). + +

+The main purpose of providing ESMF_VMGetCurrent() is to simplify ESMF + adoption in legacy code. Specifically, code that uses MPI_COMM_WORLD + deep within its calling tree can easily be modified to use the correct MPI + communicator of the current ESMF execution context. The advantage is that + these modifications are very local, and do not require wide reaching + interface changes in the legacy code to pass down the ESMF component object, + or the MPI communicator. + +

+The use of ESMF_VMGetCurrent() is strongly discouraged in newly + written Component code. Instead, the ESMF Component object should be used as + the appropriate container of ESMF context information. This object should be + passed between the subroutines of a Component, and be queried for any + Component specific information. + +

+Outside of a Component context, i.e. within the driver context, the call + to ESMF_VMGetCurrent() is identical to ESMF_VMGetGlobal(). + +

+The arguments are: +

+
vm
+
Upon return this holds the ESMF_VM object of the current execution + context. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+51.6.22 ESMF_VMIsCreated - Check whether a VM object has been created +

+ +

+ +

+
+INTERFACE: +

   function ESMF_VMIsCreated(vm, rc)
+
RETURN VALUE: +
     logical :: ESMF_VMIsCreated
+
ARGUMENTS: +
     type(ESMF_VM), intent(in)            :: vm
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,       intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Return .true. if the vm has been created. Otherwise return + .false.. If an error occurs, i.e. rc /= ESMF_SUCCESS is + returned, the return value of the function will also be .false.. + +

+The arguments are: +

+
vm
+
ESMF_VM queried. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+51.6.23 ESMF_VMLog - Log VM information +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_VMLog(vm, prefix, logMsgFlag, rc)
+
ARGUMENTS: +
     type(ESMF_VM),          intent(in)              :: vm
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     character(len=*),       intent(in),   optional  :: prefix
+     type(ESMF_LogMsg_Flag), intent(in),   optional  :: logMsgFlag
+     integer, intent(out),                 optional  :: rc
+
+DESCRIPTION: +
+ +

+Write information about vm to the ESMF default Log. + +

+The arguments are: +

+
vm
+
ESMF_VM object logged. + +
+
[prefix]
+
String to prefix the log message. Default is no prefix. + +
+
[logMsgFlag]
+
Type of log message generated. See section 49.2.3 for + a list of valid message types. Default is ESMF_LOGMSG_INFO. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+51.6.24 ESMF_VMLogSystem - LogSystem +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_VMLogSystem(prefix, logMsgFlag, rc)
+
ARGUMENTS: +
     character(len=*),       intent(in),   optional  :: prefix
+     type(ESMF_LogMsg_Flag), intent(in),   optional  :: logMsgFlag
+     integer, intent(out),                 optional  :: rc
+
+DESCRIPTION: +
+ +

+Log the VM. + +

+The arguments are: +

+
[prefix]
+
String to prefix the log message. Default is no prefix. + +
+
[logMsgFlag]
+
Type of log message generated. See section 49.2.3 for + a list of valid message types. Default is ESMF_LOGMSG_INFO. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+51.6.25 ESMF_VMPrint - Print VM information +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_VMPrint(vm, rc)
+
ARGUMENTS: +
     type(ESMF_VM),  intent(in)            :: vm
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,        intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Print internal information about the specified ESMF_VM to + stdout. +
+

+The arguments are: +

+
vm
+
Specified ESMF_VM object. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+51.6.26 ESMF_VMRecv - Receive data from srcPet +

+ +

+ +

+
+INTERFACE: +

    subroutine ESMF_VMRecv(vm, recvData, count, srcPet, &
+      syncflag, commhandle, rc)
+
ARGUMENTS: +
      type(ESMF_VM),                     intent(in)            :: vm
+      <type>(ESMF_KIND_<kind>), target,  intent(out)           :: recvData(:)
+      integer,                           intent(in)            :: count
+      integer,                           intent(in)            :: srcPet
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+      type(ESMF_Sync_Flag),              intent(in),  optional :: syncflag
+      type(ESMF_CommHandle),             intent(out), optional :: commhandle
+      integer,                           intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Receive contiguous data from srcPet within the same ESMF_VM + object. + +

+This method is overloaded for: + ESMF_TYPEKIND_I4, ESMF_TYPEKIND_I8, + ESMF_TYPEKIND_R4, ESMF_TYPEKIND_R8, + ESMF_TYPEKIND_LOGICAL, + ESMF_TYPEKIND_CHARACTER. + +

+The arguments are: +

+
vm
+
ESMF_VM object. + +
+
recvData
+
Contiguous data array for data to be received. + +
+
count
+
Number of elements to be received. + +
+
srcPet
+
Sending PET. + +
+
[syncflag]
+
Flag indicating whether this call behaves blocking or non-blocking. + The default is ESMF_SYNC_BLOCKING. See section + 54.59 for a complete list of options. + +
+
[commhandle]
+
If present, a communication handle will be returned in case of a + non-blocking request (see argument syncflag). The + commhandle can be used in ESMF_VMCommWait() to block the + calling PET until the communication call has finished PET-locally. If + no commhandle was supplied to a non-blocking call the VM method + ESMF_VMCommWaitAll() may be used to block on all currently queued + communication calls of the VM context. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+51.6.27 ESMF_VMReduce - Reduce data from across VM +

+ +

+ +

+
+INTERFACE: +

    subroutine ESMF_VMReduce(vm, sendData, recvData, count, &
+      reduceflag, rootPet, syncflag, commhandle, rc)
+
ARGUMENTS: +
      type(ESMF_VM),                    intent(in)            :: vm
+      <type>(ESMF_KIND_<kind>), target, intent(in)            :: sendData(:)
+      <type>(ESMF_KIND_<kind>), target, intent(out)           :: recvData(:)
+      integer,                          intent(in)            :: count
+      type(ESMF_Reduce_Flag),           intent(in)            :: reduceflag
+      integer,                          intent(in)            :: rootPet
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+      type(ESMF_Sync_Flag),             intent(in),  optional :: syncflag
+      type(ESMF_CommHandle),            intent(out), optional :: commhandle
+      integer,                          intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Collective ESMF_VM communication call that reduces a contiguous data + array across the ESMF_VM object into a contiguous data array of + the same <type><kind>. The result array is returned on rootPet. + Different reduction operations can be specified. + +

+This method is overloaded for: + ESMF_TYPEKIND_I4, ESMF_TYPEKIND_I8, + ESMF_TYPEKIND_R4, ESMF_TYPEKIND_R8. + +

+TODO: The current version of this method does not provide an + implementation of the non-blocking feature. When calling this + method with syncflag = ESMF_SYNC_NONBLOCKING, error code + ESMF_RC_NOT_IMPL will be returned and an error will be + logged. + +

+The arguments are: +

+
vm
+
ESMF_VM object. + +
+
sendData
+
Contiguous data array holding data to be sent. All PETs must specify a + valid source array. + +
+
recvData
+
Contiguous data array for data to be received. Only the recvData + array specified by the rootPet will be used by this method. + +
+
count
+
Number of elements in sendData and recvData. Must be the same on all + PETs. + +
+
reduceflag
+
Reduction operation. See section 54.49 for a list of + valid reduce operations. + +
+
rootPet
+
PET on which reduced data is returned. + +
+
[syncflag]
+
Flag indicating whether this call behaves blocking or non-blocking. + The default is ESMF_SYNC_BLOCKING. See section + 54.59 for a complete list of options. + +
+
[commhandle]
+
If present, a communication handle will be returned in case of a + non-blocking request (see argument syncflag). The + commhandle can be used in ESMF_VMCommWait() to block the + calling PET until the communication call has finished PET-locally. If + no commhandle was supplied to a non-blocking call the VM method + ESMF_VMCommWaitAll() may be used to block on all currently queued + communication calls of the VM context. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+51.6.28 ESMF_VMScatter - Scatter data across VM +

+ +

+ +

+
+INTERFACE: +

    subroutine ESMF_VMScatter(vm, sendData, recvData, count, &
+      rootPet, syncflag, commhandle, rc)
+
ARGUMENTS: +
      type(ESMF_VM),                    intent(in)            :: vm
+      <type>(ESMF_KIND_<kind>), target, intent(in)            :: sendData(:)
+      <type>(ESMF_KIND_<kind>), target, intent(out)           :: recvData(:)
+      integer,                          intent(in)            :: count
+      integer,                          intent(in)            :: rootPet
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+      type(ESMF_Sync_Flag),             intent(in),  optional :: syncflag
+      type(ESMF_CommHandle),            intent(out), optional :: commhandle
+      integer,                          intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Collective ESMF_VM communication call that scatters contiguous data + of <type><kind> from rootPet across all the PETs of an ESMF_VM + object. Every PET, including rootPet, receives a portion of the data. + The count number of elements received by PET i originate from + the sendData array on rootPet, starting at position i + $\times$ count $+$ 1. Each PET stores the received contiguous data + portion at the start of its recvData array. + +

+This method is overloaded for: + ESMF_TYPEKIND_I4, ESMF_TYPEKIND_I8, + ESMF_TYPEKIND_R4, ESMF_TYPEKIND_R8, + ESMF_TYPEKIND_LOGICAL. + +

+The arguments are: +

+
vm
+
ESMF_VM object. + +
+
sendData
+
Contiguous data array holding data to be sent. Only the sendData + array specified by the rootPet will be used by this method. + +
+
recvData
+
Contiguous data array for data to be received. All PETs must specify a + valid destination array large enough to accommodate the received data. + +
+
count
+
Number of elements to be sent from rootPet to each of the PETs. + Must be the same on all PETs. + +
+
rootPet
+
PET that holds data that is being scattered. + +
+
[syncflag]
+
Flag indicating whether this call behaves blocking or non-blocking. + The default is ESMF_SYNC_BLOCKING. See section + 54.59 for a complete list of options. + +
+
[commhandle]
+
If present, a communication handle will be returned in case of a + non-blocking request (see argument syncflag). The + commhandle can be used in ESMF_VMCommWait() to block the + calling PET until the communication call has finished PET-locally. If + no commhandle was supplied to a non-blocking call the VM method + ESMF_VMCommWaitAll() may be used to block on all currently queued + communication calls of the VM context. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+51.6.29 ESMF_VMScatterV - ScatterV across VM +

+ +

+ +

+
+INTERFACE: +

    subroutine ESMF_VMScatterV(vm, sendData, sendCounts, &
+      sendOffsets, recvData, recvCount, rootPet, rc)
+
ARGUMENTS: +
      type(ESMF_VM),                    intent(in)            :: vm
+      <type>(ESMF_KIND_<kind>), target, intent(in)            :: sendData(:)
+      integer,                          intent(in)            :: sendCounts(:)
+      integer,                          intent(in)            :: sendOffsets(:)
+      <type>(ESMF_KIND_<kind>), target, intent(out)           :: recvData(:)
+      integer,                          intent(in)            :: recvCount
+      integer,                          intent(in)            :: rootPet
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+      integer,                          intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Collective ESMF_VM communication call that scatters contiguous data + of <type><kind> from rootPet across all the PETs of an ESMF_VM + object. Every PET, including rootPet, receives a portion of the data. + The recvCount number of elements received by PET i originate + from the sendData array on rootPet, starting at position + sendOffsets(i). Each PET stores the received contiguous data + portion at the start of its recvData array. + +

+This method is overloaded for: + ESMF_TYPEKIND_I4, ESMF_TYPEKIND_I8, + ESMF_TYPEKIND_R4, ESMF_TYPEKIND_R8. + +

+The arguments are: +

+
vm
+
ESMF_VM object. + +
+
sendData
+
Contiguous data array holding data to be sent. Only the sendData + array specified by the rootPet will be used by this method. + +
+
sendCounts
+
Number of sendData elements to be sent to corresponding + receive PET. + +
+
sendOffsets
+
Offsets in units of elements in sendData marking the start of + element sequence to be sent to receive PET. + +
+
recvData
+
Contiguous data array for data to be received. All PETs must specify a + valid recvData argument large enough to accommodate the received + data. + +
+
recvCount
+
Number of recvData elements to receive by local PET from + rootPet. + +
+
rootPet
+
PET that holds data that is being scattered. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+51.6.30 ESMF_VMSend - Send data to dstPet +

+ +

+ +

+
+INTERFACE: +

    subroutine ESMF_VMSend(vm, sendData, count, dstPet, &
+      syncflag, commhandle, rc)
+
ARGUMENTS: +
      type(ESMF_VM),                    intent(in)            :: vm
+      <type>(ESMF_KIND_<kind>), target, intent(in)            :: sendData(:)
+      integer,                          intent(in)            :: count
+      integer,                          intent(in)            :: dstPet
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+      type(ESMF_Sync_Flag),             intent(in),  optional :: syncflag
+      type(ESMF_CommHandle),            intent(out), optional :: commhandle
+      integer,                          intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Send contiguous data to dstPet within the same ESMF_VM object. + +

+This method is overloaded for: + ESMF_TYPEKIND_I4, ESMF_TYPEKIND_I8, + ESMF_TYPEKIND_R4, ESMF_TYPEKIND_R8, + ESMF_TYPEKIND_LOGICAL, + ESMF_TYPEKIND_CHARACTER. + +

+The arguments are: +

+
vm
+
ESMF_VM object. + +
+
sendData
+
Contiguous data array holding data to be sent. + +
+
count
+
Number of elements to be sent. + +
+
dstPet
+
Receiving PET. + +
+
[syncflag]
+
Flag indicating whether this call behaves blocking or non-blocking. + The default is ESMF_SYNC_BLOCKING. See section + 54.59 for a complete list of options. + +
+
[commhandle]
+
If present, a communication handle will be returned in case of a + non-blocking request (see argument syncflag). The + commhandle can be used in ESMF_VMCommWait() to block the + calling PET until the communication call has finished PET-locally. If + no commhandle was supplied to a non-blocking call the VM method + ESMF_VMCommWaitAll() may be used to block on all currently queued + communication calls of the VM context. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+51.6.31 ESMF_VMSendRecv - Send and Recv data to and from PETs +

+ +

+ +

+
+INTERFACE: +

    subroutine ESMF_VMSendRecv(vm, sendData, sendCount, dstPet, &
+      recvData, recvCount, srcPet, syncflag, commhandle, rc)
+
ARGUMENTS: +
      type(ESMF_VM),                    intent(in)            :: vm
+      <type>(ESMF_KIND_<kind>), target, intent(in)            :: sendData(:)
+      integer,                          intent(in)            :: sendCount
+      integer,                          intent(in)            :: dstPet
+      <type>(ESMF_KIND_<kind>), target, intent(out)           :: recvData(:)
+      integer,                          intent(in)            :: recvCount
+      integer,                          intent(in)            :: srcPet
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+      type(ESMF_Sync_Flag),             intent(in),  optional :: syncflag
+      type(ESMF_CommHandle),            intent(out), optional :: commhandle
+      integer,                          intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Send contiguous data to dstPet within the same ESMF_VM object + while receiving contiguous data from srcPet within the same + ESMF_VM object. The sendData and recvData arrays must be + disjoint! + +

+This method is overloaded for: + ESMF_TYPEKIND_I4, ESMF_TYPEKIND_I8, + ESMF_TYPEKIND_R4, ESMF_TYPEKIND_R8, + ESMF_TYPEKIND_LOGICAL, + ESMF_TYPEKIND_CHARACTER. + +

+The arguments are: +

+
vm
+
ESMF_VM object. + +
+
sendData
+
Contiguous data array holding data to be sent. + +
+
sendCount
+
Number of elements to be sent. + +
+
dstPet
+
PET that holds recvData. + +
+
recvData
+
Contiguous data array for data to be received. + +
+
recvCount
+
Number of elements to be received. + +
+
srcPet
+
PET that holds sendData. + +
+
[syncflag]
+
Flag indicating whether this call behaves blocking or non-blocking. + The default is ESMF_SYNC_BLOCKING. See section + 54.59 for a complete list of options. + +
+
[commhandle]
+
If present, a communication handle will be returned in case of a + non-blocking request (see argument syncflag). The + commhandle can be used in ESMF_VMCommWait() to block the + calling PET until the communication call has finished PET-locally. If + no commhandle was supplied to a non-blocking call the VM method + ESMF_VMCommWaitAll() may be used to block on all currently queued + communication calls of the VM context. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+51.6.32 ESMF_VMValidate - Validate VM internals +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_VMValidate(vm, rc)
+
ARGUMENTS: +
     type(ESMF_VM), intent(in)            :: vm
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,       intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Validates that the vm is internally consistent. + The method returns an error code if problems are found. + +

+The arguments are: +

+
vm
+
Specified ESMF_VM object. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+51.6.33 ESMF_VMWtime - Get floating-point number of seconds +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_VMWtime(time, rc)
+
ARGUMENTS: +
     real(ESMF_KIND_R8), intent(out)           :: time
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,            intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Get floating-point number of seconds of elapsed wall-clock time since the + beginning of execution of the application. + +

+The arguments are: +

+
time
+
Time in seconds. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+51.6.34 ESMF_VMWtimeDelay - Delay execution +

+ +

+ +

+
+INTERFACE: +

   recursive subroutine ESMF_VMWtimeDelay(delay, rc)
+
ARGUMENTS: +
     real(ESMF_KIND_R8), intent(in)            :: delay
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,            intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Delay execution for amount of seconds. + +

+The arguments are: +

+
delay
+
Delay time in seconds. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+51.6.35 ESMF_VMWtimePrec - Timer precision as floating-point number of seconds +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_VMWtimePrec(prec, rc)
+
ARGUMENTS: +
     real(ESMF_KIND_R8), intent(out)           :: prec
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,            intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Get a run-time estimate of the timer precision as floating-point number + of seconds. This is a relatively expensive call since the timer precision + is measured several times before the maximum is returned as the estimate. + The returned value is PET-specific and may differ across the VM + context. + +

+The arguments are: +

+
prec
+
Timer precision in seconds. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ + +

+52 Profiling and Tracing +

+ +

+52.1 Description +

+ +

+ +

+ +
+52.1.1 Profiling +

+ +

+ESMF's built in profiling capability collects runtime statistics +of an executing ESMF application through both automatic and manual code +instrumentation. Timing information for all phases of all ESMF components +executing in an application can be automatically collected using the +ESMF_RUNTIME_PROFILE environment variable (see below for settings). +Additionally, arbitrary user-defined code regions can be timed by +manually instrumenting code with special API calls. Timing profiles +of component phases and user-defined regions can be output in several +different formats: + +

    +
  • in text at the end of ESMF Log files +
  • +
  • in separate text file, one per PET (if the ESMF Logs are turned off) +
  • +
  • in a single summary text file that aggregates timings over multiple PETs +
  • +
  • in a binary format for import into the esmf-profiler +for profile visualization +
  • +
+ +

+The following table lists important environment variables that control +aspects of ESMF profiling. + +

+ + + + + + + + + + + + + + + + + + + + + +
Environment VariableDescriptionExample ValuesDefault
ESMF_RUNTIME_PROFILEEnable/disables all profiling functionsON or OFFOFF
ESMF_RUNTIME_PROFILE_PETLISTLimits profiling to an explicit list of PETs0-9 50 99profile all PETs
ESMF_RUNTIME_PROFILE_OUTPUTControls output format of profiles; multiple can be specified in a space separated listTEXT, SUMMARY, BINARYTEXT
+ +

+ +

+ +
+52.1.2 Tracing +

+ +

+Whereas profiling collects summary information from an application, +tracing records a more detailed set of events for later analysis. Trace +analysis can be used to understand what happened during a program's +execution and is often used for diagnosing problems, debugging, and +performance analysis. + +

+ESMF has a built-in tracing capability that records events into special +binary log files. Unlike log files written by the ESMF_Log class, +which are primarily for human consumption (see Section 49.1), +the trace output files are +recorded in a compact binary representation and are processed by tools +to produce various analyses. ESMF event streams are recorded in the +Common Trace Format +(CTF). +CTF traces include one or more event streams, +as well as a metadata file describing the events in the streams. + +

+Several tools are available for reading in the CTF traces output by ESMF. +Of the tools listed below, the first one is designed specifically for +analyzing ESMF applications and the second two are general purpose tools +for working with all CTF traces. + +

    +
  • esmf-profiler +is a tool that ingests traces from an ESMF application and generates + performance profile plots. +
  • +
  • TraceCompass +is a general purpose tool for reading, analyzing, and visualizing traces. +
  • +
  • Babeltrace +is a command-line tool and library for trace conversion + that can read and write CTF traces. Python bindings are available + to open CTF traces are iterate through events. +
  • +
+ +

+Events that can be captured by the ESMF tracer include the following. Events +are recorded with a high-precision timestamp to allow timing analyses. +

+
phase_enter
+
indicates entry into an initialize, run, or finalize ESMF component routine +
+
phase_exit
+
indicates exit from an initialize, run, or finalize ESMF component routine +
+
region_enter
+
indicates entry into a user-defined code region +
+
region_exit
+
indicates exit from a user-defined code region +
+
+ +

+The following table lists important environment variables that control +aspects of ESMF tracing. + +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Environment VariableDescriptionExample ValuesDefault
ESMF_RUNTIME_TRACEEnable/disables all tracing functionsON or OFFOFF
ESMF_RUNTIME_TRACE_CLOCKSets the type of clock for timestamping events (see Section 52.2.6).REALTIME or MONOTONIC or MONOTONIC_SYNCREALTIME
ESMF_RUNTIME_TRACE_PETLISTLimits tracing to an explicit list of PETs0-9 50 99trace all PETs
ESMF_RUNTIME_TRACE_COMPONENTEnables/disable tracing of Component phase_enter and phase_exit eventsON or OFFON
ESMF_RUNTIME_TRACE_FLUSHControls frequency of event stream flushing to fileDEFAULT or EAGERDEFAULT
+ +

+ +

+52.2 Use and Examples +

+ +

+ +

+ +
+52.2.1 Output a Timing Profile to Text +

+ +

+ESMF profiling is disabled by default. To profile an application, +set the ESMF_RUNTIME_PROFILE variable to ON prior +to executing the application. You do not need to recompile +your code to enable profiling. + +

+

+# csh shell
+$ setenv ESMF_RUNTIME_PROFILE ON
+
+# bash shell
+$ export ESMF_RUNTIME_PROFILE=ON
+
+# (from now on, only the csh shell version will be shown)
+
+ +

+Then execute the application in the usual way. At the end of +the run the profile information will be available at the end +of each PET log (if ESMF Logs are turned on) or in a set of +separate files, one per PET, with names ESMF_Profile.XXX +where XXX is the PET number. Below is an example timing +profile. Some regions are left out for brevity. + +

+

+Region                           Count  Total (s)   Self (s)    Mean (s)    Min (s)     Max (s)
+  [esm] Init 1                   1      4.0878      0.0341      4.0878      4.0878      4.0878
+    [OCN-TO-ATM] IPDv05p6b       1      2.6007      2.6007      2.6007      2.6007      2.6007
+    [ATM-TO-OCN] IPDv05p6b       1      1.4333      1.4333      1.4333      1.4333      1.4333
+    [ATM] IPDv00p2               1      0.0055      0.0055      0.0055      0.0055      0.0055
+    [OCN] IPDv00p2               1      0.0023      0.0023      0.0023      0.0023      0.0023
+    [ATM] IPDv00p1               1      0.0011      0.0011      0.0011      0.0011      0.0011
+    [OCN] IPDv00p1               1      0.0009      0.0009      0.0009      0.0009      0.0009
+    [ATM-TO-OCN] IPDv05p3        1      0.0008      0.0008      0.0008      0.0008      0.0008
+    [ATM-TO-OCN] IPDv05p1        1      0.0008      0.0008      0.0008      0.0008      0.0008
+    [ATM-TO-OCN] IPDv05p2b       1      0.0007      0.0007      0.0007      0.0007      0.0007
+    [ATM-TO-OCN] IPDv05p4        1      0.0007      0.0007      0.0007      0.0007      0.0007
+    [ATM-TO-OCN] IPDv05p2a       1      0.0007      0.0007      0.0007      0.0007      0.0007
+    [ATM-TO-OCN] IPDv05p5        1      0.0007      0.0007      0.0007      0.0007      0.0007
+    [OCN-TO-ATM] IPDv05p3        1      0.0006      0.0006      0.0006      0.0006      0.0006
+    [OCN-TO-ATM] IPDv05p4        1      0.0006      0.0006      0.0006      0.0006      0.0006
+    [OCN-TO-ATM] IPDv05p2b       1      0.0006      0.0006      0.0006      0.0006      0.0006
+    [OCN-TO-ATM] IPDv05p2a       1      0.0006      0.0006      0.0006      0.0006      0.0006
+    [OCN-TO-ATM] IPDv05p5        1      0.0006      0.0006      0.0006      0.0006      0.0006
+    [OCN-TO-ATM] IPDv05p1        1      0.0005      0.0005      0.0005      0.0005      0.0005
+  [esm] RunPhase1                1      2.7423      0.9432      2.7423      2.7423      2.7423
+    [OCN-TO-ATM] RunPhase1       864    0.6094      0.6094      0.0007      0.0006      0.0179
+    [ATM] RunPhase1              864    0.5296      0.2274      0.0006      0.0005      0.0011
+      ATM:ModelAdvance           864    0.3022      0.3022      0.0003      0.0003      0.0005
+    [ATM-TO-OCN] RunPhase1       864    0.3345      0.3345      0.0004      0.0002      0.0299
+    [OCN] RunPhase1              864    0.3256      0.3256      0.0004      0.0003      0.0010
+  [esm] FinalizePhase1           1      0.0029      0.0020      0.0029      0.0029      0.0029
+    [OCN-TO-ATM] FinalizePhase1  1      0.0006      0.0006      0.0006      0.0006      0.0006
+    [ATM-TO-OCN] FinalizePhase1  1      0.0002      0.0002      0.0002      0.0002      0.0002
+    [OCN] FinalizePhase1         1      0.0001      0.0001      0.0001      0.0001      0.0001
+    [ATM] FinalizePhase1         1      0.0000      0.0000      0.0000      0.0000      0.0000
+
+ +

+A timed region is either an ESMF component phase (e.g., initialize, +run, or finalize) or a user-defined region of code surrounded by calls to +ESMF_TraceRegionEnter() and ESMF_TraceRegionExit(). (See +section 52.2.8 for more information on instrumenting +user-defined regions.) +Regions are organized hierarchically with sub-regions nested. +For example, in the profile above, +the [OCN] RunPhase1 is a sub-region of [esm] RunPhase1 and is +entirely contained inside that region. Regions with the same name may appear +at multiple places in the hierarchy, and so would appear in multiple rows +in the table. The statistics in that row apply to that region at that +location in the hierarchy. Component names appear in square brackets, +e.g., [ATM], [OCN], and [ATM-TO-OCN]. +By default, timings are based on elapsed wall clock time and are collected +on a per-PET basis. Therefore, regions timings may differ across PETs. Regions +are sorted with the most expensive regions appearing at the top. The following +describes the meaning of the statistics in each column: + +

+ + + + + +
Count the number of times the region is executed
Total the aggregate time spent in the region, inclusive of all sub-regions
Self the aggregate time spend in the region, exclusive of all sub-regions
Mean the average amount of time for one execution of the region
Min time of the fastest execution of the region
Max time of the slowest execution of the region +
+ +

+ +

+ +
+52.2.2 Summarize Timings across Multiple PETs +

+ +

+By default, separate timing profiles are generated for each PET +in the application. The per-PET profiles can be aggregated together +and output to a single file, ESMF_Profile.summary, by setting the +ESMF_RUNTIME_PROFILE_OUTPUT environment variable as follows: + +

+

+$ setenv ESMF_RUNTIME_PROFILE ON              # turn on profiling
+$ setenv ESMF_RUNTIME_PROFILE_OUTPUT SUMMARY  # specify summary output
+
+ +

+Note the ESMF_RUNTIME_PROFILE environment variable must +also be set to ON since this controls all profiling capabilities. +The ESMF_Profile.summary file will contain a tree of +timed regions, but aggregated across all PETs. For example: + +

+

+Region                           PETs   PEs    Count    Mean (s)    Min (s)     Min PET Max (s)     Max PET
+  [esm] Init 1                   4      4      1        4.0880      4.0878      2       4.0883      1
+    [OCN-TO-ATM] IPDv05p6b       4      4      1        2.6007      2.6007      2       2.6007      3
+    [ATM-TO-OCN] IPDv05p6b       4      4      1        1.4335      1.4333      0       1.4337      3
+    [ATM-TO-OCN] IPDv05p4        4      4      1        0.0037      0.0007      0       0.0060      1
+    [ATM] IPDv00p2               4      4      1        0.0034      0.0020      1       0.0055      0
+    [ATM-TO-OCN] IPDv05p1        4      4      1        0.0020      0.0007      2       0.0033      3
+    [OCN] IPDv00p2               4      4      1        0.0019      0.0015      3       0.0024      2
+    [ATM-TO-OCN] IPDv05p3        4      4      1        0.0010      0.0008      0       0.0013      1
+    [ATM-TO-OCN] IPDv05p2a       4      4      1        0.0009      0.0007      0       0.0012      3
+    [ATM] IPDv00p1               4      4      1        0.0009      0.0007      3       0.0011      0
+    [ATM-TO-OCN] IPDv05p2b       4      4      1        0.0008      0.0007      0       0.0010      3
+    [ATM-TO-OCN] IPDv05p5        4      4      1        0.0008      0.0007      0       0.0010      3
+    [ATM-TO-OCN] IPDv05p6a       4      4      1        0.0008      0.0005      2       0.0012      3
+    [OCN-TO-ATM] IPDv05p3        4      4      1        0.0008      0.0006      2       0.0010      3
+    [OCN-TO-ATM] IPDv05p4        4      4      1        0.0008      0.0006      0       0.0009      3
+    [OCN-TO-ATM] IPDv05p2b       4      4      1        0.0007      0.0006      2       0.0009      3
+    [OCN] IPDv00p1               4      4      1        0.0007      0.0005      1       0.0009      2
+    [OCN-TO-ATM] IPDv05p2a       4      4      1        0.0007      0.0006      2       0.0009      1
+    [OCN-TO-ATM] IPDv05p5        4      4      1        0.0007      0.0006      0       0.0009      3
+    [OCN-TO-ATM] IPDv05p1        4      4      1        0.0006      0.0005      0       0.0008      1
+    [OCN-TO-ATM] IPDv05p6a       4      4      1        0.0006      0.0004      2       0.0007      1
+  [esm] RunPhase1                4      4      1        2.7444      2.7423      0       2.7454      1
+    [OCN-TO-ATM] RunPhase1       4      4      864      0.6123      0.6004      2       0.6244      1
+    [ATM] RunPhase1              4      4      864      0.5386      0.5296      0       0.5530      1
+      ATM:ModelAdvance           4      4      864      0.3038      0.3022      0       0.3065      1
+    [OCN] RunPhase1              4      4      864      0.3471      0.3256      0       0.3824      1
+    [ATM-TO-OCN] RunPhase1       4      4      864      0.2843      0.1956      1       0.3345      0
+  [esm] FinalizePhase1           4      4      1        0.0029      0.0029      1       0.0030      2
+    [OCN-TO-ATM] FinalizePhase1  4      4      1        0.0007      0.0006      0       0.0008      3
+    [ATM-TO-OCN] FinalizePhase1  4      4      1        0.0002      0.0001      3       0.0002      1
+    [OCN] FinalizePhase1         4      4      1        0.0001      0.0001      3       0.0001      0
+    [ATM] FinalizePhase1         4      4      1        0.0001      0.0000      0       0.0001      2
+
+ +

+The meaning of the statistics in each column in as follows: + + + + + + + +
PETs the number of reporting PETs that executed the region
PEs the number of PEs associated with the reporting PETs that executed the region
Count the number of times each reporting PET executed the region + or “MULTIPLE” if not all PETs executed the region the same number of times
Mean the mean across all reporting PETs of the total time spent in the region
Min the minimum across all reporting PETs of the total time spent in the region
Min PET the PET that reported the minimum time
Max the maximum across all reporting PETs of the total time spent in the region
Max PET the PET that reported the maximum time +
+ +

+Note that setting the ESMF_RUNTIME_PROFILE_PETLIST environment variable +(described below) may reduce the number of reporting PETs. Only reporting PETs are +included in the summary profile. To output both the per-PET and summary timing profiles, +set the ESMF_RUNTIME_PROFILE_OUTPUT environment variable as follows: + +

+

+$ setenv ESMF_RUNTIME_PROFILE_OUTPUT "TEXT SUMMARY"
+
+ +

+ +

+ +
+52.2.3 Limit the Set of Profiled PETs +

+ +

+By default, all PETs in an application are profiled. It may be desirable +to only profile a subset of PETs to reduce the amount of output. +An explicit list of PETs can be specified by setting the +ESMF_RUNTIME_PROFILE_PETLIST environment variable. +The syntax of this environment variable is to list +PET numbers separated by spaces. PET ranges are also supported using +the “X-Y” syntax where X < Y. +For example: + +

+

+# only profile PETs 0, 20, and 35 through 39
+$ setenv ESMF_RUNTIME_PROFILE_PETLIST "0 20 35-39"
+
+ +

+When used in conjunction with the SUMMARY option above, the summarized +profile will only aggregate over the specified set of PETs. The one exception is that +PET 0 is always profiled if ESMF_RUNTIME_PROFILE=ON, regardless of the +ESMF_RUNTIME_TRACE_PETLIST setting. + +

+ +

+ +
+52.2.4 Include MPI Communication in the Profile +

+ +

+MPI functions can be included in the timing profile to indicate how much time +is spent inside communication calls. This can also help to determine load imbalance +in the system, since large times spent inside MPI may indicate that communication +between PETs is not tightly synchronized. This option includes all MPI calls in +the application, whether or not they originate from the ESMF library. Here is a partial +example summary profile that contains MPI times: + +

+

+Region                           PETs   Count    Mean (s)    Min (s)     Min PET Max (s)     Max PET
+  [esm] RunPhase1                8      1        4.9307      4.6867      0       4.9656      1
+    [OCN] RunPhase1              8      1824     0.8344      0.8164      0       0.8652      1
+    [MED] RunPhase1              8      1824     0.8203      0.7900      5       0.8584      1
+    [ATM] RunPhase1              8      1824     0.6387      0.6212      5       0.6610      1
+    [ATM-TO-MED] RunPhase1       8      1824     0.5975      0.5317      0       0.6583      5
+      MPI_Bcast                  8      1824     0.0443      0.0025      4       0.1231      5
+      MPI_Wait                   8      MULTIPLE 0.0421      0.0032      0       0.0998      2
+    [MED-TO-OCN] RunPhase1       8      1824     0.4879      0.4497      0       0.5362      4
+      MPI_Wait                   8      MULTIPLE 0.0234      0.0030      0       0.0821      4
+      MPI_Bcast                  8      1824     0.0111      0.0024      4       0.0273      5
+    [OCN-TO-MED] RunPhase1       8      1824     0.4541      0.4075      0       0.4918      4
+      MPI_Wait                   8      MULTIPLE 0.0339      0.0017      0       0.0824      4
+      MPI_Bcast                  8      1824     0.0194      0.0026      4       0.0452      6
+    [MED-TO-ATM] RunPhase1       8      1824     0.4487      0.4005      0       0.4911      5
+      MPI_Bcast                  8      1824     0.0338      0.0026      4       0.0942      5
+      MPI_Wait                   8      MULTIPLE 0.0241      0.0022      1       0.0817      2
+  [esm] Init 1                   8      1        0.6287      0.6287      1       0.6287      4
+    [ATM-TO-MED] IPDv05p6b       8      1        0.1501      0.1500      1       0.1501      2
+      MPI_Barrier                8      242      0.0082      0.0006      3       0.0157      7
+      MPI_Wait                   8      MULTIPLE 0.0034      0.0010      0       0.0053      7
+      MPI_Allreduce              8      62       0.0030      0.0003      3       0.0063      7
+      MPI_Alltoall               8      6        0.0015      0.0000      1       0.0022      5
+      MPI_Allgather              8      21       0.0010      0.0002      1       0.0017      7
+      MPI_Waitall                8      MULTIPLE 0.0006      0.0001      3       0.0015      7
+      MPI_Send                   8      MULTIPLE 0.0004      0.0001      7       0.0008      6
+      MPI_Allgatherv             8      6        0.0001      0.0001      4       0.0001      0
+      MPI_Scatter                8      5        0.0000      0.0000      0       0.0000      7
+      MPI_Reduce                 8      5        0.0000      0.0000      1       0.0000      0
+      MPI_Recv                   8      MULTIPLE 0.0000      0.0000      0       0.0000      3
+      MPI_Bcast                  8      1        0.0000      0.0000      0       0.0000      7
+
+ +

+The procedure for including MPI +functions in the timing profile depends on whether the application is +dynamically or statically linked. Most applications are dynamically linked, +however on some systems (such as Cray), static linking may be used. +Note that for either option, ESMF must be built with ESMF_TRACE_LIB_BUILD=ON, +which is the default. + +

+In dynamically linked applications, the LD_PRELOAD (Linux) or +DYLD_INSERT_LIBRARIES (Darwin) environment variable must be used when +executing the MPI application. This instructs the dynamic loader to interpose +certain MPI symbols so they can be captured by the ESMF profiler. To simplify +this process, a script is provided at $(ESMF_INSTALL_LIBDIR)/preload.sh +that sets the appropriate variable. + +

+For example, if you typically execute your application as as follows: + +

+

+$ mpirun -np 8 ./myApp
+
+ +

+then you should add the preload.sh script in front of the +executable when starting the application as follows: + +

+

+# replace $(ESMF_INSTALL_LIBDIR) with absolute path
+# ... to the ESMF installation lib directory
+$ mpirun -np 8 $(ESMF_INSTALL_LIBDIR)/preload.sh ./myApp
+
+ +

+An advantage of this approach is that your application does not need to +be recompiled. The MPI timing information will be included in the per-PET profiles and/or the summary +profile, depending on the setting of environment variable +ESMF_RUNTIME_PROFILE_OUTPUT. + +

+Notice that an additional step is required for dynamically linked applications +on Darwin systems with System Integrity Protection (SIP) enabled! In +addition to using the $(ESMF_INSTALL_LIBDIR)/preload.sh script during +launching of the executable as shown above, the executable must also be +linked against the dynamic ESMF trace preload library. This must happen during +the link step of the executable. It is most easily accomplished by using +variable $(ESMF_F90ESMFPRELOADLINKLIBS) instead of the typical +$(ESMF_F90ESMFLINKLIBS) variable for the final link command. Both +variables are defined in the esmf.mk file that should be imported by +the application Makefile. For example: + +

+

+# import esmf.mk
+include $(ESMFMKFILE)
+
+# other makefile targets here...
+
+# example final link command, with $(ESMF_F90ESMFPRELOADLINKLIBS)
+myApp: myApp.o driver.o model.o
+        $(ESMF_F90LINKER) $(ESMF_F90LINKOPTS) $(ESMF_F90LINKPATHS) \
+        $(ESMF_F90LINKRPATHS) -o $@ $^ $(ESMF_F90ESMFPRELOADLINKLIBS)
+
+ +

+In statically linked applications, the application must be re-linked +with specific options provided to the linker. These options instruct the linker +to wrap the MPI symbols with the ESMF profiling functions. The linking flags that +must be provided are included in the esmf.mk Makefile fragment that +is part of the ESMF installation. These link flags should be imported into +your application Makefile, and included in the final link command. To do this, +first import the esmf.mk file into your application Makefile. The path +to this file is typically stored in the ESMFMKFILE environment variable. +Then, pass the variables $(ESMF_TRACE_STATICLINKOPTS) and +$(ESMF_TRACE_STATICLINKLIBS) to the final linking command. For example: + +

+

+# import esmf.mk
+include $(ESMFMKFILE)
+
+# other makefile targets here...
+
+# example final link command, with $(ESMF_TRACE_STATICLINKOPTS)
+# ... and $(ESMF_TRACE_STATICLINKLIBS) added
+myApp: myApp.o driver.o model.o
+        $(ESMF_F90LINKER) $(ESMF_F90LINKOPTS) $(ESMF_F90LINKPATHS) \
+        $(ESMF_F90LINKRPATHS) -o $@ $^ $(ESMF_F90ESMFLINKLIBS) \
+        $(ESMF_TRACE_STATICLINKOPTS) $(ESMF_TRACE_STATICLINKLIBS)
+
+ +

+This option will statically wrap all of the MPI functions and include them +in the profile output. Execute the application in the normal way +with the environment variable ESMF_RUNTIME_PROFILE set to ON. +You will see the MPI functions included in the timing profile. + +

+ +

+52.2.5 Output a Detailed Trace for Analysis +

+ +

+ESMF tracing is disabled by default. To enable tracing, set the +ESMF_RUNTIME_TRACE environment variable to ON. You +do not need to recompile your code to enable tracing. + +

+

+# csh shell
+$ setenv ESMF_RUNTIME_TRACE ON
+
+# bash shell
+$ export ESMF_RUNTIME_TRACE=ON
+
+ +

+When enabled, the default behavior is to trace all PETs of the +ESMF application. Although the ESMF tracer is designed to write +events in a compact form, tracing can produce an extremely +large number of events depending on the total number of PETs and +the length of the run. To reduce output, it is possible to restrict +the PETs that produce trace output by setting the ESMF_RUNTIME_TRACE_PETLIST +environment variable. For example, this setting: + +

+

+$ setenv ESMF_RUNTIME_TRACE_PETLIST "0 101 192-196"
+
+ +

+will instruct the tracer to only trace PETs 0, 101, and 192 through 196 +(inclusive). The syntax of this environment variable is to list +PET numbers separated by spaces. PET ranges are also supported using +the “X-Y” syntax where X < Y. For PET counts greater than 100, it is +recommended to set this environment variable. The one exception is that +PET 0 is always traced, regardless of the ESMF_RUNTIME_TRACE_PETLIST +setting. + +

+ESMF's profiling and tracing options can be used together. A typical +use would be to set ESMF_RUNTIME_PROFILE=ON for all PETs to +capture summary timings, and set ESMF_RUNTIME_TRACE=ON and +ESMF_RUNTIME_TRACE_PETLIST to a subset of of PETs, +such as the root PET of each ESMF component. This helps to keep trace +sizes small while still providing timing summaries over all PETs. + +

+When tracing is enabled, phase_enter and phase_exit events will +automatically be recorded for all initialize, run, and finalize phases of all +Components in the application. To trace only user-instrumented regions (via +the ESMF_TraceRegionEnter() and ESMF_TraceRegionExit() calls), +Component-level tracing can be turned off by setting: + +

+

+$ setenv ESMF_RUNTIME_TRACE_COMPONENT OFF
+
+ +

+After running an ESMF application with tracing enabled, a directory +called traceout will be created in the run directory and it will +contain a metadata file and an event stream file esmf_stream_XXXX +for each PET with tracing enabled. Together these files form a valid +CTF trace which may be analyzed with any of the tools listed above. + +

+Trace events are flushed to file at a regular interval. If the application +crashes, some of the most recent events may not be flushed to file. To +maximize the number of events appearing in the trace, an option is available +to flush events to file more frequently. Because this option may have +negative performance implications due to increased file I/O, it is not +recommended unless needed. To turn on eager flushing use: + +

+

+$ setenv ESMF_RUNTIME_TRACE_FLUSH EAGER
+
+ +

+ +

+ +
+52.2.6 Set the Clock used for Profiling/Tracing +

+ +

+There are three options for the kind of clock to use to timestamp +events when profiling/tracing an application. +These options are controlled by setting the environment variable +ESMF_RUNTIME_TRACE_CLOCK. + + +
REALTIME The REALTIME clock timestamps events with the current time on + the system. This is the default clock if the above environment + variable is not set. This setting can be useful when tracing PETs that + span multiple physical computing nodes assuming that the system clocks + on each node are adequately synchronized. On most HPC systems, system + clocks are periodically updated to stay in sync. A disadvantage of this + clock is that periodic adjustments mean the clock is not monotonically + increasing so some timings may be inaccurate if the system clock jumps + forward or backward significantly. Testing has shown that this is not + typically an issue on most systems.
MONOTONIC The MONOTONIC clock is guaranteed to be monotonically increasing + and does not suffer from periodic adjustments. The timestamps represent + an amount of time since some arbitrary point in the past. There is no + guarantee that these timestamps will be synchronized across physical + computing nodes, so this option should only be used for tracing a set of PETs + running on a single physical machine.
MONOTONIC_SYNC The MONOTONIC_SYNC clock is similar to the MONOTONIC clock + in that it is guaranteed to be monotonically increasing. In addition, at + application startup, all PET clocks are synchronized to a common time + by determining a PET-local offset to be applied to timestamps. Therefore this option + can be used to compare trace streams across physical nodes. +
+ + +

+ +

+ +

+ +

+
+52.2.7 Tracing a simple ESMF application +

+ +

+This example illustrates how to trace a simple ESMF + application and print the event stream using Babeltrace. + The first part of the code is a module representing + a trivial ESMF Gridded Component. The second part is a + main program that creates and executes the component. +

+

+module SimpleComp
+
+  use ESMF
+  implicit none
+
+  private
+  public SetServices
+
+contains
+
+  subroutine SetServices(gcomp, rc)
+      type(ESMF_GridComp)   :: gcomp
+      integer, intent(out)  :: rc  
+
+      call ESMF_GridCompSetEntryPoint(gcomp, ESMF_METHOD_INITIALIZE, &
+           userRoutine=Init, rc=rc)
+      call ESMF_GridCompSetEntryPoint(gcomp, ESMF_METHOD_RUN, &
+           userRoutine=Run, rc=rc)
+      call ESMF_GridCompSetEntryPoint(gcomp, ESMF_METHOD_FINALIZE, &
+           userRoutine=Finalize, rc=rc)
+      
+      rc = ESMF_SUCCESS
+      
+    end subroutine SetServices
+
+    subroutine Init(gcomp, istate, estate, clock, rc)
+      type(ESMF_GridComp):: gcomp
+      type(ESMF_State):: istate, estate
+      type(ESMF_Clock):: clock
+      integer, intent(out):: rc
+      
+      print *, "Inside Init"
+      
+    end subroutine Init
+
+    subroutine Run(gcomp, istate, estate, clock, rc)
+      type(ESMF_GridComp):: gcomp
+      type(ESMF_State):: istate, estate
+      type(ESMF_Clock):: clock
+      integer, intent(out):: rc
+      
+      print *, "Inside Run"
+      
+    end subroutine Run
+
+    subroutine Finalize(gcomp, istate, estate, clock, rc)
+      type(ESMF_GridComp):: gcomp
+      type(ESMF_State):: istate, estate
+      type(ESMF_Clock):: clock
+      integer, intent(out):: rc
+      
+    print *, "Inside Finalize"
+    
+  end subroutine Finalize 
+
+end module SimpleComp
+
+ +

+

+program ESMF_TraceEx
+
+ +

+

+      ! Use ESMF framework module
+      use ESMF
+      use SimpleComp, only: SetServices
+
+ +

+

+      implicit none
+
+      ! Local variables  
+      integer :: rc, finalrc, i
+      type(ESMF_GridComp)     :: gridcomp
+
+ +

+

+      ! initialize ESMF
+      finalrc = ESMF_SUCCESS
+      call ESMF_Initialize(vm=vm, defaultlogfilename="TraceEx.Log", &
+                    logkindflag=ESMF_LOGKIND_MULTI, rc=rc)
+
+ +

+

+      ! create the component and then execute
+      ! initialize, run, and finalize routines
+      gridcomp = ESMF_GridCompCreate(name="test", rc=rc)
+
+ +

+

+      call ESMF_GridCompSetServices(gridcomp, userRoutine=SetServices, rc=rc)
+
+ +

+

+      call ESMF_GridCompInitialize(gridcomp, rc=rc)
+
+ +

+

+      do i=1, 5
+         call ESMF_GridCompRun(gridcomp, rc=rc)
+      enddo
+
+ +

+

+      call ESMF_GridCompFinalize(gridcomp, rc=rc)
+
+ +

+

+      call ESMF_GridCompDestroy(gridcomp, rc=rc)
+
+ +

+

+      call ESMF_Finalize(rc=rc)
+
+ +

+

+end program ESMF_TraceEx
+
+ +

+Assuming the code above is executed on four PETs with + the environment variable ESMF_RUNTIME_TRACE set to + ON, then a folder will be created in the run directory + called traceout containing a metadata file and + four event stream files named esmf_stream_XXXX + where XXXX is the PET number. If Babeltrace is + available on the system, the list of events can be printed + by executing the following from the run directory: +

+   $ babeltrace ./traceout
+
+ For details about iterating over trace events and performing + analyses on CTF traces, see the corresponding documentation + in the tools listed in Section 52.1.2. + + +

+ +

+ +

+ +

+
+52.2.8 Profiling/Tracing User-defined Code Regions +

+ +

+This example illustrates how to manually instrument code with + entry and exit points for user-defined code regions. Note that the + API calls ESMF_TraceRegionEnter and ESMF_TraceRegionExit + should always appear in pairs, wrapping a particular section + of code. The environment variable ESMF_RUNTIME_TRACE + or ESMF_RUNTIME_PROFILE must be set to ON to enable these + regions. If not at least one is set, the calls to + ESMF_TraceRegionEnter and ESMF_TraceRegionExit + will simply return immediately. For this reason, it is safe to + leave this instrumentation in application code, even when not being profiled. +

+

+      ! Use ESMF framework module
+      use ESMF
+
+ +

+

+      implicit none
+
+      ! Local variables  
+      integer :: rc, finalrc
+      integer :: i, j, tmp
+
+ +

+

+      ! initialize ESMF
+      finalrc = ESMF_SUCCESS
+      call ESMF_Initialize(vm=vm, defaultlogfilename="TraceUserEx.Log", &
+                    logkindflag=ESMF_LOGKIND_MULTI, rc=rc)
+
+ +

+

+      ! record entrance into "outer_region"
+      call ESMF_TraceRegionEnter("outer_region", rc=rc)
+
+      tmp = 0
+      do i=1, 10
+         
+         ! record entrance into "inner_region_1"
+         call ESMF_TraceRegionEnter("inner_region_1", rc=rc)
+         ! arbitrary computation
+         do j=1,10000
+            tmp=tmp+j+i
+         enddo
+         ! record exit from "inner_region_1"
+         call ESMF_TraceRegionExit("inner_region_1", rc=rc)
+
+         tmp = 0
+         
+         ! record entrance into "inner_region_2"
+         call ESMF_TraceRegionEnter("inner_region_2", rc=rc)
+         ! arbitrary computation
+         do j=1,5000
+            tmp=tmp+j+i
+         enddo
+         ! record exit from "inner_region_2"
+         call ESMF_TraceRegionExit("inner_region_2", rc=rc)
+      enddo
+
+      ! record exit from "outer_region"
+      call ESMF_TraceRegionExit("outer_region", rc=rc)
+
+ +

+

+      call ESMF_Finalize(rc=rc)
+
+ +

+ + +

+52.3 Restrictions and Future Work +

+ +

+ +

    +
  1. Limited types of trace events. + Currently only a few trace event types are available. The tracer may + be extended in the future to record additional types of events. +
  2. +
  3. MPI call profing not available for statically linked executables on Darwin. + Currently the linker on Darwin systems does not support the wrapping of + symbols during static linking. In order to access MPI call profiling on Darwin, + executables should be linked dynamically in combination with the procedure + described in section 52.2.4. +
  4. +
+ +

+ +

+52.4 Class API +

+ +

+ +

+ +

+ +

+52.4.1 ESMF_TraceRegionEnter - Trace user-defined region entry event +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_TraceRegionEnter(name, rc)
+
ARGUMENTS: +
     character(len=*), intent(in) :: name
+     integer, intent(out), optional  :: rc
+
+DESCRIPTION: +
+ +

+Record an event in the trace for this PET indicating entry + into a user-defined region with the given name. This call + must be paired with a call to ESMF_TraceRegionExit() + with a matching name parameter. User-defined regions may be + nested. + If tracing is disabled on the calling PET or for the application + as a whole, no event will be recorded and + the call will return immediately. + +

+The arguments are: +

+
name
+
A user-defined name for the region of code being entered + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+52.4.2 ESMF_TraceRegionExit - Trace user-defined region exit event +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_TraceRegionExit(name, rc)
+
ARGUMENTS: +
     character(len=*), intent(in) :: name
+     integer, intent(out), optional  :: rc
+
+DESCRIPTION: +
+ +

+Record an event in the trace for this PET indicating exit + from a user-defined region with the given name. This call + must appear after a call to ESMF_TraceRegionEnter() + with a matching name parameter. + If tracing is disabled on the calling PET or for the application + as a whole, no event will be recorded and + the call will return immediately. + +

+The arguments are: +

+
name
+
A user-defined name for the region of code being exited + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ + +

+53 Fortran I/O and System Utilities +

+ +

+53.1 Description +

+ +

+ +

+The ESMF Fortran I/O and System utilities provide portable methods to +access capabilities which are often implemented in different +ways amongst different environments. These utility methods are +divided into three groups: command line access, Fortran I/O, and +sorting. + +

+Command line arguments may be accessed using three methods: +ESMF_UtilGetArg() returns a given command line argument, +ESMF_UtilGetArgC() returns a count of the number of command line +arguments available. Finally, the ESMF_UtilGetArgIndex() method +returns the index of a desired argument value, given its keyword name. + +

+Two I/O methods are implemented: ESMF_IOUnitGet(), +to obtain an unopened Fortran unit number within the range of unit numbers that +ESMF is allowed to use, and ESMF_IOUnitFlush() to flush the +I/O buffer associated with a specific Fortran unit. + +

+Finally, the ESMF_UtilSort() method sorts integer, floating point, +and character string data types in either ascending or descending order. + + +

+53.2 Use and Examples +

+ +

+ +

+
+53.2.1 Fortran unit number management +

+The ESMF_UtilIOUnitGet() method is provided so that applications +using ESMF can remain free of unit number conflicts -- both when combined +with other third party code, or with ESMF itself. This call is typically +used just prior to an OPEN statement: + +

+

+  call ESMF_UtilIOUnitGet (unit=grid_unit, rc=rc)
+  open (unit=grid_unit, file='grid_data.dat', status='old', action='read')
+
+ +

+By default, unit numbers between 50 and 99 are scanned to find an unopened +unit number. + +

+Internally, ESMF also uses ESMF_UtilIOUnitGet() when it needs to open +Fortran unit numbers for file I/O. By using the same API for both user and +ESMF code, unit number collisions can be avoided. + +

+When integrating ESMF into an application where there are conflicts with +other uses of the same unit number range, such as when hard-coded unit number +values are used, an alternative unit number range can be specified. +The ESMF_Initialize() optional arguments IOUnitLower and IOUnitUpper +may be set as needed. Note that IOUnitUpper must be set to a value higher than +IOUnitLower, and that both must be non-negative. Otherwise ESMF_Initialize +will return a return code of ESMF_FAILURE. ESMF itself does not typically need more +than about five units for internal use. + +

+

+  call ESMF_Initialize (..., IOUnitLower=120, IOUnitUpper=140)
+
+ +

+All current Fortran environments have preconnected unit numbers, such as +units 5 and 6 for standard input and output, in the single digit range. +So it is recommended that the unit number range is chosen to begin at unit 10 +or higher to avoid these preconnected units. + +

+ +

+53.2.2 Flushing output +

+ +

+Fortran run-time libraries generally use buffering techniques to improve I/O +performance. However output buffering can be problematic when output is needed, +but is “trapped” in the buffer because it is not full. +This is a common occurrance when debugging a program, and inserting WRITE statements +to track down the bad area of code. If the program crashes before the output +buffer has been flushed, the desired debugging output may never be seen -- giving +a misleading indication of where the problem occurred. It would be desirable +to ensure that the output buffer is flushed at predictable +points in the program in order to get the needed results. +Likewise, in parallel code, predictable flushing of output buffers is a common +requirement, often in conjunction with ESMF_VMBarrier() calls. + +

+The ESMF_UtilIOUnitFlush() API is provided to flush a unit as desired. Here is +an example of code which prints debug values, and serializes the output to a +terminal in PET order: + +

+

+  type(ESMF_VM) :: vm
+
+  integer :: tty_unit
+  integer :: me, npets
+
+  call ESMF_Initialize (vm=vm, rc=rc)
+  call ESMF_VMGet (vm, localPet=me, petCount=npes)
+
+  call ESMF_UtilIOUnitGet (unit=tty_unit)
+  open (unit=tty_unit, file='/dev/tty', status='old', action='write')
+  ...
+  call ESMF_VMBarrier (vm=vm)
+  do, i=0, npets-1
+    if (i == me) then
+      write (tty_unit, *) 'PET: ', i, ', values are: ', a, b, c
+      call ESMF_UtilIOUnitFlush (unit=tty_unit)
+    end if
+    call ESMF_VMBarrier (vm=vm)
+  end do
+
+ +

+53.3 Design and Implementation Notes +

+ +

+ +

+53.3.1 Fortran unit number management +

+ +

+When ESMF needs to open a Fortran I/O unit, it calls ESMF_IOUnitGet() to find +an unopened unit number. As delivered, the range of unit numbers that are +searched are between ESMF_LOG_FORTRAN_UNIT_NUMBER (normally set to +50), and ESMF_LOG_UPPER (normally set to 99.) +Unopened unit numbers are found by using the Fortran INQUIRE statement. + +

+When integrating ESMF into an application where there are conflicts with +other uses of the same unit number range, an alternative range can be specified +in the ESMF_Initialize() call by setting the IOUnitLower and IOUnitUpper +arguments as needed. ESMF_IOUnitGet() will then search the alternate range +of unit numbers. Note that IOUnitUpper must be set to a value higher than +IOUnitLower, and that both must be non-negative. Otherwise ESMF_Initialize +will return a return code of ESMF_FAILURE. + +

+Fortran unit numbers are not standardized in the Fortran 90 Standard. The standard +only requires that they be non-negative integers. But other than that, it is +up to the compiler writers and application developers to provide and +use units which work with the particular implementation. For example, +units 5 and 6 are a defacto standard for “standard input” and +“standard output” -- even though this is not specified in the actual Fortran +standard. The Fortran standard also does not specify which unit numbers can +be used, nor does it specify how many can be open simultaneously. + +

+Since all current compilers have preconnected unit numbers, and these are +typically found on units lower than 10, it is recommended that applications +use unit numbers 10 and higher. + +

+ +

+53.3.2 Flushing output +

+ +

+When ESMF needs to flush a Fortran unit, the ESMF_IOUnitFlush() API is used +to centralize the file flushing capability, because Fortran has not historically +had a standard mechanism for flushing output buffers. Most compilers run-time libraries +support various library extensions to provide this functionality -- though, +being non-standard, the spelling and number of arguments vary between implementations. +Fortran 2003 also provides for a FLUSH statement which is built into the +language. When possible, ESMF_IOUnitFlush() uses the F2003 FLUSH statement. +With older compilers, the appropriate library call is made. + +

+ +

+53.3.3 Sorting algorithms +

+ +

+The ESMF_UtilSort() algorithms are the same as those in the LAPACK +sorting procedures SLASRT() and DLASRT(). Two algorithms are used. +For small sorts, arrays with 20 or fewer elements, a simple Insertion sort is +used. For larger sorts, a Quicksort algorithm is used. + +

+Compared to the original LAPACK code, a full Fortran 90 style +interface is supported for ease of use and enhanced compile time checking. +Additional support is also provided for integer and character string data +types. + +

+53.4 Utility API +

+ +

+ +

+ +

+ +

+ +

+53.4.1 ESMF_UtilGetArg - Return a command line argument +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_UtilGetArg(argindex, argvalue, arglength, rc)
+
ARGUMENTS: +
     integer,      intent(in)            :: argindex
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     character(*), intent(out), optional :: argvalue
+     integer,      intent(out), optional :: arglength
+     integer,      intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+This method returns a copy of a command line argument specified + when the process was started. This argument is the same as an + equivalent C++ program would find in the argv array. + +

+Some MPI implementations do not consistently provide command line + arguments on PETs other than PET 0. It is therefore recommended + that PET 0 call this method and broadcast the results to the other + PETs by using the ESMF_VMBroadcast() method. + +

+The arguments are: + +

+

+
argindex
+
A non-negative index into the command line argument argv array. + If argindex is negative or greater than the number of user-specified + arguments, ESMF_RC_ARG_VALUE is returned in the rc argument. + +
+
[argvalue]
+
Returns a copy of the desired command line argument. If the provided + character string is longer than the command line argument, the string + will be blank padded. If the string is too short, truncation will + occur and ESMF_RC_ARG_SIZE is returned in the rc argument. + +
+
[arglength]
+
Returns the length of the desired command line argument in characters. + The length result does not depend on the length of the value + string. It may be used to query the length of the argument. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+53.4.2 ESMF_UtilGetArgC - Return number of command line arguments +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_UtilGetArgC(count, rc)
+
ARGUMENTS: +
     integer, intent(out)           :: count
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer, intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+This method returns the number of command line arguments specified + when the process was started. + +

+The number of arguments returned does not include the name of the + command itself - which is typically returned as argument zero. + +

+Some MPI implementations do not consistently provide command line + arguments on PETs other than PET 0. It is therefore recommended + that PET 0 call this method and broadcast the results to the other + PETs by using the ESMF_VMBroadcast() method. + +

+The arguments are: + +

+

+
count
+
Count of command line arguments. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+53.4.3 ESMF_UtilGetArgIndex - Return the index of a command line argument +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_UtilGetArgIndex(argvalue, argindex, rc)
+
ARGUMENTS: +
     character(*), intent(in)            :: argvalue
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,      intent(out), optional :: argindex
+     integer,      intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+This method searches for, and returns the index of a desired command + line argument. An example might be to find a specific keyword + (e.g., -esmf_path) so that its associated value argument could be + obtained by adding 1 to the argindex and calling ESMF_UtilGetArg(). + +

+Some MPI implementations do not consistently provide command line + arguments on PETs other than PET 0. It is therefore recommended + that PET 0 call this method and broadcast the results to the other + PETs by using the ESMF_VMBroadcast() method. + +

+The arguments are: + +

+

+
argvalue
+
A character string which will be searched for in the command line + argument list. + +
+
[argindex]
+
If the value string is found, the position will be returned + as a non-negative integer. If the string is not found, a negative + value will be returned. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+53.4.4 ESMF_UtilIOGetCWD - Get the current directory +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_UtilIOGetCWD (pathName, rc)
+
PARAMETERS: +
     character(*), intent(out)           :: pathName
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,      intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Call the system-dependent routine to get the current directory from the file + system. + +

+The arguments are: +

+
pathName
+
Name of the current working directory. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+53.4.5 ESMF_UtilIOMkDir - Create a directory in the file system +

+ +

+ +

+
+INTERFACE: +

    subroutine ESMF_UtilIOMkDir (pathName,  &
+        mode, relaxedFlag,  &
+        rc)
+
PARAMETERS: +
      character(*), intent(in)            :: pathName
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+      integer,      intent(in),  optional :: mode
+      logical,      intent(in),  optional :: relaxedFlag
+      integer,      intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Call the system-dependent routine to create a directory in the file system. + +

+The arguments are: +

+
pathName
+
Name of the directory to be created. + +
+
[mode]
+
File permission mode. Typically an octal constant is used as a value, for example: + mode=o'755'. If not specified on POSIX-compliant systems, the default + is o'755' - corresponding to owner read/write/execute, + group read/execute, and world read/execute. On native Windows, this argument is + ignored and default security settings are used. + +
+
[relaxedFlag]
+
When set to .true., if the directory already exists, rc + will be set to ESMF_SUCCESS instead of an error. + If not specified, the default is .false.. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+53.4.6 ESMF_UtilIORmDir - Remove a directory from the file system +

+ +

+ +

+
+INTERFACE: +

    subroutine ESMF_UtilIORmDir (pathName,  &
+        relaxedFlag, rc)
+
PARAMETERS: +
      character(*), intent(in)            :: pathName
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+      logical,      intent(in),  optional :: relaxedFlag
+      integer,      intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Call the system-dependent routine to remove a directory from the file + system. Note that the directory must be empty in order to be successfully + removed. + +

+The arguments are: +

+
pathName
+
Name of the directory to be removed. + +
+
[relaxedFlag]
+
If set to .true., and if the specified directory does not exist, + the error is ignored and rc will be set to ESMF_SUCCESS. + If not specified, the default is .false.. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+53.4.7 ESMF_UtilString2Double - Convert a string to floating point real +

+ +

+ +

+
+INTERFACE: +

   function ESMF_UtilString2Double(string, rc)
+
RETURN VALUE: +
     real(ESMF_KIND_R8) :: ESMF_UtilString2Double
+
ARGUMENTS: +
     character(len=*), intent(in)            :: string
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,          intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Return the numerical real value represented by the string. + +

+Leading and trailing blanks in string are ignored when directly + converting into integers. + +

+This procedure may fail when used in an expression in a write statement + with some older, pre-Fortran 2003, compiler environments that do not support + re-entrant I/O calls. + +

+The arguments are: +

+
string
+
The string to be converted + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+53.4.8 ESMF_UtilString2Int - Convert a string to an integer +

+ +

+ +

+
+INTERFACE: +

   function ESMF_UtilString2Int(string,  &
+       specialStringList, specialValueList, rc)
+
RETURN VALUE: +
     integer :: ESMF_UtilString2Int
+
ARGUMENTS: +
     character(len=*), intent(in)            :: string
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     character(len=*), intent(in),  optional :: specialStringList(:)
+     integer,          intent(in),  optional :: specialValueList(:)
+     integer,          intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Return the numerical integer value represented by the string. + If string matches a string in the optional specialStringList, the + corresponding special value will be returned instead. + +

+If special strings are to be taken into account, both + specialStringList and specialValueList arguments must be + present and of same size. + +

+An error is returned, and return value set to 0, if string is not + found in specialStringList, and does not convert into an integer + value. + +

+Leading and trailing blanks in string are ignored when directly + converting into integers. + +

+This procedure may fail when used in an expression in a write statement + with some older, pre-Fortran 2003, compiler environments that do not support + re-entrant I/O calls. + +

+The arguments are: +

+
string
+
The string to be converted + +
+
[specialStringList]
+
List of special strings. + +
+
[specialValueList]
+
List of values associated with special strings. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+53.4.9 ESMF_UtilString2Real - Convert a string to floating point real +

+ +

+ +

+
+INTERFACE: +

   function ESMF_UtilString2Real(string, rc)
+
RETURN VALUE: +
     real :: ESMF_UtilString2Real
+
ARGUMENTS: +
     character(len=*), intent(in)            :: string
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,          intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Return the numerical real value represented by the string. + +

+Leading and trailing blanks in string are ignored when directly + converting into integers. + +

+This procedure may fail when used in an expression in a write statement + with some older, pre-Fortran 2003, compiler environments that do not support + re-entrant I/O calls. + +

+The arguments are: +

+
string
+
The string to be converted + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+53.4.10 ESMF_UtilStringDiffMatch - Match differences between two strings +

+ +

+ +

+
+INTERFACE: +

   function ESMF_UtilStringDiffMatch(string1, string2, minusStringList, &
+     plusStringList, rc)
+
RETURN VALUE: +
     logical :: ESMF_UtilStringDiffMatch
+
ARGUMENTS: +
     character(len=*), intent(in)            :: string1
+     character(len=*), intent(in)            :: string2
+     character(len=*), intent(in)            :: minusStringList(:)
+     character(len=*), intent(in)            :: plusStringList(:)
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer,          intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Match the list of differences between string1 and string2 + against plus and minus string pairs. + The generated differences are based on Myers diff algorithm implementation + provided by https://github.com/gritzko/myers-diff. + +

+The arguments are: +

+
string1
+
First string in the difference. + +
+
string2
+
Second string in the difference. + +
+
minusStringList
+
List of strings that are allowed to show up as "minus" in the difference. + +
+
plusStringList
+
List of strings that are allowed to show up as "plus" in the difference. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+53.4.11 ESMF_UtilStringInt2String - convert integer to character string +

+ +

+ +

+
+INTERFACE: +

     function ESMF_UtilStringInt2String (i, rc)
+
ARGUMENTS: +
       integer, intent(in) :: i
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       integer, intent(out), optional  :: rc
+
RETURN VALUE: +
       character(int2str_len (i)) :: ESMF_UtilStringInt2String
+
+DESCRIPTION: +
+ +

+Converts given an integer to string representation. The returned string is + sized such that it does not contain leading or trailing blanks. + +

+This procedure may fail when used in an expression in a write statement + with some older, pre-Fortran 2003, compiler environments that do not support + re-entrant I/O calls. + +

+The arguments are: +

+
i
+
An integer. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+53.4.12 ESMF_UtilStringLowerCase - convert string to lowercase +

+ +

+ +

+
+INTERFACE: +

     function ESMF_UtilStringLowerCase(string, rc)
+
ARGUMENTS: +
       character(len=*), intent(in) :: string
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       integer, intent(out), optional  :: rc
+
RETURN VALUE: +
       character(len (string)) :: ESMF_UtilStringLowerCase
+
+DESCRIPTION: +
+ +

+Converts given string to lowercase. + +

+The arguments are: +

+
string
+
A character string. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+53.4.13 ESMF_UtilStringUpperCase - convert string to uppercase +

+ +

+ +

+
+INTERFACE: +

       function ESMF_UtilStringUpperCase(string, rc)
+
ARGUMENTS: +
       character(len=*), intent(in) :: string
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       integer, intent(out), optional  :: rc
+
RETURN VALUE: +
       character(len (string)) :: ESMF_UtilStringUpperCase
+
+DESCRIPTION: +
+ +

+Converts given string to uppercase. + +

+The arguments are: +

+
string
+
A character string. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ + +

+ +

+ +

+ +

+ +

+53.4.14 ESMF_UtilIOUnitFlush - Flush output on a unit number +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_UtilIOUnitFlush(unit, rc)
+
PARAMETERS: +
     integer, intent(in)            :: unit
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer, intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Call the system-dependent routine to force output on a specific + Fortran unit number. + +

+The arguments are: +

+
unit
+
A Fortran I/O unit number. If the unit is not connected to a file, + no flushing occurs. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+53.4.15 ESMF_UtilIOUnitGet - Scan for a free I/O unit number +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_UtilIOUnitGet(unit, rc)
+
ARGUMENTS: +
     integer, intent(out)           :: unit
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     integer, intent(out), optional :: rc
+
+STATUS: + +
    +
  • This interface is backward compatible with ESMF versions starting at 5.2.0r. If code using this interface compiles with any version of ESMF starting with 5.2.0r, then it will compile with the current version. + +
  • +
+ +

+DESCRIPTION: +
+ +

+Scan for, and return, a free Fortran I/O unit number. + By default, the range of unit numbers returned is between 50 and 99 + (parameters ESMF_LOG_FORTRAN_UNIT_NUMBER and ESMF_LOG_UPPER + respectively.) When integrating ESMF into an application where these values + conflict with other usages, the range of values may be moved by setting the + optional IOUnitLower and IOUnitUpper arguments in the initial + ESMF_Initialize() call with values in a safe, alternate, range. + +

+The Fortran unit number which is returned is not reserved in any way. + Successive calls without intervening OPEN or CLOSE statements + (or other means of connecting to units), might not return a unique unit + number. It is recommended that an OPEN statement immediately follow + the call to ESMF_IOUnitGet() to activate the unit. + +

+The arguments are: +

+
unit
+
A Fortran I/O unit number. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ + +

+ +

+ +

+ +

+53.4.16 ESMF_UtilSort - Sort data +

+ +

+ +

+
+INTERFACE: +

   subroutine ESMF_UtilSort (list, direction, rc)
+
ARGUMENTS: +
   <list>, see below for supported values 
+   type(ESMF_SortFlag), intent(in) :: direction 
+   integer, intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Supported values for <list> are: +

+
+
integer(ESMF_KIND_I4), intent(inout) :: list(:) + +
+
+
integer(ESMF_KIND_I8), intent(inout) :: list(:) + +
+
+
real(ESMF_KIND_R4), intent(inout) :: list(:) + +
+
+
real(ESMF_KIND_R8), intent(inout) :: list(:) + +
+
+
character(len=*), intent(inout) :: list(:) + +
+
+ +

+Use Quick Sort, reverting to Insertion sort on lists of + size <= 20. + +

+This is an ESMFized version of SLASRT from LAPACK version 3.1. + Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd. + November 2006 + +

+The arguments are: +

+
list
+
Array of data to be sorted. The original data is overwritten by the + sorted data. + +
+
direction
+
Direction of sorting. Legal values are ESMF_SORTFLAG_ASCENDING + and ESMF_SORTFLAG_DESCENDING. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if the sorting is successful. + +
+
+ +

+ + +

+ +
+esmf_support@ucar.edu +
+ + diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/node7.html b/docs/nightly/fix/reconcile-info/ESMF_refdoc/node7.html new file mode 100644 index 000000000..e967fcd2c --- /dev/null +++ b/docs/nightly/fix/reconcile-info/ESMF_refdoc/node7.html @@ -0,0 +1,59 @@ + + + + + +6 References + + + + + + + + + + + + + + + + + + + + + +

+6 References +

+

+
+esmf_support@ucar.edu +
+ + diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/node8.html b/docs/nightly/fix/reconcile-info/ESMF_refdoc/node8.html new file mode 100644 index 000000000..c8ddddf6f --- /dev/null +++ b/docs/nightly/fix/reconcile-info/ESMF_refdoc/node8.html @@ -0,0 +1,266 @@ + + + + + +Bibliography + + + + + + + + + + + + + + + + + + + + + +

+Bibliography +

1 +
+JSON for Modern C++, 2020 (accessed February 2020). +
https://github.com/nlohmann/json. + +

2 +
+JSON for Modern C++ 64-Bit Float, 2020 (accessed February 2020). +
+ https://nlohmann.github.io/json/classnlohmann_1_1basic__json_a88d6103cb3620410b35200ee8e313d97.html#a88d6103cb3620410b35200ee8e313d97. + +

3 +
+JSON for Modern C++ 64-Bit Integer, 2020 (accessed February 2020). +
+ https://nlohmann.github.io/json/classnlohmann_1_1basic__json_a98e611d67b7bd75307de99c9358ab2dc.html#a98e611d67b7bd75307de99c9358ab2dc. + +

4 +
+JSON for Modern C++ Is Structured, 2020 (accessed February 2020). +
+ https://nlohmann.github.io/json/classnlohmann_1_1basic__json_a9f68a0af820c3ced7f9d17851ce4c22d.html#a9f68a0af820c3ced7f9d17851ce4c22d. + +

5 +
+JSON for Modern C++ JSON Pointer, 2020 (accessed February 2020). +
+ https://nlohmann.github.io/json/classnlohmann_1_1json__pointer_a7f32d7c62841f0c4a6784cf741a6e4f8.html#a7f32d7c62841f0c4a6784cf741a6e4f8. + +

6 +
+JSON for Modern C++ Memory Efficiency, 2020 (accessed February 2020). +
https://github.com/nlohmann/json#design-goals. + +

7 +
+JSON for Modern C++ Null Value, 2020 (accessed February 2020). +
+ https://nlohmann.github.io/json/classnlohmann_1_1basic__json_a8faa039ca82427ed29c486ffd00600c3.html#a8faa039ca82427ed29c486ffd00600c3. + +

8 +
+JSON for Modern C++ Object, 2020 (accessed February 2020). +
+ https://nlohmann.github.io/json/classnlohmann_1_1basic__json_a5e48a7893520e1314bf0c9723e26ea2a.html#a5e48a7893520e1314bf0c9723e26ea2a. + +

9 +
+JSON for Modern C++ Type Name, 2020 (accessed February 2020). +
+ https://nlohmann.github.io/json/classnlohmann_1_1basic__json_ad14563c53cf7ca9189bc164082367bf3.html#ad14563c53cf7ca9189bc164082367bf3. + +

10 +
+JSON for Modern C++ Update, 2020 (accessed February 2020). +
+ https://nlohmann.github.io/json/classnlohmann_1_1basic__json_a1cfa9ae5e7c2434cab4cfe69bffffe11.html#a1cfa9ae5e7c2434cab4cfe69bffffe11. + +

11 +
+JSON, 2020 (accessed March 2020). +
https://www.json.org/json-en.html. + +

12 +
+A Julian Day and Civil Date Calculator. +
http://www.numerical-recipes.com/julian.html, last accessed on Dec 3, + 2015. + +

13 +
+SCRIP: A Spherical Coordinate Remapping and Interpolation Package. +
http://oceans11.lanl.gov/trac/SCRIP, last accessed on Dec 4, 2015. +
Los Alamos Software Release LACC 98-45. + +

14 +
+Some notes on the ISO 8601 date and time specification standard. +
http://en.wikipedia.org/wiki/ISO_8601
+ http://www.iso.ch/iso/en/prods-services/popstds/datesandtime.html, last + accessed on Dec 4, 2015. + +

15 +
+NetCDF Climate and Forecast (CF) Metadata Conventions. +
http://cfconventions.org/, last accessed on Nov 27, 2015. + +

16 +
+NetCDF Users Guide for C, Version 3. +
http://www.unidata.ucar.edu/software/netcdf/docs, last accessed on + Nov 27, 2015. + +

17 +
+V. Balaji, Jeff Anderson, Isaac Held, Michael Winton, Jeff Durachta, Sergey + Malyshev, and Ronald J. Stouffer. +
The exchange grid: a mechanism for data exchange between earth system + components on independent grids. +
Parallel Computational Fluid Dynamics: Theory and Applications, + Proceedings of the 2005 International Conference on Parallel Computational + Fluid Dynamics, 2006. + +

18 +
+E. G. Boman, U. V. Catalyurek, C. Chevalier, and K. D. Devine. +
The Zoltan and Isorropia parallel toolkits for combinatorial + scientific computing: Partitioning, ordering, and coloring. +
Scientific Programming, 20(2), 2012. + +

19 +
+Y. Meurdesoif E. Kritsikis, M. Aechtner and T. Dubos. +
Conservative interpolation between general spherical meshes. +
Geoscientific Model Development, 10, 2017. + +

20 +
+H. C. Edwards, A. B. Williams, G. D. Sjaardema, D. G. Baur, and W. K. Cochran. +
SIERRA toolkit computational mesh conceptual model. +
Technical Report SAND2010-1192, Sandia National Laboratories, + Albuquerque, New Mexico 87185, March 2010. + +

21 +
+Fliegel, H.F. and Van Flandern, T.C. +
A Machine Algorithm for Processing Calendar Dates. +
Communications of the ACM, 11(10):657, 1968. + +

22 +
+H. Gu, Z. Zong, and K.C. Hung. +
A modified superconvergent patch recovery method and its application + to large deformation problems. +
Finite Elements in Analysis and Design, 40(5-6), 2004. + +

23 +
+Hatcher, D.A. +
Simple Formulae for Julian Day Numbers and Calendar Dates. +
Q.JlR. astr. Soc., 25(1):53-55, 1984. + +

24 +
+International Organization for Standardization. +
Standard 8601:2004, Data elements and interchange formats - + Information interchange - Representation of dates and times. +
+ http://www.iso.ch/iso/en/CatalogueDetailPage.CatalogueDetail?CSNUMBER=40874&COMMID=&scopelist=, + last accessed on Dec 4, 2015. + +

25 +
+A.R. Khoei and S.A. Gharehbaghi. +
The superconvergent patch recovery technique and data transfer + operators in 3d plasticity problems. +
Finite Elements in Analysis and Design, 43(8), 2007. + +

26 +
+Peter Meyer. +
A good discussion of Gregorian and Julian Calendars. +
http://www.hermetic.ch/cal_stud/cal_art.html, last accessed on Nov + 27, 2015. + +

27 +
+Peter Meyer. +
A good discussion of Julian Day Numbers. +
http://www.hermetic.ch/cal_stud/jdn.htm, last accessed on Nov 27, + 2015. + +

28 +
+D. Ramshaw. +
Conservative rezoning algorithm for generalized two-dimensional + meshes. +
Journal of Computational Physics, 59, 1985. + +

29 +
+J. Rumbaugh, I. Jacobson, and G. Booch. +
The Unified Modeling Language Reference Manual. +
Addison-Wesley, 1999. + +

30 +
+Seidelman, P.K. +
Explanatory Supplement to the Astronomical Almanac. +
University Science Books, 1992. + +

31 +
+Gernot M.R. Winkler. +
A good discussion of the Modified Julian Day Calendar. +
http://tycho.usno.navy.mil/mjd.html, last accessed on Nov 27, 2015. +
+ +

+
+esmf_support@ucar.edu +
+ + diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/node9.html b/docs/nightly/fix/reconcile-info/ESMF_refdoc/node9.html new file mode 100644 index 000000000..3c78fe32f --- /dev/null +++ b/docs/nightly/fix/reconcile-info/ESMF_refdoc/node9.html @@ -0,0 +1,5270 @@ + + + + + +7 Appendices + + + + + + + + + + + + + + + + + + + + + +Subsections + + + +
+ +

+7 Appendices +

+ +

+ +

+ +
+54 Appendix A: Master List of Constants +

+ +

+ +

+54.1 ESMF_ALARMLIST +

+This flag is documented in section 46.2.1. + +

+ +

+ +
+54.2 ESMF_DIM_ARB +

+ +

+DESCRIPTION: +
+An integer named constant which is used to indicate that a particular dimension is arbitrarily distributed. + +

+ +

+54.3 ESMF_ATTCOPY +

+This flag is documented in section 57.1.1. + +

+ +

+54.4 ESMF_ATTGETCOUNT +

+This flag is documented in section 57.1.2. + +

+ +

+ +
+54.5 ESMF_ATTNEST +

+DESCRIPTION: +
+Indicate whether or not to descend the Attribute hierarchy. + +

+The type of this flag is: + +

+type(ESMF_AttNest_Flag) + +

+The valid values are: +

+
ESMF_ATTNEST_ON
+
Indicates that the Attribute hierarchy should be traversed. + +
+
ESMF_ATTNEST_OFF
+
Indicates that the Attribute hierarchy should not be traversed. +
+
+ +

+ +

+ +
+54.6 ESMF_ATTRECONCILE +

+DESCRIPTION: +
+Indicate whether or not to handle metadata (Attributes) in ESMF_StateReconcile(). + +

+The type of this flag is: + +

+type(ESMF_AttReconcileFlag) + +

+The valid values are: +

+
ESMF_ATTRECONCILE_ON
+
Attribute reconciliation will be turned on. + +
+
ESMF_ATTRECONCILE_OFF
+
Attribute reconciliation will be turned off. +
+
+ +

+ +

+54.7 ESMF_ATTWRITE +

+This flag is documented in section 57.1.3. + +

+ +

+54.8 ESMF_CALKIND +

+This flag is documented in section 42.2.1. + +

+ +

+ +
+54.9 ESMF_COMPTYPE +

+DESCRIPTION: +
+Indicate the type of a Component. + +

+The type of this flag is: + +

+type(ESMF_CompType_Flag) + +

+The valid values are: +

+
ESMF_COMPTYPE_GRID
+
A ESMF_GridComp object. + +
+
ESMF_COMPTYPE_CPL
+
A ESMF_CplComp objects. + +
+
ESMF_COMPTYPE_SCI
+
A ESMF_SciComp objects. +
+
+ +

+ +

+ +
+54.10 ESMF_CONTEXT +

+DESCRIPTION: +
+Indicates the type of VM context in which a Component will be executing its +standard methods. + +

+The type of this flag is: + +

+type(ESMF_Context_Flag) + +

+The valid values are: +

+
ESMF_CONTEXT_OWN_VM
+
The component is running in its own, separate VM context. Resources + are inherited from the parent but can be arranged to fit the + component's requirements. +
+
ESMF_CONTEXT_PARENT_VM
+
The component uses the parent's VM for resource management. Compared + to components that use their own VM context components that run in the + parent's VM context are more light-weight with respect to the overhead + of calling into their initialize, run and finalize methods. + Furthermore, VM-specific properties remain unchanged when going from + the parent component to the child component. These properties include + the MPI communicator, the number of PETs, the PET labeling, + communication attributes, threading-level. +
+
+ +

+ +

+ +
+54.11 ESMF_COORDSYS +

+ +

+DESCRIPTION: +
+ A set of values which indicates in which system the coordinates in a class (e.g. Grid) are. This type is useful both +to indicate to other users the type of the coordinates, but also to control how the coordinates are interpreted in ESMF +methods which depend on the coordinates (e.g. regridding methods like ESMF_FieldRegridStore()). + +

+The type of this flag is: + +

+type(ESMF_CoordSys_Flag) + +

+The valid values are: +

+
ESMF_COORDSYS_CART
+
Cartesian coordinate system. In this system, the Cartesian coordinates are mapped to the coordinate dimensions in the following order: x,y,z. (E.g. using coordDim=2 in ESMF_GridGetCoord() references the y dimension) + +

+

+
ESMF_COORDSYS_SPH_DEG
+
Spherical coordinates in degrees. In this system, the spherical coordinates are mapped to the coordinate dimensions in the following order: longitude, latitude, radius. (E.g. using coordDim=2 in ESMF_GridGetCoord() references the latitude dimension.) + +

+

+
ESMF_COORDSYS_SPH_RAD
+
Spherical coordinates in radians. In this system, the spherical coordinates are mapped to the coordinate dimensions in the following order: longitude, latitude, radius. (E.g. using coordDim=2 in ESMF_GridGetCoord() references the latitude dimension.) + +

+

+
+ +

+ +

+ +
+54.12 ESMF_CUBEDSPHERECALC +

+DESCRIPTION: +
+Indicates the method used to calculate coordinates during cubed sphere creation. + +

+The type of this flag is: + +

+type(ESMF_CubedSphereCalc_Flag) + +

+The valid values are: +

+
ESMF_CUBEDSPHERECALC_1TILE:
+
This is the original method used to calculate coordinates for the ESMF cubed sphere. It uses + an array the size of one tile of the cubed sphere on each PET to calculate coordinates + and ensure their symmetry. +
+
ESMF_CUBEDSPHERECALC_LOCAL:
+
This method just uses an array large enough to hold the local cubed sphere coordinates on each PET. + It relies on careful design of loops and calculation to ensure symmetry of the coordinates. This + method will in general use less memory than ESMF_CUBEDSPHERECALC_1TILE. +
+
+ +

+ +

+ +
+54.13 ESMF_DATACOPY +

+DESCRIPTION: +
+Indicates how data references, copies, and memory allocations to hold data are +handled. + +

+The type of this flag is: + +

+type(ESMF_DataCopy_Flag) + +

+The valid values are: +

+
ESMF_DATACOPY_ALLOC
+
Create a new allocation that is sufficient in size to hold the data. + However, no data is copied and the allocation is returned uninitialized. +
+
ESMF_DATACOPY_REFERENCE
+
Reference the data within the existing allocation. +
+
ESMF_DATACOPY_VALUE
+
Copy the data to another allocation. If needed create the new allocation. +
+
+ +

+ +

+ +
+54.14 ESMF_DECOMP +

+DESCRIPTION: +
+Indicates how DistGrid elements are decomposed over DEs. + +

+The type of this flag is: + +

+type(ESMF_Decomp_Flag) + +

+The valid values are: +

+
ESMF_DECOMP_BALANCED
+
Decompose elements as balanced as possible across DEs. The maximum + difference in number of elements per DE is 1, with the extra elements on + the lower DEs. +
+
ESMF_DECOMP_CYCLIC
+
Decompose elements cyclically across DEs. +
+
ESMF_DECOMP_RESTFIRST
+
Divide elements over DEs. Assign the rest of this division to the first + DE. +
+
ESMF_DECOMP_RESTLAST
+
Divide elements over DEs. Assign the rest of this division to the last DE. +
+
ESMF_DECOMP_SYMMEDGEMAX
+
Decompose elements across the DEs in a symmetric fashion. Start with the + maximum number of elements at the two edge DEs, and assign a decending + number of elements to the DEs as the center of the decomposition is + approached from both sides. +
+
+ +

+ +

+54.15 ESMF_DIRECTION +

+This flag is documented in section 45.2.1. + +

+ +

+54.16 ESMF_DISTGRIDMATCH +

+This flag is documented in section 36.2.1. + +

+ +

+54.17 ESMF_END +

+ +

+This flag is documented in section 16.2.1. + +

+ +

+ +
+54.18 ESMF_EXTRAPMETHOD +

+ +

+DESCRIPTION: +
+Specify which extrapolation method to use on unmapped destination points after regridding. + +

+The type of this flag is: + +

+type(ESMF_ExtrapMethod_Flag) + +

+The valid values are: +

+
ESMF_EXTRAPMETHOD_NONE
+
Indicates that no extrapolation should be done. +
+
ESMF_EXTRAPMETHOD_NEAREST_IDAVG
+
Inverse distance weighted average. + Here the value of an unmapped destination point is the weighted average + of the closest N source points. The weight is + the reciprocal of the distance of the source point from the destination point raised to a power P. + All the weights contributing to one destination point are normalized so that they sum to 1.0. + The user can choose N and P when using this method, but defaults are also provided. + This extrapolation method is not supported with conservative regrid methods + (e.g. ESMF_REGRIDMETHOD_CONSERVE). +
+
ESMF_EXTRAPMETHOD_NEAREST_STOD
+
Nearest source to destination. + Here the value of each unmapped destination point is set to the value of the closest source point. + This extrapolation method is not supported with conservative regrid methods + (e.g. ESMF_REGRIDMETHOD_CONSERVE). +
+
ESMF_EXTRAPMETHOD_NEAREST_D
+
Nearest mapped destination to unmapped destination. + Here the value of each unmapped destination point is set to the value of the closest mapped (i.e. regridded) destination point. + This extrapolation method is not supported with conservative regrid methods + (e.g. ESMF_REGRIDMETHOD_CONSERVE). +
+
ESMF_EXTRAPMETHOD_CREEP
+
Creep fill. + Here unmapped destination points are filled by moving data from mapped locations to neighboring unmapped locations. + The data filled into a new location is the average of its already filled neighbors' values. + This process is repeated for a user specified number of levels (e.g. in ESMF_FieldRegridStore() this is specified via the extrapNumLevels argument). + This extrapolation method is not supported with conservative regrid methods + (e.g. ESMF_REGRIDMETHOD_CONSERVE). +
+
ESMF_EXTRAPMETHOD_CREEP_NRST_D
+
Creep fill with nearest destination. + Here unmapped destination points are filled using creep fill as described under that entry (see ESMF_EXTRAPMETHOD_CREEP above), any points not filled + by creep fill are then set to the closest filled or mapped destination point as if the nearest destination method (see ESMF_EXTRAPMETHOD_NEAREST_D above) + were run after the initial regridding followed by creep fill. + Like creep fill, this method is repeated for a user specified number of levels + (e.g. in ESMF_FieldRegridStore() this is specified via the extrapNumLevels argument). + This extrapolation method is not supported with conservative regrid methods + (e.g. ESMF_REGRIDMETHOD_CONSERVE). +
+
+ +

+ +

+54.19 ESMF_FIELDSTATUS +

+This flag is documented in section 26.2.1. + +

+ +

+ +
+54.20 ESMF_FILEFORMAT +

+DESCRIPTION: +
+This flag is used in ESMF_GridCreate and ESMF_MeshCreate +functions. It is also used in the ESMF_RegridWeightGen API as an +optional argument. + +

+The type of this flag is: + +

+type(ESMF_FileFormat_Flag) + +

+The valid values are: +

+
ESMF_FILEFORMAT_CFGRID
+
A single tile logically rectangular + grid file that follows the NetCDF CF convention. See section 12.8.3 for more detailed description. + +

+

+
ESMF_FILEFORMAT_ESMFMESH
+
ESMF unstructured grid file format. This format was developed by the ESMF team to match the capabilities of the Mesh class and to be efficient to convert to that class. See section 12.8.2 for more detailed description. + +

+

+
ESMF_FILEFORMAT_GRIDSPEC
+
Equivalent to ESMF_FILEFORMAT_CFGRID flag. + +

+

+
ESMF_FILEFORMAT_MOSAIC
+
This format is a proposed extension to the +CF-conventions for grid mosaics consisting of multiple logically rectangular grid +tiles. See section 12.8.5 for more detailed description. + +

+

+
ESMF_FILEFORMAT_SCRIP
+
SCRIP format grid file. The SCRIP format is + the format accepted by the SCRIP regridding tool [13]. See section12.8.1 for more detailed description. + +

+

+
ESMF_FILEFORMAT_UGRID
+
CF-convention unstructured grid file format. This format is a proposed extension to the +CF-conventions for unstructured grid data model. See section 12.8.4 for more detailed description. + +

+

+
+ +

+ +

+ +
+54.21 ESMF_FILEMODE +

+DESCRIPTION: +
+This flag is used to indicate which mode to use when writing a weight file. + +

+The type of this flag is: + +

+type(ESMF_FileMode_Flag) + +

+The valid values are: +

+
ESMF_FILEMODE_BASIC
+
Indicates that only the factorList and factorIndexList should be written. +
+
ESMF_FILEMODE_WITHAUX
+
Indicates that grid center coordinates should also be written. + +

+

+
+ +

+ +

+ +
+54.22 ESMF_FILESTATUS +

+DESCRIPTION: +
+This flag is used in ESMF I/O functions. It's use is similar to the +status keyword in the Fortran open statement. + +

+The type of this flag is: + +

+type(ESMF_FileStatus_Flag) + +

+The valid values are: +

+
ESMF_FILESTATUS_NEW
+
The file must not exist, it will be created. +
+
ESMF_FILESTATUS_OLD
+
The file must exist. +
+
ESMF_FILESTATUS_REPLACE
+
If the file exists, all of its contents will be deleted before writing. + If the file does not exist, it will be created. +
+
ESMF_FILESTATUS_UNKNOWN
+
The value is treated as if it were ESMF_FILESTATUS_OLD if + the corresponding file already exists. Otherwise, the value is + treated as if it were ESMF_FILESTATUS_NEW. + +

+

+
+ +

+ +

+ +
+54.23 ESMF_GEOMTYPE +

+ +

+DESCRIPTION: +
+ Different types of geometries upon which an ESMF Field or ESMF Fieldbundle may +be built. + +

+The type of this flag is: + +

+type(ESMF_GeomType_Flag) + +

+The valid values are: +

+
ESMF_GEOMTYPE_GRID
+
An ESMF_Grid, a structured grid composed of one or more logically rectangular tiles. +
+
ESMF_GEOMTYPE_MESH
+
An ESMF_Mesh, an unstructured grid. +
+
ESMF_GEOMTYPE_XGRID
+
An ESMF_XGrid, an exchange grid. +
+
ESMF_GEOMTYPE_LOCSTREAM
+
An ESMF_LocStream, a disconnected series of points with associated key values. +
+
+ +

+ +

+54.24 ESMF_GRIDCONN +

+This flag is documented in section 31.2.1. + +

+ +

+54.25 ESMF_GRIDITEM +

+This flag is documented in section 31.2.2. + +

+ +

+54.26 ESMF_GRIDMATCH +

+This flag is documented in section 31.2.3. + +

+ +

+54.27 ESMF_GRIDSTATUS +

+This flag is documented in section 31.2.4. + +

+ +

+54.28 ESMF_HCONFIGMATCH +

+This flag is documented in section 48.2.1. + +

+ +

+ +
+54.29 ESMF_INDEX +

+DESCRIPTION: +
+Indicates whether index is local (per DE) or global (per object). + +

+The type of this flag is: + +

+type(ESMF_Index_Flag) + +

+The valid values are: +

+
ESMF_INDEX_DELOCAL
+
Indicates that DE-local index space starts at lower bound 1 for each DE. +
+
ESMF_INDEX_GLOBAL
+
Indicates that global indices are used. This means that DE-local index + space starts at the global lower bound for each DE. +
+
ESMF_INDEX_USER
+
Indicates that the DE-local index bounds are explicitly set by the user. + +
+
+ +

+ +

+ +
+54.30 ESMF_IOFMT +

+DESCRIPTION: +
+Indicates I/O format options that are currently supported. + +

+The type of this flag is: + +

+type(ESMF_IOFmt_Flag) + +

+The valid values are: +

+
ESMF_IOFMT_NETCDF
+
NETCDF and PNETCDF (cdf1) format in NETCDF-3 “classic” format. Use + of PNETCDF is prioritized if available. +
+
ESMF_IOFMT_NETCDF_64BIT_OFFSET
+
NETCDF and PNETCDF (cdf2) format. This format allows files greater + than 4GiB in NETCDF-3 “classic” format. Use of PNETCDF is prioritized + if available. +
+
ESMF_IOFMT_NETCDF_64BIT_DATA
+
NETCDF and PNETCDF (cdf5) format. This allows individual records greater + than 4GiB in NETCDF-3 “classic” format. Use of PNETCDF is prioritized + if available. +
+
ESMF_IOFMT_NETCDF4P
+
NETCDF-4 (HDF-5) format. If a NETCDF parallel library is available, + writes will be in parallel. Writes will use one I/O PET per + SSI (node) of the ESMF VM that calls the I/O operation. Otherwise writes + will be serial. +
+
ESMF_IOFMT_NETCDF4C
+
NETCDF-4 (HDF-5) format with lossless compression from HDF-5 applied. + This is only available as a serial option, even if a parallel NETCDF + library is available. +
+
+ +

+ +

+ +
+54.31 ESMF_IO_NETCDF_PRESENT +

+DESCRIPTION: +
+Indicates whether netcdf feature support has been enabled +within the current ESMF build. + +

+The type of this flag is: + +

+logical + +

+The valid values are: +

+
.true.
+
Netcdf features are enabled. +
+
.false.
+
Netcdf features are not enabled. +
+
+ +

+ +

+ +
+54.32 ESMF_IO_PIO_PRESENT +

+DESCRIPTION: +
+Indicates whether PIO (parallel I/O) feature support has been enabled +within the current ESMF build. + +

+The type of this flag is: + +

+logical + +

+The valid values are: +

+
.true.
+
PIO features are enabled. +
+
.false.
+
PIO features are not enabled. +
+
+ +

+ +

+ +
+54.33 ESMF_IO_PNETCDF_PRESENT +

+DESCRIPTION: +
+Indicates whether parallel netcdf feature support has been enabled +within the current ESMF build. + +

+The type of this flag is: + +

+logical + +

+The valid values are: +

+
.true.
+
Parallel NETCDF features are enabled. +
+
.false.
+
Parallel NETCDF features are not enabled. +
+
+ +

+ +

+ +
+54.34 ESMF_ITEMORDER +

+DESCRIPTION: +
+Specifies the order of items in a list. + +

+The type of this flag is: + +

+type(ESMF_ItemOrder_Flag) + +

+The valid values are: +

+
ESMF_ITEMORDER_ABC
+
The items are in alphabetical order, according to their names. +
+
ESMF_ITEMORDER_ADDORDER
+
The items are in the order in which they were added to the container. +
+
+ +

+ +

+ +
+54.35 ESMF_KIND +

+ +

+DESCRIPTION: +
+Named constants to be used as kind-parameter in Fortran variable + declarations. For example: +

+  integer(ESMF_KIND_I4)       :: integerVariable
+  integer(kind=ESMF_KIND_I4)  :: integerVariable
+  real(ESMF_KIND_R4)          :: realVariable
+  real(kind=ESMF_KIND_R4)     :: realVariable
+
+The Fortran standard does not mandate what numeric values correspond to +actual number of bytes allocated for the various kinds. The following constants +are defined by ESMF to be correct across the supported Fortran compilers. +Note that not all compilers support every kind listed below; in particular +1 and 2 byte integers can be problematic. + +

+The type of these named constants is: + +

+integer + +

+The named constants are: +

+
ESMF_KIND_I1
+
Kind-parameter for 1 byte integer. +
+
ESMF_KIND_I2
+
Kind-parameter for 2 byte integer. +
+
ESMF_KIND_I4
+
Kind-parameter for 4 byte integer. +
+
ESMF_KIND_I8
+
Kind-parameter for 8 byte integer. +
+
ESMF_KIND_R4
+
Kind-parameter for 4 byte real. +
+
ESMF_KIND_R8
+
Kind-parameter for 8 byte real. +
+
+ +

+ +

+ +
+54.36 ESMF_LINETYPE +

+ +

+DESCRIPTION: +
This argument allows the user to select the path of the line which connects two points on the surface of a sphere. +This in turn controls the path along which distances are calculated and the shape of the edges that make up a cell. + +

+The type of this flag is: + +

+type(ESMF_LineType_Flag) + +

+The valid values are: +

+
ESMF_LINETYPE_CART
+
Cartesian line. When this option is specified distances are calculated in a straight line through the 3D Cartesian space + in which the sphere is embedded. Cells are approximated by 3D planes bounded by 3D Cartesian lines between their corner vertices. + When calculating regrid weights, this line type is currently the default for non-conservative regrid methods (e.g. ESMF_REGRIDMETHOD_BILINEAR, + ESMF_REGRIDMETHOD_PATCH, ESMF_REGRIDMETHOD_NEAREST_STOD, etc.). +
+
ESMF_LINETYPE_GREAT_CIRCLE
+
Great circle line. When this option is specified distances are calculated along a great circle path (the shortest distance + between two points on a sphere surface). Cells are bounded by great circle paths between their corner vertices. When calculating regrid + weights, this line type is currently the default for conservative regrid methods (e.g. ESMF_REGRIDMETHOD_CONSERVE, etc.). +
+
+ +

+ +

+54.37 ESMF_LOGERR +

+This flag is documented in section 49.2.1. + +

+ +

+54.38 ESMF_LOGKIND +

+This flag is documented in section 49.2.2. + +

+ +

+54.39 ESMF_LOGMSG +

+This flag is documented in section 49.2.3. + +

+ +

+54.40 ESMF_MESHELEMTYPE +

+This flag is documented in section 33.2.1. + +

+ +

+ +
+54.41 ESMF_MESHLOC +

+DESCRIPTION: +
+Used to indicate a specific part of a Mesh. This is commonly used to specify the part of the Mesh to +create a Field on. + +

+The type of this flag is: + +

+type(ESMF_MeshLoc) + +

+The valid values are: +

+
ESMF_MESHLOC_NODE
+
The nodes (also known as corners or vertices) of a Mesh. + +

+

+
ESMF_MESHLOC_ELEMENT
+
The elements (also known as cells) of a Mesh. +
+
+ +

+ +

+ +
+54.42 ESMF_MESHOP +

+DESCRIPTION: +
+ Specifies the spatial operation with two source Meshes, treating the Meshes as point sets. + +

+The type of this flag is: + +

+type(ESMF_MeshOp_Flag) + +

+The valid values are: +

+
ESMF_MESHOP_DIFFERENCE
+
Calculate the difference of the two point sets from the source Meshes. +
+
+ +

+ +

+ +
+54.43 ESMF_MESHSTATUS +

+ +

+DESCRIPTION: +
+The ESMF Mesh class can exist in several states. The ESMF_MESHSTATUS +flag is used to indicate which of these states a Mesh is currently in. + +

+The type of this flag is: + +

+type(ESMF_MeshStatus_Flag) + +

+The valid values are: +

+
ESMF_MESHSTATUS_UNINIT:
+
The Mesh status is uninitialized. This might + happen if the Mesh hasn't been created yet, or if the Mesh has been destroyed. +
+
ESMF_MESHSTATUS_EMPTY:
+
Status after a Mesh has been created with + ESMF_MeshEmptyCreate. Only distribution information has been set in the Mesh. + This object can be used in the ESMF_MeshGet() + method to retrieve distgrids and the distgrid's presence. +
+
ESMF_MESHSTATUS_STRUCTCREATED:
+
Status after a Mesh has been through the first + step of the three step creation process. The Mesh is now ready to have nodes added + to it. +
+
ESMF_MESHSTATUS_NODESADDED:
+
Status after a Mesh has been through the second + step of the three step creation process. The Mesh is now ready to be completed with + elements. +
+
ESMF_MESHSTATUS_COMPLETE:
+
The Mesh has been completely created + and can be used to create a Field. Further, if the internal Mesh memory hasn't been + freed, then the Mesh should be usable in any Mesh functionality (e.g. + regridding). The status of the internal Mesh memory can be checked using + the isMemFreed argument to ESMF_MeshGet(). +
+
+ +

+ +

+ +
+54.44 ESMF_METHOD +

+ +

+DESCRIPTION: +
+Specify standard ESMF Component method. + +

+The type of this flag is: + +

+type(ESMF_Method_Flag) + +

+The valid values are: +

+
ESMF_METHOD_FINALIZE
+
Finalize method. +
+
ESMF_METHOD_INITIALIZE
+
Initialize method. +
+
ESMF_METHOD_READRESTART
+
ReadRestart method. +
+
ESMF_METHOD_RUN
+
Run method. +
+
ESMF_METHOD_WRITERESTART
+
WriteRestart method. +
+
+ +

+ +

+54.45 ESMF_NORMTYPE +

+ +

+ +

+DESCRIPTION: +
When doing conservative regridding (e.g. ESMF_REGRIDMETHOD_CONSERVE), this option allows the user to select the type of normalization used when producing the weights. + +

+type(ESMF_NormType_Flag) + +

+The valid values are: +

+
ESMF_NORMTYPE_DSTAREA
+
Destination area normalization. Here the weights are calculated by dividing the area of overlap of the source and + destination cells by the area of the entire destination cell. In other words, the weight is the fraction of the + entire destination cell which overlaps with the given source cell. +
+
ESMF_NORMTYPE_FRACAREA
+
Fraction area normalization. Here in addition to the weight calculation done for destination area normalization +(ESMF_NORMTYPE_DSTAREA) the weights are also divided by the fraction that the destination cell overlaps with + the entire source grid. In other words, the weight is the fraction of just the part of the destination cell that + overlaps with the entire source mesh. +
+
+ +

+ +

+54.46 ESMF_PIN +

+This flag is documented in section 50.2.1. + +

+ +

+54.47 ESMF_POLEKIND +

+This flag is documented in section 31.2.5. + +

+ +

+ +
+54.48 ESMF_POLEMETHOD +

+ +

+DESCRIPTION: +
+ +When interpolating between two Grids which have been mapped to a sphere these can be used to specify the type of artificial pole to create on the source Grid during interpolation. Creating the pole allows destination points above the top row or below the bottom row of the source Grid to still be mapped. + +

+The type of this flag is: + +

+type(ESMF_PoleMethod_Flag) + +

+The valid values are: +

+
ESMF_POLEMETHOD_NONE
+
No pole. Destination points which lie above the top or below the bottom row of the source Grid won't be mapped. +
+
ESMF_POLEMETHOD_ALLAVG
+
Construct an artificial pole placed in the center of the top (or bottom) row of nodes, but projected onto the sphere formed by the rest of the grid. The value at this pole is the average of all the source values surrounding the pole. +
+
ESMF_POLEMETHOD_NPNTAVG
+
Construct an artificial pole placed in the center of the top (or bottom) row of nodes, but projected onto the sphere formed by the rest of the grid. The value at this pole is the average of the N source nodes next to the pole and surrounding the destination point (i.e. the value may differ for each destination point). Here N is set by using the regridPoleNPnts parameter and ranges from 1 to the number of nodes around the pole. This option is useful for interpolating values which may be zeroed out by averaging around the entire pole (e.g. vector components). +
+
ESMF_POLEMETHOD_TEETH
+
No new pole point is constructed, instead the holes at the poles are filled by constructing triangles across the top and bottom row of the source Grid. This can be useful because no averaging occurs, however, because the top and bottom of the sphere are now flat, for a big enough mismatch between the size of the destination and source pole holes, some destination points may still not be able to be mapped to the source Grid. +
+
+ +

+ +

+ +
+54.49 ESMF_REDUCE +

+DESCRIPTION: +
+Indicates reduce operation. + +

+The type of this flag is: + +

+type(ESMF_Reduce_Flag) + +

+The valid values are: +

+
ESMF_REDUCE_SUM
+
Use arithmetic sum to add all data elements. + +
+
ESMF_REDUCE_MIN
+
Determine the minimum of all data elements. + +
+
ESMF_REDUCE_MAX
+
Determine the maximum of all data elements. +
+
+ +

+ +

+ +
+54.50 ESMF_REGION +

+DESCRIPTION: +
+Specifies various regions in the data layout of an Array or Field object. + +

+The type of this flag is: + +

+type(ESMF_Region_Flag) + +

+The valid values are: +

+
ESMF_REGION_TOTAL
+
Total allocated memory. +
+
ESMF_REGION_SELECT
+
Region of operation-specific elements. +
+
ESMF_REGION_EMPTY
+
The empty region contains no elements. +
+
+ +

+ +

+ +
+54.51 ESMF_REGRIDMETHOD +

+ +

+DESCRIPTION: +
+Specify which interpolation method to use during regridding. For a more detailed discussion of these methods, as well as ESMF regridding in general, see Section 24.2. + +

+The type of this flag is: + +

+type(ESMF_RegridMethod_Flag) + +

+The valid values are: +

+
ESMF_REGRIDMETHOD_BILINEAR
+
Bilinear interpolation. Destination value is a linear combination of the source values in the cell which contains the destination point. The weights for the linear combination are based on the distance of destination point from each source value. +
+
ESMF_REGRIDMETHOD_PATCH
+
Higher-order patch recovery interpolation. Destination value is a weighted average of 2D polynomial patches constructed from cells surrounding the source cell which contains the destination point. This method typically results in better approximations to values and derivatives than bilinear. However, because of its larger stencil, it also results in a much larger interpolation matrix (and thus routeHandle) than the bilinear. +
+
ESMF_REGRIDMETHOD_NEAREST_STOD
+
In this version of nearest neighbor interpolation each destination point is mapped to the closest source point. A given source point may go to multiple destination points, but no destination point will receive input from more than one source point. +
+
ESMF_REGRIDMETHOD_NEAREST_DTOS
+
In this version of nearest neighbor interpolation each source point is mapped to the closest destination point. A given destination point may receive input from multiple source points, but no source point will go to more than one destination point. +
+
ESMF_REGRIDMETHOD_CONSERVE
+
First-order conservative interpolation. The main purpose of this method is to preserve the integral of the field between the source and destination. + Will typically give a less accurate approximation to the individual field values than the bilinear or patch methods. The value of a destination cell is calculated as the weighted sum of the values of the source cells that it overlaps. The weights are determined by the amount the source cell overlaps the destination cell. Needs corner coordinate values to be provided in the Grid. Currently only works for Fields created on the Grid center stagger or the Mesh element location. +
+
ESMF_REGRIDMETHOD_CONSERVE_2ND
+
Second-order conservative interpolation. As with first-order, preserves the integral of the value between the source and destination. However, typically produces a smoother more accurate result than first-order. Also like first-order, the value of a destination cell is calculated as the weighted sum of the values of the source cells that it overlaps. However, second-order also includes additional terms to take into account the gradient of the field across the source cell. Needs corner coordinate values to be provided in the Grid. Currently only works for Fields created on the Grid center stagger or the Mesh element location. + +

+

+
+ +

+ +

+ +
+54.52 ESMF_REGRIDSTATUS +

+ +

+DESCRIPTION: +
+ These values can be output during regridding (e.g. from ESMF_FieldRegridStore() via the dstStatusField argument). They indicate the status of each destination location. + +

+The type of this flag is: + +

+integer(ESMF_KIND_I4) + +

+The valid values for all regrid methods are: +

+
ESMF_REGRIDSTATUS_DSTMASKED
+
The destination location is masked, so no regridding has been peformed on it. This status has a numeric value of 0. +
+
ESMF_REGRIDSTATUS_SRCMASKED
+
The destination location is within a masked part of the source grid, so no regridding has been performed on it. This status has a numeric value of 1. +
+
ESMF_REGRIDSTATUS_OUTSIDE
+
The destination location is outside the source grid, so no regridding has been performed on it. This status has a numeric value of 2. +
+
ESMF_REGRIDSTATUS_MAPPED
+
The destination location is within the unmasked source grid, and so has been regridded (i.e. there is an entry for it within the factorIndexList or routeHandle). This status has a numeric value of 4. +
+
ESMF_REGRIDSTATUS_EXMAPPED
+
The destination location was not within the unmasked source grid, and so typically it wouldn't be regridded. However, extrapolation was used, and so it has been regridded (i.e. there is an entry for it within the factorIndexList or routeHandle). This status has a numeric value of 8. +
+
+ +

+In addition to the above, regridding using the conservative method can result in other values. The reason for this is that in that method one destination cell can overlap multiple source cells, so a single destination can have a combination of values. +The following are the additional values that apply to the conservative method: +

+
ESMF_REGRIDSTATUS_SMSK_OUT
+
The destination cell overlaps a masked source cell, and extends outside the source grid. This status has a numeric value of 3. +
+
ESMF_REGRIDSTATUS_SMSK_MP
+
The destination cell overlaps a masked source cell, and an unmasked source cell. (Because it overlaps with the unmasked source grid, there will be an entry for the destination cell within the factorIndexList or routeHandle). This status has a numeric value of 5. +
+
ESMF_REGRIDSTATUS_OUT_MP
+
The destination cell overlaps an unmasked source cell, and extends outside the source grid. (Because it overlaps with the unmasked source grid, there will be an entry for the destination cell within the factorIndexList or routeHandle). This status has a numeric value of 6. +
+
ESMF_REGRIDSTATUS_SMSK_OUT_MP
+
The destination cell overlaps a masked source cell, an unmasked source cell, and extends outside the source grid. (Because it overlaps with the unmasked source grid, there will be an entry for the destination cell within the factorIndexList or routeHandle). This status has a numeric value of 7. +
+
+ +

+ +

+ +
+54.53 ESMF_ROUTESYNC +

+DESCRIPTION: +
+ +Switch between blocking and non-blocking execution of RouteHandle based +communication calls. Every RouteHandle based communication method contains +an optional argument routesyncflag that is of type ESMF_RouteSync_Flag. + +

+The type of this flag is: + +

+type(ESMF_RouteSync_Flag) + +

+The valid values are: +

+
ESMF_ROUTESYNC_BLOCKING
+
Execute a precomputed communication pattern in blocking mode. This + mode guarantees that when the method returns all PET-local data + transfers, both in-bound and out-bound, have finished. +
+
ESMF_ROUTESYNC_NBSTART
+
Start executing a precomputed communication pattern in non-blocking + mode. When a method returns from being called in this mode, it + guarantees that all PET-local out-bound data has been transferred. + It is now safe for the user to overwrite out-bound data elements. + No guarantees are made for in-bound data elements at this stage. It is + unsafe to access these elements until a call in + ESMF_ROUTESYNC_NBTESTFINISH mode has been issued and has returned + with finishedflag equal to .true., or a call in + ESMF_ROUTESYNC_NBWAITFINISH mode has been issued and has returned. + +
+
ESMF_ROUTESYNC_NBTESTFINISH
+
Test whether the transfer of data of a precomputed communication + pattern, started with ESMF_ROUTESYNC_NBSTART, has completed. + Finish up as much as possible and set the finishedflag to + .true. if all data operations have completed, or + .false. if there are still outstanding transfers. Only after + a finishedflag equal to .true. has been returned is it + safe to access any of the in-bound data elements. +
+
ESMF_ROUTESYNC_NBWAITFINISH
+
Wait (i.e. block) until the transfer of data of a precomputed + communication pattern, started with ESMF_ROUTESYNC_NBSTART, has + completed. Finish up all data operations and set the returned + finishedflag to .true.. It is safe to access any of the + in-bound data elements once the call has returned. +
+
ESMF_ROUTESYNC_CANCEL
+
Cancel outstanding transfers for a precomputed communication pattern. +
+
+ +

+ +

+54.54 ESMF_SERVICEREPLY +

+This flag is documented in section 50.2.2. + +

+ +

+54.55 ESMF_STAGGERLOC +

+This flag is documented in section 31.2.6. + +

+ +

+ +
+54.56 ESMF_STARTREGION +

+DESCRIPTION: +
+Specifies the start of the effective halo region of an Array or Field object. + +

+The type of this flag is: + +

+type(ESMF_StartRegion_Flag) + +

+The valid values are: +

+
ESMF_STARTREGION_EXCLUSIVE
+
Region of elements that are exclusively owned by the local DE. +
+
ESMF_STARTREGION_COMPUTATIONAL
+
User defined region, greater or equal to the exclusive region. +
+
+ +

+ +

+54.57 ESMF_STATEINTENT +

+This flag is documented in section 21.2.1. + +

+ +

+54.58 ESMF_STATEITEM +

+This flag is documented in section 21.2.2. + +

+ +

+ +
+54.59 ESMF_SYNC +

+DESCRIPTION: +
+Indicates method blocking behavior and PET synchronization for VM communication +methods, as well as for standard Component methods, such as Initialize(), Run() +and Finalize(). + +

+For VM communication calls the ESMF_SYNC_BLOCKING and ESMF_SYNC_NONBLOCKING +modes provide behavior that is practically identical to the blocking and +non-blocking communication calls familiar from MPI. + +

+The details of how the blocking mode setting affects Component methods are +more complex. This is a consequence of the fact that ESMF Components can be +executed in threaded or non-threaded mode. However, in the default, +non-threaded case, where an ESMF application runs as a pure MPI or mpiuni +program, most of the complexity is removed. + +

+See the VM item in 6.6 for an +explanation of the PET and VAS concepts used in the following +descriptions. + +

+The type of this flag is: + +

+type(ESMF_Sync_Flag) + +

+The valid values are: +

+
ESMF_SYNC_BLOCKING
+
Communication calls: The called method will block until all + (PET-)local operations are complete. After the return of a blocking + communication method it is safe to modify or use all participating + local data. + +

+Component calls: The called method will block until all PETs of + the VM have completed the operation. + +

+For a non-threaded, pure MPI + component the behavior is identical to calling a barrier before + returning from the method. Generally this kind of rigid + synchronization is not the desirable mode of operation for an MPI + application, but may be useful for application debugging. + In the opposite case, where all PETs of the component are running as + threads in shared memory, i.e. in a single VAS, strict synchronization + of all PETs is required to prevent race conditions. + +

+

+
ESMF_SYNC_VASBLOCKING
+
Communication calls: Not available for communication calls. + +

+Component calls: The called method will block each PET until + all operations in the PET-local VAS have completed. + +

+This mode is a combination of ESMF_SYNC_BLOCKING and + ESMF_SYNC_NONBLOCKING modes. It provides a default setting + that leads to the typically desirable behavior for pure MPI + components as well as those that share address spaces between PETs. + +

+For a non-threaded, pure MPI component each PET returns + independent of the other PETs. This is generally the expected + behavior in the pure MPI case where calling into a component method is + practically identical to a subroutine call without extra + synchronization between the processes. + +

+In the case where some PETs of the component are running as + threads in shared memory ESMF_SYNC_VASBLOCKING becomes identical + to ESMF_SYNC_BLOCKING within thread groups, to prevent race + conditions, while there is no synchronization between the thread + groups. + +

+

+
ESMF_SYNC_NONBLOCKING
+
Communication calls: The called method will not block but + returns immediately after initiating the requested operation. It is + unsafe to modify or use participating local data before all local + operations have completed. Use the ESMF_VMCommWait() or + ESMF_VMCommQueueWait() method to block the local PET until + local data access is safe again. + +

+Component calls: The behavior of this mode is fundamentally + different for threaded and non-threaded components, + independent on whether the components use shared memory or not. + The ESMF_SYNC_NONBLOCKING mode is the most complex mode for + calling component methods and should only be used if the extra + control, described below, is absolutely necessary. + +

+For non-threaded components (the ESMF default) + calling a component method with ESMF_SYNC_NONBLOCKING + is identical to calling it with ESMF_SYNC_VASBLOCKING. However, + different than for ESMF_SYNC_VASBLOCKING, a call to + ESMF_GridCompWait() or ESMF_CplCompWait() is + required in order to deallocate memory internally allocated for the + ESMF_SYNC_NONBLOCKING mode. + +

+For threaded components the calling PETs + of the parent component will not be blocked and return immediately + after initiating the requested child component method. In this + scenario parent and child components will run concurrently in + identical VASs. This is the most complex mode of operation. + It is unsafe to modify or use VAS local data that + may be accessed by concurrently running components until the child + component method has completed. Use the appropriate + ESMF_GridCompWait() or ESMF_CplCompWait() method to + block the local parent PET until the child component method has + completed in the local VAS. +

+
+ +

+ +

+ +
+54.60 ESMF_TERMORDER +

+DESCRIPTION: +
+Specifies the order of source terms in a destination sum, e.g. during sparse +matrix multiplication. + +

+The type of this flag is: + +

+type(ESMF_TermOrder_Flag) + +

+The valid values are: +

+
ESMF_TERMORDER_SRCSEQ
+
The source terms are in strict ascending order according to + their source sequence index. +
+
ESMF_TERMORDER_SRCPET
+
The source terms are first ordered according to their distribution + across the source side PETs: for each destination PET the source PET + order starts with the localPet and decrements from there, modulo + petCount, until all petCount PETs are accounted for. The term order + within each source PET is given by the source term sequence index. +
+
ESMF_TERMORDER_FREE
+
There is no prescribed term order. The source terms may be summed in + any order that optimizes performance. +
+
+ +

+ +

+ +
+54.61 ESMF_TYPEKIND +

+ +

+DESCRIPTION: +
+Named constants used to indicate type and kind combinations supported by the +overloaded ESMF interfaces. The corresponding Fortran kind-parameter constants +are described in section 54.35. + +

+The type of these named constants is: + +

+type(ESMF_TypeKind_Flag) + +

+The named constants numerical types are: +

+
ESMF_TYPEKIND_I1
+
Indicates 1 byte integer.
+ (Only available if ESMF was built with + ESMF_NO_INTEGER_1_BYTE = FALSE. This is not the default.) +
+
ESMF_TYPEKIND_I2
+
Indicates 2 byte integer.
+ (Only available if ESMF was built with + ESMF_NO_INTEGER_2_BYTE = FALSE. This is not the default.) +
+
ESMF_TYPEKIND_I4
+
Indicates 4 byte integer. +
+
ESMF_TYPEKIND_I8
+
Indicates 8 byte integer. +
+
ESMF_TYPEKIND_R4
+
Indicates 4 byte real. +
+
ESMF_TYPEKIND_R8
+
Indicates 8 byte real. + +

+

+
+ +

+The named constants non-numerical types are: +

+
ESMF_TYPEKIND_LOGICAL
+
Indicates a logical value. +
+
ESMF_TYPEKIND_CHARACTER
+
Indicates a character string. + +

+

+
+ +

+ +

+ +
+54.62 ESMF_UNMAPPEDACTION +

+DESCRIPTION: +
+Indicates what action to take with respect to unmapped destination points +and the entries of the sparse matrix that correspond to these points. + +

+The type of this flag is: + +

+type(ESMF_UnmappedAction_Flag) + +

+The valid values are: +

+
ESMF_UNMAPPEDACTION_ERROR
+
An error is issued when there exist destination points in a regridding + operation that are not mapped by corresponding source points. + +
+
ESMF_UNMAPPEDACTION_IGNORE
+
Destination points which do not have corresponding source points are + ignored and zeros are used for the entries of the sparse matrix + that is generated. +
+
+ +

+ +

+ +
+54.63 ESMF_VERSION +

+ +

+DESCRIPTION: +
+The following named constants define the precise version of ESMF in use. + +

+

+
ESMF_VERSION_BETASNAPSHOT
+
Constant of type logical indicating beta snapshot phase + (.true. for any version during the pre-release development phase, + .false. for any released version of the software). +
+
ESMF_VERSION_MAJOR
+
Constant of type integer indicating the major version number + (e.g. 5 for v5.2.0r). +
+
ESMF_VERSION_MINOR
+
Constant of type integer indicating the minor version number + (e.g. 2 for v5.2.0r). +
+
ESMF_VERSION_PATCHLEVEL
+
Constant of type integer indicating the patch level of a specific + revision (e.g. 0 for v5.2.0r, or 1 for v5.2.0rp1). +
+
ESMF_VERSION_PUBLIC
+
Constant of type logical indicating public vs. internal release + status (e.g. .true. for v5.2.0r, or .false. for v5.2.0). +
+
ESMF_VERSION_REVISION
+
Constant of type integer indicating the revision number + (e.g. 0 for v5.2.0r). +
+
ESMF_VERSION_STRING
+
Constant of type character holding the exact release version string + (e.g. "5.2.0r"). +
+
+ +

+ +

+54.64 ESMF_VMEPOCH +

+This flag is documented in section 51.2.1. + +

+ +

+54.65 ESMF_XGRIDSIDE +

+This flag is documented in section 34.2.1. + +

+ +

+55 Appendix B: A Brief Introduction to UML +

+ +

+The schematic below shows the Unified Modeling Language (UML) notation +for the class diagrams presented in this Reference Manual. For +more on UML, see references such as The Unified Modeling Language +Reference Manual, Rumbaugh et al, [29]. + +

+

+ +\scalebox{0.8}{\includegraphics{Appendix_uml}} +
+ +

+ +

+ +
+56 Appendix C: ESMF Error Return Codes +

+ +

+The tables below show the possible error return codes for Fortran and +C methods. + +

+ +

+ +

+ +

+

+ 
+ =====================================
+ Fortran Symmetric Return Codes 1-500
+ =====================================
+ 
+  ESMF_SUCCESS               0
+  ESMF_RC_OBJ_BAD            1
+  ESMF_RC_OBJ_INIT           2
+  ESMF_RC_OBJ_CREATE         3
+  ESMF_RC_OBJ_COR            4
+  ESMF_RC_OBJ_WRONG          5
+  ESMF_RC_ARG_BAD            6
+  ESMF_RC_ARG_RANK           7
+  ESMF_RC_ARG_SIZE           8
+  ESMF_RC_ARG_VALUE          9
+  ESMF_RC_ARG_DUP           10
+  ESMF_RC_ARG_SAMETYPE      11
+  ESMF_RC_ARG_SAMECOMM      12
+  ESMF_RC_ARG_INCOMP        13
+  ESMF_RC_ARG_CORRUPT       14
+  ESMF_RC_ARG_WRONG         15
+  ESMF_RC_ARG_OUTOFRANGE    16
+  ESMF_RC_ARG_OPT           17
+  ESMF_RC_NOT_IMPL          18
+  ESMF_RC_FILE_OPEN         19
+  ESMF_RC_FILE_CREATE       20
+  ESMF_RC_FILE_READ         21
+  ESMF_RC_FILE_WRITE        22
+  ESMF_RC_FILE_UNEXPECTED   23
+  ESMF_RC_FILE_CLOSE        24
+  ESMF_RC_FILE_ACTIVE       25
+  ESMF_RC_PTR_NULL          26
+  ESMF_RC_PTR_BAD           27
+  ESMF_RC_PTR_NOTALLOC      28
+  ESMF_RC_PTR_ISALLOC       29
+  ESMF_RC_MEM               30
+  ESMF_RC_MEM_ALLOCATE      31
+  ESMF_RC_MEM_DEALLOCATE    32
+  ESMF_RC_MEMC              33
+  ESMF_RC_DUP_NAME          34
+  ESMF_RC_LONG_NAME         35
+  ESMF_RC_LONG_STR          36
+  ESMF_RC_COPY_FAIL         37
+  ESMF_RC_DIV_ZERO          38
+  ESMF_RC_CANNOT_GET        39
+  ESMF_RC_CANNOT_SET        40
+  ESMF_RC_NOT_FOUND         41
+  ESMF_RC_NOT_VALID         42
+  ESMF_RC_INTNRL_LIST       43
+  ESMF_RC_INTNRL_INCONS     44
+  ESMF_RC_INTNRL_BAD        45
+  ESMF_RC_SYS               46
+  ESMF_RC_BUSY              47
+  ESMF_RC_LIB               48
+  ESMF_RC_LIB_NOT_PRESENT   49
+  ESMF_RC_ATTR_UNUSED       50
+  ESMF_RC_OBJ_NOT_CREATED   51
+  ESMF_RC_OBJ_DELETED       52
+  ESMF_RC_NOT_SET           53
+  ESMF_RC_VAL_WRONG         54
+  ESMF_RC_VAL_ERRBOUND      55
+  ESMF_RC_VAL_OUTOFRANGE    56
+  ESMF_RC_ATTR_NOTSET       57
+  ESMF_RC_ATTR_WRONGTYPE    58
+  ESMF_RC_ATTR_ITEMSOFF     59
+  ESMF_RC_ATTR_LINK         60
+  ESMF_RC_BUFFER_SHORT      61
+  ESMF_RC_TIMEOUT           62
+  ESMF_RC_FILE_EXISTS       63
+  ESMF_RC_FILE_NOTDIR       64
+  ESMF_RC_MOAB_ERROR        65
+  ESMF_RC_NOOP              66
+  ESMF_RC_NETCDF_ERROR      67
+ 
+ 68-499 reserved for future Fortran symmetric return code definitions
+ 
+ =====================================
+ C/C++ Symmetric Return Codes 501-999
+ =====================================
+ 
+  ESMC_RC_OBJ_BAD          501
+  ESMC_RC_OBJ_INIT         502
+  ESMC_RC_OBJ_CREATE       503
+  ESMC_RC_OBJ_COR          504
+  ESMC_RC_OBJ_WRONG        505
+  ESMC_RC_ARG_BAD          506
+  ESMC_RC_ARG_RANK         507
+  ESMC_RC_ARG_SIZE         508
+  ESMC_RC_ARG_VALUE        509
+  ESMC_RC_ARG_DUP          510
+  ESMC_RC_ARG_SAMETYPE     511
+  ESMC_RC_ARG_SAMECOMM     512
+  ESMC_RC_ARG_INCOMP       513
+  ESMC_RC_ARG_CORRUPT      514
+  ESMC_RC_ARG_WRONG        515
+  ESMC_RC_ARG_OUTOFRANGE   516
+  ESMC_RC_ARG_OPT          517
+  ESMC_RC_NOT_IMPL         518
+  ESMC_RC_FILE_OPEN        519
+  ESMC_RC_FILE_CREATE      520
+  ESMC_RC_FILE_READ        521
+  ESMC_RC_FILE_WRITE       522
+  ESMC_RC_FILE_UNEXPECTED  523
+  ESMC_RC_FILE_CLOSE       524
+  ESMC_RC_FILE_ACTIVE      525
+  ESMC_RC_PTR_NULL         526
+  ESMC_RC_PTR_BAD          527
+  ESMC_RC_PTR_NOTALLOC     528
+  ESMC_RC_PTR_ISALLOC      529
+  ESMC_RC_MEM              530
+  ESMC_RC_MEM_ALLOCATE     531
+  ESMC_RC_MEM_DEALLOCATE   532
+  ESMC_RC_MEMC             533
+  ESMC_RC_DUP_NAME         534
+  ESMC_RC_LONG_NAME        535
+  ESMC_RC_LONG_STR         536
+  ESMC_RC_COPY_FAIL        537
+  ESMC_RC_DIV_ZERO         538
+  ESMC_RC_CANNOT_GET       539
+  ESMC_RC_CANNOT_SET       540
+  ESMC_RC_NOT_FOUND        541
+  ESMC_RC_NOT_VALID        542
+  ESMC_RC_INTNRL_LIST      543
+  ESMC_RC_INTNRL_INCONS    544
+  ESMC_RC_INTNRL_BAD       545
+  ESMC_RC_SYS              546
+  ESMC_RC_BUSY             547
+  ESMC_RC_LIB              548
+  ESMC_RC_LIB_NOT_PRESENT  549
+  ESMC_RC_ATTR_UNUSED      550
+  ESMC_RC_OBJ_NOT_CREATED  551
+  ESMC_RC_OBJ_DELETED      552
+  ESMC_RC_NOT_SET          553
+  ESMC_RC_VAL_WRONG        554
+  ESMC_RC_VAL_ERRBOUND     555
+  ESMC_RC_VAL_OUTOFRANGE   556
+  ESMC_RC_ATTR_NOTSET      557
+  ESMC_RC_ATTR_WRONGTYPE   558
+  ESMC_RC_ATTR_ITEMSOFF    559
+  ESMC_RC_ATTR_LINK        560
+  ESMC_RC_BUFFER_SHORT     561
+  ESMC_RC_TIMEOUT          562
+  ESMC_RC_FILE_EXISTS      563
+  ESMC_RC_FILE_NOTDIR      564
+  ESMC_RC_MOAB_ERROR       565
+  ESMC_RC_NOOP             566
+  ESMC_RC_NETCDF_ERROR     567
+ 
+ 568-999 reserved for future C/C++ symmetric return code definitions
+ 
+ =====================================
+ C/C++ Non-symmetric Return Codes 1000
+ =====================================
+ 
+  ESMC_RC_OPTARG_BAD      1000
+
+ + +

+ +

+ +
+57 Appendix D: Attribute Class Legacy API +

+Documentation for the legacy ESMF_Attribute Class. It is recommended that users migrate to the ESMF_Info class (see section 40). +
+Notice that a few aspects of the legacy Attribute API have been modified compared to its original implementation. These changes were necessary as a consequence of the changed backend to ESMF_Info: + +
    +
  • The ESMF_AttributeSet() method now supports setting attributes that were not previously added via ESMF_AttributeAdd(). In other words, the ESMF_AttributeAdd() method has become optional. +
  • +
  • There are overloads of the ESMF_AttributeSet() and ESMF_AttributeGet() with optional convention and purpose arguments. Both arguments must either be present or absent. Any other combination is handled as an error condition. For the case that both convention and purpose arguments are absent, and no Attribute Package is specified, the default JSON key prefix is "/ESMF/General". +
  • +
+

+57.1 Constants +

+ +

+ +

+ +
+57.1.1 ESMF_ATTCOPY +

+DEPRECATED CLASS! +
+The entire ESMF_Attribute class has been deprecated and is scheduled for removal with ESMF 9.0.0. This includes all of the class derived types, named constants, and methods. Please use the replacment class ESMF_Info, section 40 instead! +
+

+DESCRIPTION: +
+Indicates which type of copy behavior is used when copying ESMF Attribute objects. + +

+The type of this flag is: + +

+type(ESMF_AttCopy_Flag) + +

+The valid values are: +

+
ESMF_ATTCOPY_REFERENCE
+
The destination Attribute hierarchy becomes a reference copy of + the Attribute hierarchy of the source object. Any further changes to one + will also be reflected in the other. + +
+
ESMF_ATTCOPY_VALUE
+
All of the Attributes and Attribute packages of the source object will be + copied by value to the destination object. None of the Attribute links to + the Attribute hierarchies of other objects are copied to the + destination object. +
+
+ +

+ +

+ +
+57.1.2 ESMF_ATTGETCOUNT +

+DEPRECATED CLASS! +
+The entire ESMF_Attribute class has been deprecated and is scheduled for removal with ESMF 9.0.0. This includes all of the class derived types, named constants, and methods. Please use the replacment class ESMF_Info, section 40 instead! +
+

+DESCRIPTION: +
+Indicates which type of Attribute object count to return. + +

+The type of this flag is: + +

+type(ESMF_AttGetCountFlag) + +

+The valid values are: +

+
ESMF_ATTGETCOUNT_ATTRIBUTE
+
This option will allow the routine to return the number of single Attributes. + +
+
ESMF_ATTGETCOUNT_ATTPACK
+
This option will allow the routine to return the number of Attribute packages. + +
+
ESMF_ATTGETCOUNT_TOTAL
+
This option will allow the routine to return the total number of Attributes. +
+
+ +

+ +

+ +
+57.1.3 ESMF_ATTWRITE +

+DEPRECATED CLASS! +
+The entire ESMF_Attribute class has been deprecated and is scheduled for removal with ESMF 9.0.0. This includes all of the class derived types, named constants, and methods. Please use the replacment class ESMF_Info, section 40 instead! +
+

+DESCRIPTION: +
+Indicates which file format to use in the write operation. + +

+The type of this flag is: + +

+type(ESMF_AttWriteFlag) + +

+The valid values are: +

+
ESMF_ATTWRITE_JSON
+
This option will allow the routine to write in JSON format. +
+
+ +

+57.2 Class API +

+ +

+ +

+ +

+ +

+57.2.1 ESMF_AttributeAdd - Add an ESMF Attribute package +

+ +

+ +

+
+INTERFACE: +

       ! Private name; call using ESMF_AttributeAdd()
+       subroutine ESMF_AttAddPackInfo(info, convention, purpose, attrList, &
+         nestConvention, nestPurpose, attpack, rc)
+
ARGUMENTS: +
       type(<ESMF_Info>),   intent(inout)           :: info
+       character (len = *), intent(in)              :: convention
+       character (len = *), intent(in)              :: purpose
+       character (len = *), intent(in),    optional :: attrList(:)
+       character (len = *), intent(in)     optional :: nestConvention
+       character (len = *), intent(in)     optional :: nestPurpose
+       type(ESMF_AttPack),  intent(out),   optional :: attpack
+       integer,             intent(inout), optional :: rc
+
+STATUS: + DEPRECATED CLASS! +
+The entire ESMF_Attribute class has been deprecated and is scheduled for removal with ESMF 9.0.0. This includes all of the class derived types, named constants, and methods. Please use the replacment class ESMF_Info, section 40 instead! +
+

+DESCRIPTION: +
+ +

+Add an ESMF Attribute package. + +

+The arguments are: +

+
info
+
An ESMF_Info object. + +
+
convention
+
The convention of the new Attribute package. + +
+
purpose
+
The purpose of the new Attribute package. + +
+
[attrList]
+
The list of Attribute names to add to the Attribute package. + +
+
[nestConvention]
+
The convention(s) of the standard Attribute package(s) around + which to nest the new Attribute package. + +
+
[nestPurpose]
+
The purpose(s) of the standard Attribute package(s) around + which to nest the new Attribute package. + +
+
[attpack]
+
An optional handle to the Attribute package that is to be created. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+57.2.2 ESMF_AttributeAdd - Add a nested ESMF Attribute package +

+ +

+ +

+
+INTERFACE: +

       ! Private name; call using ESMF_AttributeAdd()
+       subroutine ESMF_AttAddPackStd(target, convention, purpose, attrList, &
+         nestConvention, nestPurpose, attpack, rc)
+
ARGUMENTS: +
       type(<object>),      intent(inout)           :: target
+       character (len = *), intent(in)              :: convention
+       character (len = *), intent(in)              :: purpose
+       character (len = *), intent(in),    optional :: attrList(:)
+       character (len = *), intent(in)     optional :: nestConvention
+       character (len = *), intent(in)     optional :: nestPurpose
+       type(ESMF_AttPack),  intent(out),   optional :: attpack
+       integer,             intent(inout), optional :: rc
+
+STATUS: + DEPRECATED CLASS! +
+The entire ESMF_Attribute class has been deprecated and is scheduled for removal with ESMF 9.0.0. This includes all of the class derived types, named constants, and methods. Please use the replacment class ESMF_Info, section 40 instead! +
+

+DESCRIPTION: +
+ +

+Add an ESMF Attribute package containing a nested Attribute package. + +

+Supported values for <object> are: +

+
+
ESMF_Array + +
+
+
ESMF_ArrayBundle + +
+
+
ESMF_CplComp + +
+
+
ESMF_GridComp + +
+
+
ESMF_SciComp + +
+
+
ESMF_DistGrid + +
+
+
ESMF_Field + +
+
+
ESMF_FieldBundle + +
+
+
ESMF_Grid + +
+
+
ESMF_State + +
+
+
ESMF_LocStream + +
+
+
ESMF_Mesh + +
+
+ +

+The arguments are: +

+
target
+
An ESMF object. + +
+
convention
+
The convention of the new Attribute package. + +
+
purpose
+
The purpose of the new Attribute package. + +
+
[attrList]
+
The list of Attribute names to add to the Attribute package. + +
+
[nestConvention]
+
The convention(s) of the standard Attribute package(s) around + which to nest the new Attribute package. + +
+
[nestPurpose]
+
The purpose(s) of the standard Attribute package(s) around + which to nest the new Attribute package. + +
+
[attpack]
+
An optional handle to the Attribute package that is to be created. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+57.2.3 ESMF_AttributeCopy - Copy an Attribute hierarchy +

+ +

+ +

+
+INTERFACE: +

       ! Private name; call using ESMF_AttributeCopy()
+       subroutine ESMF_AttributeCopy(src, dst, attcopy, rc)
+
ARGUMENTS: +
       type(<object>),          intent(in)            :: src
+       type(<object>),          intent(inout)         :: dst
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       type(ESMF_AttCopy_Flag), intent(in),  optional :: attcopy
+       integer,                 intent(out), optional :: rc
+
+STATUS: + DEPRECATED CLASS! +
+The entire ESMF_Attribute class has been deprecated and is scheduled for removal with ESMF 9.0.0. This includes all of the class derived types, named constants, and methods. Please use the replacment class ESMF_Info, section 40 instead! +
+

+DESCRIPTION: +
+ +

+Copy an Attribute hierarchy from src to dst. + +

+Supported values for <object> are: +

+
+
ESMF_Array + +
+
+
ESMF_ArrayBundle + +
+
+
ESMF_CplComp + +
+
+
ESMF_GridComp + +
+
+
ESMF_SciComp + +
+
+
ESMF_DistGrid + +
+
+
ESMF_Field + +
+
+
ESMF_FieldBundle + +
+
+
ESMF_Grid + +
+
+
ESMF_State + +
+
+
ESMF_LocStream + +
+
+
ESMF_Mesh + +
+
+ +

+NOTE: Copies between different ESMF object types are not possible. + +

+The arguments are: +

+
src
+
An Attribute-bearing ESMF object. + +
+
dst
+
An Attribute-bearing ESMF object. + +
+
[attcopy]
+
A flag to determine if the copy is by value (the default) or reference. + This flag is documented in section 57.1.1. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+57.2.4 ESMF_AttributeGet - Get an Attribute from an ESMF_AttPack +

+ +

+ +

+
+INTERFACE: +

       subroutine ESMF_AttributeGet(target, name, attpack, <value> &
+         <defaultvalue>, attnestflag, isPresent, rc)
+
ARGUMENTS: +
       type(<object>),         intent(in)              :: target
+       character (len = *),    intent(in)              :: name
+       type(ESMF_AttPack),     intent(inout)           :: attpack
+       <value>, see below for supported values
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       <defaultvalue>, see below for supported values
+       type(ESMF_AttNest_Flag),intent(in),  optional   :: attnestflag
+       logical,                intent(out), optional   :: isPresent
+       integer,                intent(inout), optional :: rc
+
+STATUS: + DEPRECATED CLASS! +
+The entire ESMF_Attribute class has been deprecated and is scheduled for removal with ESMF 9.0.0. This includes all of the class derived types, named constants, and methods. Please use the replacment class ESMF_Info, section 40 instead! +
+

+DESCRIPTION: +
+ +

+Return an Attribute value from the target, or from an Attribute + package on the target, specified by attpack. A defaultvalue + argument may be given if a return code is not desired when the Attribute is + not found. + +

+Supported values for <object> are: +

+
+
ESMF_Array + +
+
+
ESMF_ArrayBundle + +
+
+
ESMF_CplComp + +
+
+
ESMF_GridComp + +
+
+
ESMF_SciComp + +
+
+
ESMF_DistGrid + +
+
+
ESMF_Field + +
+
+
ESMF_FieldBundle + +
+
+
ESMF_Grid + +
+
+
ESMF_State + +
+
+
ESMF_LocStream + +
+
+
ESMF_Mesh + +
+
+ +

+Supported types for <value> and <defaultvalue> are: +

+
+
integer(ESMF_KIND_I4), intent(out) + +
+
+
integer(ESMF_KIND_I8), intent(out) + +
+
+
real (ESMF_KIND_R4), intent(out) + +
+
+
real (ESMF_KIND_R8), intent(out) + +
+
+
logical, intent(out) + +
+
+
character (len = *), intent(out) + +
+
+ +

+The arguments are: +

+
target
+
An ESMF object. + +
+
name
+
The name of the Attribute to retrieve. + +
+
attpack
+
A handle to the Attribute package. + +
+
<value>
+
The value of the named Attribute. + +
+
[<defaultvalue>]
+
The default value of the named Attribute. + +
+
[attnestflag]
+
A flag to determine whether to descend the Attribute hierarchy when + looking for this Attribute, the default is ESMF_ATTNEST_ON. + This flag is documented in section 54.5. + +
+
[isPresent]
+
A logical flag to tell if this Attribute is present or not. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+57.2.5 ESMF_AttributeGet - Get an Attribute from an ESMF_AttPack +

+ +

+ +

+
+INTERFACE: +

       subroutine ESMF_AttributeGet(target, name, attpack, <valueList>, &
+         <defaultvalueList>, attnestflag, itemCount, &
+         isPresent, rc)
+
ARGUMENTS: +
       type(<object>),         intent(in)              :: target
+       character (len = *),    intent(in)              :: name
+       type(ESMF_AttPack),     intent(inout)           :: attpack
+       <valueList>, see below for supported values
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       <defaultvalueList>, see below for supported values
+       type(ESMF_AttNest_Flag),intent(in),  optional   :: attnestflag
+       integer,                intent(out), optional   :: itemCount
+       logical,                intent(out), optional   :: isPresent
+       integer,                intent(inout), optional :: rc
+
+STATUS: + DEPRECATED CLASS! +
+The entire ESMF_Attribute class has been deprecated and is scheduled for removal with ESMF 9.0.0. This includes all of the class derived types, named constants, and methods. Please use the replacment class ESMF_Info, section 40 instead! +
+

+DESCRIPTION: +
+ +

+Return an Attribute valueList from the target, or from an + Attribute package on the target, specified by attpack. A + defaultvalueList list argument may be given if a return code is not + desired when the Attribute is not found. + +

+Supported values for <object> are: +

+
+
ESMF_Array + +
+
+
ESMF_ArrayBundle + +
+
+
ESMF_CplComp + +
+
+
ESMF_GridComp + +
+
+
ESMF_SciComp + +
+
+
ESMF_DistGrid + +
+
+
ESMF_Field + +
+
+
ESMF_FieldBundle + +
+
+
ESMF_Grid + +
+
+
ESMF_State + +
+
+
ESMF_LocStream + +
+
+
ESMF_Mesh + +
+
+ +

+Supported types for <valueList> and <defaultvalueList> are: +

+
+
integer(ESMF_KIND_I4), intent(out), dimension(:) + +
+
+
integer(ESMF_KIND_I8), intent(out), dimension(:) + +
+
+
real(ESMF_KIND_R4), intent(out), dimension(:) + +
+
+
real(ESMF_KIND_R8), intent(out), dimension(:) + +
+
+
logical, intent(out), dimension(:) + +
+
+
character(len=*), intent(out), dimension(:) + +
+
+ +

+The arguments are: +

+
target
+
An ESMF object. + +
+
name
+
The name of the Attribute to retrieve. + +
+
attpack
+
A handle to the Attribute package. + +
+
<valueList>
+
The valueList of the named Attribute. + +
+
[<defaultvalueList>]
+
The default value list of the named Attribute. + +
+
[attnestflag]
+
A flag to determine whether to descend the Attribute hierarchy when + looking for this Attribute, the default is ESMF_ATTNEST_ON. + This flag is documented in section 54.5. + +
+
[itemCount]
+
The number of items in a multi-valued Attribute. + +
+
[isPresent]
+
A logical flag to tell if this Attribute is present or not. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+57.2.6 ESMF_AttributeGet - Get an Attribute +

+ +

+ +

+
+INTERFACE: +

       subroutine ESMF_AttributeGet(target, name, <value>, <defaultvalue>, &
+         convention, purpose, attnestflag, isPresent, rc)
+
ARGUMENTS: +
       type(<object>),         intent(in)              :: target
+       character (len = *),    intent(in)              :: name
+       <value>, see below for supported values
+       <defaultvalue>, see below for supported values
+       character (len = *),    intent(in),    optional :: convention
+       character (len = *),    intent(in),    optional :: purpose
+       type(ESMF_AttNest_Flag),intent(in),    optional :: attnestflag
+       logical,                intent(out),   optional :: isPresent
+       integer,                intent(inout), optional :: rc
+
+STATUS: + The following parameters were removed in ESMF version 8.1.0: + +
    +
  • attPackInstanceName + +
  • +
+ +

+STATUS: + DEPRECATED CLASS! +
+The entire ESMF_Attribute class has been deprecated and is scheduled for removal with ESMF 9.0.0. This includes all of the class derived types, named constants, and methods. Please use the replacment class ESMF_Info, section 40 instead! +
+

+DESCRIPTION: +
+ +

+Return an Attribute value from the target, or from an Attribute + package on the target, specified by convention and purpose. + A defaultvalue argument may be given if a return code is not desired + when the Attribute is not found. + +

+Supported values for <object> are: +

+
+
ESMF_Array + +
+
+
ESMF_ArrayBundle + +
+
+
ESMF_CplComp + +
+
+
ESMF_GridComp + +
+
+
ESMF_SciComp + +
+
+
ESMF_DistGrid + +
+
+
ESMF_Field + +
+
+
ESMF_FieldBundle + +
+
+
ESMF_Grid + +
+
+
ESMF_State + +
+
+
ESMF_LocStream + +
+
+
ESMF_Mesh + +
+
+ +

+Supported types for <value> and <defaultvalue> are: +

+
+
integer(ESMF_KIND_I4), intent(out) + +
+
+
integer(ESMF_KIND_I8), intent(out) + +
+
+
real (ESMF_KIND_R4), intent(out) + +
+
+
real (ESMF_KIND_R8), intent(out) + +
+
+
logical, intent(out) + +
+
+
character (len = *), intent(out) + +
+
+ +

+The arguments are: +

+
target
+
An ESMF object. + +
+
name
+
The name of the Attribute to retrieve. + +
+
<value>
+
The value of the named Attribute. + +
+
[<defaultvalue>]
+
The default value of the named Attribute. + +
+
[convention]
+
The convention of the Attribute package. + +
+
[purpose]
+
The purpose of the Attribute package. + +
+
[attnestflag]
+
A flag to determine whether to descend the + Attribute hierarchy when looking for this Attribute, the default + is ESMF_ATTNEST_ON. This flag is documented in section + 54.5. + +
+
[isPresent]
+
A logical flag to tell if this Attribute is present or not. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+57.2.7 ESMF_AttributeGet - Get an Attribute +

+ +

+ +

+
+INTERFACE: +

       subroutine ESMF_AttributeGet(target, name, <valueList>, <defaultvalueList>, &
+         convention, purpose, attnestflag, itemCount, isPresent, rc)
+
ARGUMENTS: +
       type(<object>),         intent(in)              :: target
+       character (len = *),    intent(in)              :: name
+       <valueList>, see below for supported values
+       <defaultvalueList>, see below for supported values
+       character (len = *),    intent(in),    optional :: convention
+       character (len = *),    intent(in),    optional :: purpose
+       type(ESMF_AttNest_Flag),intent(in),    optional :: attnestflag
+       integer,                intent(out),   optional :: itemCount
+       logical,                intent(out),   optional :: isPresent
+       integer,                intent(inout), optional :: rc
+
+STATUS: + The following parameters were removed in ESMF version 8.1.0: + +
    +
  • attPackInstanceName + +
  • +
+ +

+STATUS: + DEPRECATED CLASS! +
+The entire ESMF_Attribute class has been deprecated and is scheduled for removal with ESMF 9.0.0. This includes all of the class derived types, named constants, and methods. Please use the replacment class ESMF_Info, section 40 instead! +
+

+DESCRIPTION: +
+ +

+Return an Attribute valueList from the target, or from an + Attribute package on the target, specified by convention + and purpose. A defaultvalueList list argument may be given if + a return code is not desired when the Attribute is not found. + +

+Supported values for <object> are: +

+
+
ESMF_Array + +
+
+
ESMF_ArrayBundle + +
+
+
ESMF_CplComp + +
+
+
ESMF_GridComp + +
+
+
ESMF_SciComp + +
+
+
ESMF_DistGrid + +
+
+
ESMF_Field + +
+
+
ESMF_FieldBundle + +
+
+
ESMF_Grid + +
+
+
ESMF_State + +
+
+
ESMF_LocStream + +
+
+
ESMF_Mesh + +
+
+ +

+Supported types for <valueList> and <defaultvalueList> are: +

+
+
integer(ESMF_KIND_I4), intent(out), dimension(:) + +
+
+
integer(ESMF_KIND_I8), intent(out), dimension(:) + +
+
+
real(ESMF_KIND_R4), intent(out), dimension(:) + +
+
+
real(ESMF_KIND_R8), intent(out), dimension(:) + +
+
+
logical, intent(out), dimension(:) + +
+
+
character(len=*), intent(out), dimension(:) + +
+
+ +

+The arguments are: +

+
target
+
An ESMF object. + +
+
name
+
The name of the Attribute to retrieve. + +
+
<valueList>
+
The valueList of the named Attribute. + +
+
[<defaultvalueList>]
+
The default value list of the named Attribute. + +
+
[convention]
+
The convention of the Attribute package. + +
+
[purpose]
+
The purpose of the Attribute package. + +
+
[attnestflag]
+
A flag to determine whether to descend the + Attribute hierarchy when looking for this Attribute, the default + is ESMF_ATTNEST_ON. This flag is documented in section + 54.5. + +
+
[itemCount]
+
The number of items in a multi-valued Attribute. + +
+
[isPresent]
+
A logical flag to tell if this Attribute is present or not. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+57.2.8 ESMF_AttributeGet - Get the Attribute count from an ESMF_AttPack +

+ +

+ +

+
+INTERFACE: +

       ! Private name; call using ESMF_AttributeGet()
+       subroutine ESMF_AttributeGetCount(target, attpack, count, &
+                                         attcountflag, attnestflag, rc)
+
ARGUMENTS: +
       type(<object>),             intent(in)              :: target
+       type(ESMF_AttPack),         intent(inout)           :: attpack
+       integer,                    intent(inout)           :: count
+       type(ESMF_AttGetCountFlag), intent(in),    optional :: attcountflag
+       type(ESMF_AttNest_Flag),    intent(in),    optional :: attnestflag
+       integer,                    intent(inout), optional :: rc
+
+STATUS: + DEPRECATED CLASS! +
+The entire ESMF_Attribute class has been deprecated and is scheduled for removal with ESMF 9.0.0. This includes all of the class derived types, named constants, and methods. Please use the replacment class ESMF_Info, section 40 instead! +
+

+DESCRIPTION: +
+ +

+Return the Attribute count for target. + +

+Supported values for <object> are: +

+
+
ESMF_Array + +
+
+
ESMF_ArrayBundle + +
+
+
ESMF_CplComp + +
+
+
ESMF_GridComp + +
+
+
ESMF_SciComp + +
+
+
ESMF_DistGrid + +
+
+
ESMF_Field + +
+
+
ESMF_FieldBundle + +
+
+
ESMF_Grid + +
+
+
ESMF_State + +
+
+
ESMF_LocStream + +
+
+
ESMF_Mesh + +
+
+ +

+The arguments are: +

+
target
+
An ESMF object. + +
+
attpack
+
A handle to the Attribute package. + +
+
count
+
The number of all existing Attributes of the type designated in the + attcountflag, not just Attribute that have been set. + +
+
[attcountflag]
+
The flag to specify which attribute count to return, the + default is ESMF_ATTGETCOUNT_ATTRIBUTE. This flag is documented + in section 57.1.2. + +
+
[attnestflag]
+
A flag to determine whether to descend the + Attribute hierarchy when looking for this Attribute, the default + is ESMF_ATTNEST_ON. This flag is documented in section + 54.5. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+57.2.9 ESMF_AttributeGet - Get the Attribute count +

+ +

+ +

+
+INTERFACE: +

       ! Private name; call using ESMF_AttributeGet()
+       subroutine ESMF_AttributeGetCount(target, count, convention, purpose, &
+         attcountflag, attnestflag, rc)
+
ARGUMENTS: +
       type(<object>),             intent(in)              :: target
+       integer,                    intent(inout)           :: count
+       character (len=*),          intent(in),    optional :: convention
+       character (len=*),          intent(in),    optional :: purpose
+       type(ESMF_AttGetCountFlag), intent(in),    optional :: attcountflag
+       type(ESMF_AttNest_Flag),    intent(in),    optional :: attnestflag
+       integer,                    intent(inout), optional :: rc
+
+STATUS: + The following parameters were removed in ESMF version 8.1.0: + +
    +
  • attPackInstanceName + +
  • +
+ +

+STATUS: + DEPRECATED CLASS! +
+The entire ESMF_Attribute class has been deprecated and is scheduled for removal with ESMF 9.0.0. This includes all of the class derived types, named constants, and methods. Please use the replacment class ESMF_Info, section 40 instead! +
+

+DESCRIPTION: +
+ +

+Return the Attribute count for target. + +

+Supported values for <object> are: +

+
+
ESMF_Array + +
+
+
ESMF_ArrayBundle + +
+
+
ESMF_CplComp + +
+
+
ESMF_GridComp + +
+
+
ESMF_SciComp + +
+
+
ESMF_DistGrid + +
+
+
ESMF_Field + +
+
+
ESMF_FieldBundle + +
+
+
ESMF_Grid + +
+
+
ESMF_State + +
+
+
ESMF_LocStream + +
+
+
ESMF_Mesh + +
+
+ +

+The arguments are: +

+
target
+
An ESMF object. + +
+
count
+
The number of all existing Attributes of the type designated in the + attcountflag, not just Attribute that have been set. + +
+
[convention]
+
The convention of the Attribute package. + +
+
[purpose]
+
The purpose of the Attribute package. + +
+
[attcountflag]
+
The flag to specify which attribute count to return, the + default is ESMF_ATTGETCOUNT_ATTRIBUTE. This flag is documented + in section 57.1.2. + +
+
[attnestflag]
+
A flag to determine whether to descend the + Attribute hierarchy when looking for this Attribute, the default + is ESMF_ATTNEST_ON. This flag is documented in section + 54.5. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+57.2.10 ESMF_AttributeGet - Get Attribute info by name from an ESMF_AttPack +

+ +

+ +

+
+INTERFACE: +

       ! Private name; call using ESMF_AttributeGet()
+       subroutine ESMF_AttributeGetInfoByNamAP(target, name, attpack, &
+         attnestflag, typekind, itemCount, isPresent, rc)
+
ARGUMENTS: +
       type(<object>),           intent(in)              :: target
+       character (len = *),      intent(in)              :: name
+       type(ESMF_AttPack),       intent(inout)           :: attpack
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       type(ESMF_AttNest_Flag),  intent(in),    optional :: attnestflag
+       type(ESMF_TypeKind_Flag), intent(out),   optional :: typekind
+       integer,                  intent(out),   optional :: itemCount
+       logical,                  intent(out),   optional :: isPresent
+       integer,                  intent(inout), optional :: rc
+
+STATUS: + DEPRECATED CLASS! +
+The entire ESMF_Attribute class has been deprecated and is scheduled for removal with ESMF 9.0.0. This includes all of the class derived types, named constants, and methods. Please use the replacment class ESMF_Info, section 40 instead! +
+

+DESCRIPTION: +
+ +

+Return information associated with an Attribute in an Attribute package, + including typekind and itemCount. + +

+Supported values for <object> are: +

+
+
ESMF_Array + +
+
+
ESMF_ArrayBundle + +
+
+
ESMF_CplComp + +
+
+
ESMF_GridComp + +
+
+
ESMF_SciComp + +
+
+
ESMF_DistGrid + +
+
+
ESMF_Field + +
+
+
ESMF_FieldBundle + +
+
+
ESMF_Grid + +
+
+
ESMF_State + +
+
+
ESMF_LocStream + +
+
+
ESMF_Mesh + +
+
+ +

+The arguments are: +

+
target
+
An ESMF object. + +
+
name
+
The name of the Attribute to query. + +
+
attpack
+
A handle to the Attribute package. + +
+
[attnestflag]
+
A flag to determine whether to descend the + Attribute hierarchy when looking for this Attribute, the default + is ESMF_ATTNEST_ON. This flag is documented in section + 54.5. + +
+
[typekind]
+
The typekind of the Attribute. This flag is documented in section + 54.61. + +
+
[itemCount]
+
The number of items in this Attribute. + +
+
[isPresent]
+
A logical flag to tell if this Attribute is present or not. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+57.2.11 ESMF_AttributeGet - Get Attribute info by name +

+ +

+ +

+
+INTERFACE: +

       ! Private name; call using ESMF_AttributeGet()
+       subroutine ESMF_AttributeGetInfoByNam(target, name, &
+         convention, purpose, attnestflag, typekind, itemCount, isPresent, rc)
+
ARGUMENTS: +
       type(<object>),           intent(in)              :: target
+       character (len = *),      intent(in)              :: name
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       character (len=*),        intent(in),    optional :: convention
+       character (len=*),        intent(in),    optional :: purpose
+       type(ESMF_AttNest_Flag),  intent(in),    optional :: attnestflag
+       type(ESMF_TypeKind_Flag), intent(out),   optional :: typekind
+       integer,                  intent(out),   optional :: itemCount
+       logical,                  intent(out),   optional :: isPresent
+       integer,                  intent(inout), optional :: rc
+
+STATUS: + The following parameters were removed in ESMF version 8.1.0: + +
    +
  • attPackInstanceName + +
  • +
+ +

+STATUS: + DEPRECATED CLASS! +
+The entire ESMF_Attribute class has been deprecated and is scheduled for removal with ESMF 9.0.0. This includes all of the class derived types, named constants, and methods. Please use the replacment class ESMF_Info, section 40 instead! +
+

+DESCRIPTION: +
+ +

+Return information associated with the named Attribute, + including typekind and itemCount. + +

+Supported values for <object> are: +

+
+
ESMF_Array + +
+
+
ESMF_ArrayBundle + +
+
+
ESMF_CplComp + +
+
+
ESMF_GridComp + +
+
+
ESMF_SciComp + +
+
+
ESMF_DistGrid + +
+
+
ESMF_Field + +
+
+
ESMF_FieldBundle + +
+
+
ESMF_Grid + +
+
+
ESMF_State + +
+
+
ESMF_LocStream + +
+
+
ESMF_Mesh + +
+
+ +

+The arguments are: +

+
target
+
An ESMF object. + +
+
name
+
The name of the Attribute to query. + +
+
[convention]
+
The convention of the Attribute package. + +
+
[purpose]
+
The purpose of the Attribute package. + +
+
[attnestflag]
+
A flag to determine whether to descend the + Attribute hierarchy when looking for this Attribute, the default + is ESMF_ATTNEST_ON. This flag is documented in section + 54.5. + +
+
[typekind]
+
The typekind of the Attribute. This flag is documented in section + 54.61. + +
+
[itemCount]
+
The number of items in this Attribute. + +
+
[isPresent]
+
A logical flag to tell if this Attribute is present or not. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+57.2.12 ESMF_AttributeGet - Get Attribute info by index number +

+ +

+ +

+
+INTERFACE: +

       ! Private name; call using ESMF_AttributeGet()
+       subroutine ESMF_AttributeGetInfoByNum(target, attributeIndex, &
+         name, convention, purpose, attnestflag, typekind, itemcount, isPresent, &
+         rc)
+
ARGUMENTS: +
       type(<object>),           intent(in)              :: target
+       integer,                  intent(in)              :: attributeIndex
+       character (len = *),      intent(out)             :: name
+       character (len = *),      intent(in),    optional :: convention
+       character (len = *),      intent(in),    optional :: purpose
+       type(ESMF_AttNest_Flag),  intent(in),    optional :: attnestflag
+       type(ESMF_TypeKind_Flag), intent(out),   optional :: typekind
+       integer,                  intent(out),   optional :: itemCount
+       logical,                  intent(out),   optional :: isPresent
+       integer,                  intent(inout), optional :: rc
+
+STATUS: + The following parameters were removed in ESMF version 8.1.0: + +
    +
  • attPackInstanceName + +
  • +
+ +

+STATUS: + DEPRECATED CLASS! +
+The entire ESMF_Attribute class has been deprecated and is scheduled for removal with ESMF 9.0.0. This includes all of the class derived types, named constants, and methods. Please use the replacment class ESMF_Info, section 40 instead! +
+

+DESCRIPTION: +
+ +

+Returns information associated with the indexed Attribute, + including name, typekind and itemCount. Keep in + mind that these indices start from 1, as expected in a Fortran API. + +

+Supported values for <object> are: +

+
+
ESMF_Array + +
+
+
ESMF_ArrayBundle + +
+
+
ESMF_CplComp + +
+
+
ESMF_GridComp + +
+
+
ESMF_SciComp + +
+
+
ESMF_DistGrid + +
+
+
ESMF_Field + +
+
+
ESMF_FieldBundle + +
+
+
ESMF_Grid + +
+
+
ESMF_State + +
+
+
ESMF_LocStream + +
+
+
ESMF_Mesh + +
+
+ +

+The arguments are: +

+
target
+
An ESMF object. + +
+
attributeIndex
+
The index number of the Attribute to query. + +
+
name
+
The name of the Attribute. + +
+
[convention]
+
The convention of the Attribute package. + +
+
[purpose]
+
The purpose of the Attribute package. + +
+
[attnestflag]
+
A flag to determine whether to descend the + Attribute hierarchy when looking for this Attribute, the default + is ESMF_ATTNEST_ON. This flag is documented in section + 54.5. + +
+
[typekind]
+
The typekind of the Attribute. This flag is documented in section + 54.61. + +
+
[itemCount]
+
The number of items in this Attribute. + +
+
[isPresent]
+
A logical flag to tell if this Attribute is present or not. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+57.2.13 ESMF_AttributeGetAttPack - Get an ESMF Attribute package object and/or query for presence +

+ +

+ +

+
+INTERFACE: +

       ! Private name; call using ESMF_AttributeGetAttPack()
+       subroutine ESMF_AttGetAttPack(target, convention, purpose, &
+         attpack, attnestflag, isPresent, rc)
+
ARGUMENTS: +
       type(<object>),          intent(in)               :: target
+       character (len = *),     intent(in)               :: convention
+       character (len = *),     intent(in)               :: purpose
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       type(ESMF_AttPack),      intent(inout),  optional :: attpack
+       type(ESMF_AttNest_Flag), intent(in),     optional :: attnestflag
+       logical,                 intent(out),    optional :: isPresent
+       integer,                 intent(out),    optional :: rc
+
+STATUS: + The following parameters were removed in ESMF version 8.1.0: + +
    +
  • attPackInstanceName + +
  • +
+ +

+STATUS: + DEPRECATED CLASS! +
+The entire ESMF_Attribute class has been deprecated and is scheduled for removal with ESMF 9.0.0. This includes all of the class derived types, named constants, and methods. Please use the replacment class ESMF_Info, section 40 instead! +
+

+DESCRIPTION: +
+ +

+Get an ESMF Attribute package object. + +

+Supported values for <object> are: +

+
+
ESMF_Array + +
+
+
ESMF_ArrayBundle + +
+
+
ESMF_CplComp + +
+
+
ESMF_GridComp + +
+
+
ESMF_SciComp + +
+
+
ESMF_DistGrid + +
+
+
ESMF_Field + +
+
+
ESMF_FieldBundle + +
+
+
ESMF_Grid + +
+
+
ESMF_State + +
+
+
ESMF_LocStream + +
+
+
ESMF_Mesh + +
+
+ +

+The arguments are: +

+
<object>
+
An ESMF object. + +
+
convention
+
The convention of the Attribute package. + +
+
purpose
+
The purpose of the Attribute package. + +
+
[attpack]
+
A handle to the Attribute package. + +
+
[attnestflag]
+
A flag to determine whether to descend the + Attribute hierarchy when searching for this Attribute package, the + default is ESMF_ATTNEST_ON. This flag is documented in + section 54.5. + +
+
[isPresent]
+
A logical flag to tell if this Attribute package is present or not. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+57.2.14 ESMF_AttributeRemove - Remove an Attribute or Attribute package using an ESMF_AttPack +

+ +

+ +

+
+INTERFACE: +

       subroutine ESMF_AttributeRemove(target, name, &
+         attpack, attnestflag, rc)
+
ARGUMENTS: +
       type(<object>),          intent(inout)           :: target
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       character (len = *),     intent(in),    optional :: name
+       type(ESMF_AttPack),      intent(inout), optional :: attpack
+       type(ESMF_AttNest_Flag), intent(in),    optional :: attnestflag
+       integer,                 intent(inout), optional :: rc
+
+STATUS: + DEPRECATED CLASS! +
+The entire ESMF_Attribute class has been deprecated and is scheduled for removal with ESMF 9.0.0. This includes all of the class derived types, named constants, and methods. Please use the replacment class ESMF_Info, section 40 instead! +
+

+DESCRIPTION: +
+ +

+Remove an Attribute, or Attribute package on target. + +

+Supported values for <object> are: +

+
+
ESMF_Array + +
+
+
ESMF_ArrayBundle + +
+
+
ESMF_CplComp + +
+
+
ESMF_GridComp + +
+
+
ESMF_SciComp + +
+
+
ESMF_DistGrid + +
+
+
ESMF_Field + +
+
+
ESMF_FieldBundle + +
+
+
ESMF_Grid + +
+
+
ESMF_State + +
+
+
ESMF_LocStream + +
+
+
ESMF_Mesh + +
+
+ +

+The arguments are: +

+
target
+
An ESMF object. + +
+
[name]
+
The name of the Attribute to remove. + +
+
attpack
+
A handle to the Attribute package. + +
+
[attnestflag]
+
A flag to determine whether to descend the + Attribute hierarchy when searching for this Attribute package, the + default is ESMF_ATTNEST_ON. This flag is documented in + section 54.5. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+NOTE: An entire Attribute package can be removed by specifying + attpack only, without name. By specifying + attpack an Attribute will be removed + from the corresponding Attribute package, if it exists. An + Attribute can be removed directly from target by specifying + name, without attpack. + +

+ +

+ +

+57.2.15 ESMF_AttributeRemove - Remove an Attribute or Attribute package +

+ +

+ +

+
+INTERFACE: +

       subroutine ESMF_AttributeRemove(target, name, convention, purpose, &
+         attnestflag, rc)
+
ARGUMENTS: +
       type(<object>),          intent(inout)           :: target
+       character (len = *),     intent(in),    optional :: name
+       character (len = *),     intent(in),    optional :: convention
+       character (len = *),     intent(in),    optional :: purpose
+       type(ESMF_AttNest_Flag), intent(in),    optional :: attnestflag
+       integer,                 intent(inout), optional :: rc
+
+STATUS: + The following parameters were removed in ESMF version 8.1.0: + +
    +
  • attPackInstanceName + +
  • +
+ +

+STATUS: + DEPRECATED CLASS! +
+The entire ESMF_Attribute class has been deprecated and is scheduled for removal with ESMF 9.0.0. This includes all of the class derived types, named constants, and methods. Please use the replacment class ESMF_Info, section 40 instead! +
+

+DESCRIPTION: +
+ +

+Remove an Attribute, or Attribute package on target. + +

+Supported values for <object> are: +

+
+
ESMF_Array + +
+
+
ESMF_ArrayBundle + +
+
+
ESMF_CplComp + +
+
+
ESMF_GridComp + +
+
+
ESMF_SciComp + +
+
+
ESMF_DistGrid + +
+
+
ESMF_Field + +
+
+
ESMF_FieldBundle + +
+
+
ESMF_Grid + +
+
+
ESMF_State + +
+
+
ESMF_LocStream + +
+
+
ESMF_Mesh + +
+
+ +

+The arguments are: +

+
target
+
An ESMF object. + +
+
[name]
+
The name of the Attribute to remove. + +
+
[convention]
+
The convention of the Attribute package. + +
+
[purpose]
+
The purpose of the Attribute package. + +
+
[attnestflag]
+
A flag to determine whether to descend the + Attribute hierarchy when searching for this Attribute package, the + default is ESMF_ATTNEST_ON. This flag is documented in + section 54.5. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+NOTE: An entire Attribute package can be removed by specifying + convention, purpose, and attPackInstanceName + only, without name. An + Attribute can be removed directly from <object> by specifying + name, without convention, purpose, and + attPackInstanceName. + +

+ +

+ +

+57.2.16 ESMF_AttributeSet - Set an Attribute in an ESMF_AttPack +

+ +

+ +

+
+INTERFACE: +

       subroutine ESMF_AttributeSet(target, name, <value>, attpack, &
+         itemcount, attnestflag, rc)
+
ARGUMENTS: +
       type(<object>),          intent(in)              :: target
+       character (len = *),     intent(in)              :: name
+       <value>, see below for supported values
+       type(ESMF_AttPack),      intent(inout)           :: attpack
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       integer,                 intent(in),    optional :: itemcount
+       type(ESMF_AttNest_Flag), intent(in),    optional :: attnestflag
+       integer,                 intent(inout), optional :: rc
+
+STATUS: + DEPRECATED CLASS! +
+The entire ESMF_Attribute class has been deprecated and is scheduled for removal with ESMF 9.0.0. This includes all of the class derived types, named constants, and methods. Please use the replacment class ESMF_Info, section 40 instead! +
+

+DESCRIPTION: +
+ +

+Attach an Attribute to target, or set an Attribute in an + Attribute package. The Attribute has a name and value, + and, if in an Attribute package, a attpack. + +

+The itemcount and attnestflag are NOOP. The + target is a NOOP if the attpack is used. + +

+Supported values for <object> are: +

+
+
ESMF_Array + +
+
+
ESMF_ArrayBundle + +
+
+
ESMF_CplComp + +
+
+
ESMF_GridComp + +
+
+
ESMF_SciComp + +
+
+
ESMF_DistGrid + +
+
+
ESMF_Field + +
+
+
ESMF_FieldBundle + +
+
+
ESMF_Grid + +
+
+
ESMF_State + +
+
+
ESMF_LocStream + +
+
+
ESMF_Mesh + +
+
+ +

+Supported types for <value> and <defaultvalue> are: +

+
+
integer(ESMF_KIND_I4), intent(out) + +
+
+
integer(ESMF_KIND_I8), intent(out) + +
+
+
real (ESMF_KIND_R4), intent(out) + +
+
+
real (ESMF_KIND_R8), intent(out) + +
+
+
logical, intent(out) + +
+
+
character (len = *), intent(out) + +
+
+ +

+The arguments are: +

+
target
+
An ESMF object. + +
+
name
+
The name of the Attribute to set. + +
+
<value>
+
The value of the Attribute to set. + +
+
attpack
+
A handle to the Attribute package. + +
+
[itemcount]
+
This parameter is only included for backward compatibility, it is NOOP. + +
+
[attnestflag]
+
This parameter is only included for backward compatibility, it is NOOP. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+57.2.17 ESMF_AttributeSet - Set an Attribute in an ESMF_AttPack +

+ +

+ +

+
+INTERFACE: +

       subroutine ESMF_AttributeSet(target, name, <valueList>, attpack, &
+         itemCount,  attnestflag, rc)
+
ARGUMENTS: +
       type(<object>),          intent(in)              :: target
+       character (len = *),     intent(in)              :: name
+       <valueList>, see below for supported values
+       type(ESMF_AttPack),      intent(inout)           :: attpack
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+       integer,                 intent(in),    optional :: itemcount
+       type(ESMF_AttNest_Flag), intent(in),    optional :: attnestflag
+       integer,                 intent(inout), optional :: rc
+
+STATUS: + DEPRECATED CLASS! +
+The entire ESMF_Attribute class has been deprecated and is scheduled for removal with ESMF 9.0.0. This includes all of the class derived types, named constants, and methods. Please use the replacment class ESMF_Info, section 40 instead! +
+

+DESCRIPTION: +
+ +

+Attach an Attribute to target, or set an Attribute in an + Attribute package. The Attribute has a name and a + valueList, with an itemCount, and, if in an Attribute + package, a attpack. + +

+The itemcount and attnestflag are NOOP. The + target is a NOOP if the attpack is used. + +

+Supported values for <object> are: +

+
+
ESMF_Array + +
+
+
ESMF_ArrayBundle + +
+
+
ESMF_CplComp + +
+
+
ESMF_GridComp + +
+
+
ESMF_SciComp + +
+
+
ESMF_DistGrid + +
+
+
ESMF_Field + +
+
+
ESMF_FieldBundle + +
+
+
ESMF_Grid + +
+
+
ESMF_State + +
+
+
ESMF_LocStream + +
+
+
ESMF_Mesh + +
+
+ +

+Supported types for <valueList> and <defaultvalueList> are: +

+
+
integer(ESMF_KIND_I4), intent(out), dimension(:) + +
+
+
integer(ESMF_KIND_I8), intent(out), dimension(:) + +
+
+
real(ESMF_KIND_R4), intent(out), dimension(:) + +
+
+
real(ESMF_KIND_R8), intent(out), dimension(:) + +
+
+
logical, intent(out), dimension(:) + +
+
+
character(len=*), intent(out), dimension(:) + +
+
+ +

+The arguments are: +

+
target
+
An ESMF object. + +
+
name
+
The name of the Attribute to set. + +
+
<valueList>
+
The valueList of the Attribute to set. + +
+
attpack
+
A handle to the Attribute package. + +
+
[itemcount]
+
This parameter is only included for backward compatibility, it is NOOP. + +
+
[attnestflag]
+
This parameter is only included for backward compatibility, it is NOOP. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+57.2.18 ESMF_AttributeSet - Set an Attribute +

+ +

+ +

+
+INTERFACE: +

       subroutine ESMF_AttributeSet(target, name, <value>, &
+         convention, purpose, itemcount, attnestflag, rc)
+
ARGUMENTS: +
       type(<object>),          intent(inout)           :: target
+       character (len = *),     intent(in)              :: name
+       <value>, see below for supported values
+       character (len = *),     intent(in),    optional :: convention
+       character (len = *),     intent(in),    optional :: purpose
+       integer,                 intent(in),    optional :: itemcount
+       type(ESMF_AttNest_Flag), intent(in),    optional :: attnestflag
+       integer,                 intent(inout), optional :: rc
+
+STATUS: + The following parameters were removed in ESMF version 8.1.0: + +
    +
  • attPackInstanceName + +
  • +
+ +

+STATUS: + DEPRECATED CLASS! +
+The entire ESMF_Attribute class has been deprecated and is scheduled for removal with ESMF 9.0.0. This includes all of the class derived types, named constants, and methods. Please use the replacment class ESMF_Info, section 40 instead! +
+

+DESCRIPTION: +
+ +

+Attach an Attribute to target, or set an Attribute in an + Attribute package. The Attribute has a name and value, + and, if in an Attribute package, convention and purpose. + +

+The itemcount and attnestflag are NOOP. + +

+Supported values for <object> are: +

+
+
ESMF_Array + +
+
+
ESMF_ArrayBundle + +
+
+
ESMF_CplComp + +
+
+
ESMF_GridComp + +
+
+
ESMF_SciComp + +
+
+
ESMF_DistGrid + +
+
+
ESMF_Field + +
+
+
ESMF_FieldBundle + +
+
+
ESMF_Grid + +
+
+
ESMF_State + +
+
+
ESMF_LocStream + +
+
+
ESMF_Mesh + +
+
+ +

+Supported types for <value> and <defaultvalue> are: +

+
+
integer(ESMF_KIND_I4), intent(out) + +
+
+
integer(ESMF_KIND_I8), intent(out) + +
+
+
real (ESMF_KIND_R4), intent(out) + +
+
+
real (ESMF_KIND_R8), intent(out) + +
+
+
logical, intent(out) + +
+
+
character (len = *), intent(out) + +
+
+ +

+The arguments are: +

+
target
+
An ESMF object. + +
+
name
+
The name of the Attribute to set. + +
+
<value argument>
+
The value of the Attribute to set. + +
+
[convention]
+
The convention of the Attribute package. + +
+
[purpose]
+
The purpose of the Attribute package. + +
+
[itemcount]
+
This parameter is only included for backward compatibility, it is NOOP. + +
+
[attnestflag]
+
This parameter is only included for backward compatibility, it is NOOP. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+57.2.19 ESMF_AttributeSet - Set an Attribute +

+ +

+ +

+
+INTERFACE: +

       subroutine ESMF_AttributeSet(target, name, <valueList>, &
+         convention, purpose, itemCount, attnestflag, rc)
+
ARGUMENTS: +
       type(<object>),          intent(inout)           :: target
+       character (len = *),     intent(in)              :: name
+       <valueList>, see below for supported values
+       character (len = *),     intent(in),    optional :: convention
+       character (len = *),     intent(in),    optional :: purpose
+       integer,                 intent(in),    optional :: itemcount
+       type(ESMF_AttNest_Flag), intent(in),    optional :: attnestflag
+       integer,                 intent(inout), optional :: rc
+
+STATUS: + The following parameters were removed in ESMF version 8.1.0: + +
    +
  • attPackInstanceName + +
  • +
+ +

+STATUS: + DEPRECATED CLASS! +
+The entire ESMF_Attribute class has been deprecated and is scheduled for removal with ESMF 9.0.0. This includes all of the class derived types, named constants, and methods. Please use the replacment class ESMF_Info, section 40 instead! +
+

+DESCRIPTION: +
+ +

+Attach an Attribute to target, or set an Attribute in an + Attribute package. The Attribute has a name and a + valueList, with an itemCount, and, if in an Attribute + package, convention and purpose. + +

+The itemcount and attnestflag are NOOP. + +

+Supported values for <object> are: +

+
+
ESMF_Array + +
+
+
ESMF_ArrayBundle + +
+
+
ESMF_CplComp + +
+
+
ESMF_GridComp + +
+
+
ESMF_SciComp + +
+
+
ESMF_DistGrid + +
+
+
ESMF_Field + +
+
+
ESMF_FieldBundle + +
+
+
ESMF_Grid + +
+
+
ESMF_State + +
+
+
ESMF_LocStream + +
+
+
ESMF_Mesh + +
+
+ +

+Supported types for <valueList> and <defaultvalueList> are: +

+
+
integer(ESMF_KIND_I4), intent(out), dimension(:) + +
+
+
integer(ESMF_KIND_I8), intent(out), dimension(:) + +
+
+
real(ESMF_KIND_R4), intent(out), dimension(:) + +
+
+
real(ESMF_KIND_R8), intent(out), dimension(:) + +
+
+
logical, intent(out), dimension(:) + +
+
+
character(len=*), intent(out), dimension(:) + +
+
+ +

+The arguments are: +

+
target
+
An ESMF object. + +
+
name
+
The name of the Attribute to set. + +
+
<valueList>
+
The valueList of the Attribute to set. + +
+
[convention]
+
The convention of the Attribute package. + +
+
[purpose]
+
The purpose of the Attribute package. + +
+
[itemcount]
+
This parameter is only included for backward compatibility, it is NOOP. + +
+
[attnestflag]
+
This parameter is only included for backward compatibility, it is NOOP. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+57.2.20 ESMF_AttributeUpdate - Update an Attribute hierarchy +

+ +

+ +

+
+INTERFACE: +

       subroutine ESMF_AttributeUpdate(target, vm, rootList, rc)
+
ARGUMENTS: +
       <target>, see below for supported values
+       type(ESMF_VM), intent(in)            :: vm
+       integer,       intent(in)            :: rootList(:)
+       integer,       intent(out), optional :: rc
+
+STATUS: + The following parameters were removed in ESMF version 8.1.0: + +
    +
  • reconcile + +
  • +
+ +

+STATUS: + DEPRECATED CLASS! +
+The entire ESMF_Attribute class has been deprecated and is scheduled for removal with ESMF 9.0.0. This includes all of the class derived types, named constants, and methods. Please use the replacment class ESMF_Info, section 40 instead! +
+

+DESCRIPTION: +
+ +

+Update an Attribute hierarchy during runtime. The information from + the PETs in the rootList is transferred to the PETs that are not + in the rootList. Care should be taken to ensure that the + information contained in the Attributes on the PETs in the rootList + is consistent. + +

+Supported values for <object> are: +

+
+
ESMF_State + +
+
+
ESMF_CplComp + +
+
+
ESMF_GridComp + +
+
+
ESMF_SciComp + +
+
+
ESMF_Field + +
+
+
ESMF_FieldBundle + +
+
+ +

+The arguments are: +

+
target
+
An ESMF object. + +
+
vm
+
The virtual machine over which this Attribute hierarchy + should be updated. + +
+
rootList
+
The list of PETs that are to be used as the source of the update. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ + +

+ +
+esmf_support@ucar.edu +
+ + diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/prev.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/prev.png new file mode 100644 index 000000000..e60b8b407 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/prev.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/prev_g.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/prev_g.png new file mode 100644 index 000000000..ac6f0bceb Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/prev_g.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/up.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/up.png new file mode 100644 index 000000000..3937e168f Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/up.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_refdoc/up_g.png b/docs/nightly/fix/reconcile-info/ESMF_refdoc/up_g.png new file mode 100644 index 000000000..fb36cf765 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_refdoc/up_g.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_usrdoc.pdf b/docs/nightly/fix/reconcile-info/ESMF_usrdoc.pdf new file mode 100644 index 000000000..f3744e3ec Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_usrdoc.pdf differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_usrdoc/ESMF_usrdoc.css b/docs/nightly/fix/reconcile-info/ESMF_usrdoc/ESMF_usrdoc.css new file mode 100644 index 000000000..f49016949 --- /dev/null +++ b/docs/nightly/fix/reconcile-info/ESMF_usrdoc/ESMF_usrdoc.css @@ -0,0 +1,40 @@ +/* Century Schoolbook font is very similar to Computer Modern Math: cmmi */ +.MATH { font-family: "Century Schoolbook", serif; } +.MATH I { font-family: "Century Schoolbook", serif; font-style: italic } +.BOLDMATH { font-family: "Century Schoolbook", serif; font-weight: bold } + +/* implement both fixed-size and relative sizes */ +SMALL.XTINY { font-size : xx-small } +SMALL.TINY { font-size : x-small } +SMALL.SCRIPTSIZE { font-size : smaller } +SMALL.FOOTNOTESIZE { font-size : small } +SMALL.SMALL { } +BIG.LARGE { } +BIG.XLARGE { font-size : large } +BIG.XXLARGE { font-size : x-large } +BIG.HUGE { font-size : larger } +BIG.XHUGE { font-size : xx-large } + +/* heading styles */ +H1 { } +H2 { } +H3 { } +H4 { } +H5 { } + +/* mathematics styles */ +DIV.displaymath { } /* math displays */ +TD.eqno { } /* equation-number cells */ + + +/* document-specific styles come next */ +DIV.LaTeX { } +SPAN.bf { } +SPAN.bfseries { } +DIV.center { } +SPAN.it { } +DIV.logo-LaTeX { } +DIV.navigation { } +PRE.preform { } +SPAN.arabic { } +SPAN.textit { font-style: italic } diff --git a/docs/nightly/fix/reconcile-info/ESMF_usrdoc/ESMF_usrdoc.html b/docs/nightly/fix/reconcile-info/ESMF_usrdoc/ESMF_usrdoc.html new file mode 100644 index 000000000..26b372006 --- /dev/null +++ b/docs/nightly/fix/reconcile-info/ESMF_usrdoc/ESMF_usrdoc.html @@ -0,0 +1,405 @@ + + + + + +ESMF_usrdoc + + + + + + + + + + + + + + + + + + + +

+ +

+

+Earth System Modeling Framework +
+
+
+
+ESMF User Guide   +
+
+
+
+Version 8.8.0 beta snapshot +
+
+
+
+
+ESMF Joint Specification Team: V. Balaji, Byron Boville, Samson Cheung, Tom Clune, Nancy Collins, Tony Craig, Carlos Cruz, Arlindo da Silva, Cecelia DeLuca, Rosalinda de Fainchtein, Rocky Dunlap, Brian Eaton, Steve Goldhaber, Bob Hallberg, Tom Henderson, Chris Hill, Mark Iredell, Joseph Jacob, Rob Jacob, Phil Jones, Brian Kauffman, Erik Kluzek, Ben Koziol, Jay Larson, Peggy Li, Fei Liu, John Michalakes, Raffaele Montuoro, Sylvia Murphy, David Neckels, Ryan O Kuinghttons, Bob Oehmke, Chuck Panaccione, Daniel Rosen, Jim Rosinski, Mathew Rothstein, Bill Sacks, Kathy Saint, Will Sawyer, Earl Schwab, Shepard Smithline, Walter Spector, Don Stark, Max Suarez, Spencer Swift, Gerhard Theurich, Atanas Trayanov, Silverio Vasquez, Jon Wolfe, Weiyu Yang, Mike Young, Leonid Zaslavsky +
+
+
+
+December 3, 2024 +
+
+
+ +
+ +

+ +

+ + +

+
+
+
+
+
+
+
+
+
+
+
+
+
+

+Acknowledgements + +
+ +

+The ESMF software is based on the contributions of a broad community. +Below are the software packages that are included in ESMF or strongly +influenced our design. We'd like to express our gratitude to the +developers of these codes for access to their software as well as their +ideas and advice. + +

+ +

    +
  • Parallel I/O (PIO) developers at NCAR and DOE Laboratories for their +excellent work on this package and their help in making it work with ESMF + +

    +

  • +
  • The Spherical Coordinate Remapping and Interpolation Package (SCRIP) +from Los Alamos, which informed the design of our regridding functionality + +

    +

  • +
  • The Model Coupling Toolkit (MCT) from Argonne National Laboratory, +on which we based our sparse matrix multiply approach to general +regridding + +

    +

  • +
  • The Inpack configuration attributes package from NASA Goddard, +which was adapted for use in ESMF by members of NASA Global Modeling and +Assimilation group + +

    +

  • +
  • The Flexible Modeling System (FMS) package from GFDL and the +Goddard Earth Modeling System (GEMS) from NASA Goddard, both of which +provided inspiration for the overall ESMF architecture + +

    +

  • +
  • The Common Component Architecture (CCA) effort within the Department +of Energy, from which we drew many ideas about how to design components + +

    +

  • +
  • The Vector Signal Image Processing Library (VSIPL) and its +predecessors, which informed many aspects of our design, and the +radar system software design group at Lincoln Laboratory + +

    +

  • +
  • The Portable, Extensible Toolkit for Scientific Computation (PETSc) +package from Argonne National Laboratories, on which we +based our initial makefile system + +

    +

  • +
  • The Community Climate System Model (CCSM) and Weather Research and +Forecasting (WRF) modeling groups at NCAR, who have provided valuable +feedback on the design and implementation of the framework + +

    +

  • +
+ +

+ + + + + + + + +
+esmf_support@ucar.edu +
+ + diff --git a/docs/nightly/fix/reconcile-info/ESMF_usrdoc/WARNINGS b/docs/nightly/fix/reconcile-info/ESMF_usrdoc/WARNINGS new file mode 100644 index 000000000..a9119ad56 --- /dev/null +++ b/docs/nightly/fix/reconcile-info/ESMF_usrdoc/WARNINGS @@ -0,0 +1,11 @@ + +ESMF_usrdoc.tex is newer than ESMF_usrdoc.aux: Please rerun latex. + +Substitution of arg to newlabelxx delayed. + +? brace missing for \oldcontentsline +couldn't convert character /tilde into available encodings + + ...set $ACCENT_IMAGES to get an image + +ESMF_usrdoc.tex is newer than ESMF_usrdoc.bbl: Please rerun latex and bibtex. diff --git a/docs/nightly/fix/reconcile-info/ESMF_usrdoc/contents.png b/docs/nightly/fix/reconcile-info/ESMF_usrdoc/contents.png new file mode 100644 index 000000000..0c752c66c Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_usrdoc/contents.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_usrdoc/images.aux b/docs/nightly/fix/reconcile-info/ESMF_usrdoc/images.aux new file mode 100644 index 000000000..c01f471a8 --- /dev/null +++ b/docs/nightly/fix/reconcile-info/ESMF_usrdoc/images.aux @@ -0,0 +1,19 @@ +\relax +\providecommand\hyper@newdestlabel[2]{} +\providecommand\HyperFirstAtBeginDocument{\AtBeginDocument} +\HyperFirstAtBeginDocument{\ifx\hyper@anchor\@undefined +\global\let\oldcontentsline\contentsline +\gdef\contentsline#1#2#3#4{\oldcontentsline{#1}{#2}{#3}} +\global\let\oldnewlabel\newlabel +\gdef\newlabel#1#2{\newlabelxx{#1}#2} +\gdef\newlabelxx#1#2#3#4#5#6{\oldnewlabel{#1}{{#2}{#3}}} +\AtEndDocument{\ifx\hyper@anchor\@undefined +\let\contentsline\oldcontentsline +\let\newlabel\oldnewlabel +\fi} +\fi} +\global\let\hyper@last\relax +\gdef\HyperFirstAtBeginDocument#1{#1} +\providecommand*\HyPL@Entry[1]{} +\HyPL@Entry{0<>} +\babel@aux{english}{} diff --git a/docs/nightly/fix/reconcile-info/ESMF_usrdoc/images.bbl b/docs/nightly/fix/reconcile-info/ESMF_usrdoc/images.bbl new file mode 100644 index 000000000..e553297b8 --- /dev/null +++ b/docs/nightly/fix/reconcile-info/ESMF_usrdoc/images.bbl @@ -0,0 +1,10 @@ +\begin{thebibliography}{1} + +\bibitem{ref:CF} +{Eaton, B.}, {J. Gregory}, {B. Drach}, {K. Taylor}, and {S. Hankin}. +\newblock {NetCDF Climate and Forecast (CF) Metadata Convention}. +\newblock + http://cfconventions.org/Data/cf-conventions/cf-conventions-1.6/build/cf-conventions.html, + last accessed on Nov 27, 2015. + +\end{thebibliography} diff --git a/docs/nightly/fix/reconcile-info/ESMF_usrdoc/images.log b/docs/nightly/fix/reconcile-info/ESMF_usrdoc/images.log new file mode 100644 index 000000000..e2e6faaa5 --- /dev/null +++ b/docs/nightly/fix/reconcile-info/ESMF_usrdoc/images.log @@ -0,0 +1,369 @@ +This is pdfTeX, Version 3.14159265-2.6-1.40.18 (TeX Live 2017/Debian) (preloaded format=latex 2022.7.28) 3 DEC 2024 17:27 +entering extended mode + restricted \write18 enabled. + %&-line parsing enabled. +**./images.tex +(./images.tex +LaTeX2e <2017-04-15> +Babel <3.18> and hyphenation patterns for 84 language(s) loaded. + +(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls +Document Class: article 2014/09/29 v1.4h Standard LaTeX document class +(/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo +File: size10.clo 2014/09/29 v1.4h Standard LaTeX file (size option) +) +\c@part=\count79 +\c@section=\count80 +\c@subsection=\count81 +\c@subsubsection=\count82 +\c@paragraph=\count83 +\c@subparagraph=\count84 +\c@figure=\count85 +\c@table=\count86 +\abovecaptionskip=\skip41 +\belowcaptionskip=\skip42 +\bibindent=\dimen102 +) (/usr/share/texlive/texmf-dist/tex/latex/base/ifthen.sty +Package: ifthen 2014/09/29 v1.1c Standard LaTeX ifthen package (DPC) +) (/usr/share/texlive/texmf-dist/tex/generic/babel/babel.sty +Package: babel 2018/02/14 3.18 The Babel package +(/usr/share/texlive/texmf-dist/tex/generic/babel/switch.def +File: switch.def 2018/02/14 3.18 Babel switching mechanism +) (/usr/share/texlive/texmf-dist/tex/generic/babel-english/english.ldf +Language: english 2017/06/06 v3.3r English support from the babel system +(/usr/share/texlive/texmf-dist/tex/generic/babel/babel.def +File: babel.def 2018/02/14 3.18 Babel common definitions +\babel@savecnt=\count87 +\U@D=\dimen103 +(/usr/share/texlive/texmf-dist/tex/generic/babel/txtbabel.def) +\bbl@dirlevel=\count88 +) +\l@canadian = a dialect from \language\l@american +\l@australian = a dialect from \language\l@british +\l@newzealand = a dialect from \language\l@british +)) (/usr/share/texlive/texmf-dist/tex/latex/tools/longtable.sty +Package: longtable 2014/10/28 v4.11 Multi-page Table package (DPC) +\LTleft=\skip43 +\LTright=\skip44 +\LTpre=\skip45 +\LTpost=\skip46 +\LTchunksize=\count89 +\LTcapwidth=\dimen104 +\LT@head=\box26 +\LT@firsthead=\box27 +\LT@foot=\box28 +\LT@lastfoot=\box29 +\LT@cols=\count90 +\LT@rows=\count91 +\c@LT@tables=\count92 +\c@LT@chunks=\count93 +\LT@p@ftn=\toks14 +) (/usr/share/texmf/tex/latex/html/html.sty +Package: html 1999/07/19 v1.38 hypertext commands for latex2html (nd, hws, rrm) + +\c@lpart=\count94 +\c@lchapter=\count95 +\c@chapter=\count96 +\c@lsection=\count97 +\c@lsubsection=\count98 +\c@lsubsubsection=\count99 +\c@lparagraph=\count100 +\c@lsubparagraph=\count101 +\c@lsubsubparagraph=\count102 +\ptrfile=\write3 +) (/usr/share/texlive/texmf-dist/tex/latex/psnfss/times.sty +Package: times 2005/04/12 PSNFSS-v9.2a (SPQR) +) (/usr/share/texlive/texmf-dist/tex/latex/graphics/graphicx.sty +Package: graphicx 2017/06/01 v1.1a Enhanced LaTeX Graphics (DPC,SPQR) +(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty +Package: keyval 2014/10/28 v1.15 key=value parser (DPC) +\KV@toks@=\toks15 +) (/usr/share/texlive/texmf-dist/tex/latex/graphics/graphics.sty +Package: graphics 2017/06/25 v1.2c Standard LaTeX Graphics (DPC,SPQR) +(/usr/share/texlive/texmf-dist/tex/latex/graphics/trig.sty +Package: trig 2016/01/03 v1.10 sin cos tan (DPC) +) (/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/graphics.cfg +File: graphics.cfg 2016/06/04 v1.11 sample graphics configuration +) +Package graphics Info: Driver file: dvips.def on input line 99. +(/usr/share/texlive/texmf-dist/tex/latex/graphics-def/dvips.def +File: dvips.def 2017/06/20 v3.1d Graphics/color driver for dvips +)) +\Gin@req@height=\dimen105 +\Gin@req@width=\dimen106 +) (/usr/share/texlive/texmf-dist/tex/latex/hyperref/hyperref.sty +Package: hyperref 2018/02/06 v6.86b Hypertext links for LaTeX +(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/hobsub-hyperref.sty +Package: hobsub-hyperref 2016/05/16 v1.14 Bundle oberdiek, subset hyperref (HO) + +(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/hobsub-generic.sty +Package: hobsub-generic 2016/05/16 v1.14 Bundle oberdiek, subset generic (HO) +Package: hobsub 2016/05/16 v1.14 Construct package bundles (HO) +Package: infwarerr 2016/05/16 v1.4 Providing info/warning/error messages (HO) +Package: ltxcmds 2016/05/16 v1.23 LaTeX kernel commands for general use (HO) +Package: ifluatex 2016/05/16 v1.4 Provides the ifluatex switch (HO) +Package ifluatex Info: LuaTeX not detected. +Package: ifvtex 2016/05/16 v1.6 Detect VTeX and its facilities (HO) +Package ifvtex Info: VTeX not detected. +Package: intcalc 2016/05/16 v1.2 Expandable calculations with integers (HO) +Package: ifpdf 2017/03/15 v3.2 Provides the ifpdf switch +Package: etexcmds 2016/05/16 v1.6 Avoid name clashes with e-TeX commands (HO) +Package etexcmds Info: Could not find \expanded. +(etexcmds) That can mean that you are not using pdfTeX 1.50 or +(etexcmds) that some package has redefined \expanded. +(etexcmds) In the latter case, load this package earlier. +Package: kvsetkeys 2016/05/16 v1.17 Key value parser (HO) +Package: kvdefinekeys 2016/05/16 v1.4 Define keys (HO) +Package: pdftexcmds 2018/01/21 v0.26 Utility functions of pdfTeX for LuaTeX (HO +) +Package pdftexcmds Info: LuaTeX not detected. +Package pdftexcmds Info: \pdf@primitive is available. +Package pdftexcmds Info: \pdf@ifprimitive is available. +Package pdftexcmds Info: \pdfdraftmode is ignored in DVI mode. +Package: pdfescape 2016/05/16 v1.14 Implements pdfTeX's escape features (HO) +Package: bigintcalc 2016/05/16 v1.4 Expandable calculations on big integers (HO +) +Package: bitset 2016/05/16 v1.2 Handle bit-vector datatype (HO) +Package: uniquecounter 2016/05/16 v1.3 Provide unlimited unique counter (HO) +) +Package hobsub Info: Skipping package `hobsub' (already loaded). +Package: letltxmacro 2016/05/16 v1.5 Let assignment for LaTeX macros (HO) +Package: hopatch 2016/05/16 v1.3 Wrapper for package hooks (HO) +Package: xcolor-patch 2016/05/16 xcolor patch +Package: atveryend 2016/05/16 v1.9 Hooks at the very end of document (HO) +Package atveryend Info: \enddocument detected (standard20110627). +Package: atbegshi 2016/06/09 v1.18 At begin shipout hook (HO) +Package: refcount 2016/05/16 v3.5 Data extraction from label references (HO) +Package: hycolor 2016/05/16 v1.8 Color options for hyperref/bookmark (HO) +) (/usr/share/texlive/texmf-dist/tex/generic/ifxetex/ifxetex.sty +Package: ifxetex 2010/09/12 v0.6 Provides ifxetex conditional +) (/usr/share/texlive/texmf-dist/tex/latex/oberdiek/auxhook.sty +Package: auxhook 2016/05/16 v1.4 Hooks for auxiliary files (HO) +) (/usr/share/texlive/texmf-dist/tex/latex/oberdiek/kvoptions.sty +Package: kvoptions 2016/05/16 v3.12 Key value format for package options (HO) +) +\@linkdim=\dimen107 +\Hy@linkcounter=\count103 +\Hy@pagecounter=\count104 +(/usr/share/texlive/texmf-dist/tex/latex/hyperref/pd1enc.def +File: pd1enc.def 2018/02/06 v6.86b Hyperref: PDFDocEncoding definition (HO) +) +\Hy@SavedSpaceFactor=\count105 +(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/hyperref.cfg +File: hyperref.cfg 2002/06/06 v1.2 hyperref configuration of TeXLive +) +Package hyperref Info: Hyper figures OFF on input line 4509. +Package hyperref Info: Link nesting OFF on input line 4514. +Package hyperref Info: Hyper index ON on input line 4517. +Package hyperref Info: Plain pages OFF on input line 4524. +Package hyperref Info: Backreferencing OFF on input line 4529. +Package hyperref Info: Implicit mode ON; LaTeX internals redefined. +Package hyperref Info: Bookmarks ON on input line 4762. +\c@Hy@tempcnt=\count106 +(/usr/share/texlive/texmf-dist/tex/latex/url/url.sty +\Urlmuskip=\muskip10 +Package: url 2013/09/16 ver 3.4 Verb mode for urls, etc. +) +LaTeX Info: Redefining \url on input line 5115. +LaTeX Info: Redefining \hyperref on input line 5126. +\XeTeXLinkMargin=\dimen108 +\Fld@menulength=\count107 +\Field@Width=\dimen109 +\Fld@charsize=\dimen110 +Package hyperref Info: Hyper figures OFF on input line 6369. +Package hyperref Info: Link nesting OFF on input line 6374. +Package hyperref Info: Hyper index ON on input line 6377. +Package hyperref Info: backreferencing OFF on input line 6384. +Package hyperref Info: Link coloring OFF on input line 6389. +Package hyperref Info: Link coloring with OCG OFF on input line 6394. +Package hyperref Info: PDF/A mode OFF on input line 6399. +LaTeX Info: Redefining \ref on input line 6439. +LaTeX Info: Redefining \pageref on input line 6443. +\Hy@abspage=\count108 +\c@Item=\count109 +\c@Hfootnote=\count110 +) +Package hyperref Info: Driver (default): hdvips. +(/usr/share/texlive/texmf-dist/tex/latex/hyperref/hdvips.def +File: hdvips.def 2018/02/06 v6.86b Hyperref driver for dvips +(/usr/share/texlive/texmf-dist/tex/latex/hyperref/pdfmark.def +File: pdfmark.def 2018/02/06 v6.86b Hyperref definitions for pdfmark specials +\pdf@docset=\toks16 +\pdf@box=\box30 +\pdf@toks=\toks17 +\pdf@defaulttoks=\toks18 +\HyField@AnnotCount=\count111 +\Fld@listcount=\count112 +\c@bookmark@seq@number=\count113 +(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/rerunfilecheck.sty +Package: rerunfilecheck 2016/05/16 v1.8 Rerun checks for auxiliary files (HO) +Package uniquecounter Info: New unique counter `rerunfilecheck' on input line 2 +82. +) +\Hy@SectionHShift=\skip47 +)) (/usr/share/texlive/texmf-dist/tex/latex/base/fontenc.sty +Package: fontenc 2017/04/05 v2.0i Standard LaTeX package +(/usr/share/texlive/texmf-dist/tex/latex/base/t1enc.def +File: t1enc.def 2017/04/05 v2.0i Standard LaTeX file +LaTeX Font Info: Redeclaring font encoding T1 on input line 48. +)) +\oldparskip=\skip48 +\oldparindent=\skip49 +\oldbaselineskip=\skip50 +(/usr/share/texlive/texmf-dist/tex/latex/xcolor/xcolor.sty +Package: xcolor 2016/05/11 v2.12 LaTeX color extensions (UK) +(/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/color.cfg +File: color.cfg 2016/01/02 v1.6 sample color configuration +) +Package xcolor Info: Driver file: dvips.def on input line 225. +Package xcolor Info: Model `cmy' substituted by `cmy0' on input line 1348. +Package xcolor Info: Model `RGB' extended on input line 1364. +Package xcolor Info: Model `HTML' substituted by `rgb' on input line 1366. +Package xcolor Info: Model `Hsb' substituted by `hsb' on input line 1367. +Package xcolor Info: Model `tHsb' substituted by `hsb' on input line 1368. +Package xcolor Info: Model `HSB' substituted by `hsb' on input line 1369. +Package xcolor Info: Model `Gray' substituted by `gray' on input line 1370. +Package xcolor Info: Model `wave' substituted by `hsb' on input line 1371. +) (/usr/share/texlive/texmf-dist/tex/latex/base/inputenc.sty +Package: inputenc 2015/03/17 v1.2c Input encoding file +\inpenc@prehook=\toks19 +\inpenc@posthook=\toks20 +) +\sizebox=\box31 +\lthtmlwrite=\write4 +(./images.aux) +\openout1 = `images.aux'. + +LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 155. +LaTeX Font Info: ... okay on input line 155. +LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 155. +LaTeX Font Info: ... okay on input line 155. +LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 155. +LaTeX Font Info: ... okay on input line 155. +LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 155. +LaTeX Font Info: ... okay on input line 155. +LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 155. +LaTeX Font Info: ... okay on input line 155. +LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 155. +LaTeX Font Info: ... okay on input line 155. +LaTeX Font Info: Checking defaults for PD1/pdf/m/n on input line 155. +LaTeX Font Info: ... okay on input line 155. +LaTeX Font Info: Try loading font information for T1+ptm on input line 155. +(/usr/share/texlive/texmf-dist/tex/latex/psnfss/t1ptm.fd +File: t1ptm.fd 2001/06/04 font definitions for T1/ptm. +) +\AtBeginShipoutBox=\box32 +Package hyperref Info: Link coloring OFF on input line 155. +(/usr/share/texlive/texmf-dist/tex/latex/hyperref/nameref.sty +Package: nameref 2016/05/21 v2.44 Cross-referencing by name of section +(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/gettitlestring.sty +Package: gettitlestring 2016/05/16 v1.5 Cleanup title references (HO) +) +\c@section@level=\count114 +) +LaTeX Info: Redefining \ref on input line 155. +LaTeX Info: Redefining \pageref on input line 155. +LaTeX Info: Redefining \nameref on input line 155. +\@outlinefile=\write5 +\openout5 = `images.out'. + + +latex2htmlLength hsize=349.0pt + +latex2htmlLength vsize=697.295pt + +latex2htmlLength hoffset=0.0pt + +latex2htmlLength voffset=0.0pt + +latex2htmlLength topmargin=0.0pt + +latex2htmlLength topskip=0.00003pt + +latex2htmlLength headheight=0.0pt + +latex2htmlLength headsep=0.0pt + +latex2htmlLength parskip=0.0pt + +latex2htmlLength oddsidemargin=0.0pt + +latex2htmlLength evensidemargin=0.0pt + +File: ESMF_sandwich.eps Graphic file (type eps) + +Overfull \hbox (33.42874pt too wide) detected at line 188 + [] + [] + +l2hSize :tex2html_wrap251:210.78749pt::0.0pt::349.0pt. +[1 + + + +] +File: ESMF_appunit.eps Graphic file (type eps) + +Overfull \hbox (124.76999pt too wide) detected at line 257 + [] + [] + +l2hSize :tex2html_wrap5254:346.29375pt::0.0pt::349.0pt. +[2 + + +] +File: ESMF_hubandspokes.eps Graphic file (type eps) + +Overfull \hbox (138.8225pt too wide) detected at line 271 + [] + [] + +l2hSize :tex2html_wrap5290:237.88875pt::0.0pt::349.0pt. +[3 + + +] +File: ESMF_pairwise.eps Graphic file (type eps) + +Overfull \hbox (138.8225pt too wide) detected at line 277 + [] + [] + +l2hSize :tex2html_wrap5296:237.88875pt::0.0pt::349.0pt. +[4 + + +] +File: regrid.eps Graphic file (type eps) + +l2hSize :tex2html_wrap5308:221.32687pt::0.0pt::349.0pt. +[5 + + +] +Package atveryend Info: Empty hook `BeforeClearDocument' on input line 298. +Package atveryend Info: Empty hook `AfterLastShipout' on input line 298. +(./images.aux) +Package atveryend Info: Empty hook `AtVeryEndDocument' on input line 298. +Package atveryend Info: Executing hook `AtEndAfterFileList' on input line 298. + +Package rerunfilecheck Warning: File `images.out' has changed. +(rerunfilecheck) Rerun to get outlines right +(rerunfilecheck) or use package `bookmark'. + +Package rerunfilecheck Info: Checksums for `images.out': +(rerunfilecheck) Before: +(rerunfilecheck) After: D41D8CD98F00B204E9800998ECF8427E;0. +Package atveryend Info: Empty hook `AtVeryVeryEnd' on input line 298. + ) +Here is how much of TeX's memory you used: + 6353 strings out of 492983 + 90218 string characters out of 6134922 + 193023 words of memory out of 5000000 + 9886 multiletter control sequences out of 15000+600000 + 6047 words of font info for 16 fonts, out of 8000000 for 9000 + 1141 hyphenation exceptions out of 8191 + 29i,5n,35p,1233b,366s stack positions out of 5000i,500n,10000p,200000b,80000s + +Output written on images.dvi (5 pages, 5656 bytes). diff --git a/docs/nightly/fix/reconcile-info/ESMF_usrdoc/images.out b/docs/nightly/fix/reconcile-info/ESMF_usrdoc/images.out new file mode 100644 index 000000000..e69de29bb diff --git a/docs/nightly/fix/reconcile-info/ESMF_usrdoc/images.pl b/docs/nightly/fix/reconcile-info/ESMF_usrdoc/images.pl new file mode 100644 index 000000000..4f5b07ada --- /dev/null +++ b/docs/nightly/fix/reconcile-info/ESMF_usrdoc/images.pl @@ -0,0 +1,36 @@ +# LaTeX2HTML 2018 (Released Feb 1, 2018) +# Associate images original text with physical files. + + +$key = q/scalebox{0.5}{includegraphics{regrid}};AAT/; +$cached_env_img{$key} = q|\scalebox{0.5}{\includegraphics{regrid}}|; + +$key = q/scalebox{1.0}{includegraphics{ESMF_appunit}};AAT/; +$cached_env_img{$key} = q|\scalebox{1.0}{\includegraphics{ESMF_appunit}}|; + +$key = q/scalebox{1.0}{includegraphics{ESMF_hubandspokes}};AAT/; +$cached_env_img{$key} = q|\scalebox{1.0}{\includegraphics{ESMF_hubandspokes}}|; + +$key = q/scalebox{1.0}{includegraphics{ESMF_pairwise}};AAT/; +$cached_env_img{$key} = q|\scalebox{1.0}{\includegraphics{ESMF_pairwise}}|; + +$key = q/scalebox{1.0}{includegraphics{ESMF_sandwich}};AAT/; +$cached_env_img{$key} = q|\scalebox{1.0}{\includegraphics{ESMF_sandwich}}|; + +1; + diff --git a/docs/nightly/fix/reconcile-info/ESMF_usrdoc/images.tex b/docs/nightly/fix/reconcile-info/ESMF_usrdoc/images.tex new file mode 100644 index 000000000..416f8558e --- /dev/null +++ b/docs/nightly/fix/reconcile-info/ESMF_usrdoc/images.tex @@ -0,0 +1,298 @@ +\batchmode + +\documentclass[english]{article} +\RequirePackage{ifthen} + + +\usepackage{babel} +\usepackage{longtable} +\usepackage{html} +\usepackage{times} +\usepackage{graphicx} +\usepackage{hyperref} +\usepackage[T1]{fontenc}% +\providecommand{\docmttype}{User Guide}% +\providecommand{\req}[1]{\section{\hspace{.2in}#1}}% +\providecommand{\sreq}[1]{\subsection{\hspace{.2in}#1}}% +\providecommand{\ssreq}[1]{\subsubsection{\hspace{.2in}#1}}% +\providecommand{\mytitle}{ESMF User Guide~~}% +\providecommand{\myversion}{Version 8.8.0 beta snapshot} + +% +\newenvironment{reqlist}{\begin{list} {} {} \rm \item[]} +{\end{list}} +\setlongtables% +\providecommand{\longname}{ESMF }% +\providecommand{\funcname}{ESMF }% +\providecommand{\shortname}{REF}% +\providecommand{\myauthors}{ESMF Joint Specification Team: V. Balaji, Byron Boville, Samson Cheung, Tom Clune, Nancy Collins, Tony Craig, Carlos Cruz, Arlindo da Silva, Cecelia DeLuca, Rosalinda de Fainchtein, Rocky Dunlap, Brian Eaton, Steve Goldhaber, Bob Hallberg, Tom Henderson, Chris Hill, Mark Iredell, Joseph Jacob, Rob Jacob, Phil Jones, Brian Kauffman, Erik Kluzek, Ben Koziol, Jay Larson, Peggy Li, Fei Liu, John Michalakes, Raffaele Montuoro, Sylvia Murphy, David Neckels, Ryan O Kuinghttons, Bob Oehmke, Chuck Panaccione, Daniel Rosen, Jim Rosinski, Mathew Rothstein, Bill Sacks, Kathy Saint, Will Sawyer, Earl Schwab, Shepard Smithline, Walter Spector, Don Stark, Max Suarez, Spencer Swift, Gerhard Theurich, Atanas Trayanov, Silverio Vasquez, Jon Wolfe, Weiyu Yang, Mike Young, Leonid Zaslavsky} + +\setlength{\textwidth}{6.5truein} + +\setlength{\textheight}{8.5truein} + +\setlength{\oddsidemargin}{0in} + +\setlength{\unitlength}{1truecm} + +\newlength{\oldparskip} + +\newlength{\oldparindent} + +\newlength{\oldbaselineskip} + +\setlength{\parskip}{0pt} + +\setlength{\parindent}{0pt} + +\setlength{\baselineskip}{11pt} +\hbadness = 10000 +\vbadness = 10000 + + +\usepackage{xcolor} + +\usepackage[]{inputenc} + + + +\makeatletter + +\makeatletter +\count@=\the\catcode`\_ \catcode`\_=8 +\newenvironment{tex2html_wrap}{}{}% +\catcode`\<=12\catcode`\_=\count@ +\newcommand{\providedcommand}[1]{\expandafter\providecommand\csname #1\endcsname}% +\newcommand{\renewedcommand}[1]{\expandafter\providecommand\csname #1\endcsname{}% + \expandafter\renewcommand\csname #1\endcsname}% +\newcommand{\newedenvironment}[1]{\newenvironment{#1}{}{}\renewenvironment{#1}}% +\let\newedcommand\renewedcommand +\let\renewedenvironment\newedenvironment +\makeatother +\let\mathon=$ +\let\mathoff=$ +\ifx\AtBeginDocument\undefined \newcommand{\AtBeginDocument}[1]{}\fi +\newbox\sizebox +\setlength{\hoffset}{0pt}\setlength{\voffset}{0pt} +\addtolength{\textheight}{\footskip}\setlength{\footskip}{0pt} +\addtolength{\textheight}{\topmargin}\setlength{\topmargin}{0pt} +\addtolength{\textheight}{\headheight}\setlength{\headheight}{0pt} +\addtolength{\textheight}{\headsep}\setlength{\headsep}{0pt} +\setlength{\textwidth}{349pt} +\newwrite\lthtmlwrite +\makeatletter +\let\realnormalsize=\normalsize +\global\topskip=2sp +\def\preveqno{}\let\real@float=\@float \let\realend@float=\end@float +\def\@float{\let\@savefreelist\@freelist\real@float} +\def\liih@math{\ifmmode$\else\bad@math\fi} +\def\end@float{\realend@float\global\let\@freelist\@savefreelist} +\let\real@dbflt=\@dbflt \let\end@dblfloat=\end@float +\let\@largefloatcheck=\relax +\let\if@boxedmulticols=\iftrue +\def\@dbflt{\let\@savefreelist\@freelist\real@dbflt} +\def\adjustnormalsize{\def\normalsize{\mathsurround=0pt \realnormalsize + \parindent=0pt\abovedisplayskip=0pt\belowdisplayskip=0pt}% + \def\phantompar{\csname par\endcsname}\normalsize}% +\def\lthtmltypeout#1{{\let\protect\string \immediate\write\lthtmlwrite{#1}}}% +\newcommand\lthtmlhboxmathA{\adjustnormalsize\setbox\sizebox=\hbox\bgroup\kern.05em }% +\newcommand\lthtmlhboxmathB{\adjustnormalsize\setbox\sizebox=\hbox to\hsize\bgroup\hfill }% +\newcommand\lthtmlvboxmathA{\adjustnormalsize\setbox\sizebox=\vbox\bgroup % + \let\ifinner=\iffalse \let\)\liih@math }% +\newcommand\lthtmlboxmathZ{\@next\next\@currlist{}{\def\next{\voidb@x}}% + \expandafter\box\next\egroup}% +\newcommand\lthtmlmathtype[1]{\gdef\lthtmlmathenv{#1}}% +\newcommand\lthtmllogmath{\dimen0\ht\sizebox \advance\dimen0\dp\sizebox + \ifdim\dimen0>.95\vsize + \lthtmltypeout{% +*** image for \lthtmlmathenv\space is too tall at \the\dimen0, reducing to .95 vsize ***}% + \ht\sizebox.95\vsize \dp\sizebox\z@ \fi + \lthtmltypeout{l2hSize % +:\lthtmlmathenv:\the\ht\sizebox::\the\dp\sizebox::\the\wd\sizebox.\preveqno}}% +\newcommand\lthtmlfigureA[1]{\let\@savefreelist\@freelist + \lthtmlmathtype{#1}\lthtmlvboxmathA}% +\newcommand\lthtmlpictureA{\bgroup\catcode`\_=8 \lthtmlpictureB}% +\newcommand\lthtmlpictureB[1]{\lthtmlmathtype{#1}\egroup + \let\@savefreelist\@freelist \lthtmlhboxmathB}% +\newcommand\lthtmlpictureZ[1]{\hfill\lthtmlfigureZ}% +\newcommand\lthtmlfigureZ{\lthtmlboxmathZ\lthtmllogmath\copy\sizebox + \global\let\@freelist\@savefreelist}% +\newcommand\lthtmldisplayA{\bgroup\catcode`\_=8 \lthtmldisplayAi}% +\newcommand\lthtmldisplayAi[1]{\lthtmlmathtype{#1}\egroup\lthtmlvboxmathA}% +\newcommand\lthtmldisplayB[1]{\edef\preveqno{(\theequation)}% + \lthtmldisplayA{#1}\let\@eqnnum\relax}% +\newcommand\lthtmldisplayZ{\lthtmlboxmathZ\lthtmllogmath\lthtmlsetmath}% +\newcommand\lthtmlinlinemathA{\bgroup\catcode`\_=8 \lthtmlinlinemathB} +\newcommand\lthtmlinlinemathB[1]{\lthtmlmathtype{#1}\egroup\lthtmlhboxmathA + \vrule height1.5ex width0pt }% +\newcommand\lthtmlinlineA{\bgroup\catcode`\_=8 \lthtmlinlineB}% +\newcommand\lthtmlinlineB[1]{\lthtmlmathtype{#1}\egroup\lthtmlhboxmathA}% +\newcommand\lthtmlinlineZ{\egroup\expandafter\ifdim\dp\sizebox>0pt % + \expandafter\centerinlinemath\fi\lthtmllogmath\lthtmlsetinline} +\newcommand\lthtmlinlinemathZ{\egroup\expandafter\ifdim\dp\sizebox>0pt % + \expandafter\centerinlinemath\fi\lthtmllogmath\lthtmlsetmath} +\newcommand\lthtmlindisplaymathZ{\egroup % + \centerinlinemath\lthtmllogmath\lthtmlsetmath} +\def\lthtmlsetinline{\hbox{\vrule width.1em \vtop{\vbox{% + \kern.1em\copy\sizebox}\ifdim\dp\sizebox>0pt\kern.1em\else\kern.3pt\fi + \ifdim\hsize>\wd\sizebox \hrule depth1pt\fi}}} +\def\lthtmlsetmath{\hbox{\vrule width.1em\kern-.05em\vtop{\vbox{% + \kern.1em\kern0.8 pt\hbox{\hglue.17em\copy\sizebox\hglue0.8 pt}}\kern.3pt% + \ifdim\dp\sizebox>0pt\kern.1em\fi \kern0.8 pt% + \ifdim\hsize>\wd\sizebox \hrule depth1pt\fi}}} +\def\centerinlinemath{% + \dimen1=\ifdim\ht\sizebox<\dp\sizebox \dp\sizebox\else\ht\sizebox\fi + \advance\dimen1by.5pt \vrule width0pt height\dimen1 depth\dimen1 + \dp\sizebox=\dimen1\ht\sizebox=\dimen1\relax} + +\def\lthtmlcheckvsize{\ifdim\ht\sizebox<\vsize + \ifdim\wd\sizebox<\hsize\expandafter\hfill\fi \expandafter\vfill + \else\expandafter\vss\fi}% +\providecommand{\selectlanguage}[1]{}% +\makeatletter \tracingstats = 1 + + +\begin{document} +\pagestyle{empty}\thispagestyle{empty}\lthtmltypeout{}% +\lthtmltypeout{latex2htmlLength hsize=\the\hsize}\lthtmltypeout{}% +\lthtmltypeout{latex2htmlLength vsize=\the\vsize}\lthtmltypeout{}% +\lthtmltypeout{latex2htmlLength hoffset=\the\hoffset}\lthtmltypeout{}% +\lthtmltypeout{latex2htmlLength voffset=\the\voffset}\lthtmltypeout{}% +\lthtmltypeout{latex2htmlLength topmargin=\the\topmargin}\lthtmltypeout{}% +\lthtmltypeout{latex2htmlLength topskip=\the\topskip}\lthtmltypeout{}% +\lthtmltypeout{latex2htmlLength headheight=\the\headheight}\lthtmltypeout{}% +\lthtmltypeout{latex2htmlLength headsep=\the\headsep}\lthtmltypeout{}% +\lthtmltypeout{latex2htmlLength parskip=\the\parskip}\lthtmltypeout{}% +\lthtmltypeout{latex2htmlLength oddsidemargin=\the\oddsidemargin}\lthtmltypeout{}% +\makeatletter +\if@twoside\lthtmltypeout{latex2htmlLength evensidemargin=\the\evensidemargin}% +\else\lthtmltypeout{latex2htmlLength evensidemargin=\the\oddsidemargin}\fi% +\lthtmltypeout{}% +\makeatother +\setcounter{page}{1} +\onecolumn + +% !!! IMAGES START HERE !!! + + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} +\stepcounter{section} +\stepcounter{section} +{\newpage\clearpage +\lthtmlpictureA{tex2html_wrap251}% +\scalebox{1.0}{\includegraphics{ESMF_sandwich}}% +\lthtmlpictureZ +\lthtmlcheckvsize\clearpage} + +\stepcounter{section} +\stepcounter{section} +\stepcounter{section} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{section} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{section} +\stepcounter{section} +\stepcounter{section} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{section} +\stepcounter{subsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsection} +\stepcounter{section} +\stepcounter{subsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsection} +\stepcounter{section} +\stepcounter{subsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +{\newpage\clearpage +\lthtmlpictureA{tex2html_wrap5254}% +\scalebox{1.0}{\includegraphics{ESMF_appunit}}% +\lthtmlpictureZ +\lthtmlcheckvsize\clearpage} + +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +{\newpage\clearpage +\lthtmlpictureA{tex2html_wrap5290}% +\scalebox{1.0}{\includegraphics{ESMF_hubandspokes}}% +\lthtmlpictureZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlpictureA{tex2html_wrap5296}% +\scalebox{1.0}{\includegraphics{ESMF_pairwise}}% +\lthtmlpictureZ +\lthtmlcheckvsize\clearpage} + +\stepcounter{subsection} +{\newpage\clearpage +\lthtmlpictureA{tex2html_wrap5308}% +\scalebox{0.5}{\includegraphics{regrid}}% +\lthtmlpictureZ +\lthtmlcheckvsize\clearpage} + +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{section} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{section} + +\end{document} diff --git a/docs/nightly/fix/reconcile-info/ESMF_usrdoc/img1.png b/docs/nightly/fix/reconcile-info/ESMF_usrdoc/img1.png new file mode 100644 index 000000000..9ca7925d1 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_usrdoc/img1.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_usrdoc/img2.png b/docs/nightly/fix/reconcile-info/ESMF_usrdoc/img2.png new file mode 100644 index 000000000..7ca822eaa Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_usrdoc/img2.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_usrdoc/img3.png b/docs/nightly/fix/reconcile-info/ESMF_usrdoc/img3.png new file mode 100644 index 000000000..a55163bed Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_usrdoc/img3.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_usrdoc/img4.png b/docs/nightly/fix/reconcile-info/ESMF_usrdoc/img4.png new file mode 100644 index 000000000..7ecf9f3bb Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_usrdoc/img4.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_usrdoc/img5.png b/docs/nightly/fix/reconcile-info/ESMF_usrdoc/img5.png new file mode 100644 index 000000000..f13f8e47a Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_usrdoc/img5.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_usrdoc/index.html b/docs/nightly/fix/reconcile-info/ESMF_usrdoc/index.html new file mode 100644 index 000000000..26b372006 --- /dev/null +++ b/docs/nightly/fix/reconcile-info/ESMF_usrdoc/index.html @@ -0,0 +1,405 @@ + + + + + +ESMF_usrdoc + + + + + + + + + + + + + + + + + + + +

+ +

+

+Earth System Modeling Framework +
+
+
+
+ESMF User Guide   +
+
+
+
+Version 8.8.0 beta snapshot +
+
+
+
+
+ESMF Joint Specification Team: V. Balaji, Byron Boville, Samson Cheung, Tom Clune, Nancy Collins, Tony Craig, Carlos Cruz, Arlindo da Silva, Cecelia DeLuca, Rosalinda de Fainchtein, Rocky Dunlap, Brian Eaton, Steve Goldhaber, Bob Hallberg, Tom Henderson, Chris Hill, Mark Iredell, Joseph Jacob, Rob Jacob, Phil Jones, Brian Kauffman, Erik Kluzek, Ben Koziol, Jay Larson, Peggy Li, Fei Liu, John Michalakes, Raffaele Montuoro, Sylvia Murphy, David Neckels, Ryan O Kuinghttons, Bob Oehmke, Chuck Panaccione, Daniel Rosen, Jim Rosinski, Mathew Rothstein, Bill Sacks, Kathy Saint, Will Sawyer, Earl Schwab, Shepard Smithline, Walter Spector, Don Stark, Max Suarez, Spencer Swift, Gerhard Theurich, Atanas Trayanov, Silverio Vasquez, Jon Wolfe, Weiyu Yang, Mike Young, Leonid Zaslavsky +
+
+
+
+December 3, 2024 +
+
+
+ +
+ +

+ +

+ + +

+
+
+
+
+
+
+
+
+
+
+
+
+
+

+Acknowledgements + +
+ +

+The ESMF software is based on the contributions of a broad community. +Below are the software packages that are included in ESMF or strongly +influenced our design. We'd like to express our gratitude to the +developers of these codes for access to their software as well as their +ideas and advice. + +

+ +

    +
  • Parallel I/O (PIO) developers at NCAR and DOE Laboratories for their +excellent work on this package and their help in making it work with ESMF + +

    +

  • +
  • The Spherical Coordinate Remapping and Interpolation Package (SCRIP) +from Los Alamos, which informed the design of our regridding functionality + +

    +

  • +
  • The Model Coupling Toolkit (MCT) from Argonne National Laboratory, +on which we based our sparse matrix multiply approach to general +regridding + +

    +

  • +
  • The Inpack configuration attributes package from NASA Goddard, +which was adapted for use in ESMF by members of NASA Global Modeling and +Assimilation group + +

    +

  • +
  • The Flexible Modeling System (FMS) package from GFDL and the +Goddard Earth Modeling System (GEMS) from NASA Goddard, both of which +provided inspiration for the overall ESMF architecture + +

    +

  • +
  • The Common Component Architecture (CCA) effort within the Department +of Energy, from which we drew many ideas about how to design components + +

    +

  • +
  • The Vector Signal Image Processing Library (VSIPL) and its +predecessors, which informed many aspects of our design, and the +radar system software design group at Lincoln Laboratory + +

    +

  • +
  • The Portable, Extensible Toolkit for Scientific Computation (PETSc) +package from Argonne National Laboratories, on which we +based our initial makefile system + +

    +

  • +
  • The Community Climate System Model (CCSM) and Weather Research and +Forecasting (WRF) modeling groups at NCAR, who have provided valuable +feedback on the design and implementation of the framework + +

    +

  • +
+ +

+ + + + + + + + +
+esmf_support@ucar.edu +
+ + diff --git a/docs/nightly/fix/reconcile-info/ESMF_usrdoc/internals.pl b/docs/nightly/fix/reconcile-info/ESMF_usrdoc/internals.pl new file mode 100644 index 000000000..3e6945721 --- /dev/null +++ b/docs/nightly/fix/reconcile-info/ESMF_usrdoc/internals.pl @@ -0,0 +1,634 @@ +# LaTeX2HTML 2018 (Released Feb 1, 2018) +# Associate internals original text with physical files. + + +$key = q/BuildDocumentation/; +$ref_files{$key} = "$dir".q|node10.html|; +$noresave{$key} = "$nosave"; + +$key = q/BuildESMF/; +$ref_files{$key} = "$dir".q|node10.html|; +$noresave{$key} = "$nosave"; + +$key = q/ESMFRunSetting/; +$ref_files{$key} = "$dir".q|node12.html|; +$noresave{$key} = "$nosave"; + +$key = q/EnvironmentVariables/; +$ref_files{$key} = "$dir".q|node10.html|; +$noresave{$key} = "$nosave"; + +$key = q/InstallESMF/; +$ref_files{$key} = "$dir".q|node10.html|; +$noresave{$key} = "$nosave"; + +$key = q/RunUnitTests/; +$ref_files{$key} = "$dir".q|node12.html|; +$noresave{$key} = "$nosave"; + +$key = q/SystemTestDescription/; +$ref_files{$key} = "$dir".q|node12.html|; +$noresave{$key} = "$nosave"; + +$key = q/UnitTestDescription/; +$ref_files{$key} = "$dir".q|node12.html|; +$noresave{$key} = "$nosave"; + +$key = q/cite_ref:CF/; +$ref_files{$key} = "$dir".q|node16.html|; +$noresave{$key} = "$nosave"; + +$key = q/esmfmkfiletesting/; +$ref_files{$key} = "$dir".q|node12.html|; +$noresave{$key} = "$nosave"; + +$key = q/examples/; +$ref_files{$key} = "$dir".q|node12.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:TheESMFwich/; +$ref_files{$key} = "$dir".q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:appunit/; +$ref_files{$key} = "$dir".q|node13.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:hubspoke/; +$ref_files{$key} = "$dir".q|node13.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:point2point/; +$ref_files{$key} = "$dir".q|node13.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:threecomponents/; +$ref_files{$key} = "$dir".q|node13.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:360DayCal/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:API/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Accumulator/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Alarm/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Application/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Array/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:BUFR/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:BackGrid/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:CF/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:CRB/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Calendar/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Cell/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Clock/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:CompDomain/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:CompResource/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Component/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:ConcurrentExecution/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Congruent/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Coupler/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:CurvilinearGrid/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:DE/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:DELayout/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:DataDep/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:DataParallel/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:DataTranspose/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:DayOfYear/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Decomp_Element/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:DeepObjects/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:DistGrid/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Distribution/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:DomainDecomp/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:EP/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Exact/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:ExcDomain/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:ExchangeGrid/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Exec/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:ExportState/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Field/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:FieldBundle/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Framework/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:GRIB/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:GenericComp/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:GenericTrans/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:GlobBroadcast/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:GlobDomain/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:GlobReduction/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Gregorian_calendar/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Grid/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:GridComp/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:GridStagger/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:GridTile/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:GridTopo/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:GridUnion/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Halo/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:HaloUpdate/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:ImportState/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Index/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:IndexSpace/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:IndexSpaceLoc/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Instantiate/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Interface/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:JMC/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:JST/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:LocStream/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:LocalArray/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:LocalTile/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:LogRectGrid/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:LooseFieldBundle/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:MPMD/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Mask/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:MemDomain/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:MosaicGrid/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Namelist/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:NetCDF/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:NoLeap/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Node/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:PE/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:PET/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:PackedFieldBundle/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Parallel/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:PermET/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:PhysLoc/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Platform/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Processing_Element/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:RectilinearGrid/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:RegridWeightGenerationMethodsAndApplications/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:SPMD/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Scheduler/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Search/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:SequentialExecution/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Serial/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:ShallowObjects/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Span/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:State/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Sweep/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:SysTime/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:TaskParallel/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:TimeInstant/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:TimeInterval/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:TotDomain/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:UniformGrid/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:UserComp/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:UserTime/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:UserTrans/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:VAS/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:VM/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:VMachine/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:WallClockTime/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/quickapps/; +$ref_files{$key} = "$dir".q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:Adoption/; +$ref_files{$key} = "$dir".q|node14.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:ArchOver/; +$ref_files{$key} = "$dir".q|node13.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:BuildOptions/; +$ref_files{$key} = "$dir".q|node11.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:CLTs/; +$ref_files{$key} = "$dir".q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:Debug/; +$ref_files{$key} = "$dir".q|node8.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:EsmfMkMethod/; +$ref_files{$key} = "$dir".q|node7.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:MOAB/; +$ref_files{$key} = "$dir".q|node10.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:NUMA/; +$ref_files{$key} = "$dir".q|node10.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:NVML/; +$ref_files{$key} = "$dir".q|node10.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:QuickStart/; +$ref_files{$key} = "$dir".q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:Submission/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:Support/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:TechOver/; +$ref_files{$key} = "$dir".q|node10.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:TechOver2/; +$ref_files{$key} = "$dir".q|node12.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:TechOverPort/; +$ref_files{$key} = "$dir".q|node11.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:ThirdParty/; +$ref_files{$key} = "$dir".q|node10.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:Use/; +$ref_files{$key} = "$dir".q|node7.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:acc/; +$ref_files{$key} = "$dir".q|node10.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:download/; +$ref_files{$key} = "$dir".q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:glos/; +$ref_files{$key} = "$dir".q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:infrastructure/; +$ref_files{$key} = "$dir".q|node13.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:lapack/; +$ref_files{$key} = "$dir".q|node10.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:make/; +$ref_files{$key} = "$dir".q|node11.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:netcdf/; +$ref_files{$key} = "$dir".q|node10.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:pio/; +$ref_files{$key} = "$dir".q|node10.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:pnetcdf/; +$ref_files{$key} = "$dir".q|node10.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:principles-hierarchy/; +$ref_files{$key} = "$dir".q|node13.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:superstructure/; +$ref_files{$key} = "$dir".q|node13.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:systemreq/; +$ref_files{$key} = "$dir".q|node10.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:xerces/; +$ref_files{$key} = "$dir".q|node10.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:yaml-cpp/; +$ref_files{$key} = "$dir".q|node10.html|; +$noresave{$key} = "$nosave"; + +$key = q/testing/; +$ref_files{$key} = "$dir".q|node12.html|; +$noresave{$key} = "$nosave"; + +1; + diff --git a/docs/nightly/fix/reconcile-info/ESMF_usrdoc/labels.pl b/docs/nightly/fix/reconcile-info/ESMF_usrdoc/labels.pl new file mode 100644 index 000000000..19347a4ef --- /dev/null +++ b/docs/nightly/fix/reconcile-info/ESMF_usrdoc/labels.pl @@ -0,0 +1,1269 @@ +# LaTeX2HTML 2018 (Released Feb 1, 2018) +# Associate labels original text with physical files. + + +$key = q/BuildDocumentation/; +$external_labels{$key} = "$URL/" . q|node10.html|; +$noresave{$key} = "$nosave"; + +$key = q/BuildESMF/; +$external_labels{$key} = "$URL/" . q|node10.html|; +$noresave{$key} = "$nosave"; + +$key = q/ESMFRunSetting/; +$external_labels{$key} = "$URL/" . q|node12.html|; +$noresave{$key} = "$nosave"; + +$key = q/EnvironmentVariables/; +$external_labels{$key} = "$URL/" . q|node10.html|; +$noresave{$key} = "$nosave"; + +$key = q/InstallESMF/; +$external_labels{$key} = "$URL/" . q|node10.html|; +$noresave{$key} = "$nosave"; + +$key = q/RunUnitTests/; +$external_labels{$key} = "$URL/" . q|node12.html|; +$noresave{$key} = "$nosave"; + +$key = q/SystemTestDescription/; +$external_labels{$key} = "$URL/" . q|node12.html|; +$noresave{$key} = "$nosave"; + +$key = q/UnitTestDescription/; +$external_labels{$key} = "$URL/" . q|node12.html|; +$noresave{$key} = "$nosave"; + +$key = q/cite_ref:CF/; +$external_labels{$key} = "$URL/" . q|node16.html|; +$noresave{$key} = "$nosave"; + +$key = q/esmfmkfiletesting/; +$external_labels{$key} = "$URL/" . q|node12.html|; +$noresave{$key} = "$nosave"; + +$key = q/examples/; +$external_labels{$key} = "$URL/" . q|node12.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:TheESMFwich/; +$external_labels{$key} = "$URL/" . q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:appunit/; +$external_labels{$key} = "$URL/" . q|node13.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:hubspoke/; +$external_labels{$key} = "$URL/" . q|node13.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:point2point/; +$external_labels{$key} = "$URL/" . q|node13.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:threecomponents/; +$external_labels{$key} = "$URL/" . q|node13.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:360DayCal/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:API/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Accumulator/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Alarm/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Application/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Array/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:BUFR/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:BackGrid/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:CF/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:CRB/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Calendar/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Cell/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Clock/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:CompDomain/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:CompResource/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Component/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:ConcurrentExecution/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Congruent/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Coupler/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:CurvilinearGrid/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:DE/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:DELayout/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:DataDep/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:DataParallel/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:DataTranspose/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:DayOfYear/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Decomp_Element/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:DeepObjects/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:DistGrid/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Distribution/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:DomainDecomp/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:EP/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Exact/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:ExcDomain/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:ExchangeGrid/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Exec/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:ExportState/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Field/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:FieldBundle/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Framework/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:GRIB/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:GenericComp/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:GenericTrans/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:GlobBroadcast/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:GlobDomain/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:GlobReduction/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Gregorian_calendar/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Grid/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:GridComp/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:GridStagger/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:GridTile/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:GridTopo/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:GridUnion/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Halo/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:HaloUpdate/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:ImportState/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Index/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:IndexSpace/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:IndexSpaceLoc/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Instantiate/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Interface/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:JMC/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:JST/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:LocStream/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:LocalArray/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:LocalTile/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:LogRectGrid/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:LooseFieldBundle/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:MPMD/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Mask/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:MemDomain/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:MosaicGrid/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Namelist/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:NetCDF/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:NoLeap/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Node/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:PE/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:PET/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:PackedFieldBundle/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Parallel/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:PermET/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:PhysLoc/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Platform/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Processing_Element/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:RectilinearGrid/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:RegridWeightGenerationMethodsAndApplications/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:SPMD/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Scheduler/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Search/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:SequentialExecution/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Serial/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:ShallowObjects/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Span/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:State/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Sweep/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:SysTime/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:TaskParallel/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:TimeInstant/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:TimeInterval/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:TotDomain/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:UniformGrid/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:UserComp/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:UserTime/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:UserTrans/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:VAS/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:VM/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:VMachine/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/glos:WallClockTime/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/quickapps/; +$external_labels{$key} = "$URL/" . q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:Adoption/; +$external_labels{$key} = "$URL/" . q|node14.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:ArchOver/; +$external_labels{$key} = "$URL/" . q|node13.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:BuildOptions/; +$external_labels{$key} = "$URL/" . q|node11.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:CLTs/; +$external_labels{$key} = "$URL/" . q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:Debug/; +$external_labels{$key} = "$URL/" . q|node8.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:EsmfMkMethod/; +$external_labels{$key} = "$URL/" . q|node7.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:MOAB/; +$external_labels{$key} = "$URL/" . q|node10.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:NUMA/; +$external_labels{$key} = "$URL/" . q|node10.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:NVML/; +$external_labels{$key} = "$URL/" . q|node10.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:QuickStart/; +$external_labels{$key} = "$URL/" . q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:Submission/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:Support/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:TechOver/; +$external_labels{$key} = "$URL/" . q|node10.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:TechOver2/; +$external_labels{$key} = "$URL/" . q|node12.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:TechOverPort/; +$external_labels{$key} = "$URL/" . q|node11.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:ThirdParty/; +$external_labels{$key} = "$URL/" . q|node10.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:Use/; +$external_labels{$key} = "$URL/" . q|node7.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:acc/; +$external_labels{$key} = "$URL/" . q|node10.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:download/; +$external_labels{$key} = "$URL/" . q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:glos/; +$external_labels{$key} = "$URL/" . q|node15.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:infrastructure/; +$external_labels{$key} = "$URL/" . q|node13.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:lapack/; +$external_labels{$key} = "$URL/" . q|node10.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:make/; +$external_labels{$key} = "$URL/" . q|node11.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:netcdf/; +$external_labels{$key} = "$URL/" . q|node10.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:pio/; +$external_labels{$key} = "$URL/" . q|node10.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:pnetcdf/; +$external_labels{$key} = "$URL/" . q|node10.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:principles-hierarchy/; +$external_labels{$key} = "$URL/" . q|node13.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:superstructure/; +$external_labels{$key} = "$URL/" . q|node13.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:systemreq/; +$external_labels{$key} = "$URL/" . q|node10.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:xerces/; +$external_labels{$key} = "$URL/" . q|node10.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:yaml-cpp/; +$external_labels{$key} = "$URL/" . q|node10.html|; +$noresave{$key} = "$nosave"; + +$key = q/testing/; +$external_labels{$key} = "$URL/" . q|node12.html|; +$noresave{$key} = "$nosave"; + +1; + + +# LaTeX2HTML 2018 (Released Feb 1, 2018) +# labels from external_latex_labels array. + + +$key = q/BuildDocumentation/; +$external_latex_labels{$key} = q|9.8|; +$noresave{$key} = "$nosave"; + +$key = q/BuildESMF/; +$external_latex_labels{$key} = q|9.7|; +$noresave{$key} = "$nosave"; + +$key = q/ESMFRunSetting/; +$external_latex_labels{$key} = q|11.1.1|; +$noresave{$key} = "$nosave"; + +$key = q/EnvironmentVariables/; +$external_latex_labels{$key} = q|9.5|; +$noresave{$key} = "$nosave"; + +$key = q/InstallESMF/; +$external_latex_labels{$key} = q|9.9|; +$noresave{$key} = "$nosave"; + +$key = q/RunUnitTests/; +$external_latex_labels{$key} = q|11.1.2|; +$noresave{$key} = "$nosave"; + +$key = q/SystemTestDescription/; +$external_latex_labels{$key} = q|11.1.3|; +$noresave{$key} = "$nosave"; + +$key = q/UnitTestDescription/; +$external_latex_labels{$key} = q|11.1.2|; +$noresave{$key} = "$nosave"; + +$key = q/_/; +$external_latex_labels{$key} = q|<|; +$noresave{$key} = "$nosave"; + +$key = q/esmfmkfiletesting/; +$external_latex_labels{$key} = q|11.3|; +$noresave{$key} = "$nosave"; + +$key = q/examples/; +$external_latex_labels{$key} = q|11.2|; +$noresave{$key} = "$nosave"; + +$key = q/fig:TheESMFwich/; +$external_latex_labels{$key} = q|1|; +$noresave{$key} = "$nosave"; + +$key = q/fig:appunit/; +$external_latex_labels{$key} = q|2|; +$noresave{$key} = "$nosave"; + +$key = q/fig:hubspoke/; +$external_latex_labels{$key} = q|3|; +$noresave{$key} = "$nosave"; + +$key = q/fig:point2point/; +$external_latex_labels{$key} = q|4|; +$noresave{$key} = "$nosave"; + +$key = q/fig:threecomponents/; +$external_latex_labels{$key} = q|5|; +$noresave{$key} = "$nosave"; + +$key = q/glos:360DayCal/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:API/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Accumulator/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Alarm/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Application/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Array/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:BUFR/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:BackGrid/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:CF/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:CRB/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Calendar/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Cell/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Clock/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:CompDomain/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:CompResource/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Component/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:ConcurrentExecution/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Congruent/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Coupler/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:CurvilinearGrid/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:DE/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:DELayout/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:DataDep/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:DataParallel/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:DataTranspose/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:DayOfYear/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Decomp_Element/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:DeepObjects/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:DistGrid/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Distribution/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:DomainDecomp/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:EP/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Exact/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:ExcDomain/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:ExchangeGrid/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Exec/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:ExportState/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Field/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:FieldBundle/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Framework/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:GRIB/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:GenericComp/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:GenericTrans/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:GlobBroadcast/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:GlobDomain/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:GlobReduction/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Gregorian_calendar/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Grid/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:GridComp/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:GridStagger/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:GridTile/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:GridTopo/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:GridUnion/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Halo/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:HaloUpdate/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:ImportState/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Index/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:IndexSpace/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:IndexSpaceLoc/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Instantiate/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Interface/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:JMC/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:JST/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:LocStream/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:LocalArray/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:LocalTile/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:LogRectGrid/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:LooseFieldBundle/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:MPMD/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Mask/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:MemDomain/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:MosaicGrid/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Namelist/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:NetCDF/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:NoLeap/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Node/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:PE/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:PET/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:PackedFieldBundle/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Parallel/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:PermET/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:PhysLoc/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Platform/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Processing_Element/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:RectilinearGrid/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:RegridWeightGenerationMethodsAndApplications/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:SPMD/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Scheduler/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Search/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:SequentialExecution/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Serial/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:ShallowObjects/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Span/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:State/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:Sweep/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:SysTime/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:TaskParallel/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:TimeInstant/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:TimeInterval/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:TotDomain/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:UniformGrid/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:UserComp/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:UserTime/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:UserTrans/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:VAS/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:VM/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:VMachine/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/glos:WallClockTime/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/quickapps/; +$external_latex_labels{$key} = q|5.3.6|; +$noresave{$key} = "$nosave"; + +$key = q/sec:Adoption/; +$external_latex_labels{$key} = q|13|; +$noresave{$key} = "$nosave"; + +$key = q/sec:ArchOver/; +$external_latex_labels{$key} = q|12|; +$noresave{$key} = "$nosave"; + +$key = q/sec:BuildOptions/; +$external_latex_labels{$key} = q|10.1.1|; +$noresave{$key} = "$nosave"; + +$key = q/sec:CLTs/; +$external_latex_labels{$key} = q|8|; +$noresave{$key} = "$nosave"; + +$key = q/sec:Debug/; +$external_latex_labels{$key} = q|7|; +$noresave{$key} = "$nosave"; + +$key = q/sec:EsmfMkMethod/; +$external_latex_labels{$key} = q|6.1|; +$noresave{$key} = "$nosave"; + +$key = q/sec:MOAB/; +$external_latex_labels{$key} = q|9.4.8|; +$noresave{$key} = "$nosave"; + +$key = q/sec:NUMA/; +$external_latex_labels{$key} = q|9.4.9|; +$noresave{$key} = "$nosave"; + +$key = q/sec:NVML/; +$external_latex_labels{$key} = q|9.4.10|; +$noresave{$key} = "$nosave"; + +$key = q/sec:QuickStart/; +$external_latex_labels{$key} = q|5|; +$noresave{$key} = "$nosave"; + +$key = q/sec:Submission/; +$external_latex_labels{$key} = q|4|; +$noresave{$key} = "$nosave"; + +$key = q/sec:Support/; +$external_latex_labels{$key} = q|3|; +$noresave{$key} = "$nosave"; + +$key = q/sec:TechOver/; +$external_latex_labels{$key} = q|9|; +$noresave{$key} = "$nosave"; + +$key = q/sec:TechOver2/; +$external_latex_labels{$key} = q|11|; +$noresave{$key} = "$nosave"; + +$key = q/sec:TechOverPort/; +$external_latex_labels{$key} = q|10|; +$noresave{$key} = "$nosave"; + +$key = q/sec:ThirdParty/; +$external_latex_labels{$key} = q|9.4|; +$noresave{$key} = "$nosave"; + +$key = q/sec:Use/; +$external_latex_labels{$key} = q|6|; +$noresave{$key} = "$nosave"; + +$key = q/sec:acc/; +$external_latex_labels{$key} = q|9.4.5|; +$noresave{$key} = "$nosave"; + +$key = q/sec:download/; +$external_latex_labels{$key} = q|5.1|; +$noresave{$key} = "$nosave"; + +$key = q/sec:glos/; +$external_latex_labels{$key} = q|14|; +$noresave{$key} = "$nosave"; + +$key = q/sec:infrastructure/; +$external_latex_labels{$key} = q|12.3|; +$noresave{$key} = "$nosave"; + +$key = q/sec:lapack/; +$external_latex_labels{$key} = q|9.4.1|; +$noresave{$key} = "$nosave"; + +$key = q/sec:make/; +$external_latex_labels{$key} = q|10.1|; +$noresave{$key} = "$nosave"; + +$key = q/sec:netcdf/; +$external_latex_labels{$key} = q|9.4.2|; +$noresave{$key} = "$nosave"; + +$key = q/sec:pio/; +$external_latex_labels{$key} = q|9.4.4|; +$noresave{$key} = "$nosave"; + +$key = q/sec:pnetcdf/; +$external_latex_labels{$key} = q|9.4.3|; +$noresave{$key} = "$nosave"; + +$key = q/sec:principles-hierarchy/; +$external_latex_labels{$key} = q|12.1.3|; +$noresave{$key} = "$nosave"; + +$key = q/sec:superstructure/; +$external_latex_labels{$key} = q|12.2|; +$noresave{$key} = "$nosave"; + +$key = q/sec:systemreq/; +$external_latex_labels{$key} = q|9.3.1|; +$noresave{$key} = "$nosave"; + +$key = q/sec:xerces/; +$external_latex_labels{$key} = q|9.4.6|; +$noresave{$key} = "$nosave"; + +$key = q/sec:yaml-cpp/; +$external_latex_labels{$key} = q|9.4.7|; +$noresave{$key} = "$nosave"; + +$key = q/testing/; +$external_latex_labels{$key} = q|11.1|; +$noresave{$key} = "$nosave"; + +1; + diff --git a/docs/nightly/fix/reconcile-info/ESMF_usrdoc/next.png b/docs/nightly/fix/reconcile-info/ESMF_usrdoc/next.png new file mode 100644 index 000000000..1628652aa Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_usrdoc/next.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_usrdoc/next_g.png b/docs/nightly/fix/reconcile-info/ESMF_usrdoc/next_g.png new file mode 100644 index 000000000..3c1c3f569 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_usrdoc/next_g.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_usrdoc/node1.html b/docs/nightly/fix/reconcile-info/ESMF_usrdoc/node1.html new file mode 100644 index 000000000..5bf7fb60e --- /dev/null +++ b/docs/nightly/fix/reconcile-info/ESMF_usrdoc/node1.html @@ -0,0 +1,276 @@ + + + + + +Contents + + + + + + + + + + + + + + + + + + + + +
+ +

+Contents +

+ + + + + + +

+


+
+esmf_support@ucar.edu +
+ + diff --git a/docs/nightly/fix/reconcile-info/ESMF_usrdoc/node10.html b/docs/nightly/fix/reconcile-info/ESMF_usrdoc/node10.html new file mode 100644 index 000000000..5ac5dbbb0 --- /dev/null +++ b/docs/nightly/fix/reconcile-info/ESMF_usrdoc/node10.html @@ -0,0 +1,2924 @@ + + + + + +9 Building and Installing ESMF + + + + + + + + + + + + + + + + + + + + + +Subsections + + + +
+ +

+ +
+9 Building and Installing ESMF +

+ +

+This section goes into more detail about how to build and install the ESMF +software. + +

+ +

+9.1 ESMF Download Options +

+ +

+Major releases of the ESMF software can be downloaded by following +the instructions on the the Download link on the ESMF +website, http://www.earthsystemmodeling.org. + +

+The ESMF is distributed as a full source code tree. +Follow the instructions in the following sections +to build the library and link it with your application. + +

+ +

+9.2 Acquiring Development Snapshots +

+Occasionally, it is helpful to acquire a development snapshot of ESMF +in order to test emerging capabilities, optimizations, and bug fixes +before they are available in a formal release. Development snaphots +are “use at your own risk.” Efforts are made to ensure that most unit +and system tests are passing on typical platforms, but there are no +guarantees of the stability of development snapshots. New APIs available +in development snapshots may change before the next release. + +

+Users aware of these risks may check out development snapshots +using the appropriate git tag. + +

+Starting with ESMF 8.3.0 beta snapshot 07, the naming convention for development tags has the form: + +

+

+v<VERSION>b<NUMBER>
+
+ +

+For example: +

+v8.3.0b07
+
+ +

+Prior to this version, the tag naming convention for development tags is: + +

+

+ESMF_<VERSION>_beta_snapshot_<NUMBER>
+
+ +

+For example: +

+ESMF_8_2_0_beta_snapshot_23
+
+ +

+Use the following example command as a guide to check out a specific development tag: + +

+

+  git clone https://github.com/esmf-org/esmf.git --branch v8.3.0b13 --depth 1
+
+ +

+Once downloaded, development snapshots are built in the same way as releases. + +

+ +

+9.3 System Specific Information +

+ +

+ +

+ +
+9.3.1 General Requirements +

+ +

+The following compilers and utilities are required for compiling, linking and +testing the ESMF software. It is good common practice to use a consistent set +of Fortran/C++/C compilers from the same vendor, e.g. GNU, Intel, etc. +However, some vendor combinations of Fortran, C++, and C compilers, +e.g. Intel ifort with GNU g++, are also supported. + +

    +
  • Fortran compiler: + +
      +
    • GNU's gfortran v7.0 and newer, or +
    • +
    • Intel's ifort v18.0 and newer, or +
    • +
    • PGI's pgf90 v18.1 and newer, or +
    • +
    • NVHPC's nvfortran, or +
    • +
    • NAG's nagfor, or +
    • +
    • IBM's xlf, or +
    • +
    • CCE's ftn. + +
    • +
    +
  • +
  • C++ compiler: + +
      +
    • GNU's g++ v7.0 and newer, or +
    • +
    • Intel's icpc v18.0 and newer, or +
    • +
    • PGI's pgCC v18.1 and newer, or +
    • +
    • NVHPC's nvc++, or +
    • +
    • IBM's xlC, or +
    • +
    • CCE's CC. +
    • +
    • LLVM's clang + +
    • +
    +
  • +
  • C compiler: + +
      +
    • GNU's gcc v7.0 and newer, or +
    • +
    • Intel's icc v18.0 and newer, or +
    • +
    • PGI pgcc v18.1 and newer, or +
    • +
    • NVHPC's nvcc, or +
    • +
    • IBM's xlc, or +
    • +
    • CCE's cc. +
    • +
    • LLVM's clang + +
    • +
    +
  • +
  • MPI implementation compatible with the above compilers (but also see below +for the MPI-bypass build option): + +
      +
    • OpenMPI v3.0 and newer, or +
    • +
    • MPICH v2.1 and newer, or +
    • +
    • MVAPICH2 v2.0 and newer, or +
    • +
    • IntelMPI v18.0 and newer, or +
    • +
    • MPT 2.17 and newer, or +
    • +
    • CRAY-MPICH v7.7 and newer. + +
    • +
    +
  • +
  • GNU's gcc compiler +- +for a standard cpp preprocessor implementation. +
  • +
  • GNU Make. +
  • +
  • Perl +- for running +test scripts. +
  • +
+ +

+Internal packages that can optionally reference external libraries: + +

    +
  • LAPACK - version 3.x or newer +
  • +
  • ParallelIO (PIO) - version 2.5.10 or newer +
  • +
  • yaml-cpp - tag yaml-cpp-0.6.2 or newer +
  • +
+ +

+Optional external packages that must be specified for certain functions: + +

    +
  • NetCDF - version 3.6.x or newer (version 4.4 or newer required by PIO) +
  • +
  • parallel-NetCDF - version 1.2.0 or newer (version 1.12 or newer required by PIO) +
  • +
  • Xerces - version 3.1.0 or newer +
  • +
+ +

+ESMF can be built using a single-processor MPI-bypass library +that comes with ESMF by setting ESMF_COMM=mpiuni. This allows ESMF applications +to be linked and run in single-process mode. + +

+In order to build html and pdf versions of the ESMF documentation, +LATEX, +the latex2html +conversion utility, and the Unix/Linux dvipdf utility must be installed. +The csh shell is also required to complete the documentation build. + +

+ +

+9.3.2 Intel Compiler (Classic and oneAPI) +

+ +

+ESMF supports the Intel compiler suite via ESMF_COMPILER=intel. Starting in 2020, Intel began promoting their +new LLVM-based C/C++ and Fortran compiler line under the oneAPI brand. As of 2023, the older compilers are still +part of the Intel compiler suite and referred to as Intel Compiler Classic. ESMF supports both the classic and oneAPI +compiler lines. The following paragraphs provide important details that allow users to fine-tune the interaction +with the Intel compilers. + +

+Under ESMF_OS=Linux, with ESMF_COMPILER=intel and ESMF_COMM=mpiuni set, the C, C++, and +Fortran compiler front-ends default to the classic options icc, icpc, and ifort, respectively. Any +of these defaults can be overridden by explicitly setting the ESMF_C, ESMF_CXX, or ESMF_F90 +environment variables to the oneAPI options icx, icpx, and ifx, respectively. + +

+Under ESMF_OS=Linux, with ESMF_COMPILER=intel and ESMF_COMM=intelmpi set, the C, C++, and +Fortran compiler front-ends default to the MPI compiler wrappers mpiicc, mpicpc, and mpiifort, +respectively. It depends on the IntelMPI installation details whether classic, oneAPI, or a mixture of compilers +are used underneath the MPI wrappers. The IntelMPI defaults can be overridden by explicitly setting the +I_MPI_CC, I_MPI_CXX, or I_MPI_F90 environment variables. This is an IntelMPI feature. + +

+The recommendation for Cray systems that use the Cray compiler wrappers cc, CC, and ftn, +respectively, is to use ESMF_OS=Unicos. In most cases this setting is detected automatically by the ESMF +build system, and should not be overridden. + +

+Under ESMF_OS=Unicos, with ESMF_COMPILER=intel, the C, C++, and Fortran compiler front-ends default to +cc, CC, and ftn, respectively, regardless of the ESMF_COMM setting. The appropriate +classic, oneAPI, or mixed compiler combination is typically determined by the Intel environment module loaded. +Common module names on Cray systems are intel-classic, intel-oneAPI, and intel, respectively. + +

+Tip: Use the ESMF "make info" target to query compiler version information. This can be used to determine the +appropriate settings, and to diagnose issues before kicking off the complete ESMF build procedure. + +

+ +

+9.3.3 MacOS Darwin +

+ +

+ESMF supports MacOS systems via the ESMF_OS=Darwin setting, which +typically is auto-detected by the ESMF build system. Various compilers and +MPI implementations are supported under Darwin using the ESMF_COMPILER +and ESMF_COMM environment variables. There are some combinations under +Darwin that require special attention; these combinations are listed below. + +

+On Darwin with ESMF_COMPILER=gfortran and ESMF_COMM=mpich, +using MPICH3 built from source, it is important to specify the +-enable-two-level-namespace configure option when building the MPICH3 +library. By default, i.e. without this option, the produced MPICH compiler +wrappers include a linker flag (-flat_namespace) that causes issues with +C++ exception handling under GNU g++. Building and linking ESMF applications +with MPICH compiler wrappers that specify this linker option leads to +"mysterious" application aborts during execution. + +

+On Darwin with ESMF_COMPILER=intel, command line arguments cannot be +accessed from ESMF applications when linked against the shared library version +(libesmf.dylib). There is no issue when linked against the static +version (libesmf.a). Setting the environment variable +ESMF_SHARED_LIB_BUILD=OFF when building ESMF can be used as a +work around for this issue. + +

+ +

+ +
+9.4 Third Party Libraries +

+ +

+Some portions of the ESMF library can offer enhanced capabilities when +certain third party libraries are available. This section describes +these dependencies and the associated environment settings +that allow the user to control them. + +

+On many platforms, the ESMF library is also created as a shared library. +When third party libraries are called from ESMF, it is recommended that they are +also available as shared libraries. In cases where they are not, they should at +least be compiled with the position independent code option enabled (e.g., -fPIC on +Linux with gfortran/gcc) where necessary, so that the ESMF shared library +build can successfully incorporate them. + +

+ +

+ +
+9.4.1 LAPACK +

+The patch recovery regridding method of the ESMF Mesh class requires solving +local least squares problems. It uses the +LAPACK +DGELSY solver +to carry out this task. + +

+The following environment variables control whether a minimal set of +LAPACK code that comes with ESMF is used, or whether ESMF should link against +an externally available LAPACK installation. Alternatively, ESMF's +LAPACK-dependent features can be turned off altogether. + +

+

+
ESMF_LAPACK
+
Possible value: "internal" (default), "OFF", + "system", "mkl", "netlib", "scsl", openblas, <userstring>. + +

+

+
"internal" (default)
+
ESMF will be compiled with LAPACK-dependent +features. A minimal set of LAPACK/BLAS code included in ESMF will be used +to satisfy the dependencies. + +

+

+
"OFF"
+
Disables LAPACK-dependent code. + +

+

+
"system"
+
A system-dependent external LAPACK/BLAS installation +is used to satisfy the external dependencies of the LAPACK-dependent ESMF code. +Sets ESMF_LAPACK_LIBS appropriately. + +

+

+
"mkl"
+
The Intel MKL library is used to satisfy the external +dependencies of the LAPACK-dependent ESMF code. When ESMF_COMPILER is set to +"intel", ESMF_LAPACK_LIBS is set to "-mkl". Otherwise ESMF_LAPACK_LIBS +is set to "-lmkl_lapack -lmkl", unless it is already defined in the user +environment. + +

+

+
"netlib"
+
The NETLIB library is used to satisfy the external +dependencies of the LAPACK-dependent ESMF code. Sets ESMF_LAPACK_LIBS to +"-llapack -lblas", unless it is already defined in the user environment. + +

+

+
"scsl"
+
The SCSL library is used to satisfy the external +dependencies of the LAPACK-dependent ESMF code. Sets ESMF_LAPACK_LIBS to +"-lscs", unless it is already defined in the user environment. + +

+

+
"openblas"
+
The OpenBLAS library is used to satisfy the external +dependencies of the LAPACK-dependent ESMF code. Sets ESMF_LAPACK_LIBS to +"-openblas", unless it is already defined in the user environment. + +

+

+
<userstring>
+
Enables ESMF's LAPACK-dependent code, but does not set +a default for ESMF_LAPACK_LIBS. ESMF_LAPACK_LIBS, and if +required, ESMF_LAPACK_LIBPATH, must be set explicitly in the user +environment. +
+
+ +

+

+
ESMF_LAPACK_LIBPATH
+
Typical value: /usr/local/lib (no default). + +

+Specifies the path where the LAPACK library is located. + +

+

+
ESMF_LAPACK_LIBS
+
Typical value: "-llapack -lblas" +(default is dependent on ESMF_LAPACK). + +

+Specifies the linker directive needed to link the LAPACK library to +the application. On some systems, the BLAS library must also be included. +

+
+ +

+ +

+ +
+9.4.2 NetCDF +

+ESMF provides the ability to read Grid and Mesh data in +NetCDF +format. + +

+Beginning with NetCDF 4.2, the C and Fortran API libraries are released as separate packages. +To compile ESMF with NetCDF 4.2 and newer releases, the ESMF_NETCDF environment variable +can be set to "split". The "split" option requires the NetCDF C library, +and the NetCDF Fortran API library be installed in the same directory. As an alternative, +the "nc-config" option may be used to automatically determine the include and lib directory +locations. The "nc-config" option supports separate C and Fortran directories. + +

+The following environment variables enable, and specify the name and location +of the desired NetCDF library and associated header files: + +

+

+
ESMF_NETCDF
+
Possible value: not set (default), "nc-config", "split", +"standard", <userstring>. + +

+

+
not set (default)
+
NetCDF-dependent features will be disabled. +The ESMF_NETCDF_INCLUDE, ESMF_NETCDF_LIBPATH, and +ESMF_NETCDF_LIBS environment variables will be ignored. + +

+

+
"nc-config"
+
The NetCDF nc-config and if available, nf-config, +tools will be used to determine the proper settings of ESMF_NETCDF_INCLUDE, +ESMF_NETCDF_LIBPATH, and ESMF_NETCDF_LIBS. The shell PATH +environment variable must include the NetCDF bin directories where nc-config +and nf-config reside. This option supports having the main NetCDF library and the +Fortran API library reside in separate directories. + +

+

+
"split"
+
ESMF_NETCDF_LIBS will be set to +"-lnetcdff -lnetcdf". This option is useful for systems +which have the Fortran and C bindings archived in separate library files. +The ESMF_NETCDF_INCLUDE and ESMF_NETCDF_LIBPATH +environment variables will also be used, if defined. + +

+

+
"standard"
+
ESMF_NETCDF_LIBS will be set to +"-lnetcdf". This option is useful when the Fortran and +C bindings are archived together in the same library file. The ESMF_NETCDF_INCLUDE +and ESMF_NETCDF_LIBPATH environment variables will also be used, +if defined. + +

+

+
<userstring>
+
If set, ESMF_NETCDF_INCLUDE, +ESMF_NETCDF_LIBPATH, and ESMF_NETCDF_LIBS environment +variables will be used, if defined. +
+
+ +

+

+
ESMF_NETCDF_INCLUDE
+
Typical value: /usr/local/include +(no default). + +

+Specifies the path where the NetCDF header files are located. + +

+

+
ESMF_NETCDF_LIBPATH
+
Typical value: /usr/local/lib (no default). + +

+Specifies the path where the NetCDF library file is located. + +

+

+
ESMF_NETCDF_LIBS
+
Typical value: "-lnetcdf" + +

+Specifies the linker directives needed to link the NetCDF library to +the application. + +

+The default value depends on the setting of ESMF_NETCDF. For the +typical case where ESMF_NETCDF is set to "standard", +ESMF_NETCDF_LIBS is set to "-lnetcdf". +When ESMF_NETCDF is set to "split", ESMF_NETCDF_LIBS +is set to "-lnetcdff -lnetcdf". + +

+If the hdf5 library is required, append "-lhdf5_hl -lhdf5" to the +desired setting. E.g. "-lnetcdff -lnetcdf -lhdf5_hl -lhdf5" +

+
+ +

+ +

+ +
+9.4.3 Parallel-NetCDF +

+ESMF provides the ability to write data using +Parallel-NetCDF. + +

+Some file systems, for example Lustre, may need +to have locking attributes enabled when the file system is mounted. + +

+The following environment variables enable and specify the name and +location of the desired Parallel-NetCDF library and associated header files: + +

+

+
ESMF_PNETCDF
+
Possible value: not set (default), "pnetcdf-config", +"standard", <userstring>. + +

+When defined, enables the use of Parallel-NetCDF. + +

+

+
not set (default)
+
PNETCDF-dependent features will be disabled. +The ESMF_PNETCDF_INCLUDE, ESMF_PNETCDF_LIBPATH, and +ESMF_PNETCDF_LIBS environment variables will be ignored. + +

+

+
"pnetcdf-config"
+
The PNetCDF pnetcdf-config tool will be used +to determine the proper settings of ESMF_PNETCDF_INCLUDE, +ESMF_PNETCDF_LIBPATH, and ESMF_PNETCDF_LIBS. The shell PATH +environment variable must include the PNetCDF bin directory where pnetcdf-config +resides. + +

+

+
"standard"
+
ESMF_PNETCDF_LIBS will be set to +"-lpnetcdf". The ESMF_PNETCDF_INCLUDE and +ESMF_PNETCDF_LIBPATH environment variables will also be used, +if defined. + +

+

+
<userstring>
+
If set, ESMF_PNETCDF_INCLUDE, +ESMF_PNETCDF_LIBPATH, and ESMF_PNETCDF_LIBS environment +variables will be used. +
+
+ +

+

+
ESMF_PNETCDF_INCLUDE
+
Typical value: /usr/local/include +(no default). + +

+Specifies the path where the Parallel-NetCDF header files are located. + +

+

+
ESMF_PNETCDF_LIBPATH
+
Typical value: /usr/local/lib (no default). + +

+Specifies the path where the Parallel-NetCDF library file is located. + +

+

+
ESMF_PNETCDF_LIBS
+
Typical value: "-lpnetcdf". + +

+Specifies the linker directives needed to link the Parallel-NetCDF library to the +application. +

+
+ +

+ +

+ +
+9.4.4 PIO +

+ESMF provides the ability to read and write data in +NetCDF format through ParallelIO (PIO), a third-party I/O software +library that is integrated into the ESMF library. The following environment +variable enables PIO functionality inside of ESMF. + +

+The PIO code depends on MPI I/O support by the underlying MPI +implementation for parallel I/O. Almost all current MPI +implementations support MPI I/O to the required degree. For NetCDF format +support the integrated PIO code depends on ESMF_NETCDF (see 9.4.2) +being enabled and optionally ESMF_PNETCDF (see 9.4.3) +being enabled. + +

+

+
ESMF_PIO
+
Possible value: not set (default), "internal", +"external", "OFF". + +

+

+
not set (default)
+
PIO-dependent features will be enabled on supported +platforms, as determined by the ESMF build configuration. + +

+

+
"internal"
+
PIO-dependent features will be enabled and will use the +PIO library that is included and built with ESMF. Internal builds of PIO require +CMake version 2.8.12 or newer be available in the path. + +

+

+
"external"
+
PIO-dependent features will be enabled and will use an +external PIO library. The additional parameters ESMF_PIO_INCLUDE +(path to PIO include files) and ESMF_PIO_LIBPATH (path to PIO library +files) should also be set when using this option. The minimum version of PIO for +this option is 2.5.10. + +

+

+
"OFF"
+
Disables PIO-dependent code. + +

+

+
+ +

+

+
ESMF_PIO_INCLUDE
+
(no default) + +

+Specifies the path where the PIO header files are located. + +

+

+
ESMF_PIO_LIBPATH
+
(no default) + +

+Specifies the path where the PIO library is located. + +

+

+
+ +

+ +

+ +
+9.4.5 Accelerator Software Stacks +

+ESMF provides the ability to query various third party accelerator software +stacks and gather information about the accelerator devices available in a +system. The users can query the number of accelerator devices accessible +from a PET using the OpenCL, OpenACC, Intel MIC and OpenMP software stacks. + +

+The following environment variables enable, and specify the name and location +of the desired accelerator software stacks and associated header files: + +

+

+
ESMF_ACC_SOFTWARE_STACK
+
Possible value: +not set (default), "opencl", "openacc", +"intelmic", "openmp4". + +

+

+
not set (default)
+
All accelerator software stack related features + will be disabled. +The ESMF_ACC_SOFTWARE_STACK_INCLUDE, +ESMF_ACC_SOFTWARE_STACK_LIBPATH, and +ESMF_ACC_SOFTWARE_STACK_LIBS environment variables will be ignored. + +

+

+
"opencl"
+
The ESMF library will use the OpenCL +framework to query information about accelerator devices in the system. +The ESMF_ACC_SOFTWARE_STACK_INCLUDE, +ESMF_ACC_SOFTWARE_STACK_LIBPATH and +ESMF_ACC_SOFTWARE_STACK_LIBS environment variables will be used +to build and link the library. + +

+

+
"openacc"
+
The ESMF library will use the interfaces defined +in the OpenACC standard to query information about accelerator devices +in the system. +The ESMF_ACC_SOFTWARE_STACK_INCLUDE, +ESMF_ACC_SOFTWARE_STACK_LIBPATH and +ESMF_ACC_SOFTWARE_STACK_LIBS environment variables are not typically +defined since the standard is supported inherently by a OpenACC standard +compliant compiler. + +

+

+
"intelmic"
+
The ESMF library will use the interfaces defined +by the Intel MIC software stack to query information about accelerator devices +in the system. +The ESMF_ACC_SOFTWARE_STACK_INCLUDE, +ESMF_ACC_SOFTWARE_STACK_LIBPATH and +ESMF_ACC_SOFTWARE_STACK_LIBS environment variables are not typically +defined since the standard is supported inherently by the Intel compiler. + +

+

+
"openmp4"
+
The ESMF library will use the interfaces defined +in the OpenMP v4.0 standard to query information about accelerator devices +in the system. +The ESMF_ACC_SOFTWARE_STACK_INCLUDE, +ESMF_ACC_SOFTWARE_STACK_LIBPATH and +ESMF_ACC_SOFTWARE_STACK_LIBS environment variables are not typically +defined since the standard is supported inherently by a standard compliant +compiler. + +

+

+
+ +

+

+
ESMF_ACC_SOFTWARE_STACK_INCLUDE
+
(no default) + +

+Specifies the path where the header files for the accelerator software +stack is located. If not set, this environment variable is ignored. + +

+

+
ESMF_ACC_SOFTWARE_STACK_LIBPATH
+
(no default) + +

+Specifies the path where the libraries for the accelerator software +stack is located. If not set, this environment variable is ignored. + +

+

+
ESMF_ACC_SOFTWARE_STACK_LIBS
+
(no default) + +

+Specifies the linker directives required to link the library with +the accelerator software stack. If not set, this environment variable +is ignored. + +

+

+
+ +

+ +

+ +
+9.4.6 XERCES +

+ESMF provides the ability to read Attribute data in XML file format +via the XERCES C++ +library. (Writing Attribute XML files is performed with the standard C++ +output file stream facility, rather than with Xerces). The following +environment variables enable, and specify the name and location of the +desired XERCES C++ library and associated header files: + +

+

+
ESMF_XERCES
+
Possible value: not set (default), "standard", +<userstring>. + +

+

+
not set (default)
+
XERCES-dependent features will be disabled. +The ESMF_XERCES_INCLUDE, ESMF_XERCES_LIBPATH, and +ESMF_XERCES_LIBS environment variables will be ignored. + +

+

+
"standard"
+
ESMF_XERCES_LIBS will be set to +"-lxerces-c". The ESMF_XERCES_INCLUDE and +ESMF_XERCES_LIBPATH environment variables will also be used, +if defined. + +

+

+
<userstring>
+
If set, ESMF_XERCES_INCLUDE, +ESMF_XERCES_LIBPATH, and ESMF_XERCES_LIBS environment +variables will be used, if defined. +
+
+ +

+

+
ESMF_XERCES_INCLUDE
+
Typical value: /usr/local/include +(no default). + +

+Specifies the path where the XERCES C++ header files are located. + +

+

+
ESMF_XERCES_LIBPATH
+
Typical value: /usr/local/lib (no default). + +

+Specifies the path where the XERCES C++ library file is located. + +

+

+
ESMF_XERCES_LIBS
+
Typical value: "-lxerces-c". + +

+Specifies the linker directives needed to link the XERCES C++ library to +the application. + +

+The default value depends on the setting of ESMF_XERCES. For the +typical case where ESMF_XERCES is set to "standard", +ESMF_XERCES_LIBS is set to "-lxerces-c". +

+
+ +

+ +

+ +
+9.4.7 yaml-cpp +

+Support for I/O in YAML Ain't Markup Language +(YAMLTM) +may be added to ESMF through the open-source +yaml-cpp +library, +a YAML parser and emitter written in C++ that implements +YAML Version 1.2 specifications. + +

+ESMF includes the option to build the yaml-cpp from sources kept inside the +ESMF source tree, or to link against an external build of the yaml-cpp library. +The following environment variables control the details of how ESMF interacts +with yaml-cpp: + +

+

+
ESMF_YAMLCPP
+
Possible values: "internal" (default), "OFF", +"standard", <userstring>. + +

+

+
"internal" (default)
+
The YAML-dependent code inside of ESMF will +be enabled. +The yaml-cpp sources included with ESMF will be used to provide YAML support. +The ESMF_YAMLCPP_INCLUDE, ESMF_YAMLCPP_LIBPATH, and +ESMF_YAMLCPP_LIBS environment variables will be ignored. + +

+

+
"OFF"
+
Disables YAML-dependent code. + +

+

+
"standard"
+
The YAML-dependent code inside of ESMF will +be enabled. +ESMF_YAMLCPP_LIBS will be set to "-lyaml-cpp" if not set. +The ESMF_YAMLCPP_INCLUDE and ESMF_YAMLCPP_LIBPATH environment +variables will also be used, if defined. + +

+

+
<userstring>
+
The YAML-dependent code inside of ESMF will +be enabled. +If set, ESMF_YAMLCPP_INCLUDE, ESMF_YAMLCPP_LIBPATH, and +ESMF_YAMLCPP_LIBS environment variables will be used. +
+
+ +

+

+
ESMF_YAMLCPP_INCLUDE
+
Typical value: /usr/local/include +(no default). + +

+Specifies the path where the yaml-cpp C++ header files are located. + +

+

+
ESMF_YAMLCPP_LIBPATH
+
Typical value: /usr/local/lib (no default). + +

+Specifies the path where the yaml-cpp C++ library file is located. + +

+

+
ESMF_YAMLCPP_LIBS
+
Typical value: "-lyaml-cpp". + +

+Specifies the linker directives needed to link the yaml-cpp C++ library to +the application. + +

+The default value depends on the setting of ESMF_YAMLCPP. For the +typical case where ESMF_YAMLCPP is set to "standard", +ESMF_YAMLCPP_LIBS is set to "-lyaml-cpp". +

+
+ +

+ +

+ +
+9.4.8 MOAB +

+ +

+The Mesh Oriented datABase +(MOAB) +can be used to build an ESMF unstructured Mesh as an alternative to the +"native" ESMF Mesh implementation. The decision to use either MOAB or the +native ESMF Mesh implementation is made at run time. This aspect is described +in the Reference Manual, section ESMF_MeshSetMOAB() .The default is to use +the native ESMF Mesh. ESMF will build an internal version of MOAB by default, +but an external MOAB installation can be used if desired. The build parameters +covered in this section are used to determine which version of MOAB is +available to ESMF. + +

+

+
ESMF_MOAB
+
Possible values: "internal" (default), "OFF", +"external". + +

+

+
"internal" (default)
+
The MOAB dependent code inside of ESMF will +be enabled. +The MOAB sources included with ESMF will be used to provide MOAB support. +The ESMF_MOAB_INCLUDE, ESMF_MOAB_LIBPATH, and +ESMF_MOAB_LIBS environment variables will be ignored. + +

+

+
"OFF"
+
Disables MOAB dependent code. + +

+

+
"external"
+
The MOAB dependent code inside of ESMF will +be enabled. +The ESMF_MOAB_INCLUDE, ESMF_MOAB_LIBPATH and +ESMF_MOAB_LIBS environment variables must also be specified. +
+
+ +

+

+
ESMF_MOAB_INCLUDE
+
Typical value: /usr/local/include +(no default). + +

+Specifies the path where the MOAB C++ header files are located. + +

+

+
ESMF_MOAB_LIBPATH
+
Typical value: /usr/local/lib (no default). + +

+Specifies the path where the MOAB C++ library file is located. + +

+

+
ESMF_MOAB_LIBS
+
Typical value: "-lMOAB" (no default). + +

+Specifies the linker directives needed to link the MOAB C++ library to +the application. + +

+

+
+ +

+ +

+ +
+9.4.9 NUMA +

+ +

+The LibNUMA API for Non Uniform Memory Access +(NUMA) +can be used to discover the NUMA architecture at run-time. + +

+

+
ESMF_NUMA
+
Possible values: "ON", "standard", "OFF" (default). + +

+

+
"ON"/"standard"
+
The NUMA dependent code inside of ESMF will +be enabled. +The ESMF_NUMA_LIBS environment variable will be set to +"-lnuma". + +

+

+
"OFF" (default)
+
Disables NUMA dependent code. +
+
+ +

+

+
ESMF_NUMA_INCLUDE
+
Typically not needed. (no default). + +

+Specifies the path where the NUMA header files are located. + +

+

+
ESMF_NUMA_LIBPATH
+
Typically not needed. (no default). + +

+Specifies the path where the NUMA library file is located. + +

+

+
ESMF_NUMA_LIBS
+
Typical value: "-lnuma". + +

+Specifies the linker directives needed to link the NUMA library to +the application. + +

+

+
+ +

+ +

+ +
+9.4.10 NVML +

+ +

+The NVIDIA Management Library +(NVML) +can be used to discover NVIDIA GPUs that are accessible at run-time. + +

+

+
ESMF_NVML
+
Possible values: "ON", "standard", "OFF" (default). + +

+

+
"ON"/"standard"
+
The NVML dependent code inside of ESMF will +be enabled. +The ESMF_NVML_LIBS environment variable will be set to +"-lnvidia-ml". + +

+

+
"OFF" (default)
+
Disables NVML dependent code. +
+
+ +

+

+
ESMF_NVML_INCLUDE
+
Typically not needed. (no default). + +

+Specifies the path where the NVML header files are located. + +

+

+
ESMF_NVML_LIBPATH
+
Typically not needed. (no default). + +

+Specifies the path where the NVML library file is located. + +

+

+
ESMF_NVML_LIBS
+
Typical value: "-lnvidia-ml". + +

+Specifies the linker directives needed to link the NVML library to +the application. + +

+

+
+ +

+ +

+ +
+9.5 ESMF Environment Variables +

+ +

+The following is a full alphabetical list of all environment variables which +are used by the ESMF build system. The ESMF_DIR must be set in all +circumstances, while most other environment variables have defaults. However, +it is recommended to explicitly set the compiler and MPI flavor using +ESMF_COMPILER and ESMF_COMM, respectively, to ensure the expected +behavior. + +

+

+
ESMF_ABI
+
Possible value: 32, 64, x86_64_32, x86_64_small, x86_64_medium + +

+If a system supports 32-bit and 64-bit (pointer wordsize) application binary +interfaces (ABIs), this variable can be set to select which ABI to use. Valid +values are 32 or 64. By default the most common ABI is chosen. On +x86_64 architectures three additional, more specific ABI settings are available, +x86_64_32, x86_64_small and x86_64_medium. + +

+

+
ESMF_ARRAY_LITE
+
Possible value: TRUE, FALSE (default) + +

+Not normally set by user. ESMF auto-generates subroutine interfaces for a wide +variety of data arrays of different ranks, shapes, and types. Setting this +variable to TRUE instructs ESMF to not generating interfaces for +5D, 6D, and 7D arrays. This shrinks the amount of autogenerated code as well +as the number of overloaded interfaces. + +

+

+
ESMF_BOPT
+
Possible value: g, O (default) + +

+This environment variable controls the build option. To make a debuggable +version of the library set ESMF_BOPT to g before building. The +default is O (capital oh) which builds an optimized version of the +library. If ESMF_BOPT is O, ESMF_OPTLEVEL can also be set +to a numeric value between 0 and 4 to select a specific optimization level. + +

+

+
ESMF_C
+
Possible value: executable + +

+This variable can be used to override the default C compiler and linker +front-end executables. The executable may be specified with absolute path +overriding the location determined by default from the user's PATH variable. + +

+

+
ESMF_COMM
+
Possible value: system-dependent + +

+On systems with a vendor-supplied MPI communications library, the vendor library +is chosen by default for communications. On these systems ESMF_COMM is +set to mpi, signaling to the ESMF build system to use the vendor MPI +implementation. +For other systems (e.g. Linux or Darwin) where a multitude of MPI +implementations are available, ESMF_COMM must be set to indicate which +implementation is used to build the ESMF library. Set ESMF_COMM according +to your situation to: mpt, mpich, mpich1, mpich2, mpich3, mvapich2, lam, openmpi +or intelmpi. ESMF_COMM may also be set to user indicating +that the user will set all the required flags using advanced ESMF environment +variables. Some individual MPI builds may create additional libraries that +need to be linked in, such as the legacy C++ bindings. These may be specified +via the ESMF_CXXLINKLIBS and ESMF_F90LINKLIBS environment +variables. + +

+Alternatively, ESMF comes with a single-processor MPI-bypass library which is +the default for Linux and Darwin systems. To force the use of this bypass +library set ESMF_COMM equal to mpiuni. + +

+

+
ESMF_COMPILER
+
Possible value: system-dependent + +

+The ESMF library build requires a working Fortran90 and C++ compiler. On +platforms that don't come with a single vendor supplied compiler suite +(e.g. Linux or Darwin) it is recommended to explicitly set ESMF_COMPILER +to the desired compiler flavor. Notice that setting +the ESMF_COMPILER variable does not affect how the compiler +executables are located on the system. ESMF_COMPILER (together with +ESMF_COMM) affect the name that is expected for the compiler executables. +Furthermore, the ESMF_COMPILER setting is used to select compiler and +linker flags consistent with the compilers indicated. + +

+By default Fortran and C++ compiler executables are expected to be located in +a location contained in the user's PATH environment variable. This means +that if you cannot locate the correct compiler executable via the which +command on the shell prompt the ESMF build system won't find it either! + +

+There are advanced ESMF environment variables that can be used to select +specific compiler executables by specifying the full path. This can be used to +pick specific compiler executables without having to modify the PATH +environment variable. + +

+Use 'make info' to see which compiler executables the ESMF build system will +be using according to your environment variable settings. + +

+To see possible values for ESMF_COMPILER, cd to +$ESMF_DIR/build_config and list the directories there. The first part +of each directory name corresponds to the output of 'uname -s' for this +platform. The second part contains possible values for ESMF_COMPILER. In +some cases multiple combinations of Fortran and C++ compilers are possible, e.g. +there is intel and intelgcc available for Linux. Setting +ESMF_COMPILER to intel indicates that both Intel Fortran and +C++ compilers are used, whereas intelgcc indicates that the Intel Fortran +compiler is used in combination with GCC's C++ compiler. + +

+If you do not find a configuration that matches your situation you will need to +port ESMF. + +

+

+
ESMF_CXX
+
Possible value: executable + +

+This variable can be used to override the default C++ compiler and linker +front-end executables. The executable may be specified with absolute path +overriding the location determined by default from the user's PATH variable. + +

+

+
ESMF_CXXCOMPILEOPTS
+
Possible value: list of flags + +

+Prepend compiler flags to the list of flags the ESMF build system determines. + +

+

+
ESMF_CXXCOMPILEPATHS
+
Possible value: list of paths, each prepended with -I + +

+Prepend compiler search paths to the list of search paths the ESMF build system +determines. + +

+

+
ESMF_CXXCOMPILER
+
Possible value: executable + +

+This variable can be used to override the default C++ compiler +front-end executables. The executable may be specified with absolute path +overriding the location determined by default from the user's PATH variable. + +

+

+
ESMF_CXXLINKER
+
Possible value: executable + +

+This variable can be used to override the default C++ linker +front-end executables. The executable may be specified with absolute path +overriding the location determined by default from the user's PATH variable. + +

+

+
ESMF_CXXLINKLIBS
+
Possible value: list of libraries, each prepended with -l + +

+Prepend libraries to the list of libraries the ESMF build system determines. + +

+

+
ESMF_CXXLINKOPTS
+
Possible value: list of flags + +

+Prepend linker flags to the list of flags the ESMF build system determines. + +

+

+
ESMF_CXXLINKPATHS
+
Possible value: list of paths, each prepended with -L + +

+Prepend linker search paths to the list of search paths the ESMF build system +determines. + +

+

+
ESMF_CXXLINKRPATHS
+
Possible value: list of paths, each prepended with the correct rpath option + +

+Prepend linker rpaths to the list of rpaths the ESMF build system determines. + +

+

+
ESMF_CXXOPTFLAG
+
Possible value: flag + +

+This variable can be used to override the default C++ optimization flag. + +

+

+
ESMF_CXXSTD
+
Possible value: integer or default or sysdefault + +

+Used to set the C++ language standard. If unset or default, the ESMF default C++ language standard is used: C++11. +If set to an integer, the integer is used to indicate the respective C++ language standard to the compiler. ESMF does not check whether the integer corresponds to an existing language standard. +Setting sysdefault results in usage of the compiler specific default C++ language standard. This can lead to build issue if the compiler default is below the level required by ESMF. + +

+

+
ESMF_DEFER_LIB_BUILD
+
Possible value: ON (default), OFF + +

+This variable can be used to override the deferring of the build of the +ESMF library. By default, the library is built after all of the source +files have been compiled. This speeds up the build process. It also +allows parallel compilation of source code when the -j flag is used with +make. Setting this environment variable to OFF forces the library to +be updated after each individual compilation, thus disabling the ability +to use parallel compilation. + +

+

+
ESMF_DIR
+
Possible value: absolute path + +

+The environment variable ESMF_DIR must be set to the full pathname +of the top level ESMF directory before building the framework. This is the +only environment variable which is required to be set on all platforms under +all conditions. + +

+

+
ESMF_F90
+
Possible value: executable + +

+This variable can be used to override the default Fortran90 compiler and linker +front-end executables. The executable may be specified with absolute path +overriding the location determined by default from the user's PATH variable. + +

+

+
ESMF_F90COMPILEOPTS
+
Possible value: list of flags + +

+Prepend compiler flags to the list of flags the ESMF build system determines. + +

+

+
ESMF_F90COMPILEPATHS
+
Possible value: list of paths, each prepended with -I + +

+Prepend compiler search paths to the list of search paths the ESMF build system +determines. + +

+

+
ESMF_F90COMPILER
+
Possible value: executable + +

+This variable can be used to override the default Fortran90 compiler +front-end executables. The executable may be specified with absolute path +overriding the location determined by default from the user's PATH variable. + +

+

+
ESMF_F90IMOD
+
Possible value: flag + +

+This variable can be used to override the default flag (-I) used to specify a +Fortran module directory. + +

+

+
ESMF_F90LINKER
+
Possible value: executable + +

+This variable can be used to override the default Fortran90 linker +front-end executables. The executable may be specified with absolute path +overriding the location determined by default from the user's PATH variable. + +

+

+
ESMF_F90LINKLIBS
+
Possible value: list of libraries, each prepended with -l + +

+Prepend libraries to the list of libraries the ESMF build system determines. + +

+

+
ESMF_F90LINKOPTS
+
Possible value: list of flags + +

+Prepend linker flags to the list of flags the ESMF build system determines. + +

+

+
ESMF_F90LINKPATHS
+
Possible value: list of paths, each prepended with -L + +

+Prepend linker search paths to the list of search paths the ESMF build system +determines. + +

+

+
ESMF_F90LINKRPATHS
+
Possible value: list of paths, each prepended with the correct rpath option + +

+Prepend linker rpaths to the list of rpaths the ESMF build system determines. + +

+

+
ESMF_F90OPTFLAG
+
Possible value: flag + +

+This variable can be used to override the default Fortran90 optimization flag. + +

+

+
ESMF_INSTALL_BINDIR
+
Possible value: relative or absolute path + +

+Location into which to install the ESMF apps during installation. This +location can be specified as absolute path (starting with "/") or relative to +ESMF_INSTALL_PREFIX. + +

+

+
ESMF_INSTALL_DOCDIR
+
Possible value: relative or absolute path + +

+Location into which to install the documentation during installation. This +location can be specified as absolute path (starting with "/") or relative to +ESMF_INSTALL_PREFIX. + +

+

+
ESMF_INSTALL_HEADERDIR
+
Possible value: relative or absolute path + +

+Location into which to install the header files during installation. This +location can be specified as absolute path (starting with "/") or relative to +ESMF_INSTALL_PREFIX. + +

+

+
ESMF_INSTALL_LIBDIR
+
Possible value: relative or absolute path + +

+Location into which to install the library files during installation. This +location can be specified as absolute path (starting with "/") or relative to +ESMF_INSTALL_PREFIX. + +

+

+
ESMF_INSTALL_MODDIR
+
Possible value: relative or absolute path + +

+Location into which to install the F90 module files during installation. This +location can be specified as absolute path (starting with "/") or relative to +ESMF_INSTALL_PREFIX. + +

+

+
ESMF_INSTALL_CMAKEDIR
+
Possible value: relative or absolute path + +

+Location into which to install the CMake module files during installation. This +location can be specified as absolute path (starting with "/") or relative to +ESMF_INSTALL_PREFIX. + +

+

+
ESMF_INSTALL_PREFIX
+
Possible value: relative or absolute path + +

+This variable specifies the prefix of the installation path used during the +installation process accessible thought the install target. Libraries, F90 +module files, header files and documentation all are installed relative to +ESMF_INSTALL_PREFIX by default. The ESMF_INSTALL_PREFIX may be +provided as absolute path (starting with "/") or relative to ESMF_DIR. + +

+

+
ESMF_LAPACK
+
See 9.4.1 + +

+

+
ESMF_LAPACK_LIBPATH
+
See 9.4.1 + +

+

+
ESMF_LAPACK_LIBS
+
See 9.4.1 + +

+

+
ESMF_MACHINE
+
Possible value: output of uname -m where available. + +

+Not normally set by user. This variable indicates architectural details about +the machine on which the ESMF library is being built. The value of this +variable will affect which ABI settings are available and what they mean. +ESMF_MACHINE is set automatically. + +

+

+
ESMF_MPIBATCHOPTIONS
+
Possible value: system-dependent + +

+Variable used to pass system-specific queue options to the batch system. +Typically the queue, project and limits are set. +See section 11.1.1 for a discussion of this option. + +

+

+
ESMF_MPILAUNCHOPTIONS
+
Possible value: system-dependent + +

+Variable used to pass system-specific options to the MPI launch facility. +See section 11.1.1 for a discussion of this option. + +

+

+
ESMF_MPIMPMDRUN
+
Possible value: executable + +

+This variable can be used to override the default utility used to launch +parallel execution of ESMF test applications in MPMD mode. The executable in +ESMF_MPIMPMDRUN may be specified with path. + +

+

+
ESMF_MPIRUN
+
Possible value: executable + +

+This variable can be used to override the default utility used to launch +parallel ESMF test or example applications. The executable in ESMF_MPIRUN +may be specified with path. +See section 11.1.1 for a discussion of this option. + +

+

+
ESMF_MPISCRIPTOPTIONS
+
Possible value: system-dependent + +

+Variable used to pass system-specific options to the first level MPI script +accessed by ESMF. +See section 11.1.1 for a discussion of this option. + +

+

+
ESMF_NETCDF
+
See 9.4.2 + +

+

+
ESMF_NETCDF_INCLUDE
+
See 9.4.2 + +

+

+
ESMF_NETCDF_LIBPATH
+
See 9.4.2 + +

+

+
ESMF_NETCDF_LIBS
+
See 9.4.2 + +

+

+
ESMF_NO_INTEGER_1_BYTE
+
Possible value: TRUE (default), FALSE + +

+Not normally set by user. Setting this variable to FALSE instructs +ESMF to generating data array interfaces for data types of 1-byte integers. + +

+

+
ESMF_NO_INTEGER_2_BYTE
+
Possible value: TRUE (default), FALSE + +

+Not normally set by user. Setting this variable to FALSE instructs +ESMF to generating data array interfaces for data types of 2-byte integers. + +

+

+
ESMF_OPENACC
+
Possible value: ON, OFF (default is system dependent) + +

+Compiles and links the ESMF library with OpenACC compiler flags. + +

+

+
ESMF_OPENMP
+
Possible value: OMP4, ON, OFF (default is system dependent) + +

+Compiles and links the ESMF library with OpenMP compiler flags. +Both OMP4 and ON enable the ESMF OpenMP features. Only with +OMP4 will those features assume OpenMP 4.0 and higher. + +

+

+
ESMF_OPTLEVEL
+
Possible value: numerical value + +

+See ESMF_BOPT for details. + +

+

+
ESMF_OS
+
Possible value: output of uname -s except when cross-compiling or for +UNICOS/mp where ESMF_OS is Unicos. + +

+Not normally set by user unless cross-compiling. This variable indicates the +target system for which the ESMF library is being built. Under normal +circumstances, i.e. ESMF is being build on the target system, ESMF_OS is +set automatically. However, when cross-compiling for a different target system +ESMF_OS must be set to the respective target OS. For example, when +compiling for the Cray X1 on an interactive X1 node ESMF_OS will be set +automatically. However, when ESMF is being cross-compiled for the X1 on a Linux +host the user must set ESMF_OS to Unicos manually in order to +indicate the intended target platform. + +

+

+
ESMF_PNETCDF
+
See 9.4.3 + +

+

+
ESMF_PNETCDF_INCLUDE
+
See 9.4.3 + +

+

+
ESMF_PNETCDF_LIBPATH
+
See 9.4.3 + +

+

+
ESMF_PNETCDF_LIBS
+
See 9.4.3 + +

+

+
ESMF_PTHREADS
+
Possible value: ON (default on most platforms), OFF + +

+This compile-time option controls ESMF's dependency on a functioning +Pthreads library. The default option is set to ON with the exception +of IRIX64 and platforms that don't provide Pthreads. On IRIX64 the use of +Pthreads in ESMF is disabled by default because the Pthreads library conflicts +with the use of OpenMP on this platform. + +

+The user can override the default setting of ESMF_PTHREADS on all +platforms that provide Pthread support. Setting the ESMF_PTHREADS +environment variable to OFF will disable ESMF's Pthreads feature set. +On platforms that don't support Pthreads, e.g. IBM BlueGene/L or Cray XT3, the +default OFF setting cannot be overridden! + +

+

+
ESMF_SITE
+
Possible value: site string, default + +

+Build configure file site name or the value default. If not set, then the value +of default is assumed. When including platform-specific files, this value is +used as the third part of the directory name (parts 1 and 2 are the +ESMF_OS value and ESMF_COMPILER value, respectively.) + +

+

+
ESMF_TESTESMFMKFILE
+
Possible value: ON, OFF (default) + +

+Variable specifying whether the ESMFMKFILE variable is evaluated to +determine which ESMF installation is being tested against. If set to the +value ON, all tests and examples are build against the ESMF installation +referenced by the ESMFMKFILE variable. For OFF, the +ESMFMKFILE variable is ignored and the tests and examples are build +against the ESMF under ESMF_DIR. This is the default. + +

+

+
ESMF_TESTEXHAUSTIVE
+
Possible value: ON, OFF (default) + +

+Variable specifying how to compile the unit tests. If set to the value ON, +then all unit tests will be compiled and will be executed when the test is +run. If unset or set to any other value, only a subset of the unit tests +will be included to verify basic functions. Note that this is a compile-time +selection, not a run-time option. + +

+

+
ESMF_TESTFORCEOPENACC
+
Possible value: ON, OFF (default) + +

+The ON setting enforces usage of OpenACC compiler flags when building ESMF test applications. This allows testing of user-level OpenACC usage even with ESMF_OPENACC set to OFF. + +

+

+
ESMF_TESTFORCEOPENMP
+
Possible value: ON, OFF (default) + +

+The ON setting enforces usage of OpenMP compiler flags when building ESMF test applications. This allows testing of user-level OpenMP usage even with ESMF_OPENMP set to OFF. + +

+

+
ESMF_TESTHARNESS_ARRAY
+
Possible value: test harness make target (default not set) + +

+Variable specifying the test harness makefile target for the array class. If this variable is not specified, a default test scenario will be run for the array class. See the ESMF Software Developer's Guide for instructions for selecting other test harness scenarios. + +

+

+
ESMF_TESTHARNESS_FIELD
+
Possible value: test harness make target (default not set) + +

+Variable specifying the test harness makefile target for the field class. If this variable is not specified, a default test scenario will be run for the field class. See the ESMF Software Developer's Guide for instructions for selecting other test harness scenarios. + +

+

+
ESMF_TESTMPMD
+
Possible value: ON, OFF (default) + +

+Variable specifying whether to run MPMD-style tests, i.e. test applications +that start up as multiple separate executables. + +

+

+
ESMF_TESTSHAREDOBJ
+
Possible value: ON, OFF (default) + +

+Variable specifying whether to run shared object tests. This requires that the compute environment supports shared objects, and that the ESMF library is available in form of a shared library. + +

+

+
ESMF_TESTWITHTHREADS
+
Possible value: ON, OFF (default) + +

+If this environment variable is set to ON before the ESMF system +tests are build they will activate ESMF threading in their code. Specifically +each component will be executed using ESMF single threading instead of the +default non-threaded mode. The difference between non-threaded and ESMF +single threaded execution should be completely transparent. Notice that the +setting of ESMF_TESTWITHTHREADS does not alter ESMF's dependency +on Pthreads but tests ESMF threading features during the system tests. An +ESMF library that was compiled with disabled Pthread features (via the ESMF_PTHREADS variable) will produce ESMF error messages during system test +execution if the system tests were compiled with ESMF_TESTWITHTHREADS +set to ON. + +

+

+
ESMF_TRACE_LIB_BUILD
+
Possible value: ON (default), OFF + +

+This variables determines whether extra libraries are built that are used +to add additional symbols to the ESMF tracing and profiling capability, +such as MPI communication functions. +If set to ON the libraries are built and placed into the +ESMF_INSTALL_LIBDIR alongside the ESMF library itself. + +

+

+
ESMF_XERCES
+
See 9.4.6 + +

+

+
ESMF_XERCES_INCLUDE
+
See 9.4.6 + +

+

+
ESMF_XERCES_LIBPATH
+
See 9.4.6 + +

+

+
ESMF_XERCES_LIBS
+
See 9.4.6 + +

+

+
ESMF_YAMLCPP
+
See 9.4.7 + +

+

+
ESMF_YAMLCPP_INCLUDE
+
See 9.4.7 + +

+

+
ESMF_YAMLCPP_LIBPATH
+
See 9.4.7 + +

+

+
ESMF_YAMLCPP_LIBS
+
See 9.4.7 + +

+

+
+ +

+Environment variables must be set in the user's shell or when calling make. It +is not necessary to edit ESMF makefiles or other build system files to set +these variables. Here is an example of setting an environment variable in the +csh/tcsh shell: + +

+

+  setenv ESMF_ABI 32
+
+ +

+In bash/ksh shell environment variables are set this way: + +

+

+  export ESMF_ABI=32
+
+ +

+Environment variables can also be set from the make command line: + +

+

+  make ESMF_ABI=32
+
+ +

+ +

+9.6 Supported Platforms +

+ +

+The platforms that are tested and supported depend on the release +of ESMF. To see the specific list of supported platforms, +click the Supported Platforms link under one of the releases +on the ESMF releases page. + +

+All possible combinations of ESMF_OS, ESMF_COMPILER, ESMF_COMM, +and ESMF_ABI build environment variables are listed in the following table. +Where multiple options exist, the default value is indicated in bold. +An entry of default in the COMPILER column indicates the vendor compiler. +An entry of mpi in the COMM column indicates the vendor MPI implementation. + +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ESMF_OSESMF_COMPILERESMF_COMMESMF_ABI 
AIXdefault mpiuni,mpi,user 32, 64  
Cygwing95 mpiuni,mpich,mpich1,mpich2,mpich3,lam,openmpi,user 32, 64  
Cygwingfortran mpiuni,mpich,mpich1,mpich2,mpich3,lam,msmpi,openmpi,user 32, 64  
Darwinabsoft mpiuni,mpich,mpich1,mpich2,mpich3,mvapich2,lam,openmpi,user 32, 64  
Darwing95 mpiuni,mpich,mpich1,mpich2,mpich3,mvapich2,lam,openmpi,user 32, 64  
Darwingfortran mpiuni,mpich,mpich1,mpich2,mpich3,mvapich2,lam,openmpi,user 32, 64  
Darwingfortranclang mpiuni,mpich,mpich1,mpich2,mpich3,mvapich2,lam,openmpi,user 32, 64  
Darwinintel mpiuni,mpich,mpich1,mpich2,mpich3,mvapich2,intelmpi,lam, 32, 64  
  openmpi,user   
Darwinintelclang mpiuni,mpich,mpich1,mpich2,mpich3,intelmpi,lam,openmpi,user 32, 64  
Darwinintelgcc mpiuni,mpich,mpich1,mpich2,mpich3,intelmpi,lam,openmpi,user 32, 64  
Darwinnag mpiuni,mpich,mpich1,mpich2,mpich3,mvapich2,lam,openmpi,user 32, 64  
Darwinpgi mpiuni,mpich,mpich1,mpich2,mpich3,mvapich,mvapich2,lam, 32, 64  
  openmpi,user   
Darwinxlf mpiuni,mpi,mpich,mpich1,mpich2,mpich3,lam,openmpi,user 32  
Darwinxlfgcc mpiuni,mpi,mpich,mpich1,mpich2,mpich3,lam,openmpi,user 32  
IRIX64default mpiuni,mpi,user 32, 64  
Linuxabsoft mpiuni,mpich,mpich1,mpich2,mpich3,mvapich2,lam,openmpi,user 32, 64  
Linuxabsoftintel mpiuni,mpich,mpich1,mpich2,mpich3,lam,openmpi,user 32, 64  
Linuxaocc mpiuni,mpi,mpt,mpich,mpich1,mpich2,mpich3,mvapich2, 32, 64,  
  intelmpi,lam,openmpi,user ia64_64,  
   x86_64_32,  
   x86_64_small,  
   x86_64_medium  
Linuxarm mpiuni,mpi,mpt,mpich,mpich1,mpich2,mpich3,mvapich2, 32, 64,  
  intelmpi,lam,openmpi,user ia64_64,  
   x86_64_32,  
   x86_64_small,  
   x86_64_medium  
Linuxfujitsu mpiuni,mpi,user 64  
Linuxg95 mpiuni,mpich,mpich1,mpich2,mpich3,mvapich2,lam,openmpi,user 32, 64,  
   ia64_64,  
   x86_64_32,  
   x86_64_small,  
   x86_64_medium  
Linuxgfortran mpiuni,mpi,mpt,mpich,mpich1,mpich2,mpich3,mvapich2, 32, 64,  
  intelmpi,lam,openmpi,user ia64_64,  
   x86_64_32,  
   x86_64_small,  
   x86_64_medium  
Linuxgfortranclang mpiuni,mpi,mpt,mpich,mpich1,mpich2,mpich3,mvapich2, 32, 64,  
  lam,openmpi,user ia64_64,  
   x86_64_32,  
   x86_64_small,  
   x86_64_medium  
Linuxintel mpiuni,mpi,mpt,mpich,mpich1,mpich2,mpich3,mvapich2, 32, 64,  
  intelmpi,scalimpi,lam,openmpi,user ia64_64,  
   x86_64_32,  
   x86_64_small,  
   x86_64_medium,  
   mic  
Linuxintelgcc mpiuni,mpi,mpt,mpich,mpich1,mpich2,mpich3,mvapich2, 32, 64,  
  intelmpi,lam,openmpi,user ia64_64,  
   x86_64_32,  
   x86_64_small,  
   x86_64_medium  
Linuxlahey mpiuni,mpich,mpich1,mpich2,mpich3,mvapich2,lam, 32, 64  
  openmpi,user   
Linuxllvm mpiuni,mpi,mpt,mpich,mpich1,mpich2,mpich3,mvapich2, 32, 64,  
  intelmpi,lam,openmpi,user ia64_64,  
   x86_64_32,  
   x86_64_small,  
   x86_64_medium  
Linuxnag mpiuni,mpich,mpich1,mpich2,mpich3,mvapich2,lam, 32, 64  
  openmpi,user   
Linuxnagintel mpiuni,mpich,mpich1,mpich2,mpich3,lam,openmpi,user 32, 64  
Linuxnvhpc mpiuni,mpi,mpt,mpich,mpich1,mpich2,mpich3,mvapich,mvapich2 32, 64,  
  intelmpi,openmpi,user x86_64_32,  
   x86_64_small,  
   x86_64_medium  
Linuxpathscale mpiuni,mpich,mpich1,mpich2,mpich3,lam,openmpi,user 32, 64,  
   x86_64_32,  
   x86_64_small,  
   x86_64_medium  
Linuxpgi mpiuni,mpi,mpt,mpich,mpich1,mpich2,mpich3,mvapich,mvapich2 32, 64,  
  intelmpi,scalimpi,lam,openmpi,user x86_64_32,  
   x86_64_small,  
   x86_64_medium  
Linuxpgigcc mpiuni,mpich,mpich1,mpich2,mpich3,lam,openmpi,user 32  
Linuxsxcross mpiuni,mpi,user 32  
Linuxxlf mpiuni,mpi,user 32  
MinGWgfortran mpiuni,msmpi,user 32, 64  
MinGWintel mpiuni,msmpi,user 32, 64  
MinGWintelcl mpiuni,msmpi,user 32, 64  
OSF1default mpiuni,mpi,user 64  
SunOSdefault mpiuni,mpi,user 32, 64  
Unicosdefault mpiuni,mpi,user 64  
Unicosaocc mpiuni,mpi,user 64  
Unicoscce mpiuni,mpi,user 64  
Unicosgfortran mpiuni,mpi,user 64  
Unicosintel mpiuni,mpi,user 64  
Unicosnvhpc mpiuni,mpi,user 64  
Unicospathscale mpiuni,mpi,user 64  
Unicospgi mpiuni,mpi,user 64 + +

+

 
+ +

+Building the library for multiple architectures or options at the same +time is supported; building or running the tests or examples is restricted +to one platform/architecture at a time. The output from the test cases +will be stored in a separate directories so the results will be kept +separate for different architectures or options. + +

+ +

+ +
+9.7 Building the ESMF Library +

+ +

+ +

+GNU Make is required to build the ESMF library. On some +systems this will be just the command make. On others +it might be installed as gmake or gnumake. +This document uses make consistently to refer to GNU Make. + +

+Use the --version option with the locally available make commands +to determine which variant corresponds to GNU Make on your system. Use the +respective command when interacting with the ESMF build system, and +where this documentation uses make. + +

+Notice that ESMF does not utilize Autotools (configure or autoconf) or CMake. +Instead, the selection of configuration options is done by setting environment +variables before building the framework. The relevant environment variables +all begin with prefix ESMF_, and are discussed in detail under section +9.5. + +

+Build the library with the command: +

+  make
+
+ +

+Makefiles throughout the framework are configured to allow users to +compile files only in the directory where make is entered. Shared +libraries are rebuilt only if necessary. In addition the entire ESMF +framework may be built from any directory by entering make all, +assuming that all the environmental variables are set correctly as +described in Section 9.5. + +

+The makefiles are also configured to allow multiple make targets to be +compiled in parallel, via the make -j flag. For example, to use eight +parallel processes to build the library, use -j8: +

+  make -j8 lib
+
+ +

+The parallel compilation feature depends on ESMF_DEFER_LIB_BUILD=ON +(the default) so that the library build will be deferred until all files +have been compiled. + +

+The -j option should only be used during the creation of the library. +The test base and examples will not work correctly with -j set larger +than 1. + +

+Users may also run examples or execute unit tests of specific classes +by changing directories to the desired class examples or tests +directories and entering make run_examples or +make run_unit_tests, respectively. For non-multiprocessor machines, +uni-processor targets are available as make run_examples_uni or +make run_unit_tests_uni. + +

+ +

+ +
+9.8 Building the ESMF Documentation +

+ +

+The ESMF source documentation consists of an ESMF User's Guide +and an ESMF Reference Manual for Fortran. + +

+If a user does want to build the documentation, they will need to download the +ESMF code repository (see section 5.1). Latex, latex2html, perl +and csh must also be installed. For example, dependencies may be installed on +Ubuntu Linux using: +

+  [sudo] apt-get install texlive latex2html perl csh
+
+ +

+To build documentation: +

+  make doc              ! Builds the manuals, including pdf and html.
+
+ +

+The resulting documentation files will be +located in the top level directory $ESMF_DIR/doc + +

+ +

+ +
+9.9 Installing the ESMF +

+ +

+The ESMF build system offers the standard install target to install all +necessary files created during the build process into user specified locations. +The installation procedure will also install the ESMF documentation if it has +been built successfully following the procedure outlined above. + +

+The installation location can be customized using six ESMF_ environment +variables: + +

    +
  • ESMF_INSTALL_PREFIX - prefix for the other five variables. +
  • +
  • ESMF_INSTALL_HEADERDIR - where to install header files. +
  • +
  • ESMF_INSTALL_LIBDIR - where to install library files. +
  • +
  • ESMF_INSTALL_MODDIR - where to install Fortran module files. +
  • +
  • ESMF_INSTALL_BINDIR - where to install application files. +
  • +
  • ESMF_INSTALL_DOCDIR - where to install documentation files. +
  • +
  • ESMF_INSTALL_CMAKEDIR - where to install cmake module files. +
  • +
+ +

+Section 9.5 describes what each of these +environment variables does and how to set them. + +

+Install ESMF with the command: +

+  make install
+
+ +

+Check the ESMF installation with the command: +

+  make installcheck
+
+ +

+Advice to installers. To complete the installation of ESMF, a single ESMF specific environment variable should be set. The variable is named ESMFMKFILE, and it must point to the esmf.mk file that was generated during the installation process. Systems that support multiple ESMF installations via management software (e.g. modules, softenv, ...) should set/reset the ESMFMKFILE environment variable as part of the configuration. + +

+Additionally, it is typically convenient to append the user's PATH environment variable to provide access to the ESMF applications that were built during the installation process. The application binaries are located in the directory that was specified as ESMF_INSTALL_BINDIR during the ESMF installation. The location is also stored in variable ESMF_APPSDIR, defined in file esmf.mk. Systems that make ESMF installations available through management software (e.g. modules, softenv, ...) should modify the user's PATH environment variable as part of the configuration. + +

+Hint. By default, file esmf.mk is located next to the ESMF library file in directory ESMF_INSTALL_LIBDIR. Consequently, unless esmf.mk has been moved to a different location after the installation, the correct setting for ESMFMKFILE is $(ESMF_INSTALL_LIBDIR)/esmf.mk. + +

+Rationale. The only piece of information that is needed to use an ESMF installation is the exact location of the associated esmf.mk file. This file contains all of the relevant settings and flags that allow a user to build their application against the ESMF installation. Standardizing the mechanism by which the location of esmf.mk is made available to the user by the system will help users in the design of portable application build systems. (See sections 6 and 8 for details about the usage of esmf.mk.) Further, modifying the user's PATH environment variable is optional, since the location of the ESMF application binaries is available through the esmf.mk file. However, setting the user's PATH variable so that the ESMF applications are directly and conveniently accessible from the command line is recommended, especially if management software (e.g. modules, softenv, ...) is used on the system. + +

+ +

+ +
+esmf_support@ucar.edu +
+ + diff --git a/docs/nightly/fix/reconcile-info/ESMF_usrdoc/node11.html b/docs/nightly/fix/reconcile-info/ESMF_usrdoc/node11.html new file mode 100644 index 000000000..1d487dc93 --- /dev/null +++ b/docs/nightly/fix/reconcile-info/ESMF_usrdoc/node11.html @@ -0,0 +1,844 @@ + + + + + +10 Porting ESMF + + + + + + + + + + + + + + + + + + + + + +Subsections + + + +
+ +

+ +
+10 Porting ESMF +

+ +

+This section goes into more detail about the ESMF build system and how to +port the ESMF software to new platforms. + +

+ +

+ +

+ +
+10.1 The ESMF Build System +

+For most users the description of the build system in previous +sections should be sufficient. Some users, however, may wish to have +a more detailed knowledge of the make system either for configuring +different build options or for porting to unsupported platforms. + +

+ +

+10.1.1 General structure +

+ +

+The main components of the build system are: + +

+ +

    +
  • Build directories with makefile fragments + +

    +There are two directories containing makefile fragment files used by +the ESMF build system. + +

    +The build directory contains the generic makefile fragment file +common.mk that is included by the top level makefile in the source +tree. The common.mk contains generic build system settings and build +rules used across all platforms. A user should have no reason to edit +common.mk. + +

    +The build_config directory contains subdirectories with makefile +fragments (build_rules.mk) for each supported platform defining +compilers, compiler flags and the various other definitions that are +necessary to build on each platform. One of the build_rules.mk files +will be included by the build/common.mk file depending on the values of +the environment variables ESMF_OS, ESMF_COMPILER and ESMF_SITE. See below +for more details on environment variables. + +

    +

  • +
  • Environment variables + +

    +Environment variables with the prefix ESMF_ are used to pass user +specified information to the ESMF build system. A full list of ESMF_ +environment variables is provided in section 9.5 of this +document. + +

    +Most environment variables are optional and the ESMF build system will use +default settings if it finds these variable unset. One piece of information that +must always be provided by setting the respective environment variable is the +root of the ESMF directory. There are three sets of source codes the build +system supports. All need environment variables set to point to their top +level source code directories. + +

    +

    +
    +
    ESMF Library + +

    +To build the ESMF library, ESMF_DIR needs to be set to the top level ESMF +library source code directory. + +

    +

    +
    +
    Implementation Report + +

    +The build system needs ESMF_IMPL_DIR set to the top level source +code directory of the Implementation Report source tree to build the +report and to build and run the examples. + +

    +

    +
    +
    EVA Applications + +

    +An EVA source code tree does not contain a copy of the ESMF build +system. Instead it uses a copy found in an ESMF library source code +tree. Building the EVA applications requires that ESMF_EVA_DIR and +ESMF_DIR be set. ESMF_EVA_DIR has to be set to the top directory +of the EVA source code. ESMF_DIR has to be set to the top directory +of an ESMF source code tree. + +

    +

    +
    + +

    +

  • +
  • Makefiles + +

    +Every source tree contains a makefile in its top level directory. This +makefile includes the common.mk file from the build directory +which in turn includes the platform specific build_rules.mk file from +one of the build_config subdirectories. The top level makefile +contains makefile settings specific for the source code that it is found in. + +

    +Each directory in the source tree contains a makefile which includes +the top level makefile. These local makefiles include definitions that +allow the local files and documents to be built. +

  • +
+ +

+ +

+10.1.2 Build configuration +

+ +

+A single makefile or makefile fragment from the build system never +constitutes a complete set of build rules and settings. Starting from +the local makefile, successive include commands are used to string +together makefiles and makefile fragments to create a complete system +of build rules and settings. Configuration of the build system is +done by including a configuration makefile fragment. A configuration for a +specific machine or compiler is referred to as a site configuration. + +

+The string of files included is fairly short. Makefiles below the top +level makefile include the top level makefile. The top level makefile +includes build/common.mk and then build/common.mk includes a +configuration file from the build_config directory. The configuration +files in the build_config directory contain the platform and site +specific build settings. The os, compiler and site that a file +configures is determined by its name. The configuration makefile +fragments follow the naming convention + +

+

+    build_config/ESMF_OS.ESMF_COMPILER.ESMF_SITE/build_rules.mk
+
+ +

+where ESMF_OS, ESMF_COMPILER and ESMF_SITE are environment +variables either set by the user or given default values by the build +system. ESMF_OS is the target operating system. If the build is performed +on the target system ESMF_OS will typically have the value +returned by the command uname -s. ESMF_COMPILER is the compiler +name. ESMF_SITE, if set, is generally the current machine name, the +location, or the organization (e.g. mit, cola). If there are no site specific +files for a particular platform, then ESMF_COMPILER and ESMF_SITE +will be set to default. Examples: + +

+

+    ! Default configuration for IBM AIX systems
+    build_config/AIX.default.default/build_rules.mk
+    
+    ! Linux configuration using lahey compilers.    
+    build_config/Linux.lahey.default/build_rules.mk
+
+ +

+ +

+10.1.3 Source code configuration +

+ +

+Some of the ESMF C++ and Fortran source files contain preprocessor directives +to configure the source code for specific platforms. The directives are +included in the source code and are pre-processed before the source code is +compiled. The directives are used to determine among other things, the size +of variable types. + +

+The ESMF build system provides preprocessor directives in +ESMC_Conf.h and ESMF_Conf.inc files +that are included in the source code. These files are located in + +

+

+    build_config/ESMF_OS.ESMF_COMPILER.ESMF_SITE/ESMC_Conf.h
+    build_config/ESMF_OS.ESMF_COMPILER.ESMF_SITE/ESMF_Conf.inc
+
+ +

+where ESMF_OS, ESMF_COMPILER and ESMF_SITE are +environment variables set by the user or given default values be the +build system. Based on the settings of these environment variables +the build system provides a path to the correct files during +source code compilation. + +

+ +

+10.2 Porting ESMF to New Platforms +

+ +

+The ESMF build system can be ported to other Unix platforms by adding a new +platform specific makefile fragment and two associated configuration files. +These files (build_rules.mk, ESMC_Conf.h, ESMF_Conf.inc) +must be placed into a new subdirectory of the build_config directory, +following the ESMF_OS.ESMF_COMPILER.ESMF_SITE naming convention. + +

+When porting to a new platform it is often helpful to start with a copy +of the configuration of an existing ESMF port. You may, for example, want to +start with a copy of the build_config/Linux.g95.default directory when +working on a new Linux configuration. + +

+ +

+10.2.1 Customizing the build_rules.mk fragment +

+ +

+The purpose of the build_rules.mk makefile fragment is to customize the +build procedure for a specific platform. The customization is done via makefile +variables. The main makefile at the top level of the ESMF directory +structure first includes the common.mk makefile fragment. This common +makefile fragment defines a large number of variables, setting them either to +generally valid default values or to specific values the user has set in their +environment using ESMF_ style environment variables. + +

+The platform specific build_rules.mk makefile fragment is included by +common.mk after the variables have been initialized, but +before any rules are defined in common.mk using these variables. +This gives build_rules.mk a chance to modify these variables as it may +be necessary to accommodate platform specific properties. + +

+Fortunately only a very small subset of variables pre-defined in common.mk +typically need to be modified or overridden in build_rules.mk with +platform specific settings. However, there are some variables that must +be set in every build_rules.mk file. These are variables that are not +pre-set in common.mk. + +

+

+
ESMF_CXXDEFAULT
+
Default C++ compiler to be used on this platform. This variable will be used +by common.mk to set the associated ESMF_CXX variables. +
+
ESMF_CXXCOMPILER_VERSION
+
Command that when executed will provide information about the version of the +C++ compiler to stdout. +
+
ESMF_F90DEFAULT
+
Default Fortran compiler to be used on this platform. This variable will be used +by common.mk to set the associated ESMF_F90 variables. +
+
ESMF_F90COMPILER_VERSION
+
Command that when executed will provide information about the version of the +F90 compiler to stdout. +
+
ESMF_MPIRUNDEFAULT
+
Default MPI job launch facility to be used on this platform. This variable will +be used by common.mk to set the associated ESMF_MPIRUN variables. + +

+

+
+ +

+The following is a complete alphabetical list of variables that are pre-set +in common.mk before build_rules.mk is included. Some of these +variables correspond to ESMF_ environment variables while others have +a more complicated dependency on the environment variables set by the user. + +

+

+
ESMF_ABI
+
+
+
ESMF_APPSDIR
+
+
+
ESMF_AR
+
+
+
ESMF_ARCREATEFLAGS
+
+
+
ESMF_ARCREATEFLAGSDEFAULT
+
+
+
ESMF_ARDEFAULT
+
+
+
ESMF_AREXTRACTFLAGS
+
+
+
ESMF_AREXTRACTFLAGSDEFAULT
+
+
+
ESMF_ARRAY_LITE
+
+
+
ESMF_BOPT
+
+
+
ESMF_BUILD
+
+
+
ESMF_BUILD_DOCDIR
+
+
+
ESMF_COMM
+
+
+
ESMF_COMPILER
+
+
+
ESMF_CONFDIR
+
+
+
ESMF_CPP
+
+
+
ESMF_CPPDEFAULT
+
+
+
ESMF_CXXCOMPILECPPFLAGS
+
+
+
ESMF_CXXCOMPILEOPTS
+
+
+
ESMF_CXXCOMPILEPATHS
+
+
+
ESMF_CXXCOMPILEPATHSLOCAL
+
+
+
ESMF_CXXCOMPILER
+
+
+
ESMF_CXXCOMPILERDEFAULT
+
+
+
ESMF_CXXESMFLINKLIBS
+
+
+
ESMF_CXXLINKER
+
+
+
ESMF_CXXLINKERDEFAULT
+
+
+
ESMF_CXXLINKLIBS
+
+
+
ESMF_CXXLINKOPTS
+
+
+
ESMF_CXXLINKPATHS
+
+
+
ESMF_CXXLINKRPATHS
+
+
+
ESMF_CXXOPTFLAG
+
+
+
ESMF_CXXOPTFLAG_G
+
+
+
ESMF_CXXOPTFLAG_O
+
+
+
ESMF_CXXOPTFLAG_X
+
+
+
ESMF_DIR
+
+
+
ESMF_DOCDIR
+
+
+
ESMF_EXDIR
+
+
+
ESMF_F90COMPILECPPFLAGS
+
+
+
ESMF_F90COMPILEFIXCPP
+
+
+
ESMF_F90COMPILEFIXNOCPP
+
+
+
ESMF_F90COMPILEFREECPP
+
+
+
ESMF_F90COMPILEFREENOCPP
+
+
+
ESMF_F90COMPILEOPTS
+
+
+
ESMF_F90COMPILEPATHS
+
+
+
ESMF_F90COMPILEPATHSLOCAL
+
+
+
ESMF_F90COMPILER
+
+
+
ESMF_F90COMPILERDEFAULT
+
+
+
ESMF_F90ESMFLINKLIBS
+
+
+
ESMF_F90IMOD
+
+
+
ESMF_F90LINKER
+
+
+
ESMF_F90LINKERDEFAULT
+
+
+
ESMF_F90LINKLIBS
+
+
+
ESMF_F90LINKOPTS
+
+
+
ESMF_F90LINKPATHS
+
+
+
ESMF_F90LINKRPATHS
+
+
+
ESMF_F90MODDIR
+
+
+
ESMF_F90OPTFLAG
+
+
+
ESMF_F90OPTFLAG_G
+
+
+
ESMF_F90OPTFLAG_O
+
+
+
ESMF_F90OPTFLAG_X
+
+
+
ESMF_GREPV
+
+
+
ESMF_INCDIR
+
+
+
ESMF_INSTALL_BINDIR
+
+
+
ESMF_INSTALL_BINDIR_ABSPATH
+
+
+
ESMF_INSTALL_CMAKEDIR
+
+
+
ESMF_INSTALL_CMAKEDIR_ABSPATH
+
+
+
ESMF_INSTALL_DOCDIR
+
+
+
ESMF_INSTALL_DOCDIR_ABSPATH
+
+
+
ESMF_INSTALL_HEADERDIR
+
+
+
ESMF_INSTALL_HEADERDIR_ABSPATH
+
+
+
ESMF_INSTALL_LIBDIR
+
+
+
ESMF_INSTALL_LIBDIR_ABSPATH
+
+
+
ESMF_INSTALL_MODDIR
+
+
+
ESMF_INSTALL_MODDIR_ABSPATH
+
+
+
ESMF_INSTALL_PREFIX
+
+
+
ESMF_INSTALL_PREFIX_ABSPATH
+
+
+
ESMF_LDIR
+
+
+
ESMF_LIBDIR
+
+
+
ESMF_LOCOBJDIR
+
+
+
ESMF_MACHINE
+
+
+
ESMF_MODDIR
+
+
+
ESMF_MPIBATCHOPTIONS
+
+
+
ESMF_MPILAUNCHOPTIONS
+
+
+
ESMF_MPIMPMDRUN
+
+
+
ESMF_MPIMPMDRUNDEFAULT
+
+
+
ESMF_MPIRUN
+
+
+
ESMF_MPIRUNDEFAULT
+
+
+
ESMF_MPISCRIPTOPTIONS
+
+
+
ESMF_MV
+
+
+
ESMF_NO_INTEGER_1_BYTE
+
+
+
ESMF_NO_INTEGER_2_BYTE
+
+
+
ESMF_OS
+
+
+
ESMF_OPTLEVEL
+
+
+
ESMF_PTHREADS
+
+
+
ESMF_PTHREADSDEFAULT
+
+
+
ESMF_RANLIB
+
+
+
ESMF_RANLIBDEFAULT
+
+
+
ESMF_RM
+
+
+
ESMF_RPATHPREFIX
+
+
+
ESMF_SED
+
+
+
ESMF_SEDDEFAULT
+
+
+
ESMF_SITE
+
+
+
ESMF_SITEDIR
+
+
+
ESMF_SL_LIBLIBS
+
+
+
ESMF_SL_LIBLINKER
+
+
+
ESMF_SL_LIBOPTS
+
+
+
ESMF_SL_LIBS_TO_MAKE
+
+
+
ESMF_SL_SUFFIX
+
+
+
ESMF_STDIR
+
+
+
ESMF_TEMPLATES
+
+
+
ESMF_TESTDIR
+
+
+
ESMF_TESTEXHAUSTIVE
+
+
+
ESMF_TESTMPMD
+
+
+
ESMF_TESTWITHTHREADS
+
+
+
ESMF_UTCDIR
+
+
+
ESMF_UTCSCRIPTS
+
+
+
ESMF_WC
+

+

+
+ +

+ +

+10.2.2 Customizing ESMC_Conf.h and ESMF_Conf.inc +

+ +

+The ESMC_Conf.h file is used to define several settings used +during compilation of ESMF library code written in C++. + +

+

+
FTN_X(func)
+
Macro that will correctly expand "func" to match the Fortran symbol convention. +Use this macro for function names that contain an underscore. + +

+

+
FTNX(func)
+
Macro that will correctly expand "func" to match the Fortran symbol convention. +Use this macro for function names that do not contain an underscore. + +

+

+
ESMCI_FortranStrLenArg
+
Typedef to match the data type of the 'hidden' string length argument that +Fortran uses when passing CHARACTER strings. + +

+

+
ESMF_PRESENT(arg)
+
Macro for a boolean expression that returns TRUE if "arg" is a "present" +argument passed from Fortran into C++. + +

+

+
ESMC_POINTER_SIZE
+
Size of C pointer in bytes. + +

+

+
+ +

+The ESMF_Conf.inc file is used to optionally define two +important macros: + +

+

+
ESMF_NO_INITIALIZERS
+
If this macro is defined ESMF will assume that initializers inside +Fortran derived type definitions are not supported. + +

+

+
ESMF_SEQUENCE_BUG
+
If this macro is defined ESMF will not use the SEQUENCE specifier +inside Fortran derived types under certain circumstances. + +

+

+
+ +

+ +

+10.3 Shared Object Libraries +

+ +

+On many platforms, a shared object library is created in addition to the +standard .a archive library. +Shared object libraries are libraries that are pre-linked into an executable. +They can then be linked to an application at run time. There are many advantages +to using shared libraries. These include smaller executable files, and shared +memory usage when multiple executables are running - as is often the case of +programs using MPI. They also allow easier bug fixing and development because +the library can often be upgraded without necessarily re-linking the executables +which call into it. + +

+Shared object libraries can be pre-linked to system libraries and using them +can simplify dealing with ESMF's dependency on Fortran90 and C++ runtime +libraries. + +

+See 9.4 for third party library build requirements. + +

+ +

+ +
+esmf_support@ucar.edu +
+ + diff --git a/docs/nightly/fix/reconcile-info/ESMF_usrdoc/node12.html b/docs/nightly/fix/reconcile-info/ESMF_usrdoc/node12.html new file mode 100644 index 000000000..daa36dd6d --- /dev/null +++ b/docs/nightly/fix/reconcile-info/ESMF_usrdoc/node12.html @@ -0,0 +1,817 @@ + + + + + +11 Validating an ESMF Build + + + + + + + + + + + + + + + + + + + + + +Subsections + + + +
+ +

+ +
+11 Validating an ESMF Build +

+ +

+The following subsections go into more detail about how to run the tests and +examples included with the ESMF software. This is the recommended method of +regression testing ESMF, and is routinely used during library code development. +Running the regression tests against an existing ESMF installation is also +supported, and offers a general way to validate a pre-installed ESMF library. + +

+ +

+ +

+ +
+11.1 Running ESMF Self-Tests +

+ +

+Robustness and portability are primary goals of the ESMF development +effort. To ensure that these goals are met, the ESMF includes a +comprehensive suite of tests. They allow testing and validation of +everything from individual functions to complete system tests. These +test suites are used by the ESMF development team as part of their +regular development process. ESMF users can run the testing suites to +verify that the framework software was built and installed properly, +and is running correctly on a particular platform. + +

+ +

+ +
+11.1.1 Setting up ESMF to run test suite applications +

+ +

+Unless the ESMF library was built in MPI-bypass mode (mpiuni), all applications +compiled and linked against ESMF automatically become MPI applications and must +be executed as such. The ESMF test suite and example applications are no +different in this respect. + +

+Details of how to execute MPI applications vary widely from system to system. +ESMF uses an mpirun script mechanism to abstract away most of these differences. +All ESMF makefile targets that require the execution of applications do this by +launching the application via the executable specified in the +ESMF_MPIRUN variable. ESMF assumes that an MPI applications can be +launched across N processes by calling + +

+

+$(ESMF_MPIRUN) -np N application
+
+ +

+and that the output of the application arrives at the calling shell via +stdout and stderr. + +

+First, on systems that allow direct launching of MPI application via a suitable +mpirun facility, ESMF can use it directly. This is the ESMF default for +all those configurations that come with a suitable mpirun. In these +cases the ESMF_MPIRUN environment variable does not need to be set by +the user. + +

+There are systems, however, that allow direct launching of MPI application but +provide a launch mechanism that is incompatible with ESMF's assumptions. In +these cases a simple mpirun wrapper is required. The ESMF ./scripts +directory contains wrappers for several cases in this class, e.g. for +interactive POE access on IBM machines and aprun, as well as +yod on Cray machines. The ESMF configurations will access the +appropriate wrapper scripts by default if necessary. + +

+Secondly, there are those systems that utilize batch software to access the +parallel execution environment. One option is to execute the ESMF test targets +from within a batch session, either interactively or from within a script. In +this case the batch software does not add any additional complexity for ESMF. +The same issues discussed above, of how to launch an MPI application, apply +directly. + +

+However, in some cases it is more convenient to execute the ESMF test target +on the front-end machine, and have ESMF access the batch software each time it +needs to launch an application. In fact, on IBM systems this is often the only +working option, because the integrated POE system will execute each application +on the exact same number of processes specified during batch access, regardless +of how many ways in parallel a specific application needs to be run. + +

+Two modes of operation need to be considered in the case of the ESMF batch access. First, +if interactive batch access is available, it is straightforward to write an +mpirun script that fulfills the ESMF requirements outlined above. The +ESMF ./scripts directory contains several scripts that access various +parallel launching facilities though interactive LSF. + +

+Second, if interactive batch access is not available, a more complex scripting +approach is necessary. The basic requirements in this case are that ESMF must +be able to launch MPI applications across N processes by calling + +

+

+$(ESMF_MPIRUN) -np N application  ,
+
+ +

+that the output of the application will be available in a file named +application.stdout after the script finishes, and that the +ESMF_MPIRUN script blocks execution until application.stdout +has become accessible. + +

+The ESMF ./scripts directory contains scripts of this flavor for a wide +variety of batch systems. Most of these scripts, when called through ESMF, +will generate a customized, temporary batch script for a specific executable +"on the fly" and submit this batch script to the queuing software. The script +then waits for completion of the submitted job, after which it copies the +output, received through a system specific mechanism, into the prescribed file. + +

+Regardless of whether the batch system access is interactive or not, it is +often necessary to specify various system specific options when calling the +batch submission tool. ESMF utilizes the ESMF_MPIBATCHOPTIONS environment +variable to pass user supplied values to the batch system. + +

+The environment variable ESMF_MPISCRIPTOPTIONS is available to pass +user specified options to the actual script specified by ESMF_MPIRUN. +However, ESMF_MPISCRIPTOPTIONS will only be added automatically to the +ESMF_MPIRUN call if the specified ESMF_MPIRUN can be found in the +ESMF ./scripts directory. + +

+Finally, the value of ESMF_MPILAUNCHOPTIONS is passed to the MPI launch +facility by default, i.e if ESMF_MPIRUN was not specified by the user. +In case the user specifies ESMF_MPIRUN to be anything else but scripts +out of the ESMF ./scripts directory, it is the user's responsibility to +add ESMF_MPISCRIPTOPTIONS to ESMF_MPIRUN and/or to utilize +ESMF_MPILAUNCHOPTIONS within the specified script. + +

+The possibilities covered by the generic scripts provided in the ESMF +./scripts directory, combined with the ESMF_MPISCRIPTOPTIONS, +ESMF_MPIBATCHOPTIONS, and ESMF_MPILAUNCHOPTIONS environment +variables, will satisfy the majority of common situations. There are, however, +circumstances for which a customized, user-provided mpirun script is necessary. +One such situation arises with the LoadLeveler batch software. LoadLeveler +typically requires a list of options specified in the actual batch script. This +is most easily handled by a script that produces such a system and user specific +script "on the fly". Another situation is where certain modules or software +packages need to be made available inside the batch script. Again this is most +easily handled by a customized script the user writes and provides to ESMF via +the ESMF_MPIRUN environment variable. This will override any default +settings for the configuration and rely on the user provided script instead. + +

+Users that face the need to write a customized mpirun script for their +parallel execution environment are encouraged to start with the closest match +from the ESMF ./scripts directory and customize it to their situation. +The best way to see how the existing scripts are used on the supported +platforms is to go to the +http://www.earthsystemmodeling.org/download/platforms/ +web page and follow the link +for the platform of interest. Each test report contains the output of +make info, which lists the settings of the ESMF_MPIxxx +environment variables. + +

+ +

+11.1.2 Running ESMF unit tests +

+ +

+The unit tests provided with the ESMF library evaluate the following: + +

    +
  • correctness of individual functions +
  • +
  • behavior of individual modules or classes +
  • +
  • appropriate error handling +
  • +
+ +

+Unit tests can be run in either an exhaustive or a non-exhaustive (sanity check) +mode. The exhaustive mode includes the sanity check tests. Typically, sanity +checks for each ESMF capability include creating and destroying an object and +testing its basic function using a valid argument set. In the exhaustive mode, +a wide range of valid and non-valid arguments are evaluated for correct behavior. + +

+ +

+The following commands are used to build and run the unit tests provided with +the ESMF: +

+        make [ESMF_TESTEXHAUSTIVE=<ON,OFF>] unit_tests
+        make [ESMF_TESTEXHAUSTIVE=<ON,OFF>] unit_tests_uni
+
+ +

+The tests_uni target runs the tests on a single processor. +The tests target runs the test on multiple processors. + +

+The non-exhaustive set of unit tests should all pass. At this point in +development, the exhaustive tests do not all pass. Current problems with +unit tests are being tracked and corrected by the ESMF development team. + +

+The results of running the unit tests can be found in the following location: +

+${ESMF_DIR}/test/test${ESMF_BOPT}/${ESMF_OS}.${ESMF_COMPILER}.${ESMF_ABI}. \
+	${ESMF_SITE}
+
+ +

+For example, if your esmf source files have been placed in: +

+       /usr/local/esmf
+
+ +

+If your platform is a Linux uni-processor that has an installed Lahey +Fortran compiler and ESMF_COMPILER has been set to lahey, then the build +system configuration file will be: + +

+

+      build_config/Linux.lahey.default/build_rules.mk
+
+ +

+If you want to run a debug version of non-exhaustive unit tests, +then you use these commands from /usr/local/esmf: + +

+

+       setenv ESMF_DIR /usr/local/esmf
+       make ESMF_BOPT=g ESMF_SITE=lahey ESMF_TESTEXHAUSTIVE=OFF tests_uni
+
+ +

+If you are using ksh, then replace the setenv command with: +

+       export ESMF_DIR=/usr/local/esmf
+
+ +

+The results of the unit tests will be in: +

+       /usr/local/esmf/test/testg/Linux.lahey.32.default/
+
+ +

+At the end of unit test execution a script runs to analyze the results. + +

+The script output indicates whether there are any unit test failures. +If any unit tests fail, please check if the failures are listed as known bugs in the ESMF release +page http://www.earthsystemmodeling.org/download/releases.shtml +for your platform and compiler. +If the failures are not listed please contact ESMF Support at esmf_support@ucar.edu +Please indicate which unit tests are failing, and attach the output of the "make info" command to the email. + +

+The script output indicates whether there are any unit test failures. +The following is a sample from the script output: + +

+

+The unit tests in the following files all pass:
+
+src/Infrastructure/Array/tests/ESMF_ArrayUTest.F90
+src/Infrastructure/ArrayDataMap/tests/ESMF_ArrayDataMapUTest.F90
+src/Infrastructure/Base/tests/ESMF_BaseUTest.F90
+src/Infrastructure/FieldBundle/tests/ESMF_FieldBundleUTest.F90
+src/Infrastructure/FieldBundleDataMap/tests/ESMF_FieldBundleDataMapUTest.F90
+src/Infrastructure/Config/tests/ESMF_ConfigUTest.F90
+src/Infrastructure/DELayout/tests/ESMF_DELayoutUTest.F90
+src/Infrastructure/Field/tests/ESMF_FRoute4UTest.F90
+src/Infrastructure/Field/tests/ESMF_FieldUTest.F90
+src/Infrastructure/FieldComm/tests/ESMF_FieldGatherUTest.F90
+src/Infrastructure/FieldDataMap/tests/ESMF_FieldDataMapUTest.F90
+src/Infrastructure/Grid/tests/ESMF_GridUTest.F90
+src/Infrastructure/LocalArray/tests/ESMF_ArrayDataUTest.F90
+src/Infrastructure/LocalArray/tests/ESMF_ArrayF90PtrUTest.F90
+src/Infrastructure/LocalArray/tests/ESMF_LocalArrayUTest.F90
+src/Infrastructure/LogErr/tests/ESMF_LogErrUTest.F90
+src/Infrastructure/Regrid/tests/ESMF_Regrid1UTest.F90
+src/Infrastructure/Regrid/tests/ESMF_RegridUTest.F90
+src/Infrastructure/TimeMgr/tests/ESMF_AlarmUTest.F90
+src/Infrastructure/TimeMgr/tests/ESMF_CalRangeUTest.F90
+src/Infrastructure/TimeMgr/tests/ESMF_ClockUTest.F90
+src/Infrastructure/TimeMgr/tests/ESMF_TimeIntervalUTest.F90
+src/Infrastructure/TimeMgr/tests/ESMF_TimeUTest.F90
+src/Infrastructure/VM/tests/ESMF_VMBarrierUTest.F90
+src/Infrastructure/VM/tests/ESMF_VMBroadcastUTest.F90
+src/Infrastructure/VM/tests/ESMF_VMGatherUTest.F90
+src/Infrastructure/VM/tests/ESMF_VMScatterUTest.F90
+src/Infrastructure/VM/tests/ESMF_VMSendVMRecvUTest.F90
+src/Infrastructure/VM/tests/ESMF_VMUTest.F90
+src/Superstructure/Component/tests/ESMF_CplCompCreateUTest.F90
+src/Superstructure/Component/tests/ESMF_GridCompCreateUTest.F90
+src/Superstructure/State/tests/ESMF_StateUTest.F90
+
+
+The following unit test files failed to build, failed to execute or 
+crashed during execution:
+
+src/Infrastructure/TimeMgr/tests/ESMF_CalendarUTest.F90
+src/Infrastructure/VM/tests/ESMF_VMSendRecvUTest.F90
+
+
+The following unit test files had failed unit tests:
+
+src/Infrastructure/Field/tests/ESMF_FRoute8UTest.F90
+src/Infrastructure/Grid/tests/ESMF_GridCreateUTest.F90
+
+
+The following individual unit tests fail:
+
+  FAIL  DELayout Get Test, ESMF_FRoute8UTest.F90, line 139                                                                                                                                                                                                       
+  FAIL  Grid Distribute Test, ESMF_GridCreateUTest.F90, line 198                                                                                                                                                                                                 
+
+
+The stdout files for the unit tests can be found at:
+/home/bluedawn/svasquez/script_dirs/daily_builds/esmf/test/testO/ \
+	AIX.default.64.default
+
+Found 1224 exhaustive multi processor unit tests, 1220 pass and 4 fail.
+
+ +

+The following is an example of the output generated when a unit test fails: +

+ESMF_FieldUTest.stdout: FAIL  Unique default Field names Test, FLD1.5.1 
+			& 1.7.1, ESMF_FieldUTest.F90, line 204  Field names 
+			not unique
+
+ +

+ +

+ +
+11.1.3 Running ESMF system tests +

+ +

+The system tests provided with the ESMF library evaluate: + +

    +
  • interface agreement between parts of the system +
  • +
  • behavior of the system as a whole +
  • +
+ +

+The current system test suite includes tests that perform layout +reduction operations, redistribution-transpose, halo operations, +component creation and intra-grid communication. Some of the system +tests are no longer compatible with the current API, but are included +in the release for completeness. A complete description of each +available system test and its current compatibility status can be +found at the ESMF website, +http://www.earthsystemmodeling.org. +The testing +and validation page is accessible from the Development +link on the navigation bar. + +

+The following commands are used to build and run the system tests: + +

+

+        make [SYSTEM_TEST=xxx] system_tests
+        make [SYSTEM_TEST=xxx] system_tests_uni
+
+ +

+The system_tests_uni target runs the tests on a single processor. +The system_tests target runs the test on multiple processors. + +

+If a particular SYSTEM_TEST is not specified, then all available system tests +are built and run. + +

+The results of the test can be found in the following location: +

+${ESMF_DIR}/test/test${ESMF_BOPT}/${ESMF_OS}.${ESMF_COMPILER}.${ESMF_ABI}. \
+	${ESMF_SITE}
+
+ +

+For example, if your ESMF source files have been placed in your home directory: +

+       ~/esmf
+
+ +

+and your platform and compiler configuration is: +

+       Alpha multi-processor using the native compiler
+
+ +

+and you want to run an optimized version of system test SimpleCoupling, +then you use these commands from the directory /esmf. +

+       setenv ESMF_PROJECT <project_name>
+       make ESMF_DIR=`pwd` SYSTEM_TEST=ESMF_SimpleCoupling system_tests
+
+ +

+If you are using ksh then replace the setenv command with +this: + +

+

+       export ESMF_PROJECT=<project_name>
+
+ +

+The results will be in: +

+~/esmf/test/testO/OSF1.default.64.default/ESMF_SimpleCouplingSTest.stdout
+
+ +

+At the end of system test execution a script runs to analyze the results. + +

+The script output indicates whether there are any system test failures. +If any system tests fail, please check if the failures are listed as known bugs in the ESMF release +page http://www.earthsystemmodeling.org/download/releases.shtml +for your platform and compiler. +If the failures are not listed please contact ESMF Support at esmf_support@ucar.edu +Please indicate which system tests are failing, and attach the output of the "make info" command to the email. + +

+The script output indicates whether there are any system test failures. +The following is a sample from the script output: + +

+

+The following system tests passed:
+
+
+src/system_tests/ESMF_CompCreate/ESMF_CompCreateSTest.F90
+src/system_tests/ESMF_FieldExcl/ESMF_FieldExclSTest.F90
+src/system_tests/ESMF_FieldHalo/ESMF_FieldHaloSTest.F90
+src/system_tests/ESMF_FieldHaloPer/ESMF_FieldHaloPerSTest.F90
+src/system_tests/ESMF_FieldRedist/ESMF_FieldRedistSTest.F90
+src/system_tests/ESMF_FieldRegrid/ESMF_FieldRegridSTest.F90
+src/system_tests/ESMF_FieldRegridMulti/ESMF_FieldRegridMultiSTest.F90
+src/system_tests/ESMF_FieldRegridOrder/ESMF_FieldRegridOrderSTest.F90
+src/system_tests/ESMF_FlowComp/ESMF_FlowCompSTest.F90
+src/system_tests/ESMF_FlowWithCoupling/ESMF_FlowWithCouplingSTest.F90
+src/system_tests/ESMF_SimpleCoupling/ESMF_SimpleCouplingSTest.F90
+src/system_tests/ESMF_VectorStorage/ESMF_VectorStorageSTest.F90
+
+
+The following system tests failed, did not build, or did not execute:
+
+
+src/system_tests/ESMF_FieldRegridConserv/ESMF_FieldRegridConsrvSTest.F90
+src/system_tests/ESMF_RowReduce/ESMF_RowReduceSTest.F90
+
+
+
+
+The stdout files for the system_tests can be found at:
+/home/bluedawn/svasquez/script_dirs/daily_builds/esmf/test/testO/ \
+	AIX.default.64.default
+
+Found 14 system tests, 12 passed and 2 failed.
+
+ +

+ +

+ +
+11.2 Running ESMF Examples +

+ +

+ +

+11.2.1 Example source code +

+ +

+Example source code for each class is found in the class's example +directory. For example, source code for the Time Manager class examples +are found in this directory: + +

+

+        ESMF_DIR/src/Infrastructure/TimeMgr/examples/
+
+ +

+While the example code is formatted to be included in the documentation, +it also runs and compiles to ensure accuracy. Examples generally +contain simple usage of the basic methods for the class. + +

+ +

+11.2.2 Building and running examples +

+ +

+The GNU makefile targets examples and examples_uni build +and run programs found in a class's examples directory. After the +examples are built, the examples target runs the examples using +multiple processors, while examples_uni runs the examples on +a single processor. + +

+These targets first build the ESMF library. + +

+Run from ESMF_DIR, this command will build and run all examples on +multiple processors: + +

+

+       make examples
+
+ +

+If the command is run in an example source code directory, then only +the example from that directory will be built and run. The examples +and output files are created in this directory: + +

+

+ESMF_DIR/examples/examples$ESMF_BOPT/$ESMF_OS.$ESMF_COMPILER.$ESMF_ABI. \
+	$ESMF_SITE/
+
+ +

+The name of an output file will begin with the name of the example +that created it followed by .stdout. + +

+At the end of examples execution a script runs to analyze the results. + +

+The script output indicates whether there are any example failures. +If any examples fail, please check if the failures are listed as known bugs in the ESMF release +page http://www.earthsystemmodeling.org/download/releases.shtml +for your platform and compiler. +If the failures are not listed please contact ESMF Support at esmf_support@ucar.edu +Please indicate which examples are failing, and attach the output of the "make info" command to the email. + +

+The following is a sample from the script output: + +

+

+The following examples passed:
+
+
+src/Infrastructure/Array/examples/ESMF_ArrayCreateEx.F90
+src/Infrastructure/Array/examples/ESMF_ArrayGetEx.F90
+src/Infrastructure/ArrayComm/examples/ESMF_ArrayCommEx.F90
+src/Infrastructure/ArrayDataMap/examples/ESMF_ArrayDataMapEx.F90
+src/Infrastructure/ArraySpec/examples/ESMF_ArraySpecEx.F90
+src/Infrastructure/FieldBundle/examples/ESMF_FieldBundleCreateEx.F90
+src/Infrastructure/FieldBundleDataMap/examples/ESMF_FieldBundleDataMapEx.F90
+src/Infrastructure/DELayout/examples/ESMF_DELayoutEx.F90
+src/Infrastructure/Field/examples/ESMF_FieldCreateEx.F90
+src/Infrastructure/Field/examples/ESMF_FieldFromUserEx.F90
+src/Infrastructure/Field/examples/ESMF_FieldGlobalEx.F90
+src/Infrastructure/Field/examples/ESMF_FieldWriteEx.F90
+src/Infrastructure/FieldComm/examples/ESMF_FieldCommEx.F90
+src/Infrastructure/FieldDataMap/examples/ESMF_FieldDataMapEx.F90
+src/Infrastructure/LogErr/examples/ESMF_LogErrEx.F90
+src/Infrastructure/Regrid/examples/ESMF_RegridEx.F90
+src/Infrastructure/Route/examples/ESMF_RouteEx.F90
+src/Infrastructure/TimeMgr/examples/ESMF_AlarmEx.F90
+src/Infrastructure/TimeMgr/examples/ESMF_CalendarEx.F90
+src/Infrastructure/TimeMgr/examples/ESMF_ClockEx.F90
+src/Infrastructure/TimeMgr/examples/ESMF_TimeEx.F90
+src/Infrastructure/VM/examples/ESMF_VMAllFullReduceEx.F90
+src/Infrastructure/VM/examples/ESMF_VMComponentEx.F90
+src/Infrastructure/VM/examples/ESMF_VMDefaultBasicsEx.F90
+src/Infrastructure/VM/examples/ESMF_VMGetMPICommunicatorEx.F90
+src/Infrastructure/VM/examples/ESMF_VMScatterVMGatherEx.F90
+src/Infrastructure/VM/examples/ESMF_VMSendVMRecvEx.F90
+src/Superstructure/Component/examples/ESMF_AppMainEx.F90
+src/Superstructure/Component/examples/ESMF_CplEx.F90
+src/Superstructure/Component/examples/ESMF_GCompEx.F90
+src/Superstructure/State/examples/ESMF_StateEx.F90
+src/Superstructure/State/examples/ESMF_StateReconcileEx.F90
+
+
+The following examples failed, did not build, or did not execute:
+
+
+src/Infrastructure/Grid/examples/ESMF_GridCreateEx.F90
+src/Infrastructure/TimeMgr/examples/ESMF_TimeIntervalEx.F90
+
+
+The stdout files for the examples can be found at:
+/home/bluedawn/svasquez/script_dirs/daily_builds/esmf/examples/
+examplesO/AIX.default.64.default
+
+
+Found 34 examples, 32 passed and 2 failed.
+
+ +

+ +

+ +
+11.3 Validating an existing ESMF installation +

+ +

+It is becoming increasingly common to find pre-installed ESMF libraries on +professionally maintained HPC systems. Often multiple versions of ESMF are +available via environment modules. Before using such a third-party ESMF +installation, a user may want ot validate that it is working correctly. System +administrators also often need a simple method to re-validate an existing +ESMF installation, e.g. after a system update. ESMF offers a simple way to +build and run the full regression suite against an existing installation. + +

+A second ESMF source tree is used to run full regression tests against an +existing ESMF installation. To support this, the second source tree must be +of the exact same version as the ESMF installation to be tested. The two +critical environment variables used are ESMF_TESTESMFMKFILE, and +ESMFMKFILE. The following bullets outline the procedure: + +

+ +

    +
  • Check out the same version of ESMF as the installation to be validated. + +

    +

  • +
  • Change into the root directory of the checked out directory tree, and + set the ESMF_DIR environment variable to the current working + directory. + +

    +

  • +
  • Set the ESMFMKFILE environment variable to point to the + esmf.mk file of the installation to be validated. If the ESMF + installation is available via the module command, ESMFMKFILE + will typically be set when loading the module. + +

    +

  • +
  • Set the ESMF_TESTESMFMKFILE environment variable to ON. + +

    +

  • +
  • Set the ESMF_COMPILER, ESMF_COMM, and ESMF_BOPT + environment variables to match the values from the esmf.mk file. + +

    +

  • +
  • Make sure the build environment is set up properly to match the + ESMF installation to be validated. On systems using the module + command, this means loading the correct modules. + +

    +

  • +
+ +

+At this point all of the test targets discussed in sections 11.1 and +11.2 are available. The build targets use the test +and example sources under the local (secondary) source tree, but compile and +link against the ESMF library pointed to by ESMFMKFILE. A fully +functional installation is expected to pass all regression tests. + +

+ + +

+ +

+ +
+esmf_support@ucar.edu +
+ + diff --git a/docs/nightly/fix/reconcile-info/ESMF_usrdoc/node13.html b/docs/nightly/fix/reconcile-info/ESMF_usrdoc/node13.html new file mode 100644 index 000000000..926d07ab6 --- /dev/null +++ b/docs/nightly/fix/reconcile-info/ESMF_usrdoc/node13.html @@ -0,0 +1,583 @@ + + + + + +12 Architectural Overview + + + + + + + + + + + + + + + + + + + + + +Subsections + + + +
+ +

+ +
+12 Architectural Overview +

+The ESMF architecture is characterized by the layering strategy shown in +Figure 1. User code components that implement the +science portions of an application, for example a sea ice or land model, +are sandwiched between two layers. The upper layer is denoted the +superstructure layer and the lower layer the infrastructure layer. +The role of the superstructure layer is to provide a shell which encompasses +user code and provides a context for interconnecting input and output data +streams between components. The key elements of the superstructure are described +in Section 12.2. These elements include classes that wrap +user code, ensuring that all components present consistent interfaces. The +infrastructure layer provides a foundation that developers of science components +can use to speed construction and to ensure consistent, guaranteed behavior. +The elements of the infrastructure include constructs to support parallel +processing with data types tailored to Earth science applications, specialized +libraries to support consistent time and calendar management and performance, +error handling and scalable I/O tools. The infrastructure layer is described in +Section 12.3. +A hierarchical combination of superstructure, user code components, and +infrastructure are joined together to form an ESMF application. + +

+ +

+12.1 Key Concepts +

+ +

+The ESMF architecture and programming paradigm are based upon +five key concepts: modularity, flexibility, hierarchical +organization, communication within components, and a uniform +communication API. + +

+ +

+12.1.1 Modularity +

+ +

+The ESMF design is based upon modular Components. There +are two types of Components, one of which represents models +(Gridded Components) and one which represents couplers (Coupler Components). +Data are always passed between Components using a data structure +called a State, which can store Fields, FieldBundles of Fields, +Arrays, and other States. A Gridded Component stores no information about +the internals of the Gridded Components that it interacts with; this information +is passed in through the argument lists of the initialize, run, +and finalize methods. The information that is +passed in through the argument list can be a State from +another Gridded Component, or it can be a function pointer that performs +a computation or communication on a State. These function +pointers are called Transforms, and they are available as AttachableMethods +created by Coupler Components. They are called inside the +Gridded Component they are passed into. Although Transforms add +some complexity to the framework (and their use is not required), they are what +will enable ESMF to accommodate virtually any model of communication +between Components. + +

+Modularity means that an ESMF component stores nothing about +the internals of other components. This allows components to be +used more easily in multiple contexts. + +

+ +

+12.1.2 Flexibility +

+The ESMF does not dictate how models should be coupled; it +simply provides tools for creating couplers. For example, +both a hub-and-spokes type coupling strategy and +pairwise strategies are supported. The ESMF also allows model +communications to occur mid-timestep, if desired. Sequential, +concurrent, and mixed modes of execution are supported. + +

+The ESMF does not impose restrictions on how data flows through +an application. This accommodates scientific innovation - if you +want your atmospheric model to communicate with your sea ice model +mid-timestep, ESMF will not stop you. + +

+ +

+ +
+12.1.3 Hierarchical organization +

+ESMF allows applications to be composed hierarchically. +For example, physics and dynamics modules can be defined as +separate Gridded Components, coupled together with a Coupler Component, and all +of these nested within a single atmospheric Gridded Component. +The atmospheric Gridded Component can be run standalone, or can be included +in a larger climate or data assimilation application. See Figure +2 for an illustrative example. + +

+The data structure that enables scalability in ESMF is the +derived type Gridded Component. Fortran alone does not allow you to create +generic components - you'd have to create derived types for +PhysComp, and DynComp, and PhysDynCouplerComp, and AtmComp. In +ESMF, these are always of type GridComp or CplComp, so they +can be called by the same drivers (whether that driver is a +standard ESMF driver or another model), and use the same methods +without having to overload them with many specific derived +types. It is the same idea when you want to support different +implementations of the same component, like multiple dynamics. + +

+The ESMF defines a hierarchical, scalable architecture +that is natural for organizing very complex applications, and +for allowing exchangeable Components. + +

+ +

+ + + +
Figure 2: +A typical building block for an ESMF application consists +of a parent Gridded Component, two or more child Gridded Components, and +a Coupler Component. The parent Gridded Component is called by an +application driver. All ESMF Components have initialize, run, and +finalize methods. The diagram shows that when the application driver calls +initialize on a parent Gridded Component, the call cascades down to +all of its children, so that the result is that the entire “tree” +of Components is initialized. The run and finalize methods work the +same way. In this example a hurricane simulation is built +from ocean and atmosphere Gridded Components. The data exchange between +the ocean and atmosphere is handled by an ocean-atmosphere Coupler Component. +Since the whole hurricane simulation is a Gridded Component, +it could be easily be treated as a child and coupled to another +Gridded Component, rather than being driven directly by the application +driver. A similar diagram could be drawn for an atmospheric model containing +physics and dynamics components, as described in Section +12.1.3.
+\scalebox{1.0}{\includegraphics{ESMF_appunit}}
+
+ +

+ +

+12.1.4 Communication within Components +

+Communication in ESMF always occurs within a Component. It +can occur internal to a Gridded Component, and have nothing to do +with interactions with other Components (setting aside +synchronization issues), or it can occur within a Coupler Component +or a transform generated by a Coupler Component. A result of the rule +that all communication happens within a Component is that +Coupler Components must always be defined on the union of all the +Components that they couple together. Models can choose to +use whatever mechanism they want for intra-model communications. + +

+The point is that although the ESMF defines some simple rules +for communication, the communication mechanism that the +framework uses is not hardwired into its architecture - +the sends and receives or puts and gets are enclosed within +Gridded Components, Coupler Components and Transforms. The intent +is to accommodate multiple models of communication and technical +innovations. + +

+ +

+12.1.5 Uniform communication API +

+ESMF has a single API for shared and distributed +memory that, unlike MPI, accounts for NUMA architectures and +does not treat all processes as being identical. It is possible for +users to set ESMF communications to a strictly message passing +mode and put in their own OpenMP commands. + +

+The goal is to create a programming paradigm +that is performance sensitive to the architecture beneath it +without being discouragingly complicated. + +

+ +

+ +
+12.2 Superstructure +

+The ESMF superstructure layer in a unifying context within which user +components are interconnected. Classes called Gridded Components, +Coupler Components, and States are used within the superstructure +to achieve this flexibility. + +

+ +

+12.2.1 Import and export State classes +

+User code components under ESMF use special interface objects for Component to +Component data exchanges. These objects are of type import State and export +State. These special types support a variety of methods that allow user code +components to do things like fill an export State object with data to be shared +with other components or query an import State object to determine its contents. +In keeping with the overall requirements for high-performance it is permitted +for import State and export State contents to use references or pointers to +Component data, so that costly data copies of potentially large data structures +can be avoided where possible. The content of an import State and an export +State can be made self-describing. + +

+ +

+12.2.2 Interface standards +

+The import State and export State abstractions are designed to be flexible +enough so that ESMF does not need to mandate a single format for fields. For +example, ESMF does not prescribe the units of quantities exported or imported. +However, ESMF does provide mechanisms to describe units, memory layout, and +grid coordinates. This allows the ESMF software to support a range of different +policies for physical fields. The interoperability experiments that we are using +to demonstrate ESMF make use of the emerging CF conventions [1] for +describing physical fields. This is a policy choice for that set of experiments. +The ESMF software itself can support arbitrary conventions for labeling and +characterizing the contents of States. + +

+ +

+12.2.3 Gridded Component class +

+The Gridded Component class describes a user component that takes in one import State and produces one +export State. Examples of Gridded Components are major Earth system +model components such as land surface models, ocean models, atmospheric models and sea ice models. Components +used for linear algebra manipulations in a state estimation or data assimilation optimization procedure are also +created as Gridded Components. In general the fields within an import State and export State of a Gridded Component will +use the same discrete grid. + +

+ +

+12.2.4 Coupler Component class +

+The other top-level Component class supported in the ESMF architecture is a +Coupler Component. This class is used for Components that take one or more +import States as input and map them through spatial and temporal interpolation +or extrapolation onto one or more output export States. In a Coupler Component +it is often the case that the export State(s) is on a different discrete grid +to that of the import State(s). For example, in a coupled ocean-atmosphere +simulation a Coupler Component might be used to map a set of sea-surface fields +in an ocean model to appropriate planetary boundary layer fields in an +atmospheric model. + +

+ +

+12.2.5 Flexible data and control flow +

+Import States, export States, Gridded Components and Coupler Components can +be arrayed flexibly within a superstructure layer. Using these constructs, it +is possible to configure a set of Components with multiple +pairwise Coupler Components, Figure 4. It is also +possible to configure a set of concurrently +executing Gridded Components joined through a single Coupler Component of the +style shown in Figure 3. + +

+ +

+ + + +
Figure 3: +ESMF supports configurations with a single central Coupler Component. +In this case inputs from all Gridded +Components are transferred and regridded through the central coupler.
+\scalebox{1.0}{\includegraphics{ESMF_hubandspokes}}
+
+ +

+ +

+ + + +
Figure 4: +ESMF also supports configurations with multiple point to point Coupler +Components. These take inputs from one Gridded Component and transfer and regrid +the data before passing it to another Gridded Component. This schematic shows a +flow of data between two Coupler Components that connect three Gridded Components: +an atmosphere model with a land model, and the same atmosphere model with a data +assimilation system.
+\scalebox{1.0}{\includegraphics{ESMF_pairwise}}
+
+ +

+The set of superstructure abstractions allows flexible data flow and control +between components. However, components will often use different discrete grids, +and time-stepping components may march forward with different time intervals. +In a parallel compute environment different components may be distributed in a +different manner on the underlying compute resources. The ESMF infrastructure +layer provides elements to manage this complexity. + +

+ +

+ +
+12.3 Infrastructure +

+Figure 5 illustrates three Gridded Components, +each with a different Grids, being coupled together. In +order to achieve this coupling several steps beyond defining import State and +export State objects to act as data conduits are required. Coupler Components +are needed that can interpolate between the different Grids. The necessary +transformations may also involve mapping between different units and/or memory +layout conventions for the Fields that pass between Components. In a parallel +compute environment the Coupler Components may also be required to map between +different domain decompositions. In order to advance in time correctly the +separate Gridded Components must have compatible notions of time. Approaches to +parallelism within the Gridded Components must also be compatible. The +Infrastructure layer contains a set of classes that address these issues +and assist in managing overall system complexity. + +

+ +

+ + + +
Figure 5: +Schematic showing the coupling of components that use different discrete +Grids and different time-stepping. In this example, Component NCAR Atmosphere +might use a spectral Grid based on spherical harmonics, Component +GFDL Ocean might use a latitude-longitude Grid but with a patched decomposition +that does not include land masses, and Component NSIPP Land might use a m +osaic-based Grid for representing vegetation patchiness and a catchment area based +Grid for river routings. The ESMF infrastructure layer contains tools to help develop +software for coupling between Components on different Grids, mapping between Components +with different distributions in a multi-processor compute environment and synchronizing +events between Components with different time-stepping intervals +and algorithms.
+\scalebox{0.5}{\includegraphics{regrid}}
+
+ +

+ +

+12.3.1 FieldBundle, Field and Array classes +

+FieldBundle, Field and Array classes contain data together with descriptive +physical and computational attribute information. The physical attributes +include information that describes the units of the data. The computational +attributes include information on the layout in memory of the field data. The +Field class is primarily geared toward structured data. A comparable class, +called Location Stream, provides a self-describing +container for unstructured observational data streams. + +

+ +

+12.3.2 Grid class +

+The Grid class is an extensible class that holds discrete grid information. It has subtypes that allow +it to serve as a container for the full range of different physical grids that might arise in a coupled system. +In the example in figure 5 objects of type Grid would hold grid information for +each of the spectral grid, the latitude-longitude grid, the mosaic grid and the catchment grid. + +

+The Grid class is also used to represent the decomposition of a data structure into subdomains, typically for +parallel processing purposes. The class is designed to support a +generalized “ghosting” for tiled +decompositions of finite difference, finite volume and finite element codes. + +

+ +

+12.3.3 Time and Calendar management +

+To support synchronization between Components, several time and calendar +management classes are provided. These capabilities are provided in the Time, +Time Interval, Calendar, Clock, and Alarm classes. These classes allow Gridded + and Coupler Component processing to be latched to a common controlling Clock, +and to schedule notification of +regular events, such as a coupling intervals, and unique events. + +

+ +

+12.3.4 Config resource file manager +

+The Config class is a utility for accessing configuration files that are in +ASCII format. This utility enables configuration files to be prepared using +more flexible formatting than Fortran namelists - for example, it permits the +input of tables of data. + +

+ +

+12.3.5 DELayout and virtual machine +

+To provide a mechanism for ensuring performance portability, ESMF defines +DELayout and virtual machine (VM) classes. These classes provide a set of +high-level and platform independent interfaces to performance critical parallel +processing communication routines. These routines can be tuned +to specific platforms to ensure optimal parallel performance on many platforms. + +

+ +

+12.3.6 Logging and error handling +

+The LogErr class is designed to aid in managing the complexity of +multi-Component applications. It provides ESMF with a unified mechanism +for managing logs and error reporting. + +

+ +

+12.3.7 File input and output +

+The infrastructure layer will define a set of IO classes for storing and +retrieving Array, Field, and Grid information to and from persistent storage. + +

+ +

+ +
+esmf_support@ucar.edu +
+ + diff --git a/docs/nightly/fix/reconcile-info/ESMF_usrdoc/node14.html b/docs/nightly/fix/reconcile-info/ESMF_usrdoc/node14.html new file mode 100644 index 000000000..c469b3460 --- /dev/null +++ b/docs/nightly/fix/reconcile-info/ESMF_usrdoc/node14.html @@ -0,0 +1,325 @@ + + + + + +13 How to Adapt Applications for ESMF + + + + + + + + + + + + + + + + + + + + + +Subsections + + + +
+ +

+ +
+13 How to Adapt Applications for ESMF +

+ +

+In this section we describe how to bring existing applications +into the framework. + +

+ +

+13.1 Individual Components +

+ +

+ +

    +
  • Decide what parts will become Gridded Components + +

    +A Gridded Component is a self-contained +piece of code which will be initialized, will be called once or many times +to run, and then will be finalized. It will be expected to either take in +data from other components/models, produce data, or both. + +

    +Generally a computational model like an ocean or atmosphere model will +map either to a single component or to a set of multiple nested +components. + +

    +

  • +
  • Decide what data is produced + +

    +A component provides data to other components using an ESMF State +object. A component should fill the State object with a description of +all possible values that it can export. Generally, a piece of code +external to the component (the AppDriver, or a parent component) will +be responsible for marking which of these items are actually going to +be needed. Then the component can choose to either produce all possible +data items (simpler but less efficient) or only produce the data items +marked as being needed. The component should consult the CF data naming conventions +when it is listing +what data it can produce. + +

    +

  • +
  • Decide what data is needed + +

    +A component gets data from other components using an ESMF State object. +The application developer must figure out how to get any required +fields from other components in the application. + +

    +

  • +
  • Make the data blocks private + +

    +A component should communicate to other components only through the +framework. All global data items should be private to Fortran modules, +and ideally should be isolated to a single derived type which is allocated +at run time. + +

    +

  • +
  • Divide the code up into start/middle/end phases + +

    +A component needs to provide 3 routines which handle +initialization, running, and finalization. (For codes which have +multiple phases of initialize, run, and finalize it is possible to have +multiple initialize, run, and finalize routines.) + +

    +The initialize routine needs to allocate space, initialize +data items, boundary conditions, and do whatever else is necessary in +order to prepare the component to run. + +

    +For a sequential application in which all components are on the same +set of processors, the run phase will +be called multiple times. Each time the model is expected to take in +any new data from other models, do its computation, and produce data +needed by other components. A concurrent model, in which different +components are run on different processors, may execute the same +way. Alternatively, it may have its run routine called +only once and may use different parts of the framework to arrange +data exchange with other models. This feature is not yet implemented +in ESMF. + +

    +The finalize routine needs to release space, write out results, +close open files, and generally close down the computation gracefully. + +

    +

  • +
  • Make a "Set Services" subroutine + +

    +Components need to provide only a single externally visible entry point. +It will be called at start time, and its job is to register with the +framework which routines satisfy the initialize, run, and finalize +requirements. If it has a single derived type that holds its private data, +that can be registered too. + +

    +

  • +
  • Create ESMF Fields and FieldBundles for holding data + +

    +An ESMF State object is fundamentally an annotated list of other +ESMF items, most often expected to be ESMF FieldBundles (groups of +Fields on the same grid). Other things which can be placed in a +State object are Fields, Arrays (raw data with no gridding/coordinate +information) +and other States (generally used by coupling code). Any data which is +going to be received from other components or sent to other components +needs to be represented as an ESMF object. + +

    +To create an ESMF Field the code must create an ESMF Array object to +contain the data values, and usually an ESMF Grid object to describe the +computational grid where the values are located. If this is an +observational data stream the locations of the data values will be held in +an ESMF Location Stream object instead of a Grid. + +

    +

  • +
  • Be able to read an ESMF clock + +

    +During the execution of the run routine, information about time +is transferred between components through ESMF Clocks. The +component needs to be able to at least query a Clock for the +current time using framework methods. + +

    +

  • +
  • Decide how much of the lower level infrastructure to use + +

    +The ESMF framework provides a rich set of time management functions, +data management and query functions, and other utility +routines which help to insulate the user's code from the differences +in hardware architectures, system software, and runtime environments. +It is up to the user to select which parts of these functions they +choose to use. + +

    +

  • +
+ +

+ +

+13.2 Full Application +

+ +

+ +

    +
  • Decide on which components to use + +

    +Select from the set of ESMF components available. + +

    +

  • +
  • Understand the data flow in order to customize a Coupler Component + +

    +Examine what data is produced by each component and what data is +needed by each component. The role of Coupler Components in the +ESMF is to set up any necessary regridding and data conversions +to match output data from one component to input data in another. + +

    +

  • +
  • Write or adapt a Coupler Component + +

    +Decide on a strategy for how to do the coupling. There can be a single +coupler for the application or multiple couplers. +Single couplers follow a "hub and +spoke" model. +Multiple couplers can couple between subsets of the components, and +can be written to couple either only one-way +(e.g. output of component A into input of component B), or two-way +(both A to B and B to A). + +

    +The coupler must understand States, Fields, FieldBundles, +Grids, and Arrays and ESMF execution/environment objects +such as DELayouts. + +

    +

  • +
  • Use or adapt a main program + +

    +The main program can be a copy of a driver found in any of the +system_tests sub-directories. The customization needed is to +use the correct Component module files, to gain access to the +SetServices routines. + +

    +Although ESMF provides example source code for the main program, it is +not considered part of the framework and can be changed by +the user as needed. + +

    +The final thing the main program must do is call ESMF_Finalize(). +This will close down the framework and release any associated resources. + +

    +The main program is responsible for creating a top-level +Gridded Component, which in turn creates other Gridded and Coupler +Components. We encourage this hierarchical design because it +aids in extensibility - the top level Gridded Component can be +nested in another larger application. +The top-level component contains the main time loop and is +responsible for calling the +SetServices entry point for each child component it creates. + +

    +

  • +
+ +

+ +

+ +
+esmf_support@ucar.edu +
+ + diff --git a/docs/nightly/fix/reconcile-info/ESMF_usrdoc/node15.html b/docs/nightly/fix/reconcile-info/ESMF_usrdoc/node15.html new file mode 100644 index 000000000..f399cd9ee --- /dev/null +++ b/docs/nightly/fix/reconcile-info/ESMF_usrdoc/node15.html @@ -0,0 +1,1012 @@ + + + + + +14 Glossary + + + + + + + + + + + + + + + + + + + + + +

+14 Glossary +

+ +

+ +

+This glossary defines terms used in Earth system modeling to describe +parallel computer architectures, grids and grid decompositions, and +numerical and computational methods. + +

+

+
+
360-day calendar
+
A calendar in which +every one of twelve months has thirty days. See also Calendar, no-leap calendar. + +

+

+
Accumulator
+
A facility for collecting + and averaging data values. Generally accumulators are associated with + temporal averaging, although they might be associated with + other weighted averaging operations. ESMF does not yet have accumulators. + +

+

+
Application Programming Interface (API)
+
API refers to the + set of routines and types in a software package that are + available to its users. It doesn't include private or internal + routines or types. + +

+

+
Alarm
+
Like a real alarm clock, the ESMF Alarm class notifies + the user of an event that occurs at a particular + time (or set of times). In order to determine whether it + is "ringing", an ESMF Alarm is “read” by an explicit + application action. An Alarm is associated + with a particular Clock. + +

+

+
Application
+
A coherent computational + entity run as a single executable or set of communicating executables. + It typically consists of a set of interacting components. + See also component. + +

+

+
Array
+
An ESMF class that represents a multi-dimensional + data array. Unlike a native Fortran or C++ array, an ESMF Array + can store information about halo points. See also halo. + +

+

+
Background grid
+
A background grid associates each point in an observational data stream + (Location Stream) with a location on a grid. A single grid cell may contain + zero or more Location Stream points. See also Location Stream, cell. + +

+

+
BUFR
+
Binary Universal Form of Representation. This is a World Meteorological Organization +data format. See BUFR links. + +

+

+
FieldBundle
+
The ESMF FieldBundle class represents a set of fields that + are associated with the same physical grid and are distributed in + the same fashion across the same physical axes. Fields within a + FieldBundle may be staggered differently and may have different (non-distributed) + dimensions. See also Field, Packed FieldBundle, + Loose FieldBundle. + +

+

+
Calendar
+
The Calendar is an ESMF class that + stores a representation of a particular calendar type, such as Gregorian. + See also specific calendar types such as 360-day and no-leap. + +

+

+
Cell
+
A physical location that is specified by both + its extent (vertices) and nominal central location, and is associated with + a single integer index value or a set of integer index values ( e.g. + (i) for 1-d, (i,j) for 2-d, (i,j,k) for 3d ). + See also index. + +

+

+
CF Conventions
+
Climate and Forecast Conventions. These are emerging conventions for expressing +Earth science metadata. See the CF home page. + +

+

+
Change Review Board (CRB)
+
The Change Review Board is the ESMF management +body that sets project schedules and priorities. Its Terms of Reference +are in the ESMF Project Plan. + +

+

+
Clock
+
Clock is an ESMF class that tracks the passage of time and + reports the current time instant. An ESMF Clock + is stepped forward in increments of a time step, and can be associated + with one or more Alarms. + See also Time, Time Interval, Alarm. + +

+

+
Component
+
The ESMF Component class represents large-scale + computational entities associated with a particular physical + process or computational function, such as a land model. + Currently ESMF supports Gridded Component + and Coupler Component classes. + Components may be generic or + user-supplied. + +

+

+
Computational domain
+
For a given DE, the data points that + have unique global indices and are updated by the DE. + See also exclusive domain, total domain, halo. + +

+

+
Computational resource
+
Something that appears as a + physical or virtual computer resource. Example of computational resources + are a CPU, a network connection, a communication API, a protocol, a + particular network fabric or a piece of computer memory. + +

+

+
Concurrent execution
+
Concurrent execution of model components occurs when two or more components, + whether in the same or different executables, run simultaneously. + See also Sequential execution. + +

+

+
Congruent
+
If all Fields in a FieldBundle contain the same data type, rank, shape, and + relative locations, the FieldBundle is said to be congruent. + +

+

+
Coupler Component
+
An ESMF Component that includes all data and actions needed to enable + communication between two or more Gridded Components. + See also component, Gridded Component. + +

+

+
Curvilinear grid
+
A curvilinear grid is a logically rectangular grid in which + coordinates in physical space must be specified by giving + the explicit coordinates for each point. Curvilinear + grids are often uniform or rectilinear grids that have been + warped, for example in order to place a pole over land points + so it does not affect the computations performed on an + ocean model grid. See also + logically rectangular grid, + Uniform grid, Rectilinear grid. + +

+

+
Data dependency
+
The property of a computational + operator that defines the data indices required to perform + the computation at a point. + +

+

+
Data parallel
+
The quality of an application that allows roughly + the same calculation to be performed by all processors at the same + time on the same data set, which is partitioned among multiple memory + locations. Single components that do not contain nested components + are often data parallel. See also + task parallel, SPMD, + MPMD. + +

+

+
Data transpose
+
Rearrangement of data arrays that share the + same global domain. + +

+

+
Day of year
+
The day number in the calendar year. + January 1 is day 1 of the year. Day of year expressed in a floating point + format is used to express the day number plus the time of day. + For example, assuming a Gregorian calendar: + +

+ + + + + + + + + + +
dateday of year
10 January 2000, 6Z10.25
31 December 2000, 18Z366.75
+ +

+

+
DE
+
Short for Decomposition Element. + +

+

+
DELayout
+
DELayout is the ESMF class that + defines the topology of a set of DEs and specifies + how the DEs are assigned to PETs in an ESMF + Virtual Machine. + +

+

+
Decomposition Element (DE)
+
A DE is the smallest unit of decomposition of a + computational task. DEs are virtual units, not necessarily having + a 1-to-1 correspondence to the Persistent Execution Threads (PETs) + of a VM or the physical Processing Elements (PEs) in the underlying + physical machine. Consequently there are no restrictions on the + number of DEs that can be created. The application writer may chose + the number of DEs to best match the computational problem and the + employed algorithm. A DELayout assigns a topology to + Decomposition Elements. + See also DELayout. + +

+

+
Deep object
+
In an environment + in which the calling and implementation language of a library are + different, deep objects are defined as those whose memory is + allocated by the implementation language. + See also shallow object. + +

+

+
Distributed Grid
+
DistGrid is the ESMF class that defines the + decomposition of a Grid's global index space across a DELayout. + DistGrid objects are contained in an ESMF Grid. + See also Grid, DELayout. + +

+

+
Distribution
+
The function that expresses + the relationship between the indices in a Distributed Grid and the elements + in a DELayout. See also Distributed Grid, + DELayout. + +

+

+
Domain decomposition
+
The act of grid + distribution: creating a DistGrid, and associating grid points with + the DistGrid. The dimensionality of the domain decomposition is the + same as the dimensionality of the associated DistGrid. + +

+

+
Exact
+
The word exact is used + to denote entities, such as time instants and time intervals, for + which truncation-free arithmetic is required. + +

+

+
Exchange grid
+
A grid whose vertices are + formed by the intersection of the vertices of two overlying grids. Each + cell in the exchange grid overlies exactly one cell in each grid of the + exchange. See also grid, cell. + +

+

+
Exchange Packets
+
Exchange Packets are a private + ESMF class that contains data in an optimal form for data transfers. + +

+

+
Exclusive domain
+
For a given DE, the + set of data points that are not replicated on any other DE. See also + total domain, + computational domain, halo. + +

+ +

+
Executable
+
A program that is under independent control by the operating + system. + +

+ +

+
Export State
+
The data and metadata that + a component can make available for exchange with other components. + This may be data at a physical boundary (e.g land-atmosphere interface) + or in other cases, it might be the entire model state. + See also State, import State. + +

+ +

+
Field
+
The ESMF Field class represents a tangible or derived quantity +defined within a continuous region of space. The Field class includes +the physical grid associated with the quantity and a decomposition +that specifies how data associated with points in the +physical grid are distributed in computer memory and/or how computational +work is divided among threads. A Field also includes a specification +of gridpoint staggering and any metadata necessary for a full description +of its data. See also Grid. + +

+ +

+
Framework
+
We use the term framework to + refer to a structured collection of software building blocks that can be used + and customized to develop components, assemble them into an application, and + run the application. + +

+ +

+
Generic component
+
A generic component + is one supplied by the framework. The user is not expected to + customize or otherwise modify it. ESMF does not currently contain any + generic components. See also user component, + component. + +

+ +

+
Generic transform
+
A generic transform + is an operation supplied by the framework, for example, a method + that converts gridded data from one supported grid and/or + decomposition to another using a specified technique. See also user + transform. + +

+

+
Global domain
+
A global domain refers to the full extent of a DELayout or Grid. + +

+ +

+
Global reduction
+
Reduction operations (sum, max, min, etc.) that condense data distributed + over a global domain. + See also global broadcast. + +

+

+
Global broadcast
+
Scatter operations on data distributed over a + global domain. + See also global reduction. + +

+

+
Gregorian
+
The Gregorian calendar is the most widely used calendar +in the world. The calendar's zeroth year is at the +birth of Jesus Christ. Years after the origin (anno Domini, +or AD) are positive, and before (Before Christ, or BC) are +negative. Several corrections (leap year, 100 year, 400 year) +are necessary to keep the calendar aligned with solar cycles. + See also Calendar. + +

+

+
GRIB
+
The GRid in Binary Data format from the World Meteorological Organization. +This format is frequently used by operational weather centers. See the +GRIB +home page, and +GRIB2 +reference guide. + +

+ +

+
Grid
+
The discrete division of space associated with + a particular coordinate system. The ESMF Grid class contains + coordinate, domain decomposition, and memory + organization information required to manipulate + Fields, as well as to create and execute Grid transforms. + See also Distributed Grid, DELayout. + +

+ +

+
Grid staggering
+
A descriptor of relative locations + of scalar and vector data on a structured grid. On different + staggered grids, vector data may lie at cell faces or vertices, + while scalar data may lie in the interior. + +

+ +

+
Grid topology
+
Description of data connectivities for a grid. + +

+ +

+
Grid union
+
The formation of a new grid + by taking the union of the vertices of two input grids. + See also Grid. + +

+

+
Gridded Component
+
An ESMF class that represents a component that is associated with one + or more grids. No requirements + may be placed on the physical content of a Gridded Component's data or + on the nature of its computations. See also component, + Coupler Component. + +

+ +

+
Halo
+
For a given DE, a halo is a set of data points from the computational + domains of neighboring DEs that are replicated locally for computational + convenience. A halo can be defined as all the data points + in a DE's total domain excluding those in its computational domain. + See also computational domain, total domain, exclusive domain. + +

+

+
Halo update
+
A halo update operation involves synchronization of the values of some + or all halo points with the current values of those points on other DEs. + See also halo. + +

+ +

+
Import State
+
The data and metadata + that a component requires from other components in order to run. + See also State, export State. + +

+ +

+
Index
+
An integer value associated with a set of coordinates. + +

+ +

+
Index space
+
The space implied + by a set of indices. An index space has a defined dimensionality and + connectivity. + +

+ +

+
Index space location
+
A location within an index space. An index space location may be fractional. + See also physical location. + +

+

+
Instantiate
+
To create an actual instance of a software class. For example, each + variable of derived type Field in an ESMF Fortran application is an + instance of the Field class. + +

+

+
Interface
+
Used generally to refer to a set of operations that characterize + the behavior of a class or a component. Also used to refer to the + name and argument list of a particular method. + +

+ +

+
Joint Milestone Codeset(JMC)
+
Joint Milestone Codeset. This is the set of climate, weather and + data assimilation applications used as ESMF testbeds + during the initial NASA-funded phase of ESMF development. + +

+

+
Joint Specification Team(JST)
+
The JST is the body of developers and users who collaborate + to create the ESMF software. The main form of communication for + the JST is the weekly telecon. Terms of Reference are in the ESMF Project Plan. + +

+

+
LocalArray
+
A LocalArray is the portion of an ESMF Array that resides on a + particular DE. See also Array. + +

+

+
LocalTile
+
A LocalTile is the portion of a grid Tile that resides on a + particular DE. See also Tile. + +

+ +

+
Location Stream
+
An ESMF class that represents + a list of locations with no assumed relationship between these locations. + The elements of a Location Stream are not assumed to share the same + metadata. Location Streams are not yet implemented. + See also background grid. + +

+ +

+
Logically rectangular grid
+
A grid in which a set of coordinates (x,y,z, ...) in physical + space can be mapped one-to-one to a set of regularly spaced + points (i,j,k, ...) in a rectangular logical space, preserving + proximate relationships. See also Grid. + +

+ +

+
Loose FieldBundle
+
A loose FieldBundle + is an ESMF FieldBundle object that contains fields whose data is + not contiguous in memory. See also FieldBundle, + packed FieldBundle. + +

+

+
Machine model
+
A generic representation of the computing + platform architecture. + +

+ +

+
Mask
+
A data field marking a span within a larger data field. + +

+ +

+
Memory domain
+
The portion of memory associated with the data on a given DE. + The memory domain is always at least + as large as the total domain. See also total domain. + +

+

+
Mosaic grid
+
A mosaic grid is composed of multiple logically rectangular + grid tiles that are connected at their edges, for example, a cubed sphere + grid. See also grid tile. + +

+ +

+
MPMD
+
Multiple Program Multiple Datastream. + Multiple executables, any of which could itself be an SPMD + executable, executing independently within an application. + See also SPMD. + +

+

+
Namelist
+
An I/O feature supported by Fortran that +defines a structured syntax for creating text files of initial variable +settings and defines language features for compactly reading the files. +The syntax for Namelist files can be found in most Fortran manuals +and tutorial texts. + +

+

+
NetCDF
+
Network Common Data Form. This is a popular I/O library and data format +in the Earth sciences. See NetCDF home page. + +

+ +

+
Node
+
A node is a set of computational resources + that is typically located in close proximity on a computing platform + and that is associated with a single shared memory buffer. + +

+ +

+
No-leap calendar
+
In this calendar every year uses the same months + and days per month as in a non-leap year of a Gregorian calendar. See + also Calendar, 360-day calendar. + +

+ +

+
Packed FieldBundle
+
A packed FieldBundle is an + ESMF FieldBundle object that contains + a data buffer with field data arranged contiguously in memory. See + also FieldBundle, loose FieldBundle. + +

+

+
Parallel execution
+
The term parallel execution refers to the execution of a software + application on more than one PE. + See also serial. + +

+ +

+
PE
+
Short for Processing Element. + +

+ +

+
PET
+
Short for Persistent Execution Thread. + +

+ +

+
Persistent Execution Thread (PET)
+
Provides a + path for executing an instruction sequence. A PET has a lifetime at least + as long as the associated data objects. The PET is a key abstraction + used in the ESMF Virtual Machine. + +

+ +

+
Physical location
+
A point in physical space to which a data point pertains. See also + index space location. + +

+ +

+
Platform
+
The processor hardware, operating system, compiler and + parallel library that together form a unique compilation target. + +

+

+
Processing Element (PE)
+
A Processing Element (PE) is the smallest physical processing unit available + on a particular hardware platform. + +

+

+
Rectilinear grid
+
A rectilinear grid is a logically rectangular grid in which + the coordinates in physical space can be fully specified by + the spacing of grid points along each grid axis. The + gridpoints are located where the coordinate values intersect. + The spacing along each axis may vary. + See also logically rectangular grid, + Uniform grid, Curvilinear grid. + +

+

+
Regrid weight generation methods and applications
+
The collective term for all ESMF interfaces that compute regridding weights. + This covers Fortran methods: + ESMF_FieldRegridStore(), + ESMF_FieldBundleRegridStore(), + ESMF_RegridWeightGen(), + and the command line application: ESMF_RegridWeightGen. + +

+ +

+
Scheduler
+
An operating system component + that assigns system resources (processors, memory, CPU time, + I/O channels, etc.) to executables. + +

+ +

+
Search
+
Search refers to the process of determining which processors must + exchange data (and how much) when regridding between decomposed grids. + See also sweep. + +

+

+
Sequential execution
+
Sequential execution of model components describes the case in which + one component waits for another to finish before it begins + to run. Components executing sequentially may be in the same or + different executables and may have coincident or non-overlapping + memory distributions. See Concurrent execution. + +

+

+
+
Serial Execution + The term serial execution refers to the execution of a software + application on only one PET. See also parallel execution. + +

+ +

+
Shallow object
+
In an environment + in which the calling and implementation language of a library are + different, shallow objects are defined as those whose memory is + allocated by the calling language. + See also deep object. + +

+ +

+
Span
+
The physical extent associated with a grid. + +

+ +

+
SPMD
+
Single Program Multiple Datastream. + A single executable, possibly with many components (representing + for example the atmosphere, the ocean, land surface) executing + serially or concurrently. See also MPMD. + +

+ +

+
State
+
The ESMF State class may + contain Arrays, FieldBundles, Fields, or other States. It is used to + transfer data between components. See also import State, export State. + +

+ +

+
Sweep
+
Sweep refers to the regridding process of looping through lists of cells + from one grid, hunting for interactions with a specified point or subsegment + from the other grid. The type of interaction depends on the regrid method + and is either an intersection with an identified subsegment or containment + of an identified point. The limitation of the range of cells that must be + examined is also considered part of the sweep algorithm. + See also search. + +

+ +

+
System time
+
Time spent doing system tasks + such as I/O or in system calls. May also include time spent running + other processes on a multiprocessor system. See also user + time, wall clock time. + +

+ +

+
Task parallel
+
The quality of an application that allows + different calculations to be performed by different processors at the same + time on what are usually different data sets. Large-scale task parallelism + is often associated with multi-component applications in which each component + represents a separate domain or function. Task parallel applications + may be run with components executing either sequentially or concurrently, + and either in a SPMD or MPMD mode. See also + data parallel, + SPMD, MPMD, + sequential execution, + concurrent execution. + +

+ Some grids used in Earth system modeling, such as cubed sphere grids, are + most naturally represented + as a set of logically rectangular grids that are connected at their + edges. Following V. Balaji [2006] we refer to each of the + logically rectangular grids in a composite grid, or mosaic grid, as a + Tile. See also mosaic grid, + LocalTile. + +

+

+
Time
+
Time is an ESMF class that is made up of a time and date and an + associated calendar. It may include a time zone. + Jan 3rd 1999, 03:30:24.56s, UTC is one example of a Time. + See also Calendar. + +

+ +

+
Time Interval
+
Time Interval is an ESMF class that represents the + period between any two time instants, measured in units, such as days, + seconds, and fractions of a second. The periods 2 days and 10 seconds, + 86400 and 1/3 seconds and 31104000.75 seconds are all + possible values for Time Intervals. + Mathematical operations such as addition, multiplication, and subdivision + can be applied to Time Intervals, and they can have negative values. + See also Time + +

+ +

+
Total domain
+
For a given DE, the entirety + of the data points allocated, included replicated points from neighboring + DEs. See also computational domain, + exclusive domain, halo + +

+ A logically rectangular grid in which the coordinates in physical + space can be completely specified by the two sets of coordinates + that define the opposing corner points of the physical span. The coordinates + of each point in physical space can be obtained by interpolating from + the corner points, using the evenly spaced logical grid to specify + evenly spaced grid point locations. See also + logically rectangular grid, + Rectilinear grid, Curvilinear grid. + +

+ +

+
User component
+
A component that is customized or + written by the user. All ESMF components are currently user components. + See also generic component. + +

+ +

+
User time
+
Processor time actually spent executing + a PET's code. See also system time, + wall clock time. + +

+ +

+
User transform
+
A user-supplied + method that is used to extend framework capabilities beyond generic + transforms. See also generic transform. + +

+

+
Virtual Address Space (VAS)
+
A term that refers to + the address space in which the computer memory is represented and + becomes accessible to an executing PET. + +

+ +

+
VM
+
Short for Virtual Machine. + +

+ +

+
Virtual Machine (VM)
+
An ESMF class that abstracts hardware and + operating system details. The VM's responsibilities are resource management + and topological description of the underlying compute resources in terms of + PETs. In addition the VM provides a transparent, low level + communication API. + +

+ +

+
Wall clock time
+
Elapsed real-world time + (i.e. difference between start time minus stop time). + See also system time, user time. + +

+

+
+ + + +
+esmf_support@ucar.edu +
+ + diff --git a/docs/nightly/fix/reconcile-info/ESMF_usrdoc/node16.html b/docs/nightly/fix/reconcile-info/ESMF_usrdoc/node16.html new file mode 100644 index 000000000..cd7b1dba1 --- /dev/null +++ b/docs/nightly/fix/reconcile-info/ESMF_usrdoc/node16.html @@ -0,0 +1,66 @@ + + + + + +Bibliography + + + + + + + + + + + + + + + + + + + + + +

+Bibliography +

1 +
+Eaton, B., J. Gregory, B. Drach, K. Taylor, and S. Hankin. +
NetCDF Climate and Forecast (CF) Metadata Convention. +
+ http://cfconventions.org/Data/cf-conventions/cf-conventions-1.6/build/cf-conventions.html, + last accessed on Nov 27, 2015. +
+ +

+
+esmf_support@ucar.edu +
+ + diff --git a/docs/nightly/fix/reconcile-info/ESMF_usrdoc/node17.html b/docs/nightly/fix/reconcile-info/ESMF_usrdoc/node17.html new file mode 100644 index 000000000..29e2eaad4 --- /dev/null +++ b/docs/nightly/fix/reconcile-info/ESMF_usrdoc/node17.html @@ -0,0 +1,69 @@ + + + + + +About this document ... + + + + + + + + + + + + + + + + + + + +

+About this document ... +

+

+This document was generated using the +LaTeX2HTML translator Version 2018 (Released Feb 1, 2018) +

+Copyright © 1993, 1994, 1995, 1996, +Nikos Drakos, +Computer Based Learning Unit, University of Leeds. +
+Copyright © 1997, 1998, 1999, +Ross Moore, +Mathematics Department, Macquarie University, Sydney. +

+The command line arguments were:
+ latex2html -white -toc_depth 5 -split +1 -show_section_numbers -local_icons -address 'esmf_support@ucar.edu' ESMF_usrdoc.tex +

+The translation was initiated on 2024-12-03 +


+
+esmf_support@ucar.edu +
+ + diff --git a/docs/nightly/fix/reconcile-info/ESMF_usrdoc/node2.html b/docs/nightly/fix/reconcile-info/ESMF_usrdoc/node2.html new file mode 100644 index 000000000..1526b4855 --- /dev/null +++ b/docs/nightly/fix/reconcile-info/ESMF_usrdoc/node2.html @@ -0,0 +1,155 @@ + + + + + +1 What is the Earth System Modeling Framework? + + + + + + + + + + + + + + + + + + + + + +

+1 What is the Earth System Modeling Framework? +

+ +

+The Earth System Modeling Framework (ESMF) is a suite of software +tools for developing high-performance, multi-component Earth science +modeling applications. Such applications may include a few or dozens +of components representing atmospheric, oceanic, terrestrial, or +other physical domains, and their constituent processes (dynamical, chemical, +biological, etc.). Often these components are developed by different +groups independently, and must be “coupled” together using software +that transfers and transforms data among the components in order to form +functional simulations. + +

+ESMF supports the development of these complex applications in a number +of ways. It introduces a set of simple, consistent component interfaces +that apply to all types of components, including couplers themselves. These +interfaces expose in an obvious way the inputs and outputs of each component. +It offers a variety of data structures for transferring data between components, +and libraries for regridding, time advancement, and other common modeling +functions. Finally, it provides a growing set of tools for using metadata +to describe components and their input and output fields. This capability +is important because components that are self-describing +can be integrated more easily into automated workflows, model and dataset +distribution and analysis portals, and other emerging “semantically enabled” +computational environments. + +

+ESMF is not a single Earth system model into which all components +must fit, and its distribution doesn't contain any scientific code. +Rather it provides a way of structuring components so that they can be used +in many different user-written applications and contexts with minimal code +modification, and so they can be coupled together in new configurations +with relative ease. The idea is to create many components across a +broad community, and so to encourage new collaborations and combinations. + +

+ESMF offers the flexibility needed by this diverse user base. It is tested +nightly on more than two dozen platform/compiler combinations; can be +run on one processor or thousands; supports shared and distributed memory +programming models and a hybrid model; can run components +sequentially (on all the same processors) or concurrently (on mutually +exclusive processors); and supports single executable or multiple +executable modes. + +

+ESMF's generality and breadth of function can make it daunting for the +novice user. To help users navigate the software, we try to apply +consistent names and behavior throughout and to provide many examples. +The large-scale structure of the software is straightforward. +The utilities and data structures for building modeling components +are called the ESMF infrastructure. The coupling interfaces and +drivers are called the superstructure. User code sits between +these two layers, making calls to the infrastructure +libraries underneath and being scheduled and synchronized by the +superstructure above. The configuration resembles a sandwich, as +shown in Figure 1. + +

+ESMF users may choose to extensively rewrite their codes +to take advantage of the ESMF infrastructure, or they may decide to +simply wrap their components in the ESMF superstructure in order to +utilize framework coupling services. Either way, we encourage users +to contact our +support team +if questions arise about how to best +use the software, or how to structure their application. ESMF is +more than software; it's a group of people dedicated to realizing +the vision of a collaborative model development community that spans +institutional and national bounds. + +

+ +

+ +
+esmf_support@ucar.edu +
+ + diff --git a/docs/nightly/fix/reconcile-info/ESMF_usrdoc/node3.html b/docs/nightly/fix/reconcile-info/ESMF_usrdoc/node3.html new file mode 100644 index 000000000..d2efe66a0 --- /dev/null +++ b/docs/nightly/fix/reconcile-info/ESMF_usrdoc/node3.html @@ -0,0 +1,131 @@ + + + + + +2 The ESMF User's Guide + + + + + + + + + + + + + + + + + + + + + +

+2 The ESMF User's Guide +

+ +

+This ESMF User's Guide is mainly an installation and build guide for +the new ESMF user and a build reference for the experienced user. +New users are strongly encouraged to download the ESMF software and try +running the system tests and examples that illustrate both ESMF utilities and +coupling services. + +

+The User's Guide is organized as follows. The next two sections, +3 and 4, +concern user support and how to submit comments on the ESMF system +to our development team. +Sections 5 through 11 contain a +Quick Start guide that explains how to install the ESMF software +and run the self-tests, +followed by more detail on ESMF structure and operation, +such as a description of the directory structure and how to build and +run the ESMF example programs. +Section 12 is an architectural overview that describes the +framework's basic goals and features. +Section 13 details the steps required to adapt a component +for use with ESMF. Finally, to help you become familiar with ESMF +terminology, the last section in the User's Guide is a glossary. + +

+

+
+
+ + + +
Figure 1: +Schematic of the ESMF “sandwich” architecture. In this +design the framework consists of two parts, an upper level +superstructure layer and a lower-level infrastructure layer. +User code is sandwiched between these two layers.
+\scalebox{1.0}{\includegraphics{ESMF_sandwich}}
+
+
+
+ +

+ +

+ +
+esmf_support@ucar.edu +
+ + diff --git a/docs/nightly/fix/reconcile-info/ESMF_usrdoc/node4.html b/docs/nightly/fix/reconcile-info/ESMF_usrdoc/node4.html new file mode 100644 index 000000000..885a13829 --- /dev/null +++ b/docs/nightly/fix/reconcile-info/ESMF_usrdoc/node4.html @@ -0,0 +1,82 @@ + + + + + +3 How to Contact User Support and Find Additional Information + + + + + + + + + + + + + + + + + + + + + +

+ +
+3 How to Contact User Support and Find Additional Information +

+The ESMF team can provide assistance in using the framework in your +applications. +For user support, please contact +esmf_support@ucar.edu. + +

+More information on the ESMF project as a whole is available on the +ESMF website, http://www.earthsystemmodeling.org. +The website includes release notes and known bugs for each version of the +framework, supported platforms, project history, values, and metrics, related projects, +the ESMF management structure, and much more. Those curious about specific +interfaces should refer to the ESMF Reference Manual for Fortran, which contains a detailed listing and description of +the ESMF API (this version of the document corresponds to the last public version of the framework). Also available on the ESMF website is the +ESMF Developer's Guide +that details our project procedures and conventions. + +

+


+
+esmf_support@ucar.edu +
+ + diff --git a/docs/nightly/fix/reconcile-info/ESMF_usrdoc/node5.html b/docs/nightly/fix/reconcile-info/ESMF_usrdoc/node5.html new file mode 100644 index 000000000..1a51639e5 --- /dev/null +++ b/docs/nightly/fix/reconcile-info/ESMF_usrdoc/node5.html @@ -0,0 +1,67 @@ + + + + + +4 How to Submit Comments, Bug Reports, and Feature Requests + + + + + + + + + + + + + + + + + + + + + +

+ +
+4 How to Submit Comments, Bug Reports, and Feature Requests +

+We welcome input on any aspect of the ESMF project. Send +questions and comments to esmf_support@ucar.edu. + +

+ +


+
+esmf_support@ucar.edu +
+ + diff --git a/docs/nightly/fix/reconcile-info/ESMF_usrdoc/node6.html b/docs/nightly/fix/reconcile-info/ESMF_usrdoc/node6.html new file mode 100644 index 000000000..39f5b5905 --- /dev/null +++ b/docs/nightly/fix/reconcile-info/ESMF_usrdoc/node6.html @@ -0,0 +1,707 @@ + + + + + +5 Quick Start + + + + + + + + + + + + + + + + + + + + + +Subsections + + + +
+ +

+ +
+5 Quick Start +

+ +

+This section gives a brief description of how to get the ESMF software, build +it, and run the self-tests to verify the installation was successful. There is +also a short guide for using the bundled ESMF command line tools. More detailed +information on each of these steps is provided in sections 9, + 11 and 8, respectively. + +

+With a growing user community requiring access to ESMF, central computing +resources have started providing system wide ESMF installations. The availablity +of center-managed ESMF installations dramatically increases the ease of use of +ESMF. Practically it means that if you are working on a system (such as +Jaguar) that offers a standard ESMF installation, you do not have to +download, build and validate your own ESMF installation from source! Instead you +can proceed directly to using ESMF as a programming library or through access to +the bundled command line tools as described in sections 6 and +8, respectively. + +

+ +

+ +
+5.1 Downloading ESMF +

+ESMF is distributed via releases on GitHub. Each release page contains release notes, +known issues, and links to supported platforms, documentation, and other related information +Releases on GitHub can be found from the ESMF web page via: +
+    http://www.earthsystemmodeling.org -> Download
+
+ +

+ +

+5.2 Directory Structure +

+The current list of directories includes the following: + +
    +
  • README +
  • +
  • build +
  • +
  • build_config +
  • +
  • makefile +
  • +
  • scripts +
  • +
  • src +
  • +
+ +

+The build_config directory contains subdirectories for +different operating system and compiler combinations. This is +a useful area to examine if porting ESMF to a new platform. + +

+ +

+5.3 Building ESMF +

+ +

+After downloading and unpacking the ESMF tar file, the build procedure is: + +

    +
  1. Set the required environment variables. +
  2. +
  3. Type make info to view and verify your settings +
  4. +
  5. Type make to build the library. +
  6. +
  7. Type make check to run self-tests to verify +the build was successful. +
  8. +
+See the following subsections for more information on each of these steps. Also +consult section 9 for a complete discussion of the the ESMF +build process. + +

+ +

+5.3.1 Environment variables +

+ +

+The syntax for setting environment variables depends on which shell +you are running. Examples of the two most common ways to set +an environment variable are: +

+
ksh
+
export ESMF_DIR=/home/joeuser/esmf +
+
csh
+
setenv ESMF_DIR /home/joeuser/esmf +
+
+ +

+The shell environment variables listed below are the ones most +frequently used. There are others which address needs on specific +platforms or are needed under more unusual circumstances; +see section 9 for the full list. +

+
ESMF_DIR
+
The environment variable ESMF_DIR must be set to the full pathname +of the top level ESMF directory before building the framework. This is the +only environment variable which is required to be set on all platforms under +all conditions. + +

+

+
ESMF_BOPT
+
This environment variable controls the build option. To make a debuggable +version of the library set ESMF_BOPT to g before building. The +default is O (capital oh) which builds an optimized version of the +library. If ESMF_BOPT is O, ESMF_OPTLEVEL can also be set +to a numeric value between 0 and 4 to select a specific optimization level. + +

+

+
ESMF_COMM
+
On systems with a vendor-supplied MPI communications library, the vendor library +is chosen by default for communications. On these systems ESMF_COMM is +set to mpi, signaling to the ESMF build system to use the vendor MPI +implementation. +For other systems (e.g. Linux or Darwin) where a multitude of MPI +implementations are available, ESMF_COMM must be set to indicate which +implementation is used to build the ESMF library. Set ESMF_COMM according +to your situation to: mpt, mpich, mpich1, mpich2, mpich3, mvapich2, lam, openmpi +or intelmpi. ESMF_COMM may also be set to user indicating +that the user will set all the required flags using advanced ESMF environment +variables. Some individual MPI builds may create additional libraries that +need to be linked in, such as the legacy C++ bindings. These may be specified +via the ESMF_CXXLINKLIBS and ESMF_F90LINKLIBS environment +variables. + +

+Alternatively, ESMF comes with a single-processor MPI-bypass library which is +the default for Linux and Darwin systems. To force the use of this bypass +library set ESMF_COMM equal to mpiuni. + +

+

+
ESMF_COMPILER
+
The ESMF library build requires a working Fortran90 and C++ compiler. On +platforms that don't come with a single vendor supplied compiler suite +(e.g. Linux or Darwin) ESMF_COMPILER must be set to select which Fortran +and C++ compilers are being used to build the ESMF library. Notice that setting +the ESMF_COMPILER variable does not affect how the compiler +executables are located on the system. ESMF_COMPILER (together with +ESMF_COMM) affect the name that is expected for the compiler executables. +Furthermore, the ESMF_COMPILER setting is used to select compiler and +linker flags consistent with the compilers indicated. + +

+By default Fortran and C++ compiler executables are expected to be located in +a location contained in the user's PATH environment variable. This means +that if you cannot locate the correct compiler executable via the which +command on the shell prompt the ESMF build system won't find it either! + +

+There are advanced ESMF environment variables that can be used to select +specific compiler executables by specifying the full path. This can be used to +pick specific compiler executables without having to modify the PATH +environment variable. + +

+Use 'make info' to see which compiler executables the ESMF build system will +be using according to your environment variable settings. + +

+To see possible values for ESMF_COMPILER, cd to +$ESMF_DIR/build_config and list the directories there. The first part +of each directory name corresponds to the output of 'uname -s' for this +platform. The second part contains possible values for ESMF_COMPILER. In +some cases multiple combinations of Fortran and C++ compilers are possible, e.g. +there is intel and intelgcc available for Linux. Setting +ESMF_COMPILER to intel indicates that both Intel Fortran and +C++ compilers are used, whereas intelgcc indicates that the Intel Fortran +compiler is used in combination with GCC's C++ compiler. + +

+If you do not find a configuration that matches your situation you will need to +port ESMF. + +

+

+
ESMF_ABI
+
If a system supports 32-bit and 64-bit (pointer wordsize) application binary +interfaces (ABIs), this variable can be set to select which ABI to use. Valid +values are 32 or 64. By default the most common ABI is chosen. On +x86_64 architectures three additional, more specific ABI settings are available, +x86_64_32, x86_64_small and x86_64_medium. + +

+

+
ESMF_SITE
+
Build configure file site name or the value default. If not set, then the value +of default is assumed. When including platform-specific files, this value is +used as the third part of the directory name (parts 1 and 2 are the +ESMF_OS value and ESMF_COMPILER value, respectively.) + +

+

+
ESMF_ETCDIR
+
If a user wants to add Attribute package specification files for their own +customized Attribute packages, this is where they should go. ESMF will look in +this directory for files that specify which Attributes are in an Attribute +package for certain ESMF objects, and what the appropriate initial values would +be for those Attributes. The format for these Attribute package specification +files is to be defined in a future ESMF release. This environment variable is +largely for internal use at this point. + +

+

+
ESMF_INSTALL_PREFIX
+
This variable specifies the prefix of the installation path used during the +installation process accessible thought the install target. Libraries, F90 +module files, header files and documentation all are installed relative to +ESMF_INSTALL_PREFIX by default. The ESMF_INSTALL_PREFIX may be +provided as absolute path or relative to ESMF_DIR. + +

+

+
+ +

+ +

+5.3.2 GNU make +

+ +

+GNU Make is required to build the ESMF library. On some +systems this will be just the command make. On others +it might be installed as gmake or gnumake. +This document uses make consistently to refer to GNU Make. + +

+Use the --version option with the locally available make commands +to determine which variant corresponds to GNU Make on your system. Use the +respective command when interacting with the ESMF build system, and +where this documentation uses make. + +

+Notice that ESMF does not utilize Autotools (configure or autoconf) or CMake. +Instead, the selection of configuration options is done by setting environment +variables before building the framework. The relevant environment variables +all begin with prefix ESMF_, and are discussed in detail under section +9.5. + +

+ +

+5.3.3 make info +

+make info is a command that assists the user in verifying that the ESMF +variables have been set appropriately. It also tells the user the paths to +various libraries e.g. MPI that are set on the system. The user to review +this information to verify their settings. In the case of a build failure, +this information is invaluable and will be the first thing asked for by the +ESMF support team. Below is an example output from make info: + +

+

+--------------------------------------------------------------
+Make version:
+GNU Make 3.80
+Copyright (C) 2002  Free Software Foundation, Inc.
+This is free software; see the source for copying conditions.
+There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE.
+
+--------------------------------------------------------------
+Fortran Compiler version:
+Intel(R) Fortran Compiler for applications running on Intel(R) 64, \
+	Version 10.1    
+Build 20081024 Package ID: l_fc_p_10.1.021
+Copyright (C) 1985-2008 Intel Corporation.  All rights reserved.
+
+Version 10.1 
+
+--------------------------------------------------------------
+C++ Compiler version:
+Intel(R) C++ Compiler for applications running on Intel(R) 64, Version 10.1    
+Build 20081024 Package ID: l_cc_p_10.1.021
+Copyright (C) 1985-2008 Intel Corporation.  All rights reserved.
+
+Version 10.1 
+
+--------------------------------------------------------------
+Preprocessor version:
+gcc (GCC) 4.1.2 20070115 (SUSE Linux)
+Copyright (C) 2006 Free Software Foundation, Inc.
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+
+--------------------------------------------------------------
+ESMF_VERSION_STRING:    5.1.0
+--------------------------------------------------------------
+ 
+--------------------------------------------------------------
+ * User set ESMF environment variables *
+ESMF_OS=Linux
+ESMF_TESTMPMD=ON
+ESMF_TESTHARNESS_ARRAY=RUN_ESMF_TestHarnessArrayUNI_2
+ESMF_DIR=/nobackupp10/scvasque/daily_builds/intel/esmf
+ESMF_TESTHARNESS_FIELD=RUN_ESMF_TestHarnessFieldUNI_1
+ESMF_TESTWITHTHREADS=OFF
+ESMF_COMM=mpiuni
+ESMF_INSTALL_PREFIX= /nobackupp10/scvasque/daily_builds/intel/esmf/.. \
+	/install_dir
+ESMF_TESTEXHAUSTIVE=ON
+ESMF_BOPT=g
+ESMF_SITE=default
+ESMF_ABI=64
+ESMF_COMPILER=intel
+ 
+--------------------------------------------------------------
+ * ESMF environment variables *
+ESMF_DIR: /nobackupp10/scvasque/daily_builds/intel/esmf
+ESMF_OS:                Linux
+ESMF_MACHINE:           x86_64
+ESMF_ABI:               64
+ESMF_COMPILER:          intel
+ESMF_BOPT:              g
+ESMF_COMM:              mpiuni
+ESMF_SITE:              default
+ESMF_PTHREADS:          ON
+ESMF_OPENMP:            ON
+ESMF_ARRAY_LITE:        FALSE
+ESMF_NO_INTEGER_1_BYTE: FALSE
+ESMF_NO_INTEGER_2_BYTE: FALSE
+ESMF_FORTRANSYMBOLS:    default
+ESMF_DEFER_LIB_BUILD:   ON
+ESMF_TESTEXHAUSTIVE:    ON
+ESMF_TESTWITHTHREADS:   OFF
+ESMF_TESTMPMD:          ON
+ESMF_TESTSHAREDOBJ:     OFF
+ESMF_TESTFORCEOPENMP:   OFF
+ESMF_TESTHARNESS_ARRAY: RUN_ESMF_TestHarnessArrayUNI_2
+ESMF_TESTHARNESS_FIELD: RUN_ESMF_TestHarnessFieldUNI_1
+ESMF_MPIRUN:            /nobackupp10/scvasque/daily_builds/intel/esmf/src/ \
+                         Infrastructure/stubs/mpiuni/mpirun
+ 
+--------------------------------------------------------------
+ * ESMF environment variables pointing to 3rd party software *
+ 
+--------------------------------------------------------------
+ * ESMF environment variables for final installation *
+ESMF_INSTALL_PREFIX:    /nobackupp10/scvasque/daily_builds/intel/esmf/../ \
+	install_dir
+ESMF_INSTALL_HEADERDIR: include
+ESMF_INSTALL_MODDIR:    mod/modg/Linux.intel.64.mpiuni.default
+ESMF_INSTALL_LIBDIR:    lib/libg/Linux.intel.64.mpiuni.default
+ESMF_INSTALL_BINDIR:    bin/bing/Linux.intel.64.mpiuni.default
+ESMF_INSTALL_DOCDIR:    doc
+ESMF_INSTALL_CMAKEDIR:  cmake
+ 
+ 
+--------------------------------------------------------------
+ * Compilers, Linkers, Flags, and Libraries *
+Location of the preprocessor:      /usr/bin/gcc
+Location of the Fortran compiler:  /nasa/intel/fce/10.1.021/bin/ifort
+Location of the Fortran linker:    /nasa/intel/fce/10.1.021/bin/ifort
+Location of the C++ compiler:      /nasa/intel/cce/10.1.021/bin/icpc
+Location of the C++ linker:        /nasa/intel/cce/10.1.021/bin/icpc
+
+Fortran compiler flags:
+ESMF_F90COMPILEOPTS: -g -fPIC -m64 -mcmodel=small -threads  -openmp
+ESMF_F90COMPILEPATHS: -I/nobackupp10/scvasque/daily_builds/intel/esmf/mod/ \
+	modg/Linux.intel.64.mpiuni.default -I/nobackupp10/scvasque/daily_builds \
+	/intel/esmf/src/include 
+ESMF_F90COMPILECPPFLAGS: -DESMF_TESTEXHAUSTIVE -DSx86_64_small=1 \
+	-DESMF_OS_Linux=1  -DESMF_MPIUNI
+ESMF_F90COMPILEFREECPP: 
+ESMF_F90COMPILEFREENOCPP: 
+ESMF_F90COMPILEFIXCPP: 
+ESMF_F90COMPILEFIXNOCPP: 
+
+Fortran linker flags:
+ESMF_F90LINKOPTS:  -m64 -mcmodel=small -threads  -openmp
+ESMF_F90LINKPATHS: -L/nobackupp10/scvasque/daily_builds/intel/esmf/lib/libg/ \
+	Linux.intel.64.mpiuni.default  -L/nasa/sgi/mpt/1.25/lib -L/nasa/intel/ \
+	cce/10.1.021/lib/shared -L/nasa/intel/fce/10.1.021/lib/shared -L/nasa/ \
+	intel/cce/10.1.021/lib -L/nasa/intel/fce/10.1.021/lib -L/nasa/intel/cce/ \
+	10.1.021/lib -L/usr/lib64/gcc/x86_64-suse-linux/4.1.2/ -L/usr/lib64/gcc/ \
+	x86_64-suse-linux/4.1.2/../../../../lib64
+ESMF_F90LINKRPATHS: 
+	-Wl,-rpath,/nobackupp10/scvasque/daily_builds/intel/esmf/lib/libg/ \
+	Linux.intel.64.mpiuni.default
+ESMF_F90LINKLIBS:  -limf -lsvml -lm -lipgo -lguide -lstdc++ -lirc -lgcc_s \
+	-lgcc -lirc -lpthread -lgcc_s -lgcc -lirc_s -ldl -lrt -ldl
+ESMF_F90ESMFLINKLIBS: -lesmf  -limf -lsvml -lm -lipgo -lguide -lstdc++ -lirc \
+	-lgcc_s -lgcc -lirc -lpthread -lgcc_s -lgcc -lirc_s -ldl -lrt -ldl
+
+C++ compiler flags:
+ESMF_CXXCOMPILEOPTS: -g -fPIC -m64 -mcmodel=small -pthread  -openmp
+ESMF_CXXCOMPILEPATHS: -I/nobackupp10/scvasque/daily_builds/intel/ esmf/src/ \
+	include  -I/nobackupp10/scvasque/daily_builds/intel/esmf/src/Infrastructure \
+	/stubs/mpiuni
+ESMF_CXXCOMPILECPPFLAGS: -DESMF_TESTEXHAUSTIVE  -DSx86_64_small=1 \
+	-DESMF_OS_Linux=1 -D__SDIR__=” -DESMF_MPIUNI
+
+C++ linker flags:
+ESMF_CXXLINKOPTS:  -m64 -mcmodel=small -pthread  -openmp
+ESMF_CXXLINKPATHS: -L/nobackupp10/scvasque/daily_builds/intel/esmf/lib/libg/ \
+	Linux.intel.64.mpiuni.default  -L/nasa/intel/fce/10.1.021/lib/
+ESMF_CXXLINKRPATHS: -Wl,-rpath,/nobackupp10/scvasque/daily_builds/intel/esmf/ \
+	lib/libg/Linux.intel.64.mpiuni.default -Wl,-rpath,/nasa/intel/fce/ \
+	10.1.021/lib/
+ESMF_CXXLINKLIBS:  -lifport -lifcoremt -limf -lsvml -lm -lipgo -lguide -lirc \
+	-lpthread -lgcc_s -lgcc -lirc_s -ldl -lrt -ldl
+ESMF_CXXESMFLINKLIBS: -lesmf  -lifport -lifcoremt -limf -lsvml -lm -lipgo \
+	-lguide -lirc -lpthread -lgcc_s -lgcc -lirc_s -ldl -lrt -ldl
+
+
+--------------------------------------------------------------
+Compiling on Thu Oct 21 02:15:56 PDT 2010 on r75i0n8
+Machine characteristics: Linux r75i0n8 2.6.16.60-0.68.1.20100916-nasa \
+	#1 SMP Fri 
+Sep 17 17:49:05 UTC 2010 x86_64 x86_64 x86_64 GNU/Linux
+==============================================================
+
+ +

+ +

+5.3.4 Building makefile targets +

+ +

+The makefiles follow the GNU target standards where possible. +The most frequently used targets for building are listed below: +

+
lib
+
build the ESMF libraries only (default) +
+
all
+
build the libraries, unit and system tests and examples +
+
doc
+
build the documentation (requires specific latex macros packages +and additional utilities; see Section 9 for more details +on the requirements). +
+
info
+
print out extensive system configuration information about what + compilers, libraries, paths, flags, etc are being used +
+
clean
+
remove all files built for this platform/compiler/wordsize. +
+
clobber
+
remove all files built for all architectures +
+
install
+
install the ESMF library in a custom location +
+
+ +

+ +

+5.3.5 Testing makefile targets +

+ +

+To build and run the unit and system tests, type: +

+make check
+
+A summary report of success and failures will be printed out at the end. + +

+See section 11.1.1 on how to set up ESMF to be able to launch +the bundled test and example applications. + +

+Other test-related targets are: +

+
all_tests
+
build and run all available tests and examples +
+
build_all_tests
+
build tests and examples; do not execute +
+
run_all_tests
+
run tests and examples without rebuilding; print a +summary of the results +
+
check_all_tests
+
print out the results summary without re-executing +
+
dust_all_tests
+
remove all test and example output files +
+
clean_all_tests
+
remove all test and example executables and output +files +
+
+ +

+For all the targets listed above, the string all_tests can be +replaced with one of the strings listed below to select a +specific type of test: +

+
unit_tests
+
unit tests exercise a single part of the system +
+
system_tests
+
system tests combine functions across the system +
+
examples
+
examples contain code illustrating a single type of function +
+
+For example, make build_examples recompiles the example programs but +does not execute them. make dust_unit_tests removes all +output files generated when executing the unit tests, but leaves the +executables. make clean_system_tests removes all executables and files +associated with the system tests. + +

+For the unit tests only, there is an additional environment variable +which affects how the tests are built: +

+
ESMF_TESTEXHAUSTIVE
+
If this variable is set to ON before compiling the unit tests, +longer and more exhaustive unit tests will be run. Note that this is a +compile-time and not run-time option. +
+
+ +

+ +

+ +
+5.3.6 Building and using bundled ESMF Command Line Tools +

+ +

+This section describes how the bundled ESMF command line tools can be built +and used from inside the ESMF source tree. Notice that this is sort of a quick +and dirty way of accessing the ESMF applications. It is supported as +convenience to those users interested in quickly gaining access to the bundled +ESMF command line tools, and do not mind the shortcomings of this approach. +Users interested in maximum portability should instead follow the instructions +provided in section 8. + +

+To build the bundled ESMF command line tools, type: +

+make build_apps
+
+This will build the command line tools and place the executables under the +$ESMF_DIR/apps directory inside the ESMF source tree. The +command line tools can be directly executed from within the +$ESMF_DIR/apps directory following the system specific rules for +execution. The details will depend on whether ESMF was built with or without +MPI dependency. In the latter case the system specific rules for launching +parallel applications must be followed. System specific execution details on +this level are outside of ESMF's scope. + +

+For most systems, the MPI version of the ESMF bundled command line tools can be +executed by a command equivalent to: + +

+

+mpirun -np X $(ESMF_DIR)/apps/..../<cli-name>
+
+ +

+where X specifies the total number of PETs and cli-name is the +name of the specific ESMF command line tool to be executed. The .... in +the path indicates the precise subdirectory structure under ./apps which +follows the standard ESMF pattern also used for the ./tests and +./examples subdirectories. + +

+All bundled ESMF command line tool support the standard '--help' command +line option that prints out information on its proper use. More detailed +instructions of the individual tools are available in the "Command Line Tools" +section of the ESMF Reference Manual. + +

+ +

+ +
+esmf_support@ucar.edu +
+ + diff --git a/docs/nightly/fix/reconcile-info/ESMF_usrdoc/node7.html b/docs/nightly/fix/reconcile-info/ESMF_usrdoc/node7.html new file mode 100644 index 000000000..b1114d8ef --- /dev/null +++ b/docs/nightly/fix/reconcile-info/ESMF_usrdoc/node7.html @@ -0,0 +1,288 @@ + + + + + +6 Compiling and Linking User Code against an ESMF Installation + + + + + + + + + + + + + + + + + + + + + +Subsections + + + +
+ +

+ +
+6 Compiling and Linking User Code against an ESMF Installation +

+ +

+Building user applications against an ESMF installation requires that the +compiler and linker be able to find the appropriate ESMF header, module and +library files. If this procedure has been documented by the installer of the +ESMF library on your system then follow the directions provided. + +

+In the absence of installation specific instructions there are two standard +methods supported by ESMF to build user code against the installation. The +first method is based on a GNU makefile fragment that can be included by the +user code build infrastructure. This method requires that the user application +also uses the +GNU Make +system. The second method is based on +CMake. + +

+ +

+ +
+6.1 esmf.mk method +

+ +

+Every ESMF installation provides a file named esmf.mk that contains the +information needed to build a user application gainst the installation. The +location of the esmf.mk file should be documented by the party that +installed ESMF on the system. We recommend that a single ESMF specific +environment variable, ESMFMKFILE, be provided by the system that points to +the esmf.mk file. See section 9.9 for the related discussion +aimed at the person that installs ESMF on a system. + +

+The information in esmf.mk is defined in form of variables. In fact, +syntactically esmf.mk is a makefile fragment and can be imported by an +application specific makefile via the include command. All the variables +in esmf.mk start with the "ESMF_" prefix to prevent conflicts. The +information in esmf.mk is fully specified and is not affected by any +variables set in the user's environment. + +

+The information defined in esmf.mk includes Fortran compiler and linker, +as well as C++ compiler and linker. It further includes the recommended Fortran +and C++ specific compiler and linker flags for building ESMF applications. One +way of using the esmf.mk is to glean the necessary information from it. +This information can then be used either directly on the command line when +compiling a user application, or to hardwire the settings into the application +specific build system. However, the recommended use of esmf.mk is to +include this file in the application specific makefile directly via the +include command. + +

+The Makefile template below demonstrates how a user build system can be +constructed to leverage the esmf.mk file. In practice, most user build +systems will be more complex. However, this template does show that the added +complexity introduced by using esmf.mk is minimal. Examples of how to use +this build system in realistic user scenarios can be found in the +external demos. + +

+The advantages of using esmf.mk, over hard coding suitable compiler and +linker flags into the user build system directly, are robustness and portability. +Robustness is a consequence of the fact that everything defined in esmf.mk +corresponds to the exact settings used during the ESMF library build +(consistency) and during the ESMF test suite build. Using esmf.mk thus +guarantees that the user application is build in the exact same manner as the +ESMF test suite applications that undergo strict regression testing before every +ESMF release. Portability means that a user build system, which uses +esmf.mk in the way the template Makefile demonstrates, will function +as expected on any system where ESMF was successfully installed and tested, +without the need of modifying anything. Every esmf.mk is generated during +a specific ESMF installation using the ESMF tested settings for the host +platform. + +

+

+################################################################################
+### Makefile template for user ESMF application, leveraging esmf.mk mechanism ##
+################################################################################
+
+################################################################################
+### Finding and including esmf.mk ##############################################
+
+# Note: This fully portable Makefile template depends on finding environment
+#       variable "ESMFMKFILE" set to point to the appropriate "esmf.mk" file,
+#       as is discussed in the User's Guide.
+#       However, you can still use this Makefile template even if the person
+#       that installed ESMF on your system did not provide for a mechanism to
+#       automatically set the environment variable "ESMFMKFILE". In this case
+#       either manually set "ESMFMKFILE" in your environment or hard code the
+#       location of "esmf.mk" into the include statement below.
+#       Notice that the latter approach has negative impact on portability.
+
+ifneq ($(origin ESMFMKFILE), environment)
+$(error Environment variable ESMFMKFILE was not set.)
+endif
+
+include $(ESMFMKFILE)
+
+################################################################################
+### Compiler and linker rules using ESMF_ variables supplied by esmf.mk ########
+
+.SUFFIXES: .f90 .F90 .c .C
+
+.f90:
+	$(ESMF_F90COMPILER) -c $(ESMF_F90COMPILEOPTS) $(ESMF_F90COMPILEPATHS) \
+          $(ESMF_F90COMPILEFREENOCPP) $<
+	$(ESMF_F90LINKER) $(ESMF_F90LINKOPTS) $(ESMF_F90LINKPATHS) \
+          $(ESMF_F90LINKRPATHS) -o $@ $*.o $(ESMF_F90ESMFLINKLIBS)        
+
+.F90:
+	$(ESMF_F90COMPILER) -c $(ESMF_F90COMPILEOPTS) $(ESMF_F90COMPILEPATHS) \
+          $(ESMF_F90COMPILEFREECPP) $(ESMF_F90COMPILECPPFLAGS) $<
+	$(ESMF_F90LINKER) $(ESMF_F90LINKOPTS) $(ESMF_F90LINKPATHS) \
+          $(ESMF_F90LINKRPATHS) -o $@ $*.o $(ESMF_F90ESMFLINKLIBS)        
+        
+.c:
+	$(ESMF_CXXCOMPILER) -c $(ESMF_CXXCOMPILEOPTS) \
+          $(ESMF_CXXCOMPILEPATHSLOCAL) $(ESMF_CXXCOMPILEPATHS) \
+          $(ESMF_CXXCOMPILECPPFLAGS) $<
+	$(ESMF_CXXLINKER) $(ESMF_CXXLINKOPTS) $(ESMF_CXXLINKPATHS) \
+          $(ESMF_CXXLINKRPATHS) -o $@ $*.o $(ESMF_CXXESMFLINKLIBS)
+
+.C:
+	$(ESMF_CXXCOMPILER) -c $(ESMF_CXXCOMPILEOPTS) \
+          $(ESMF_CXXCOMPILEPATHSLOCAL) $(ESMF_CXXCOMPILEPATHS) \
+          $(ESMF_CXXCOMPILECPPFLAGS) $<
+	$(ESMF_CXXLINKER) $(ESMF_CXXLINKOPTS) $(ESMF_CXXLINKPATHS) \
+          $(ESMF_CXXLINKRPATHS) -o $@ $*.o $(ESMF_CXXESMFLINKLIBS)
+
+################################################################################
+### Sample targets for user ESMF applications ##################################
+
+all: esmf_UserApplication esmc_UserApplication
+
+esmf_UserApplication:
+
+esmc_UserApplication:
+
+################################################################################
+
+ +

+Notice that the ESMF_F90LINKPATHS, ESMF_F90LINKRPATHS, +ESMF_CXXLINKPATHS, and ESMF_CXXLINKRPATHS variables used in the +linking targets might contain paths to the specific compiler version, MPI +implementation, and 3rd party libraries (see section 9.4) +used when building ESMF. The paths are explicitly included in order to +simplify the process of writing an application build system that is consistent +with the ESMF library that is used. + +

+There are, however, situations where it is +desirable to let the application decide what compiler version, MPI version, +and/or 3rd party library verson (e.g. NetCDF) to use. To this end, esmf.mk +defines an alternative set of variables: ESMF_F90ESMFLINKPATHS, +ESMF_F90ESMFLINKRPATHS, ESMF_CXXESMFLINKPATHS, and +ESMF_CXXESMFLINKRPATHS. These variables only encode the precise path to +the ESMF library, and do not specify where to find the compiler, MPI, and/or +3rd party libraries. When using this alternative set of variables, it becomes +the responsibility of the application build system to ensure the required +libraries can be found by the linker, and are compatible with the ESMF +installation. + +

+ +

+6.2 CMake method +

+ +

+An ESMF CMake find file is located at: <ESMF source directory>/cmake/FindESMF.cmake + +

+The find file will parse the esmf.mk file created following a successful +ESMF build. (See 6.1 for a description of the esmf.mk file.) +The CMake module sets esmf.mk variables as global CMake variables. When +using the find file, ESMFMKFILE must be set to the filepath of esmf.mk. +If this is NOT set, then ESMF_FOUND will always be FALSE. If ESMFMKFILE +exists, then ESMF_FOUND=TRUE and all ESMF makefile variables will be set +in the global scope. Optionally, set ESMF_MKGLOBALS to a string list to +filter makefile variables. For example, to globally scope only ESMF_LIBSDIR +and ESMF_APPSDIR variables, use this CMake command in CMakeLists.txt: set(ESMF_MKGLOBALS "LIBSDIR" "APPSDIR") + +

+ +

+ +

+ +
+esmf_support@ucar.edu +
+ + diff --git a/docs/nightly/fix/reconcile-info/ESMF_usrdoc/node8.html b/docs/nightly/fix/reconcile-info/ESMF_usrdoc/node8.html new file mode 100644 index 000000000..654350f21 --- /dev/null +++ b/docs/nightly/fix/reconcile-info/ESMF_usrdoc/node8.html @@ -0,0 +1,260 @@ + + + + + +7 Debugging of ESMF User Applications + + + + + + + + + + + + + + + + + + + + + +

+ +
+7 Debugging of ESMF User Applications +

+ +

+Debugging failing applications is often a challenging task. Massive +parallelism, issues with compute node access, and large data volumes (just to +name a few typical HPC aspects) add to the difficulties. For coupled +applications, built from many individual components and libraries, additional +complexity is introduced by the many layers of software. + +

+For applications utilizing ESMF, the ESMF library is one of those software +layers. Due to the "framework" nature of ESMF, the situation can be +more subtle than for "simple" libraries. This is because ESMF code +is called from user code (as for "simple" libraries), as well as calling +back into registered user code (the "framework" aspect of ESMF). The +consequences of this fact relating to debugging of applications are discussed +in this section. + +

+One consequence of the "framework" nature is that ESMF code is executing between +major portions of user code. For instance, when one ESMF component calls into +another ESMF component, the control flow goes through the ESMF software layer. +This provides ESMF with a chance to write messages into an application wide +log file. In particular, for user code that has implemented standard return +code handling, ESMF can log an error trace in the event of detecting an +error condition. The ESMF Reference Manual discusses standard "Return Code +Handling" under a section of the same name. + +

+By default, the application wide ESMF log output is written to files that are +named PET<nnn>.ESMF_LogFile, where <nnn> is the number of the +persistent execution thread (PET) that is writing. Several characteristics of +the default log can be changed during the call to ESMF_Initialize(). In +order to take advantage of the ESMF log output, it is important +to ensure that the logkindflag is set to ESMF_LOGKIND_MULTI, which +is the default, or ESMF_LOGKIND_MULTI_ON_ERROR. The latter is +recommended for production runs where extra log output is minimized, and the ESMF +log is only activated when an error is encountered. + +

+Assuming that the ESMF log is active for a failing application, and the user +code follows the documented return code handling, the ESMF log files are among +the first files that should be inspected. The log files are written into the +working directory that was active during the application execution. Assuming +default log file naming, we recommend the following grep command to scan for +errors. + +

+

+grep ERROR PET*.ESMF_LogFile
+
+ +

+A typical error trace looks similar to the following output. Here is an example +error trace for an application using the NUOPC layer. + +

+

+20210317 150338.047 ERROR PET0 atm.F90:113       Invalid argument  - \
+                                          Passing error in return code
+20210317 150338.047 ERROR PET0 ATM:src/addon/NUOPC/src/NUOPC_ModelBase.F90:865
+20210317 150338.047 ERROR PET0 esm:src/addon/NUOPC/src/NUOPC_Driver.F90:2570
+20210317 150338.047 ERROR PET0 esm:src/addon/NUOPC/src/NUOPC_Driver.F90:1287
+20210317 150338.047 ERROR PET0 esm:src/addon/NUOPC/src/NUOPC_Driver.F90:466
+20210317 150338.047 ERROR PET0 esmApp.F90:64       Invalid argument  - \
+                                           Passing error in return code
+
+ +

+The first two columns contain the wall clock information of when each individual +log message was written. The third and forth column indicate the type of the log +message, here ERROR, and the PET number, respectively, The sixth column +contains information about the source file and line number. Finally the seventh +column and beyond contain information about the error. + +

+Notice that error traces are logged in backward order. The first ERROR +entry corresponds to the lowest level, where the error condition was first +detected. Here the error was first detected in file atm.F90, at line 113. +The error is then propagated back up to the highest application level, +here ending up in file esmApp.F90, line 64. Due to the framework nature +of ESMF discussed earlier, it is very common to see several layers of ESMF +library code in an error trace, as is the case in this example. Notice however, +that the error was first caught in "user code" atm.F90. + +

+Even if the lowest level indicated (i.e. the start of an error trace) is inside +the ESMF library, it does not immediately indicate an issue with ESMF code. In +such cases it is good to follow the error trace to the first user code entry, +and investigate what ESMF call is made just before that location. +Then consider looking at the specific information passed into the ESMF method +and ensure correctness. + +

+There are situations where an application experiences a hard crash, either +triggered by the runtime library, or the operating system itself. In these cases +the ESMF log files are typically not as helpful, and might even be missing. A +hard crash that produces a code dump, a backtrace to stderr, or is caught under +a debugger, can still be a good source of information to track down the +problematic issue. + +

+An example backtrace for a hard crash is shown below. + +

+

+Program received signal SIGFPE: Floating-point exception - erroneous arithmetic operation.
+
+Backtrace for this error:
+#0  0x7f9e45bed49f in ???
+#1  0x40430e in realize
+        at /tmp/AtmOcnProto/ocn.F90:149
+#2  0x7f9e49568f8b in _ZNK5ESMCI13MethodElement7executeEPvPi
+        at /tmp/esmf/src/Superstructure/Component/src/ESMCI_MethodTable.C:333
+#3  0x7f9e49569e74 in _ZN5ESMCI11MethodTable7executeENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPvPiPb
+        at /tmp/esmf/src/Superstructure/Component/src/ESMCI_MethodTable.C:519
+#4  0x7f9e49568dea in c_esmc_methodtableexecuteef_
+        at /tmp/esmf/src/Superstructure/Component/src/ESMCI_MethodTable.C:303
+#5  0x7f9e4982d8da in __esmf_attachmethodsmod_MOD_esmf_methodgridcompexecute
+        at /tmp/esmf/src/Superstructure/AttachMethods/src/ESMF_AttachMethods.F90:1278
+#6  0x7f9e4a69fcd0 in initializeipdvxp04
+        at /tmp/esmf/src/addon/NUOPC/src/NUOPC_ModelBase.F90:1263
+#7  0x7f9e492b8d1a in _ZN5ESMCI6FTable12callVFuncPtrEPKcPNS_2VMEPi
+        at /tmp/esmf/src/Superstructure/Component/src/ESMCI_FTable.C:2036
+#8  0x7f9e492b605a in ESMCI_FTableCallEntryPointVMHop
+        at /tmp/esmf/src/Superstructure/Component/src/ESMCI_FTable.C:765
+#9  0x7f9e49654bc3 in _ZN5ESMCI3VMK5enterEPNS_7VMKPlanEPvS3_
+        at /tmp/esmf/src/Infrastructure/VM/src/ESMCI_VMKernel.C:2195
+#10  0x7f9e49668136 in _ZN5ESMCI2VM5enterEPNS_6VMPlanEPvS3_
+        at /tmp/esmf/src/Infrastructure/VM/src/ESMCI_VM.C:1211
+#11  0x7f9e492b64f0 in c_esmc_ftablecallentrypointvm_
+        at /tmp/esmf/src/Superstructure/Component/src/ESMCI_FTable.C:922
+#12  0x7f9e499f8678 in __esmf_compmod_MOD_esmf_compexecute
+        at /tmp/esmf/src/Superstructure/Component/src/ESMF_Comp.F90:1216
+#13  0x7f9e49e5e19b in __esmf_gridcompmod_MOD_esmf_gridcompinitialize
+        at /tmp/esmf/src/Superstructure/Component/src/ESMF_GridComp.F90:1408
+#14  0x7f9e4a63740e in loopmodelcompss
+        at /tmp/esmf/src/addon/NUOPC/src/NUOPC_Driver.F90:2534
+#15  0x7f9e4a641e92 in initializeipdv02p3
+        at /tmp/esmf/src/addon/NUOPC/src/NUOPC_Driver.F90:1833
+#16  0x7f9e4a6650c9 in initializep1
+        at /tmp/esmf/src/addon/NUOPC/src/NUOPC_Driver.F90:467
+#17  0x7f9e492b8d1a in _ZN5ESMCI6FTable12callVFuncPtrEPKcPNS_2VMEPi
+        at /tmp/esmf/src/Superstructure/Component/src/ESMCI_FTable.C:2036
+#18  0x7f9e492b605a in ESMCI_FTableCallEntryPointVMHop
+        at /tmp/esmf/src/Superstructure/Component/src/ESMCI_FTable.C:765
+#19  0x7f9e49654bc3 in _ZN5ESMCI3VMK5enterEPNS_7VMKPlanEPvS3_
+        at /tmp/esmf/src/Infrastructure/VM/src/ESMCI_VMKernel.C:2195
+#20  0x7f9e49668136 in _ZN5ESMCI2VM5enterEPNS_6VMPlanEPvS3_
+        at /tmp/esmf/src/Infrastructure/VM/src/ESMCI_VM.C:1211
+#21  0x7f9e492b64f0 in c_esmc_ftablecallentrypointvm_
+        at /tmp/esmf/src/Superstructure/Component/src/ESMCI_FTable.C:922
+#22  0x7f9e499f8678 in __esmf_compmod_MOD_esmf_compexecute
+        at /tmp/esmf/src/Superstructure/Component/src/ESMF_Comp.F90:1216
+#23  0x7f9e49e5e19b in __esmf_gridcompmod_MOD_esmf_gridcompinitialize
+        at /tmp/esmf/src/Superstructure/Component/src/ESMF_GridComp.F90:1408
+#24  0x401aaf in esmapp
+        at /tmp/AtmOcnProto/esmApp.F90:58
+#25  0x401ee4 in main
+        at /tmp/AtmOcnProto/esmApp.F90:17
+Floating exception (core dumped)
+
+ +

+Just as for the ESMF log, the backtrace is produced in reverse order, starting +at the lowest level where the problem was encountered, tracing all the way up +the call stack to main. As expected, the backtrace contains many +layers of ESMF library code. Again this does not immediately indicate that there +is a problem in the library code. In this example user code is visible at the +very top of the stack esmApp.F90, and at the very bottom ocn.F90. +In fact the location of the division by zero is correctly identified by the +runtime library at line 149 in file ocn.F90. + +

+ +

+ +

+ +
+esmf_support@ucar.edu +
+ + diff --git a/docs/nightly/fix/reconcile-info/ESMF_usrdoc/node9.html b/docs/nightly/fix/reconcile-info/ESMF_usrdoc/node9.html new file mode 100644 index 000000000..248cc07f0 --- /dev/null +++ b/docs/nightly/fix/reconcile-info/ESMF_usrdoc/node9.html @@ -0,0 +1,166 @@ + + + + + +8 Using Bundled ESMF Command Line Tools + + + + + + + + + + + + + + + + + + + + + +

+ +
+8 Using Bundled ESMF Command Line Tools +

+ +

+ESMF comes with a set of bundled command line tools (CLT). +These applications include convenient access to general information +about an ESMF installation, and regrid weight file generation (sometimes +referred to as "offline" regridding). This section provides assistance with +respect to building and running the bundled CLTs. If you are using a +pre-installed ESMF on your system, follow the local instructions provided by +the installer or system admin of how to access and run the ESMF CLTs. +Often access is as simple as loading a configuration module to have the +correct path to the ESMF CLT binaries added to your PATH +environment variable. + +

+There are two ways a user may choose to build and access the bundled ESMF +CLTs. Users that prefer not to go through the full ESMF installation +process have the option to build the bundled CLTs inside of the ESMF +source tree, very similar to how the unit tests, system tests and examples are +built. This option is outlined in section 5.3.6 and should only be +considered by users that want quick access to the CLTs and are not +interested in a sharable installation or the development of portable scripts and +makefiles that use the CLTs. Users interested in the latter should +consider the more standard second option outlined below. + +

+The bundled ESMF CLTs are built automatically in the process of +installing ESMF following the instructions given in section 9.9. +On systems that offer system-wide ESMF installations (e.g. via modules or +similar mechanisms) the user need not worry about the build and installation +details. Once installed, the CLTs are accessible through their precise +location on the system. For this purpose every ESMF installation provides a file +named esmf.mk that contains the variable ESMF_APPSDIR which +specifies the precise CLT path. + +

+The esmf.mk mechanism used for CLT access is the same as the one +described in section 6 for writing robust and portable user +makefiles for building and linking user CLTs against an ESMF +installation. One feature of the esmf.mk mechanism is that only one single +piece of information must be known about an ESMF installation to use it, and +that is the location of file esmf.mk itself. The location of this file +should be documented by the party that installed ESMF on the system. We +recommend that a single ESMF specific environment variable ESMFMKFILE be +provided by the system that points to the esmf.mk file. See section +9.9 for the related discussion aimed at the person that installs +ESMF on a system. + +

+Once the exact location of the bundled ESMF CLT files has been +determined, either by inspecting the associated esmf.mk file, or by using +the ESMF_APPSDIR makefile variable directly in the user script or +makefile, the CLTs can be executed following the system specific rules +for execution. The details will depend on whether ESMF was built with or without +MPI dependency. In the latter case the system specific rules for launching +parallel CLTs must be followed. System specific execution details on +this level are outside of ESMF's scope. However, ESMF does offer specific +CLT use examples as part of the external_demos module described +online at the +External Demos webpage. +For most systems, the MPI version of the ESMF bundled CLTs can be +executed by a command equivalent to: + +

+

+mpirun -np X $(ESMF_APPSDIR)/<clt-name>
+
+ +

+where X specifies the total number of PETs and clt-name is the +name of the specific ESMF command line tool to be executed. + +

+All bundled ESMF CLTs support the standard '--help' command line +option that prints out information on its proper use. More detailed +instructions of the individual CLTs are available in the "Command Line Tools" +section of the ESMF Reference Manual. + +

+ +

+ +

+ +
+esmf_support@ucar.edu +
+ + diff --git a/docs/nightly/fix/reconcile-info/ESMF_usrdoc/prev.png b/docs/nightly/fix/reconcile-info/ESMF_usrdoc/prev.png new file mode 100644 index 000000000..e60b8b407 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_usrdoc/prev.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_usrdoc/prev_g.png b/docs/nightly/fix/reconcile-info/ESMF_usrdoc/prev_g.png new file mode 100644 index 000000000..ac6f0bceb Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_usrdoc/prev_g.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_usrdoc/up.png b/docs/nightly/fix/reconcile-info/ESMF_usrdoc/up.png new file mode 100644 index 000000000..3937e168f Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_usrdoc/up.png differ diff --git a/docs/nightly/fix/reconcile-info/ESMF_usrdoc/up_g.png b/docs/nightly/fix/reconcile-info/ESMF_usrdoc/up_g.png new file mode 100644 index 000000000..fb36cf765 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/ESMF_usrdoc/up_g.png differ diff --git a/docs/nightly/fix/reconcile-info/NUOPC_howtodoc.pdf b/docs/nightly/fix/reconcile-info/NUOPC_howtodoc.pdf new file mode 100644 index 000000000..816672172 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/NUOPC_howtodoc.pdf differ diff --git a/docs/nightly/fix/reconcile-info/NUOPC_howtodoc/NUOPC_howtodoc.css b/docs/nightly/fix/reconcile-info/NUOPC_howtodoc/NUOPC_howtodoc.css new file mode 100644 index 000000000..a97b6ae70 --- /dev/null +++ b/docs/nightly/fix/reconcile-info/NUOPC_howtodoc/NUOPC_howtodoc.css @@ -0,0 +1,37 @@ +/* Century Schoolbook font is very similar to Computer Modern Math: cmmi */ +.MATH { font-family: "Century Schoolbook", serif; } +.MATH I { font-family: "Century Schoolbook", serif; font-style: italic } +.BOLDMATH { font-family: "Century Schoolbook", serif; font-weight: bold } + +/* implement both fixed-size and relative sizes */ +SMALL.XTINY { font-size : xx-small } +SMALL.TINY { font-size : x-small } +SMALL.SCRIPTSIZE { font-size : smaller } +SMALL.FOOTNOTESIZE { font-size : small } +SMALL.SMALL { } +BIG.LARGE { } +BIG.XLARGE { font-size : large } +BIG.XXLARGE { font-size : x-large } +BIG.HUGE { font-size : larger } +BIG.XHUGE { font-size : xx-large } + +/* heading styles */ +H1 { } +H2 { } +H3 { } +H4 { } +H5 { } + +/* mathematics styles */ +DIV.displaymath { } /* math displays */ +TD.eqno { } /* equation-number cells */ + + +/* document-specific styles come next */ +DIV.center { } +DIV.navigation { } +PRE.preform { } +DIV.quote { } +SPAN.arabic { } +SPAN.textbf { font-weight: bold } +SPAN.textit { font-style: italic } diff --git a/docs/nightly/fix/reconcile-info/NUOPC_howtodoc/NUOPC_howtodoc.html b/docs/nightly/fix/reconcile-info/NUOPC_howtodoc/NUOPC_howtodoc.html new file mode 100644 index 000000000..7c6ffde75 --- /dev/null +++ b/docs/nightly/fix/reconcile-info/NUOPC_howtodoc/NUOPC_howtodoc.html @@ -0,0 +1,170 @@ + + + + + +NUOPC_howtodoc + + + + + + + + + + + + + + + + + + + +

+ +

+ +

+ +

+ +

+ + +

+ +

+

+National Unified Operational Prediction Capability +
+
+
+
+Building a NUOPC Model +
+
+
+
+ESMF 8.8.0 beta snapshot +
+
+
+
+
+Content Standards Committee (CSC) Members +
+
+
+
+December 3, 2024 +
+
+
+ +
+ +

+ +

+ +


+ + + + + +

+
+esmf_support@ucar.edu +
+ + diff --git a/docs/nightly/fix/reconcile-info/NUOPC_howtodoc/WARNINGS b/docs/nightly/fix/reconcile-info/NUOPC_howtodoc/WARNINGS new file mode 100644 index 000000000..4936440c7 --- /dev/null +++ b/docs/nightly/fix/reconcile-info/NUOPC_howtodoc/WARNINGS @@ -0,0 +1,6 @@ + +NUOPC_howtodoc.tex is newer than NUOPC_howtodoc.aux: Please rerun latex. + +Substitution of arg to newlabelxx delayed. + +? brace missing for \oldcontentsline diff --git a/docs/nightly/fix/reconcile-info/NUOPC_howtodoc/contents.png b/docs/nightly/fix/reconcile-info/NUOPC_howtodoc/contents.png new file mode 100644 index 000000000..0c752c66c Binary files /dev/null and b/docs/nightly/fix/reconcile-info/NUOPC_howtodoc/contents.png differ diff --git a/docs/nightly/fix/reconcile-info/NUOPC_howtodoc/index.html b/docs/nightly/fix/reconcile-info/NUOPC_howtodoc/index.html new file mode 100644 index 000000000..7c6ffde75 --- /dev/null +++ b/docs/nightly/fix/reconcile-info/NUOPC_howtodoc/index.html @@ -0,0 +1,170 @@ + + + + + +NUOPC_howtodoc + + + + + + + + + + + + + + + + + + + +

+ +

+ +

+ +

+ +

+ + +

+ +

+

+National Unified Operational Prediction Capability +
+
+
+
+Building a NUOPC Model +
+
+
+
+ESMF 8.8.0 beta snapshot +
+
+
+
+
+Content Standards Committee (CSC) Members +
+
+
+
+December 3, 2024 +
+
+
+ +
+ +

+ +

+ +


+ + + + + +

+
+esmf_support@ucar.edu +
+ + diff --git a/docs/nightly/fix/reconcile-info/NUOPC_howtodoc/internals.pl b/docs/nightly/fix/reconcile-info/NUOPC_howtodoc/internals.pl new file mode 100644 index 000000000..c55fcff80 --- /dev/null +++ b/docs/nightly/fix/reconcile-info/NUOPC_howtodoc/internals.pl @@ -0,0 +1,86 @@ +# LaTeX2HTML 2018 (Released Feb 1, 2018) +# Associate internals original text with physical files. + + +$key = q/sec:approach/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:atmexample/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:atmexample_advancespec/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:atmexample_advertisefields/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:atmexample_moduleimports/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:atmexample_realizefields/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:atmexample_retcodes/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:atmexample_setservices/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:basicexamplecap/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:bigidea/; +$ref_files{$key} = "$dir".q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:callrunfromcap/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:chooseconfig/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:genmakefrag/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:initmodelfromcap/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:installesmf/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:integratecap/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:preparemodel/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:runcapwithdriver/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:splitinit/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:validatecap/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +1; + diff --git a/docs/nightly/fix/reconcile-info/NUOPC_howtodoc/labels.pl b/docs/nightly/fix/reconcile-info/NUOPC_howtodoc/labels.pl new file mode 100644 index 000000000..f0714d9dd --- /dev/null +++ b/docs/nightly/fix/reconcile-info/NUOPC_howtodoc/labels.pl @@ -0,0 +1,177 @@ +# LaTeX2HTML 2018 (Released Feb 1, 2018) +# Associate labels original text with physical files. + + +$key = q/sec:approach/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:atmexample/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:atmexample_advancespec/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:atmexample_advertisefields/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:atmexample_moduleimports/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:atmexample_realizefields/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:atmexample_retcodes/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:atmexample_setservices/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:basicexamplecap/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:bigidea/; +$external_labels{$key} = "$URL/" . q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:callrunfromcap/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:chooseconfig/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:genmakefrag/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:initmodelfromcap/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:installesmf/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:integratecap/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:preparemodel/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:runcapwithdriver/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:splitinit/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:validatecap/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +1; + + +# LaTeX2HTML 2018 (Released Feb 1, 2018) +# labels from external_latex_labels array. + + +$key = q/_/; +$external_latex_labels{$key} = q|<|; +$noresave{$key} = "$nosave"; + +$key = q/sec:approach/; +$external_latex_labels{$key} = q|3|; +$noresave{$key} = "$nosave"; + +$key = q/sec:atmexample/; +$external_latex_labels{$key} = q|4|; +$noresave{$key} = "$nosave"; + +$key = q/sec:atmexample_advancespec/; +$external_latex_labels{$key} = q|4.6|; +$noresave{$key} = "$nosave"; + +$key = q/sec:atmexample_advertisefields/; +$external_latex_labels{$key} = q|4.4|; +$noresave{$key} = "$nosave"; + +$key = q/sec:atmexample_moduleimports/; +$external_latex_labels{$key} = q|4.1|; +$noresave{$key} = "$nosave"; + +$key = q/sec:atmexample_realizefields/; +$external_latex_labels{$key} = q|4.5|; +$noresave{$key} = "$nosave"; + +$key = q/sec:atmexample_retcodes/; +$external_latex_labels{$key} = q|4.3|; +$noresave{$key} = "$nosave"; + +$key = q/sec:atmexample_setservices/; +$external_latex_labels{$key} = q|4.2|; +$noresave{$key} = "$nosave"; + +$key = q/sec:basicexamplecap/; +$external_latex_labels{$key} = q|3.11|; +$noresave{$key} = "$nosave"; + +$key = q/sec:bigidea/; +$external_latex_labels{$key} = q|2|; +$noresave{$key} = "$nosave"; + +$key = q/sec:callrunfromcap/; +$external_latex_labels{$key} = q|3.7|; +$noresave{$key} = "$nosave"; + +$key = q/sec:chooseconfig/; +$external_latex_labels{$key} = q|3.3|; +$noresave{$key} = "$nosave"; + +$key = q/sec:genmakefrag/; +$external_latex_labels{$key} = q|3.5|; +$noresave{$key} = "$nosave"; + +$key = q/sec:initmodelfromcap/; +$external_latex_labels{$key} = q|3.6|; +$noresave{$key} = "$nosave"; + +$key = q/sec:installesmf/; +$external_latex_labels{$key} = q|3.1|; +$noresave{$key} = "$nosave"; + +$key = q/sec:integratecap/; +$external_latex_labels{$key} = q|3.4|; +$noresave{$key} = "$nosave"; + +$key = q/sec:preparemodel/; +$external_latex_labels{$key} = q|3.2|; +$noresave{$key} = "$nosave"; + +$key = q/sec:runcapwithdriver/; +$external_latex_labels{$key} = q|3.8|; +$noresave{$key} = "$nosave"; + +$key = q/sec:splitinit/; +$external_latex_labels{$key} = q|3.9|; +$noresave{$key} = "$nosave"; + +$key = q/sec:validatecap/; +$external_latex_labels{$key} = q|3.10|; +$noresave{$key} = "$nosave"; + +1; + diff --git a/docs/nightly/fix/reconcile-info/NUOPC_howtodoc/next.png b/docs/nightly/fix/reconcile-info/NUOPC_howtodoc/next.png new file mode 100644 index 000000000..1628652aa Binary files /dev/null and b/docs/nightly/fix/reconcile-info/NUOPC_howtodoc/next.png differ diff --git a/docs/nightly/fix/reconcile-info/NUOPC_howtodoc/next_g.png b/docs/nightly/fix/reconcile-info/NUOPC_howtodoc/next_g.png new file mode 100644 index 000000000..3c1c3f569 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/NUOPC_howtodoc/next_g.png differ diff --git a/docs/nightly/fix/reconcile-info/NUOPC_howtodoc/node1.html b/docs/nightly/fix/reconcile-info/NUOPC_howtodoc/node1.html new file mode 100644 index 000000000..1545c5a33 --- /dev/null +++ b/docs/nightly/fix/reconcile-info/NUOPC_howtodoc/node1.html @@ -0,0 +1,124 @@ + + + + + +Contents + + + + + + + + + + + + + + + + + + + + +
+ +

+Contents +

+ + + + +

+
+esmf_support@ucar.edu +
+ + diff --git a/docs/nightly/fix/reconcile-info/NUOPC_howtodoc/node2.html b/docs/nightly/fix/reconcile-info/NUOPC_howtodoc/node2.html new file mode 100644 index 000000000..c8307c041 --- /dev/null +++ b/docs/nightly/fix/reconcile-info/NUOPC_howtodoc/node2.html @@ -0,0 +1,227 @@ + + + + + +1 Overview + + + + + + + + + + + + + + + + + + + + + +Subsections + + + +
+ +

+1 Overview +

+ +

+The National Unified Operational Prediction Capability +(NUOPC) is a strategic initiative to fundamentally advance the nation's computational +weather prediction systems and improve forecast models used by National Weather Service, +Air Force and Navy meteorologists, mission planners, and decision makers. The +NUOPC Layer +is +a software layer built on top of the +Earth System Modeling Framework +(ESMF). +ESMF is a high-performance modeling framework that provides +data structures, interfaces, and operations suited for building coupled models +from a set of components. NUOPC refines the capabilities of +ESMF by providing a more precise definition of what it means for a model +to be a component and how components should interact and share data +in a coupled system. The NUOPC Layer software is designed to work +with typical high-performance models in the Earth sciences domain, most +of which are written in Fortran and are based on a distributed memory +model of parallelism (MPI). + +

+The NUOPC Layer implements a set of generic components that +serve as building blocks that can be assembled together in different ways +to build up a coupled modeling application. In some cases, a generic +component can be used as is, and in other cases the generic component +must be specialized (customized) for a particular model or application. +Additionally, the NUOPC Layer defines a set of technical rules for how components +should behave and interact with each other. These technical rules form the +backbone of component interoperability. NUOPC defines this effective interoperability +as the ability of a model component to execute without code changes in a driver that +provides the fields that it requires, and to return with informative messages if its +input requirements are not met. A component that follows the NUOPC Layer technical +rules is considered to be NUOPC Layer compliant. + +

+For brevity, throughout this document we will often use the +term “NUOPC” to refer to the “NUOPC Layer software” that is +the current technical implementation of the NUOPC specification. +Also, the term “NUOPC component” is shorthand for a component +that is NUOPC Layer compliant and can be used in NUOPC-based +systems. + +

+ +

+1.1 Document Roadmap +

+ +

+This document is a starting point for model developers +and technical managers who are new to the NUOPC Layer software +and need to understand the steps involved in making an existing +model codebase NUOPC Layer compliant. + +

+The document is divided into the following sections: + +

    +
  • Section 2 describes important parts of the NUOPC design that +are critical for anyone planning to write code using the NUOPC API. + +

    +

  • +
  • Section 3 describes the development steps involved +in making your model code NUOPC Layer compliant. + +

    +

  • +
  • Section 4 presents the code of a basic example cap, describing +each part in detail. + +

    +

  • +
+ +

+ +

+1.2 Additional NUOPC Resources +

+This document is not exhaustive, but should help you navigate the process of creating +a NUOPC component from your model. As such this document is a companion to other NUOPC +resources available: + + + + + +
+esmf_support@ucar.edu +
+ + diff --git a/docs/nightly/fix/reconcile-info/NUOPC_howtodoc/node3.html b/docs/nightly/fix/reconcile-info/NUOPC_howtodoc/node3.html new file mode 100644 index 000000000..efce7e07d --- /dev/null +++ b/docs/nightly/fix/reconcile-info/NUOPC_howtodoc/node3.html @@ -0,0 +1,254 @@ + + + + + +2 The Big Idea + + + + + + + + + + + + + + + + + + + + + +Subsections + + + +
+ +

+2 The Big Idea +

+ +

+This section should help you understand key aspects of the NUOPC Layer +design that are critical for writing the code to make your model +NUOPC Layer compliant. The NUOPC Layer includes four kinds of +generic components, each with a different purpose in a +coupled application. One kind of generic component is the +NUOPC Model, a component that wraps a model +code (such as an atmosphere, ocean, or ice model) such that it +exposes the set of interfaces defined by the NUOPC specification. +You will work primarily with the NUOPC Model generic component +in order to make your model NUOPC Layer compliant. + +

+This documentation focuses primarily on the NUOPC Model Component. +However, you should be aware that there are four kinds of generic +components implemented in the NUOPC Layer: + +

+
Model
+
+Wraps a model code, such as an atmosphere, ocean, or ice model + +

+

+
Connector
+
+Handles standard data transformations (e.g., redistribution +or regridding) between two components in a single direction + +

+

+
Mediator
+
+Contains custom coupling code (e.g., flux calculations, averaging) +between Models; unlike the Connector, a Mediator can handle +data from multiple Models with data flowing in multiple ways + +

+

+
Driver
+
+Coordinates execution of Models, Mediators, and Connectors + +

+

+
+ +

+ +

+2.1 Specializing Generic Components +

+ +

+A key design idea behind NUOPC is that a lot of code (and therefore +behavior) is provided for you. This code is provided via the +four generic components included with the NUOPC library, plus +some additional utility routines. +The NUOPC Model generic component +implements most of the initialization and run behavior for you, but you +have to supply some key parts of the implementation that are specific +to your model. The process of supplying your custom code that completes +the generic NUOPC Model component is called specialization. In other +words, you are specializing the generic component to work for your +particular model. Any parts of the code that you do not specialize are +inherited from the generic component. + +

+Those familiar with object-oriented programming will recognize +the ideas of specialization and inheritance. Since the NUOPC Layer +is written in Fortran 90, which has limited support for +object-oriented programming, your specialization code is +provided in Fortran subroutines which are registered with +NUOPC using function pointers. NUOPC makes callbacks into +your code when required to execute the specialization code. + +

+ +

+2.2 NUOPC Model Cap +

+A NUOPC Model cap is a Fortran module that contains your code +that specializes the generic NUOPC Model component for your +particular model. The NUOPC Model cap serves as the interface +to your model when it's used in NUOPC-based systems. +The term “cap” is used because it is +a small software layer that sits on top of your model, making +calls into it. Typically, your model code will not make calls +back into the cap. Sometimes we say just “cap” or “NUOPC cap” +because it's quicker than saying “NUOPC Model cap.” + +

+ +

+2.3 How Much of My Code Do I Need to Change? +

+The amount of code that your need to change depends on how your +model is structured and the degree to which it is already an +independent component. The NUOPC cap itself does not usually require +changes to your model's internals. Instead, the cap primarily +acts as a separate software layer, and your model otherwise +operates in its usual way. + +

+However, as detailed in the section 3.2, +if your model is currently embedded as a subsystem in a larger +application and cannot be built independently, you must first take +steps to modularize the code and remove dependencies to other +models before beginning the NUOPC implementation. + +

+The creation of a NUOPC cap does not mean that your +model must always be run as a NUOPC component. Existing models can +retain their native modes of operation, and running your model in +NUOPC mode becomes a configuration option. + +

+The NUOPC cap becomes a new locus of control for your model when +your model is run in NUOPC mode. In other words, it will make calls into your +model code to initialize your model and step it forward in time. +One result of this is that the very top level main program of +your model may not be used at all when your model is run in +NUOPC mode. This is because all models participating in a coupled +NUOPC application will be controlled by a separate generic component: +the NUOPC Driver. + +

+Putting control into a separate driver enables synchronization +of all models participating in a coupled application, allows NUOPC +to control when each model component runs (and for how long), and allows +NUOPC to intercept and inject variables produced and required +by your model at key parts during execution. Once you have a working +NUOPC cap (you only need to implement it once), you have an interoperable +component that can be used in systems with other NUOPC components. + +

+ +

+2.4 How Do I Know it Works? +

+Validating your NUOPC cap is extremely important. The idea is to +ensure that your model's current behavior is reproduced +exactly as before, but this time with control flowing from the cap. This is +why we encourage you to generate some baseline output by running +your model in its “normal” way before doing any implementation. +You will validate your cap by ensuring that when it controls your model, +the same output is reproduced. In most cases the output matches bit-for-bit +so a simple file-based comparison will be sufficient. + +

+We also provide tools to help you check whether your cap is NUOPC-compliant. +NUOPC Compliance can be evaluated using a combination of two tools, the Component +Explorer and the Compliance Checker, included in the ESMF/NUOPC software distribution. +More information is provided in sections 3.8 and +3.10. + +

+ +
+esmf_support@ucar.edu +
+ + diff --git a/docs/nightly/fix/reconcile-info/NUOPC_howtodoc/node4.html b/docs/nightly/fix/reconcile-info/NUOPC_howtodoc/node4.html new file mode 100644 index 000000000..0dadb0e76 --- /dev/null +++ b/docs/nightly/fix/reconcile-info/NUOPC_howtodoc/node4.html @@ -0,0 +1,739 @@ + + + + + +3 Writing and Testing a NUOPC Cap for your Model + + + + + + + + + + + + + + + + + + + + + +Subsections + + + +
+ +

+3 Writing and Testing a NUOPC Cap for your Model +

+ +

+ +

+While there is no one right way to write the NUOPC Model cap code, the following +recommended steps represent an incremental approach to developing the cap. + +

    +
  1. Install ESMF and NUOPC on the Target Machine (3.1) +
  2. +
  3. Prepare Your Model Code (3.2) +
  4. +
  5. Choose a Configuration of Your Model for Development (3.3) +
  6. +
  7. Integrate a Cap Template into Your Codebase (3.4) +
  8. +
  9. Modify Your Build to Generate a NUOPC Makefile Fragment (3.5) +
  10. +
  11. Initialize Your Model from the Cap (3.6) +
  12. +
  13. Call Your Model's Run Subroutine from the Cap (3.7) +
  14. +
  15. Run the Cap with a NUOPC Driver (3.8) +
  16. +
  17. Split Up the Initialization Phases (3.9) +
  18. +
  19. Test and Validate Your Cap (3.10) +
  20. +
+ +

+ +

+ +
+3.1 Install ESMF and NUOPC on the Target Machine +

+First, you need to ensure the prerequisite +software is available on the target system. + +

+The primary prerequisite software is the NUOPC library, which is +included with the ESMF distribution, and your model, including +any of its dependencies. + +

+Acquire the latest ESMF release from GitHub: + +

+

+$ git clone https://github.com/esmf-org/esmf.git --branch main --depth 1
+
+ +

+Compile and install ESMF. Full installation details can be found in the ESMF User Guide. An example of the basic procedure +for one particular system is outlined below. + +

+

+ # set environment variables for build
+ # the actual settings depend on your platform
+ # and the compilation options you select
+ $ export ESMF_DIR=/path/to/esmf
+ $ export ESMF_COMPILER=gfortran
+ $ export ESMF_COMM=openmpi
+ $ export ESMF_PIO=internal
+ $ export ESMF_NETCDF=split
+ $ export ESMF_NETCDF_INCLUDE=/usr/include
+ $ export ESMF_NETCDF_LIBS="-lnetcdff -lnetcdf"
+ $ export ESMF_NETCDF_LIBPATH=/usr/lib
+ $ export ESMF_INSTALL_PREFIX=/path/to/install
+
+ # build
+ $ cd /path/to/esmf
+ $ gmake
+ $ gmake check
+ $ gmake install
+
+ +

+ +

+ +
+3.2 Prepare Your Model Code +

+Before starting a NUOPC cap implementation, your model must already +be modularized such that it can be built by itself and does not +contain hard dependencies to other model components. For example, +if the model targeted for NUOPC compliance is a subsystem embedded +in a larger application, the model will first need to be extracted +such that it can be built by itself as a library. + +

+The model also needs to be roughly divided into several execution +methods: initialize, run, and finalize. Each of these methods may +contain several phases. The run method should allow the model to +execute a single timestep, or accept a parameter defining the number of +timesteps or a “run until” time. + +

+Your NUOPC cap code will be cleanest if your model exposes data +structures for input and output variables with clear, well-documented +naming conventions. This will simplify the process of hooking up fields +in the NUOPC cap to your model's data structures. The NUOPC Field +Dictionary uses the Climate and Forecast conventions +for defining field standard names, but can support field name aliases. + +

+Finally, the model should not use the global MPI_COMM_WORLD communicator +explicitly, but should accept a communicator at some point during +startup. A global search and replace can be used to replace +all uses of MPI_COMM_WORLD with a different communicator defined +as a global variable in your model. + +

+ +

+ +
+3.3 Choose a Configuration of Your Model for Development +

+When implementing the NUOPC interfaces for your model, you want to +get into an efficient edit-compile-debug cycle. This will require +running a configuration of your model that can be used to test the +NUOPC code you will write. + +

+You should choose a configuration of your model that is +simple and stable. Many models have regression test configurations +that can be run quickly and have small output files. These configurations +are typically low resolution, have short execution times, and sometimes +have idealized initial conditions. Some models can also be configured +with some of the physics options turned off to reduce the total amount +of computation. More scientifically interesting or higher resolution configurations +can be used after ensuring that the NUOPC cap is working for the +basic case. + +

+Compile your model on the target system and generate baseline output for the +selected configuration. This will typically be a small set of history or restart +files. We'll use these files later to ensure that your model is reproducing the +expected output when executed through the NUOPC cap. In most cases, when +your model is executed through its NUOPC cap, the output should be bit-for-bit +identical with non-NUOPC runs. (The one caveat to this is that when your +model is used in a coupled system, roundoff error may occur due to slight +differences introduced when grid interpolation is used between models.) + +

+If your model is already using ESMF, you will need to +update your build to link against ESMF version 7 or later. Instructions for checking out this version of ESMF +appear in section 3.1. + +

+ +

+ +
+3.4 Integrate a Cap Template into Your Codebase +

+An important question is where you will put your NUOPC cap source code. +The NUOPC cap code added to a model is minimal and is typically +contained either in a single source file or a small set of files. We recommend +including the NUOPC cap code in the same code repository with the rest of your +model code as this helps to ensure the cap evolves with your code and simplifies +the process of acquiring a NUOPC-compliant version of your model. +The exact right place to put the cap code is your decision and largely depends +on your model's directory structure. + +

+Including the cap code in your model's codebase does not imply that your +model must always be run in NUOPC mode. Instead, when the cap is complete, +the NUOPC mode can be viewed as a configuration option of your model. + +

+You need not start from scratch. Instead start with a NUOPC cap template. +To acquire a cap template you can: + +

    +
  • use the cap template below, + +

    +

  • +
  • copy code from one of the NUOPC Prototype Applications +or + +

    +

  • +
  • use the Cupid plugin for Eclipse +to generate code. Cupid automatically generates NUOPC compliant +code fragments for specialization points and presents NUOPC API reference +documentation based on where you are in your NUOPC cap code. +Installation instructions are provided on the Cupid website, and for additional support please +email the ESMF support list. + +

    +

  • +
+ +

+Put the initial cap code into your model source tree. Then, modify +your Makefile or build scripts so that the cap is compiled with the +rest of your model code. Unless your model is already using ESMF, +you'll need to add ESMF compile and linking flags in order to build +the cap. When ESMF is installed, a Makefile fragment named esmf.mk +is generated that contains variables that can be appended to your compile and +link flags. The ESMF User Guide +explains how to use these variables in your Makefile. + +

+ +

+ +
+3.5 Modify Your Build to Generate a NUOPC Makefile Fragment +

+The goal of adding a NUOPC cap to your model is so that it can be used +with other NUOPC-compliant models in a coupled system. From a technical +standpoint, there are several ways that your model code can be included into +a final coupled system binary. Two common options are to link to your model +statically and to link it in dynamically from a shared library. + +

+In either case, to simplify the process of compiling and linking against +your model, your model's build process should produce a Makefile fragment file +that defines the following six variables:

+
ESMF_DEP_FRONT
+
+The name of the Fortran module to be used in a USE statement, +or (if it ends in ”.h”) the name of the header file to be used +in an #include statement, or (if it ends in ”.so”) the name of +the shared object to be loaded at run-time. + +

+

+
ESMF_DEP_INCPATH
+
+The include path to find module or header files during compilation. Must be specified as absolute path. + +

+

+
ESMF_DEP_CMPL_OBJS
+
+Object files that need to be considered as compile dependencies. Must be specified with absolute path. + +

+

+
ESMF_DEP_LINK_OBJS
+
+Object files that need to be considered as link dependencies. Must be specified with absolute path. + +

+

+
ESMF_DEP_SHRD_PATH
+
+The path or list of paths to find shared libraries during link-time (and during run-time unless overridden by LD_LIBRARY_PATH). Must be specified as absolute paths. + +

+

+
ESMF_DEP_SHRD_LIBS
+
+Shared libraries that need to be specified during link-time, and must be available during run-time. Must be specified with absolute path. + +

+

+
+ +

+An example makefile fragment useful for statically linking against your model looks like this: + +

+

+   #file: abc.mk
+ 
+   ESMF_DEP_FRONT      = ABC
+   ESMF_DEP_INCPATH    = <absolute path to associated ABC module file>
+   ESMF_DEP_CMPL_OBJS  = <absolute path>/abc.o
+   ESMF_DEP_LINK_OBJS  = <absolute path>/abc.o <absolute path>/xyz.o
+   ESMF_DEP_SHRD_PATH  = 
+   ESMF_DEP_SHRD_LIBS  =
+
+ +

+The variables in the makefile fragment expose a set of dependencies that the +higher-level build system can use to compile and link against your model. +An easy way to generate the makefile fragment is to modify your model's +Makefile to include a new target: + +

+

+   .PRECIOUS: %.o
+
+   %.mk: %.o
+      @echo "# ESMF self-describing build dependency makefile fragment" > $@
+      @echo >> $@
+      @echo "ESMF_DEP_FRONT     = ABC"                          >> $@
+      @echo "ESMF_DEP_INCPATH   = `pwd`"                        >> $@
+      @echo "ESMF_DEP_CMPL_OBJS = `pwd`/"$<                     >> $@
+      @echo "ESMF_DEP_LINK_OBJS = "$(addprefix `pwd`/, $(OBJS)) >> $@
+      @echo "ESMF_DEP_SHRD_PATH = "                             >> $@
+      @echo "ESMF_DEP_SHRD_LIBS = "                             >> $@
+
+   abc.mk: $(OBJS)
+
+ +

+The Standardized Component Dependencies +section of the NUOPC Reference Manual contains more details on setting up NUOPC makefile fragments. + +

+Finally, if your build procedure typically produces an executable, it is +recommended that you add a Makefile target (or similar build option) +that produces a library instead of an executable. When used in a NUOPC +system, your model's main program will not be used-instead, a NUOPC_Driver +will be linked to your cap and it will be the locus of control +(i.e., the main program). + +

+Makefile Target Conventions + +

+If your model is built using Make, a common convention is to add +two special targets that build your model and also compile the NUOPC +code you will write. + +

+

 
+ # this target builds your model and your NUOPC cap 
+ $ make nuopc
+ # this target installs your NUOPC-compliant model to a particular directory
+ $ make nuopcinstall DESTDIR=/path/to/install
+
+ +

+ +

+ +
+3.6 Initialize Your Model from the Cap +

+The cap template you placed in your source tree is not yet connected +to your model. You now need to add a call into your model's existing +initialization subroutine(s). + +

+NUOPC defines a precise initialization sequence-i.e., a series of +steps that all NUOPC components are expected to take when starting +up. A user component cap interacts with the NUOPC initialization +sequence through specific specialization points. Specifically this means +using the NUOPC_CompSpecialize() method during the component's +SetServices method for each of the required specializations, and providing the +necessary implementation. The NUOPC_CompSpecialize() method takes a +specLabel argument to indicate the targeted specialization. All available +specialization labels for model components are listed in the NUOPC +reference manual under the NUOPC_Model API section. + +

+Instead of tackling the full NUOPC initialization sequence at this point in +developing your cap, we recommend that you start by adding calls in your cap's +first initialization phase to your model's existing initialization subroutine(s). +A good place to do this is within the Advertise Fields initialization phase. +This is the phase where each component “advertises” the fields it +requires and can potentially provide. + +

+You will need to add use statements at the top if your cap to import the relevant +initialization subroutines from your model into the NUOPC cap module. +The example code in section 3.11 shows where to add the +call to your model's initialization subroutine(s). + +

+In the next section you will add another call into your model code +before attempting to execute your NUOPC cap. + +

+ +

+ +
+3.7 Call Your Model's Run Subroutine from the Cap +

+The Advance specialization point provided by the NUOPC Model +generic component is the place where you will call your +model's timestep subroutine. You should add this call now. +Refer to the example code in section 3.11 +below to see where to add this call. + +

+This call should only move the model forward a single timestep, +not the full run length. If the subroutine requires a parameter +such as the timestep length or the time to stop, then these +parameters can be retrieved from the cap's ESMF_Clock object. + +

+If your model does not have a subroutine that takes a single timestep, +you will need to create one now. + +

+ +

+ +
+3.8 Run the Cap with a NUOPC Driver +

+Now you should test the basic cap you have implemented. First, +build your model along with the cap code using your model's build +script or Makefile. If you followed the procedure in section 3.5, +your build process should have produced a NUOPC Makefile +fragment file in addition to the compiled object files (or library). + +

+One option for testing the cap is to run it using the NUOPC Component Explorer, a specialized NUOPC_Driver designed to execute any NUOPC_Model. +Complete instructions +for acquiring +the Component Explorer and linking it to your NUOPC cap are available. + +

+The instructions above also describe how to turn on the NUOPC Compliance Checker +while running the Component Explorer. The +Compliance Checker produces additional output in the ESMF log +files that is useful for debugging. It also produces WARNINGS +in the logs if a compliance issue is identified. When running with +the basic cap, you should not necessarily expect to have all compliance issues +resolved. + +

+ +

+ +
+3.9 Split Up the Initialization Phases +

+Once the basic cap described above can be executed using the Component Explorer, +you should modify the cap to implement the required initialization sequence +as described in the NUOPC reference manual. This +includes advertising fields with standard names and realizing fields by creating +ESMF_Field objects to wrap your model variables. As part of this process, +you will need to describe your model's grid structure using the ESMF geometric +classes, e.g., ESMF_Grid and ESMF_Mesh. + +

+ +

+ +
+3.10 Test and Validate Your Cap +

+After splitting up the initilization phases, rebuild your model and execute it again using +the Component Explorer with the Compliance Checker turned on. Ideally, you +should see no compliance WARNINGS in the generated log files. + +

+To validate that the NUOPC cap is faithfully reproducing your model's +behavior when run in non-NUOPC mode, you should compare your model's +output when run with the NUOPC cap against a baseline run. +This is the best test to ensure that the cap is working correctly. +If the NUOPC cap reproduces your baseline run, you are ready to integrate +your NUOPC Model cap into a coupled system with other NUOPC components. + +

+ +

+ +

+ +

+ +
+3.11 Example NUOPC Model cap +

+ +

+The following code is a starting point for creating a basic NUOPC + Model cap. + +

+

+module MYMODEL
+
+  !-----------------------------------------------------------------------------
+  ! Basic NUOPC Model cap
+  !-----------------------------------------------------------------------------
+
+  use ESMF
+  use NUOPC
+  use NUOPC_Model, &
+    modelSS    => SetServices
+    
+  ! add use statements for your model's initialization
+  ! and run subroutines
+  
+  implicit none
+  
+  private
+  
+  public :: SetServices
+  
+  !-----------------------------------------------------------------------------
+  contains
+  !-----------------------------------------------------------------------------
+
+  subroutine SetServices(model, rc)
+    type(ESMF_GridComp)  :: model
+    integer, intent(out) :: rc
+
+    rc = ESMF_SUCCESS
+
+    ! derive from NUOPC_Model
+    call NUOPC_CompDerive(model, modelSS, rc=rc)
+    if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, &
+      line=__LINE__, &
+      file=__FILE__)) &
+      return  ! bail out
+
+    ! specialize model
+    call NUOPC_CompSpecialize(model, specLabel=label_Advertise, &
+      specRoutine=Advertise, rc=rc)
+    if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, &
+      line=__LINE__, &
+      file=__FILE__)) &
+      return  ! bail out
+    call NUOPC_CompSpecialize(model, specLabel=label_RealizeProvided, &
+      specRoutine=Realize, rc=rc)
+    if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, &
+      line=__LINE__, &
+      file=__FILE__)) &
+      return  ! bail out
+    call NUOPC_CompSpecialize(model, specLabel=label_Advance, &
+      specRoutine=Advance, rc=rc)
+    if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, &
+      line=__LINE__, &
+      file=__FILE__)) &
+      return  ! bail out
+
+  end subroutine
+
+  !-----------------------------------------------------------------------------
+
+  subroutine Advertise(model, rc)
+    type(ESMF_GridComp)  :: model
+    integer, intent(out) :: rc
+
+    rc = ESMF_SUCCESS
+
+    ! Eventually, you will advertise your model's import and
+    ! export fields in this phase.  For now, however, call
+    ! your model's initialization routine(s).
+
+    ! call my_model_init()
+
+  end subroutine
+
+  !-----------------------------------------------------------------------------
+
+  subroutine Realize(model, rc)
+    type(ESMF_GridComp)  :: model
+    integer, intent(out) :: rc
+
+    rc = ESMF_SUCCESS  
+
+    ! Eventually, you will realize your model's fields here,
+    ! but leave empty for now.
+
+  end subroutine
+
+  !-----------------------------------------------------------------------------
+
+  subroutine Advance(model, rc)
+    type(ESMF_GridComp)  :: model
+    integer, intent(out) :: rc
+    
+    ! local variables
+    type(ESMF_Clock)              :: clock
+    type(ESMF_State)              :: importState, exportState
+
+    rc = ESMF_SUCCESS
+    
+    ! query the Component for its clock, importState and exportState
+    call NUOPC_ModelGet(model, modelClock=clock, importState=importState, &
+      exportState=exportState, rc=rc)
+    if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, &
+      line=__LINE__, &
+      file=__FILE__)) &
+      return  ! bail out
+
+    ! HERE THE MODEL ADVANCES: currTime -> currTime + timeStep
+    
+    ! Because of the way that the internal Clock was set by default,
+    ! its timeStep is equal to the parent timeStep. As a consequence the
+    ! currTime + timeStep is equal to the stopTime of the internal Clock
+    ! for this call of the Advance() routine.
+
+    call ESMF_ClockPrint(clock, options="currTime", &
+      preString="------>Advancing MODEL from: ", rc=rc)
+    if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, &
+      line=__LINE__, &
+      file=__FILE__)) &
+      return  ! bail out
+    
+    call ESMF_ClockPrint(clock, options="stopTime", &
+      preString="--------------------------------> to: ", rc=rc)
+    if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, &
+      line=__LINE__, &
+      file=__FILE__)) &
+      return  ! bail out
+
+    ! Call your model's timestep routine here
+    
+    ! call my_model_update()
+      
+  end subroutine
+
+end module
+
+ +

+ + +

+ +
+esmf_support@ucar.edu +
+ + diff --git a/docs/nightly/fix/reconcile-info/NUOPC_howtodoc/node5.html b/docs/nightly/fix/reconcile-info/NUOPC_howtodoc/node5.html new file mode 100644 index 000000000..82f80c486 --- /dev/null +++ b/docs/nightly/fix/reconcile-info/NUOPC_howtodoc/node5.html @@ -0,0 +1,642 @@ + + + + + +4 An Example Cap + + + + + + + + + + + + + + + + + + + + + +Subsections + + + +
+ +

+4 An Example Cap +

+ +

+ +

+ +

+ +

+In this section we'll look at code for an example NUOPC Model cap. + The example shows the basic structure of a NUOPC Model cap for a fictitious + atmosphere model called ATM. It is slightly simpler than a “real” cap, + but has enough detail to show the basic coding structures. + Each section of the example cap code will be broken down and described separately. + +

+Finding More NUOPC Code Examples + +
+In addition to the example code in this section, the + NUOPC Prototypes +repository contains many small example applications that are helpful + for understanding the architecture of NUOPC applications and showing + example uses of the NUOPC API. These example applications can be + compiled and executed on your system. + +

+A good starting point is the + SingleModelProto application, + +which includes a single Model with a Driver and the + AtmOcnProto application +which includes two Models, a Connector, and a Driver. + +

+ +

+ +
+4.1 Module Imports +

+ The required NUOPC subroutines in the cap are grouped into a Fortran module, + here called ATM. All NUOPC Model caps will import the ESMF, NUOPC, and + NUOPC_Model modules. Typically, other use statements will appear + as well to import subroutines and variables from your model code. The module + exposes only a single public entry point (subroutine) called SetServices. + This should be true for all NUOPC Model caps. +

+

+module ATM
+
+  !-----------------------------------------------------------------------------
+  ! Basic NUOPC Model cap for ATM component (a fictitious atmosphere model).
+  !-----------------------------------------------------------------------------
+
+  use ESMF
+  use NUOPC
+  use NUOPC_Model, &
+    modelSS    => SetServices
+  
+  implicit none
+  
+  private
+  
+  public :: SetServices
+  
+  !-----------------------------------------------------------------------------
+  contains
+  !-----------------------------------------------------------------------------
+
+ +

+ +

+ +
+4.2 SetServices +

+ Every NUOPC Component must include a SetServices subroutine similar to the one + shown below. All NUOPC SetServices routines have the same parameter list + and should do several things: + +
    +
  • indicate the generic component being specialized, +
  • +
  • register any specialization points. + +
  • +
+ +

+In the example code, the call to NUOPC_CompDerive() indicates that + this component derives from (and specializes) the generic NUOPC_Model + component. In other words, this is a NUOPC_Model component customized + for a specific model. + +

+The calls to NUOPC_CompSpecialize() register + subroutines that are implemented in the cap. + The specLabel argument specifies NUOPC-defined specialization labels. + NUOPC defines explicitly what happens during each phase of the + initialization and these labels uniquely define any specialization that might + be supplied by the user. For example, + label_Advertise is responsible for advertising field in the import- and + exportState of the component. The NUOPC_CompSpecialize() also takes + the specRoutine argument to indicate what routine provides the actual + specialization. This subroutine appears later on in the cap and the name of + the registered subroutine is entirely up to you. + +

+The same specialization approach is used to specialize the generic Run method. + Here label_Advance is specialized by subroutine Advance. + The Advance specialization point is called by NUOPC whenever it needs + your model to take a single timestep forward. Basically, this means + you'll need to add a call inside the specialization subroutine to your + model's timestepping subroutine. +

+

+  subroutine SetServices(model, rc)
+    type(ESMF_GridComp)  :: model
+    integer, intent(out) :: rc
+    
+    rc = ESMF_SUCCESS
+    
+    ! the NUOPC model component will register the generic methods
+    call NUOPC_CompDerive(model, modelSS, rc=rc)
+    if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, &
+      line=__LINE__, &
+      file=__FILE__)) &
+      return  ! bail out
+    
+    ! specialize model
+    call NUOPC_CompSpecialize(model, specLabel=label_Advertise, &
+      specRoutine=Advertise, rc=rc)
+    if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, &
+      line=__LINE__, &
+      file=__FILE__)) &
+      return  ! bail out
+    call NUOPC_CompSpecialize(model, specLabel=label_RealizeProvided, &
+      specRoutine=Realize, rc=rc)
+    if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, &
+      line=__LINE__, &
+      file=__FILE__)) &
+      return  ! bail out
+    call NUOPC_CompSpecialize(model, specLabel=label_Advance, &
+      specRoutine=Advance, rc=rc)
+    if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, &
+      line=__LINE__, &
+      file=__FILE__)) &
+      return  ! bail out
+    
+  end subroutine
+
+ +

+ +

+ +
+4.3 Checking Return Codes +

+ Essentially all ESMF and NUOPC methods have an optional integer + return code parameter. You are highly encouraged to call + ESMF_LogFoundError after every ESMF/NUOPC call in order to + check the return code and record any errors in the log files + that ESMF generates during the run. Including the line and + file parameters will help to located where errors occur in the code. + These parameter values are typically filled in by the pre-processor. + +

+ +

+ +
+4.4 Initialize Phase - Advertise Fields +

+ In this section we see the implementation of the Advertise subroutine, + which is registered for the label_Advertise specialization. + The full list of specialization labels is described in the NUOPC Reference + Manual. + +

+For now you should notice a few things: + +

    +
  • All specialization subroutines are standard ESMF attachable methods + with the same parameter list: + +
      +
    • model - a reference to the component itself (ESMF_GridComp) +
    • +
    • rc - an integer return code + +
    • +
    +
  • +
  • If the subroutine succeeds, it should return ESMF_SUCCESS in + the return code. Otherwise it should return an error code. The + list of pre-defined ESMF error codes is provided in the + ESMF Reference Manual. + +
  • +
+ +

+The purpose of this phase is for your model to advertise its import and + export fields. This means that your model announces which model variables + it is capable of exporting (e.g., an atmosphere might export air pressure at sea level) + and which model variables it requires (e.g., an atmosphere might require + sea surface temperature as a boundary condition). The reason there is an + explicit advertise phase is because NUOPC dynamically matches fields among + all the models participating in a coupled simulation during runtime. So, we + need to collect the list of possible input and output fields from all the + models during their initialization. + +

+As shown in the code below, to advertise a field you call + NUOPC_Advertise with the following parameters: + +

    +
  • either the importState or exportState object +
  • +
  • the standard name of the field, based on the + CF conventions +
  • +
  • an optional name for the field, which can be used to + retrieve it later from its ESMF_State; if ommited + the standard name will be used as the field name +
  • +
  • a return code + +
  • +
+ +

+The example code below advertises one import field with the standard + name "sea_surface_temperature", and two export fields with standard + names "air_pressure_at_sea_level" and "surface_net_downward_shortwave_flux". + +

+Advertising a Field does NOT allocate memory + +
+Note that NUOPC does not allocate memory for fields during the + advertise phase or when NUOPC_Advertise is called. + Instead, this is simply a way for models to communicate the + standard names of fields. During a later phase, only those fields that + are connected (e.g., a field exported from one model that is + imported by another) need to have memory allocated. + Also, since ESMF will accept pointers to pre-allocated memory, it is usually not + necessary to change how memory is allocated for your model's variables. + +

+

+  
+  !-----------------------------------------------------------------------------
+
+  subroutine Advertise(model, rc)
+    type(ESMF_GridComp)  :: model
+    integer, intent(out) :: rc
+
+    ! local variables
+    type(ESMF_State)        :: importState, exportState
+
+    rc = ESMF_SUCCESS
+
+    ! query for importState and exportState
+    call NUOPC_ModelGet(model, importState=importState, &
+      exportState=exportState, rc=rc)
+    if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, &
+      line=__LINE__, &
+      file=__FILE__)) &
+      return  ! bail out
+    
+    ! importable field: sea_surface_temperature
+    call NUOPC_Advertise(importState, &
+      StandardName="sea_surface_temperature", name="sst", & 
+      TransferOfferGeomObject="will provide", rc=rc)
+    if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, &
+      line=__LINE__, &
+      file=__FILE__)) &
+      return  ! bail out
+    
+    ! exportable field: air_pressure_at_sea_level
+    call NUOPC_Advertise(exportState, &
+      StandardName="air_pressure_at_sea_level", name="pmsl", & 
+      TransferOfferGeomObject="will provide", rc=rc)
+    if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, &
+      line=__LINE__, &
+      file=__FILE__)) &
+      return  ! bail out
+    
+    ! exportable field: surface_net_downward_shortwave_flux
+    call NUOPC_Advertise(exportState, &
+      StandardName="surface_net_downward_shortwave_flux", name="rsns", & 
+      TransferOfferGeomObject="will provide", rc=rc)
+    if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, &
+      line=__LINE__, &
+      file=__FILE__)) &
+      return  ! bail out
+
+  end subroutine
+
+ +

+ +

+ +
+4.5 Initialize Phase - Realize Fields +

+ +

+The following code fragment shows the Realize subroutine, which + specializes label_RealizeProvided. During this phase, fields that + were previously advertised should now be realized. Realizing a field + means that an ESMF_Field object is created and it is added to the appropriate + ESMF_State, either import or export. + +

+In order to create an ESMF_Field, you'll first need to create one of the + ESMF geometric types, ESMF_Grid, ESMF_Mesh, or ESMF_LocStream. + For 2D and 3D logically rectangular grids (such as a lat-lon grid), the + typical choice is ESMF_Grid. For unstructured grids, use an ESMF_Mesh. + +

+Describing your model's grid (physical discretization) in the + ESMF representation is one of the most important parts of creating + a NUOPC cap. The ESMF geometric types are described in detail in the ESMF Reference Manual: + +

+ +

+For the sake a simplicity, a 10x100 Cartesian grid is created in the code below + and assigned to the variable gridIn. + +

+An ESMF_Field is created by by passing in the field + name (should be the same as advertised), the grid, and the data type of the + field to ESMF_FieldCreate. + +

+Fields are put into import or export States by calling NUOPC_Realize. + The example code realizes three fields in total, one import and two export, + and all three share the same grid. + +

+

+  subroutine Realize(model, rc)
+    type(ESMF_GridComp)  :: model
+    integer, intent(out) :: rc
+
+    ! local variables
+    type(ESMF_State)        :: importState, exportState
+    type(ESMF_Field)        :: field
+    type(ESMF_Grid)         :: gridIn
+    type(ESMF_Grid)         :: gridOut
+    
+    rc = ESMF_SUCCESS
+    
+    ! query for importState and exportState
+    call NUOPC_ModelGet(model, importState=importState, &
+      exportState=exportState, rc=rc)
+    if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, &
+      line=__LINE__, &
+      file=__FILE__)) &
+      return  ! bail out
+
+    ! create a Grid object for Fields
+    gridIn = ESMF_GridCreateNoPeriDimUfrm(maxIndex=(/10, 100/), &
+      minCornerCoord=(/10._ESMF_KIND_R8, 20._ESMF_KIND_R8/), &
+      maxCornerCoord=(/100._ESMF_KIND_R8, 200._ESMF_KIND_R8/), &
+      coordSys=ESMF_COORDSYS_CART, staggerLocList=(/ESMF_STAGGERLOC_CENTER/), &
+      rc=rc)
+    if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, &
+      line=__LINE__, &
+      file=__FILE__)) &
+      return  ! bail out
+    gridOut = gridIn ! for now out same as in
+
+    ! importable field: sea_surface_temperature
+    field = ESMF_FieldCreate(name="sst", grid=gridIn, &
+      typekind=ESMF_TYPEKIND_R8, rc=rc)
+    if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, &
+      line=__LINE__, &
+      file=__FILE__)) &
+      return  ! bail out
+    call NUOPC_Realize(importState, field=field, rc=rc)
+    if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, &
+      line=__LINE__, &
+      file=__FILE__)) &
+      return  ! bail out
+
+    ! exportable field: air_pressure_at_sea_level
+    field = ESMF_FieldCreate(name="pmsl", grid=gridOut, &
+      typekind=ESMF_TYPEKIND_R8, rc=rc)
+    if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, &
+      line=__LINE__, &
+      file=__FILE__)) &
+      return  ! bail out
+    call NUOPC_Realize(exportState, field=field, rc=rc)
+    if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, &
+      line=__LINE__, &
+      file=__FILE__)) &
+      return  ! bail out
+
+    ! exportable field: surface_net_downward_shortwave_flux
+    field = ESMF_FieldCreate(name="rsns", grid=gridOut, &
+      typekind=ESMF_TYPEKIND_R8, rc=rc)
+    if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, &
+      line=__LINE__, &
+      file=__FILE__)) &
+      return  ! bail out
+    call NUOPC_Realize(exportState, field=field, rc=rc)
+    if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, &
+      line=__LINE__, &
+      file=__FILE__)) &
+      return  ! bail out
+
+  end subroutine
+
+ +

+ +

+ +
+4.6 Model Advance Specialization +

+ +

+As described in the section 4.2, + the subroutine Advance (shown below) has been + registered to the specialization point with the label + model_label_Advance in the SetServices subroutine. This + specialization point subroutine is called within the generic NUOPC_Model + run phase in order to request that your model take a timestep + forward. The code to do this is model dependent, so it does not appear + in the subroutine below. + +

+Each NUOPC component maintains its own clock (an ESMF_Clock object). + The clock is used here to indicate the current model time and the + timestep size. When the subroutine finishes, your model should be + moved ahead in time from the current time by one timestep. NUOPC will + automatically advance the clock for you, so there is no explicit call + to do that here. + +

+Since there is no actual model for us to advance in this example, + the code below simply prints the current time and stop time (current time + timestep) + to standard out. + +

+With respect to specialization point subroutines in general, note that: + +

    +
  • All specialization point subroutines rely on the ESMF attachable + methods capability, and therefore all share the same parameter list: + +
      +
    • a pointer to the component (ESMF_GridComp) +
    • +
    • an integer return code + +
    • +
    +
  • +
  • Because the import/export states and the clock do not come in through + the parameter list, they must be accessed via a call to NUOPC_ModelGet + as shown in the code below. + +
  • +
+

+

+  subroutine Advance(model, rc)
+    type(ESMF_GridComp)  :: model
+    integer, intent(out) :: rc
+    
+    ! local variables
+    type(ESMF_Clock)              :: clock
+    type(ESMF_State)              :: importState, exportState
+
+    rc = ESMF_SUCCESS
+    
+    ! query the Component for its clock, importState and exportState
+    call NUOPC_ModelGet(model, modelClock=clock, importState=importState, &
+      exportState=exportState, rc=rc)
+    if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, &
+      line=__LINE__, &
+      file=__FILE__)) &
+      return  ! bail out
+
+    ! HERE THE MODEL ADVANCES: currTime -> currTime + timeStep
+    
+    ! Because of the way that the internal Clock was set by default,
+    ! its timeStep is equal to the parent timeStep. As a consequence the
+    ! currTime + timeStep is equal to the stopTime of the internal Clock
+    ! for this call of the Advance() routine.
+    
+    call ESMF_ClockPrint(clock, options="currTime", &
+      preString="------>Advancing ATM from: ", rc=rc)
+    if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, &
+      line=__LINE__, &
+      file=__FILE__)) &
+      return  ! bail out
+    
+    call ESMF_ClockPrint(clock, options="stopTime", &
+      preString="--------------------------------> to: ", rc=rc)
+    if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, &
+      line=__LINE__, &
+      file=__FILE__)) &
+      return  ! bail out
+
+  end subroutine
+
+end module
+
+ +

+ + +

+ +
+esmf_support@ucar.edu +
+ + diff --git a/docs/nightly/fix/reconcile-info/NUOPC_howtodoc/node6.html b/docs/nightly/fix/reconcile-info/NUOPC_howtodoc/node6.html new file mode 100644 index 000000000..4ada80eaa --- /dev/null +++ b/docs/nightly/fix/reconcile-info/NUOPC_howtodoc/node6.html @@ -0,0 +1,69 @@ + + + + + +About this document ... + + + + + + + + + + + + + + + + + + + +

+About this document ... +

+

+This document was generated using the +LaTeX2HTML translator Version 2018 (Released Feb 1, 2018) +

+Copyright © 1993, 1994, 1995, 1996, +Nikos Drakos, +Computer Based Learning Unit, University of Leeds. +
+Copyright © 1997, 1998, 1999, +Ross Moore, +Mathematics Department, Macquarie University, Sydney. +

+The command line arguments were:
+ latex2html -white -toc_depth 5 -split +1 -show_section_numbers -local_icons -address 'esmf_support@ucar.edu' NUOPC_howtodoc.tex +

+The translation was initiated on 2024-12-03 +


+
+esmf_support@ucar.edu +
+ + diff --git a/docs/nightly/fix/reconcile-info/NUOPC_howtodoc/prev.png b/docs/nightly/fix/reconcile-info/NUOPC_howtodoc/prev.png new file mode 100644 index 000000000..e60b8b407 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/NUOPC_howtodoc/prev.png differ diff --git a/docs/nightly/fix/reconcile-info/NUOPC_howtodoc/prev_g.png b/docs/nightly/fix/reconcile-info/NUOPC_howtodoc/prev_g.png new file mode 100644 index 000000000..ac6f0bceb Binary files /dev/null and b/docs/nightly/fix/reconcile-info/NUOPC_howtodoc/prev_g.png differ diff --git a/docs/nightly/fix/reconcile-info/NUOPC_howtodoc/up.png b/docs/nightly/fix/reconcile-info/NUOPC_howtodoc/up.png new file mode 100644 index 000000000..3937e168f Binary files /dev/null and b/docs/nightly/fix/reconcile-info/NUOPC_howtodoc/up.png differ diff --git a/docs/nightly/fix/reconcile-info/NUOPC_howtodoc/up_g.png b/docs/nightly/fix/reconcile-info/NUOPC_howtodoc/up_g.png new file mode 100644 index 000000000..fb36cf765 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/NUOPC_howtodoc/up_g.png differ diff --git a/docs/nightly/fix/reconcile-info/NUOPC_refdoc.pdf b/docs/nightly/fix/reconcile-info/NUOPC_refdoc.pdf new file mode 100644 index 000000000..3225877a6 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/NUOPC_refdoc.pdf differ diff --git a/docs/nightly/fix/reconcile-info/NUOPC_refdoc/NUOPC_refdoc.css b/docs/nightly/fix/reconcile-info/NUOPC_refdoc/NUOPC_refdoc.css new file mode 100644 index 000000000..ab110a261 --- /dev/null +++ b/docs/nightly/fix/reconcile-info/NUOPC_refdoc/NUOPC_refdoc.css @@ -0,0 +1,39 @@ +/* Century Schoolbook font is very similar to Computer Modern Math: cmmi */ +.MATH { font-family: "Century Schoolbook", serif; } +.MATH I { font-family: "Century Schoolbook", serif; font-style: italic } +.BOLDMATH { font-family: "Century Schoolbook", serif; font-weight: bold } + +/* implement both fixed-size and relative sizes */ +SMALL.XTINY { font-size : xx-small } +SMALL.TINY { font-size : x-small } +SMALL.SCRIPTSIZE { font-size : smaller } +SMALL.FOOTNOTESIZE { font-size : small } +SMALL.SMALL { } +BIG.LARGE { } +BIG.XLARGE { font-size : large } +BIG.XXLARGE { font-size : x-large } +BIG.HUGE { font-size : larger } +BIG.XHUGE { font-size : xx-large } + +/* heading styles */ +H1 { } +H2 { } +H3 { } +H4 { } +H5 { } + +/* mathematics styles */ +DIV.displaymath { } /* math displays */ +TD.eqno { } /* equation-number cells */ + + +/* document-specific styles come next */ +SPAN.bf { } +DIV.center { } +DIV.em { } +SPAN.it { } +DIV.navigation { } +PRE.preform { } +SPAN.sc { } +SPAN.tt { } +SPAN.arabic { } diff --git a/docs/nightly/fix/reconcile-info/NUOPC_refdoc/NUOPC_refdoc.html b/docs/nightly/fix/reconcile-info/NUOPC_refdoc/NUOPC_refdoc.html new file mode 100644 index 000000000..9eb21e623 --- /dev/null +++ b/docs/nightly/fix/reconcile-info/NUOPC_refdoc/NUOPC_refdoc.html @@ -0,0 +1,513 @@ + + + + + +NUOPC_refdoc + + + + + + + + + + + + + + + + + + + +

+ +

+ +

+ +

+ +

+ + +

+ +

+

+National Unified Operational Prediction Capability +
+
+
+
+NUOPC Layer Reference +
+
+
+
+ESMF 8.8.0 beta snapshot +
+
+
+
+
+Content Standards Committee (CSC) Members +
+
+
+
+December 3, 2024 +
+
+
+ +
+ +

+ +

+ +


+ + + + + +

+
+esmf_support@ucar.edu +
+ + diff --git a/docs/nightly/fix/reconcile-info/NUOPC_refdoc/WARNINGS b/docs/nightly/fix/reconcile-info/NUOPC_refdoc/WARNINGS new file mode 100644 index 000000000..3588bd292 --- /dev/null +++ b/docs/nightly/fix/reconcile-info/NUOPC_refdoc/WARNINGS @@ -0,0 +1,8 @@ + +NUOPC_refdoc.tex is newer than NUOPC_refdoc.aux: Please rerun latex. + +Substitution of arg to newlabelxx delayed. + +? brace missing for \oldcontentsline + +? brace missing for \ diff --git a/docs/nightly/fix/reconcile-info/NUOPC_refdoc/contents.png b/docs/nightly/fix/reconcile-info/NUOPC_refdoc/contents.png new file mode 100644 index 000000000..0c752c66c Binary files /dev/null and b/docs/nightly/fix/reconcile-info/NUOPC_refdoc/contents.png differ diff --git a/docs/nightly/fix/reconcile-info/NUOPC_refdoc/images.aux b/docs/nightly/fix/reconcile-info/NUOPC_refdoc/images.aux new file mode 100644 index 000000000..c01f471a8 --- /dev/null +++ b/docs/nightly/fix/reconcile-info/NUOPC_refdoc/images.aux @@ -0,0 +1,19 @@ +\relax +\providecommand\hyper@newdestlabel[2]{} +\providecommand\HyperFirstAtBeginDocument{\AtBeginDocument} +\HyperFirstAtBeginDocument{\ifx\hyper@anchor\@undefined +\global\let\oldcontentsline\contentsline +\gdef\contentsline#1#2#3#4{\oldcontentsline{#1}{#2}{#3}} +\global\let\oldnewlabel\newlabel +\gdef\newlabel#1#2{\newlabelxx{#1}#2} +\gdef\newlabelxx#1#2#3#4#5#6{\oldnewlabel{#1}{{#2}{#3}}} +\AtEndDocument{\ifx\hyper@anchor\@undefined +\let\contentsline\oldcontentsline +\let\newlabel\oldnewlabel +\fi} +\fi} +\global\let\hyper@last\relax +\gdef\HyperFirstAtBeginDocument#1{#1} +\providecommand*\HyPL@Entry[1]{} +\HyPL@Entry{0<>} +\babel@aux{english}{} diff --git a/docs/nightly/fix/reconcile-info/NUOPC_refdoc/images.bbl b/docs/nightly/fix/reconcile-info/NUOPC_refdoc/images.bbl new file mode 100644 index 000000000..e69de29bb diff --git a/docs/nightly/fix/reconcile-info/NUOPC_refdoc/images.log b/docs/nightly/fix/reconcile-info/NUOPC_refdoc/images.log new file mode 100644 index 000000000..53b560b3f --- /dev/null +++ b/docs/nightly/fix/reconcile-info/NUOPC_refdoc/images.log @@ -0,0 +1,541 @@ +This is pdfTeX, Version 3.14159265-2.6-1.40.18 (TeX Live 2017/Debian) (preloaded format=latex 2022.7.28) 3 DEC 2024 17:24 +entering extended mode + restricted \write18 enabled. + %&-line parsing enabled. +**./images.tex +(./images.tex +LaTeX2e <2017-04-15> +Babel <3.18> and hyphenation patterns for 84 language(s) loaded. + +(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls +Document Class: article 2014/09/29 v1.4h Standard LaTeX document class +(/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo +File: size10.clo 2014/09/29 v1.4h Standard LaTeX file (size option) +) +\c@part=\count79 +\c@section=\count80 +\c@subsection=\count81 +\c@subsubsection=\count82 +\c@paragraph=\count83 +\c@subparagraph=\count84 +\c@figure=\count85 +\c@table=\count86 +\abovecaptionskip=\skip41 +\belowcaptionskip=\skip42 +\bibindent=\dimen102 +) (/usr/share/texlive/texmf-dist/tex/latex/base/ifthen.sty +Package: ifthen 2014/09/29 v1.1c Standard LaTeX ifthen package (DPC) +) (/usr/share/texlive/texmf-dist/tex/generic/babel/babel.sty +Package: babel 2018/02/14 3.18 The Babel package +(/usr/share/texlive/texmf-dist/tex/generic/babel/switch.def +File: switch.def 2018/02/14 3.18 Babel switching mechanism +) (/usr/share/texlive/texmf-dist/tex/generic/babel-english/english.ldf +Language: english 2017/06/06 v3.3r English support from the babel system +(/usr/share/texlive/texmf-dist/tex/generic/babel/babel.def +File: babel.def 2018/02/14 3.18 Babel common definitions +\babel@savecnt=\count87 +\U@D=\dimen103 +(/usr/share/texlive/texmf-dist/tex/generic/babel/txtbabel.def) +\bbl@dirlevel=\count88 +) +\l@canadian = a dialect from \language\l@american +\l@australian = a dialect from \language\l@british +\l@newzealand = a dialect from \language\l@british +)) (/usr/share/texlive/texmf-dist/tex/latex/tools/longtable.sty +Package: longtable 2014/10/28 v4.11 Multi-page Table package (DPC) +\LTleft=\skip43 +\LTright=\skip44 +\LTpre=\skip45 +\LTpost=\skip46 +\LTchunksize=\count89 +\LTcapwidth=\dimen104 +\LT@head=\box26 +\LT@firsthead=\box27 +\LT@foot=\box28 +\LT@lastfoot=\box29 +\LT@cols=\count90 +\LT@rows=\count91 +\c@LT@tables=\count92 +\c@LT@chunks=\count93 +\LT@p@ftn=\toks14 +) (/usr/share/texmf/tex/latex/html/html.sty +Package: html 1999/07/19 v1.38 hypertext commands for latex2html (nd, hws, rrm) + +\c@lpart=\count94 +\c@lchapter=\count95 +\c@chapter=\count96 +\c@lsection=\count97 +\c@lsubsection=\count98 +\c@lsubsubsection=\count99 +\c@lparagraph=\count100 +\c@lsubparagraph=\count101 +\c@lsubsubparagraph=\count102 +\ptrfile=\write3 +) (/usr/share/texlive/texmf-dist/tex/latex/psnfss/times.sty +Package: times 2005/04/12 PSNFSS-v9.2a (SPQR) +) (/usr/share/texlive/texmf-dist/tex/latex/graphics/graphicx.sty +Package: graphicx 2017/06/01 v1.1a Enhanced LaTeX Graphics (DPC,SPQR) +(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty +Package: keyval 2014/10/28 v1.15 key=value parser (DPC) +\KV@toks@=\toks15 +) (/usr/share/texlive/texmf-dist/tex/latex/graphics/graphics.sty +Package: graphics 2017/06/25 v1.2c Standard LaTeX Graphics (DPC,SPQR) +(/usr/share/texlive/texmf-dist/tex/latex/graphics/trig.sty +Package: trig 2016/01/03 v1.10 sin cos tan (DPC) +) (/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/graphics.cfg +File: graphics.cfg 2016/06/04 v1.11 sample graphics configuration +) +Package graphics Info: Driver file: dvips.def on input line 99. +(/usr/share/texlive/texmf-dist/tex/latex/graphics-def/dvips.def +File: dvips.def 2017/06/20 v3.1d Graphics/color driver for dvips +)) +\Gin@req@height=\dimen105 +\Gin@req@width=\dimen106 +) (/usr/share/texlive/texmf-dist/tex/latex/hyperref/hyperref.sty +Package: hyperref 2018/02/06 v6.86b Hypertext links for LaTeX +(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/hobsub-hyperref.sty +Package: hobsub-hyperref 2016/05/16 v1.14 Bundle oberdiek, subset hyperref (HO) + +(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/hobsub-generic.sty +Package: hobsub-generic 2016/05/16 v1.14 Bundle oberdiek, subset generic (HO) +Package: hobsub 2016/05/16 v1.14 Construct package bundles (HO) +Package: infwarerr 2016/05/16 v1.4 Providing info/warning/error messages (HO) +Package: ltxcmds 2016/05/16 v1.23 LaTeX kernel commands for general use (HO) +Package: ifluatex 2016/05/16 v1.4 Provides the ifluatex switch (HO) +Package ifluatex Info: LuaTeX not detected. +Package: ifvtex 2016/05/16 v1.6 Detect VTeX and its facilities (HO) +Package ifvtex Info: VTeX not detected. +Package: intcalc 2016/05/16 v1.2 Expandable calculations with integers (HO) +Package: ifpdf 2017/03/15 v3.2 Provides the ifpdf switch +Package: etexcmds 2016/05/16 v1.6 Avoid name clashes with e-TeX commands (HO) +Package etexcmds Info: Could not find \expanded. +(etexcmds) That can mean that you are not using pdfTeX 1.50 or +(etexcmds) that some package has redefined \expanded. +(etexcmds) In the latter case, load this package earlier. +Package: kvsetkeys 2016/05/16 v1.17 Key value parser (HO) +Package: kvdefinekeys 2016/05/16 v1.4 Define keys (HO) +Package: pdftexcmds 2018/01/21 v0.26 Utility functions of pdfTeX for LuaTeX (HO +) +Package pdftexcmds Info: LuaTeX not detected. +Package pdftexcmds Info: \pdf@primitive is available. +Package pdftexcmds Info: \pdf@ifprimitive is available. +Package pdftexcmds Info: \pdfdraftmode is ignored in DVI mode. +Package: pdfescape 2016/05/16 v1.14 Implements pdfTeX's escape features (HO) +Package: bigintcalc 2016/05/16 v1.4 Expandable calculations on big integers (HO +) +Package: bitset 2016/05/16 v1.2 Handle bit-vector datatype (HO) +Package: uniquecounter 2016/05/16 v1.3 Provide unlimited unique counter (HO) +) +Package hobsub Info: Skipping package `hobsub' (already loaded). +Package: letltxmacro 2016/05/16 v1.5 Let assignment for LaTeX macros (HO) +Package: hopatch 2016/05/16 v1.3 Wrapper for package hooks (HO) +Package: xcolor-patch 2016/05/16 xcolor patch +Package: atveryend 2016/05/16 v1.9 Hooks at the very end of document (HO) +Package atveryend Info: \enddocument detected (standard20110627). +Package: atbegshi 2016/06/09 v1.18 At begin shipout hook (HO) +Package: refcount 2016/05/16 v3.5 Data extraction from label references (HO) +Package: hycolor 2016/05/16 v1.8 Color options for hyperref/bookmark (HO) +) (/usr/share/texlive/texmf-dist/tex/generic/ifxetex/ifxetex.sty +Package: ifxetex 2010/09/12 v0.6 Provides ifxetex conditional +) (/usr/share/texlive/texmf-dist/tex/latex/oberdiek/auxhook.sty +Package: auxhook 2016/05/16 v1.4 Hooks for auxiliary files (HO) +) (/usr/share/texlive/texmf-dist/tex/latex/oberdiek/kvoptions.sty +Package: kvoptions 2016/05/16 v3.12 Key value format for package options (HO) +) +\@linkdim=\dimen107 +\Hy@linkcounter=\count103 +\Hy@pagecounter=\count104 +(/usr/share/texlive/texmf-dist/tex/latex/hyperref/pd1enc.def +File: pd1enc.def 2018/02/06 v6.86b Hyperref: PDFDocEncoding definition (HO) +) +\Hy@SavedSpaceFactor=\count105 +(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/hyperref.cfg +File: hyperref.cfg 2002/06/06 v1.2 hyperref configuration of TeXLive +) +Package hyperref Info: Hyper figures OFF on input line 4509. +Package hyperref Info: Link nesting OFF on input line 4514. +Package hyperref Info: Hyper index ON on input line 4517. +Package hyperref Info: Plain pages OFF on input line 4524. +Package hyperref Info: Backreferencing OFF on input line 4529. +Package hyperref Info: Implicit mode ON; LaTeX internals redefined. +Package hyperref Info: Bookmarks ON on input line 4762. +\c@Hy@tempcnt=\count106 +(/usr/share/texlive/texmf-dist/tex/latex/url/url.sty +\Urlmuskip=\muskip10 +Package: url 2013/09/16 ver 3.4 Verb mode for urls, etc. +) +LaTeX Info: Redefining \url on input line 5115. +LaTeX Info: Redefining \hyperref on input line 5126. +\XeTeXLinkMargin=\dimen108 +\Fld@menulength=\count107 +\Field@Width=\dimen109 +\Fld@charsize=\dimen110 +Package hyperref Info: Hyper figures OFF on input line 6369. +Package hyperref Info: Link nesting OFF on input line 6374. +Package hyperref Info: Hyper index ON on input line 6377. +Package hyperref Info: backreferencing OFF on input line 6384. +Package hyperref Info: Link coloring OFF on input line 6389. +Package hyperref Info: Link coloring with OCG OFF on input line 6394. +Package hyperref Info: PDF/A mode OFF on input line 6399. +LaTeX Info: Redefining \ref on input line 6439. +LaTeX Info: Redefining \pageref on input line 6443. +\Hy@abspage=\count108 +\c@Item=\count109 +\c@Hfootnote=\count110 +) +Package hyperref Info: Driver (default): hdvips. +(/usr/share/texlive/texmf-dist/tex/latex/hyperref/hdvips.def +File: hdvips.def 2018/02/06 v6.86b Hyperref driver for dvips +(/usr/share/texlive/texmf-dist/tex/latex/hyperref/pdfmark.def +File: pdfmark.def 2018/02/06 v6.86b Hyperref definitions for pdfmark specials +\pdf@docset=\toks16 +\pdf@box=\box30 +\pdf@toks=\toks17 +\pdf@defaulttoks=\toks18 +\HyField@AnnotCount=\count111 +\Fld@listcount=\count112 +\c@bookmark@seq@number=\count113 +(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/rerunfilecheck.sty +Package: rerunfilecheck 2016/05/16 v1.8 Rerun checks for auxiliary files (HO) +Package uniquecounter Info: New unique counter `rerunfilecheck' on input line 2 +82. +) +\Hy@SectionHShift=\skip47 +)) (/usr/share/texlive/texmf-dist/tex/latex/base/fontenc.sty +Package: fontenc 2017/04/05 v2.0i Standard LaTeX package +(/usr/share/texlive/texmf-dist/tex/latex/base/t1enc.def +File: t1enc.def 2017/04/05 v2.0i Standard LaTeX file +LaTeX Font Info: Redeclaring font encoding T1 on input line 48. +)) +\oldparskip=\skip48 +\oldparindent=\skip49 +\oldbaselineskip=\skip50 +(/usr/share/texlive/texmf-dist/tex/latex/xcolor/xcolor.sty +Package: xcolor 2016/05/11 v2.12 LaTeX color extensions (UK) +(/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/color.cfg +File: color.cfg 2016/01/02 v1.6 sample color configuration +) +Package xcolor Info: Driver file: dvips.def on input line 225. +Package xcolor Info: Model `cmy' substituted by `cmy0' on input line 1348. +Package xcolor Info: Model `RGB' extended on input line 1364. +Package xcolor Info: Model `HTML' substituted by `rgb' on input line 1366. +Package xcolor Info: Model `Hsb' substituted by `hsb' on input line 1367. +Package xcolor Info: Model `tHsb' substituted by `hsb' on input line 1368. +Package xcolor Info: Model `HSB' substituted by `hsb' on input line 1369. +Package xcolor Info: Model `Gray' substituted by `gray' on input line 1370. +Package xcolor Info: Model `wave' substituted by `hsb' on input line 1371. +) (/usr/share/texlive/texmf-dist/tex/latex/base/inputenc.sty +Package: inputenc 2015/03/17 v1.2c Input encoding file +\inpenc@prehook=\toks19 +\inpenc@posthook=\toks20 +) +\sizebox=\box31 +\lthtmlwrite=\write4 +(./images.aux) +\openout1 = `images.aux'. + +LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 143. +LaTeX Font Info: ... okay on input line 143. +LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 143. +LaTeX Font Info: ... okay on input line 143. +LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 143. +LaTeX Font Info: ... okay on input line 143. +LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 143. +LaTeX Font Info: ... okay on input line 143. +LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 143. +LaTeX Font Info: ... okay on input line 143. +LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 143. +LaTeX Font Info: ... okay on input line 143. +LaTeX Font Info: Checking defaults for PD1/pdf/m/n on input line 143. +LaTeX Font Info: ... okay on input line 143. +LaTeX Font Info: Try loading font information for T1+ptm on input line 143. +(/usr/share/texlive/texmf-dist/tex/latex/psnfss/t1ptm.fd +File: t1ptm.fd 2001/06/04 font definitions for T1/ptm. +) +\AtBeginShipoutBox=\box32 +Package hyperref Info: Link coloring OFF on input line 143. +(/usr/share/texlive/texmf-dist/tex/latex/hyperref/nameref.sty +Package: nameref 2016/05/21 v2.44 Cross-referencing by name of section +(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/gettitlestring.sty +Package: gettitlestring 2016/05/16 v1.5 Cleanup title references (HO) +) +\c@section@level=\count114 +) +LaTeX Info: Redefining \ref on input line 143. +LaTeX Info: Redefining \pageref on input line 143. +LaTeX Info: Redefining \nameref on input line 143. +\@outlinefile=\write5 +\openout5 = `images.out'. + +(/sandbox/esmf/src-git/src/addon/NUOPC/doc/NUOPC_refdoc.aux + +LaTeX Warning: Label `fig:NUOPCGenericComp' multiply defined. + + +LaTeX Warning: Label `field_dictionary' multiply defined. + + +LaTeX Warning: Label `fd:docfile' multiply defined. + + +LaTeX Warning: Label `fd:default' multiply defined. + + +LaTeX Warning: Label `Metadata' multiply defined. + + +LaTeX Warning: Label `DriverCompMeta' multiply defined. + + +LaTeX Warning: Label `ModelCompMeta' multiply defined. + + +LaTeX Warning: Label `MediatorCompMeta' multiply defined. + + +LaTeX Warning: Label `ConnectorCompMeta' multiply defined. + + +LaTeX Warning: Label `StateMeta' multiply defined. + + +LaTeX Warning: Label `FieldMeta' multiply defined. + + +LaTeX Warning: Label `PhaseMaps' multiply defined. + + +LaTeX Warning: Label `FieldPairing' multiply defined. + + +LaTeX Warning: Label `Namespaces' multiply defined. + + +LaTeX Warning: Label `CplSets' multiply defined. + + +LaTeX Warning: Label `connection_options' multiply defined. + + +LaTeX Warning: Label `DataDepInit' multiply defined. + + +LaTeX Warning: Label `TransferGeom' multiply defined. + + +LaTeX Warning: Label `Sharing' multiply defined. + + +LaTeX Warning: Label `FieldMirror' multiply defined. + + +LaTeX Warning: Label `Timekeeping' multiply defined. + + +LaTeX Warning: Label `ComponentHierarchy' multiply defined. + + +LaTeX Warning: Label `AdvancedResourceControl' multiply defined. + + +LaTeX Warning: Label `ExternalInterface' multiply defined. + + +LaTeX Warning: Label `NUOPC_Driver' multiply defined. + + +LaTeX Warning: Label `NUOPC_ModelBase' multiply defined. + + +LaTeX Warning: Label `NUOPC_Model' multiply defined. + + +LaTeX Warning: Label `NUOPC_Mediator' multiply defined. + + +LaTeX Warning: Label `NUOPC_Connector' multiply defined. + + +LaTeX Warning: Label `NUOPC_GridCompAttributeIng' multiply defined. + + +LaTeX Warning: Label `NUOPC_CplCompAttributeIng' multiply defined. + + +LaTeX Warning: Label `NUOPC_GridCompAttributeIngHC' multiply defined. + + +LaTeX Warning: Label `NUOPC_CplCompAttributeIngHC' multiply defined. + + +LaTeX Warning: Label `NUOPC_GridCompSetClock' multiply defined. + + +LaTeX Warning: Label `NUOPC_AddNestedState' multiply defined. + + +LaTeX Warning: Label `NUOPC_AdvertiseField' multiply defined. + + +LaTeX Warning: Label `NUOPC_AdvertiseFields' multiply defined. + + +LaTeX Warning: Label `NUOPC_RealizeCompleteG' multiply defined. + + +LaTeX Warning: Label `NUOPC_RealizeCompleteLS' multiply defined. + + +LaTeX Warning: Label `NUOPC_RealizeCompleteM' multiply defined. + + +LaTeX Warning: Label `NUOPC_RealizeField' multiply defined. + + +LaTeX Warning: Label `NUOPC_RealizeTransfer' multiply defined. + + +LaTeX Warning: Label `api_NUOPC_SCRIPWrite' multiply defined. + + +LaTeX Warning: Label `componentDep' multiply defined. + + +LaTeX Warning: Label `StandardCompDep:FortranStatic' multiply defined. + + +LaTeX Warning: Label `StandardCompDep:FortranSharedLib' multiply defined. + + +LaTeX Warning: Label `StandardCompDep:SharedObject' multiply defined. + + +LaTeX Warning: Label `StandardCompDep:CompOnComp' multiply defined. + + +LaTeX Warning: Label `StandardCompDep:C' multiply defined. + + +LaTeX Warning: Label `Compliance' multiply defined. + + +LaTeX Warning: Label `Checker' multiply defined. + + +LaTeX Warning: Label `Explorer' multiply defined. + + +LaTeX Warning: Label `fig:NUOPCRunSequence' multiply defined. + + +LaTeX Warning: Label `IPD' multiply defined. + +) + +latex2htmlLength hsize=349.0pt + +latex2htmlLength vsize=697.295pt + +latex2htmlLength hoffset=0.0pt + +latex2htmlLength voffset=0.0pt + +latex2htmlLength topmargin=0.0pt + +latex2htmlLength topskip=0.00003pt + +latex2htmlLength headheight=0.0pt + +latex2htmlLength headsep=0.0pt + +latex2htmlLength parskip=0.0pt + +latex2htmlLength oddsidemargin=7.7975pt + +latex2htmlLength evensidemargin=7.7975pt + +File: NUOPC_GC.eps Graphic file (type eps) + +Overfull \hbox (13.55818pt too wide) detected at line 212 + [] + [] + +l2hSize :tex2html_wrap401:115.63316pt::0.0pt::349.0pt. +[1 + + + +] +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <7> on input line 266. +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <5> on input line 266. +l2hSize :tex2html_wrap_inline705:7.24997pt::7.24997pt::23.83344pt. +[2 + + +] +l2hSize :tex2html_wrap_inline707:7.24997pt::7.24997pt::23.83344pt. +[3 + + +] +l2hSize :tex2html_wrap_inline4021:6.74997pt::0.0pt::20.18758pt. +[4 + + +] +l2hSize :tex2html_wrap_inline4023:6.74997pt::0.0pt::20.18758pt. +[5 + + +] +l2hSize :tex2html_wrap_inline4033:6.74997pt::0.0pt::25.18759pt. +[6 + + +] +l2hSize :tex2html_wrap_inline4037:6.74997pt::0.0pt::25.18759pt. +[7 + + +] +File: NUOPC_RunSequence.eps Graphic file (type eps) + +Overfull \hbox (126.18007pt too wide) detected at line 949 + [] + [] + +l2hSize :tex2html_wrap12255:328.83183pt::0.0pt::349.0pt. +[8 + + +] +Package atveryend Info: Empty hook `BeforeClearDocument' on input line 965. +Package atveryend Info: Empty hook `AfterLastShipout' on input line 965. +(./images.aux) +Package atveryend Info: Empty hook `AtVeryEndDocument' on input line 965. +Package atveryend Info: Executing hook `AtEndAfterFileList' on input line 965. + +Package rerunfilecheck Warning: File `images.out' has changed. +(rerunfilecheck) Rerun to get outlines right +(rerunfilecheck) or use package `bookmark'. + +Package rerunfilecheck Info: Checksums for `images.out': +(rerunfilecheck) Before: +(rerunfilecheck) After: D41D8CD98F00B204E9800998ECF8427E;0. + +LaTeX Warning: There were multiply-defined labels. + +Package atveryend Info: Empty hook `AtVeryVeryEnd' on input line 965. + ) +Here is how much of TeX's memory you used: + 6261 strings out of 492983 + 89066 string characters out of 6134922 + 187790 words of memory out of 5000000 + 9793 multiletter control sequences out of 15000+600000 + 6047 words of font info for 16 fonts, out of 8000000 for 9000 + 1141 hyphenation exceptions out of 8191 + 29i,5n,35p,480b,361s stack positions out of 5000i,500n,10000p,200000b,80000s + +Output written on images.dvi (8 pages, 6976 bytes). diff --git a/docs/nightly/fix/reconcile-info/NUOPC_refdoc/images.out b/docs/nightly/fix/reconcile-info/NUOPC_refdoc/images.out new file mode 100644 index 000000000..e69de29bb diff --git a/docs/nightly/fix/reconcile-info/NUOPC_refdoc/images.pl b/docs/nightly/fix/reconcile-info/NUOPC_refdoc/images.pl new file mode 100644 index 000000000..98fbedb74 --- /dev/null +++ b/docs/nightly/fix/reconcile-info/NUOPC_refdoc/images.pl @@ -0,0 +1,54 @@ +# LaTeX2HTML 2018 (Released Feb 1, 2018) +# Associate images original text with physical files. + + +$key = q/1000s;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$1000s$|; + +$key = q/100s;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$100s$|; + +$key = q/1800s;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$1800s$|; + +$key = q/800s;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$800s$|; + +$key = q/<<<;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$«<$|; + +$key = q/>>>;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$»>$|; + +$key = q/scalebox{0.6}{includegraphics{NUOPC_GC}};AAT/; +$cached_env_img{$key} = q|\scalebox{0.6}{\includegraphics{NUOPC_GC}}|; + +$key = q/scalebox{0.6}{includegraphics{NUOPC_RunSequence}};AAT/; +$cached_env_img{$key} = q|\scalebox{0.6}{\includegraphics{NUOPC_RunSequence}}|; + +1; + diff --git a/docs/nightly/fix/reconcile-info/NUOPC_refdoc/images.tex b/docs/nightly/fix/reconcile-info/NUOPC_refdoc/images.tex new file mode 100644 index 000000000..08645f09d --- /dev/null +++ b/docs/nightly/fix/reconcile-info/NUOPC_refdoc/images.tex @@ -0,0 +1,965 @@ +\batchmode + +\documentclass[english]{article} +\RequirePackage{ifthen} + + +\usepackage{babel} +\usepackage{longtable} +\usepackage{html} +\usepackage{times} +\usepackage{graphicx} +\usepackage{hyperref} +\usepackage[T1]{fontenc} +\textwidth 6.5in +\textheight 8.5in + +\addtolength{\oddsidemargin}{-.75in}% +\providecommand{\mytitle}{\Large {\bf NUOPC Layer Reference}}% +\providecommand{\myauthors}{\large {\it Content Standards Committee (CSC) Members}}% +\providecommand{\myversion}{ESMF 8.8.0 beta snapshot} + +\setlength{\parskip}{0pt} + +\setlength{\parindent}{0pt} + +\setlength{\baselineskip}{11pt} + +\newlength{\oldparskip} + +\newlength{\oldparindent} + +\newlength{\oldbaselineskip} +\setlongtables +\sloppy + + +\usepackage{xcolor} + +\usepackage[]{inputenc} + + + +\makeatletter +\AtBeginDocument{\makeatletter +\input /sandbox/esmf/src-git/src/addon/NUOPC/doc/NUOPC_refdoc.aux +\makeatother +} + +\makeatletter +\count@=\the\catcode`\_ \catcode`\_=8 +\newenvironment{tex2html_wrap}{}{}% +\catcode`\<=12\catcode`\_=\count@ +\newcommand{\providedcommand}[1]{\expandafter\providecommand\csname #1\endcsname}% +\newcommand{\renewedcommand}[1]{\expandafter\providecommand\csname #1\endcsname{}% + \expandafter\renewcommand\csname #1\endcsname}% +\newcommand{\newedenvironment}[1]{\newenvironment{#1}{}{}\renewenvironment{#1}}% +\let\newedcommand\renewedcommand +\let\renewedenvironment\newedenvironment +\makeatother +\let\mathon=$ +\let\mathoff=$ +\ifx\AtBeginDocument\undefined \newcommand{\AtBeginDocument}[1]{}\fi +\newbox\sizebox +\setlength{\hoffset}{0pt}\setlength{\voffset}{0pt} +\addtolength{\textheight}{\footskip}\setlength{\footskip}{0pt} +\addtolength{\textheight}{\topmargin}\setlength{\topmargin}{0pt} +\addtolength{\textheight}{\headheight}\setlength{\headheight}{0pt} +\addtolength{\textheight}{\headsep}\setlength{\headsep}{0pt} +\setlength{\textwidth}{349pt} +\newwrite\lthtmlwrite +\makeatletter +\let\realnormalsize=\normalsize +\global\topskip=2sp +\def\preveqno{}\let\real@float=\@float \let\realend@float=\end@float +\def\@float{\let\@savefreelist\@freelist\real@float} +\def\liih@math{\ifmmode$\else\bad@math\fi} +\def\end@float{\realend@float\global\let\@freelist\@savefreelist} +\let\real@dbflt=\@dbflt \let\end@dblfloat=\end@float +\let\@largefloatcheck=\relax +\let\if@boxedmulticols=\iftrue +\def\@dbflt{\let\@savefreelist\@freelist\real@dbflt} +\def\adjustnormalsize{\def\normalsize{\mathsurround=0pt \realnormalsize + \parindent=0pt\abovedisplayskip=0pt\belowdisplayskip=0pt}% + \def\phantompar{\csname par\endcsname}\normalsize}% +\def\lthtmltypeout#1{{\let\protect\string \immediate\write\lthtmlwrite{#1}}}% +\newcommand\lthtmlhboxmathA{\adjustnormalsize\setbox\sizebox=\hbox\bgroup\kern.05em }% +\newcommand\lthtmlhboxmathB{\adjustnormalsize\setbox\sizebox=\hbox to\hsize\bgroup\hfill }% +\newcommand\lthtmlvboxmathA{\adjustnormalsize\setbox\sizebox=\vbox\bgroup % + \let\ifinner=\iffalse \let\)\liih@math }% +\newcommand\lthtmlboxmathZ{\@next\next\@currlist{}{\def\next{\voidb@x}}% + \expandafter\box\next\egroup}% +\newcommand\lthtmlmathtype[1]{\gdef\lthtmlmathenv{#1}}% +\newcommand\lthtmllogmath{\dimen0\ht\sizebox \advance\dimen0\dp\sizebox + \ifdim\dimen0>.95\vsize + \lthtmltypeout{% +*** image for \lthtmlmathenv\space is too tall at \the\dimen0, reducing to .95 vsize ***}% + \ht\sizebox.95\vsize \dp\sizebox\z@ \fi + \lthtmltypeout{l2hSize % +:\lthtmlmathenv:\the\ht\sizebox::\the\dp\sizebox::\the\wd\sizebox.\preveqno}}% +\newcommand\lthtmlfigureA[1]{\let\@savefreelist\@freelist + \lthtmlmathtype{#1}\lthtmlvboxmathA}% +\newcommand\lthtmlpictureA{\bgroup\catcode`\_=8 \lthtmlpictureB}% +\newcommand\lthtmlpictureB[1]{\lthtmlmathtype{#1}\egroup + \let\@savefreelist\@freelist \lthtmlhboxmathB}% +\newcommand\lthtmlpictureZ[1]{\hfill\lthtmlfigureZ}% +\newcommand\lthtmlfigureZ{\lthtmlboxmathZ\lthtmllogmath\copy\sizebox + \global\let\@freelist\@savefreelist}% +\newcommand\lthtmldisplayA{\bgroup\catcode`\_=8 \lthtmldisplayAi}% +\newcommand\lthtmldisplayAi[1]{\lthtmlmathtype{#1}\egroup\lthtmlvboxmathA}% +\newcommand\lthtmldisplayB[1]{\edef\preveqno{(\theequation)}% + \lthtmldisplayA{#1}\let\@eqnnum\relax}% +\newcommand\lthtmldisplayZ{\lthtmlboxmathZ\lthtmllogmath\lthtmlsetmath}% +\newcommand\lthtmlinlinemathA{\bgroup\catcode`\_=8 \lthtmlinlinemathB} +\newcommand\lthtmlinlinemathB[1]{\lthtmlmathtype{#1}\egroup\lthtmlhboxmathA + \vrule height1.5ex width0pt }% +\newcommand\lthtmlinlineA{\bgroup\catcode`\_=8 \lthtmlinlineB}% +\newcommand\lthtmlinlineB[1]{\lthtmlmathtype{#1}\egroup\lthtmlhboxmathA}% +\newcommand\lthtmlinlineZ{\egroup\expandafter\ifdim\dp\sizebox>0pt % + \expandafter\centerinlinemath\fi\lthtmllogmath\lthtmlsetinline} +\newcommand\lthtmlinlinemathZ{\egroup\expandafter\ifdim\dp\sizebox>0pt % + \expandafter\centerinlinemath\fi\lthtmllogmath\lthtmlsetmath} +\newcommand\lthtmlindisplaymathZ{\egroup % + \centerinlinemath\lthtmllogmath\lthtmlsetmath} +\def\lthtmlsetinline{\hbox{\vrule width.1em \vtop{\vbox{% + \kern.1em\copy\sizebox}\ifdim\dp\sizebox>0pt\kern.1em\else\kern.3pt\fi + \ifdim\hsize>\wd\sizebox \hrule depth1pt\fi}}} +\def\lthtmlsetmath{\hbox{\vrule width.1em\kern-.05em\vtop{\vbox{% + \kern.1em\kern0.8 pt\hbox{\hglue.17em\copy\sizebox\hglue0.8 pt}}\kern.3pt% + \ifdim\dp\sizebox>0pt\kern.1em\fi \kern0.8 pt% + \ifdim\hsize>\wd\sizebox \hrule depth1pt\fi}}} +\def\centerinlinemath{% + \dimen1=\ifdim\ht\sizebox<\dp\sizebox \dp\sizebox\else\ht\sizebox\fi + \advance\dimen1by.5pt \vrule width0pt height\dimen1 depth\dimen1 + \dp\sizebox=\dimen1\ht\sizebox=\dimen1\relax} + +\def\lthtmlcheckvsize{\ifdim\ht\sizebox<\vsize + \ifdim\wd\sizebox<\hsize\expandafter\hfill\fi \expandafter\vfill + \else\expandafter\vss\fi}% +\providecommand{\selectlanguage}[1]{}% +\makeatletter \tracingstats = 1 + + +\begin{document} +\pagestyle{empty}\thispagestyle{empty}\lthtmltypeout{}% +\lthtmltypeout{latex2htmlLength hsize=\the\hsize}\lthtmltypeout{}% +\lthtmltypeout{latex2htmlLength vsize=\the\vsize}\lthtmltypeout{}% +\lthtmltypeout{latex2htmlLength hoffset=\the\hoffset}\lthtmltypeout{}% +\lthtmltypeout{latex2htmlLength voffset=\the\voffset}\lthtmltypeout{}% +\lthtmltypeout{latex2htmlLength topmargin=\the\topmargin}\lthtmltypeout{}% +\lthtmltypeout{latex2htmlLength topskip=\the\topskip}\lthtmltypeout{}% +\lthtmltypeout{latex2htmlLength headheight=\the\headheight}\lthtmltypeout{}% +\lthtmltypeout{latex2htmlLength headsep=\the\headsep}\lthtmltypeout{}% +\lthtmltypeout{latex2htmlLength parskip=\the\parskip}\lthtmltypeout{}% +\lthtmltypeout{latex2htmlLength oddsidemargin=\the\oddsidemargin}\lthtmltypeout{}% +\makeatletter +\if@twoside\lthtmltypeout{latex2htmlLength evensidemargin=\the\evensidemargin}% +\else\lthtmltypeout{latex2htmlLength evensidemargin=\the\oddsidemargin}\fi% +\lthtmltypeout{}% +\makeatother +\setcounter{page}{1} +\onecolumn + +% !!! IMAGES START HERE !!! + + +% +\providecommand{\apiStatusCompatibleVersion}[1]{This interface is backward compatible with ESMF versions starting at #1. If code using this interface compiles with any version of ESMF starting with #1, then it will compile with the current version.}% + + +% +\providecommand{\apiStatusModifiedSinceVersion}[1]{This interface was modified since ESMF version #1. The fact that code using this interface compiles with the current ESMF version does not guarantee that it compiles with previous versions of this interface. If user code compatibility with version #1 is desired then care must be taken to limit the use of this interface to features that were available in the #1 release. \\ +Changes made after the #1 release:}% + + +% +\providecommand{\apiStatusCompatibleVersionExceptions}[1]{This interface is backward compatible with ESMF versions starting at #1 - {\em except those arguments indicated below}.}% + + +% +\providecommand{\apiStatusCompatibleException}{{\sc Status:}{\em This argument is excluded from the backward compatibility statement}.\\}% + + +% +\providecommand{\apiDeprecatedArg}{\sf DEPRECATED ARGUMENT!}% + + +% +\providecommand{\apiDeprecatedArgWithReplacement}[1]{{\bf DEPRECATED ARGUMENT!} Please use the argument {\tt #1} instead.}% + + +% +\providecommand{\apiDeprecatedMethodWithReplacement}[3]{{\bf DEPRECATED METHOD} as of ESMF #1. Please use {\tt #2}, section {\tt \ref{#3}} instead.}% + + +% +\providecommand{\apiDeprecatedClassWithTargetReleaseAndReplacement}[4]{{\bf DEPRECATED CLASS!}\\The entire #1 class has been deprecated and is scheduled for removal with ESMF #2. This includes all of the class derived types, named constants, and methods. Please use the replacment class {\tt #3}, section {\tt \ref{#4}} instead!\\}% + + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} +\stepcounter{section} +\stepcounter{section} +\stepcounter{subsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +{\newpage\clearpage +\lthtmlpictureA{tex2html_wrap401}% +\scalebox{0.6}{\includegraphics{NUOPC_GC}}% +\lthtmlpictureZ +\lthtmlcheckvsize\clearpage} + +\stepcounter{subsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{subsection} +\stepcounter{subsubsection} +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline705}% +$>>>$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline707}% +$<<<$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{section} +\stepcounter{subsection} + + +\setlength{\parskip}{0pt}% + +\setlength{\parskip}{0pt} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline4021}% +$100s$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline4023}% +$800s$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline4033}% +$1000s$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline4037}% +$1800s$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{subsection} + + +\setlength{\parskip}{0pt}% + +\setlength{\parskip}{0pt} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsection} + + +\setlength{\parskip}{0pt}% + +\setlength{\parskip}{0pt} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{subsection} + + +\setlength{\parskip}{0pt}% + +\setlength{\parskip}{0pt} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{subsection} + + +\setlength{\parskip}{0pt}% + +\setlength{\parskip}{0pt} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} +\stepcounter{subsection} + + +\setlength{\oldparskip}{\parskip}% + +\setlength{\oldparskip}{\parskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} + + +\setlength{\oldparindent}{\parindent}% + +\setlength{\oldparindent}{\parindent} + + +\setlength{\parindent}{0pt}% + +\setlength{\parindent}{0pt} + + +\setlength{\oldbaselineskip}{\baselineskip}% + +\setlength{\oldbaselineskip}{\baselineskip} + + +\setlength{\baselineskip}{11pt}% + +\setlength{\baselineskip}{11pt} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} + + +\setlength{\parskip}{\oldparskip}% + +\setlength{\parskip}{\oldparskip} + + +\setlength{\parindent}{\oldparindent}% + +\setlength{\parindent}{\oldparindent} + + +\setlength{\baselineskip}{\oldbaselineskip}% + +\setlength{\baselineskip}{\oldbaselineskip} + + +\setlength{\parskip}{1.5ex}% + +\setlength{\parskip}{1.5ex} +\stepcounter{section} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{section} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{section} +{\newpage\clearpage +\lthtmlpictureA{tex2html_wrap12255}% +\scalebox{0.6}{\includegraphics{NUOPC_RunSequence}}% +\lthtmlpictureZ +\lthtmlcheckvsize\clearpage} + +\stepcounter{section} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsection} +\stepcounter{subsection} + +\end{document} diff --git a/docs/nightly/fix/reconcile-info/NUOPC_refdoc/img1.png b/docs/nightly/fix/reconcile-info/NUOPC_refdoc/img1.png new file mode 100644 index 000000000..153f3530c Binary files /dev/null and b/docs/nightly/fix/reconcile-info/NUOPC_refdoc/img1.png differ diff --git a/docs/nightly/fix/reconcile-info/NUOPC_refdoc/img2.png b/docs/nightly/fix/reconcile-info/NUOPC_refdoc/img2.png new file mode 100644 index 000000000..fbabffa48 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/NUOPC_refdoc/img2.png differ diff --git a/docs/nightly/fix/reconcile-info/NUOPC_refdoc/img3.png b/docs/nightly/fix/reconcile-info/NUOPC_refdoc/img3.png new file mode 100644 index 000000000..835aa196d Binary files /dev/null and b/docs/nightly/fix/reconcile-info/NUOPC_refdoc/img3.png differ diff --git a/docs/nightly/fix/reconcile-info/NUOPC_refdoc/img4.png b/docs/nightly/fix/reconcile-info/NUOPC_refdoc/img4.png new file mode 100644 index 000000000..8744359f2 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/NUOPC_refdoc/img4.png differ diff --git a/docs/nightly/fix/reconcile-info/NUOPC_refdoc/img5.png b/docs/nightly/fix/reconcile-info/NUOPC_refdoc/img5.png new file mode 100644 index 000000000..92bb09b63 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/NUOPC_refdoc/img5.png differ diff --git a/docs/nightly/fix/reconcile-info/NUOPC_refdoc/img6.png b/docs/nightly/fix/reconcile-info/NUOPC_refdoc/img6.png new file mode 100644 index 000000000..106e43c56 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/NUOPC_refdoc/img6.png differ diff --git a/docs/nightly/fix/reconcile-info/NUOPC_refdoc/img7.png b/docs/nightly/fix/reconcile-info/NUOPC_refdoc/img7.png new file mode 100644 index 000000000..c61140953 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/NUOPC_refdoc/img7.png differ diff --git a/docs/nightly/fix/reconcile-info/NUOPC_refdoc/img8.png b/docs/nightly/fix/reconcile-info/NUOPC_refdoc/img8.png new file mode 100644 index 000000000..8079929f0 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/NUOPC_refdoc/img8.png differ diff --git a/docs/nightly/fix/reconcile-info/NUOPC_refdoc/index.html b/docs/nightly/fix/reconcile-info/NUOPC_refdoc/index.html new file mode 100644 index 000000000..9eb21e623 --- /dev/null +++ b/docs/nightly/fix/reconcile-info/NUOPC_refdoc/index.html @@ -0,0 +1,513 @@ + + + + + +NUOPC_refdoc + + + + + + + + + + + + + + + + + + + +

+ +

+ +

+ +

+ +

+ + +

+ +

+

+National Unified Operational Prediction Capability +
+
+
+
+NUOPC Layer Reference +
+
+
+
+ESMF 8.8.0 beta snapshot +
+
+
+
+
+Content Standards Committee (CSC) Members +
+
+
+
+December 3, 2024 +
+
+
+ +
+ +

+ +

+ +


+ + + + + +

+
+esmf_support@ucar.edu +
+ + diff --git a/docs/nightly/fix/reconcile-info/NUOPC_refdoc/internals.pl b/docs/nightly/fix/reconcile-info/NUOPC_refdoc/internals.pl new file mode 100644 index 000000000..22615ea1e --- /dev/null +++ b/docs/nightly/fix/reconcile-info/NUOPC_refdoc/internals.pl @@ -0,0 +1,222 @@ +# LaTeX2HTML 2018 (Released Feb 1, 2018) +# Associate internals original text with physical files. + + +$key = q/AdvancedResourceControl/; +$ref_files{$key} = "$dir".q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/Checker/; +$ref_files{$key} = "$dir".q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/Compliance/; +$ref_files{$key} = "$dir".q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/ComponentHierarchy/; +$ref_files{$key} = "$dir".q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/ConnectorCompMeta/; +$ref_files{$key} = "$dir".q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/CplSets/; +$ref_files{$key} = "$dir".q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/DataDepInit/; +$ref_files{$key} = "$dir".q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/DriverCompMeta/; +$ref_files{$key} = "$dir".q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/Explorer/; +$ref_files{$key} = "$dir".q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/ExternalInterface/; +$ref_files{$key} = "$dir".q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/FieldMeta/; +$ref_files{$key} = "$dir".q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/FieldMirror/; +$ref_files{$key} = "$dir".q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/FieldPairing/; +$ref_files{$key} = "$dir".q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/IPD/; +$ref_files{$key} = "$dir".q|node8.html|; +$noresave{$key} = "$nosave"; + +$key = q/MediatorCompMeta/; +$ref_files{$key} = "$dir".q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/Metadata/; +$ref_files{$key} = "$dir".q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/ModelCompMeta/; +$ref_files{$key} = "$dir".q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/NUOPC_AddNestedState/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/NUOPC_AdvertiseField/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/NUOPC_AdvertiseFields/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/NUOPC_Connector/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/NUOPC_CplCompAttributeIng/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/NUOPC_CplCompAttributeIngHC/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/NUOPC_Driver/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/NUOPC_GridCompAttributeIng/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/NUOPC_GridCompAttributeIngHC/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/NUOPC_GridCompSetClock/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/NUOPC_Mediator/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/NUOPC_Model/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/NUOPC_ModelBase/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/NUOPC_RealizeCompleteG/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/NUOPC_RealizeCompleteLS/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/NUOPC_RealizeCompleteM/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/NUOPC_RealizeField/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/NUOPC_RealizeTransfer/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/Namespaces/; +$ref_files{$key} = "$dir".q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/PhaseMaps/; +$ref_files{$key} = "$dir".q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/Sharing/; +$ref_files{$key} = "$dir".q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/StandardCompDep:C/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/StandardCompDep:CompOnComp/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/StandardCompDep:FortranSharedLib/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/StandardCompDep:FortranStatic/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/StandardCompDep:SharedObject/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/StateMeta/; +$ref_files{$key} = "$dir".q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/Timekeeping/; +$ref_files{$key} = "$dir".q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/TransferGeom/; +$ref_files{$key} = "$dir".q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/api_NUOPC_SCRIPWrite/; +$ref_files{$key} = "$dir".q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/componentDep/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/connection_options/; +$ref_files{$key} = "$dir".q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/fd:default/; +$ref_files{$key} = "$dir".q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/fd:docfile/; +$ref_files{$key} = "$dir".q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/field_dictionary/; +$ref_files{$key} = "$dir".q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:NUOPCGenericComp/; +$ref_files{$key} = "$dir".q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:NUOPCRunSequence/; +$ref_files{$key} = "$dir".q|node7.html|; +$noresave{$key} = "$nosave"; + +1; + diff --git a/docs/nightly/fix/reconcile-info/NUOPC_refdoc/labels.pl b/docs/nightly/fix/reconcile-info/NUOPC_refdoc/labels.pl new file mode 100644 index 000000000..8c6730788 --- /dev/null +++ b/docs/nightly/fix/reconcile-info/NUOPC_refdoc/labels.pl @@ -0,0 +1,449 @@ +# LaTeX2HTML 2018 (Released Feb 1, 2018) +# Associate labels original text with physical files. + + +$key = q/AdvancedResourceControl/; +$external_labels{$key} = "$URL/" . q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/Checker/; +$external_labels{$key} = "$URL/" . q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/Compliance/; +$external_labels{$key} = "$URL/" . q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/ComponentHierarchy/; +$external_labels{$key} = "$URL/" . q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/ConnectorCompMeta/; +$external_labels{$key} = "$URL/" . q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/CplSets/; +$external_labels{$key} = "$URL/" . q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/DataDepInit/; +$external_labels{$key} = "$URL/" . q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/DriverCompMeta/; +$external_labels{$key} = "$URL/" . q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/Explorer/; +$external_labels{$key} = "$URL/" . q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/ExternalInterface/; +$external_labels{$key} = "$URL/" . q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/FieldMeta/; +$external_labels{$key} = "$URL/" . q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/FieldMirror/; +$external_labels{$key} = "$URL/" . q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/FieldPairing/; +$external_labels{$key} = "$URL/" . q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/IPD/; +$external_labels{$key} = "$URL/" . q|node8.html|; +$noresave{$key} = "$nosave"; + +$key = q/MediatorCompMeta/; +$external_labels{$key} = "$URL/" . q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/Metadata/; +$external_labels{$key} = "$URL/" . q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/ModelCompMeta/; +$external_labels{$key} = "$URL/" . q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/NUOPC_AddNestedState/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/NUOPC_AdvertiseField/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/NUOPC_AdvertiseFields/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/NUOPC_Connector/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/NUOPC_CplCompAttributeIng/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/NUOPC_CplCompAttributeIngHC/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/NUOPC_Driver/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/NUOPC_GridCompAttributeIng/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/NUOPC_GridCompAttributeIngHC/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/NUOPC_GridCompSetClock/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/NUOPC_Mediator/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/NUOPC_Model/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/NUOPC_ModelBase/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/NUOPC_RealizeCompleteG/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/NUOPC_RealizeCompleteLS/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/NUOPC_RealizeCompleteM/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/NUOPC_RealizeField/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/NUOPC_RealizeTransfer/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/Namespaces/; +$external_labels{$key} = "$URL/" . q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/PhaseMaps/; +$external_labels{$key} = "$URL/" . q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/Sharing/; +$external_labels{$key} = "$URL/" . q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/StandardCompDep:C/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/StandardCompDep:CompOnComp/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/StandardCompDep:FortranSharedLib/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/StandardCompDep:FortranStatic/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/StandardCompDep:SharedObject/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/StateMeta/; +$external_labels{$key} = "$URL/" . q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/Timekeeping/; +$external_labels{$key} = "$URL/" . q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/TransferGeom/; +$external_labels{$key} = "$URL/" . q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/api_NUOPC_SCRIPWrite/; +$external_labels{$key} = "$URL/" . q|node4.html|; +$noresave{$key} = "$nosave"; + +$key = q/componentDep/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/connection_options/; +$external_labels{$key} = "$URL/" . q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/fd:default/; +$external_labels{$key} = "$URL/" . q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/fd:docfile/; +$external_labels{$key} = "$URL/" . q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/field_dictionary/; +$external_labels{$key} = "$URL/" . q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:NUOPCGenericComp/; +$external_labels{$key} = "$URL/" . q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:NUOPCRunSequence/; +$external_labels{$key} = "$URL/" . q|node7.html|; +$noresave{$key} = "$nosave"; + +1; + + +# LaTeX2HTML 2018 (Released Feb 1, 2018) +# labels from external_latex_labels array. + + +$key = q/AdvancedResourceControl/; +$external_latex_labels{$key} = q|2.7|; +$noresave{$key} = "$nosave"; + +$key = q/Checker/; +$external_latex_labels{$key} = q|5.1|; +$noresave{$key} = "$nosave"; + +$key = q/Compliance/; +$external_latex_labels{$key} = q|5|; +$noresave{$key} = "$nosave"; + +$key = q/ComponentHierarchy/; +$external_latex_labels{$key} = q|2.6|; +$noresave{$key} = "$nosave"; + +$key = q/ConnectorCompMeta/; +$external_latex_labels{$key} = q|2.3.4|; +$noresave{$key} = "$nosave"; + +$key = q/CplSets/; +$external_latex_labels{$key} = q|2.4.4|; +$noresave{$key} = "$nosave"; + +$key = q/DataDepInit/; +$external_latex_labels{$key} = q|2.4.6|; +$noresave{$key} = "$nosave"; + +$key = q/DriverCompMeta/; +$external_latex_labels{$key} = q|2.3.1|; +$noresave{$key} = "$nosave"; + +$key = q/Explorer/; +$external_latex_labels{$key} = q|5.2|; +$noresave{$key} = "$nosave"; + +$key = q/ExternalInterface/; +$external_latex_labels{$key} = q|2.8|; +$noresave{$key} = "$nosave"; + +$key = q/FieldMeta/; +$external_latex_labels{$key} = q|2.3.6|; +$noresave{$key} = "$nosave"; + +$key = q/FieldMirror/; +$external_latex_labels{$key} = q|2.4.9|; +$noresave{$key} = "$nosave"; + +$key = q/FieldPairing/; +$external_latex_labels{$key} = q|2.4.2|; +$noresave{$key} = "$nosave"; + +$key = q/IPD/; +$external_latex_labels{$key} = q|7|; +$noresave{$key} = "$nosave"; + +$key = q/MediatorCompMeta/; +$external_latex_labels{$key} = q|2.3.3|; +$noresave{$key} = "$nosave"; + +$key = q/Metadata/; +$external_latex_labels{$key} = q|2.3|; +$noresave{$key} = "$nosave"; + +$key = q/ModelCompMeta/; +$external_latex_labels{$key} = q|2.3.2|; +$noresave{$key} = "$nosave"; + +$key = q/NUOPC_AddNestedState/; +$external_latex_labels{$key} = q|3.9.2|; +$noresave{$key} = "$nosave"; + +$key = q/NUOPC_AdvertiseField/; +$external_latex_labels{$key} = q|3.9.3|; +$noresave{$key} = "$nosave"; + +$key = q/NUOPC_AdvertiseFields/; +$external_latex_labels{$key} = q|3.9.4|; +$noresave{$key} = "$nosave"; + +$key = q/NUOPC_Connector/; +$external_latex_labels{$key} = q|3.5|; +$noresave{$key} = "$nosave"; + +$key = q/NUOPC_CplCompAttributeIng/; +$external_latex_labels{$key} = q|3.6.16|; +$noresave{$key} = "$nosave"; + +$key = q/NUOPC_CplCompAttributeIngHC/; +$external_latex_labels{$key} = q|3.6.18|; +$noresave{$key} = "$nosave"; + +$key = q/NUOPC_Driver/; +$external_latex_labels{$key} = q|3.1|; +$noresave{$key} = "$nosave"; + +$key = q/NUOPC_GridCompAttributeIng/; +$external_latex_labels{$key} = q|3.6.15|; +$noresave{$key} = "$nosave"; + +$key = q/NUOPC_GridCompAttributeIngHC/; +$external_latex_labels{$key} = q|3.6.17|; +$noresave{$key} = "$nosave"; + +$key = q/NUOPC_GridCompSetClock/; +$external_latex_labels{$key} = q|3.6.38|; +$noresave{$key} = "$nosave"; + +$key = q/NUOPC_Mediator/; +$external_latex_labels{$key} = q|3.4|; +$noresave{$key} = "$nosave"; + +$key = q/NUOPC_Model/; +$external_latex_labels{$key} = q|3.3|; +$noresave{$key} = "$nosave"; + +$key = q/NUOPC_ModelBase/; +$external_latex_labels{$key} = q|3.2|; +$noresave{$key} = "$nosave"; + +$key = q/NUOPC_RealizeCompleteG/; +$external_latex_labels{$key} = q|3.9.22|; +$noresave{$key} = "$nosave"; + +$key = q/NUOPC_RealizeCompleteLS/; +$external_latex_labels{$key} = q|3.9.23|; +$noresave{$key} = "$nosave"; + +$key = q/NUOPC_RealizeCompleteM/; +$external_latex_labels{$key} = q|3.9.24|; +$noresave{$key} = "$nosave"; + +$key = q/NUOPC_RealizeField/; +$external_latex_labels{$key} = q|3.9.25|; +$noresave{$key} = "$nosave"; + +$key = q/NUOPC_RealizeTransfer/; +$external_latex_labels{$key} = q|3.9.26|; +$noresave{$key} = "$nosave"; + +$key = q/Namespaces/; +$external_latex_labels{$key} = q|2.4.3|; +$noresave{$key} = "$nosave"; + +$key = q/PhaseMaps/; +$external_latex_labels{$key} = q|2.4.1|; +$noresave{$key} = "$nosave"; + +$key = q/Sharing/; +$external_latex_labels{$key} = q|2.4.8|; +$noresave{$key} = "$nosave"; + +$key = q/StandardCompDep:C/; +$external_latex_labels{$key} = q|4.5|; +$noresave{$key} = "$nosave"; + +$key = q/StandardCompDep:CompOnComp/; +$external_latex_labels{$key} = q|4.4|; +$noresave{$key} = "$nosave"; + +$key = q/StandardCompDep:FortranSharedLib/; +$external_latex_labels{$key} = q|4.2|; +$noresave{$key} = "$nosave"; + +$key = q/StandardCompDep:FortranStatic/; +$external_latex_labels{$key} = q|4.1|; +$noresave{$key} = "$nosave"; + +$key = q/StandardCompDep:SharedObject/; +$external_latex_labels{$key} = q|4.3|; +$noresave{$key} = "$nosave"; + +$key = q/StateMeta/; +$external_latex_labels{$key} = q|2.3.5|; +$noresave{$key} = "$nosave"; + +$key = q/Timekeeping/; +$external_latex_labels{$key} = q|2.5|; +$noresave{$key} = "$nosave"; + +$key = q/TransferGeom/; +$external_latex_labels{$key} = q|2.4.7|; +$noresave{$key} = "$nosave"; + +$key = q/_/; +$external_latex_labels{$key} = q|<|; +$noresave{$key} = "$nosave"; + +$key = q/api_NUOPC_SCRIPWrite/; +$external_latex_labels{$key} = q|3.10.1|; +$noresave{$key} = "$nosave"; + +$key = q/componentDep/; +$external_latex_labels{$key} = q|4|; +$noresave{$key} = "$nosave"; + +$key = q/connection_options/; +$external_latex_labels{$key} = q|2.4.5|; +$noresave{$key} = "$nosave"; + +$key = q/fd:default/; +$external_latex_labels{$key} = q|2.2.2|; +$noresave{$key} = "$nosave"; + +$key = q/fd:docfile/; +$external_latex_labels{$key} = q|2.2.1|; +$noresave{$key} = "$nosave"; + +$key = q/field_dictionary/; +$external_latex_labels{$key} = q|2.2|; +$noresave{$key} = "$nosave"; + +$key = q/fig:NUOPCGenericComp/; +$external_latex_labels{$key} = q|1|; +$noresave{$key} = "$nosave"; + +$key = q/fig:NUOPCRunSequence/; +$external_latex_labels{$key} = q|2|; +$noresave{$key} = "$nosave"; + +1; + diff --git a/docs/nightly/fix/reconcile-info/NUOPC_refdoc/next.png b/docs/nightly/fix/reconcile-info/NUOPC_refdoc/next.png new file mode 100644 index 000000000..1628652aa Binary files /dev/null and b/docs/nightly/fix/reconcile-info/NUOPC_refdoc/next.png differ diff --git a/docs/nightly/fix/reconcile-info/NUOPC_refdoc/next_g.png b/docs/nightly/fix/reconcile-info/NUOPC_refdoc/next_g.png new file mode 100644 index 000000000..3c1c3f569 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/NUOPC_refdoc/next_g.png differ diff --git a/docs/nightly/fix/reconcile-info/NUOPC_refdoc/node1.html b/docs/nightly/fix/reconcile-info/NUOPC_refdoc/node1.html new file mode 100644 index 000000000..5b5034720 --- /dev/null +++ b/docs/nightly/fix/reconcile-info/NUOPC_refdoc/node1.html @@ -0,0 +1,467 @@ + + + + + +Contents + + + + + + + + + + + + + + + + + + + + +
+ +

+Contents +

+ + + + +

+
+esmf_support@ucar.edu +
+ + diff --git a/docs/nightly/fix/reconcile-info/NUOPC_refdoc/node2.html b/docs/nightly/fix/reconcile-info/NUOPC_refdoc/node2.html new file mode 100644 index 000000000..972cce519 --- /dev/null +++ b/docs/nightly/fix/reconcile-info/NUOPC_refdoc/node2.html @@ -0,0 +1,66 @@ + + + + + +1 Description + + + + + + + + + + + + + + + + + + + + + +

+1 Description +

+The NUOPC Layer is an add-on to the standard ESMF library. It consists of generic code of two different kinds: utility routines and generic components. The NUOPC Layer further implements a dictionary for standard field metadata. + +

+The utility routines are subroutines and functions that package frequently used calling sequences of ESMF methods into single calls. Unlike the pure ESMF API, which is very class centric, the utility routines of the NUOPC Layer often implement tasks that involve several ESMF classes. + +

+The generic components are provided in form of Fortran modules that implement GridComp and CplComp specific methods. Generic components are useful when implementing NUOPC compliant driver, model, mediator, or connector components. The provided generic components form a hierarchy that allows the developer to pick and choose the appropriate level of specification for a certain application. Depending on how specific the chosen level, generic components require more or less specialization to result in fully implemented components. +


+
+esmf_support@ucar.edu +
+ + diff --git a/docs/nightly/fix/reconcile-info/NUOPC_refdoc/node3.html b/docs/nightly/fix/reconcile-info/NUOPC_refdoc/node3.html new file mode 100644 index 000000000..422f3b8bc --- /dev/null +++ b/docs/nightly/fix/reconcile-info/NUOPC_refdoc/node3.html @@ -0,0 +1,2166 @@ + + + + + +2 Design and Implementation Notes + + + + + + + + + + + + + + + + + + + + + +Subsections + + + +
+ +

+2 Design and Implementation Notes +

+ +

+The NUOPC Layer is implemented in Fortran on top of the public ESMF Fortran API. + +

+The NUOPC utility routines form a very straightforward Fortran API, accessible through the NUOPC Fortran module. The interfaces only use native Fortran types and public ESMF derived types. In order to access the utility API of the NUOPC Layer, user code must include the following two use lines: + +

+

+  use ESMF
+  use NUOPC
+
+ +

+2.1 Generic Components +

+ +

+The NUOPC generic components are implemented as a collection of Fortran modules. Each module implements a single, well specified set of standard ESMF_GridComp or ESMF_CplComp methods. The nomenclature of the generic component modules starts with the NUOPC_ prefix and continues with the kind: Driver, Model, Mediator, or Connector. The four kinds of generic components implemented by the NUOPC Layer are: + +

+ +

    +
  • NUOPC_Driver - A generic driver component. It implements a child component harness, made of State and Component objects, that follows the NUOPC Common Model Architecture. It is specialized by plugging Model, Mediator, and Connector components into the harness. Driver components can be plugged into the harness to construct component hierarchies. The generic Driver initializes its child components according to a standard Initialization Phase Definition, and drives their Run() methods according a customizable run sequence. + +

    +

  • +
  • NUOPC_Model - A generic model component that wraps a model code so it is suitable to be plugged into a generic Driver component. + +

    +

  • +
  • NUOPC_Mediator - A generic mediator component that wraps custom coupling code (flux calculations, averaging, etc.) so it is suitable to be plugged into a generic Driver component. + +

    +

  • +
  • NUOPC_Connector - A generic component that implements Field matching based on metadata and executes simple transforms (Regrid and Redist). It can be plugged into a generic Driver component. + +

    +

  • +
+ +

+The user code accesses the desired generic component(s) by including a use line for each one. Each generic component defines a small set of public names that are made available to the user code through the use statement. At a minimum the SetServices method is made public. Some of the generic components define additional public routines and labels as part of their user interface. It is recommended to rename entries of an imported generic component module, such as SetServices, in the local scope as part of the use association to prevent potential name clashes. + +

+

+  use NUOPC_<GenericComp>, &
+    <GenericComp>SS      => SetServices
+
+ +

+A generic component is used by user code to implement a specialized version of the generic component. The user component derives from the generic component code by implementing its own public SetServices routine that calls into the generic SetServices routine via the NUOPC_CompDerive() method. +Typically this should be the first call made before doing anything else. It is through this mechanism that the deriving component inherits functionality that is implemented in the generic component. The example below shows how a specific model component is implemented, deriving from the generic NUOPC_Model: + +

+

+  use NUOPC_Model, &
+    modelSS => SetServices
+
+  subroutine SetServices(model, rc)
+    type(ESMF_GridComp)  :: model
+    integer, intent(out) :: rc
+
+    ! derive from NUOPC_Model
+    call NUOPC_CompDerive(model, modelSS, rc=rc)
+
+    ! specialize model
+    !... calls to NUOPC_CompSpecialize() here
+    
+  end subroutine
+
+ +

+ +

+2.1.1 Component Specialization +

+ +

+After the call to NUOPC_CompDerive() in a component's SetServices() method, the component is connected to all of the generic code provided by NUOPC for the respective component kind. In order to function properly, e.g. as an atmosphere model, ocean model, driver, etc., the component must be specialized. + +

+The NUOPC_CompSpecialize() method is used to link specific user provided routines to pre-defined NUOPC specialization points. The labels of the pre-defined specialization points are use associated named constants made available by the respective generic component module. The naming of all pre-defined specialization labels starts with the label_ prefix, and is followed by a short intent of the specialization. E.g. label_Advertise refers to the specialization point responsible for advertising Fields in the import- and exportStates of the component. + +

+There are pre-defined specialization labels for Initialize, Run, and Finalize phases. Section 2.4.1 discusses the semantic labeling of specializations in greater detail. Lists of all pre-defined specialization labels for Initialize, Run, and Finalize, for each of the generic NUOPC component kinds, are provided at the beginning of the respective API sections. (Driver: 3.1, Model: 3.3, Mediator: 3.4, Connector: 3.5) + +

+The following code snippet shows a full specialization of NUOPC_Model, using three specialization labels: + +

+

+  use NUOPC_Model, &
+    modelSS => SetServices
+
+  subroutine SetServices(model, rc)
+    type(ESMF_GridComp)  :: model
+    integer, intent(out) :: rc
+
+    rc = ESMF_SUCCESS
+
+    ! derive from NUOPC_Model
+    call NUOPC_CompDerive(model, modelSS, rc=rc)
+    if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, &
+      line=__LINE__, &
+      file=__FILE__)) &
+      return  ! bail out
+
+    ! specialize model
+    call NUOPC_CompSpecialize(model, specLabel=label_Advertise, &
+      specRoutine=Advertise, rc=rc)
+    if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, &
+      line=__LINE__, &
+      file=__FILE__)) &
+      return  ! bail out
+    call NUOPC_CompSpecialize(model, specLabel=label_RealizeProvided, &
+      specRoutine=Realize, rc=rc)
+    if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, &
+      line=__LINE__, &
+      file=__FILE__)) &
+      return  ! bail out
+    call NUOPC_CompSpecialize(model, specLabel=label_Advance, &
+      specRoutine=Advance, rc=rc)
+    if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, &
+      line=__LINE__, &
+      file=__FILE__)) &
+      return  ! bail out
+
+  end subroutine
+
+ +

+The user implemented specialization routines must follow the NUOPC interface definition. + +

+

+  subroutine SpecRoutine(comp, rc)
+    type(ESMF_*Comp)      :: comp
+    integer, intent(out)  :: rc
+  end subroutine
+
+ +

+Here type(ESMF_*Comp) either corresponds to type(ESMF_GridComp) for Models, Mediators, and Drivers, or type(ESMF_CplComp) for Connectors. + +

+ +

+2.1.2 Partial Specialization +

+ +

+Components that are derived from a generic component may choose to only specialize certain aspects, leaving other aspects unspecified. This allows a hierarchy of generic components to be implemented with a high degree of code re-use. The variable level of specialization supports the very differing user needs. Figure 1 depicts the inheritance structure of the standard generic components implemented by the NUOPC Layer. There are two trees, one is rooted in ESMF_GridComp, while the other is rooted in ESMF_CplComp. + +

+ +

+ + + +
Figure 1: +The NUOPC Generic Component inheritance structure. The tree on the left is rooted in ESMF_GridComp, while the tree on the right is rooted in ESMF_CplComp. The ESMF data types are shown in green. The four main NUOPC Generic Component kinds are shown in dark blue boxes. The yellow box shows a partial specialization in the inheritance tree.
+
+
+
+
+
+ +\scalebox{0.6}{\includegraphics{NUOPC_GC}} +
+
+ +

+ +

+ + +
+2.2 Field Dictionary +

+ +

+The NUOPC Layer uses standard metadata on Fields to guide the decision making process that is implemented in generic code. The generic NUOPC_Connector component, for instance, uses the StandardName Attribute to construct a list of matching Fields between the import and export States. The NUOPC Field Dictionary provides a software implementation of a controlled vocabulary for the StandardName Field Attribute. It also associates each registered StandardName with CanonicalUnits. Currently the NUOPC Layer uses the CanonicalUnits entry to verify that Fields are provided in their canonical units. In the future, this entry may help support automatic unit conversion among exchanged fields. + +

+The NUOPC Field Dictionary is set up by loading its content from a YAML 1.2 +file. See section 2.2.1 for details. + +

+Users can extend the dictionary by adding entries (field definitions or synonyms) to the YAML file, or by calling the NUOPC_FieldDictionaryAddEntry() interface. + +

+ +

+ +
+2.2.1 Field Dictionary file +

+ +

+In a given NUOPC application, the NUOPC Field Dictionary can be set up by calling the NUOPC_FieldDictionarySetup() method to read in a properly-formatted YAML file. This feature is intended to improve the interoperability of codes that use the NUOPC Layer, as it allows a broader scientific community to contribute to the growth and upkeep of a common NUOPC Field Dictionary file shared among different Earth System Models. At this time, an initial version of the NUOPC Field Dictionary file is available through the dedicated GitHub repository: https://github.com/ESCOMP/NUOPCFieldDictionary, hosted within the Earth System Community Modeling Portal (ESCOMP). + +

+A NUOPC Field Dictionary YAML file is codified as a YAML map (an unordered association of unique keys to values) with only one key: field_dictionary. The value associated with this key is itself a YAML map that should include the mandatory key entries (pointing to the complete set of dictionary entries), and may include the optional keys: version_number, last_modified, institution, contact, source, and description. These optional keys are intended to hold information about the file itself and are currently ignored by the NUOPC Layer. + +

+Entries in the NUOPC Field dictionary are organized as YAML lists of maps. List items under the entries keyword must be indented and preceded with a hyphen (-). + +

+A dictionary entry fully defines a Field if it includes both the standard_name and canonical_units keys and their associated values. This entry may also include a brief narrative describing the Field, stored as the value of the optional key description. + +

+Synonyms can be defined by adding separate entries that include both the alias key, associated with either a single synonym (YAML scalar, e.g. alias: <name>) or a comma-separated list of synonyms within square brackets (YAML flow sequence, e.g. alias: [<name1>, <name2>, ...]), and the standard_name key associated with the original Field name to be substituted. The original Field name must be fully defined in the dictionary file. While adding one alias keyword to a Field definition dictionary entry is allowed and will be parsed by the NUOPC Layer, it is recommended that all synonyms be included as separate entries. + +

+A NUOPC Field dictionary sample file is included below. + +

+

+field_dictionary:
+    version_number: 0.0.1
+    last_modified:  2018-03-14T11:01:19Z
+    institution:    National ESPC, CSC & MCL Working Groups
+    contact:        esmf_support@ucar.edu
+
+    source:         https://github.com/ESCOMP/NUOPCFieldDictionary
+    description:    Community-based dictionary for shared coupling fields
+
+    entries:
+      - standard_name: air_pressure
+        canonical_units: Pa
+        description: Air pressure
+      - standard_name: air_temperature
+        canonical_units: K
+        description:
+          Bulk temperature of the air,
+          not the surface (skin) temperature
+      - alias: p
+        standard_name: air_pressure
+      - alias: [ t, temp ]
+        standard_name: air_temperature
+
+ +

+ +

+ +
+2.2.2 Preloaded Field Dictionary +

+ +

+A version of the NUOPC Field Dictionary is preloaded by the NUOPC Layer at start-up, and, at this time, consists of the entries show in the table below. The value of the StandardName Attribute in each of these entries complies with the Climate and Forecast (CF) conventions guidelines. + +

+ +

+ +

+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
StandardNameCanonicalUnits
air_pressure_at_sea_levelPa
magnitude_of_surface_downward_stressPa
precipitation_fluxkg m-2 s-1
sea_surface_height_above_sea_levelm
sea_surface_salinity1e-3
sea_surface_temperatureK
surface_downward_eastward_stressPa
surface_downward_heat_flux_in_airW m-2
surface_downward_northward_stressPa
surface_downward_water_fluxkg m-2 s-1
surface_eastward_sea_water_velocitym s-1
surface_net_downward_longwave_fluxW m-2
surface_net_downward_shortwave_fluxW m-2
surface_northward_sea_water_velocitym s-1
+ +

+ + +

+2.3 Metadata +

+ +

+The NUOPC Layer makes extensive use of the ESMF Attribute class to implement metadata on Components, States, and Fields. ESMF Attribute Packages (or AttPacks for short) are used to build an Attribute hierarchy for each object. + +

+In some cases the lowest level NUOPC AttPack contains a nested AttPack defined by ESMF. For all objects, the highest level of the NUOPC AttPack hierarchy is implemented with convention="NUOPC", purpose="Instance". The public NUOPC Layer API allows a user to add Attributes to the highest AttPack hierarchy level. + +

+2.3.1 Driver Component Metadata +

+The Driver Component metadata is implemented through ESMF_Info. It can be accessed +using the JSON Pointer "/NUOPC/Instance/" prefix followed by the "Attribute name" +as per the table below. E.g. "Verbosity" is accessed using key="/NUOPC/Instance/Verbosity". + +

+Note that some of the Attribute names in the following table are longer than the table column width. In these cases the +Attribute name had to be broken into multiple lines. When that happens, a hyphen shows up to indicate the line break. The hyphen +is not part of the Attribute name! + +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Attribute nameDefinitionControlled vocabulary
KindString value indicating component kind.Driver
VerbosityString value, converted into an integer, and interpreted as a bit field. The lower 16 bits (0-15) are reserved to control verbosity of the generic component implementation. Higher bits are available for user level verbosity control.
+ bit 0: Intro/Extro of methods with indentation. +
+ bit 1: Intro/Extro with memory info. +
+ bit 2: Intro/Extro with garbage collection info. +
+ bit 3: Intro/Extro with local VM info. +
+ bit 4: Intro/Extro with ImportState info. +
+ bit 5: Intro/Extro with ExportState info. +
+ bit 6: Log hierarchy protocol details. +
+ bit 8: Log Initialize phase with $>>>$, $<<<$, and currTime. +
+ bit 9: Log Run phase with $>>>$, $<<<$, and currTime. +
+ bit 10: Log Finalize phase with $>>>$, $<<<$, and currTime. +
+ bit 11: Log info about data dependency during initialize resolution. +
+ bit 12: Log run sequence execution. +
+ bit 13: Log Component creation and destruction. +
+ bit 14: Log State creation and destruction.
0, 1, 2, ...
+ "off" = 0 (default),
+ "low": some verbosity, bits: 0, 8, 9, 10, 13 +
+ "high": more verbosity, bits: 0, 4, 5, 6, 8, 9, 10, 11, 12, 13, 14 +
+ "max": all lower 16 bits
ProfilingString value, converted into an integer, and interpreted as a bit field. The lower 16 bits (0-15) are reserved to control profiling of the generic component implementation. Higher bits are available for user level profiling control.
+ bit 0: Top level profiling of Initialize phases. +
+ bit 1: Specialization point profiling of Initialize phases. +
+ bit 2: Additional profiling of internals of Initialize phases. +
+ bit 3: Top level profiling of Run phases. +
+ bit 4: Specialization point profiling of Run phases. +
+ bit 5: Additional profiling of internals of Run phases. +
+ bit 6: Top level profiling of Finalize phases. +
+ bit 7: Specialization point profiling of Finalize phases. +
+ bit 8: Additional profiling of internals of Finalize phases. +
+ bit 9: Leading barrier for Initialize phases. +
+ bit 10: Leading barrier for Run phases. +
+ bit 11: Leading barrier for Finalize phases. +
+ bit 12: Run sequence iteration events. +
0, 1, 2, ...
+ "off" = 0 (default),
+ "low": Top level profiling.
+ "high": Top level, specialization point profiling, and additional profiling of internals.
+ "max": All lower 16 bits set.
CompLabelString value holding the label under which the component was added to its parent driver.no restriction
InitializePhaseMapList of string values, mapping the logical NUOPC initialize phases, of a specific Initialize Phase Definition (IPD) version, to the actual ESMF initialize phase number under which the entry point is registered.IPDvXXpY=Z, where XX = two-digit revision number, e.g. 01, Y = logical NUOPC phase number, Z = actual ESMF phase number, with Y, Z > 0 and Y, Z < 10
RunPhaseMapList of string values, mapping the logical NUOPC run phases to the actual ESMF run phase number under which the entry point is registered.label-string=Z, where label-string can be chosen freely, and Z = actual ESMF phase number.
FinalizePhaseMapList of string values, mapping the logical NUOPC finalize phases to the actual ESMF finalize phase number under which the entry point is registered.label-string=Z, where label-string can be chosen freely, and Z = actual ESMF phase number.
InternalInitializePhaseMapList of string values, mapping the logical NUOPC initialize phases, of a specific Initialize Phase Definition (IPD) version, to the actual ESMF initialize phase number under which the entry point is registered.IPDvXXpY=Z, where XX = two-digit revision number, e.g. 01, Y = logical NUOPC phase number, Z = actual ESMF phase number, with Y, Z > 0 and Y, Z < 10
NestingGenerationInteger value enumerating nesting level.0, 1, 2, ...
NestlingInteger value enumerating siblings within the same generation.0, 1, 2, ...
InitializeDataResolutionString value indicating whether the resolution loop is disabled or enabled.false, true
InitializeDataCompleteString value indicating whether all initialize data dependencies have been satisfied.false, true
InitializeDataProgressString value indicating whether progress is being made resolving initialize data dependencies.false, true
HierarchyProtocolString value specifying the hierarchy protocol."PushUpAllExportsAndUnsatisfiedImports" - activates field mirroring of all exports and unsatisfied imports. By default use reference sharing for the mirrored fields and geom objects. This is the default behavior without having HierarchyProtocol set. "ConnectProvidedFields"- no field mirroring, only connect to externally provided fields in the import- and exportStates. "Explorer" - like the default, but do not use reference sharing. All other values currently disable the hierarchy protocol.
+ +

+2.3.2 Model Component Metadata +

+The Model Component metadata is implemented through ESMF_Info. It can be accessed +using the JSON Pointer "/NUOPC/Instance/" prefix followed by the "Attribute name" +as per the table below. E.g. "Verbosity" is accessed using key="/NUOPC/Instance/Verbosity". + +

+Note that some of the Attribute names in the following table are longer than the table column width. In these cases the +Attribute name had to be broken into multiple lines. When that happens, a hyphen shows up to indicate the line break. The hyphen +is not part of the Attribute name! + +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Attribute nameDefinitionControlled vocabulary
KindString value indicating component kind.Model
VerbosityString value, converted into an integer, and interpreted as a bit field. The lower 16 bits (0-15) are reserved to control verbosity of the generic component implementation. Higher bits are available for user level verbosity control.
+ bit 0: Intro/Extro of methods with indentation. +
+ bit 1: Intro/Extro with memory info. +
+ bit 2: Intro/Extro with garbage collection info. +
+ bit 3: Intro/Extro with local VM info. +
+ bit 4: Intro/Extro with ImportState info. +
+ bit 5: Intro/Extro with ExportState info. +
+ bit 8: Log Initialize phase with $>>>$, $<<<$, and currTime. +
+ bit 9: Log Run phase with $>>>$, $<<<$, and currTime. +
+ bit 10: Log Finalize phase with $>>>$, $<<<$, and currTime. +
+ bit 11: Log info about data dependency during initialize resolution. +
+ bit 12: Log run sequence execution.
0, 1, 2, ...
+ "off" = 0 (default),
+ "low": some verbosity, bits: 0, 8, 9, 10, 13 +
+ "high": more verbosity, bits: 0, 4, 5, 8, 9, 10, 11, 12, 13, 14 +
+ "max": all lower 16 bits
ProfilingString value, converted into an integer, and interpreted as a bit field. The lower 16 bits (0-15) are reserved to control profiling of the generic component implementation. Higher bits are available for user level profiling control.
+ bit 0: Top level profiling of Initialize phases. +
+ bit 1: Specialization point profiling of Initialize phases. +
+ bit 2: Additional profiling of internals of Initialize phases. +
+ bit 3: Top level profiling of Run phases. +
+ bit 4: Specialization point profiling of Run phases. +
+ bit 5: Additional profiling of internals of Run phases. +
+ bit 6: Top level profiling of Finalize phases. +
+ bit 7: Specialization point profiling of Finalize phases. +
+ bit 8: Additional profiling of internals of Finalize phases. +
+ bit 9: Leading barrier for Initialize phases. +
+ bit 10: Leading barrier for Run phases. +
+ bit 11: Leading barrier for Finalize phases. +
0, 1, 2, ...
+ "off" = 0 (default),
+ "low": Top level profiling.
+ "high": Top level, specialization point profiling, and additional profiling of internals.
+ "max": All lower 16 bits set.
DiagnosticString value, converted into an integer, and interpreted as a bit field. The lower 16 bits (0-15) are reserved to control diagnostic of the generic component implementation. Higher bits are available for user level diagnostic control.
+ bit 0: Dump fields of the importState on entering Initialize phases. +
+ bit 1: Dump fields of the exportState on entering Initialize phases. +
+ bit 2: Dump fields of the importState on exiting Initialize phases. +
+ bit 3: Dump fields of the exportState on exiting Initialize phases. +
+ bit 4: Dump fields of the importState on entering Run phases. +
+ bit 5: Dump fields of the exportState on entering Run phases. +
+ bit 6: Dump fields of the importState on exiting Run phases. +
+ bit 7: Dump fields of the exportState on exiting Run phases. +
+ bit 8: Dump fields of the importState on entering Finalize phases. +
+ bit 9: Dump fields of the exportState on entering Finalize phases. +
+ bit 10: Dump fields of the importState on exiting Finalize phases. +
+ bit 11: Dump fields of the exportState on exiting Finalize phases.
0, 1, 2, ...
+ "off" = 0 (default),
+ "max": All lower 16 bits set.
CompLabelString value holding the label under which the component was added to its parent driver.no restriction
InitializePhaseMapList of string values, mapping the logical NUOPC initialize phases, of a specific Initialize Phase Definition (IPD) version, to the actual ESMF initialize phase number under which the entry point is registered.IPDvXXpY=Z, where XX = two-digit revision number, e.g. 01, Y = logical NUOPC phase number, Z = actual ESMF phase number, with Y, Z > 0 and Y, Z < 10
RunPhaseMapList of string values, mapping the logical NUOPC run phases to the actual ESMF run phase number under which the entry point is registered.label-string=Z, where label-string can be chosen freely, and Z = actual ESMF phase number.
FinalizePhaseMapList of string values, mapping the logical NUOPC finalize phases to the actual ESMF finalize phase number under which the entry point is registered.label-string=Z, where label-string can be chosen freely, and Z = actual ESMF phase number.
InternalInitializePhaseMapList of string values, mapping the logical NUOPC initialize phases, of a specific Initialize Phase Definition (IPD) version, to the actual ESMF initialize phase number under which the entry point is registered.IPDvXXpY=Z, where XX = two-digit revision number, e.g. 01, Y = logical NUOPC phase number, Z = actual ESMF phase number, with Y, Z > 0 and Y, Z < 10
NestingGenerationInteger value enumerating nesting level.0, 1, 2, ...
NestlingInteger value enumerating siblings within the same generation.0, 1, 2, ...
InitializeDataCompleteString value indicating whether all initialize data dependencies have been satisfied.false, true
InitializeDataProgressString value indicating whether progress is being made resolving initialize data dependencies.false, true
HierarchyProtocolString value specifying the hierarchy protocol."PushUpAllExportsAndUnsatisfiedImports" for field mirroring and connecting, "ConnectProvidedFields" to only connect provided fields (no mirroring), All other values currently disable the hierarchy protocol.
+ +

+2.3.3 Mediator Component Metadata +

+The Mediator Component metadata is implemented through ESMF_Info. It can be accessed +using the JSON Pointer "/NUOPC/Instance/" prefix followed by the "Attribute name" +as per the table below. E.g. "Verbosity" is accessed using key="/NUOPC/Instance/Verbosity". + +

+Note that some of the Attribute names in the following table are longer than the table column width. In these cases the +Attribute name had to be broken into multiple lines. When that happens, a hyphen shows up to indicate the line break. The hyphen +is not part of the Attribute name! + +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Attribute nameDefinitionControlled vocabulary
KindString value indicating component kind.Mediator
VerbosityString value, converted into an integer, and interpreted as a bit field. The lower 16 bits (0-15) are reserved to control verbosity of the generic component implementation. Higher bits are available for user level verbosity control.
+ bit 0: Intro/Extro of methods with indentation. +
+ bit 1: Intro/Extro with memory info. +
+ bit 2: Intro/Extro with garbage collection info. +
+ bit 3: Intro/Extro with local VM info. +
+ bit 4: Intro/Extro with ImportState info. +
+ bit 5: Intro/Extro with ExportState info. +
+ bit 8: Log Initialize phase with $>>>$, $<<<$, and currTime. +
+ bit 9: Log Run phase with $>>>$, $<<<$, and currTime. +
+ bit 10: Log Finalize phase with $>>>$, $<<<$, and currTime. +
+ bit 11: Log info about data dependency during initialize resolution. +
+ bit 12: Log run sequence execution.
0, 1, 2, ...
+ "off" = 0 (default),
+ "low": some verbosity, bits: 0, 8, 9, 10, 13 +
+ "high": more verbosity, bits: 0, 4, 5, 8, 9, 10, 11, 12, 13, 14 +
+ "max": all lower 16 bits
ProfilingString value, converted into an integer, and interpreted as a bit field. The lower 16 bits (0-15) are reserved to control profiling of the generic component implementation. Higher bits are available for user level profiling control.
+ bit 0: Top level profiling of Initialize phases. +
+ bit 1: Specialization point profiling of Initialize phases. +
+ bit 2: Additional profiling of internals of Initialize phases. +
+ bit 3: Top level profiling of Run phases. +
+ bit 4: Specialization point profiling of Run phases. +
+ bit 5: Additional profiling of internals of Run phases. +
+ bit 6: Top level profiling of Finalize phases. +
+ bit 7: Specialization point profiling of Finalize phases. +
+ bit 8: Additional profiling of internals of Finalize phases. +
+ bit 9: Leading barrier for Initialize phases. +
+ bit 10: Leading barrier for Run phases. +
+ bit 11: Leading barrier for Finalize phases. +
0, 1, 2, ...
+ "off" = 0 (default),
+ "low": Top level profiling.
+ "high": Top level, specialization point profiling, and additional profiling of internals.
+ "max": All lower 16 bits set.
DiagnosticString value, converted into an integer, and interpreted as a bit field. The lower 16 bits (0-15) are reserved to control diagnostic of the generic component implementation. Higher bits are available for user level diagnostic control.
+ bit 0: Dump fields of the importState on entering Initialize phases. +
+ bit 1: Dump fields of the exportState on entering Initialize phases. +
+ bit 2: Dump fields of the importState on exiting Initialize phases. +
+ bit 3: Dump fields of the exportState on exiting Initialize phases. +
+ bit 4: Dump fields of the importState on entering Run phases. +
+ bit 5: Dump fields of the exportState on entering Run phases. +
+ bit 6: Dump fields of the importState on exiting Run phases. +
+ bit 7: Dump fields of the exportState on exiting Run phases. +
+ bit 8: Dump fields of the importState on entering Finalize phases. +
+ bit 9: Dump fields of the exportState on entering Finalize phases. +
+ bit 10: Dump fields of the importState on exiting Finalize phases. +
+ bit 11: Dump fields of the exportState on exiting Finalize phases.
0, 1, 2, ...
+ "off" = 0 (default),
+ "max": All lower 16 bits set.
CompLabelString value holding the label under which the component was added to its parent driver.no restriction
InitializePhaseMapList of string values, mapping the logical NUOPC initialize phases, of a specific Initialize Phase Definition (IPD) version, to the actual ESMF initialize phase number under which the entry point is registered.IPDvXXpY=Z, where XX = two-digit revision number, e.g. 01, Y = logical NUOPC phase number, Z = actual ESMF phase number, with Y, Z > 0 and Y, Z < 10
RunPhaseMapList of string values, mapping the logical NUOPC run phases to the actual ESMF run phase number under which the entry point is registered.label-string=Z, where label-string can be chosen freely, and Z = actual ESMF phase number.
FinalizePhaseMapList of string values, mapping the logical NUOPC finalize phases to the actual ESMF finalize phase number under which the entry point is registered.label-string=Z, where label-string can be chosen freely, and Z = actual ESMF phase number.
InternalInitializePhaseMapList of string values, mapping the logical NUOPC initialize phases, of a specific Initialize Phase Definition (IPD) version, to the actual ESMF initialize phase number under which the entry point is registered.IPDvXXpY=Z, where XX = two-digit revision number, e.g. 01, Y = logical NUOPC phase number, Z = actual ESMF phase number, with Y, Z > 0 and Y, Z < 10
NestingGenerationInteger value enumerating nesting level.0, 1, 2, ...
NestlingInteger value enumerating siblings within the same generation.0, 1, 2, ...
InitializeDataCompleteString value indicating whether all initialize data dependencies have been satisfied.false, true
InitializeDataProgressString value indicating whether progress is being made resolving initialize data dependencies.false, true
HierarchyProtocolString value specifying the hierarchy protocol."PushUpAllExportsAndUnsatisfiedImports" for field mirroring and connecting, "ConnectProvidedFields" to only connect provided fields (no mirroring), All other values currently disable the hierarchy protocol.
+ +

+2.3.4 Connector Component Metadata +

+The Connector Component metadata is implemented through ESMF_Info. It can be accessed +using the JSON Pointer "/NUOPC/Instance/" prefix followed by the "Attribute name" +as per the table below. E.g. "Verbosity" is accessed using key="/NUOPC/Instance/Verbosity". + +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Attribute nameDefinitionControlled vocabulary
KindString value indicating component kind.Connector
VerbosityString value, converted into an integer, and interpreted as a bit field. The lower 16 bits (0-15) are reserved to control verbosity of the generic component implementation. Higher bits are available for user level verbosity control.
+ bit 0: Intro/Extro of methods with indentation. +
+ bit 1: Intro/Extro with memory info. +
+ bit 2: Intro/Extro with garbage collection info. +
+ bit 3: Intro/Extro with local VM info. +
+ bit 4: Intro/Extro with ImportState info. +
+ bit 5: Intro/Extro with ExportState info. +
+ bit 8: Log FieldTransferPolicy. +
+ bit 9: Log bond level info. +
+ bit 10: Log CplList construction. +
+ bit 11: Log GeomObject Transfer. +
+ bit 12: Log looping over all elements in CplList for RouteHandle computation, FieldSharing, and Timestamp propagation. +
+ bit 13: Log Run phase with $>>>$, $<<<$, and currTime. +
+ bit 14: Log info about RouteHandle execution. +
+ bit 15: Log info about RouteHandle release.
0, 1, 2, ...
+ "off" = 0 (default),
+ "low": some verbosity, bits: 0, 13 +
+ "high": more verbosity, bits: 0, 4, 5, 8, 9, 10, 11, 12, 13, 14, 15 +
+ "max": all lower 16 bits
ProfilingString value, converted into an integer, and interpreted as a bit field. The lower 16 bits (0-15) are reserved to control profiling of the generic component implementation. Higher bits are available for user level profiling control.
+ bit 0: Top level profiling of Initialize phases. +
+ bit 1: Specialization point profiling of Initialize phases. +
+ bit 2: Additional profiling of internals of Initialize phases. +
+ bit 3: Top level profiling of Run phases. +
+ bit 4: Specialization point profiling of Run phases. +
+ bit 5: Additional profiling of internals of Run phases. +
+ bit 6: Top level profiling of Finalize phases. +
+ bit 7: Specialization point profiling of Finalize phases. +
+ bit 8: Additional profiling of internals of Finalize phases. +
+ bit 9: Leading barrier for Initialize phases. +
+ bit 10: Leading barrier for Run phases. +
+ bit 11: Leading barrier for Finalize phases. +
0, 1, 2, ...
+ "off" = 0 (default),
+ "low": Top level profiling.
+ "high": Top level, specialization point profiling, and additional profiling of internals.
+ "max": All lower 16 bits set.
DiagnosticString value, converted into an integer, and interpreted as a bit field. The lower 16 bits (0-15) are reserved to control diagnostic of the generic component implementation. Higher bits are available for user level diagnostic control.
+ bit 0: Dump fields of the importState on entering Initialize phases. +
+ bit 1: Dump fields of the exportState on entering Initialize phases. +
+ bit 2: Dump fields of the importState on exiting Initialize phases. +
+ bit 3: Dump fields of the exportState on exiting Initialize phases. +
+ bit 4: Dump fields of the importState on entering Run phases. +
+ bit 5: Dump fields of the exportState on entering Run phases. +
+ bit 6: Dump fields of the importState on exiting Run phases. +
+ bit 7: Dump fields of the exportState on exiting Run phases. +
+ bit 8: Dump fields of the importState on entering Finalize phases. +
+ bit 9: Dump fields of the exportState on entering Finalize phases. +
+ bit 10: Dump fields of the importState on exiting Finalize phases. +
+ bit 11: Dump fields of the exportState on exiting Finalize phases.
0, 1, 2, ...
+ "off" = 0 (default),
+ "max": All lower 16 bits set.
CompLabelString value holding the label under which the component was added to its parent driver.no restriction
InitializePhaseMapList of string values, mapping the logical NUOPC initialize phases, of a specific Initialize Phase Definition (IPD) version, to the actual ESMF initialize phase number under which the entry point is registered.IPDvXXpY=Z, where XX = two-digit revision number, e.g. 01, Y = logical NUOPC phase number, Z = actual ESMF phase number, with Y, Z > 0 and Y, Z < 10
RunPhaseMapList of string values, mapping the logical NUOPC run phases to the actual ESMF run phase number under which the entry point is registered.label-string=Z, where label-string can be chosen freely, and Z = actual ESMF phase number.
FinalizePhaseMapList of string values, mapping the logical NUOPC finalize phases to the actual ESMF finalize phase number under which the entry point is registered.label-string=Z, where label-string can be chosen freely, and Z = actual ESMF phase number.
CplListList of StandardNames of the connected Fields. Each StandardName entry may be followed by a colon separated list of connection options. The details are discussed in section 2.4.5Standard names as per field dictionary, followed by connection options defined in section 2.4.5.
CplSetListList of coupling sets. Each coupling set is identified by a string value.no restriction
ConnectionOptionsString value specifying the connection options to be applied to all the fields in the CplList by default.Connection options defined in section 2.4.5.
EpochThrottleInteger specifying the maximum number of outstanding EPOCH messages between any two PETs. The ESMF level default is 10.Any positive integer.
+ +

+2.3.5 State Metadata +

+The State metadata is implemented through ESMF_Info. It can be accessed +using the JSON Pointer "/NUOPC/Instance/" prefix followed by the "Attribute name" +as per the table below. E.g. "Namespace" is accessed using key="/NUOPC/Instance/Namespace". + +

+ + + + + + + + + + + + + +
Attribute nameDefinitionControlled vocabulary
NamespaceString value holding the namespace of all the objects contained in the State.no restriction
FieldTransferPolicyString value indicating to Connector to transfer/mirror Fields.transferNone, +
+transferAll
+ +

+2.3.6 Field Metadata +

+The Field metadata is implemented through ESMF_Info. It can be accessed +using the JSON Pointer "/NUOPC/Instance/" prefix followed by the "Attribute name" +as per the table below. E.g. "StandardName" is accessed using key="/NUOPC/Instance/StandardName". + +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Attribute nameDefinitionControlled vocabulary
StandardNameString valueno restriction
UnitsString valueno restriction
LongNameString valueno restriction
ShortNameString valueno restriction
ConnectedConnected status.false, true
ProducerConnectionString value indicating whether the Field has been connected with a producer.open, targeted, +
+connected
ConsumerConnectionString value indicating whether the Field has been connected with a consumer.open, targeted, +
+connected
UpdatedString value indicating updated status during initialization.false, true
ProducerTransferOfferString value indicating a producer component's ability to transfer information about the advertised Field, including its GeomObject.will provide, +
+can provide, +
+cannot provide
ProducerTransferActionString value indicating the action a producer component is supposed to take with respect to transferring Field information, including its GeomObject.provide, accept
ConsumerTransferOfferString value indicating a consumer component's ability to transfer information about the advertised Field, including its GeomObject.will provide, +
+can provide, +
+cannot provide
ConsumerTransferActionString value indicating the action a consumer component is supposed to take with respect to transferring Field information, including its GeomObject.provide, accept
SharePolicyFieldString value indicating a component's policy with respect to sharing the Field data allocation.share, +
+not share
ShareStatusFieldString value indicating the status with respect to sharing the underlying Field data allocation that was negotiated.shared, +
+not shared
SharePolicyGeomObjectString value indicating a component's policy with respect to sharing the Grid or Mesh on which the advertised Field object is defined.share, +
+not share
ShareStatusGeomObjectString value indicating the status with respect to sharing the underlying GeomObject that was negotiated.shared, +
+not shared
UngriddedLBoundInteger value list. If present equals the ungriddedLBound of the provider field during a GeomObject transfer.no restriction
UngriddedUBoundInteger value list. If present equals the ungriddedUBound of the provider field.during a GeomObject transfer.no restriction
GridToFieldMapInteger value list. If present equals the gridToFieldMap of the provider field.during a GeomObject transfer.no restriction
ArbDimCountInteger value. If present equals the arbDimCount of the provider field.during a GeomObject transfer.no restriction
MinIndexInteger value list. If present equals the minIndex (of tile 1) of the provider field.during a GeomObject transfer.no restriction
MaxIndexInteger value list. If present equals the maxIndex (of tile 1) of the provider field.during a GeomObject transfer.no restriction
TypeKindInteger value. If present equals the integer representation of typekind of the provider field.during a GeomObject transfer.implementation dependent range
GeomLocInteger value. If present equals the integer representation of staggerloc (for Grid) or meshloc (for Mesh) of the provider field.during a GeomObject transfer.implementation dependent range
+ +

+2.4 Initialization +

+ +

+2.4.1 Phase Maps, Semantic Specialization Labels, and Component Labels +

+ +

+ +

+The NUOPC layer adds an abstraction on top of the ESMF phase index. ESMF introduces the concept of standard component methods: Initialize, Run, and Finalize. ESMF further recognizes the need for being able to split each of the standard methods into multiple phases. On the ESMF level, phases are implemented by a simple integer phase index. With NUOPC, logical phase labels are introduced that are mapped to the ESMF phase indices. + +

+The NUOPC Layer introducing three component level attributes: InitializePhaseMap, RunPhaseMap, and FinalizePhaseMap. These attributes map logical NUOPC phase labels to integer ESMF phase indices. A NUOPC compliant component fully documents its available phases through the phase maps. + +

+The generic NUOPC_Driver uses the InitializePhaseMap on each of its child component during the initialization stage to correctly interact with each component. The RunPhaseMap is used when setting up run sequences in the Driver. The NUOPC_DriverAddRunElement() takes the phaseLabel argument, and uses the RunPhaseMap attribute internally to translates the label into the corresponding ESMF phase index. The FinalizePhaseMap is currently not used by the NUOPC Layer + +

+Appendix B, section 7, lists the supported logical phase labels for reference. User code very rare needs to interact with the InitializePhaseMap or its entries directly. Instead, user code specializes the initialization behavior of a component through the semantic specialization labels discussed below. + +

+NUOPC implements a very powerful initialization procedure. This procedure is, among other functions, capable of handling component hierarchies, transfer of geometries, reference sharing, and resolving data dependencies during initialization. The initialization features are discussed in detail in their respective sections of this document. + +

+From the user level, specialization of the initialization is accessbile through the semantic specialization labels. These labels are predefined named constants that are passed into the NUOPC_CompSpecialize() method, together with the user provided routine, implementing the required actions. On a technical level, the user routine must follow the standard interface defined by NUOPC. Semantically, the purpose of each specialization point is indicated by the name of the predefined specialization label. For a definition of the labels, and the ascribed purpose, see the SEMANTIC SPECIALIZATION LABELS section under each of the generic component kinds. (Driver: 3.1, Model: 3.3, Mediator: 3.4, Connector: 3.5) + +

+Finally, under NUOPC, each component is associated with a label when it is added to a driver through the NUOPC_DriverAddComp() call. Multiple instances of the same component can be added to a driver, provided each instance is given a unique label. Connectors between components are identified by providing the label of the source component and destination component. + +

+2.4.2 Field Pairing +

+ +

+ +

+The NUOPC Model and Mediator components are required to advertise their import and export Fields with a standard set of Field metadata. This set includes the StandardName attribute. The NUOPC Layer implements a strategy of pairing advertised Fields that is based primarily on the StandardName of the Fields, and in more complex situations further utilizes the Namespace attribute on States. + +

+Field pairing is accomplished as part of the initialization procedure and is a collective effort of the Driver and its child components: Models, Mediator, Connectors. The Connectors are the most active players when it comes to Field pairing. The end result of the process is where each Connector has a list of Fields that it connects between its importState and its exportState. Each connector keeps this list in its component level metadata as CplList attribute. + +

+During the first stage of Field pairing, each Connector matches all of the Fields in its importState to all of the Fields in its exportState by looking at their StandardName attribute. For every match a bondLevel is calculated and stored in the Field on the export side, i.e. on the consumer side of the connection, in the Field's ConsumerConnection attribute. The larges found bondLevel is kept for each Field on the export side. + +

+The bondLevel is a measure of how strong the pairing is considering the namespace rules explained in section 2.4.3. Without the use of namespaces the bondLevel for all Field pairs that match by their StandardName is equal to 1. + +

+After the first stage, there may be umbiguous Field pairs present. Ambiguous Field pairs are those that map different producer Fields (i.e. Fields in the importState of a Connector) to the same consumer Field (i.e. a Field in the exportState of a Connector). While the NUOPC Layer support having multiple consumer Fields connected to a single producer Field, it does not support the opposite condition. The second stage of Field pairing is responsible for disambiguating Field pairs with the same consumer Field. + +

+Field pair disambiguation is based on the bondLevel that was calculated and stored on the consumer side Field for each pair during the first stage. The disambiguation rule simply selects the connection with the highest bondLevel and discards all lesser connection to the same consumer side Field. However, if the highest bondLevel is not unique, i.e. there are multiple pairs with the same bondLevel, disambiguation is not possible and an error is returned to the Driver by the Connector that finds the ambiguity first. + +

+Assuming that the disambiguation step was successful, each Connector holds a valid CplList attribute with entries that correspond to the Field pairs that it is responsible for. At this stage the Driver can still overwrite this attribute and implement custom pairs if that is desired. + +

+2.4.3 Namespaces +

+ +

+ +

+Namespaces are used to control and fine-tune the disambiguation of Field pairs during the initialization. The general procedure of Field pairing and disambiguation is outlined in section 2.4.2, here the use of namespaces is described. + +

+The NUOPC Layer implements namespaces through the Namespace attribute on ESMF_State objects. The value of this attribute is a simple character string. The NUOPC Layer automatically creates the import and export States of every Model and Mediator component that is added to a Driver. The Namespace attribute of these States is automatically set to the compLabel string that was provided during NUOPC_DriverAdd(). Doing this places every Field that is advertised through these States inside the component's unique namespace. + +

+A secondary namespace can be added to a State using the NUOPC_StateNamespaceAdd() method. This creates a new State that is nested inside of an existing State, and sets the Namespace attribute of the new State. Fields that are advertised inside of such a nested State are in a namespace with two parts: NS1:NS2. Here NS1 is the preset namespace of the import or export State (equal to the compLabel), and NS2 is a freely chosen namespace string. + +

+During Field pairing the namespace on each side of the connection is considered in the two part format NS1:NS2. The first part is equal to the compLabel of the corresponding component, and NS2 is either the namespace of a nested State, or empty if the Field is not inside a nested State. Using this format, the calculation of the bondLevel during Field pairing is governed by the following rules: + +

+ +

    +
  • Namespace matching is done in a cross wise fashion, meaning NS1 from one side is compared to NS2 of the other side, and vice versa. +
  • +
  • The bondLevel is incremented by one counter for each cross-wise match between namespaces. (Considering that the bondLevel starts out as 1 for any Field pair with matching standard names, the maximum bondLevel that can be reached is 3.) +
  • +
  • Finding one side of the cross-wise comparison being an empty string is neither counted as a match nor a mis-match. The bondLevel remains unchanged. +
  • +
  • A Field pair for which a mis-match in either of the two cross-wise namespace comparisons is detected is discarded from the possible pairs. It is not further considered. +
  • +
+ +

+In practice then, a component that targets a specific other component with its advertised Fields would add a secondary namespace to its import or export State, and set that namespace to the compLabel of the targeted component. This increases the bondLevel for each pair from 1 to 2. An even higher bondLevel of 3 is achieved when both sides target each other by specifying the other component's compLabel through a secondary namespace. + +

+In conclusion, namespaces can affect the bondLevel calculation for each pair, but they do not affect how pairs are constructed and disambiguated. In particular, the requirement for unambiguous Field pairs for each consumer Field remains unchanged, and it is an error condition if the highest bondLevel for a consumer Field does not correspond to a unique Field pair. + +

+2.4.4 Using Coupling Sets for Coupling Multiple Nests +

+ +

+ +

+The NUOPC Layer can couple multiple data sets by adding nested states to the import and export states of a NUOPC_Model. Each nested state is given a couple set identifier at the time it is added to the parent state. This identifier guarantees a NUOPC_Connector will only pair fields within this nested state to fields in a connected state with an identical identifier. + +

+During label_Advertise, before calling NUOPC_Advertise (using methods 3.9.3 or 3.9.4), add nested states to import and export states using NUOPC_AddNestedState. Each nested state is given a couple set identifier using the CplSet argument, see 3.9.2. The nested states can then be used to advertise and realize fields. Each nested state may contain fields with identical standard names or unique standard names. Fields in each nested state will only connect to fields in another state if that state has an identical couple set identifier. + +

+For a complete example of how to couple sets using the NUOPC API, see https://github.com/esmf-org/nuopc-app-prototypes/tree/develop/AtmOcnCplSetProto. The following code snippets demonstrates the critical pieces of code used to add a nested state with a couple set identifier. + +

+

+  subroutine Advertise(model, rc)
+    type(ESMF_GridComp)  :: model
+    integer, intent(out) :: rc
+
+    ! local variables
+    type(ESMF_State) :: importState, exportState
+    type(ESMF_State) :: NStateImp1, NStateImp2
+    type(ESMF_State) :: NStateExp1, NStateExp2
+
+    rc = ESMF_SUCCESS
+
+    ! query model for importState and exportState
+    call NUOPC_ModelGet(model, importState=importState, &
+      exportState=exportState, rc=rc)
+    ! check rc
+
+    ! add nested import states with couple set identifier
+    call NUOPC_AddNestedState(importState, &
+      CplSet="Nest1", nestedStateName="NestedStateImp_N1", &
+      nestedState=NStateImp1, rc=rc)
+    ! check rc
+    call NUOPC_AddNestedState(importState, &
+      CplSet="Nest2", nestedStateName="NestedStateImp_N2", &
+      nestedState=NStateImp2, rc=rc)
+    ! check rc
+
+    ! add nested export states with couple set identifier
+    call NUOPC_AddNestedState(exportState, &
+      CplSet="Nest1", nestedStateName="NestedStateExp_N1", &
+      nestedState=NStateExp1, rc=rc)
+    ! check rc
+    call NUOPC_AddNestedState(exportState, &
+      CplSet="Nest2", nestedStateName="NestedStateExp_N2", &
+      nestedState=NStateExp2, rc=rc)
+    ! check rc
+
+    ! importable field: sea_surface_temperature
+    call NUOPC_Advertise(NStateImp1, &
+      StandardName="sea_surface_temperature", name="sst", rc=rc)
+    ! check rc
+    call NUOPC_Advertise(NStateImp2, &
+      StandardName="sea_surface_temperature", name="sst", rc=rc)
+    ! check rc
+
+    ! exportable field: air_pressure_at_sea_level
+    call NUOPC_Advertise(NStateExp1, &
+      StandardName="air_pressure_at_sea_level", name="pmsl", rc=rc)
+    ! check rc
+    call NUOPC_Advertise(NStateExp2, &
+      StandardName="air_pressure_at_sea_level", name="pmsl", rc=rc)
+    ! check rc
+
+    ! exportable field: surface_net_downward_shortwave_flux
+    call NUOPC_Advertise(NStateExp1, &
+      StandardName="surface_net_downward_shortwave_flux", name="rsns", rc=rc)
+    ! check rc
+    call NUOPC_Advertise(NStateExp2, &
+      StandardName="surface_net_downward_shortwave_flux", name="rsns", rc=rc)
+    ! check rc
+
+  end subroutine
+
+ +

+2.4.5 Connection Options +

+ +

+ +

+Once the field pairing discussed in the previous sections is completed, each Connector component holds an attribute by the name of CplList. The CplList is a list type attribute with as many entries as there are fields for which the Connector component is responsible for connecting. The first part of each of these entries is always the StandardName of the associated field. See section 2.2 for a discussion of the NUOPC field dictionary and standard names. + +

+After the StandardName part, each CplList entry may optionally contain a string of connection options. Each Driver component has the chance as part of the label_ModifyInitializePhaseMap specialization, to modify the CplList attribute of all the Connectors that it drives. + +

+The individual connection options are colon separated, leading to the following format for each CplList entry: + +

+

+StandardName[:option1[:option2[: ...]]
+
+ +

+The format of the options is: + +

+

+OptionName=value1[=spec1][,value2[=spec2][, ...]]
+
+ +

+OptionName and the value strings are case insensitive. There are single and multi-valued options as indicated in the table below. For single valued options only value1 is relevant. If the same option is listed multiple times, only the first occurrence will be used. If an option has a default value, it is indicated in the table. If a value requires additional specification via =spec then the specifications are listed in the table. + +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
OptionNameDefinitionTypeValues
dstMaskValuesList of integer values that defines the mask values.multiList of integers.
dumpWeightsEnable or disable dumping of the interpolation weights into a file.singletrue, false(default)
extrapDistExponentThe exponent to raise the distance to when calculating weights for the nearest_idavg extrapolation method.singlereal(default 2.0)
extrapMethodFill in points not mapped by the regrid method.singlenone(default), nearest_idavg, nearest_stod, nearest_d, creep, creep_nrst_d
extrapNumLevelsThe number of levels to output for the extrapolation methods that fill levels. When a method is used that requires this, then an error will be returned, if it is not specified.singleinteger
extrapNumSrcPntsThe number of source points to use for the extrapolation methods that use more than one source point.singleinteger(default 8)
ignoreDegenerateIgnore degenerate cells when checking the input Grids or Meshes for errors.singletrue, false(default)
ignoreUnmatchedIndicesIgnore unmatched sequence indices when redistributing between source and destination index space.singletrue, false(default)
pipelineDepthMaximum number of outstanding non-blocking communication calls during the parallel interpolation. Only relevant for cases where the automatic tuning procedure fails to find a setting that works well on a given hardware.singleinteger
poleMethodExtrapolation method around the pole(s).singlenone(default), allavg, npntavg="integer indicating number of points", teeth
remapMethodRedistribution or interpolation to compute the regridding weights.singleredist, bilinear(default), patch, nearest_stod, nearest_dtos, conserve, conserve_2nd
srcMaskValuesList of integer values that defines the mask values.multiList of integers.
srcTermProcessingNumber of terms in each partial sum of the interpolation to process on the source side. This setting impacts the bit-for-bit reproducibility of the parallel interpolation results between runs. The strictest bit-for-bit setting is achieved by setting the value to 1.singleinteger
termOrderOrder of the terms in each partial sum of the interpolation. This setting impacts the bit-for-bit reproducibility of the parallel interpolation results between runs. The strictest bit-for-bit setting is achieved by setting the value to srcseq.singlefree(default), srcseq, srcpet
unmappedActionThe action to take when unmapped destination elements are encountered.singleignore(default), error
zeroRegionThe region of destination elements set to zero before adding the result of the sparse matrix multiplication. The available options support total, selective, or no zeroing of destination elements.singletotal(default), select, empty
+ +

+2.4.6 Data-Dependencies during Initialize +

+ +

+ +

+For multi-model applications it is not uncommon that during start-up one or more components depends on data from one or more other components. These types of data-dependencies during initialize can become very complex very quickly. Finding the "correct" sequence to initialize all components for a complex dependency graph is not trivial. The NUOPC Layer deals with this issue by repeatedly looping over all components that indicate that their initialization has data dependencies on other components. The loop is finally exited when either all components have indicated completion of their initialization, or a dead-lock situation is being detected by the NUOPC Layer. + +

+The data-dependency resolution loop considers all components that have specialized label_DataInitialize. Participating components communicate their current status to the NUOPC Layer via Field and Component metadata. Every time a component's label_DataInitialize specialization routine is called, it is responsible for checking the Fields in the importState and for initializing any internal data structures and Fields in the exportState. Fields that are fully initialized in the exportState must be indicated by setting their Updated Attribute to "true". This is used by the NUOPC Layer to ensure that there is continued progress during the resolution loop iterations. Once the component is fully initialized it must further set its InitializeDataComplete Attribute to "true" before returning. + +

+During the execution of the data-dependency resolution loop the NUOPC Layer calls all of the Connectors to a Model/Mediator component before calling the component's label_DataInitialize. Doing so ensures that all the currently available Fields are passed to the component before it tries to access them. Once a component has set its InitializeDataComplete Attribute to "true", it, and the Connectors to it, will no longer be called during the remainder of the resolution loop. + +

+When all of the components that participate in the data-dependency resolution loop have set their InitializeDataComplete Attribute to "true", the NUOPC Layer successfully exits the data-dependency resolution loop. The loop is also interrupted before all InitializeDataComplete Attributes are set to "true" if a full cycle completes without any indicated progress. The NUOPC Layer flags this situation as a potential dead-lock and returns with error. + +

+2.4.7 Transfer of Grid/Mesh/LocStream Objects between Components +

+ +

+ +

+There are modeling scenarios where the need arises to transfer physical grid information from one component to another. One common situation is that of modeling systems that utilize Mediator components to implement the interactions between Model components. In these cases the Mediator often carries out computations on a Model's native grid and performs regridding to the grid of other Model components. It is both cumbersome and error prone to recreate the Model grid in the Mediator. To solve this problem, NUOPC implements a transfer protocol for ESMF_Grid, ESMF_Mesh, and ESMF_LocStream objects (generally referred to as GeomObjects) between Model and/or Mediator components during initialization. + +

+The NUOPC Layer transfer protocol for GeomObjects is based on two Field attributes: TransferOfferGeomObject and TransferActionGeomObject. The TransferOfferGeomObject attribute is used by the Model and/or Mediator components to indicate for each Field their intent for the associated GeomObject. The predefined values of this attribute are: "will provide", "can provide", and "cannot provide". The TransferOfferGeomObject attribute must be set during label_Advertise. + +

+The generic Connector uses the intents from both sides and constructs a response according to the table below. The Connector's response is available during label_RealizeProvided. It sets the value of the TransferActionGeomObject attribute to either "provide" or "accept" on each Field. Fields indicating TransferActionGeomObject equal to "provide" must be realized on a Grid, Mesh, or LocStream object in the Model/Mediator before returning from label_RealizeProvided. + +

+Fields that hold "accept" for the value of the TransferActionGeomObject attribute require two additional negotiation steps. During label_AcceptTransfer the Model/Mediator component can access the transferred Grid/Mesh/LocStream on the Fields that have the "accept" value. However, only the DistGrid, i.e. the decomposition and distribution information of the Grid/Mesh/LocStream is available at this stage, not the full physical grid information such as the coordinates. At this stage the Model/Mediator may modify this information by replacing the DistGrid object in the Grid/Mesh/LocStream. The DistGrid that is set on the Grid/Mesh/LocStream objects when leaving the Model/Mediator phase label_AcceptTransfer will consequently be used by the generic Connector to fully transfer the Grid/Mesh/LocStream object. The fully transferred objects are available on the Fields with "accept" during Model/Mediator phase label_RealizeAccepted, where they are used to realize the respective Field objects. At this point all Field objects are fully realized and the initialization process can proceed as usual. + +

+The following table shows how the generic Connector sets the TransferActionGeomObject attribute on the Fields according to the incoming value of TransferOfferGeomObject. + +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TransferOfferGeomObject Incoming side ATransferOfferGeomObject Incoming side BOutgoing setting by generic Connector
"will provide""will provide"A:TransferActionGeomObject="provide" B:TransferActionGeomObject="provide"
"will provide""can provide"A:TransferActionGeomObject="provide" B:TransferActionGeomObject="accept"
"will provide""cannot provide"A:TransferActionGeomObject="provide" B:TransferActionGeomObject="accept"
"can provide""will provide"A:TransferActionGeomObject="accept" B:TransferActionGeomObject="provide"
"can provide""can provide"if (A is import side) then +
+A:TransferActionGeomObject="provide" B:TransferActionGeomObject="accept" + if (B is import side) then +
+A:TransferActionGeomObject="accept" B:TransferActionGeomObject="provide"
"can provide""cannot provide"A:TransferActionGeomObject="provide" B:TransferActionGeomObject="accept"
"cannot provide""will provide"A:TransferActionGeomObject="accept" B:TransferActionGeomObject="provide"
"cannot provide""can provide"A:TransferActionGeomObject="accept" B:TransferActionGeomObject="provide"
"cannot provide""cannot provide"Flagged as error!
+
+ +

+2.4.8 Field and Grid/Mesh/LocStream Reference Sharing +

+ +

+ +

+For coupling scenarios with a very high coupling frequency, or for situations where large data volumes are exchanged (e.g. 3D volumetric fields), it can be necessary for fields and geom objects (Grid, Mesh, and LocStreams) to share their data via references. Reference sharing greatly reduces the coupling cost compared to local or remote copies. + +

+In the current implementation, in order for NUOPC components to be coupled via reference sharing, they must only have data defined (i.e. have DEs) on PETs that are part of both components. Further, the distribution of data across the PETs must be identical for both components. If these conditions are met, and both sides of the connection indicate that they are willing to participate in reference sharing, the NUOPC Connector will handle technical details. The Connector will provide fields to the components that reference the exact same data allocations in memory. Notice however that once reference sharing is active, the NUOPC Layer cannot protect against components violating the data access conventions. Specifically fields in the importState are not to be modified by the component. Reference sharing requires a higher level of "trust" between the components. NUOPC therefore requires that both sides of a connection agree to reference sharing. + +

+A component uses the SharePolicyField and SharePolicyGeomObject attributes on each field to indicate whether it is willing to reference share the data of a field, and/or the geom object on which the field is built. A setting of share indicates a component's willingness to share, while not share indicates the opposite. The share policy attributes are automatically set when a field is advertised via the NUOPC_Advertise() method. By default this method sets both share policies to not share. + +

+When a Connector negotiates the connections between two components, it first considers the transfer offer attributes (i.e. TransferOfferGeomObject) on both sides for each field to determine the TransferActionGeomObject attribute for both side. The details of this protocol are outline in section 2.4.7. There are two cases to consider for each field that are relevant for reference sharing: + +

+The simple case is where the Connector determines that for a specific field both sides must provide the field and geom object. This is indicated by TransferActionGeomObject being set to provide on both sides. For this case the ShareStatusField and ShareStatusGeomObject attributes are automatically set to not shared for all the fields, preventing any reference sharing. + +

+The more interesting case is where one side of the connection receives the TransferActionGeomObject on a field set to provide, while the other side receives accept. In this case, the next step is for the Connector to take the SharePolicyField and SharePolicyGeomObject attributes on both sides into consideration. For each of the two attributes separately, if one side indicates not share, both sides will receive the associated ShareStatus set to not shared. However, if both sides of the connection indicate a SharePolicy of share, the Connector must further inspect the petLists to see if reference sharing is possible for the specific field. Under the current implementation a field is sharable with another component if all the PETs on which the field holds DEs are also in the other component's petList. If this condition is not met for the specific field, then the associated ShareStatus is set to not shared. Otherwise the ShareStatus is set to shared + +

+During later phases of the Initialization protocol the Connector performs different operations, depending on how the TransferActionGeomObject, ShareStatusField, and ShareStatusGeomObject attributes were set as per the above protocol: + +

    +
  • For a field that has ShareStatusGeomObject equal to share, the geom object provided by the provider component will be made available to the acceptor component. +
  • +
  • For a field that has ShareStatusField equal to share, the Connector realizes the field for the acceptor component using the data allocation reference provided by the field of the provider component. +
  • +
+ +

+2.4.9 Field Mirroring +

+ +

+ +

+In some cases it is helpful for a NUOPC component to automatically mirror or match the set of fields advertised by another component. One purpose of this is to automatically resolve the import data dependencies of a component, by setting up a component that exactly provides all of the needed fields. This is currently used in the NUOPC Component Explorer: when driving a child NUOPC Model with required import fields, the Component Explorer uses the field mirroring capability to advertise in the driver-self export State the exact set of fields advertised in the child NUOPC Model. This ensures that the entire Initialize Phase Sequence will complete (because all dependencies are satisfied) and all phases can be exercised by the Component Explorer. + +

+The field mirror capability is also useful with NUOPC Mediators since these components often exactly reflect, in separate States, the sets of fields of each of the connected components. The field mirroring capability, therefore, can be used to ensure that a Mediator is always capable of accepting fields from connected components, and removes the need to specify field lists in multiple places, i.e., both within a set of Model components connected to a Mediator and within the Mediator itself. + +

+To access the field mirror capability, a component sets the FieldTransferPolicy attribute during label_Advertise. The attribute is set on the Import- and/or Export- States to trigger field mirroring for each state, respectively. The default value of "TransferNone" indicates that no fields should be mirrored. The other option, "TransferAll", indicates that fields should be mirrored in the State of a connected component. + +

+Each Connector consider the FieldTransferPolicy Attribute on both its import and export States. If both States have a FieldTransferPolicy of "TransferAll", then fields are transferred between the States in both directions (i.e., import to export and export to import). The transfer process works as follows: First, the TransferOfferGoemObject attribute is reversed between the providing side and accepting side. Intuitively, if a field from the providing component is to be mirrored and it can provide its own geometric object, then the mirrored field on the accepting side should be set to accept a geometric object. Then, the field to be mirrored is advertised in the accepting State using a call to NUOPC_Advertise() such that the mirrored field shares the same Standard Name. + +

+Components have the opportunity, using specialiozation point label_ModifyAdvertised, to modify any of the mirrored Fields in their Import/ExportState. After this the initialization sequence continues as usual. Since fields to be mirrored have been advertised with matching Standard Names, the field pairing algorithm will now match them in the usual way thereby establishing a connection between the original and mirrored fields. + +

+2.5 Timekeeping +

+ +

+ +

+The NUOPC Layer associates an internal clock with three of its four generic component kinds: NUOPC_Driver, NUOPC_Model, and NUOPC_Mediator. The NUOPC_Connector is the only NUOPC component kind that does not have an internal clock object that is managed by NUOPC. + +

+The component internal clocks are implemented as ESMF_Clock objects. The interaction beween these clock objects between a parent component (driver) and its child components (models, mediators, and drivers) is defined by the NUOPC timekeeping behavior described below. + +

+For a simple run sequence with only a single coupling time-step, the driver clock sets the startTime, stopTime, and timeStep to be the beginning, the end, and the coupling period of the run, respectively. At the beginning of executing the run sequence, the driver clock currTime is set to its startTime. As the driver component executes the run sequence, it passes its clock to each child component that it executes. At the end of each full sweep through the run sequence the driver currTime is incremented by timeStep (i.e. the coupling period). This continues until the driver clock stopTime has been reached, and the run is complete. + +

+When a child component is being called during the execution of the driver run sequence, it receives the driver/parent clock. This access is read-only, and the child component is only allowed to inspect but not modify the parent clock. The child component is expected to run forward a single coupling period, i.e. one timeStep on the parent clock. Specifically this means that the currTime on the child clock must match the currTime on the parent clock. It then must take a single timeStep of the parent clock forward, using its own clock to do so. The child component can implement this forward step by taking multiple smaller advances on its own clock. + +

+The generic NUOPC component implementation provides the following assistance to implement the above described behavior: + +

+ +

    +
  • During initialization of a component, its clock is set as a copy of its parent clock. Specifically the settings for startTime, stopTime, timeStep, and currTime are propagated. Alarms are not propagated. +
  • +
  • A component can customize aspects of its clock during initialization by using the label_SetClock specialization point. +
  • +
  • During run time, the default label_SetRunClock specialization checks that the currTime matches between child and parent clock. It further checks that the child clock can reach the parent's currTime+timeStep, i.e. the next coupling time, by an integral number of it's own time steps. If so, the stopTime on the child clock is set to the parent's currTime+timeStep. + +
      +
    • It can be useful to customize label_SetRunClock, e.g. if the parent uses dynamic coupling periods, or in case of a run sequence with multiple coupling periods. In these cases the component must react to the parent timeStep provided during execution of the run sequence. In general the currTime match should be implemented, followed by setting the child's timeStep according to the information provided on the parent clock. Finally the the stopTime on the child clock should be set as to return at the next coupling time determined by the parent clock. +
    • +
    +
  • +
  • Once past the label_SetRunClock specialization, the component checks the timestamps on the fields in the import state. This is done by calling into the label_CheckImport specialization point. The default implementation simply checks that all import fields are at currTime of the child clock. + +
      +
    • In more complex situations, where the interaction between different components happens with different coupling periods, it can be necessary to specialialize the label_CheckImport of a component. For example, a component might receive fields in its import state that carry different timestamps. Consequentely, label_CheckImport must implement a more complex relationship between the component's currTime, and the timestamps on each import field. +
    • +
    +
  • +
  • Finally the component clock is stepped forward from currTime to stopTime, using the timeStep interval set in the child clock. During this loop, the label_Advance specialization is called for each time step. The label_Advance specialization is responsible for any accumulating and averaging that may be necessary. + +
      +
    • In practice often the timeStep on the child clock is chosen to be identical to that of the parent clock. This way the label_Advance specialization is only called once for every coupling period. In this approach the details about potentially smaller model time steps, and associated accumulation and averaging is handled below the NUOPC cap layer of a model. +
    • +
    +
  • +
  • After the stopTime has been reached on the child clock, the label_TimestampExport specialization point is called before the component returns to the parent. The default implementation simply timestamps all the fields in the export state with the currTime of of the child clock. +
  • +
+ +

+ +

+2.6 Component Hierarchies +

+ +

+ +

+The NUOPC Layer supports component hierarchies. The key function to support this capability is the ability for a generic NUOPC_Driver to add another NUOPC_Driver component as a child, and to drive it much like a NUOPC_Model component. The interactions upward and downward the hierarchy tree are governed by the standard NUOPC component interaction protocols. + +

+In the current implementation, data-dependencies during initialization can be resolved throughout the entire component hierarchy. The implementation is based on a sweep algorithm that continues up and down the hierarchy until either all data-dependencies have been resolved, or a dead-lock situation has been detected and flagged. + +

+Along the downward direction, the interaction of a driver with its children allows the driver to mirror its child components' fields, and to transfer or share geom objects and fields up the component hierarchy. All of the interactions of a driver with its child components are handled by explicit NUOPC_Connector instances. These instances are automatically added by the driver when needed. + +

+The detailed behavior of a NUOPC_Driver component within a component hierarchy depends on the setting of the HierarchyProtocol attribute on the driver component itself. Section 2.3.1 lists all of the driver attributes defined by NUOPC. By default the HierarchyProtocol attribute is unset. For unset HierarchyProtocol or when set to PushUpAllExportsAndUnsatisfiedImports, the driver component pushes all the fields from its children exportStates into its own exportState, and all unsatisfied fields in its children importStates into its own importState. This is done using the standard Field Mirroring protocol discussed under 2.4.9. Further the driver sets the SharePolicyGeomObject, and +SharePolicyField to share for all the fields it mirrors. This triggers the reference share protocol as described in section 2.4.8. + +

+When the HierarchyProtocol is set to Explorer, the driver component still mirrors the fields from its child components' import- and exportStates, as was done for the default, however, the share policies will not be set. This protocol option is used by the NUOPC ComponentExplorer to connect to user provided components. + +

+Finally, for a setting of HierarchyProtocol to ConnectProvidedFields, the driver does not modify its own import- and exportState. Instead connections are made only between fields that have been added to the driver states externally. This is useful for the situation where a NUOPC_Driver component is called directly via ESMF component method from a level that is outside of NUOPC. In this situation, field and/or geom object sharing must be activated explicitly if desired. + +

+2.7 Resource Control and Threaded Components +

+ +

+ +

+Each instance of a NUOPC component within an application is defined on a fixed set of compute resources. The association of resources occurs when the component is added to its parent component via the NUOPC_DriverAddComp() call. Subsequently when any of the component's Initialize, Run, or Finalize phases is called, the component code executes on the associated resources. + +

+The primary control of resource management under NUOPC is implemented through the petList argument that is accepted by NUOPC_DriverAddComp(). This argument holds a list of Persistent Execution Thread (PET) ids of the parent component on which the child component is to execute. By default, i.e. when petList is not specified, all of the parent PETs are associated with the added child component. Using custom petList constructions, a driver has control of exactly how its child components are sharing the available PET resources. + +

+Notice that the order of PETs listed in a petList is significant. The local PET labeling inside a child component always goes from 0 to size(petList)-1. The order in which the child PETs correspond to the parent PETs is that specified by the petList. It is erroneous to list the same parent PET multiple times in the same petList argument. + +

+For the following discussion it is convenient to think of PETs as simple MPI processes. While this is not strictly correct on a technically ESMF level, there are currently no features available to NUOPC where this interpretation would lead to inconsistencies. One of the key consequences of equating each PET to a simple MPI process is that each PET can only execute a single component's code at any given time. Therefore, in order to allow components to execute concurrently, a necessary condition is to define them on exclusive petLists. Of course the data dependencies between components must also support concurrent execution. Often this requires careful placement of Connectors in the run sequence and the introduction of time lags. However, this is more of a scientific than the resource control question covered in this section. + +

+Many model components today implement the hybrid MPI+OpenMP paradigm to support scalability to larger core counts than would be possible in a purely MPI or OpenMP approach. NUOPC supports hybrid MPI+OpenMP components in two ways: NUOPC aware and NUOPC unaware. In the NUOPC unaware approach, the application is launched only on those MPI ranks that are going to participate in the hybrid execution with OpenMP. Usually this means that the MPI launch system (mpirun, mpiexec, aprun, srun, etc.), and a set of environment variables get involved in correctly associating the desired number of hardware cores with each MPI process, and to assure correct affinities. In this approach NUOPC is not at all involved in the resource management, and OpenMP threading happens purely on the user level. + +

+The NUOPC unaware hybrid MPI+OpenMP approach provides a quick way to run hybrid applications that consist of a single model component, or where all of the model components use the same hybrid approach with the same ratio of OpenMP threads per MPI rank. In this case, shell-based user level resource control is often sufficient. However, for more complex coupling scenarios the NUOPC aware hybrid approach provides additional levels of control that are often needed to achieve optimal utilization of the available resources + +

+Under the NUOPC aware resource control, some components might be purely MPI based, while others use the hybrid approach. Different hybrid components can be configured to run with different threading levels. This is possible independent on whether the components use the same or exclusive sets of resources. + +

+Besides the already discussed petList argument, there are two additional optional arguments to NUOPC_DriverAddComp(). It is through those arguments that the advanced resource control features under NUOPC are implemented. One of these arguments is compSetVMRoutine. This argument allows the user to point to a specific public method of the child component. The signature of this method is the same as for the compSetServicesRoutine argument. If compSetVMRoutine is provided, it will be called before compSetServicesRoutine. The purpose of compSetVMRoutine is to allow the child component to set specific aspects of its own ESMF virtual machine (VM) before instantiating it. The ESMF reference manual discusses the details of this procedure under the "User-code SetVM method" section. Based on the information provided there, a user could implement a custom compSetVMRoutine method for a component. However, for convenience, NUOPC provides a generic implementation that can be passed into compSetVMRoutine. For most common situation, the generic implementation provided by NUOPC is sufficient, and there is no need for the user to provide a custom implementation of compSetVMRoutine. + +

+Utilizing the generic SetVM method provided by NUOPC involves a few steps. First, the component implementation must make the generic SetVM public inside its own cap module: + +

+

+module MODEL
+
+  !-----------------------------------------------------------------------------
+  ! MODEL Component.
+  !-----------------------------------------------------------------------------
+
+  use ESMF
+  use NUOPC
+  use NUOPC_Model, &
+    modelSS    => SetServices
+
+  implicit none
+
+  private
+
+  public SetVM, SetServices   ! Here making SetVM and SetServices public.
+
+  !-----------------------------------------------------------------------------
+  contains
+  !-----------------------------------------------------------------------------
+  ...
+end module
+
+ +

+Second, the driver component that adds MODEL via NUOPC_DriverAddComp() as a child component, must make a USE association to the SetVM: + +

+

+module driver
+
+  !-----------------------------------------------------------------------------
+  ! Code that specializes generic NUOPC_Driver
+  !-----------------------------------------------------------------------------
+
+  use MPI
+  use ESMF
+  use NUOPC
+  use NUOPC_Driver, &
+    driverSS             => SetServices
+
+  use MODEL, only: &
+    modelSS     => SetServices, &
+    modelSVM    => SetVM            ! Here making USE association to SetVM.
+
+  implicit none
+
+  private
+
+  public SetServices
+
+  !-----------------------------------------------------------------------------
+  contains
+  !-----------------------------------------------------------------------------
+  ...
+end module
+
+ +

+Third, the driver can now pass the modelSVM into NUOPC_DriverAddComp() via the compSetVMRoutine argument, essentially providing the generic SetVM method. + +

+Finally, the generic SetVM implementation needs to be informed about the specific resource control request. This is handled through the other optional argument to NUOPC_DriverAddComp() alluded to earlier. This is the info argument. + +

+The info argument is of type(ESMF_Info), which implements a structured key/value pair class. An info object must first be created via ESMF_InfoCreate() before any key/value pairs can be set. + +

+

+    type(ESMF_Info)               :: info
+    ...
+    info = ESMF_InfoCreate(rc=rc)
+    ! check rc
+
+ +

+NUOPC resource control is implemented under the /NUOPC/Hint/PePerPet structure. The following table documents the available keys under this structure, the supported values, and their meaning. Notice that structure and keys are case sensitive, while values are case insensitive. + +

+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
keyvalueMeaning
MaxCountPositive integerThe maximum number of Processing Elements (PEs), i.e. cores or hardware threads, associated with each child PET. The procedure is this: the PEs associated with the incoming parent PETs (e.g. via petList), are grouped by single system image (SSI), i.e. shared memory domain or hardware node. Within each SSI the PEs are divided by the MaxCount to determine how many child PETs are needed for each SSI. The PEs on each SSI are then associated with the child PETs. + +

+Note that this procedure only then results in every child PET holding exactly MaxCount PEs when the number of PEs per SSI brought in by the parent PETs is a multiple of MaxCount. + +

+Parent PETs that for the child VM gave up their PEs, and are not executing as child PETs, are paused for the duration of the child component execution. They resume execution under the parent VM once the child component returns control to the parent.

OpenMpHandlingString: none, set, init, or pin (the default)For "none", OpenMP handling is completely left to the user. In this case the user child component code will typically want to query the child VM for the local number of PEs under each child PET. This number then would be used in an explicit call to omp_set_num_threads() in order to set the OpenMP thread number according to the available PEs under each child PET. + +

+For "set", the NUOPC/ESMF layer make the call to omp_set_num_threads() under each child PET with the appropriate number of PEs. + +

+For "init", the NUOPC/ESMF layers sets the number of OpenMP threads in each team, and triggers the instantiation of all the threads in the team. + +

+For "pin", the NUOPC/ESMF layers sets the number of OpenMP threads in each team, triggers the instantiation of the team, and pins each OpenMP thread to the corresponding PE.

OpenMpNumThreadsPositive integerBy default the "set", "init", or "pin" option under OpenMpHandling sets the number of OpenMP threads in each team equal to the number of PEs under each PET. Setting OpenMpNumThreads, this default can be overwritten. The option allows the user to under- or oversubscribe the PEs held by each PET.
ForceChildPthreadsLogical: .true., or .false. (the default)By default (.false.) each PET executes under the same thread as its parent PET. Typically this means that PETs execute directly as the MPI process under which they were created. In some cases it is beneficial to create a separate Pthread for each child PET. This can be accomplished by setting the value to .true..
PthreadMinStackSizePositive integerThe minimum stack size in byte of each child PET that is executing as Pthread. By default child PETs do not execute as Pthreads. Therefore the stack size by default is equal to that of the parent PET. However, if ForceChildPthreads is set to true, all child PETs are instantiated as Pthreads. This means that the stack size cannot be unlimited. ESMF implements a default minimum stack size for child PETs of 20MiB. This minimum default can be changed (up or down) via the PthreadMinStackSize key. + +

+The system limit or ulimit commands can be used to further increase the stack size of child PETs. Any limit set lower than the PthreadMinStackSize, or set to unlimited, will result in usage of the PthreadMinStackSize if set, or the 20MiB default. + +

+Note further that when OpenMP is used inside the child component, each child PET becomes the root thread of each of the OpenMP thread teams. It is therefore the root thread stack size that is affected by PthreadMinStackSize. The stack size of all the other OpenMP threads in each team is set via environment variable OMP_STACKSIZE as usual.

+ +

+The following code snippet demonstrates a typical resource control request using the generic SetVM routine and an info object. This request is suitable for a hybrid MPI+OpenMP component where every child PET is expected to run 4-way OpenMP threaded. + +

+

+    call ESMF_InfoSet(info, key="/NUOPC/Hint/PePerPet/MaxCount", value=4, rc=rc)
+    ! check rc
+    call NUOPC_DriverAddComp(driver, "MODEL1", modelSS, modelSVM, info=info, rc=rc)
+    ! check rc
+
+ +

+A second child component can be created that uses the same parent resources as the first, but sets up 8-way OpenMP threading under each child PET. + +

+

+    call ESMF_InfoSet(info, key="/NUOPC/Hint/PePerPet/MaxCount", value=8, rc=rc)
+    ! check rc
+    call NUOPC_DriverAddComp(driver, "MODEL2", modelSS, modelSVM, info=info, rc=rc)
+    ! check rc
+
+ +

+If the default settings for some of the keys are not appropriate, they can be set explicitly. Here for instance a child component with the same number of PETs as the previous 4-way OpenMP threaded case is created, but is instructed to not handle any of the OpenMP aspects. + +

+

+    call ESMF_InfoSet(info, key="/NUOPC/Hint/PePerPet/MaxCount", value=4, rc=rc)
+    ! check rc
+    call ESMF_InfoSet(info, key="/NUOPC/Hint/PePerPet/OpenMpHandling", &
+      value="none", rc=rc)
+    ! check rc
+    call NUOPC_DriverAddComp(driver, "MODEL3", modelSS, modelSVM, info=info, rc=rc)
+    ! check rc
+
+ +

+In this example, all three child components "MODEL1", "MODEL2", and "MODEL3" use the exact same parent resources. Due to this fact all three components can only execute sequentially. However, each child component manages the resources provided by the parent differently, and independently. Through this tailored approach, NUOPC allows optimal use of the available resources by each component. NUOPC_Connector components defined between components work as usual, taking care of all the required data movements automatically and completely transparent to the user. + +

+In order to obtain best performance when using NUOPC aware resource control for hybrid parallelism, it is strongly recommended to set OMP_WAIT_POLICY=PASSIVE in the environment. This is one of the standard OpenMP environment variables. The PASSIVE setting ensures that OpenMP threads relinquish the hardware threads (i.e. cores) as soon as they have completed their work. Without that setting ESMF resource control threads can be delayed, and context switching between components becomes more expensive. + +

+2.8 External NUOPC Interface +

+ +

+ +

+Complete applications can easily be built by assembling NUOPC compliant components. Many such NUOPC applications are in productive use across several institutions. The top level of such applications is typically implemented via a very thin application layer holding the main program that calls into the top level driver component that derives from NUOPC_Driver. Model components sit under the top level driver, interacting with one another and the driver through the NUOPC protocols. Complex systems have one or more component hierarchy levels under the top level driver as discussed in the previous section. + +

+There are situation, however, where a NUOPC application needs to be controlled by an outside component. Such an outside component does not derive from any of the generic NUOPC components, and cannot be expected to implement the complete NUOPC protocol. Typically such an external component implements its own control structure outside of NUOPC and ESMF. One example of such a situation are data assimilation systems that want to drive a NUOPC forecast application. + +

+In order to facilitate the external access into a NUOPC application, the NUOPC_Driver provides an external interface. This interface is implemented through the standard ESMF component methods: Initialize, Run, and Finalize. This interface with the top level NUOPC driver allows an external component to control and interact with the entire NUOPC application. + +

+The standard ESMF component interfaces hold importState, exportState, and a clock argument. These arguments are used to pass data in and out of the NUOPC application, and control the time stepping of the NUOPC model, respectively. The top level driver of a NUOPC application has access to any field that is advertised by any of the components and therefore serves as a single point of access for the entire application. + +

+The external NUOPC interface is currently defined by the Initialize, Run, and Finalize phases documented in the following table. + +

+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
methodFlagphaseLabelMeaning
ESMF_METHOD_INITIALIZElabel_ExternalAdvertiseCalled after the external component has + set up the import- and exportStates with + fields (advertised) that it plans to interact with. + On the NUOPC application side this call will + got through the complete advertise cylce.
ESMF_METHOD_INITIALIZElabel_ExternalRealizeCalled after the external component has + been informed about the connected status of + the fields in the import- and exportState. + On the NUOPC application side this call will + finish setting up RouteHandles between all + components involved.
ESMF_METHOD_INITIALIZElabel_ExternalDataInitTrigger a complete data initialize throughout + the NUOPC application. The expectation is that + all components reset their data consistent with + the clock argument.
ESMF_METHOD_RUN The default Run() method steps the NUOPC + application forward in time according to + the clock argument.
ESMF_METHOD_FINALIZElabel_ExternalResetInform the NUOPC application about a clock + reset.
ESMF_METHOD_FINALIZE Completely finalize and shut down the NUOPC application.
+ +

+Here methodFlag and phaseLabel corrsepond to the respective arguments of method NUOPC_CompSearchPhaseMap(). This method is used to determine the actual ESMF phase index needed when calling into ESMF_GridCompInitialize(), ESMF_GridCompRun(), or ESMF_GridCompFinalize(). In cases where no phaseLabel is indicated, the default phase is used for the implementation, accessible by not specifying the argument. + +

+For a complete example of how the External NUOPC API is used in practice, see https://github.com/esmf-org/nuopc-app-prototypes/tree/develop/ExternalDriverAPIProto. The following code snippets demonstrates the critical pieces of code from the external layer interacting with NUOPC/ESMF. + +

+

+  ! Create the external level import/export States
+  ! NOTE: The "stateintent" must be specified, and it must be set from the
+  ! perspective of the external level:
+  ! -> state holding fields exported by the external level to the ESM component
+  externalExportState = ESMF_StateCreate(stateintent=ESMF_STATEINTENT_EXPORT, rc=rc)
+    ! check rc
+  ! -> state holding fields imported by the external level from the ESM component
+  externalImportState = ESMF_StateCreate(stateintent=ESMF_STATEINTENT_IMPORT, rc=rc)
+    ! check rc
+
+  ! Advertise field(s) in external import state to receive from the NUOPC layer
+  call NUOPC_Advertise(externalImportState, &
+    StandardNames=(/"sea_surface_temperature"/), &
+    TransferOfferGeomObject="cannot provide", SharePolicyField="share", rc=rc)
+    ! check rc
+
+  ! Call "ExternalAdvertise" Initialize for the earth system Component
+  call NUOPC_CompSearchPhaseMap(nuopcApp, methodflag=ESMF_METHOD_INITIALIZE, &
+    phaseLabel=label_ExternalAdvertise, phaseIndex=phase, rc=rc)
+    ! check rc
+  call ESMF_GridCompInitialize(nuopcApp, phase=phase, clock=clock, &
+    importState=externalExportState, exportState=externalImportState, userRc=urc, rc=rc)
+    ! check rc and urc
+
+  ! Call "ExternalRealize" Initialize for the earth system Component
+  call NUOPC_CompSearchPhaseMap(nuopcApp, methodflag=ESMF_METHOD_INITIALIZE, &
+    phaseLabel=label_ExternalRealize, phaseIndex=phase, rc=rc)
+    ! check rc
+  call ESMF_GridCompInitialize(nuopcApp, phase=phase, clock=clock, &
+    importState=externalExportState, exportState=externalImportState, userRc=urc, rc=rc)
+    ! check rc and urc
+
+  ! Call "ExternalDataInit" Initialize for the earth system Component
+  call NUOPC_CompSearchPhaseMap(nuopcApp, methodflag=ESMF_METHOD_INITIALIZE, &
+    phaseLabel=label_ExternalDataInit, phaseIndex=phase, rc=rc)
+    ! check rc
+  call ESMF_GridCompInitialize(nuopcApp, phase=phase, clock=clock, &
+    importState=externalExportState, exportState=externalImportState, userRc=urc, rc=rc)
+    ! check rc and urc
+
+  ! Explicit time stepping loop on the external level, here based on ESMF_Clock
+  do while (.not.ESMF_ClockIsStopTime(clock, rc=rc))
+    ! Run the earth system Component: i.e. step ESM forward by timestep
+    call ESMF_GridCompRun(nuopcApp, clock=clock, &
+      importState=externalExportState, exportState=externalImportState, userRc=urc, rc=rc)
+    ! check rc and urc
+    ! Advance the clock
+    call ESMF_ClockAdvance(clock, rc=rc)
+    ! check rc
+  end do
+
+  ! Finalize the earth system Component
+  call ESMF_GridCompFinalize(nuopcApp, clock=clock, &
+    importState=externalExportState, exportState=externalImportState, userRc=urc, rc=rc)
+    ! check rc and urc
+
+ +

+ +

+ +
+esmf_support@ucar.edu +
+ + diff --git a/docs/nightly/fix/reconcile-info/NUOPC_refdoc/node4.html b/docs/nightly/fix/reconcile-info/NUOPC_refdoc/node4.html new file mode 100644 index 000000000..4242c06e3 --- /dev/null +++ b/docs/nightly/fix/reconcile-info/NUOPC_refdoc/node4.html @@ -0,0 +1,7727 @@ + + + + + +3 API + + + + + + + + + + + + + + + + + + + + + +Subsections + + + +
+ +

+3 API +

+ +

+ +
+3.1 Generic Component: NUOPC_Driver +

+ +

+ +

+ +

+ +

+
+MODULE: +

  module NUOPC_Driver
+
+ +

+ +

+
+DESCRIPTION: +
+Component that drives and coordinates initialization of its child components: Model, Mediator, and Connector components. For every Driver time step the same run sequence, i.e. sequence of Model, Mediator, and Connector Run methods is called. The run sequence is fully customizable. The default run sequence implements explicit time stepping. + +

+ +

+
+SUPER: +

  ESMF_GridComp
+
+ +

+ +

+
+USE DEPENDENCIES: +

  use ESMF
+
+ +

+ +

+
+SETSERVICES: +

  subroutine SetServices(driver, rc)
+    type(ESMF_GridComp)   :: driver
+    integer, intent(out)  :: rc
+
+ +

+ +

+
+SEMANTIC SPECIALIZATION LABELS: + +

    +
  • Initialize: + +
      +
    • label_SetModelServices + +
        +
      • Optional. By default driver has no child components. +
      • +
      • Use NUOPC_DriverAddComp() repeatedly to add child components to the driver. +
      • +
      • Use NUOPC_CompAttributeSet() or NUOPC_CompAttributeIngest() to set attributes on child components. +
      • +
      • Create and set driver clock with startTime, stopTime, and timeStep, if not done by the driver's parent. + +
      • +
      +
    • +
    • label_SetRunSequence + +
        +
      • Optional. By default drive child components in the sequence they were added. +
      • +
      • Define and set a RunSequence either by calling NUOPC_DriverIngestRunSequence(), or by using the NUOPC_DriverNewRunSequence() and NUOPC_DriverAddRunElement() API. + +
      • +
      +
    • +
    • label_ModifyInitializePhaseMap + +
        +
      • Optional. By default InitializePhaseMap attributes are not modified. +
      • +
      • Modify the InitializePhaseMap attribute on the child components as desired. This is very rarely needed. + +
      • +
      +
    • +
    • label_ModifyCplLists + +
        +
      • Optional. By default CplList attributes are not modified. +
      • +
      • Modify the CplList attribute on the child components as desired. This can be useful to set custom Connection Options for specific Field pairs. + +
      • +
      +
    • +
    • label_PreChildrenAdvertise + +
        +
      • Optional. +
      • +
      • Allow driver to execute specific code before calling the Advertise phase of its children. + +
      • +
      +
    • +
    • label_PostChildrenAdvertise + +
        +
      • Optional. +
      • +
      • Allow driver to execute specific code after calling the Advertise phase of its children. + +
      • +
      +
    • +
    • label_PreChildrenRealize + +
        +
      • Optional. +
      • +
      • Allow driver to execute specific code before calling the Realize phase of its children. + +
      • +
      +
    • +
    • label_PostChildrenRealize + +
        +
      • Optional. +
      • +
      • Allow driver to execute specific code after calling the Realize phase of its children. + +
      • +
      +
    • +
    • label_PreChildrenDataInitialize + +
        +
      • Optional. +
      • +
      • Allow driver to execute specific code before calling the DataInitialize phase of its children. + +
      • +
      +
    • +
    • label_PostChildrenDataInitialize + +
        +
      • Optional. +
      • +
      • Allow driver to execute specific code after calling the DataInitialize phase of its children. + +
      • +
      +
    • +
    +
  • +
  • Run: + +
      +
    • label_SetRunClock + +
        +
      • Optional. By default driver clock is left unchanged if the parent component has no valid clock. + If there is a valid parent clock, the current time is checked between it and the driver clock. An + error is returned if the current time does not agree. Otherwise (current time does agree between + both clocks), the driver clock stop time is adjusted to a single time step of the parent clock in + the future. This ensures that the driver returns at the appropriate parent time step, even if that + might change dynamically during the run. +
      • +
      • Modify the driver clock before executing RunSequence. This is very rarely needed. + +
      • +
      +
    • +
    • label_ExecuteRunSequence + +
        +
      • Optional. By default use NUOPC generic RunSequence execution. +
      • +
      • Implement a custom RunSequence execution. This is very rarely needed. + +
      • +
      +
    • +
    +
  • +
  • Finalize: + +
      +
    • label_Finalize + +
        +
      • Optional. By default do nothing. +
      • +
      • Destroy any objects created during Initalize. + +
      • +
      +
    • +
    +
  • +
+ +

+ +

+ +

+ +

+ +

+ +

+3.1.1 NUOPC_DriverAddComp - Add a GridComp child to a Driver +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_DriverAddComp()
+   recursive subroutine NUOPC_DriverAddGridComp(driver, compLabel, &
+     compSetServicesRoutine, compSetVMRoutine, petList, devList, info, config, &
+     hconfig, comp, rc)
+
ARGUMENTS: +
     type(ESMF_GridComp)                               :: driver
+     character(len=*),    intent(in)                   :: compLabel
+ #if defined (__NVCOMPILER) || defined (__PGI) || defined (ESMF_COMPILER_AOCC)
+     interface
+       recursive subroutine compSetServicesRoutine(gridcomp, rc)
+         use ESMF
+         implicit none
+         type(ESMF_GridComp)        :: gridcomp ! must not be optional
+         integer, intent(out)       :: rc       ! must not be optional
+       end subroutine
+     end interface
+     interface
+       recursive subroutine compSetVMRoutine(gridcomp, rc)
+         use ESMF
+         implicit none
+         type(ESMF_GridComp)        :: gridcomp ! must not be optional
+         integer, intent(out)       :: rc       ! must not be optional
+       end subroutine
+     end interface
+     optional                                          :: compSetVMRoutine
+ #else
+     abstract interface
+       recursive subroutine SetServicesRoutine(gridcomp, rc)
+         use ESMF
+         implicit none
+         type(ESMF_GridComp)        :: gridcomp ! must not be optional
+         integer, intent(out)       :: rc       ! must not be optional
+       end subroutine
+       recursive subroutine SetVMRoutine(gridcomp, rc)
+         use ESMF
+         implicit none
+         type(ESMF_GridComp)        :: gridcomp ! must not be optional
+         integer, intent(out)       :: rc       ! must not be optional
+       end subroutine
+     end interface
+     procedure(SetServicesRoutine)                     :: compSetServicesRoutine
+     procedure(SetVMRoutine),                 optional :: compSetVMRoutine
+ #endif
+     integer,             intent(in),         optional :: petList(:)
+     integer,             intent(in),         optional :: devList(:)
+     type(ESMF_Info),     intent(in),         optional :: info
+     type(ESMF_Config),   intent(in),         optional :: config
+     type(ESMF_HConfig),  intent(in),         optional :: hconfig
+     type(ESMF_GridComp), intent(out),        optional :: comp
+     integer,             intent(out),        optional :: rc
+
+DESCRIPTION: +
+ +

+Create and add a GridComp (i.e. Model, Mediator, or Driver) as a child + component to a Driver. The component is created on the provided petList, + or by default across all of the Driver PETs. + +

+The specified compSetServicesRoutine() is called back immediately after + the new child component has been created internally. + Very little around the component is set up at that time (e.g. NUOPC component + attributes are not yet available at this stage). The routine should therefore + be very light weight, with the sole purpose of setting the entry points of + the component - typically by deriving from a generic component followed by + the appropriate specilizations. + +

+If provided, the compSetVMRoutine() is called back before the + compSetServicesRoutine(). This allows the child component to set + aspects of its own VM, such as threading or the PE distribution among PETs. + +

+The info argument can be used to pass custom attributes to the child + component. These attributes are available on the component when + compSetVMRoutine() and compSetServicesRoutine() are called. + The attributes provided in info are copied onto the child + component. This allows the same info object to be used for multiple + child components without conflict. + +

+The compLabel must uniquely identify the child component within the + context of the Driver component. + +

+If the comp argument is specified, it will reference the newly created + component on return. + +

+ +

+ +

+3.1.2 NUOPC_DriverAddComp - Add a GridComp child from shared object to a Driver +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_DriverAddComp()
+   recursive subroutine NUOPC_DriverAddGridCompSO(driver, compLabel, &
+     sharedObj, petList, devList, info, config, hconfig, comp, rc)
+
ARGUMENTS: +
     type(ESMF_GridComp)                        :: driver
+     character(len=*),    intent(in)            :: compLabel
+     character(len=*),    intent(in),  optional :: sharedObj
+     integer,             intent(in),  optional :: petList(:)
+     integer,             intent(in),  optional :: devList(:)
+     type(ESMF_Info),     intent(in),  optional :: info
+     type(ESMF_Config),   intent(in),  optional :: config
+     type(ESMF_HConfig),  intent(in),  optional :: hconfig
+     type(ESMF_GridComp), intent(out), optional :: comp
+     integer,             intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Create and add a GridComp (i.e. Model, Mediator, or Driver) as a child + component to a Driver. The component is created on the provided petList, + or by default across all of the Driver PETs. + +

+The SetVM() and SetServices() routines in sharedObj + are called back immediately after the new child component has been created + internally. + Very little around the component is set up at that time (e.g. NUOPC component + attributes are not yet available at this stage). The routine should therefore + be very light weight, with the sole purpose of setting the entry points of + the component - typically by deriving from a generic component followed by + the appropriate specilizations. + +

+The asterisk character (*) is supported as a wildcard for the + file name suffix in sharedObj. When present, the asterisk is replaced + by "so", "dylib", and "dll", in this order, and the first successfully + loaded object is used. If the sharedObj argument is not provided, the + executable itself is searched for the "SetVM" and "SetServices" + symbols. + +

+The info argument can be used to pass custom attributes to the child + component. These attributes are available on the component when + compSetVMRoutine() and compSetServicesRoutine() are called. + The attributes provided in info are copied onto the child + component. This allows the same info object to be used for multiple + child components without conflict. + +

+The compLabel must uniquely identify the child component within the + context of the Driver component. + +

+If the comp argument is specified, it will reference the newly created + component on return. + +

+ +

+ +

+3.1.3 NUOPC_DriverAddComp - Add a CplComp child to a Driver +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_DriverAddComp()
+   recursive subroutine NUOPC_DriverAddCplComp(driver, srcCompLabel, &
+     dstCompLabel, compSetServicesRoutine, compSetVMRoutine, petList, devList, &
+     info, config, hconfig, comp, rc)
+
ARGUMENTS: +
     type(ESMF_GridComp)                               :: driver
+     character(len=*),    intent(in)                   :: srcCompLabel
+     character(len=*),    intent(in)                   :: dstCompLabel
+ #if defined (__NVCOMPILER) || defined (__PGI) || defined (ESMF_COMPILER_AOCC)
+     interface
+       recursive subroutine compSetServicesRoutine(cplcomp, rc)
+         use ESMF
+         implicit none
+         type(ESMF_CplComp)         :: cplcomp  ! must not be optional
+         integer, intent(out)       :: rc       ! must not be optional
+       end subroutine
+     end interface
+     interface
+       recursive subroutine compSetVMRoutine(cplcomp, rc)
+         use ESMF
+         implicit none
+         type(ESMF_CplComp)         :: cplcomp  ! must not be optional
+         integer, intent(out)       :: rc       ! must not be optional
+       end subroutine
+     end interface
+     optional                                          :: compSetVMRoutine
+ #else
+     abstract interface
+       recursive subroutine SetServicesRoutine(cplcomp, rc)
+         use ESMF
+         implicit none
+         type(ESMF_CplComp)         :: cplcomp  ! must not be optional
+         integer, intent(out)       :: rc       ! must not be optional
+       end subroutine
+       recursive subroutine SetVMRoutine(cplcomp, rc)
+         use ESMF
+         implicit none
+         type(ESMF_CplComp)         :: cplcomp  ! must not be optional
+         integer, intent(out)       :: rc       ! must not be optional
+       end subroutine
+     end interface
+     procedure(SetServicesRoutine)                     :: compSetServicesRoutine
+     procedure(SetVMRoutine),                 optional :: compSetVMRoutine
+ #endif
+     integer, target,     intent(in),         optional :: petList(:)
+     integer, target,     intent(in),         optional :: devList(:)
+     type(ESMF_Info),     intent(in),         optional :: info
+     type(ESMF_Config),   intent(in),         optional :: config
+     type(ESMF_HConfig),  intent(in),         optional :: hconfig
+     type(ESMF_CplComp),  intent(out),        optional :: comp
+     integer,             intent(out),        optional :: rc
+
+DESCRIPTION: +
+ +

+Create and add a CplComp (i.e. Connector) as a child component to a Driver. + The component is created on the provided petList, or by default across + the union of PETs of the components indicated by srcCompLabel + and dstCompLabel. + +

+The specified SetServices() routine is called back immediately after the + new child component has been created internally. + Very little around the component is set up at that time (e.g. NUOPC component + attributes are not yet available at this stage). The routine should therefore + be very light weight, with the sole purpose of setting the entry points of + the component - typically by deriving from a generic component followed by + the appropriate specilizations. + +

+The info argument can be used to pass custom attributes to the child + component. These attributes are available on the component when + compSetVMRoutine() and compSetServicesRoutine() are called. + The attributes provided in info are copied onto the child + component. This allows the same info object to be used for multiple + child components without conflict. + +

+The compLabel must uniquely identify the child component within the + context of the Driver component. + +

+If the comp argument is specified, it will reference the newly created + component on return. + +

+ +

+ +

+3.1.4 NUOPC_DriverAddRunElement - Add RunElement for Model, Mediator, or Driver +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_DriverAddRunElement()
+   recursive subroutine NUOPC_DriverAddRunElementMPL(driver, slot, compLabel, &
+     phaseLabel, relaxedflag, rc)
+
ARGUMENTS: +
     type(ESMF_GridComp)                        :: driver
+     integer,             intent(in)            :: slot
+     character(len=*),    intent(in)            :: compLabel
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     character(len=*),    intent(in),  optional :: phaseLabel
+     logical,             intent(in),  optional :: relaxedflag
+     integer,             intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Add an element associated with a Model, Mediator, or Driver component to the + run sequence of the Driver. The component must have been added to the Driver, + and associated with compLabel prior to this call. + +

+If phaseLabel was not specified, the first entry in the + RunPhaseMap attribute of the referenced component will be used to + determine the run phase of the added element. + +

+By default an error is returned if no component is associated with the + specified compLabel. This error can be suppressed by setting + relaxedflag=.true., and no entry will be added to the run sequence. + +

+The slot number identifies the run sequence time slot in case multiple + sequences are available. Slots start counting from 1. + +

+ +

+ +

+3.1.5 NUOPC_DriverAddRunElement - Add RunElement for Connector +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_DriverAddRunElement()
+   recursive subroutine NUOPC_DriverAddRunElementCPL(driver, slot, srcCompLabel,&
+     dstCompLabel, phaseLabel, relaxedflag, rc)
+
ARGUMENTS: +
     type(ESMF_GridComp)                        :: driver
+     integer,             intent(in)            :: slot
+     character(len=*),    intent(in)            :: srcCompLabel
+     character(len=*),    intent(in)            :: dstCompLabel
+ -- The following arguments require argument keyword syntax (e.g. rc=rc). --
+     character(len=*),    intent(in),  optional :: phaseLabel
+     logical,             intent(in),  optional :: relaxedflag
+     integer,             intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Add an element associated with a Connector component to the + run sequence of the Driver. The component must have been added to the Driver, + and associated with srcCompLabel and dstCompLabel prior to this + call. + +

+If phaseLabel was not specified, the first entry in the + RunPhaseMap attribute of the referenced component will be used to + determine the run phase of the added element. + +

+By default an error is returned if no component is associated with the + specified compLabel. This error can be suppressed by setting + relaxedflag=.true., and no entry will be added to the run sequence. + +

+The slot number identifies the run sequence time slot in case multiple + sequences are available. Slots start counting from 1. + +

+ +

+ +

+3.1.6 NUOPC_DriverAddRunElement - Add RunElement that links to another slot +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_DriverAddRunElement()
+   recursive subroutine NUOPC_DriverAddRunElementL(driver, slot, linkSlot, rc)
+
ARGUMENTS: +
     type(ESMF_GridComp)                        :: driver
+     integer,             intent(in)            :: slot
+     integer,             intent(in)            :: linkSlot
+     integer,             intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Add an element to the run sequence of the Driver that links to the time slot + indicated by linkSlot. + +

+ +

+ +

+3.1.7 NUOPC_DriverEgestRunSequence - Egest the run sequence as FreeFormat +

+ +

+ +

+
+INTERFACE: +

   recursive subroutine NUOPC_DriverEgestRunSequence(driver, freeFormat, rc)
+
ARGUMENTS: +
     type(ESMF_GridComp)                           :: driver
+     type(NUOPC_FreeFormat), intent(out)           :: freeFormat
+     integer,                intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Egest the run sequence stored in the driver as a FreeFormat object. It is the + caller's responsibility to destroy the created freeFormat object. + +

+ +

+ +

+3.1.8 NUOPC_DriverGet - Get info from a Driver +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_DriverGet()
+   recursive subroutine NUOPC_DriverGet(driver, slotCount, parentClock, &
+     importState, exportState, rc)
+
ARGUMENTS: +
     type(ESMF_GridComp)                        :: driver
+     integer,             intent(out), optional :: slotCount
+     type(ESMF_Clock),    intent(out), optional :: parentClock
+     type(ESMF_State),    intent(out), optional :: importState
+     type(ESMF_State),    intent(out), optional :: exportState
+     integer,             intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Access Driver information. + +

+ +

+ +

+3.1.9 NUOPC_DriverGetComp - Get a GridComp child from a Driver +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_DriverGetComp()
+   recursive subroutine NUOPC_DriverGetGridComp(driver, compLabel, comp, petList, &
+     importState, exportState, relaxedflag, rc)
+
ARGUMENTS: +
     type(ESMF_GridComp)                        :: driver
+     character(len=*),    intent(in)            :: compLabel
+     type(ESMF_GridComp), intent(out), optional :: comp
+     integer,             pointer,     optional :: petList(:)
+     type(ESMF_State),    intent(out), optional :: importState
+     type(ESMF_State),    intent(out), optional :: exportState
+     logical,             intent(in),  optional :: relaxedflag
+     integer,             intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Query the Driver for a GridComp (i.e. Model, Mediator, or Driver) child + component that was added under compLabel. + +

+If provided, the petList argument will be associated with the petList + that was used to create the referenced component. This is an internal + allocation owned by the library. This pointer must not be deallocated + by the user! + +

+By default an error is returned if no component is associated with the + specified compLabel. This error can be suppressed by setting + relaxedflag=.true., and unassociated arguments will be returned. + +

+ +

+ +

+3.1.10 NUOPC_DriverGetComp - Get a CplComp child from a Driver +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_DriverGetComp()
+   recursive subroutine NUOPC_DriverGetCplComp(driver, srcCompLabel, &
+     dstCompLabel, comp, petList, relaxedflag, rc)
+
ARGUMENTS: +
     type(ESMF_GridComp)                        :: driver
+     character(len=*),    intent(in)            :: srcCompLabel
+     character(len=*),    intent(in)            :: dstCompLabel
+     type(ESMF_CplComp),  intent(out), optional :: comp
+     integer,             pointer    , optional :: petList(:)
+     logical,             intent(in),  optional :: relaxedflag
+     integer,             intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Query the Driver for a CplComp (i.e. Connector) child + component that was added under compLabel. + +

+If provided, the petList argument will be associated with the petList + that was used to create the referenced component. This is an internal + allocation owned by the library. This pointer must not be deallocated + by the user! + +

+By default an error is returned if no component is associated with the + specified compLabel. This error can be suppressed by setting + relaxedflag=.true., and unassociated arguments will be returned. + +

+ +

+ +

+3.1.11 NUOPC_DriverGetComp - Get all the GridComp child components from a Driver +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_DriverGetComp()
+   recursive subroutine NUOPC_DriverGetAllGridComp(driver, compList, petLists, &
+     rc)
+
ARGUMENTS: +
     type(ESMF_GridComp)                        :: driver
+     type(ESMF_GridComp), pointer, optional     :: compList(:)
+     type(ESMF_PtrInt1D), pointer, optional     :: petLists(:)
+     integer,             intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Get all the GridComp (i.e. Model, Mediator, or Driver) child components from a + Driver. + +

+The incoming compList and petLists arguments must enter + unassociated. This means that the user code must explicitly call + nullify() or use the => null() syntax on the variables passed in + as the actual arguments. + +

+On return it becomes the responsibility of the caller to deallocate + associated compList and petLists arguments: +

+     if (associated(compList)) deallocate(compList)
+     if (associated(petLists)) deallocate(petLists)
+
+ +

+Notice that the petLists(i)%ptr members, if associated, are pointing to + an internal allocation owned by the library. These pointers must not be + deallocated by the user! + +

+ +

+ +

+3.1.12 NUOPC_DriverGetComp - Get all the CplComp child components from a Driver +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_DriverGetComp()
+   recursive subroutine NUOPC_DriverGetAllCplComp(driver, compList, petLists, rc)
+
ARGUMENTS: +
     type(ESMF_GridComp)                        :: driver
+     type(ESMF_CplComp),  pointer               :: compList(:)
+     type(ESMF_PtrInt1D), pointer, optional     :: petLists(:)
+     integer,             intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Get all the CplComp (i.e. Connector) child components from a Driver. + +

+The incoming compList and petLists arguments must enter + unassociated. This means that the user code must explicitly call + nullify() or use the => null() syntax on the variables passed in + as the actual arguments. + +

+On return it becomes the responsibility of the caller to deallocate + associated compList and petLists arguments: +

+     if (associated(compList)) deallocate(compList)
+     if (associated(petLists)) deallocate(petLists)
+
+ +

+Notice that the petLists(i)%ptr members, if associated, are pointing to + an internal allocation owned by the library. These pointers must not be + deallocated by the user! + +

+ +

+ +

+3.1.13 NUOPC_DriverIngestRunSequence - Ingest the run sequence from FreeFormat +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_DriverIngestRunSequence()
+   recursive subroutine NUOPC_DriverIngestRunSequenceFF(driver, freeFormat, &
+     autoAddConnectors, rc)
+
ARGUMENTS: +
     type(ESMF_GridComp)                           :: driver
+     type(NUOPC_FreeFormat), intent(in),  target   :: freeFormat
+     logical,                intent(in),  optional :: autoAddConnectors
+     integer,                intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Ingest the run sequence from a FreeFormat object and replace the + run sequence currently held by the driver. Every line in + freeFormat corresponds to either a component run sequence element, or + is part of a time loop or alarm block defintion. Anything following a + '#' character on a line is considered a comment, and ignored for the purpose + of ingesting run sequence elements. + +

+Component run sequence elements define the run method of a single + component. The lines are interpreted sequentially, however, components + will execute concurrently as long as this is not prevented by + data-dependencies or overlapping petLists. + +

+Each line specifies the precise run method phase for a single component + instance. For model, mediator, and driver components the format is this: + +

+

+     compLabel [phaseLabel]
+
+ Here compLabel is the label by which the component instance is known to + the driver. It is optionally followed a phaseLabel identifying a + specific run phase. An example of calling the run phase of the ATM instance + that contains the "fast" processes, and is labeled fast: + +

+

+     ATM fast
+
+ By default, i.e. without phaseLabel, the first + registered run method of the component is used. + +

+The format for connector components is different. It looks like this: + +

+

+     srcCompLabel -> dstCompLabel [connectionOptions]
+
+ A connector instance is uniquely known by the two components it connects, + i.e. by srcCompLabel and dstCompLabel. The syntax requires that + the token -> be specified between source and destination. Optionally + connectionOptions can be supplied using the format discussed + under section 2.4.5. The connection options are set + as attribute ConnectionOptions on the respective connector component. + +

+An example of executing the connector + instance that transfers fields from the ATM component to the OCN component, + using redistribution for remapping: + +

+

+     ATM -> OCN :remapMethod=redist
+
+ +

+By default autoAddConnectors is .false., which means that all + components referenced in the freeFormat run sequence, including + connectors, must already be available as child components of the driver + component. An error will be returned if this is not the case. + However, when autoAddConnectors is set to .true., connector + components encountered in the run sequence that are no already present in + the driver will be added automatically. The default + NUOPC_Connector implementation is used for all automatically added + connector instances. + +

+Lines that contain a time loop definition have the general format: + +

+

+     @{timeStep|*}[:runDuration]
+       ...
+       ...
+     @
+
+ Both timeStep and runDuration are numbers in units of seconds. + Time loops can be nested and concatenated. + +

+A wildcard "*" character can be specified in place of an actual timeStep + number. In this case the timeStep of the associated run clock object + is set to be equal to the timeStep of the time loop one level up in the + loop nesting hierarchy. + If a wildcard time step is used for a single outer time loop in the run + sequence, then the associated run clock is identical to the driver clock and + must be set explicitly by the driver code, or its parent component. + +

+The runDuration specification is optional. If omitted, the duration of + the associated run clock is set to the timeStep of the time loop one + level up in the loop nesting hierarchy. This ensures that for a single + nested time loop, the loop returns to the parent loop level at the appropriate + time. + +

+A simple example of a single time loop with one hour timestep: + +

+

+     @3600
+       ...
+       ...
+     @
+
+ Each time loop has its own associated clock object. NUOPC manages these clock + objects, i.e. their creation and destruction, as well as startTime, + endTime, timeStep adjustments during the execution. The outer + most time loop of the run sequence is a special case. It uses the driver + clock itself. If a single outer most loop is defined in the run sequence + provided by freeFormat, this loop becomes the driver loop level + directly. Therefore, setting the timeStep or runDuration for + the outer most time loop results modifiying the driver clock itself. + However, for cases with concatenated loops on the upper level of + the run sequence in freeFormat, a single outer loop is added + automatically during ingestion, and the driver clock is used for this loop + instead. + +

+A more complex run sequence example, that shows component run + sequence elements outside of time loops, a nested time loop, time step + wildcards, explicit duration specifications, and concatenated time loops: + +

+

+     @100:800
+       ATM -> OCN
+       OCN -> ATM
+       ATM
+       OCN
+       @*
+         OCN -> EXTOCN
+         EXTOCN
+       @
+     @
+     ATM -> EXTATM
+     EXTATM
+     @100:1000
+       ATM -> OCN
+       OCN -> ATM
+       ATM
+       OCN
+     @
+
+ Here the timeStep of the first time loop is explicitly chosen at + $100s$. The runDuration is explicitly set to $800s$. The first time + loop steps the current time forward for $800s$, for each iteration executing + ATM-OCN coupling, followed by the nested loop that calls the + OCN -> EXTOCN and EXTOCN components. The nested loop uses a + wildcard timeStep and therefore is + identical to the parent loop level timeStep of $100s$. The nested + runDuration is not specified and therefore also defaults to the parent + time step of $100s$. In other words, the nested loop is executed exactly once + for every parent loop iteration. + +

+After $800s$ the first time loop is exited, and followed by explicit calls to + ATM -> EXTAMT and EXTATM components. Finally the second time loop + is entered for another $1000s$ runDuration. The timeStep is again + explicitly set to $100s$. The second time loop only implements ATM-OCN + coupling, and no coupling to EXTOCN is implemented. Finally, after $1800s$ + the sequence returns to the driver level loop. + +

+Lines that contain an alarm block definition have the general format: + +

+

+     @@{alarmTime|*}
+       ...
+       ...
+     @@
+
+ The alarmTime is a number in units of seconds, and indicates at which + interval the alarm will ring. The first ring time of an alarm is the current + time of the parent clock. + +

+Specification of the wildcard character * sets the alarmTime equal to + the timeStep of the parentClock. + +

+When an alarm rings, the entire alarm block is executed once. + +

+Nesting of time loops and alarm blocks is supported. + +

+ +

+ +

+3.1.14 NUOPC_DriverIngestRunSequence - Ingest the run sequence from HConfig +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_DriverIngestRunSequence()
+   recursive subroutine NUOPC_DriverIngestRunSequenceHC(driver, hconfig, &
+     autoAddConnectors, rc)
+
ARGUMENTS: +
     type(ESMF_GridComp)                           :: driver
+     type(ESMF_HConfig),     intent(in)            :: hconfig
+     logical,                intent(in),  optional :: autoAddConnectors
+     integer,                intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Ingest the run sequence from a HConfig object and replace the run sequence + currently held by the driver. The provided hconfig must be a scalar, + or else an error is returned. The scalar is interpreted as a string, broken + into lines at the newline character. Each line is subsequently + interpreted according to the rules described under the FreeFormat version of + the NUOPC_DriverIngestRunSequence() interface. + +

+To preserve newline characters in run sequences expressed in YAML + block notation, it is important to use literals indicated by the + '|' character in YAML. For example: + +

+

+   # A simple run sequence example as a YAML block literal
+   --- |
+    @900:1800          # comments are ignored
+      MED
+      MED -> ATM       # any line can have a comment
+      MED -> OCN
+      ATM
+      OCN
+      ATM -> MED
+      OCN -> MED
+    @
+
+ +

+Notice the leading whitespace character(s) on each line of the block + literal string. YAML requires at least one (1) leading whitespace + character for strings in block notation. + +

+ +

+ +

+3.1.15 NUOPC_DriverNewRunSequence - Replace the run sequence in a Driver +

+ +

+ +

+
+INTERFACE: +

   recursive subroutine NUOPC_DriverNewRunSequence(driver, slotCount, rc)
+
ARGUMENTS: +
     type(ESMF_GridComp)                        :: driver
+     integer,             intent(in)            :: slotCount
+     integer,             intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Replace the current run sequence of the Driver with a new one that has + slotCount slots. Each slot uses its own clock for time keeping. + +

+ +

+ +

+3.1.16 NUOPC_DriverPrint - Print internal Driver information +

+ +

+ +

+
+INTERFACE: +

   recursive subroutine NUOPC_DriverPrint(driver, orderflag, rc)
+
ARGUMENTS: +
     type(ESMF_GridComp)                        :: driver
+     logical,             intent(in),  optional :: orderflag
+     integer,             intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Print internal Driver information. If orderflag is provided and set + to .true., the output is ordered from lowest to highest PET. Setting + this flag makes the method collective. + +

+ +

+ +

+3.1.17 NUOPC_DriverSetRunSequence - Set internals of RunSequence slot +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_DriverSetRunSequence()
+   recursive subroutine NUOPC_DriverSetRunSequence(driver, slot, clock, alarm, rc)
+
ARGUMENTS: +
     type(ESMF_GridComp)                        :: driver
+     integer,             intent(in)            :: slot
+     type(ESMF_Clock),    intent(in)            :: clock
+     type(ESMF_Alarm),    intent(in),  optional :: alarm
+     integer,             intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Set the clock in the run sequence under slot of the Driver. + + +

+ +
+3.2 Generic Component: NUOPC_ModelBase +

+ +

+ +

+ +

+ +

+
+MODULE: +

  module NUOPC_ModelBase
+
+ +

+ +

+
+DESCRIPTION: +
+Partial specialization of a component with a default explicit time dependency. Each time the Run method is called the component steps one timeStep forward on the passed in parent +clock. The component flags incompatibility during Run if the current time of the incoming +clock does not match the current time of the internal clock. + +

+ +

+
+SUPER: +

  ESMF_GridComp
+
+ +

+ +

+
+USE DEPENDENCIES: +

  use ESMF
+
+ +

+ +

+
+SETSERVICES: +

  subroutine SetServices(modelBase, rc)
+    type(ESMF_GridComp)   :: modelBase
+    integer, intent(out)  :: rc
+
+ +

+ +

+
+SEMANTIC SPECIALIZATION LABELS: + +

    +
  • Initialize: + +
      +
    • label_Advertise + +
        +
      • Required in order to advertise fields. +
      • +
      • Use NUOPC_Advertise() to advertise specific fields in the Import- and ExportState of the component. +
      • +
      • Alternatively set the FieldTransferPolicy attribute on the Import- and ExportState of the component to request field mirroring. + +
      • +
      +
    • +
    • label_ModifyAdvertised + +
        +
      • Optional. By default do not modify the advertised fields. +
      • +
      • Mostly used when field mirroring was requested during Advertise. +
      • +
      • Remove undesired advertised fields in the Import- and ExportState of the component. +
      • +
      • Adjust attributes e.g. for TransferOffer on advertised fields. + +
      • +
      +
    • +
    • label_RealizeProvided + +
        +
      • Required in order to realize fields. +
      • +
      • Use NUOPC_Realize() to realize fields previously advertised, and for which this component is responsible for providing the Field allocation and/or the GeomObject. + +
      • +
      +
    • +
    • label_AcceptTransfer + +
        +
      • Optional. By default accept the Distribution of the transferred GeomObjects. +
      • +
      • Change the distribution of any of the transferred GeomObjects. + +
      • +
      +
    • +
    • label_RealizeAccepted + +
        +
      • Optional. Needed for any fields for which component is accepting the GeomObject. +
      • +
      • Use NUOPC_Realize() to realize fields previously advertised, and for which this component is accepting the GeomObject. + +
      • +
      +
    • +
    • label_SetClock + +
        +
      • Optional. By default create clock according to time information provided by driver. +
      • +
      • Adjust and set the component clock. + +
      • +
      +
    • +
    • label_DataInitialize + +
        +
      • Optional. Needed to initialize data, and to participate in resolution of data dependencies between components during initialize. +
      • +
      • Initialize data in fields. +
      • +
      • Set NUOPC attributes used for data dependency resolution. + +
      • +
      +
    • +
    +
  • +
  • Run: + +
      +
    • label_Advance + +
        +
      • Called every timeStep on the component internal clock. +
      • +
      • Implement the forward integration of the model. +
      • +
      • Ensure data in the export fields is updated before returning. + +
      • +
      +
    • +
    • label_AdvanceClock + +
        +
      • Optional. By default the component internal clock is advanced by one internal timeStep at the end of the Advance step. + +
      • +
      +
    • +
    • label_CheckImport + +
        +
      • Optional. By default check the timestamp of all import fields against the current time of the internal clock. + +
      • +
      +
    • +
    • label_SetRunClock + +
        +
      • Optional. By default do not adjust the internal clock when entering Run. + +
      • +
      +
    • +
    • label_TimestampExport + +
        +
      • Optinal. By default timestamp all export fields according to the current time of the component internal clock before returning. + +
      • +
      +
    • +
    +
  • +
  • Finalize: + +
      +
    • label_Finalize + +
        +
      • Optional. By default do nothing. +
      • +
      • Destroy any objects created during Initalize. + +
      • +
      +
    • +
    +
  • +
+ +

+ +

+ +

+ +
+3.3 Generic Component: NUOPC_Model +

+ +

+ +

+ +

+ +

+
+MODULE: +

  module NUOPC_Model
+
+ +

+ +

+
+DESCRIPTION: +
+Model component with a default explicit time dependency. Each time the Run method is called the model integrates one timeStep forward on the passed in parent clock. The internal clock is advanced at the end of each Run call. The component flags incompatibility during Run if the current time of the incoming clock does not match the current time of the internal clock. + +

+ +

+
+SUPER: +

  NUOPC_ModelBase
+
+ +

+ +

+
+USE DEPENDENCIES: +

  use ESMF
+
+ +

+ +

+
+SETSERVICES: +

  subroutine SetServices(model, rc)
+    type(ESMF_GridComp)   :: model
+    integer, intent(out)  :: rc
+
+ +

+ +

+
+SEMANTIC SPECIALIZATION LABELS: + +

    +
  • Initialize: + +
      +
    • label_Advertise + +
        +
      • Required in order to advertise fields. +
      • +
      • Use NUOPC_Advertise() to advertise specific fields in the Import- and ExportState of the component. +
      • +
      • Alternatively set the FieldTransferPolicy attribute on the Import- and ExportState of the component to request field mirroring. + +
      • +
      +
    • +
    • label_ModifyAdvertised + +
        +
      • Optional. By default do not modify the advertised fields. +
      • +
      • Mostly used when field mirroring was requested during Advertise. +
      • +
      • Remove undesired advertised fields in the Import- and ExportState of the component. +
      • +
      • Adjust attributes e.g. for TransferOffer on advertised fields. + +
      • +
      +
    • +
    • label_RealizeProvided + +
        +
      • Required in order to realize fields. +
      • +
      • Use NUOPC_Realize() to realize fields previously advertised, and for which this component is responsible for providing the Field allocation and/or the GeomObject. + +
      • +
      +
    • +
    • label_AcceptTransfer + +
        +
      • Optional. By default accept the Distribution of the transferred GeomObjects. +
      • +
      • Change the distribution of any of the transferred GeomObjects. + +
      • +
      +
    • +
    • label_RealizeAccepted + +
        +
      • Optional. Needed for any fields for which component is accepting the GeomObject. +
      • +
      • Use NUOPC_Realize() to realize fields previously advertised, and for which this component is accepting the GeomObject. + +
      • +
      +
    • +
    • label_SetClock + +
        +
      • Optional. By default create clock according to time information provided by driver. +
      • +
      • Adjust and set the component clock. + +
      • +
      +
    • +
    • label_DataInitialize + +
        +
      • Optional. Needed to initialize data, and to participate in resolution of data dependencies between components during initialize. +
      • +
      • Initialize data in fields. +
      • +
      • Set NUOPC attributes used for data dependency resolution. + +
      • +
      +
    • +
    +
  • +
  • Run: + +
      +
    • label_Advance + +
        +
      • Called every timeStep on the component internal clock. +
      • +
      • Implement the forward integration of the model. +
      • +
      • Ensure data in the export fields is updated before returning. + +
      • +
      +
    • +
    • label_AdvanceClock + +
        +
      • Optional. By default the component internal clock is advanced by one internal timeStep at the end of the Advance step. + +
      • +
      +
    • +
    • label_CheckImport + +
        +
      • Optional. By default check the timestamp of all import fields against the current time of the internal clock. + +
      • +
      +
    • +
    • label_SetRunClock + +
        +
      • Optional. By default do not adjust the internal clock when entering Run. + +
      • +
      +
    • +
    • label_TimestampExport + +
        +
      • Optinal. By default timestamp all export fields according to the current time of the component internal clock before returning. + +
      • +
      +
    • +
    +
  • +
  • Finalize: + +
      +
    • label_Finalize + +
        +
      • Optional. By default do nothing. +
      • +
      • Destroy any objects created during Initalize. + +
      • +
      +
    • +
    +
  • +
+ +

+ +

+ +

+ +

+ +

+ +

+3.3.1 NUOPC_ModelGet - Get info from a Model +

+ +

+ +

+
+INTERFACE: +

   subroutine NUOPC_ModelGet(model, driverClock, modelClock, &
+     importState, exportState, rc)
+
ARGUMENTS: +
     type(ESMF_GridComp)                        :: model
+     type(ESMF_Clock),    intent(out), optional :: driverClock
+     type(ESMF_Clock),    intent(out), optional :: modelClock
+     type(ESMF_State),    intent(out), optional :: importState
+     type(ESMF_State),    intent(out), optional :: exportState
+     integer,             intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Access Model information. + + +

+ +
+3.4 Generic Component: NUOPC_Mediator +

+ +

+ +

+ +

+ +

+
+MODULE: +

  module NUOPC_Mediator
+
+ +

+ +

+
+DESCRIPTION: +
+Mediator component with a default explicit time dependency. Each time the Run method is called, the time stamp on the imported Fields must match the current time (on both the incoming and internal clock). Before returning, the Mediator time stamps the exported Fields with the same current time, before advancing the internal clock one timeStep forward. + +

+ +

+
+SUPER: +

  NUOPC_ModelBase
+
+ +

+ +

+
+USE DEPENDENCIES: +

  use ESMF
+
+ +

+ +

+
+SETSERVICES: +

  subroutine SetServices(mediator, rc)
+    type(ESMF_GridComp)   :: mediator
+    integer, intent(out)  :: rc
+
+ +

+ +

+
+SEMANTIC SPECIALIZATION LABELS: + +

    +
  • Initialize: + +
      +
    • label_Advertise + +
        +
      • Required in order to advertise fields. +
      • +
      • Use NUOPC_Advertise() to advertise specific fields in the Import- and ExportState of the component. +
      • +
      • Alternatively set the FieldTransferPolicy attribute on the Import- and ExportState of the component to request field mirroring. + +
      • +
      +
    • +
    • label_ModifyAdvertised + +
        +
      • Optional. By default do not modify the advertised fields. +
      • +
      • Mostly used when field mirroring was requested during Advertise. +
      • +
      • Remove undesired advertised fields in the Import- and ExportState of the component. +
      • +
      • Adjust attributes e.g. for TransferOffer on advertised fields. + +
      • +
      +
    • +
    • label_RealizeProvided + +
        +
      • Required in order to realize fields. +
      • +
      • Use NUOPC_Realize() to realize fields previously advertised, and for which this component is responsible for providing the Field allocation and/or the GeomObject. + +
      • +
      +
    • +
    • label_AcceptTransfer + +
        +
      • Optional. By default accept the Distribution of the transferred GeomObjects. +
      • +
      • Change the distribution of any of the transferred GeomObjects. + +
      • +
      +
    • +
    • label_RealizeAccepted + +
        +
      • Optional. Needed for any fields for which component is accepting the GeomObject. +
      • +
      • Use NUOPC_Realize() to realize fields previously advertised, and for which this component is accepting the GeomObject. + +
      • +
      +
    • +
    • label_SetClock + +
        +
      • Optional. By default create clock according to time information provided by driver. +
      • +
      • Adjust and set the component clock. + +
      • +
      +
    • +
    • label_DataInitialize + +
        +
      • Optional. Needed to initialize data, and to participate in resolution of data dependencies between components during initialize. +
      • +
      • Initialize data in fields. +
      • +
      • Set NUOPC attributes used for data dependency resolution. + +
      • +
      +
    • +
    +
  • +
  • Run: + +
      +
    • label_Advance + +
        +
      • Called every timeStep on the component internal clock. +
      • +
      • Implement the forward integration of the model. +
      • +
      • Ensure data in the export fields is updated before returning. + +
      • +
      +
    • +
    • label_AdvanceClock + +
        +
      • Optional. By default the component internal clock is advanced by one internal timeStep at the end of the Advance step. + +
      • +
      +
    • +
    • label_CheckImport + +
        +
      • Optional. By default check the timestamp of all import fields against the current time of the internal clock. + +
      • +
      +
    • +
    • label_SetRunClock + +
        +
      • Optional. By default do not adjust the internal clock when entering Run. + +
      • +
      +
    • +
    • label_TimestampExport + +
        +
      • Optinal. By default timestamp all export fields according to the current time of the component internal clock before returning. + +
      • +
      +
    • +
    +
  • +
  • Finalize: + +
      +
    • label_Finalize + +
        +
      • Optional. By default do nothing. +
      • +
      • Destroy any objects created during Initalize. + +
      • +
      +
    • +
    +
  • +
+ +

+ +

+ +

+ +

+ +

+ +

+3.4.1 NUOPC_MediatorGet - Get info from a Mediator +

+ +

+ +

+
+INTERFACE: +

   subroutine NUOPC_MediatorGet(mediator, driverClock, mediatorClock, &
+     importState, exportState, rc)
+
ARGUMENTS: +
     type(ESMF_GridComp)                        :: mediator
+     type(ESMF_Clock),    intent(out), optional :: driverClock
+     type(ESMF_Clock),    intent(out), optional :: mediatorClock
+     type(ESMF_State),    intent(out), optional :: importState
+     type(ESMF_State),    intent(out), optional :: exportState
+     integer,             intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Access Mediator information. + + +

+ +
+3.5 Generic Component: NUOPC_Connector +

+ +

+ +

+ +

+ +

+
+MODULE: +

  module NUOPC_Connector
+
+ +

+ +

+
+DESCRIPTION: +
+Component that makes a unidirectional connection between model, mediator, and or driver components. During initialization field pairing is performed between the import and export side according to section 2.4.2, and paired fields are connected. By default the bilinear regrid method is used during Run to transfer data from the connected import Fields to the connected export Fields. + +

+ +

+
+SUPER: +

  ESMF_CplComp
+
+ +

+ +

+
+USE DEPENDENCIES: +

  use ESMF
+
+ +

+ +

+
+SETSERVICES: +

  subroutine SetServices(connector, rc)
+    type(ESMF_CplComp)    :: connector
+    integer, intent(out)  :: rc
+
+ +

+ +

+
+SEMANTIC SPECIALIZATION LABELS: + +

    +
  • Initialize: + +
      +
    • label_ComputeRouteHandle + +
        +
      • Optional. By default compute routehandles according to CplList attribute. + +
      • +
      +
    • +
    +
  • +
  • Run: + +
      +
    • label_ExecuteRouteHandle + +
        +
      • Optional. By default execute routehandles stored in the Connector. + +
      • +
      +
    • +
    +
  • +
  • Finalize: + +
      +
    • label_ReleaseRouteHandle + +
        +
      • Optional. By default release routehandles stored in the Connector. + +
      • +
      +
    • +
    • label_Finalize + +
        +
      • Optional. By default do nothing. +
      • +
      • Destroy any objects created during Initalize. + +
      • +
      +
    • +
    +
  • +
+ +

+ +

+ +

+ +

+ +

+ +

+3.5.1 NUOPC_ConnectorGet - Get parameters from a Connector +

+ +

+ +

+
+INTERFACE: +

   subroutine NUOPC_ConnectorGet(connector, srcFields, dstFields, rh, state, &
+     CplSet, cplSetList, srcVM, dstVM, driverClock, rc)
+
ARGUMENTS: +
     type(ESMF_CplComp)                            :: connector
+     type(ESMF_FieldBundle), intent(out), optional :: srcFields
+     type(ESMF_FieldBundle), intent(out), optional :: dstFields
+     type(ESMF_RouteHandle), intent(out), optional :: rh
+     type(ESMF_State),       intent(out), optional :: state
+     character(*),           intent(in),  optional :: CplSet
+     character(ESMF_MAXSTR), pointer,     optional :: cplSetList(:)
+     type(ESMF_VM),          intent(out), optional :: srcVM
+     type(ESMF_VM),          intent(out), optional :: dstVM
+     type(ESMF_Clock),       intent(out), optional :: driverClock
+     integer,                intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Get parameters from the connector internal state. + +

+The Connector keeps information about the connection that it implements + in its internal state. When customizing a Connector, it is often necessary + to access and sometimes modify these data objects. + +

+The arguments are: +

+
connector
+
The Connector component. + +
+
[srcFields]
+
The FieldBundle under which the Connector keeps track of all connected + source side fields. The order in which the fields are stored + in srcFields is significant, as it corresponds to the order of + fields in dstFields. Consequently, when accessing and modifying + the fields inside of srcFields, it is important to use the + itemorderflag=ESMF_ITEMORDER_ADDORDER option to + ESMF_FieldBundleGet(). + +
+
[dstFields]
+
The FieldBundle under which the Connector keeps track of all connected + destination side fields. The order in which the fields are stored + in dstFields is significant, as it corresponds to the order of + fields in srcFields. Consequently, when accessing and modifying + the fields inside of dstFields, it is important to use the + itemorderflag=ESMF_ITEMORDER_ADDORDER option to + ESMF_FieldBundleGet(). + +
+
[rh]
+
The RouteHandle that the Connector uses to move data from srcFields + to dstFields. + +
+
[state]
+
A State object that the Connector keeps to make customization of the + Connector more convenient. The generic Connector code handles creation + and destruction of state, but does not access it directly + for information. + +
+
[CplSet]
+
If present, all of the returned information is specific to the specified + coupling set. + +
+
[cplSetList]
+
The list of coupling sets currently known to the Connector. This argument + must enter the call unassociated or an error is returned. This means + that the user code must explicitly call nullify() or use the + => null() syntax on the variable passed in as cplSetList + argument. On return, the cplSetList argument will be associated, + potentially of size zero. The responsibility for deallocation transfers + to the caller. + +
+
[srcVM]
+
The VM of the source side component. + +
+
[dstVM]
+
The VM of the destination side component. + +
+
[driverClock]
+
The Clock object used by the current RunSequence level to drive this + component. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+3.5.2 NUOPC_ConnectorSet - Set parameters in a Connector +

+ +

+ +

+
+INTERFACE: +

   subroutine NUOPC_ConnectorSet(connector, srcFields, dstFields, rh, state, &
+     CplSet, srcVM, dstVM, rc)
+
ARGUMENTS: +
     type(ESMF_CplComp)                            :: connector
+     type(ESMF_FieldBundle), intent(in),  optional :: srcFields
+     type(ESMF_FieldBundle), intent(in),  optional :: dstFields
+     type(ESMF_RouteHandle), intent(in),  optional :: rh
+     type(ESMF_State),       intent(in),  optional :: state
+     character(*),           intent(in),  optional :: CplSet
+     type(ESMF_VM),          intent(in),  optional :: srcVM
+     type(ESMF_VM),          intent(in),  optional :: dstVM
+     integer,                intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Set parameters in the connector internal state. + +

+The Connector keeps information about the connection that it implements + in its internal state. When customizing a Connector, it is often necessary + to access and sometimes modify these data objects. + +

+The arguments are: +

+
connector
+
The Connector component. + +
+
[srcFields]
+
The FieldBundle under which the Connector keeps track of all connected + source side fields. The order in which the fields are stored + in srcFields is significant, as it corresponds to the order of + fields in dstFields. Consequently, when setting srcFields, it + is important to add them in the same order as for dstFields. + +
+
[dstFields]
+
The FieldBundle under which the Connector keeps track of all connected + destination side fields. The order in which the fields are stored + in dstFields is significant, as it corresponds to the order of + fields in srcFields. Consequently, when setting dstFields, it + is important to add them in the same order as for srcFields. + +
+
[rh]
+
The RouteHandle that the Connector uses to move data from srcFields + to dstFields. + +
+
[state]
+
A State object that the Connector keeps to make customization of the + Connector more convenient. Only in very rare cases would the user want + to replace the state that is managed by the generic Connector + implementation. If state is set by this call, the user essentially + claims ownership of the previous state object, and becomes + responsible for its destruction. Ownership of the new state is + transferred to the Connector and must not be explicitly destroyed by the + user code. + +
+
[CplSet]
+
If present, all of the passed in information is set under the specified + coupling set. + +
+
[srcVM]
+
The VM of the source side component. + +
+
[dstVM]
+
The VM of the destination side component. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ + +

+3.6 General Generic Component Methods +

+ +

+ +

+ +

+ +

+3.6.1 NUOPC_CompAreServicesSet - Check if SetServices was called +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_CompAreServicesSet() 
+   function NUOPC_GridCompAreServicesSet(comp, rc)
+
RETURN VALUE: +
     logical :: NUOPC_GridCompAreServicesSet
+
ARGUMENTS: +
     type(ESMF_GridComp), intent(in)            :: comp
+     integer,             intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Return .true. if SetServices has been called for comp. + Otherwise return .false.. + +

+ +

+ +

+3.6.2 NUOPC_CompAreServicesSet - Check if SetServices was called +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_CompAreServicesSet() 
+   function NUOPC_CplCompAreServicesSet(comp, rc)
+
RETURN VALUE: +
     logical :: NUOPC_CplCompAreServicesSet
+
ARGUMENTS: +
     type(ESMF_CplComp), intent(in)            :: comp
+     integer,            intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Return .true. if SetServices has been called for comp. + Otherwise return .false.. + +

+ +

+ +

+3.6.3 NUOPC_CompAttributeAdd - Add NUOPC GridComp Attributes +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_CompAttributeAdd() 
+   subroutine NUOPC_GridCompAttributeAdd(comp, attrList, rc)
+
ARGUMENTS: +
     type(ESMF_GridComp)                       :: comp
+     character(len=*),   intent(in)            :: attrList(:)
+     integer,            intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Add Attributes to the highest level of the standard NUOPC AttPack + hierarchy (convention="NUOPC", purpose="Instance"). + +

+ +

+ +

+3.6.4 NUOPC_CompAttributeAdd - Add NUOPC CplComp Attributes +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_CompAttributeAdd() 
+   subroutine NUOPC_CplCompAttributeAdd(comp, attrList, rc)
+
ARGUMENTS: +
     type(ESMF_CplComp)                        :: comp
+     character(len=*),   intent(in)            :: attrList(:)
+     integer,            intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Add Attributes to the highest level of the standard NUOPC AttPack + hierarchy (convention="NUOPC", purpose="Instance"). + +

+ +

+ +

+3.6.5 NUOPC_CompAttributeEgest - Egest NUOPC GridComp Attributes in FreeFormat +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_CompAttributeEgest() 
+   subroutine NUOPC_GridCompAttributeEge(comp, freeFormat, rc)
+
ARGUMENTS: +
     type(ESMF_GridComp),    intent(in)            :: comp
+     type(NUOPC_FreeFormat), intent(out)           :: freeFormat
+     integer,                intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Egest the Attributes of the highest level of the standard NUOPC AttPack + hierarchy (convention="NUOPC", purpose="Instance") as a FreeFormat object. + It is the caller's responsibility to destroy the created freeFormat + object. + +

+ +

+ +

+3.6.6 NUOPC_CompAttributeEgest - Egest NUOPC CplComp Attributes in FreeFormat +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_CompAttributeEgest() 
+   subroutine NUOPC_CplCompAttributeEge(comp, freeFormat, rc)
+
ARGUMENTS: +
     type(ESMF_CplComp),     intent(in)            :: comp
+     type(NUOPC_FreeFormat), intent(out)           :: freeFormat
+     integer,                intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Egest the Attributes of the highest level of the standard NUOPC AttPack + hierarchy (convention="NUOPC", purpose="Instance") as a FreeFormat object. + It is the caller's responsibility to destroy the created freeFormat + object. + +

+ +

+ +

+3.6.7 NUOPC_CompAttributeGet - Get a NUOPC GridComp Attribute - string +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_CompAttributeGet() 
+   subroutine NUOPC_GridCompAttributeGet(comp, name, value, isPresent, isSet, rc)
+
ARGUMENTS: +
     type(ESMF_GridComp), intent(in)            :: comp
+     character(*),        intent(in)            :: name
+     character(*),        intent(out)           :: value
+     logical,             intent(out), optional :: isPresent
+     logical,             intent(out), optional :: isSet
+     integer,             intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Access the attribute name inside of comp using the + convention NUOPC and purpose Instance. + +

+This call assumes to find a scalar value. An error is returned otherwise. + +

+This call concverts to a string value, regardless of the actual attribute + storage. + +

+Unless isPresent and isSet are provided, return with error if + the attribute is not present or not set, respectively. + +

+The arguments are: +

+
comp
+
The ESMF_GridComp object to be queried. + +
+
name
+
The name of the queried attribute. + +
+
value
+
The value of the queried attribute. + +
+
[isPresent]
+
Set to .true. if the queried attribute is present, .false. + otherwise. + +
+
[isSet]
+
Set to .true. if the queried attribute is set, .false. + otherwise. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+3.6.8 NUOPC_CompAttributeGet - Get a NUOPC CplComp Attribute - string +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_CompAttributeGet() 
+   subroutine NUOPC_CplCompAttributeGet(comp, name, value, isPresent, isSet, rc)
+
ARGUMENTS: +
     type(ESMF_CplComp),  intent(in)            :: comp
+     character(*),        intent(in)            :: name
+     character(*),        intent(out)           :: value
+     logical,             intent(out), optional :: isPresent
+     logical,             intent(out), optional :: isSet
+     integer,             intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Access the attribute name inside of comp using the + convention NUOPC and purpose Instance. + +

+This call assumes to find a scalar value. An error is returned otherwise. + +

+This call concverts to a string value, regardless of the actual attribute + storage. + +

+Unless isPresent and isSet are provided, return with error if + the attribute is not present or not set, respectively. + +

+The arguments are: +

+
comp
+
The ESMF_CplComp object to be queried. + +
+
name
+
The name of the queried attribute. + +
+
value
+
The value of the queried attribute. + +
+
[isPresent]
+
Set to .true. if the queried attribute is present, .false. + otherwise. + +
+
[isSet]
+
Set to .true. if the queried attribute is set, .false. + otherwise. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+3.6.9 NUOPC_CompAttributeGet - Get a NUOPC GridComp Attribute - integer +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_CompAttributeGet() 
+   subroutine NUOPC_GridCompAttributeGetI(comp, name, value, isPresent, isSet, rc)
+
ARGUMENTS: +
     type(ESMF_GridComp), intent(in)            :: comp
+     character(*),        intent(in)            :: name
+     integer,             intent(out)           :: value
+     logical,             intent(out), optional :: isPresent
+     logical,             intent(out), optional :: isSet
+     integer,             intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Access the attribute name inside of comp using the + convention NUOPC and purpose Instance. + +

+Unless isPresent and isSet are provided, return with error if + the attribute is not present or not set, respectively. + +

+The arguments are: +

+
comp
+
The ESMF_GridComp object to be queried. + +
+
name
+
The name of the queried attribute. + +
+
value
+
The value of the queried attribute. + +
+
[isPresent]
+
Set to .true. if the queried attribute is present, .false. + otherwise. + +
+
[isSet]
+
Set to .true. if the queried attribute is set, .false. + otherwise. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+3.6.10 NUOPC_CompAttributeGet - Get a NUOPC CplComp Attribute - integer +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_CompAttributeGet() 
+   subroutine NUOPC_CplCompAttributeGetI(comp, name, value, isPresent, isSet, rc)
+
ARGUMENTS: +
     type(ESMF_CplComp),  intent(in)            :: comp
+     character(*),        intent(in)            :: name
+     integer,             intent(out)           :: value
+     logical,             intent(out), optional :: isPresent
+     logical,             intent(out), optional :: isSet
+     integer,             intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Access the attribute name inside of comp using the + convention NUOPC and purpose Instance. + +

+Unless isPresent and isSet are provided, return with error if + the attribute is not present or not set, respectively. + +

+The arguments are: +

+
comp
+
The ESMF_CplComp object to be queried. + +
+
name
+
The name of the queried attribute. + +
+
value
+
The value of the queried attribute. + +
+
[isPresent]
+
Set to .true. if the queried attribute is present, .false. + otherwise. + +
+
[isSet]
+
Set to .true. if the queried attribute is set, .false. + otherwise. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+3.6.11 NUOPC_CompAttributeGet - Get a NUOPC GridComp Attribute - string list +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_CompAttributeGet() 
+   subroutine NUOPC_GridCompAttributeGetSL(comp, name, valueList, isPresent, &
+     isSet, itemCount, typekind, rc)
+
ARGUMENTS: +
     type(ESMF_GridComp),       intent(in)            :: comp
+     character(*),              intent(in)            :: name
+     character(*),              intent(out), optional :: valueList(:)
+     logical,                   intent(out), optional :: isPresent
+     logical,                   intent(out), optional :: isSet
+     integer,                   intent(out), optional :: itemCount
+     type(ESMF_TypeKind_Flag),  intent(out), optional :: typekind
+     integer,                   intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Access the attribute name inside of comp using the + convention NUOPC and purpose Instance. Returns with error if + the attribute is not present or not set. + +

+Unless isPresent and isSet are provided, return with error if + the attribute is not present or not set, respectively. + +

+The arguments are: +

+
comp
+
The ESMF_GridComp object to be queried. + +
+
name
+
The name of the queried attribute. + +
+
[valueList]
+
The list of values of the queried attribute. + +
+
[isPresent]
+
Set to .true. if the queried attribute is present, .false. + otherwise. + +
+
[isSet]
+
Set to .true. if the queried attribute is set, .false. + otherwise. + +
+
[itemCount]
+
Number of items in the attribute. Return 0 if not present or not set. + +
+
[typekind]
+
The typekind of the queried attribute. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+3.6.12 NUOPC_CompAttributeGet - Get a NUOPC CplComp Attribute - string list +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_CompAttributeGet() 
+   subroutine NUOPC_CplCompAttributeGetSL(comp, name, valueList, isPresent, &
+     isSet, itemCount, typekind, rc)
+
ARGUMENTS: +
     type(ESMF_CplComp),       intent(in)            :: comp
+     character(*),             intent(in)            :: name
+     character(*),             intent(out), optional :: valueList(:)
+     logical,                  intent(out), optional :: isPresent
+     logical,                  intent(out), optional :: isSet
+     integer,                  intent(out), optional :: itemCount
+     type(ESMF_TypeKind_Flag), intent(out), optional :: typekind
+     integer,                  intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Access the attribute name inside of comp using the + convention NUOPC and purpose Instance. Returns with error if + the attribute is not present or not set. + +

+Unless isPresent and isSet are provided, return with error if + the attribute is not present or not set, respectively. + +

+The arguments are: +

+
comp
+
The ESMF_CplComp object to be queried. + +
+
name
+
The name of the queried attribute. + +
+
[valueList]
+
The list of values of the queried attribute. + +
+
[isPresent]
+
Set to .true. if the queried attribute is present, .false. + otherwise. + +
+
[isSet]
+
Set to .true. if the queried attribute is set, .false. + otherwise. + +
+
[itemCount]
+
Number of items in the attribute. Return 0 if not present or not set. + +
+
[typekind]
+
The typekind of the queried attribute. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+3.6.13 NUOPC_CompAttributeGet - Get a NUOPC GridComp Attribute - integer list +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_CompAttributeGet() 
+   subroutine NUOPC_GridCompAttributeGetIL(comp, name, valueList, isPresent, &
+     isSet, itemCount, typekind, rc)
+
ARGUMENTS: +
     type(ESMF_GridComp),       intent(in)            :: comp
+     character(*),              intent(in)            :: name
+     integer,                   intent(out)           :: valueList(:)
+     logical,                   intent(out), optional :: isPresent
+     logical,                   intent(out), optional :: isSet
+     integer,                   intent(out), optional :: itemCount
+     type(ESMF_TypeKind_Flag),  intent(out), optional :: typekind
+     integer,                   intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Access the attribute name inside of comp using the + convention NUOPC and purpose Instance. Returns with error if + the attribute is not present or not set. + +

+Unless isPresent and isSet are provided, return with error if + the attribute is not present or not set, respectively. + +

+The arguments are: +

+
comp
+
The ESMF_GridComp object to be queried. + +
+
name
+
The name of the queried attribute. + +
+
valueList
+
The list of values of the queried attribute. + +
+
[isPresent]
+
Set to .true. if the queried attribute is present, .false. + otherwise. + +
+
[isSet]
+
Set to .true. if the queried attribute is set, .false. + otherwise. + +
+
[itemCount]
+
Number of items in the attribute. Return 0 if not present or not set. + +
+
[typekind]
+
The typekind of the queried attribute. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+3.6.14 NUOPC_CompAttributeGet - Get a NUOPC CplComp Attribute - integer list +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_CompAttributeGet() 
+   subroutine NUOPC_CplCompAttributeGetIL(comp, name, valueList, isPresent, &
+     isSet, itemCount, typekind, rc)
+
ARGUMENTS: +
     type(ESMF_CplComp),       intent(in)            :: comp
+     character(*),             intent(in)            :: name
+     integer,                  intent(out)           :: valueList(:)
+     logical,                  intent(out), optional :: isPresent
+     logical,                  intent(out), optional :: isSet
+     integer,                  intent(out), optional :: itemCount
+     type(ESMF_TypeKind_Flag), intent(out), optional :: typekind
+     integer,                  intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Access the attribute name inside of comp using the + convention NUOPC and purpose Instance. Returns with error if + the attribute is not present or not set. + +

+Unless isPresent and isSet are provided, return with error if + the attribute is not present or not set, respectively. + +

+The arguments are: +

+
comp
+
The ESMF_CplComp object to be queried. + +
+
name
+
The name of the queried attribute. + +
+
valueList
+
The list of values of the queried attribute. + +
+
[isPresent]
+
Set to .true. if the queried attribute is present, .false. + otherwise. + +
+
[isSet]
+
Set to .true. if the queried attribute is set, .false. + otherwise. + +
+
[itemCount]
+
Number of items in the attribute. Return 0 if not present or not set. + +
+
[typekind]
+
The typekind of the queried attribute. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+3.6.15 NUOPC_CompAttributeIngest - Ingest free format NUOPC GridComp Attributes +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_CompAttributeIngest() 
+   subroutine NUOPC_GridCompAttributeIng(comp, freeFormat, addFlag, rc)
+
ARGUMENTS: +
     type(ESMF_GridComp),    intent(in)            :: comp
+     type(NUOPC_FreeFormat), intent(in)            :: freeFormat
+     logical,                intent(in),  optional :: addFlag
+     integer,                intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+ Ingest the Attributes from a FreeFormat object onto the highest level + of the standard NUOPC AttPack hierarchy (convention="NUOPC", + purpose="Instance"). + +

+Important: Attributes ingested by this method are stored as type character + strings, and must be accessed accordingly. Conversion from string into a + different data type, e.g. integer or real, is the user's + responsibility. + +

+If addFlag is .false. (default), an error will be returned if + an attribute is to be ingested that was not previously added to the + comp object. If addFlag is .true., all missing attributes + will be added by this method automatically as needed. + +

+Each line in freeFormat is of this format: + +

+

+       attributeName = attributeValue
+
+ +

+For example: +

+       Verbosity  = 0
+       Profiling  = 0
+       Diagnostic = 0
+
+ could directly be ingested as Attributes for any instance of the four + standard NUOPC component kinds. This is because Verbosity, + Profiling, and Diagnostic are pre-defined Attributes of the + NUOPC component kinds according to sections 2.3.1, + 2.3.2, 2.3.3, and 2.3.4. + +

+When Attributes are specified in freeFormat that are not pre-defined + for a specific component kind, they can still be ingested by a component + instance using the addFlag=.true. option. For instance: +

+       ModelOutputChoice = 2
+
+ specifies a user-level Attribute, which is not part of the pre-defined + Attributes of any of the standard NUOPC component kinds. + +

+ +

+ +

+3.6.16 NUOPC_CompAttributeIngest - Ingest free format NUOPC CplComp Attributes +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_CompAttributeIngest() 
+   subroutine NUOPC_CplCompAttributeIng(comp, freeFormat, addFlag, rc)
+
ARGUMENTS: +
     type(ESMF_CplComp),     intent(in)            :: comp
+     type(NUOPC_FreeFormat), intent(in)            :: freeFormat
+     logical,                intent(in),  optional :: addFlag
+     integer,                intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+ Ingest the Attributes from a FreeFormat object onto the highest level + of the standard NUOPC AttPack hierarchy (convention="NUOPC", + purpose="Instance"). + +

+Important: Attributes ingested by this method are stored as type character + strings, and must be accessed accordingly. Conversion from string into a + different data type, e.g. integer or real, is the user's + responsibility. + +

+If addFlag is .false. (default), an error will be returned if + an attribute is to be ingested that was not previously added to the + comp object. If addFlag is .true., all missing attributes + will be added by this method automatically as needed. + +

+Each line in freeFormat is of this format: + +

+

+       attributeName = attributeValue
+
+ +

+For example: +

+       Verbosity  = 0
+       Profiling  = 0
+       Diagnostic = 0
+
+ could directly be ingested as Attributes for any instance of the four + standard NUOPC component kinds. This is because Verbosity, + Profiling, and Diagnostic are pre-defined Attributes of the + NUOPC component kinds according to sections 2.3.1, + 2.3.2, 2.3.3, and 2.3.4. + +

+When Attributes are specified in freeFormat that are not pre-defined + for a specific component kind, they can still be ingested by a component + instance using the addFlag=.true. option. For instance: +

+       ModelOutputChoice = 2
+
+ specifies a user-level Attribute, which is not part of the pre-defined + Attributes of any of the standard NUOPC component kinds. + +

+ +

+ +

+3.6.17 NUOPC_CompAttributeIngest - Ingest NUOPC GridComp Attributes from HConfig +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_CompAttributeIngest() 
+   subroutine NUOPC_GridCompAttributeIngHC(comp, hconfig, rc)
+
ARGUMENTS: +
     type(ESMF_GridComp),    intent(in)            :: comp
+     type(ESMF_HConfig),     intent(in)            :: hconfig
+     integer,                intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+ Ingest component attributes from a HConfig object onto the highest level + of the standard NUOPC AttPack hierarchy (convention="NUOPC", + purpose="Instance"). + +

+The provided hconfig is expected to be a map. An error is + returned if this condition is not met. Each key-value pair held by + hconfig is added as an attribute to comp. + A copy of the source contents is made. + +

+Transfers of scalar, sequence, and map values + from hconfig are supported. Maps are treated recursively. + Sequences are restricted to scalar elements of the same typekind. + +

+The keys of any map provided by the hconfig object must + be of scalar type. Keys are interpreted as strings when transferred as an + attribute. + +

+Existing attributes with the same key are overridden by this operation. + When attributes are overridden, the typekind of the associated value + element is allowed to change. + +

+

+   # A simple YAML definition of standard NUOPC attributes, followed by
+   # component specific attributes.
+  
+   Verbosity:  4609             # decimal representation of explicit bit pattern
+   Profiling:  low              # pre-defined NUOPC setting
+   Diagnostic: 0                # explicit 0 turns OFF feature
+   CustomSeq1: [1, 2, 3, 4]     # sequence of integers
+   CustomSeq2: [1., 2., 3., 4.] # sequence of floats
+   CustomSeq3: [true, false]    # sequence of bools
+   CustomType: {k1: [a, aa, aaa], k2: b, k3: c}  # complex structure
+
+ +

+ +

+ +

+3.6.18 NUOPC_CompAttributeIngest - Ingest NUOPC CplComp Attributes from HConfig +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_CompAttributeIngest() 
+   subroutine NUOPC_CplCompAttributeIngHC(comp, hconfig, rc)
+
ARGUMENTS: +
     type(ESMF_CplComp),     intent(in)            :: comp
+     type(ESMF_HConfig),     intent(in)            :: hconfig
+     integer,                intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+ Ingest component attributes from a HConfig object onto the highest level + of the standard NUOPC AttPack hierarchy (convention="NUOPC", + purpose="Instance"). + +

+The provided hconfig is expected to be a map. An error is + returned if this condition is not met. Each key-value pair held by + hconfig is added as an attribute to comp. + A copy of the source contents is made. + +

+Transfers of scalar, sequence, and map values + from hconfig are supported. Maps are treated recursively. + Sequences are restricted to scalar elements of the same typekind. + +

+The keys of any map provided by the hconfig object must + be of scalar type. Keys are interpreted as strings when transferred as an + attribute. + +

+Existing attributes with the same key are overridden by this operation. + When attributes are overridden, the typekind of the associated value + element is allowed to change. + +

+

+   # A simple YAML definition of standard NUOPC attributes, followed by
+   # component specific attributes.
+  
+   Verbosity:  4609             # decimal representation of explicit bit pattern
+   Profiling:  low              # pre-defined NUOPC setting
+   Diagnostic: 0                # explicit 0 turns OFF feature
+   CustomSeq1: [1, 2, 3, 4]     # sequence of integers
+   CustomSeq2: [1., 2., 3., 4.] # sequence of floats
+   CustomSeq3: [true, false]    # sequence of bools
+   CustomType: {k1: [a, aa, aaa], k2: b, k3: c}  # complex structure
+
+ +

+ +

+ +

+3.6.19 NUOPC_CompAttributeReset - Reset NUOPC GridComp Attributes +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_CompAttributeReset() 
+   subroutine NUOPC_GridCompAttributeReset(comp, attrList, rc)
+
ARGUMENTS: +
     type(ESMF_GridComp)                       :: comp
+     character(len=*),   intent(in)            :: attrList(:)
+     integer,            intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Reset Attributes on the highest level of the standard NUOPC AttPack + hierarchy (convention="NUOPC", purpose="Instance"). + +

+ +

+ +

+3.6.20 NUOPC_CompAttributeReset - Reset NUOPC CplComp Attributes +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_CompAttributeReset() 
+   subroutine NUOPC_CplCompAttributeReset(comp, attrList, rc)
+
ARGUMENTS: +
     type(ESMF_CplComp)                        :: comp
+     character(len=*),   intent(in)            :: attrList(:)
+     integer,            intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Reset Attributes on the highest level of the standard NUOPC AttPack + hierarchy (convention="NUOPC", purpose="Instance"). + +

+ +

+ +

+3.6.21 NUOPC_CompAttributeSet - Set a NUOPC GridComp Attribute +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_CompAttributeSet() 
+   subroutine NUOPC_GridCompAttributeSetS(comp, name, value, rc)
+
ARGUMENTS: +
     type(ESMF_GridComp)                   :: comp
+     character(*), intent(in)              :: name
+     character(*), intent(in)              :: value
+     integer,      intent(out), optional   :: rc
+
+DESCRIPTION: +
+ +

+Set the Attribute name inside of comp on the highest level + of the standard NUOPC AttPack hierarchy (convention="NUOPC", + purpose="Instance"). + +

+ +

+ +

+3.6.22 NUOPC_CompAttributeSet - Set a NUOPC CplComp Attribute +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_CompAttributeSet() 
+   subroutine NUOPC_CplCompAttributeSetS(comp, name, value, rc)
+
ARGUMENTS: +
     type(ESMF_CplComp)                    :: comp
+     character(*), intent(in)              :: name
+     character(*), intent(in)              :: value
+     integer,      intent(out), optional   :: rc
+
+DESCRIPTION: +
+ +

+Set the Attribute name inside of comp on the highest level + of the standard NUOPC AttPack hierarchy (convention="NUOPC", + purpose="Instance"). + +

+ +

+ +

+3.6.23 NUOPC_CompAttributeSet - Set a NUOPC GridComp Attribute +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_CompAttributeSet() 
+   subroutine NUOPC_GridCompAttributeSetI(comp, name, value, rc)
+
ARGUMENTS: +
     type(ESMF_GridComp)                   :: comp
+     character(*), intent(in)              :: name
+     integer,      intent(in)              :: value
+     integer,      intent(out), optional   :: rc
+
+DESCRIPTION: +
+ +

+Set the Attribute name inside of comp on the highest level + of the standard NUOPC AttPack hierarchy (convention="NUOPC", + purpose="Instance"). + +

+ +

+ +

+3.6.24 NUOPC_CompAttributeSet - Set a NUOPC CplComp Attribute +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_CompAttributeSet() 
+   subroutine NUOPC_CplCompAttributeSetI(comp, name, value, rc)
+
ARGUMENTS: +
     type(ESMF_CplComp)                    :: comp
+     character(*), intent(in)              :: name
+     integer,      intent(in)              :: value
+     integer,      intent(out), optional   :: rc
+
+DESCRIPTION: +
+ +

+Set the Attribute name inside of comp on the highest level + of the standard NUOPC AttPack hierarchy (convention="NUOPC", + purpose="Instance"). + +

+ +

+ +

+3.6.25 NUOPC_CompAttributeSet - Set a NUOPC GridComp List Attribute +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_CompAttributeSet() 
+   subroutine NUOPC_GridCompAttributeSetSL(comp, name, valueList, rc)
+
ARGUMENTS: +
     type(ESMF_GridComp)                   :: comp
+     character(*), intent(in)              :: name
+     character(*), intent(in)              :: valueList(:)
+     integer,      intent(out), optional   :: rc
+
+DESCRIPTION: +
+ +

+Set the Attribute name inside of comp on the highest level + of the standard NUOPC AttPack hierarchy (convention="NUOPC", + purpose="Instance"). + +

+ +

+ +

+3.6.26 NUOPC_CompAttributeSet - Set a NUOPC CplComp List Attribute +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_CompAttributeSet() 
+   subroutine NUOPC_CplCompAttributeSetSL(comp, name, valueList, rc)
+
ARGUMENTS: +
     type(ESMF_CplComp)                    :: comp
+     character(*), intent(in)              :: name
+     character(*), intent(in)              :: valueList(:)
+     integer,      intent(out), optional   :: rc
+
+DESCRIPTION: +
+ +

+Set the Attribute name inside of comp on the highest level + of the standard NUOPC AttPack hierarchy (convention="NUOPC", + purpose="Instance"). + +

+ +

+ +

+3.6.27 NUOPC_CompCheckSetClock - Check Clock compatibility and set stopTime +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_CompCheckSetClock() 
+   subroutine NUOPC_GridCompCheckSetClock(comp, externalClock, checkTimeStep, &
+     forceTimeStep, rc)
+
ARGUMENTS: +
     type(ESMF_GridComp),     intent(inout)         :: comp
+     type(ESMF_Clock),        intent(in)            :: externalClock
+     logical,                 intent(in),  optional :: checkTimeStep
+     logical,                 intent(in),  optional :: forceTimeStep
+     integer,                 intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Compare externalClock to the internal clock of comp to make sure + they match in their current time. Also ensure that the time step of the + external clock is a multiple of the time step of the internal clock. If + both conditions are satisfied then set the stop time of the internal clock + so it is reached in one time step of the external clock. Otherwise leave the + internal clock unchanged and return with error. The direction of + the involved clocks is taking into account. + Setting the forceTimeStep argument to .true. forces the + timeStep of the externalClock to be used to reset the + timeStep of the internal clock. + +

+ +

+ +

+3.6.28 NUOPC_CompDerive - Derive a GridComp from a generic component +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_CompDerive() 
+   recursive subroutine NUOPC_GridCompDerive(comp, genericSetServicesRoutine, rc)
+
ARGUMENTS: +
     type(ESMF_GridComp), intent(in)            :: comp
+     interface
+       subroutine genericSetServicesRoutine(gridcomp, rc)
+         use ESMF
+         implicit none
+         type(ESMF_GridComp)        :: gridcomp ! must not be optional
+         integer, intent(out)       :: rc       ! must not be optional
+       end subroutine
+     end interface
+     integer,             intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Derive a GridComp (i.e. Model, Mediator, or Driver) from a generic + component by calling into the specified SetServices() routine of the + generic component. This is typically the first call in the + SetServices() routine of the specializing component, and is followed + by NUOPC_CompSpecialize() calls. + +

+ +

+ +

+3.6.29 NUOPC_CompDerive - Derive a CplComp from a generic component +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_CompDerive() 
+   recursive subroutine NUOPC_CplCompDerive(comp, genericSetServicesRoutine, rc)
+
ARGUMENTS: +
     type(ESMF_CplComp),  intent(in)            :: comp
+     interface
+       subroutine genericSetServicesRoutine(cplcomp, rc)
+         use ESMF
+         implicit none
+         type(ESMF_CplComp)         :: cplcomp  ! must not be optional
+         integer, intent(out)       :: rc       ! must not be optional
+       end subroutine
+     end interface
+     integer,             intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Derive a CplComp (i.e. Connector) from a generic + component by calling into the specified SetServices() routine of the + generic component. This is typically the first call in the + SetServices() routine of the specializing component, and is followed + by NUOPC_CompSpecialize() calls. + +

+ +

+ +

+3.6.30 NUOPC_CompFilterPhaseMap - Filter the Phase Map of a GridComp +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_CompFilterPhaseMap()
+   subroutine NUOPC_GridCompFilterPhaseMap(comp, methodflag, acceptStringList, &
+     rc)
+
ARGUMENTS: +
     type(ESMF_GridComp)                           :: comp
+     type(ESMF_Method_Flag), intent(in)            :: methodflag
+     character(len=*),       intent(in)            :: acceptStringList(:)
+     integer,                intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Filter all PhaseMap entries in a GridComp (i.e. Model, Mediator, or Driver) + that do not match any entry in the acceptStringList. + +

+ +

+ +

+3.6.31 NUOPC_CompFilterPhaseMap - Filter the Phase Map of a CplComp +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_CompFilterPhaseMap()
+   subroutine NUOPC_CplCompFilterPhaseMap(comp, methodflag, acceptStringList, &
+     rc)
+
ARGUMENTS: +
     type(ESMF_CplComp)                            :: comp
+     type(ESMF_Method_Flag), intent(in)            :: methodflag
+     character(len=*),       intent(in)            :: acceptStringList(:)
+     integer,                intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Filter all PhaseMap entries in a CplComp (i.e. Connector) + that do not match any entry in the acceptStringList. + +

+ +

+ +

+3.6.32 NUOPC_CompGet - Access info from GridComp +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_CompGet()
+   subroutine NUOPC_GridCompGet(comp, name, verbosity, profiling, diagnostic, rc)
+
ARGUMENTS: +
     type(ESMF_GridComp)                       :: comp
+     character(len=*),   intent(out), optional :: name
+     integer,            intent(out), optional :: verbosity
+     integer,            intent(out), optional :: profiling
+     integer,            intent(out), optional :: diagnostic
+     integer,            intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Access information from a GridComp. + +

+ +

+ +

+3.6.33 NUOPC_CompGet - Access info from CplComp +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_CompGet()
+   subroutine NUOPC_CplCompGet(comp, name, verbosity, profiling, diagnostic, rc)
+
ARGUMENTS: +
     type(ESMF_CplComp)                        :: comp
+     character(len=*),   intent(out), optional :: name
+     integer,            intent(out), optional :: verbosity
+     integer,            intent(out), optional :: profiling
+     integer,            intent(out), optional :: diagnostic
+     integer,            intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Access information from a CplComp. + +

+ +

+ +

+3.6.34 NUOPC_CompSearchPhaseMap - Search the Phase Map of a GridComp +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_CompSearchPhaseMap()
+   subroutine NUOPC_GridCompSearchPhaseMap(comp, methodflag, internalflag, &
+     phaseLabel, phaseIndex, rc)
+
ARGUMENTS: +
     type(ESMF_GridComp)                           :: comp
+     type(ESMF_Method_Flag), intent(in)            :: methodflag
+     logical,                intent(in),  optional :: internalflag
+     character(len=*),       intent(in),  optional :: phaseLabel
+     integer,                intent(out)           :: phaseIndex
+     integer,                intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Search all PhaseMap entries in a GridComp (i.e. Model, Mediator, or Driver) + to see if phaseLabel is found. Return the associated ESMF + phaseIndex, or -1 if not found. If phaseLabel is not + specified, set phaseIndex to the first entry in the PhaseMap, or + -1 if there are no entries. The internalflag argument + allows to search the internal phase maps of driver components. The default + is internalflag=.false.. + +

+ +

+ +

+3.6.35 NUOPC_CompSearchPhaseMap - Search the Phase Map of a CplComp +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_CompSearchPhaseMap()
+   subroutine NUOPC_CplCompSearchPhaseMap(comp, methodflag, phaseLabel, &
+     phaseIndex, rc)
+
ARGUMENTS: +
     type(ESMF_CplComp)                            :: comp
+     type(ESMF_Method_Flag), intent(in)            :: methodflag
+     character(len=*),       intent(in),  optional :: phaseLabel
+     integer,                intent(out)           :: phaseIndex
+     integer,                intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Search all PhaseMap entries in a CplComp (i.e. Connector) + to see if phaseLabel is found. Return the associated ESMF + phaseIndex, or -1 if not found. If phaseLabel is not + specified, set phaseIndex to the first entry in the PhaseMap, or + -1 if there are no entries. + +

+ +

+ +

+3.6.36 NUOPC_CompSearchRevPhaseMap - Reverse Search the Phase Map of a GridComp +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_CompSearchRevPhaseMap()
+   subroutine NUOPC_GridCompSearchRevPhaseMap(comp, methodflag, internalflag, &
+     phaseIndex, phaseLabel, rc)
+
ARGUMENTS: +
     type(ESMF_GridComp)                           :: comp
+     type(ESMF_Method_Flag), intent(in)            :: methodflag
+     logical,                intent(in),  optional :: internalflag
+     integer,                intent(in),  optional :: phaseIndex
+     character(len=*),       intent(out)           :: phaseLabel
+     integer,                intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Search all PhaseMap entries in a GridComp (i.e. Model, Mediator, or Driver) + to see if the ESMF phaseIndex is found. Return the associated + phaseLabel, or an empty string if not found. If phaseIndex is not + specified, set phaseLabel to the first entry in the PhaseMap, or + an empty string if there are no entries. The internalflag argument + allows to search the internal phase maps of driver components. The default + is internalflag=.false.. + +

+ +

+ +

+3.6.37 NUOPC_CompSearchRevPhaseMap - Reverse Search the Phase Map of a CplComp +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_CompSearchRevPhaseMap()
+   subroutine NUOPC_CplCompSearchRevPhaseMap(comp, methodflag, phaseIndex, &
+     phaseLabel, rc)
+
ARGUMENTS: +
     type(ESMF_CplComp)                            :: comp
+     type(ESMF_Method_Flag), intent(in)            :: methodflag
+     integer,                intent(in),  optional :: phaseIndex
+     character(len=*),       intent(out)           :: phaseLabel
+     integer,                intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Search all PhaseMap entries in a CplComp (i.e. Connector) + to see if the ESMF phaseIndex is found. Return the associated + phaseLabel, or an empty string if not found. If phaseIndex is not + specified, set phaseLabel to the first entry in the PhaseMap, or + an empty string if there are no entries. + +

+ +

+ +

+3.6.38 NUOPC_CompSetClock - Initialize and set the internal Clock of a GridComp +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_CompSetClock()
+   subroutine NUOPC_GridCompSetClock(comp, externalClock, stabilityTimeStep, rc)
+
ARGUMENTS: +
     type(ESMF_GridComp),     intent(inout)         :: comp
+     type(ESMF_Clock),        intent(in)            :: externalClock
+     type(ESMF_TimeInterval), intent(in),  optional :: stabilityTimeStep
+     integer,                 intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+ +

+Set the component internal clock as a copy of externalClock, but + with a timeStep that is less than or equal to the stabilityTimeStep. + At the same time ensure that the timeStep of the external clock is + a multiple of the timeStep of the internal clock. If the stabilityTimeStep + argument is not provided then the internal clock will simply be set + as a copy of the external clock. + +

+ +

+ +

+3.6.39 NUOPC_CompSetEntryPoint - Set entry point for a GridComp (DEPRECATED!) +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_CompSetEntryPoint()
+   subroutine NUOPC_GridCompSetEntryPoint(comp, methodflag, phaseLabelList, &
+     userRoutine, rc)
+
ARGUMENTS: +
     type(ESMF_GridComp)                     :: comp
+     type(ESMF_Method_Flag), intent(in)      :: methodflag
+     character(len=*),       intent(in)      :: phaseLabelList(:)
+     interface
+       subroutine userRoutine(gridcomp, importState, exportState, clock, rc)
+         use ESMF_CompMod
+         use ESMF_StateMod
+         use ESMF_ClockMod
+         implicit none
+         type(ESMF_GridComp)         :: gridcomp     ! must not be optional
+         type(ESMF_State)            :: importState  ! must not be optional
+         type(ESMF_State)            :: exportState  ! must not be optional
+         type(ESMF_Clock)            :: clock        ! must not be optional
+         integer, intent(out)        :: rc           ! must not be optional
+       end subroutine
+     end interface
+     integer,          intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Set an entry point for a GridComp (i.e. Model, Mediator, or Driver). Publish + the new entry point in the correct PhaseMap component attribute. + +

+Starting with version 8.1.0, the use of this method is deprecated. Components + should instead specialize exclusively using the NUOPC_CompSpecialize() + method. + +

+ +

+ +

+3.6.40 NUOPC_CompSetEntryPoint - Set entry point for a CplComp (DEPRECATED!) +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_CompSetEntryPoint()
+   subroutine NUOPC_CplCompSetEntryPoint(comp, methodflag, phaseLabelList, &
+     userRoutine, rc)
+
ARGUMENTS: +
     type(ESMF_CplComp)                      :: comp
+     type(ESMF_Method_Flag), intent(in)      :: methodflag
+     character(len=*),       intent(in)      :: phaseLabelList(:)
+     interface
+       subroutine userRoutine(cplcomp, importState, exportState, clock, rc)
+         use ESMF_CompMod
+         use ESMF_StateMod
+         use ESMF_ClockMod
+         implicit none
+         type(ESMF_CplComp)          :: cplcomp      ! must not be optional
+         type(ESMF_State)            :: importState  ! must not be optional
+         type(ESMF_State)            :: exportState  ! must not be optional
+         type(ESMF_Clock)            :: clock        ! must not be optional
+         integer, intent(out)        :: rc           ! must not be optional
+       end subroutine
+     end interface
+     integer,          intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Set an entry point for a CplComp (i.e. Connector). Publish + the new entry point in the correct PhaseMap component attribute. + +

+Starting with version 8.1.0, the use of this method is deprecated. Components + should instead specialize exclusively using the NUOPC_CompSpecialize() + method. + +

+ +

+ +

+3.6.41 NUOPC_CompSetInternalEntryPoint - Set internal entry point for a GridComp +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_CompSetInternalEntryPoint()
+   subroutine NUOPC_GridCompSetIntEntryPoint(comp, methodflag, phaseLabelList, &
+     userRoutine, rc)
+
ARGUMENTS: +
     type(ESMF_GridComp)                     :: comp
+     type(ESMF_Method_Flag), intent(in)      :: methodflag
+     character(len=*),       intent(in)      :: phaseLabelList(:)
+     interface
+       subroutine userRoutine(gridcomp, importState, exportState, clock, rc)
+         use ESMF_CompMod
+         use ESMF_StateMod
+         use ESMF_ClockMod
+         implicit none
+         type(ESMF_GridComp)         :: gridcomp     ! must not be optional
+         type(ESMF_State)            :: importState  ! must not be optional
+         type(ESMF_State)            :: exportState  ! must not be optional
+         type(ESMF_Clock)            :: clock        ! must not be optional
+         integer, intent(out)        :: rc           ! must not be optional
+       end subroutine
+     end interface
+     integer,          intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Set an internal entry point for a GridComp (i.e. Driver). Only Drivers + currently utilize internal entry points. Internal entry points allow user + specialization on the driver level during initialization and run sequencing. + +

+ +

+ +

+3.6.42 NUOPC_CompSetServices - Try to find and call SetServices in a shared object +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_CompSetServices()
+   recursive subroutine NUOPC_GridCompSetServices(comp, sharedObj, userRc, rc)
+
ARGUMENTS: +
     type(ESMF_GridComp),     intent(inout)         :: comp
+     character(len=*),        intent(in),  optional :: sharedObj
+     integer,                 intent(out), optional :: userRc
+     integer,                 intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Try to find a routine called "SetServices" in the sharedObj file + and execute the routine. An attempt is made to find a routine that + is close in name to "SetServices", allowing for compiler name + mangling, i.e. upper and lower case, as well as trailing underscores. + The asterisk character (*) is supported as a wildcard for the + file name suffix in sharedObj. When present, the asterisk is replaced + by "so", "dylib", and "dll", in this order, and the first successfully + loaded object is used. If the sharedObj argument is not provided, the + executable itself is searched. + +

+ +

+ +

+3.6.43 NUOPC_CompSetVM - Try to find and call SetVM in a shared object +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_CompSetVM()
+   recursive subroutine NUOPC_GridCompSetVM(comp, sharedObj, userRc, rc)
+
ARGUMENTS: +
     type(ESMF_GridComp),     intent(inout)         :: comp
+     character(len=*),        intent(in),  optional :: sharedObj
+     integer,                 intent(out), optional :: userRc
+     integer,                 intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Try to find a routine called "SetVM" in the sharedObj file + and execute the routine. An attempt is made to find a routine that + is close in name to "SetVM", allowing for compiler name + mangling, i.e. upper and lower case, as well as trailing underscores. + The asterisk character (*) is supported as a wildcard for the + file name suffix in sharedObj. When present, the asterisk is replaced + by "so", "dylib", and "dll", in this order, and the first successfully + loaded object is used. If the sharedObj argument is not provided, the + executable itself is searched. + +

+ +

+ +

+3.6.44 NUOPC_CompSpecialize - Specialize a derived GridComp +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_CompSpecialize()
+   subroutine NUOPC_GridCompSpecialize(comp, specLabel, specPhaseLabel, &
+     specRoutine, rc)
+
ARGUMENTS: +
     type(ESMF_GridComp)                     :: comp
+     character(len=*), intent(in)            :: specLabel
+     character(len=*), intent(in),  optional :: specPhaseLabel
+     interface
+       subroutine specRoutine(gridcomp, rc)
+         use ESMF
+         implicit none
+         type(ESMF_GridComp)        :: gridcomp ! must not be optional
+         integer, intent(out)       :: rc       ! must not be optional
+       end subroutine
+     end interface
+     integer,          intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Specialize a derived GridComp (i.e. Model, Mediator, or Driver). If + specPhaseLabel is specified, the specialization only applies to + the associated phase. Otherwise the specialization applies to all phases. + +

+ +

+ +

+3.6.45 NUOPC_CompSpecialize - Specialize a derived CplComp +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_CompSpecialize()
+   subroutine NUOPC_CplCompSpecialize(comp, specLabel, specPhaseLabel, &
+     specRoutine, rc)
+
ARGUMENTS: +
     type(ESMF_CplComp)                      :: comp
+     character(len=*), intent(in)            :: specLabel
+     character(len=*), intent(in),  optional :: specPhaseLabel
+     interface
+       subroutine specRoutine(cplcomp, rc)
+         use ESMF
+         implicit none
+         type(ESMF_CplComp)         :: cplcomp  ! must not be optional
+         integer, intent(out)       :: rc       ! must not be optional
+       end subroutine
+     end interface
+     integer,          intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Specialize a derived CplComp (i.e. Connector). If + specPhaseLabel is specified, the specialization only applies to + the associated phase. Otherwise the specialization applies to all phases. + + +

+3.7 Field Dictionary Methods +

+ +

+ +

+ +

+ +

+3.7.1 NUOPC_FieldDictionaryAddEntry - Add an entry to the NUOPC Field dictionary +

+ +

+ +

+
+INTERFACE: +

   subroutine NUOPC_FieldDictionaryAddEntry(standardName, canonicalUnits, rc)
+
ARGUMENTS: +
     character(*),                 intent(in)            :: standardName
+     character(*),                 intent(in)            :: canonicalUnits
+     integer,                      intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Add an entry to the NUOPC Field dictionary. If necessary the dictionary is + first set up. + +

+ +

+ +

+3.7.2 NUOPC_FieldDictionaryEgest - Egest NUOPC Field dictionary into FreeFormat +

+ +

+ +

+
+INTERFACE: +

   subroutine NUOPC_FieldDictionaryEgest(freeFormat, iofmt, rc)
+
ARGUMENTS: +
     type(NUOPC_FreeFormat), intent(out)           :: freeFormat
+     type(ESMF_IOFmt_Flag),  intent(in),  optional :: iofmt
+     integer,                intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Egest the contents of the NUOPC Field dictionary into a FreeFormat object. + If I/O format option iofmt is provided and equal to ESMF_IOFMT_YAML, + the FreeFormat object will contain the NUOPC Field dictionary expressed in YAML + format. Other values for iofmt are ignored and this method behaves as if + the optional iofmt argument were missing. In such a case, freeFormat + will contain NUOPC Field dictionary entries in the traditional format. + It is the caller's responsibility to destroy the created freeFormat + object. + +

+ +

+ +

+3.7.3 NUOPC_FieldDictionaryGetEntry - Get information about a NUOPC Field dictionary entry +

+ +

+ +

+
+INTERFACE: +

   subroutine NUOPC_FieldDictionaryGetEntry(standardName, canonicalUnits, rc)
+
ARGUMENTS: +
     character(*),                 intent(in)            :: standardName
+     character(*),                 intent(out), optional :: canonicalUnits
+     integer,                      intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Return the canonical units that the NUOPC Field dictionary associates with + the standardName. + +

+ +

+ +

+3.7.4 NUOPC_FieldDictionaryHasEntry - Check whether the NUOPC Field dictionary has a specific entry +

+ +

+ +

+
+INTERFACE: +

   function NUOPC_FieldDictionaryHasEntry(standardName, rc)
+
RETURN VALUE: +
     logical :: NUOPC_FieldDictionaryHasEntry
+
ARGUMENTS: +
     character(*),                 intent(in)            :: standardName
+     integer,                      intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Return .true. if the NUOPC Field dictionary has an entry with the + specified standardName, .false. otherwise. + +

+ +

+ +

+3.7.5 NUOPC_FieldDictionaryMatchSyno - Check whether the NUOPC Field dictionary considers the standard names synonyms +

+ +

+ +

+
+INTERFACE: +

   function NUOPC_FieldDictionaryMatchSyno(standardName1, standardName2, rc)
+
RETURN VALUE: +
     logical :: NUOPC_FieldDictionaryMatchSyno
+
ARGUMENTS: +
     character(*),                 intent(in)            :: standardName1
+     character(*),                 intent(in)            :: standardName2
+     integer,                      intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Return .true. if the NUOPC Field dictionary considers + standardName1 and standardName2 synonyms, .false. + otherwise. Also, if standardName1 and/or standardName2 do not + correspond to an existing dictionary entry, .false. will be returned. + +

+ +

+ +

+3.7.6 NUOPC_FieldDictionarySetSyno - Set synonyms in the NUOPC Field dictionary +

+ +

+ +

+
+INTERFACE: +

   subroutine NUOPC_FieldDictionarySetSyno(standardNames, rc)
+
ARGUMENTS: +
     character(*),                 intent(in)            :: standardNames(:)
+     integer,                      intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Set all of the elements of the standardNames argument to be considered + synonyms by the field dictionary. Every element in standardNames must + correspond to the standard name of already existing entries in the field + dictionary, or else an error will be returned. + +

+ +

+ +

+3.7.7 NUOPC_FieldDictionarySetup - Setup the default NUOPC Field dictionary +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_FieldDictionarySetup()
+   subroutine NUOPC_FieldDictionarySetupDefault(rc)
+
ARGUMENTS: +
     integer,      intent(out), optional   :: rc
+
+DESCRIPTION: +
+ +

+Setup the default NUOPC Field dictionary. + +

+ +

+ +

+3.7.8 NUOPC_FieldDictionarySetup - Setup the NUOPC Field dictionary from YAML file +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_FieldDictionarySetup()
+   subroutine NUOPC_FieldDictionarySetupFile(fileName, rc)
+
ARGUMENTS: +
     character(len=*),      intent(in)              :: fileName
+     integer,               intent(out), optional   :: rc
+
+DESCRIPTION: +
+ +

+Setup the NUOPC Field dictionary by reading its content from YAML file. + If the NUOPC Field dictionary already exists, remove it and create a new one. + This feature requires ESMF built with YAML support. Please see the + ESMF User's Guide for details. + + +

+3.8 Free Format Methods +

+ +

+ +

+ +

+ +

+3.8.1 NUOPC_FreeFormatAdd - Add lines to a FreeFormat object +

+ +

+ +

+
+INTERFACE: +

   subroutine NUOPC_FreeFormatAdd(freeFormat, stringList, line, rc)
+
ARGUMENTS: +
     type(NUOPC_FreeFormat),           intent(inout) :: freeFormat
+     character(len=*),                 intent(in)    :: stringList(:)
+     integer,                optional, intent(in)    :: line
+     integer,                optional, intent(out)   :: rc
+
+DESCRIPTION: +
+ +

+Add lines to a FreeFormat object. The capacity of freeFormat may + increase during this operation. The new lines provided in stringList + are added starting at position line. If line is greater than the + current lineCount of freeFormat, blank lines are inserted to + fill the gap. By default, i.e. without specifying the line argument, + the elements in stringList are added to the end of the + freeFormat object. + +

+ +

+ +

+3.8.2 NUOPC_FreeFormatCreate - Create a FreeFormat object +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_FreeFormatCreate()
+   function NUOPC_FreeFormatCreateDefault(freeFormat, stringList, capacity, rc)
+
RETURN VALUE: +
     type(NUOPC_FreeFormat) :: NUOPC_FreeFormatCreateDefault
+
ARGUMENTS: +
     type(NUOPC_FreeFormat), optional, intent(in)  :: freeFormat
+     character(len=*),       optional, intent(in)  :: stringList(:)
+     integer,                optional, intent(in)  :: capacity
+     integer,                optional, intent(out) :: rc
+
+DESCRIPTION: +
+ +

+Create a new FreeFormat object, which by default is empty. + If freeFormat is provided, then the newly created object starts as + a copy of freeFormat. If stringList is provided, then it is + added to the end of the newly created object. If capacity is provided, + it is used for the initial creation of the newly created FreeFormat + object. However, if the freeFormat or stringList arguments are + present, the final capacity may be larger than specified by capacity. + +

+ +

+ +

+3.8.3 NUOPC_FreeFormatCreate - Create a FreeFormat object from Config +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_FreeFormatCreate()
+   function NUOPC_FreeFormatCreateRead(config, label, relaxedflag, rc)
+
RETURN VALUE: +
     type(NUOPC_FreeFormat) :: NUOPC_FreeFormatCreateRead
+
ARGUMENTS: +
     type(ESMF_Config)                            :: config
+     character(len=*),      intent(in)            :: label
+     logical,               intent(in),  optional :: relaxedflag
+     integer,               intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Create a new FreeFormat object from ESMF_Config object. The config + object must exist, and label must reference either a single line + or a table attribute within config. The content of the attribute is + read and returned in the newly created FreeFormat object. + +

+By default an error is returned if label is not found in config. + This error can be suppressed by setting relaxedflag=.true., in which + case an empty FreeFormat object is returned. + +

+ +

+ +

+3.8.4 NUOPC_FreeFormatDestroy - Destroy a FreeFormat object +

+ +

+ +

+
+INTERFACE: +

   subroutine NUOPC_FreeFormatDestroy(freeFormat, rc)
+
ARGUMENTS: +
     type(NUOPC_FreeFormat),           intent(inout) :: freeFormat
+     integer,                optional, intent(out)   :: rc
+
+DESCRIPTION: +
+ +

+Destroy a FreeFormat object. All internal memory is deallocated. + +

+ +

+ +

+3.8.5 NUOPC_FreeFormatGet - Get information from a FreeFormat object +

+ +

+ +

+
+INTERFACE: +

   subroutine NUOPC_FreeFormatGet(freeFormat, lineCount, capacity, stringList, rc)
+
ARGUMENTS: +
     type(NUOPC_FreeFormat),                       intent(in)  :: freeFormat
+     integer,                            optional, intent(out) :: lineCount
+     integer,                            optional, intent(out) :: capacity
+     character(len=NUOPC_FreeFormatLen), optional, pointer     :: stringList(:)
+     integer,                            optional, intent(out) :: rc
+
+DESCRIPTION: +
+ +

+Get information from a FreeFormat object. + +

+ +

+ +

+3.8.6 NUOPC_FreeFormatGetLine - Get line info from a FreeFormat object +

+ +

+ +

+
+INTERFACE: +

   subroutine NUOPC_FreeFormatGetLine(freeFormat, line, commentChar, lineString, &
+     tokenCount, tokenList, rc)
+
ARGUMENTS: +
     type(NUOPC_FreeFormat),                       intent(in)  :: freeFormat
+     integer,                                      intent(in)  :: line
+     character,                          optional, intent(in)  :: commentChar
+     character(len=NUOPC_FreeFormatLen), optional, intent(out) :: lineString
+     integer,                            optional, intent(out) :: tokenCount
+     character(len=NUOPC_FreeFormatLen), optional, intent(out) :: tokenList(:)
+     integer,                            optional, intent(out) :: rc
+
+DESCRIPTION: +
+ +

+Get information about a specific line in a FreeFormat object. If + commentChar is specified, anything on the line, starting with + commentChar is considered a comment, and subsequently ignored. + +

+ +

+ +

+3.8.7 NUOPC_FreeFormatLog - Write a FreeFormat object to the default Log +

+ +

+ +

+
+INTERFACE: +

   subroutine NUOPC_FreeFormatLog(freeFormat, rc)
+
ARGUMENTS: +
     type(NUOPC_FreeFormat),           intent(in)    :: freeFormat
+     integer,                optional, intent(out)   :: rc
+
+DESCRIPTION: +
+ +

+Write a FreeFormat object to the default Log. + +

+ +

+ +

+3.8.8 NUOPC_FreeFormatPrint - Print a FreeFormat object +

+ +

+ +

+
+INTERFACE: +

   subroutine NUOPC_FreeFormatPrint(freeFormat, rc)
+
ARGUMENTS: +
     type(NUOPC_FreeFormat),           intent(in)    :: freeFormat
+     integer,                optional, intent(out)   :: rc
+
+DESCRIPTION: +
+ +

+Print a FreeFormat object. + + +

+3.9 Utility Routines +

+ +

+ +

+ +

+ +

+3.9.1 NUOPC_AddNamespace - Add a nested state with Namespace to a State +

+ +

+ +

+
+INTERFACE: +

   subroutine NUOPC_AddNamespace(state, Namespace, nestedStateName, &
+     nestedState, rc)
+
ARGUMENTS: +
     type(ESMF_State), intent(inout)         :: state
+     character(len=*), intent(in)            :: Namespace
+     character(len=*), intent(in),  optional :: nestedStateName
+     type(ESMF_State), intent(out), optional :: nestedState
+     integer,          intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Add a Namespace to state. Namespaces are implemented via nested + states. This creates a nested state inside of state. The nested state + is returned as nestedState. If provided, nestedStateName will + be used to name the newly created nested state. The default name of the + nested state is equal to Namespace. + +

+The arguments are: +

+
state
+
The ESMF_State object to which the Namespace is added. + +
+
Namespace
+
The Namespace string. + +
+
[nestedStateName]
+
Name of the nested state. Defaults to Namespace. + +
+
[nestedState]
+
Optional return of the newly created nested state. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+3.9.2 NUOPC_AddNestedState - Add a nested state to a state with NUOPC attributes +

+ +

+ +

+
+INTERFACE: +

   subroutine NUOPC_AddNestedState(state, Namespace, CplSet, nestedStateName, &
+     vm, nestedState, rc)
+
ARGUMENTS: +
     type(ESMF_State), intent(inout)         :: state
+     character(len=*), intent(in),  optional :: Namespace
+     character(len=*), intent(in),  optional :: CplSet
+     character(len=*), intent(in),  optional :: nestedStateName
+     type(ESMF_VM),    intent(in),  optional :: vm
+     type(ESMF_State), intent(out), optional :: nestedState
+     integer,          intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+ Create a nested state inside of state. The arguments Namespace + and tt CplSet are used to set NUOPC attributes on the newly created + state. The nested state is returned as nestedState. If provided, + nestedStateName will be used to name the newly created nested state. + The default name of the nested state is equal to + Namespace_CplSet, Namespace, or CplSet if the + arguments are provided. + +

+The arguments are: +

+
state
+
The ESMF_State object to which the namespace is added. + +
+
[Namespace]
+
Optional The Namespace string. Defaults to "__UNSPECIFIED__". + +
+
[CplSet]
+
Optional The CplSet string. Defaults to "__UNSPECIFIED__". + +
+
[nestedStateName]
+
Name of the nested state. Defaults to Namespace_CplSet, + Namespace, or CplSet if arguments are provided. + +
+
[vm]
+
If present, the nested state object is created on the specified + ESMF_VM object. The default is to create the nested state object + on the VM of the current component context. + +
+
[nestedState]
+
Optional return of the newly created nested state. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+3.9.3 NUOPC_Advertise - Advertise a single Field in a State +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_Advertise() 
+   subroutine NUOPC_AdvertiseField(state, StandardName, Units, &
+     LongName, ShortName, name, TransferOfferGeomObject, SharePolicyField, &
+     SharePolicyGeomObject, vm, field, rc)
+
ARGUMENTS: +
     type(ESMF_State), intent(inout)         :: state
+     character(*),     intent(in)            :: StandardName
+     character(*),     intent(in),  optional :: Units
+     character(*),     intent(in),  optional :: LongName
+     character(*),     intent(in),  optional :: ShortName
+     character(*),     intent(in),  optional :: name
+     character(*),     intent(in),  optional :: TransferOfferGeomObject
+     character(*),     intent(in),  optional :: SharePolicyField
+     character(*),     intent(in),  optional :: SharePolicyGeomObject
+     type(ESMF_VM),    intent(in),  optional :: vm
+     type(ESMF_Field), intent(out), optional :: field
+     integer,          intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+ Advertise a field in a state. This creates an empty field and adds it to + state. The "StandardName", "Units", "LongName", "ShortName", and + "TransferOfferGeomObject" attributes of the field are set according to the + provided input.. + +

+The call checks the provided information against the NUOPC Field Dictionary + to ensure correctness. Defaults are set according to the NUOPC Field + Dictionary. + +

+The arguments are: +

+
state
+
The ESMF_State object through which the field is advertised. + +
+
StandardName
+
The "StandardName" attribute of the advertised field. Must be a + StandardName found in the NUOPC Field Dictionary. +
+NOTE that if by below default rules, StandardName is also used as + the input for name, then it must not contain the slash ("/") + character. + +
+
[Units]
+
The "Units" attribute of the advertised field. Must be convertible to the + canonical units specified in the NUOPC Field Dictionary for the specified + StandardName. (Currently this is restricted to be identical to the + canonical untis specified in the NUOPC Field Dictionary.) + If omitted, the default is to use the canonical units associated with + the StandardName in the NUOPC Field Dictionary. + +
+
[LongName]
+
The "LongName" attribute of the advertised field. NUOPC does not restrict + the value of this attribute. + If omitted, the default is to use the StandardName. + +
+
[ShortName]
+
The "ShortName" attribute of the advertised field. NUOPC does not restrict + the value of this attribute. + If omitted, the default is to use the StandardName. +
+NOTE that if by below default rules, ShortName is also used as + the input for name, then it must not contain the slash ("/") + character. + +
+
[name]
+
The actual name of the advertised field by which it is accessed in the + state object. The string provided for name must not contain the + slash ("/") character. + If omitted, the default is to use the value of the ShortName. + +
+
[TransferOfferGeomObject]
+
If the state intent of state is ESMF_STATEINTENT_EXPORT, + the "ProducerTransferOffer" attribute of the advertised field is set. + If the state intent of state is ESMF_STATEINTENT_IMPORT, + the "ConsumerTransferOffer" attribute of the advertised field is set. + NUOPC controls the vocabulary of this attribute. Valid options are + "will provide", "can provide", "cannot provide". + If omitted, the default is "will provide". + +
+
[SharePolicyField]
+
The "SharePolicyField" attribute of the advertised field. NUOPC + controls the vocabulary of this attribute. Valid options are + "share", and "not share". + If omitted, the default is "not share". + +
+
[SharePolicyGeomObject]
+
The "SharePolicyGeomObject" attribute of the advertised field. NUOPC + controls the vocabulary of this attribute. Valid options are + "share", and "not share". + If omitted, the default is equal to SharePolicyField. + +
+
[vm]
+
If present, the Field object used during advertising is created on the + specified ESMF_VM object. The default is to create the Field object + on the VM of the current component context. + +
+
[field]
+
Returns the empty field object that was used to advertise. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+3.9.4 NUOPC_Advertise - Advertise a list of Fields in a State +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_Advertise() 
+   subroutine NUOPC_AdvertiseFields(state, StandardNames, &
+     TransferOfferGeomObject, SharePolicyField, SharePolicyGeomObject, vm, rc)
+
ARGUMENTS: +
     type(ESMF_State), intent(inout)         :: state
+     character(*),     intent(in)            :: StandardNames(:)
+     character(*),     intent(in),  optional :: TransferOfferGeomObject
+     character(*),     intent(in),  optional :: SharePolicyField
+     character(*),     intent(in),  optional :: SharePolicyGeomObject
+     type(ESMF_VM),    intent(in),  optional :: vm
+     integer,          intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+ Advertise a list of fields in a state. This creates a list of empty fields + and adds it to the state. The "StandardName", "TransferOfferGeomObject", + "SharePolicyField", and "SharePolicyGeomObject" attributes of all the + fields are set according to the provided input. The "Units", "LongName", + and "ShortName" attributes for each field are set according to the defaults + documented under method 3.9.3 + +

+The call checks the provided information against the NUOPC Field Dictionary + to ensure correctness. + +

+The arguments are: +

+
state
+
The ESMF_State object through which the fields are advertised. + +
+
StandardNames
+
A list of "StandardName" attributes of the advertised fields. Must be + StandardNames found in the NUOPC Field Dictionary. + +
+
[TransferOfferGeomObject]
+
The "TransferOfferGeomObject" attribute of the advertised fields. This + setting applies to all the fields advertised in this call. NUOPC + controls the vocabulary of this attribute. Valid options are + "will provide", "can provide", "cannot provide". + If omitted, the default is "will provide". + +
+
[SharePolicyField]
+
The "SharePolicyField" attribute of the advertised fields. This + setting applies to all the fields advertised in this call. NUOPC + controls the vocabulary of this attribute. Valid options are + "share", and "not share". + If omitted, the default is "not share". + +
+
[SharePolicyGeomObject]
+
The "SharePolicyGeomObject" attribute of the advertised fields. This + setting applies to all the fields advertised in this call. NUOPC + controls the vocabulary of this attribute. Valid options are + "share", and "not share". + If omitted, the default is equal to SharePolicyField. + +
+
[vm]
+
If present, the Field objects used during advertising are created on the + specified ESMF_VM object. The default is to create the Field + objects on the VM of the current component context. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+3.9.5 NUOPC_AdjustClock - Adjust the timestep in a clock +

+ +

+ +

+
+INTERFACE: +

   subroutine NUOPC_AdjustClock(clock, maxTimestep, rc)
+
ARGUMENTS: +
     type(ESMF_Clock)                               :: clock
+     type(ESMF_TimeInterval), intent(in),  optional :: maxTimestep
+     integer,                 intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Adjust the clock to have a potentially smaller timestep. The timestep + on the incoming clock object is compared to the maxTimestep, and + reset to the smaller of the two. + +

+The arguments are: +

+
clock
+
The clock to be adjusted. + +
+
[maxTimestep]
+
Upper bound of the timestep allowed in clock. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+3.9.6 NUOPC_CheckSetClock - Check a Clock for compatibility and set its values +

+ +

+ +

+
+INTERFACE: +

   subroutine NUOPC_CheckSetClock(setClock, checkClock, setStartTimeToCurrent, &
+     currTime, forceCurrTime, checkTimeStep, forceTimeStep, rc)
+
ARGUMENTS: +
     type(ESMF_Clock),        intent(inout)         :: setClock
+     type(ESMF_Clock),        intent(in)            :: checkClock
+     logical,                 intent(in),  optional :: setStartTimeToCurrent
+     type(ESMF_Time),         intent(in),  optional :: currTime
+     logical,                 intent(in),  optional :: forceCurrTime
+     logical,                 intent(in),  optional :: checkTimeStep
+     logical,                 intent(in),  optional :: forceTimeStep
+     integer,                 intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+By default compare setClock to checkClock to ensure they match + in their current time. Further ensure that the timeStep of checkClock + is a multiple of the timeStep of setClock. If both conditions are + satisfied then the stopTime of the setClock is set one + checkClock timeStep, or setClock runDuration, ahead of the + current time, which ever is shorter. The direction of checkClock + is considered when setting the stopTime. + +

+By default the startTime of the setClock is not modified. However, if + setStartTimeToCurrent == .true. the startTime of setClock is set + to the currentTime of checkClock. + +

+The arguments are: +

+
setClock
+
The ESMF_Clock object to be checked and set. + +
+
checkClock
+
The reference clock object. + +
+
[setStartTimeToCurrent]
+
If .true. then also set the startTime in setClock according to + the startTime in checkClock. The default is .false.. + +
+
[currTime]
+
If provided, use currTime instead of checkClock when checking + or setting the current time of setClock. + +
+
[forceCurrTime]
+
If .true. then do not check the current time of the + setClock, but instead force it to align with the checkClock, + or currTime, if it was provided. The default is .false.. + +
+
[checkTimeStep]
+
If .true. then check that timeStep of the + setClock can reach the next increment on the checkClock + by an integer number of steps. For .false. do not check this + condition. The default is .true.. + +
+
[forceTimeStep]
+
If .true. then do not use the timeStep of the + setClock to check if the next increment on the checkClock + can be reached in an integer number of steps. Instead set the + timeStep of the setClock to the timeStep of the + checkClock. The default is .false.. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+3.9.7 NUOPC_GetAttribute - Get the value of a NUOPC Field Attribute +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_GetAttribute()
+   subroutine NUOPC_GetAttributeFieldVal(field, name, value, isPresent, isSet, rc)
+
ARGUMENTS: +
     type(ESMF_Field), intent(in)            :: field
+     character(*),     intent(in)            :: name
+     character(*),     intent(out)           :: value
+     logical,          intent(out), optional :: isPresent
+     logical,          intent(out), optional :: isSet
+     integer,          intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Access the attribute name inside of field using the + convention NUOPC and purpose Instance. + +

+Unless isPresent and isSet are provided, return with error if + the Attribute is not present or not set, respectively. + +

+The arguments are: +

+
field
+
The ESMF_Field object to be queried. + +
+
name
+
The name of the queried attribute. + +
+
value
+
The value of the queried attribute. + +
+
[isPresent]
+
Set to .true. if the queried attribute is present, .false. + otherwise. + +
+
[isSet]
+
Set to .true. if the queried attribute is set, .false. + otherwise. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+3.9.8 NUOPC_GetAttribute - Get the typekind of a NUOPC Field Attribute +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_GetAttribute()
+   subroutine NUOPC_GetAttributeFieldTK(field, name, isPresent, isSet, &
+     itemCount, typekind, rc)
+
ARGUMENTS: +
     type(ESMF_Field),         intent(in)            :: field
+     character(*),             intent(in)            :: name
+     logical,                  intent(out), optional :: isPresent
+     logical,                  intent(out), optional :: isSet
+     integer,                  intent(out), optional :: itemCount
+     type(ESMF_TypeKind_Flag), intent(out), optional :: typekind
+     integer,                  intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Query the typekind of the attribute name inside of field + using the convention NUOPC and purpose Instance. + +

+Unless isPresent and isSet are provided, return with error if + the Attribute is not present or not set, respectively. + +

+The arguments are: +

+
field
+
The ESMF_Field object to be queried. + +
+
name
+
The name of the queried attribute. + +
+
[isPresent]
+
Set to .true. if the queried attribute is present, .false. + otherwise. + +
+
[isSet]
+
Set to .true. if the queried attribute is set, .false. + otherwise. + +
+
[itemCount]
+
Number of items in the attribute. Return 0 if not present or not set. + +
+
[typekind]
+
The typekind of the queried attribute. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+3.9.9 NUOPC_GetAttribute - Get the value of a NUOPC State Attribute +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_GetAttribute()
+   subroutine NUOPC_GetAttributeState(state, name, value, isPresent, isSet, &
+     itemCount, typekind, rc)
+
ARGUMENTS: +
     type(ESMF_State),         intent(in)            :: state
+     character(*),             intent(in)            :: name
+     character(*),             intent(out), optional :: value
+     logical,                  intent(out), optional :: isPresent
+     logical,                  intent(out), optional :: isSet
+     integer,                  intent(out), optional :: itemCount
+     type(ESMF_TypeKind_Flag), intent(out), optional :: typekind
+     integer,                  intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Access the attribute name inside of state using the + convention NUOPC and purpose Instance. Returns with error if + the attribute is not present or not set. + +

+Unless isPresent and isSet are provided, return with error if + the Attribute is not present or not set, respectively. + +

+The arguments are: +

+
state
+
The ESMF_State object to be queried. + +
+
name
+
The name of the queried attribute. + +
+
[value]
+
The value of the queried attribute. + +
+
[isPresent]
+
Set to .true. if the queried attribute is present, .false. + otherwise. + +
+
[isSet]
+
Set to .true. if the queried attribute is set, .false. + otherwise. + +
+
[itemCount]
+
Number of items in the attribute. Return 0 if not present or not set. + +
+
[typekind]
+
The typekind of the queried attribute. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+3.9.10 NUOPC_GetStateMemberLists - Build lists of information of State members +

+ +

+ +

+
+INTERFACE: +

   subroutine NUOPC_GetStateMemberLists(state, StandardNameList, &
+     ConnectedList, NamespaceList, CplSetList, itemNameList, fieldList, &
+     stateList, nestedFlag, rc)
+
ARGUMENTS: +
     type(ESMF_State),       intent(in)            :: state
+     character(ESMF_MAXSTR), pointer, optional     :: StandardNameList(:)
+     character(ESMF_MAXSTR), pointer, optional     :: ConnectedList(:)
+     character(ESMF_MAXSTR), pointer, optional     :: NamespaceList(:)
+     character(ESMF_MAXSTR), pointer, optional     :: CplSetList(:)
+     character(ESMF_MAXSTR), pointer, optional     :: itemNameList(:)
+     type(ESMF_Field),       pointer, optional     :: fieldList(:)
+     type(ESMF_State),       pointer, optional     :: stateList(:)
+     logical,                intent(in), optional  :: nestedFlag
+     integer,                intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Construct lists containing the StandardNames, field names, and connected + status of the fields in state. Return this information in the + list arguments. Recursively parse through nested States. + +

+All pointer arguments present must enter this method unassociated. This + means that the user code must explicitly call nullify() or use the + => null() syntax on the variables passed in as any of the pointer + arguments. On return, the pointer arguments may either be unassociated or + associated. Consequently the user code must first check the status of any + of the returned pointer arguments via the associated() intrinsic + before accessing the argument. The responsibility for deallocation of + associated pointer arguments transfers to the caller. + +

+The arguments are: +

+
state
+
The ESMF_State object to be queried. + +
+
[StandardNameList]
+
If present, return a list of the "StandardName" attribute of each member. + See the note about pointer arguments in the description section above for + correct usage. + +
+
[ConnectedList]
+
If present, return a list of the "Connected" attribute of each member. + See the note about pointer arguments in the description section above for + correct usage. + +
+
[NamespaceList]
+
If present, return a list of the "Namespace" attribute of each member. + See the note about pointer arguments in the description section above for + correct usage. + +
+
[CplSetList]
+
If present, return a list of the "CplSet" attribute of each member. + See the note about pointer arguments in the description section above for + correct usage. + +
+
[itemNameList]
+
If present, return a list of each member name. + See the note about pointer arguments in the description section above for + correct usage. + +
+
[fieldList]
+
If present, return a list of the member fields. + See the note about pointer arguments in the description section above for + correct usage. + +
+
[stateList]
+
If present, return a list of the states corresonding to the owner of the + fields returned under fieldList. + See the note about pointer arguments in the description section above for + correct usage. + +
+
[nestedFlag]
+
When set to .true., returns information from nested States (default). + When set to .false., returns information at the current State level only. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+3.9.11 NUOPC_GetStateMemberCount - Determing number of State members +

+ +

+ +

+
+INTERFACE: +

   subroutine NUOPC_GetStateMemberCount(state, fieldCount, nestedFlag, rc)
+
ARGUMENTS: +
     type(ESMF_State),       intent(in)            :: state
+     integer,                intent(out), optional :: fieldCount
+     logical,                intent(in),  optional :: nestedFlag
+     integer,                intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Determine the number of fields in state. By default recursively parse + through nested States. + +

+The arguments are: +

+
state
+
The ESMF_State object to be queried. + +
+
[fieldCount]
+
Number of fields. + +
+
[nestedFlag]
+
When set to .true., returns information from nested States (default). + When set to .false., returns information at the current State level only. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+3.9.12 NUOPC_GetTimestamp - Get the timestamp of a Field +

+ +

+ +

+
+INTERFACE: +

   subroutine NUOPC_GetTimestamp(field, isValid, time, rc)
+
ARGUMENTS: +
     type(ESMF_Field), intent(in)            :: field
+     logical,          intent(out), optional :: isValid
+     type(ESMF_Time),  intent(out), optional :: time
+     integer,          intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Access the timestamp on field in form of an ESMF_Time object. + +

+The arguments are: +

+
field
+
The ESMF_Field object to be checked. + +
+
[isValid]
+
Set to .true. if the timestamp is valid, .false. otherwise. + +
+
[time]
+
The timestamp as ESMF_Time object. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+3.9.13 NUOPC_IngestPetList - Ingest a petList from FreeFormat +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_IngestPetList()
+   subroutine NUOPC_IngestPetListFF(petList, freeFormat, rc)
+
ARGUMENTS: +
     integer, allocatable,   intent(out)           :: petList(:)
+     type(NUOPC_FreeFormat), intent(in),  target   :: freeFormat
+     integer,                intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Construct a petList from a FreeFormat object. + +

+The arguments are: +

+
petList
+
The constructed petList. The size and content is set by this method. + +
+
freeFormat
+
The incoming petList information in free format. The format supports + two types of elements: + +
    +
  • Single PET elements consist of a single number referring to the PET. +
  • +
  • Block elements consist of two PET numbers, separated by a "-" + character. No white spaces are accepted between the dash and the + PET numbers. A block element includes all of the PETs between the + lower bound (left PET number), and the upper bound (right PET + number), bounds inclusive. The upper bound must not be + less than the lower bound. + +
  • +
+ Any number of elements may be listed in the free format. The idividual + elements are separated by white spaces. + +

+For an example, the free format petList definition +

+       "2-5 12 0 15-23"
+
+ would translate into a petList output of +
+       (/2, 3, 4, 5, 12, 0, 15, 16, 17, 18, 19, 20, 21, 22, 23/)
+
+ +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+3.9.14 NUOPC_IngestPetList - Ingest a petList from HConfig +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_IngestPetList()
+   subroutine NUOPC_IngestPetListHC(petList, hconfig, rc)
+
ARGUMENTS: +
     integer, allocatable,   intent(out)           :: petList(:)
+     type(ESMF_HConfig),     intent(in)            :: hconfig
+     integer,                intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Construct a petList from a HConfig object. + +

+The arguments are: +

+
petList
+
The constructed petList. The size and content is set by this method. + +
+
hconfig
+
The incoming petList information as HConfig. The provided hconfig + must be a scalar, or a list of lists and scalars. The input is recursively + processed, and each scalar fed into the FreeFormat version of the + NUOPC_IngestPetList() interface as a single string. The resulting + petList is the union of all PETs determined by all of the elements + contained in hconfig. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+3.9.15 NUOPC_IsAtTime - Check if a Field is at the given Time +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_IsAtTime()
+   function NUOPC_IsAtTimeField(field, time, rc)
+
RETURN VALUE: +
     logical :: NUOPC_IsAtTimeField
+
ARGUMENTS: +
     type(ESMF_Field), intent(in)            :: field
+     type(ESMF_Time),  intent(in)            :: time
+     integer,          intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Returns .true. if field has a timestamp + that matches time. Otherwise returns .false.. On PETs + with only a proxy instance of the field, .true. is returned + regardless of the actual timestamp. + +

+The arguments are: +

+
field
+
The ESMF_Field object to be checked. + +
+
time
+
The time to compare against. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+3.9.16 NUOPC_IsAtTime - Check if Field(s) in a State are at the given Time +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_IsAtTime()
+   function NUOPC_IsAtTimeState(state, time, fieldName, count, fieldList, rc)
+
RETURN VALUE: +
     logical :: NUOPC_IsAtTimeState
+
ARGUMENTS: +
     type(ESMF_State),              intent(in)            :: state
+     type(ESMF_Time),               intent(in)            :: time
+     character(*),                  intent(in),  optional :: fieldName
+     integer,                       intent(out), optional :: count
+     type(ESMF_Field), allocatable, intent(out), optional :: fieldList(:)
+     integer,                       intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Return .true. if the field(s) in state have a timestamp + that matches time. Otherwise return .false.. + +

+The arguments are: +

+
state
+
The ESMF_State object to be checked. + +
+
time
+
The time to compare against. + +
+
[fieldName]
+
The name of the field in state to be checked. If provided, and + the state does not contain a field with fieldName, return an + error in rc. If not provided, check all the fields contained + in state and return .true. if all the fields are at the + correct time. + +
+
[count]
+
If provided, the number of fields that are at time are returned. If + fieldName is present then count cannot be greater than 1. + +
+
[fieldList]
+
If provided, the fields that are not at time are returned. If + fieldName is present then fieldList can contain a maximum of + 1 field. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+3.9.17 NUOPC_IsConnected - Check if a Field is connected +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_IsConnected()
+   function NUOPC_IsConnectedField(field, rc)
+
RETURN VALUE: +
     logical :: NUOPC_IsConnectedField
+
ARGUMENTS: +
     type(ESMF_Field), intent(in)            :: field
+     integer,          intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Return .true. if the field is connected. + Otherwise return .false.. + +

+The arguments are: +

+
field
+
The ESMF_Field object to be checked. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+3.9.18 NUOPC_IsConnected - Check if Field(s) in a State are connected +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_IsConnected()
+   function NUOPC_IsConnectedState(state, fieldName, count, rc)
+
RETURN VALUE: +
     logical :: NUOPC_IsConnectedState
+
ARGUMENTS: +
     type(ESMF_State), intent(in)            :: state
+     character(*),     intent(in),  optional :: fieldName
+     integer,          intent(out), optional :: count
+     integer,          intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Return .true. if the field(s) in state are connected. Otherwise + return .false.. + +

+The arguments are: +

+
state
+
The ESMF_State object to be checked. + +
+
[fieldName]
+
The name of the field in state to be checked. If provided, and + the state does not contain a field with fieldName, return an + error in rc. If not provided, check all the fields contained + in state and return .true. if all the fields are connected. + +
+
[count]
+
If provided, the number of fields that are connected are returned. If + fieldName is present then count cannot be greater than 1. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+3.9.19 NUOPC_IsUpdated - Check if a Field is marked as updated +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_IsUpdated()
+   function NUOPC_IsUpdatedField(field, rc)
+
RETURN VALUE: +
     logical :: NUOPC_IsUpdatedField
+
ARGUMENTS: +
     type(ESMF_Field), intent(in)            :: field
+     integer,          intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Return .true. if the field has its "Updated" + attribute set to "true". Otherwise return .false.. + +

+The arguments are: +

+
field
+
The ESMF_Field object to be checked. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+3.9.20 NUOPC_IsUpdated - Check if Field(s) in a State are marked as updated +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_IsUpdated()
+   function NUOPC_IsUpdatedState(state, fieldName, count, rc)
+
RETURN VALUE: +
     logical :: NUOPC_IsUpdatedState
+
ARGUMENTS: +
     type(ESMF_State), intent(in)            :: state
+     character(*),     intent(in),  optional :: fieldName
+     integer,          intent(out), optional :: count
+     integer,          intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Return .true. if the field(s) in state have the "Updated" + attribute set to "true". Otherwise return .false.. + +

+The arguments are: +

+
state
+
The ESMF_State object to be checked. + +
+
[fieldName]
+
The name of the field in state to be checked. If provided, and + the state does not contain a field with fieldName, return an + error in rc. If not provided, check all the fields contained + in state and return .true. if all the fields are updated. + +
+
[count]
+
If provided, the number of fields that are updated are returned. If + fieldName is present then count cannot be greater than 1. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+3.9.21 NUOPC_NoOp - No-Operation attachable method for GridComp +

+ +

+ +

+
+INTERFACE: +

   subroutine NUOPC_NoOp(gcomp, rc)
+
ARGUMENTS: +
     type(ESMF_GridComp)   :: gcomp
+     integer, intent(out)  :: rc
+
+DESCRIPTION: +
+ +

+No-Op method with an interface that matches the + requirements for a attachable method for ESMF_GridComp objects. + +

+The arguments are: +

+
gcomp
+
The ESMF_GridComp object to which this method is attached. + +
+
rc
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+3.9.22 NUOPC_Realize - Realize previously advertised Fields inside a State on a single Grid with internal allocation +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_Realize()
+   subroutine NUOPC_RealizeCompleteG(state, grid, fieldName, typekind, &
+     staggerloc, selection, dataFillScheme, field, rc)
+
ARGUMENTS: +
     type(ESMF_State)                                :: state
+     type(ESMF_Grid),          intent(in)            :: grid
+     character(*),             intent(in),  optional :: fieldName
+     type(ESMF_TypeKind_Flag), intent(in),  optional :: typekind
+     type(ESMF_StaggerLoc),    intent(in),  optional :: staggerloc
+     character(len=*),         intent(in),  optional :: selection
+     character(len=*),         intent(in),  optional :: dataFillScheme    
+     type(ESMF_Field),         intent(out), optional :: field
+     integer,                  intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+ +

+Realize or remove fields inside of state according to selection. + All of the fields that are realized are created internally on the same + grid object, allocating memory for as many field dimensions as there + are grid dimensions. + +

+The type and kind of the created fields is according to argument + typekind. + +

+Realized fields are filled with data according to the dataFillScheme + argument. + +

+The arguments are: +

+
state
+
The ESMF_State object in which the fields are realized. + +
+
grid
+
The ESMF_Grid object on which to realize the fields. + +
+
[fieldName]
+
The name of the field in state to be realized, or removed, according + to selection. If provided, and the state does not contain a field + with name fieldName, return an error in rc. If not provided, + realize all the fields contained in state according to + selection. + +
+
[typekind]
+
The typekind of the internally created field(s). The valid options are + ESMF_TYPEKIND_I4, ESMF_TYPEKIND_I8, + ESMF_TYPEKIND_R4, and ESMF_TYPEKIND_R8. + By default use the typekind of the partially created field used + during advertise, or ESMF_TYPEKIND_R8, if the advertised field + did not have a typekind defined. + +
+
[staggerloc]
+
Stagger location of data in grid cells. By default use the same + stagger location as the advertising field, or + ESMF_STAGGERLOC_CENTER if the advertising field was created empty. + +
+
[selection]
+
Selection of mode of operation: + +
    +
  • "realize_all" (default) +
  • +
  • "realize_connected_remove_others" +
  • +
  • "realize_connected+provide_remove_others" + +
  • +
+ +
+
[dataFillScheme]
+
Realized fields will be filled according to the selected fill + scheme. See ESMF_FieldFill() for fill schemes. Default is to leave + the data in realized fields uninitialized. + +
+
[field]
+
Returns the completed field that was realized by this method. This option + is only supported if also argument fieldName was specified. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+3.9.23 NUOPC_Realize - Realize previously advertised Fields inside a State on a single LocStream with internal allocation +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_Realize()
+   subroutine NUOPC_RealizeCompleteLS(state, locstream, fieldName, typekind, selection,&
+     dataFillScheme, field, rc)
+
ARGUMENTS: +
     type(ESMF_State)                                :: state
+     type(ESMF_LocStream),     intent(in)            :: locstream
+     character(*),             intent(in),  optional :: fieldName
+     type(ESMF_TypeKind_Flag), intent(in),  optional :: typekind
+     character(len=*),         intent(in),  optional :: selection
+     character(len=*),         intent(in),  optional :: dataFillScheme    
+     type(ESMF_Field),         intent(out), optional :: field
+     integer,                  intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+ +

+Realize or remove fields inside of state according to selection. + All of the fields that are realized are created internally on the same + locstream object, allocating memory accordingly. + +

+The type and kind of the created fields is according to argument + typekind. + +

+Realized fields are filled with data according to the dataFillScheme + argument. + +

+The arguments are: +

+
state
+
The ESMF_State object in which the fields are realized. + +
+
locstream
+
The ESMF_LocStream object on which to realize the fields. + +
+
[fieldName]
+
The name of the field in state to be realized, or removed, according + to selection. If provided, and the state does not contain a field + with name fieldName, return an error in rc. If not provided, + realize all the fields contained in state according to + selection. + +
+
[typekind]
+
The typekind of the internally created field(s). The valid options are + ESMF_TYPEKIND_I4, ESMF_TYPEKIND_I8, + ESMF_TYPEKIND_R4, and ESMF_TYPEKIND_R8. + By default use the typekind of the partially created field used + during advertise, or ESMF_TYPEKIND_R8, if the advertised field + did not have a typekind defined. + +
+
[selection]
+
Selection of mode of operation: + +
    +
  • "realize_all" (default) +
  • +
  • "realize_connected_remove_others" + +
  • +
+ +
+
[dataFillScheme]
+
Realized fields will be filled according to the selected fill + scheme. See ESMF_FieldFill() for fill schemes. Default is to leave + the data in realized fields uninitialized. + +
+
[field]
+
Returns the completed field that was realized by this method. This option + is only supported if also argument fieldName was specified. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+3.9.24 NUOPC_Realize - Realize previously advertised Fields inside a State on a single Mesh with internal allocation +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_Realize()
+   subroutine NUOPC_RealizeCompleteM(state, mesh, fieldName, typekind, &
+     meshloc, selection, dataFillScheme, field, rc)
+
ARGUMENTS: +
     type(ESMF_State)                                :: state
+     type(ESMF_Mesh),          intent(in)            :: mesh
+     character(*),             intent(in),  optional :: fieldName
+     type(ESMF_TypeKind_Flag), intent(in),  optional :: typekind
+     type(ESMF_MeshLoc),       intent(in),  optional :: meshloc
+     character(len=*),         intent(in),  optional :: selection
+     character(len=*),         intent(in),  optional :: dataFillScheme
+     type(ESMF_Field),         intent(out), optional :: field
+     integer,                  intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+ +

+Realize or remove fields inside of state according to selection. + All of the fields that are realized are created internally on the same + mesh object, allocating memory accordingly. + +

+The type and kind of the created fields is according to argument + typekind. + +

+Realized fields are filled with data according to the dataFillScheme + argument. + +

+The arguments are: +

+
state
+
The ESMF_State object in which the fields are realized. + +
+
mesh
+
The ESMF_Mesh object on which to realize the fields. + +
+
[fieldName]
+
The name of the field in state to be realized, or removed, according + to selection. If provided, and the state does not contain a field + with name fieldName, return an error in rc. If not provided, + realize all the fields contained in state according to + selection. + +
+
[typekind]
+
The typekind of the internally created field(s). The valid options are + ESMF_TYPEKIND_I4, ESMF_TYPEKIND_I8, + ESMF_TYPEKIND_R4, and ESMF_TYPEKIND_R8. + By default use the typekind of the partially created field used + during advertise, or ESMF_TYPEKIND_R8, if the advertised field + did not have a typekind defined. + +
+
[meshloc]
+
Location of data in the mesh cell. By default use the same + mesh location as the advertising field, or + ESMF_STAGGERLOC_NODE if the advertising field was created empty. + +
+
[selection]
+
Selection of mode of operation: + +
    +
  • "realize_all" (default) +
  • +
  • "realize_connected_remove_others" + +
  • +
+ +
+
[dataFillScheme]
+
Realized fields will be filled according to the selected fill + scheme. See ESMF_FieldFill() for fill schemes. Default is to leave + the data in realized fields uninitialized. + +
+
[field]
+
Returns the completed field that was realized by this method. This option + is only supported if also argument fieldName was specified. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+3.9.25 NUOPC_Realize - Realize a previously advertised Field in a State +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_Realize()
+   subroutine NUOPC_RealizeField(state, field, rc)
+
ARGUMENTS: +
     type(ESMF_State), intent(inout)         :: state
+     type(ESMF_Field), intent(in)            :: field
+     integer,          intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+ +

+Realize a previously advertised field in state by replacing the + advertised field with field of the same name. + +

+The arguments are: +

+
state
+
The ESMF_State object in which the fields are realized. + +
+
field
+
The new field to put in place of the previously advertised (empty) field. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+3.9.26 NUOPC_Realize - Realize a previously advertised Field in a State after Transfer of GeomObject +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_Realize()
+   subroutine NUOPC_RealizeTransfer(state, fieldName, typekind, gridToFieldMap, &
+     ungriddedLBound, ungriddedUBound, totalLWidth, totalUWidth, &
+     realizeOnlyConnected, removeNotConnected, realizeOnlyNotShared, &
+     realizeOnlyNotComplete, field, rc)
+
ARGUMENTS: +
     type(ESMF_State)                                :: state
+     character(*),             intent(in)            :: fieldName
+     type(ESMF_TypeKind_Flag), intent(in),  optional :: typekind
+     integer, target,          intent(in),  optional :: gridToFieldMap(:)
+     integer, target,          intent(in),  optional :: ungriddedLBound(:)
+     integer, target,          intent(in),  optional :: ungriddedUBound(:)
+     integer,                  intent(in),  optional :: totalLWidth(:)
+     integer,                  intent(in),  optional :: totalUWidth(:)
+     logical,                  intent(in),  optional :: realizeOnlyConnected
+     logical,                  intent(in),  optional :: removeNotConnected
+     logical,                  intent(in),  optional :: realizeOnlyNotShared
+     logical,                  intent(in),  optional :: realizeOnlyNotComplete
+     type(ESMF_Field),         intent(out), optional :: field
+     integer,                  intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+ +

+Realize a field where GeomObject has been set by the NUOPC GeomObject + transfer protocol. + +

+The data of the realized field is left uninitialized by this method. + +

+The arguments are: +

+
state
+
The ESMF_State object in which the field is realized. + +
+
fieldName
+
The name of the field in state to be realized. If state does + not contain a field with name fieldName, return an error in + rc. + +
+
[typekind]
+
The typekind of the internally created field(s). The valid options are + ESMF_TYPEKIND_I4, ESMF_TYPEKIND_I8, + ESMF_TYPEKIND_R4, and ESMF_TYPEKIND_R8. + By default use the typekind of the connected provider field. + +
+
[gridToFieldMap]
+
The mapping of grid/mesh dimensions against field dimensions. The argument + is of rank 1 and with a size of dimCount. The elements correspond to the + grid/mesh elements in order, and associates it with the indicated + field dimension. Only entries between 1 and the field rank are allowed. + There must be no duplicate entries in gridToFieldMap. + By default use the gridToFieldMap of the connected provider field. + +
+
[ungriddedLBound]
+
Lower bounds of the ungridded dimensions of the field. The number of + elements defines the number of ungridded dimensions of the field and + must be consistent with ungriddedUBound. + By default use the ungriddedLBound of the connected provider field. + +
+
[ungriddedUBound]
+
Upper bounds of the ungridded dimensions of the field. The number of + elements defines the number of ungridded dimensions of the field and + must be consistent with ungriddedLBound. + By default use the ungriddedLBound of the connected provider field. + +
+
[totalLWidth]
+
This argument is only supported for fields defined on + ESMF_Grid. + The number elements outside the lower bound of the exclusive region. + The argument is of rank 1 and with a size of dimCount, the number of + gridded dimensions of the field. The ordering of the dimensions is that + of the field (considering gridToFieldMap). + By default a zero vector is used, resulting in no elements outside the + exclusive region. + +
+
[totalUWidth]
+
This argument is only supported for fields defined on + ESMF_Grid. + The number elements outside the upper bound of the exclusive region. + The argument is of rank 1 and with a size of dimCount, the number of + gridded dimensions of the field. The ordering of the dimensions is that + of the field (considering gridToFieldMap). + By default a zero vector is used, resulting in no elements outside the + exclusive region. + +
+
[realizeOnlyConnected]
+
If set to .false., realize the specified field irregardless of the + connected status. If set to .true., only a connected field will be + realized. The default is .true.. + +
+
[removeNotConnected]
+
If set to .false., do not remove a field from the state due to its + connected status. If set to .true., remove the field if it is not + connected. This requires realizeOnlyConnected to be .true., + and a runtime error will be returned otherwise. + The default is .true.. + +
+
[realizeOnlyNotShared]
+
If set to .false., realize the specified field irregardless of its + shared status. If set to .true., only a field that has + "ShareStatusField" set to "not shared" will be realized. + The default is .true.. + +
+
[realizeOnlyNotComplete]
+
If set to .false., realize the specified field irregardless of its + complete status. If set to .true., only a field that has not yet + been completed will be realized. + The default is .true.. + +
+
[field]
+
Returns the completed field that was realized by this method. An invalid + field object will be returned if the conditions were such that the field + was not realized. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+3.9.27 NUOPC_SetAttribute - Set the value of a NUOPC Field Attribute +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_SetAttribute()
+   subroutine NUOPC_SetAttributeField(field, name, value, rc)
+
ARGUMENTS: +
     type(ESMF_Field)                      :: field
+     character(*), intent(in)              :: name
+     character(*), intent(in)              :: value
+     integer,      intent(out), optional   :: rc
+
+DESCRIPTION: +
+ +

+Set the attribute name inside of field using the + convention NUOPC and purpose Instance. + +

+The arguments are: +

+
field
+
The ESMF_Field object on which to set the attribute. + +
+
name
+
The name of the set attribute. + +
+
value
+
The value of the set attribute. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+3.9.28 NUOPC_SetAttribute - Set the value of a NUOPC State Attribute +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_SetAttribute()
+   subroutine NUOPC_SetAttributeState(state, name, value, rc)
+
ARGUMENTS: +
     type(ESMF_State)                      :: state
+     character(*), intent(in)              :: name
+     character(*), intent(in)              :: value
+     integer,      intent(out), optional   :: rc
+
+DESCRIPTION: +
+ +

+Set the attribute name inside of state using the + convention NUOPC and purpose Instance. + +

+The arguments are: +

+
state
+
The ESMF_State object on which to set the attribute. + +
+
name
+
The name of the set attribute. + +
+
value
+
The value of the set attribute. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+3.9.29 NUOPC_SetTimestamp - Set the TimeStamp on a Field +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_SetTimestamp()
+   subroutine NUOPC_SetTimestampField(field, time, rc)
+
ARGUMENTS: +
     type(ESMF_Field), intent(inout)         :: field
+     type(ESMF_Time),  intent(in)            :: time
+     integer,          intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Set the TimeStamp according to time on field. + +

+This call should rarely be needed in user written code. + +

+The arguments are: +

+
field
+
The ESMF_Field object to be time stampped. + +
+
time
+
The ESMF_Time object defining the TimeStamp. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+3.9.30 NUOPC_SetTimestamp - Set the TimeStamp on Fields in a list +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_SetTimestamp()
+   subroutine NUOPC_SetTimestampFieldList(fieldList, time, selective, rc)
+
ARGUMENTS: +
     type(ESMF_Field), intent(inout)         :: fieldList(:)
+     type(ESMF_Time),  intent(in)            :: time
+     logical,          intent(in),  optional :: selective
+     integer,          intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Set the TimeStamp according to time on field. + +

+This call should rarely be needed in user written code. + +

+The arguments are: +

+
fieldList
+
The list of ESMF_Field objects to be time stampped. + +
+
time
+
The ESMF_Time object defining the TimeStamp. + +
+
[selective]
+
If .true., then only set the TimeStamp on those fields + for which the "Updated" attribute is equal to "true". Otherwise set the + TimeStamp on all the fields. Default is .false.. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+3.9.31 NUOPC_SetTimestamp - Set the TimeStamp on Fields in a list from Clock +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_SetTimestamp()
+   subroutine NUOPC_SetTimestampFieldListClk(fieldList, clock, selective, rc)
+
ARGUMENTS: +
     type(ESMF_Field), intent(inout)         :: fieldList(:)
+     type(ESMF_Clock), intent(in)            :: clock
+     logical,          intent(in),  optional :: selective
+     integer,          intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Set the TimeStamp according to time on field. + +

+This call should rarely be needed in user written code. + +

+The arguments are: +

+
fieldList
+
The list of ESMF_Field objects to be time stampped. + +
+
clock
+
The ESMF_Clock object defining the TimeStamp by its current time. + +
+
[selective]
+
If .true., then only set the TimeStamp on those fields + for which the "Updated" attribute is equal to "true". Otherwise set the + TimeStamp on all the fields. Default is .false.. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+3.9.32 NUOPC_SetTimestamp - Set the TimeStamp on all the Fields in a State +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_SetTimestamp()
+   subroutine NUOPC_SetTimestampState(state, time, selective, rc)
+
ARGUMENTS: +
     type(ESMF_State), intent(inout)         :: state
+     type(ESMF_Time),  intent(in)            :: time
+     logical,          intent(in),  optional :: selective
+     integer,          intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Set the TimeStamp according to clock on all the fields in + state. Depending on selective, all or only some fields may be + updated. + +

+This call should rarely be needed in user written code. It is used + by the generic Connector. + +

+The arguments are: +

+
state
+
The ESMF_State object holding the fields to be time stampped. + +
+
time
+
The ESMF_Time object defining the TimeStamp. + +
+
[selective]
+
If .true., then only set the TimeStamp on those fields + for which the "Updated" attribute is equal to "true". Otherwise set the + TimeStamp on all the fields. Default is .false.. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+3.9.33 NUOPC_SetTimestamp - Set the TimeStamp on all the Fields in a State from Clock +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_SetTimestamp()
+   subroutine NUOPC_SetTimestampStateClk(state, clock, selective, rc)
+
ARGUMENTS: +
     type(ESMF_State), intent(inout)         :: state
+     type(ESMF_Clock), intent(in)            :: clock
+     logical,          intent(in),  optional :: selective
+     integer,          intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Set the TimeStamp according to clock on all the fields in + state. Depending on selective, all or only some fields may be + updated. + +

+This call should rarely be needed in user written code. It is used + by the generic Connector. + +

+The arguments are: +

+
state
+
The ESMF_State object holding the fields to be time stampped. + +
+
clock
+
The ESMF_Clock object defining the TimeStamp by its current time. + +
+
[selective]
+
If .true., then only set the TimeStamp on those fields + for which the "Updated" attribute is equal to "true". Otherwise set the + TimeStamp on all the fields. Default is .false.. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ + +

+3.10 Auxiliary Routines +

+Auxiliary routines are provided with the NUOPC Layer as a convenience to the +user. Typically more work is needed on these methods before considering them +NUOPC core functionality. + +

+ +

+ +

+ +

+3.10.1 NUOPC_Write - Write a distributed interpolation matrix to file in SCRIP format +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_Write()
+   subroutine NUOPC_SCRIPWrite(factorList, factorIndexList, fileName, &
+     relaxedflag, rc)
+
ARGUMENTS: +
     real(ESMF_KIND_R8), intent(in), target    :: factorList(:)
+     integer,            intent(in), target    :: factorIndexList(:,:) 
+     character(*),       intent(in)            :: fileName
+     logical,            intent(in),  optional :: relaxedflag
+     integer,            intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+ Write the destributed interpolaton matrix provided by factorList + and factorIndexList to a SCRIP formatted NetCDF file. Each PET calls + with its local list of factors and indices. The call then writes the + distributed factors into a single file. If the file already exists, the + contents is replaced by this call. + +

+The arguments are: +

+
factorList
+
The distributed factor list. + +
+
factorIndexList
+
The distributed list of source and destination indices. + +
+
fileName
+
The name of the file to be written to. + +
+
[relaxedflag]
+
If .true., then no error is returned even if the call cannot write + the file due to library limitations. Default is .false.. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+3.10.2 NUOPC_Write - Write a distributed factorList to file +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_Write()
+   subroutine NUOPC_FactorsWrite(factorList, fileName, rc)
+
ARGUMENTS: +
     real(ESMF_KIND_R8), pointer               :: factorList(:)
+     character(*),       intent(in)            :: fileName
+     integer,            intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+THIS METHOD IS DEPRECATED. Use 3.10.1 instead. + +

+Write the destributed factorList to file. Each PET calls with its + local list of factors. The call then writes the distributed factors into + a single file. The order of the factors in the file is first by PET, and + within each PET the PET-local order is preserved. Changing the number of + PETs for the same regrid operation will likely change the order of factors + across PETs, and therefore files written will differ. + +

+The arguments are: +

+
factorList
+
The distributed factor list. + +
+
fileName
+
The name of the file to be written to. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+3.10.3 NUOPC_Write - Write Field data to file +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_Write()
+   subroutine NUOPC_FieldWrite(field, fileName, overwrite, status, timeslice, &
+     iofmt, relaxedflag, rc)
+
ARGUMENTS: +
     type(ESMF_Field),           intent(in)            :: field
+     character(*),               intent(in)            :: fileName
+     logical,                    intent(in),  optional :: overwrite
+     type(ESMF_FileStatus_Flag), intent(in),  optional :: status
+     integer,                    intent(in),  optional :: timeslice
+     type(ESMF_IOFmt_Flag),      intent(in),  optional :: iofmt
+     logical,                    intent(in),  optional :: relaxedflag
+     integer,                    intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Write the data in field to file under the field's "StandardName" + attribute if supported by the iofmt. + +

+The arguments are: +

+
field
+
The ESMF_Field object whose data is to be written. + +
+
fileName
+
The name of the file to write to. + +
+
[overwrite]
+
A logical flag, the default is .false., i.e., existing Field data may + not be overwritten. If .true., the + data corresponding to each field's name will be + be overwritten. If the timeslice option is given, only data for + the given timeslice may be overwritten. + Note that it is always an error to attempt to overwrite a NetCDF + variable with data which has a different shape. + +
+
[status]
+
The file status. Valid options are ESMF_FILESTATUS_NEW, + ESMF_FILESTATUS_OLD, ESMF_FILESTATUS_REPLACE, and + ESMF_FILESTATUS_UNKNOWN (default). + +
+
[timeslice]
+
Time slice counter. Must be positive. The behavior of this + option may depend on the setting of the overwrite flag: +
+
overwrite = .false.:
+
If the timeslice value is + less than the maximum time already in the file, the write will fail. + +
+
overwrite = .true.:
+
Any positive timeslice value is valid. + +
+
+ By default, i.e. by omitting the timeslice argument, no + provisions for time slicing are made in the output file, + however, if the file already contains a time axis for the variable, + a timeslice one greater than the maximum will be written. + +
+
[iofmt]
+
The I/O format. Supported options are ESMF_IOFMT_NETCDF, + ESMF_IOFMT_NETCDF4P, and ESMF_IOFMT_NETCDF4C. If not + present, defaults to ESMF_IOFMT_NETCDF. + +
+
[relaxedflag]
+
If .true., then no error is returned even if the call cannot write + the file due to library limitations, or because field does not + contain any data. Default is .false.. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+3.10.4 NUOPC_Write - Write the Fields within a State to NetCDF files +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_Write()
+   subroutine NUOPC_StateWrite(state, fieldNameList, fileNamePrefix, overwrite, &
+     status, timeslice, iofmt, relaxedflag, rc)
+
ARGUMENTS: +
     type(ESMF_State),           intent(in)            :: state
+     character(len=*),           intent(in),  optional :: fieldNameList(:)
+     character(len=*),           intent(in),  optional :: fileNamePrefix
+     logical,                    intent(in),  optional :: overwrite
+     type(ESMF_FileStatus_Flag), intent(in),  optional :: status
+     integer,                    intent(in),  optional :: timeslice
+     type(ESMF_IOFmt_Flag),      intent(in),  optional :: iofmt
+     logical,                    intent(in),  optional :: relaxedflag
+     integer,                    intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Write the data of the fields contained in state to NetCDF files. + Each field is written to an individual file using its "StandardName" + attribute as its NetCDF attribute. + FieldBundle objects that are encountered within state are traversed, + and the contained fields are handled in the same manner as fields directly + held by the state object. + +

+The arguments are: +

+
state
+
The ESMF_State object containing the fields written. + +
+
[fieldNameList]
+
List of names of the fields to be written. By default write all the fields + in state. + +
+
[fileNamePrefix]
+
File name prefix, common to all the files written. + +
+
[overwrite]
+
A logical flag, the default is .false., i.e., existing file data may + not be overwritten. If .true., the + data corresponding to each field's name will be + be overwritten. If the timeslice option is given, only data for + the given timeslice may be overwritten. + Note that it is always an error to attempt to overwrite a NetCDF + variable with data which has a different shape. + +
+
[status]
+
The file status. Valid options are ESMF_FILESTATUS_NEW, + ESMF_FILESTATUS_OLD, ESMF_FILESTATUS_REPLACE, and + ESMF_FILESTATUS_UNKNOWN (default). + +
+
[timeslice]
+
Time slice counter. Must be positive. The behavior of this + option may depend on the setting of the overwrite flag: +
+
overwrite = .false.:
+
If the timeslice value is + less than the maximum time already in the file, the write will fail. + +
+
overwrite = .true.:
+
Any positive timeslice value is valid. + +
+
+ By default, i.e. by omitting the timeslice argument, no + provisions for time slicing are made in the output file, + however, if the file already contains a time axis for the variable, + a timeslice one greater than the maximum will be written. + +
+
[iofmt]
+
The I/O format. Supported options are ESMF_IOFMT_NETCDF, + ESMF_IOFMT_NETCDF4P, and ESMF_IOFMT_NETCDF4C. If not + present, defaults to ESMF_IOFMT_NETCDF. + +
+
[relaxedflag]
+
If .true., then no error is returned even if the call cannot write + the file due to library limitations. Default is .false.. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ +

+ +

+3.10.5 NUOPC_Write - Write the Fields within a FieldBundle to NetCDF files +

+ +

+ +

+
+INTERFACE: +

   ! Private name; call using NUOPC_Write()
+   subroutine NUOPC_FieldBundleWrite(fieldbundle, fieldNameList, fileNamePrefix, overwrite, &
+     status, timeslice, iofmt, relaxedflag, rc)
+
ARGUMENTS: +
     type(ESMF_FieldBundle),     intent(in)            :: fieldbundle
+     character(len=*),           intent(in),  optional :: fieldNameList(:)
+     character(len=*),           intent(in),  optional :: fileNamePrefix
+     logical,                    intent(in),  optional :: overwrite
+     type(ESMF_FileStatus_Flag), intent(in),  optional :: status
+     integer,                    intent(in),  optional :: timeslice
+     type(ESMF_IOFmt_Flag),      intent(in),  optional :: iofmt
+     logical,                    intent(in),  optional :: relaxedflag
+     integer,                    intent(out), optional :: rc
+
+DESCRIPTION: +
+ +

+Write the data of the fields contained in fieldbundle to NetCDF files. + Each field is written to an individual file using its "StandardName" + attribute as its NetCDF attribute. + +

+The arguments are: +

+
fieldbundle
+
The ESMF_FieldBundle object containing the fields. + +
+
[fieldNameList]
+
List of names of the fields to be written. By default write all the fields + in fieldbundle. + +
+
[fileNamePrefix]
+
File name prefix, common to all the files written. + +
+
[overwrite]
+
A logical flag, the default is .false., i.e., existing Field data may + not be overwritten. If .true., the + data corresponding to each field's name will be + be overwritten. If the timeslice option is given, only data for + the given timeslice may be overwritten. + Note that it is always an error to attempt to overwrite a NetCDF + variable with data which has a different shape. + +
+
[status]
+
The file status. Valid options are ESMF_FILESTATUS_NEW, + ESMF_FILESTATUS_OLD, ESMF_FILESTATUS_REPLACE, and + ESMF_FILESTATUS_UNKNOWN (default). + +
+
[timeslice]
+
Time slice counter. Must be positive. The behavior of this + option may depend on the setting of the overwrite flag: +
+
overwrite = .false.:
+
If the timeslice value is + less than the maximum time already in the file, the write will fail. + +
+
overwrite = .true.:
+
Any positive timeslice value is valid. + +
+
+ By default, i.e. by omitting the timeslice argument, no + provisions for time slicing are made in the output file, + however, if the file already contains a time axis for the variable, + a timeslice one greater than the maximum will be written. + +
+
[iofmt]
+
The I/O format. Supported options are ESMF_IOFMT_NETCDF, + ESMF_IOFMT_NETCDF4P, and ESMF_IOFMT_NETCDF4C. If not + present, defaults to ESMF_IOFMT_NETCDF. + +
+
[relaxedflag]
+
If .true., then no error is returned even if the call cannot write + the file due to library limitations. Default is .false.. + +
+
[rc]
+
Return code; equals ESMF_SUCCESS if there are no errors. + +
+
+ +

+ + +

+ +
+esmf_support@ucar.edu +
+ + diff --git a/docs/nightly/fix/reconcile-info/NUOPC_refdoc/node5.html b/docs/nightly/fix/reconcile-info/NUOPC_refdoc/node5.html new file mode 100644 index 000000000..92db16d6a --- /dev/null +++ b/docs/nightly/fix/reconcile-info/NUOPC_refdoc/node5.html @@ -0,0 +1,718 @@ + + + + + +4 Standardized Component Dependencies + + + + + + + + + + + + + + + + + + + + + +Subsections + + + +
+ +

+4 Standardized Component Dependencies +

+ +

+ +

+DEPRECATION NOTICE: The mechanism described in this section for defining build dependencies between components has been deprecated! The approach discussed here is based exclusively on GNU Makefiles. It has been superseded by the functionality implemented in the ESMX Layer. The ESMX approach addresses all of the issues discussed here, based on a more holistic solution. It includes a standard CMake based option, which is the recommended approach for all new NUOPC projects. + +

+Most of the NUOPC Layer deals with specifying the interaction between ESMF components within a running ESMF application. ESMF provides several mechanisms of how an application can be made up of individual Components. This chapter deals with reigning in the many options supported by ESMF and setting up a standard way for assembling NUOPC compliant components into a working application. + +

+ESMF supports single executable as well as some forms of multiple executable applications. Currently the NUOPC Layer only addresses the case of single executable applications. While it is generally true that executing single executable applications is easier and more widely supported than executing multiple executable applications, building a single executable from multiple components can be challenging. This is especially true when the individual components are supplied by different groups, and the assembly of the final application happens apart from the component development. The purpose of standardizing component dependencies as part of the NUOPC Layer is to provide a solution to the technical aspect of assembling applications built from NUOPC compliant components. + +

+As with the other parts of the NUOPC Layer, the standardized component dependencies specify aspects that ESMF purposefully leaves unspecified. Having a standard way to deal with component dependencies has several advantages. It makes reading and understand NUOPC compliant applications more easily. It also provides a means to promote best practices across a wide range of application systems. Ultimately the goal of standardizing the component dependencies is to support "plug & build" between NUOPC compliant components and applications, where everything needed to use a component by a upper level software layer is supplied in a standard way, ready to be used by the software. + +

+There is one aspect of the standardized component dependency that affects the component code itself: The name of the public set services entry point into a NUOPC compliant component must be called "SetServices". The only exception to this rule are components that are written in C/C++ and made available for static linking. In this case, because of lack of namespace protection, the SetServices part must be followed by a component specific suffix. This will be discussed later in this chapter. For all other cases, unique namespaces exist that allow the entry point to be called SetServices across all components. + +

+Having standardized the name of the single public entry point into a component solves the issue of having to communicate its name to the software layer that intends to use the component. At the same time, limiting the public entry point to a single accepted name does not remove any flexibility that is generally leveraged by ESMF applications. Within the context of the NUOPC Layer, there is great flexibility designed into the initialize steps. Removing the need to have to deal with alternative set services routines focuses and clarifies the NUOPC approach. + +

+The remaining aspects of component dependency standardization all deal with build specific issues, i.e. how does the software layer that uses a component compile and link against the component code. For now the NUOPC Layer does not deal with the question on how the component itself is being built. Instead the focus is on the information that a component must provide about itself, and the format of this information, in order to be usable by another piece of software. This clear separation allows components to provide their own independent build system, which often is critical to ensure bit-for-bit reproducibility. At the same time it does not prevent build systems to be connected top-down if that is desirable. + +

+Technically the problem of passing component specific build information up the build hierarchy is solved by using GNU makefile fragments that allow every component to provide information in form of variables to the upper level build system. The NUOPC Layer standardization requires that: Every component must provide a makefile fragment that defines 6 variables: +

+  ESMF_DEP_FRONT     
+  ESMF_DEP_INCPATH   
+  ESMF_DEP_CMPL_OBJS 
+  ESMF_DEP_LINK_OBJS 
+  ESMF_DEP_SHRD_PATH 
+  ESMF_DEP_SHRD_LIBS
+
+The convention for makefile fragments is to provide them in files with a suffix of .mk. The NUOPC Layer currently adds no further restriction to the name of the makefile fragment file of a component. There seems little gain in standardizing the name of the NUOPC compliant makefile fragment of a component since the location must be made available anyway, and adding the specific file name at the end of the supplied path does not appear inappropriate. + +

+The meaning of the 6 makefile variables is defined in a manner that supports many different situations, ranging from simple statically linked components to situations where components are made available in shared objects, not loaded by the application until needed during runtime. The design idea of the NUOPC Layer component makefile fragment is to have each component provide a simple makefile fragment that is self-describing. Usage of advanced options requires a more sophisticated build system on the software layer that uses the component, while at the same time the same standard format is able to keep simple situations simple. + +

+An indepth understanding of the capabilities of the NUOPC Layer build dependency standard requires looking at various common cases in detail. The remainder of this chapter is dedicated to this effort. Here a general definition of each variable is provided. + +

+ +

    +
  • ESMF_DEP_FRONT - The name of the Fortran module to be used in a USE statement, or (if it ends in ".h") the name of the header file to be used in an #include statement, or (if it ends in ".so") the name of the shared object to be loaded at run-time. + +

    +

  • +
  • ESMF_DEP_INCPATH - The include path to find module or header files during compilation. Must be specified as absolute path. + +

    +

  • +
  • ESMF_DEP_CMPL_OBJS - Object files that need to be considered as compile dependencies. Must be specified with absolute path. + +

    +

  • +
  • ESMF_DEP_LINK_OBJS - Object files that need to be considered as link dependencies. Must be specified with absolute path. + +

    +

  • +
  • ESMF_DEP_SHRD_PATH - The path or list of paths to find shared libraries during link-time (and during run-time unless overridden by LD_LIBRARY_PATH). Must be specified as absolute paths. + +

    +

  • +
  • ESMF_DEP_SHRD_LIBS - Shared libraries that need to be specified during link-time, and must be available during run-time. Must be specified with absolute path. + +

    +

  • +
+ +

+The following sections discuss how the standard makefile fragment is utilized in common use cases. It shows how the .mk file would need to look like in these cases. Each section further contains hints of how a compliant .mk file can be auto-generated by the component build system (provider side), as well as hints on how it can be used by an upper level software layer (consumer side). Makefile segments provided in these hint sections are not part of the NUOPC Layer component dependency standard. They are only provided here as a convenience to the user, showing best practices of how the standard .mk files can be used in practice. Any specific compiler and linker flags shown in the hint sections are those compliant with the GNU Compiler Collection. + +

+The NUOPC Layer standard only covers the contents of the .mk file itself. + +

+ +

+ +
+4.1 Fortran components that are statically built into the executable +

+ +

+Statically building a component into the executable requires that the associated files (object files, and for Fortran the associated module files) are available when the application is being built. It makes the component code part of the executable. A change in the component code requires re-compilation and re-linking of the executable. + +

+A NUOPC compliant Fortran component that defines its public entry point in a module called "ABC", where all component code is contained in a single object file called "abc.o", makes itself available by providing the following .mk file: + +

+

+  ESMF_DEP_FRONT      = ABC
+  ESMF_DEP_INCPATH    = <absolute path to associated ABC module file>
+  ESMF_DEP_CMPL_OBJS  = <absolute path>/abc.o
+  ESMF_DEP_LINK_OBJS  = <absolute path>/abc.o
+  ESMF_DEP_SHRD_PATH  = 
+  ESMF_DEP_SHRD_LIBS  =
+
+ +

+If, however, the component implementation is spread across several object files (e.g. abc.o and xyz.o), they must all be listed in the ESMF_DEP_LINK_OBJS variable: + +

+

+  ESMF_DEP_FRONT      = ABC
+  ESMF_DEP_INCPATH    = <absolute path to associated ABC module file>
+  ESMF_DEP_CMPL_OBJS  = <absolute path>/abc.o
+  ESMF_DEP_LINK_OBJS  = <absolute path>/abc.o <absolute path>/xyz.o
+  ESMF_DEP_SHRD_PATH  = 
+  ESMF_DEP_SHRD_LIBS  =
+
+ +

+In cases that require a large number of object files to be linked into the executable it is often more convenient to provide them in an archive file, e.g. "libABC.a". Archive files are also specified in ESMF_DEP_LINK_OBJS: + +

+

+  ESMF_DEP_FRONT      = ABC
+  ESMF_DEP_INCPATH    = <absolute path to associated ABC module file>
+  ESMF_DEP_CMPL_OBJS  = <absolute path>/abc.o
+  ESMF_DEP_LINK_OBJS  = <absolute path>/libABC.a
+  ESMF_DEP_SHRD_PATH  = 
+  ESMF_DEP_SHRD_LIBS  =
+
+ +

+Hints for the provider side: A build rule for creating a compliant self-describing .mk file can be added to the component's makefile. For the case that component "ABC" is implemented in object files listed in variable "OBJS", a build rule that produces "abc.mk" could look like this: + +

+

+.PRECIOUS: %.o
+%.mk : %.o
+        @echo "# ESMF self-describing build dependency makefile fragment" > $@
+        @echo >> $@
+        @echo "ESMF_DEP_FRONT     = ABC"                          >> $@
+        @echo "ESMF_DEP_INCPATH   = `pwd`"                        >> $@
+        @echo "ESMF_DEP_CMPL_OBJS = `pwd`/"$<                     >> $@
+        @echo "ESMF_DEP_LINK_OBJS = "$(addprefix `pwd`/, $(OBJS)) >> $@
+        @echo "ESMF_DEP_SHRD_PATH = "                             >> $@
+        @echo "ESMF_DEP_SHRD_LIBS = "                             >> $@
+
+abc.mk: $(OBJS)
+
+ +

+Hints for the consumer side: The format of the NUOPC compliant .mk files allows the consumer side to collect the information provided by multiple components into one set of internal variables. Notice that in the makefile code below it is critical to use the := style assignment instead of a simple = in order to have the assignment be based on the current value of the right hand variables. + +

+

+include abc.mk
+DEP_FRONTS    := $(DEP_FRONTS) -DFRONT_ABC=$(ESMF_DEP_FRONT)
+DEP_INCS      := $(DEP_INCS) $(addprefix -I, $(ESMF_DEP_INCPATH))
+DEP_CMPL_OBJS := $(DEP_CMPL_OBJS) $(ESMF_DEP_CMPL_OBJS)
+DEP_LINK_OBJS := $(DEP_LINK_OBJS) $(ESMF_DEP_LINK_OBJS)
+DEP_SHRD_PATH := $(DEP_SHRD_PATH) $(addprefix -L, $(ESMF_DEP_SHRD_PATH))
+DEP_SHRD_LIBS := $(DEP_SHRD_LIBS) $(addprefix -l, $(ESMF_DEP_SHRD_LIBS))
+
+include xyz.mk
+DEP_FRONTS    := $(DEP_FRONTS) -DFRONT_XYZ=$(ESMF_DEP_FRONT)
+DEP_INCS      := $(DEP_INCS) $(addprefix -I, $(ESMF_DEP_INCPATH))
+DEP_CMPL_OBJS := $(DEP_CMPL_OBJS) $(ESMF_DEP_CMPL_OBJS)
+DEP_LINK_OBJS := $(DEP_LINK_OBJS) $(ESMF_DEP_LINK_OBJS)
+DEP_SHRD_PATH := $(DEP_SHRD_PATH) $(addprefix -L, $(ESMF_DEP_SHRD_PATH))
+DEP_SHRD_LIBS := $(DEP_SHRD_LIBS) $(addprefix -l, $(ESMF_DEP_SHRD_LIBS))
+
+ +

+Besides the accumulation of information into the internal variables, there is a small amount of processing going on. The module name provided by the ESMF_DEP_FRONT variable is assigned to a pre-processor macro. The intention of this macro is to be used in a Fortran USE statement to access the Fortran module that contains the public access point of the component. + +

+The include paths in ESMF_DEP_INCPATH are prepended with the appropriate compiler flag (here "-I"). The ESMF_DEP_SHRD_PATH and ESMF_DEP_SHRD_LIBS variables are also prepended by the respective compiler and linker flags in case a component brings in a shared library dependencies. + +

+Once the .mk files of all component dependencies have been included and processed in this manner, the internal variables can be used in the build system of the application layer, as shown in the following example: + +

+

+.SUFFIXES: .f90 .F90 .c .C
+
+%.o : %.f90
+        $(ESMF_F90COMPILER) -c $(DEP_FRONTS) $(DEP_INCS) \
+$(ESMF_F90COMPILEOPTS) $(ESMF_F90COMPILEPATHS) $(ESMF_F90COMPILEFREENOCPP) $<
+
+%.o : %.F90
+        $(ESMF_F90COMPILER) -c $(DEP_FRONTS) $(DEP_INCS) \
+$(ESMF_F90COMPILEOPTS) $(ESMF_F90COMPILEPATHS) $(ESMF_F90COMPILEFREECPP) \
+$(ESMF_F90COMPILECPPFLAGS) $<
+        
+%.o : %.c
+        $(ESMF_CXXCOMPILER) -c $(DEP_FRONTS) $(DEP_INCS) \
+$(ESMF_CXXCOMPILEOPTS) $(ESMF_CXXCOMPILEPATHSLOCAL) $(ESMF_CXXCOMPILEPATHS) \
+$(ESMF_CXXCOMPILECPPFLAGS) $<
+
+%.o : %.C
+        $(ESMF_CXXCOMPILER) -c $(DEP_FRONTS) $(DEP_INCS) \
+$(ESMF_CXXCOMPILEOPTS) $(ESMF_CXXCOMPILEPATHSLOCAL) $(ESMF_CXXCOMPILEPATHS) \ 
+$(ESMF_CXXCOMPILECPPFLAGS) $<
+
+app: app.o appSub.o $(DEP_LINK_OBJS)
+        $(ESMF_F90LINKER) $(ESMF_F90LINKOPTS) $(ESMF_F90LINKPATHS) \
+$(ESMF_F90LINKRPATHS) -o $@ $^ $(DEP_SHRD_PATH) $(DEP_SHRD_LIBS) \
+$(ESMF_F90ESMFLINKLIBS)
+
+app.o: appSub.o
+appSub.o: $(DEP_CMPL_OBJS)
+
+ +

+ +

+ +
+4.2 Fortran components that are provided as shared libraries +

+ +

+Providing a component in form of a shared library requires that the associated files (object files, and for Fortran the associated module files) are available when the application is being built. However, different from the statically linked case, the component code does not become part of the executable, instead it will be loaded separately each time the executable is loaded during start-up. This requires that the executable finds the component shared libraries, on which it depends, during start-up. A change in the component code typically does not require re-compilation and re-linking of the executable, instead a new version of the component shared library will be loaded automatically when it is available at execution start-up. + +

+A NUOPC compliant Fortran component that defines its public entry point in a module called "ABC", where all component code is contained in a single shared library called "libABC.so", makes itself available by providing the following .mk file: + +

+

+  ESMF_DEP_FRONT      = ABC
+  ESMF_DEP_INCPATH    = <absolute path to associated ABC module file>
+  ESMF_DEP_CMPL_OBJS  = 
+  ESMF_DEP_LINK_OBJS  = 
+  ESMF_DEP_SHRD_PATH  = <absolute path to libABC.so>
+  ESMF_DEP_SHRD_LIBS  = libABC.so
+
+ +

+Hints for the provider side: The following build rule will create a compliant self-describing .mk file ("abc.mk") for a component that is made available as a shared library. The case assumes that component "ABC" is implemented in object files listed in variable "OBJS". + +

+

+.PRECIOUS: %.so
+%.mk : %.so
+        @echo "# ESMF self-describing build dependency makefile fragment" > $@
+        @echo >> $@
+        @echo "ESMF_DEP_FRONT     = ABC"                          >> $@
+        @echo "ESMF_DEP_INCPATH   = `pwd`"                        >> $@
+        @echo "ESMF_DEP_CMPL_OBJS = "                             >> $@
+        @echo "ESMF_DEP_LINK_OBJS = "                             >> $@
+        @echo "ESMF_DEP_SHRD_PATH = `pwd`"                        >> $@
+        @echo "ESMF_DEP_SHRD_LIBS = "$*                           >> $@
+
+abc.mk:
+
+abc.so: $(OBJS)
+        $(ESMF_CXXLINKER) -shared -o $@ $<
+        mv $@ lib$@
+        rm -f $<
+
+ +

+Hints for the consumer side: The format of the NUOPC compliant .mk files allows the consumer side to collect the information provided by multiple components into one set of internal variables. This is independent on whether some or all of the components are provided as shared libraries. + +

+The path specified in ESMF_DEP_SHRD_PATH is required when building the executable in order for the linker to find the shared library. Depending on the situation, it may be desirable to also encode this search path into the executable through the RPATH mechanism as shown below. However, in some cases, e.g. when the actual shared library to be used during execution is not available from the same location as during build-time, it may not be useful to encode the RPATH. In either case, having set the LD_LIBRARY_PATH environment variable to the desired location of the shared library at run-time will ensure that the correct library file is found. + +

+Notice that in the makefile code below it is critical to use the := style assignment instead of a simple = in order to have the assignment be based on the current value of the right hand variables. + +

+

+include abc.mk
+DEP_FRONTS    := $(DEP_FRONTS) -DFRONT_ABC=$(ESMF_DEP_FRONT)
+DEP_INCS      := $(DEP_INCS) $(addprefix -I, $(ESMF_DEP_INCPATH))
+DEP_CMPL_OBJS := $(DEP_CMPL_OBJS) $(ESMF_DEP_CMPL_OBJS)
+DEP_LINK_OBJS := $(DEP_LINK_OBJS) $(ESMF_DEP_LINK_OBJS)
+DEP_SHRD_PATH := $(DEP_SHRD_PATH) $(addprefix -L, $(ESMF_DEP_SHRD_PATH)) \
+  $(addprefix -Wl$(COMMA)-rpath$(COMMA), $(ESMF_DEP_SHRD_PATH))
+DEP_SHRD_LIBS := $(DEP_SHRD_LIBS) $(addprefix -l, $(ESMF_DEP_SHRD_LIBS))
+
+ +

+(Here COMMA is a variable that contains a single comma which would cause syntax issues if it was written into the "addprefix" command directly.) + +

+The internal variables set by the above makefile code can then be used by exactly the same makefile rules shown for the statically linked case. In fact, component "ABC" that comes in through "abc.mk" could either be a statically linked component or a shared library component. The makefile code shown here for the consumer side handles both cases alike. + +

+ +

+ +
+4.3 Components that are loaded during run-time as shared objects +

+ +

+Making components available in the form of shared objects allows the executable to be built in the complete absence of any information that depends on the component code. The only information required when building the executable is the name of the shared object file that will supply the component code during run-time. The shared object file of the component can be replaced at will, and it is not until run-time, when the executable actually tries to access the component, that the shared object must be available to be loaded. + +

+A NUOPC compliant component where all component code, including its public access point, is contained in a single shared object called "abc.so", makes itself available by providing the following .mk file: + +

+

+  ESMF_DEP_FRONT      = abc.so
+  ESMF_DEP_INCPATH    = 
+  ESMF_DEP_CMPL_OBJS  = 
+  ESMF_DEP_LINK_OBJS  = 
+  ESMF_DEP_SHRD_PATH  = 
+  ESMF_DEP_SHRD_LIBS  =
+
+ +

+The other parts of the .mk file may be utilized in special cases, but typically the shared object should be self-contained. + +

+It is interesting to note that at this level of abstraction, there is no more difference between a component written in Fortran, and a component written in in C/C++. In both cases the public entry point available in the shared object must be SetServices as required by the NUOPC Layer component dependency standard. (NUOPC does allow for customary name mangling by the Fortran compiler.) + +

+Hints for the provider side: The following build rule will create a compliant self-describing .mk file ("abc.mk") for a component that is made available as a shared object. The case assumes that component "ABC" is implemented in object files listed in variable "OBJS". + +

+

+.PRECIOUS: %.so
+%.mk : %.so
+        @echo "# ESMF self-describing build dependency makefile fragment" > $@
+        @echo >> $@
+        @echo "ESMF_DEP_FRONT     = "$<                           >> $@
+        @echo "ESMF_DEP_INCPATH   = "                             >> $@
+        @echo "ESMF_DEP_CMPL_OBJS = "                             >> $@
+        @echo "ESMF_DEP_LINK_OBJS = "                             >> $@
+        @echo "ESMF_DEP_SHRD_PATH = "                             >> $@
+        @echo "ESMF_DEP_SHRD_LIBS = "                             >> $@
+
+abc.mk:
+
+abc.so: $(OBJS)
+        $(ESMF_CXXLINKER) -shared -o $@ $<
+        rm -f $<
+
+ +

+Hints for the consumer side: The format of the NUOPC compliant .mk files still allows the consumer side to collect the information provided by multiple components into one set of internal variables. This still holds when some or all of the components are provided as shared objects. In fact it is very simple to make all of the component sections in the consumer makefile handle both cases. + +

+Notice that in the makefile code below it is critical to use the := style assignment instead of a simple = in order to have the assignment be based on the current value of the right hand variables. + +

+

+include abc.mk
+ifneq (,$(findstring .so,$(ESMF_DEP_FRONT)))
+DEP_FRONTS    := $(DEP_FRONTS) -DFRONT_SO_ABC=\"$(ESMF_DEP_FRONT)\"
+else
+DEP_FRONTS    := $(DEP_FRONTS) -DFRONT_ABC=$(ESMF_DEP_FRONT)
+endif
+DEP_FRONTS    := $(DEP_FRONTS) -DFRONT_ABC=$(ESMF_DEP_FRONT)
+DEP_INCS      := $(DEP_INCS) $(addprefix -I, $(ESMF_DEP_INCPATH))
+DEP_CMPL_OBJS := $(DEP_CMPL_OBJS) $(ESMF_DEP_CMPL_OBJS)
+DEP_LINK_OBJS := $(DEP_LINK_OBJS) $(ESMF_DEP_LINK_OBJS)
+DEP_SHRD_PATH := $(DEP_SHRD_PATH) $(addprefix -L, $(ESMF_DEP_SHRD_PATH)) \
+  $(addprefix -Wl$(COMMA)-rpath$(COMMA), $(ESMF_DEP_SHRD_PATH))
+DEP_SHRD_LIBS := $(DEP_SHRD_LIBS) $(addprefix -l, $(ESMF_DEP_SHRD_LIBS))
+
+ +

+The above makefile segment supports component "ABC" that is described in "abc.mk" to be made available as a Fortran static component, a Fortran shared library, or a shared object. The conditional around assigning variable DEP_FRONTS either leads to having set the macro FRONT_ABC as before, or setting a different macro FRONT_SO_ABC. The former indicates that a Fortran module is available for the component and requires a USE statement in the code. The latter macro indicates that the component is made available through a shared object, and the macro can be used to specify the name of the shared object in the associated call. + +

+Again the internal variables set by the above makefile code can be used by the same makefile rules shown for the statically linked case. + +

+ +

+ +
+4.4 Components that depend on components +

+ +

+The NUOPC Layer supports component hierarchies where a component can be a child of another component. This hierarchy of components translates into component build dependencies that must be dealt with in the NUOPC Layer standardization of component dependencies. + +

+A component that sits in an intermediate level of the component hierarchy depends on the components "below" while at the same time it introduces a dependency by itself for the parent further "up" in the hierarchy. Within the NUOPC Layer component dependency standard this means that the intermediate component functions as a consumer of its child components' .mk files, and as a provider of its own .mk file that is then consumed by its parent. In practice this double role translates into passing link dependencies and shared library dependencies through to the parent, while the front and compile dependency is simply defined my the intermediate component itself. + +

+Consider a NUOPC compliant component that defines its public entry point in a module called "ABC", and where all component code is contained in a single object file called "abc.o". Further assume that component "ABC" depends on two components "XXX" and "YYY", where "XXX" provides the .mk file: +

+  ESMF_DEP_FRONT      = XXX
+  ESMF_DEP_INCPATH    = <absolute path to the associated XXX module file>
+  ESMF_DEP_CMPL_OBJS  = <absolute path>/xxx.o
+  ESMF_DEP_LINK_OBJS  = <absolute path>/xxx.o
+  ESMF_DEP_SHRD_PATH  = 
+  ESMF_DEP_SHRD_LIBS  =
+
+and "YYY" provides the following: +
+  ESMF_DEP_FRONT      = YYY
+  ESMF_DEP_INCPATH    = <absolute path to the associated XXX module file>
+  ESMF_DEP_CMPL_OBJS  = 
+  ESMF_DEP_LINK_OBJS  = 
+  ESMF_DEP_SHRD_PATH  = <absolute path to libYYY.so>
+  ESMF_DEP_SHRD_LIBS  = libYYY.so
+
+Then the .mk file provided by "ABC" needs to contain the following information: +
+  ESMF_DEP_FRONT      = ABC
+  ESMF_DEP_INCPATH    = <absolute path to the associated ABC module file>
+  ESMF_DEP_CMPL_OBJS  = <absolute path>/abc.o
+  ESMF_DEP_LINK_OBJS  = <absolute path>/abc.o <absolute path>/xxx.o
+  ESMF_DEP_SHRD_PATH  = <absolute path to libYYY.so>
+  ESMF_DEP_SHRD_LIBS  = libYYY.so
+
+ +

+Hints for an intermediate component that is consumer and provider: For the consumer side it is convenient to collect the information provided by multiple component dependencies into one set of internal variables. However, the details on how some of the imported information is processed into the internal variables depends on whether the intermediate component is going to make itself available for static or dynamic access. + +

+In the static case all link and shared library dependencies must be passed to the next higher level, and these dependencies should simply be collected and passed on to the next level: + +

+

+include xxx.mk
+DEP_FRONTS    := $(DEP_FRONTS) -DFRONT_XXX=$(ESMF_DEP_FRONT)
+DEP_INCS      := $(DEP_INCS) $(addprefix -I, $(ESMF_DEP_INCPATH))
+DEP_CMPL_OBJS := $(DEP_CMPL_OBJS) $(ESMF_DEP_CMPL_OBJS)
+DEP_LINK_OBJS := $(DEP_LINK_OBJS) $(ESMF_DEP_LINK_OBJS)
+DEP_SHRD_PATH := $(DEP_SHRD_PATH) $(ESMF_DEP_SHRD_PATH)
+DEP_SHRD_LIBS := $(DEP_SHRD_LIBS) $(ESMF_DEP_SHRD_LIBS)
+
+include yyy.mk
+DEP_FRONTS    := $(DEP_FRONTS) -DFRONT_YYY=$(ESMF_DEP_FRONT)
+DEP_INCS      := $(DEP_INCS) $(addprefix -I, $(ESMF_DEP_INCPATH))
+DEP_CMPL_OBJS := $(DEP_CMPL_OBJS) $(ESMF_DEP_CMPL_OBJS)
+DEP_LINK_OBJS := $(DEP_LINK_OBJS) $(ESMF_DEP_LINK_OBJS)
+DEP_SHRD_PATH := $(DEP_SHRD_PATH) $(ESMF_DEP_SHRD_PATH)
+DEP_SHRD_LIBS := $(DEP_SHRD_LIBS) $(ESMF_DEP_SHRD_LIBS)
+
+.PRECIOUS: %.o
+%.mk : %.o
+	@echo "# ESMF self-describing build dependency makefile fragment" > $@
+	@echo >> $@
+	@echo "ESMF_DEP_FRONT     = ABC"                        >> $@
+	@echo "ESMF_DEP_INCPATH   = `pwd`"                      >> $@
+	@echo "ESMF_DEP_CMPL_OBJS = `pwd`/"$<                   >> $@
+	@echo "ESMF_DEP_LINK_OBJS = `pwd`/"$< $(DEP_LINK_OBJS)  >> $@
+	@echo "ESMF_DEP_SHRD_PATH = " $(DEP_SHRD_PATH)          >> $@
+	@echo "ESMF_DEP_SHRD_LIBS = " $(DEP_SHRD_LIBS)          >> $@
+
+ +

+In the case where the intermediate component is linked into a dynamic library, or a dynamic object, all of its object and shared library dependencies can be linked in. In this case it is more useful to do some processing on the shared library dependencies, and not to include them in the produced .mk file. + +

+

+include xxx.mk
+DEP_FRONTS    := $(DEP_FRONTS) -DFRONT_XXX=$(ESMF_DEP_FRONT)
+DEP_INCS      := $(DEP_INCS) $(addprefix -I, $(ESMF_DEP_INCPATH))
+DEP_CMPL_OBJS := $(DEP_CMPL_OBJS) $(ESMF_DEP_CMPL_OBJS)
+DEP_LINK_OBJS := $(DEP_LINK_OBJS) $(ESMF_DEP_LINK_OBJS)
+DEP_SHRD_PATH := $(DEP_SHRD_PATH) $(addprefix -L, $(ESMF_DEP_SHRD_PATH)) \
+  $(addprefix -Wl$(COMMA)-rpath$(COMMA), $(ESMF_DEP_SHRD_PATH))
+DEP_SHRD_LIBS := $(DEP_SHRD_LIBS) $(addprefix -l, $(ESMF_DEP_SHRD_LIBS))
+
+include yyy.mk
+DEP_FRONTS    := $(DEP_FRONTS) -DFRONT_YYY=$(ESMF_DEP_FRONT)
+DEP_INCS      := $(DEP_INCS) $(addprefix -I, $(ESMF_DEP_INCPATH))
+DEP_CMPL_OBJS := $(DEP_CMPL_OBJS) $(ESMF_DEP_CMPL_OBJS)
+DEP_LINK_OBJS := $(DEP_LINK_OBJS) $(ESMF_DEP_LINK_OBJS)
+DEP_SHRD_PATH := $(DEP_SHRD_PATH) $(addprefix -L, $(ESMF_DEP_SHRD_PATH)) \
+  $(addprefix -Wl$(COMMA)-rpath$(COMMA), $(ESMF_DEP_SHRD_PATH))
+DEP_SHRD_LIBS := $(DEP_SHRD_LIBS) $(addprefix -l, $(ESMF_DEP_SHRD_LIBS))
+
+.PRECIOUS: %.o
+%.mk : %.o
+	@echo "# ESMF self-describing build dependency makefile fragment" > $@
+	@echo >> $@
+	@echo "ESMF_DEP_FRONT     = ABC"                        >> $@
+	@echo "ESMF_DEP_INCPATH   = `pwd`"                      >> $@
+	@echo "ESMF_DEP_CMPL_OBJS = `pwd`/"$<                   >> $@
+	@echo "ESMF_DEP_LINK_OBJS = `pwd`/"$<                   >> $@
+	@echo "ESMF_DEP_SHRD_PATH = "                           >> $@
+	@echo "ESMF_DEP_SHRD_LIBS = "                           >> $@
+
+ +

+ +

+ +
+4.5 Components written in C/C++ +

+ +

+ESMF provides a basic C API that supports writing components in C or C++. There is currently no C version of the NUOPC Layer API available, making it harder, but not impossible to write NUOPC Layer compliant ESMF components in C/C++. For the sake of completeness, the NUOPC component dependency standardization does cover the case of components being written in C/C++. + +

+The issue of whether a component is written in Fortran or C/C++ only matters when the dependent software layer has a compile dependency on the component. In other words, components that are accessed through a shared object have no compile dependency, and the language is of no effect (see 4.3). However, components that are statically linked or made available through shared libraries do introduce compile dependencies. These compile dependencies become language dependent: a Fortran component must be accessed via the USE statement, while a component with a C interface must be accessed via #include. + +

+The decision between the three cases: compile dependency on a Fortran component, compile dependency on a C/C++ component, or no compile dependency can be made on the ESMF_DEP_FRONT variable. By default it is assumed to contain the name of the Fortran module that provides the public entry point into a component written in Fortran. However, if the contents of the ESMF_DEP_FRONT variable ends in .h, it is interpreted as the header file of a component with a C interface. Finally, if it ends in .so, there is no compile dependency, and the component is accessible through a shared object. + +

+A NUOPC compliant component written in C/C++ that defines its public access point in "abc.h", where all component code is contained in a single object file called "abc.o", makes itself available by providing the following .mk file: + +

+

+  ESMF_DEP_FRONT      = abc.h
+  ESMF_DEP_INCPATH    = <absolute path to abc.h>
+  ESMF_DEP_CMPL_OBJS  = <absolute path>/abc.o
+  ESMF_DEP_LINK_OBJS  = <absolute path>/abc.o
+  ESMF_DEP_SHRD_PATH  = 
+  ESMF_DEP_SHRD_LIBS  =
+
+ +

+Hints for the implementor: + +

+There are a few subtle complications to cover for the case where a component with C interface comes in as a compile dependency. First there is Fortran name mangling of symbols which includes underscores, but also changes to lower or upper case letters. The ESMF C interface provides a macro (FTN_X) that deals with the underscore issue on the C component side, but it cannot address the lower/upper case issue. The ESMF convention for using C in Fortran assumes all external symbols lower case. The NUOPC Layer follows this convention in accessing components with C interface from Fortran. + +

+Secondly, there is no namespace protection of the public entry points. For this reason, the public entry point cannot just be setservices for all components written in C. Instead, for components with C interface, the public entry point must be setservices_name, where "name" is the same as the root name of the header file specified in ESMF_DEP_FRONT. (The absence of namespace protection is still an issue where multiple C components with the same name are specified. This case requires that components are renamed to something more unique.) + +

+Finally there is the issue of providing an explicit Fortran interface for the public entry point. One way of handling this is to provide the explicit Fortran interface as part of the components header file. This is essentially a few lines of Fortran code that can be used by the upper software layer to implement the explicit interface. As such it must be protected from being processed by the C/C++ compiler: + +

+

+#if (defined  __STDC__ || defined __cplusplus)
+
+// ---------- C/C++ block ------------
+
+#include "ESMC.h"
+extern "C" {
+  void FTN_X(setservices_abc)(ESMC_GridComp gcomp, int *rc);
+}
+
+#else
+
+!! ---------- Fortran block ----------
+
+interface
+  subroutine setservices_abc(gcomp, rc)
+    use ESMF
+    type(ESMF_GridComp)  :: gcomp
+    integer, intent(out) :: rc
+  end subroutine
+end interface
+
+#endif
+
+ +

+An upper level software layer that intends to use a component that comes with such a header file can then use it directly on the Fortran side to make the component available with an explicit interface. For example, assuming the macro FRONT_H_ATMF holds the name of the associated header file: + +

+

+#ifdef FRONT_H_ATMF
+module ABC
+#include FRONT_H_ATMF
+end module
+#endif
+
+ +

+This puts the explicit interface of the setservices_abc entry point into a module named "ABC". Except for this small block of code, the C/C++ component becomes indistinguishable from a component implemented in Fortran. + +

+Hints for the provider side: Adding a build rule for creating a compliant self-describing .mk file into the component's makefile is straightforward. For the case that the component in "abc.h" is implemented in object files listed in variable "OBJS", a build rule that produces "abc.mk" could look like this: + +

+

+.PRECIOUS: %.o
+%.mk : %.o
+	@echo "# ESMF self-describing build dependency makefile fragment" > $@
+	@echo >> $@
+	@echo "ESMF_DEP_FRONT     = abc.h"     >> $@
+	@echo "ESMF_DEP_INCPATH   = `pwd`"      >> $@
+	@echo "ESMF_DEP_CMPL_OBJS = `pwd`/"$<   >> $@
+	@echo "ESMF_DEP_LINK_OBJS = `pwd`/"$<   >> $@
+	@echo "ESMF_DEP_SHRD_PATH = "           >> $@
+	@echo "ESMF_DEP_SHRD_LIBS = "           >> $@
+
+abc.mk:
+
+abc.o: abc.h
+
+ +

+Hints for the consumer side: The format of the NUOPC compliant .mk files still allows the consumer side to collect the information provided by multiple components into one set of internal variables. This still holds even when any of the provided components could come in as a Fortran component for static linking, as a C/C++ component for static linking, or as a shared object. All of the component sections in the consumer makefile can be made capable of handling all three cases. However, if it is clear that a certain component is for sure supplied as one of these flavors, it may be clearer to hard-code support for only one mechanism for this component. + +

+Notice that in the makefile code below it is critical to use the := style assignment instead of a simple = in order to have the assignment be based on the current value of the right hand variables. + +

+This example shows how the section for a specific component can be made compatible with all component dependency modes: + +

+

+include abc.mk
+ifneq (,$(findstring .h,$(ESMF_DEP_FRONT)))
+DEP_FRONTS    := $(DEP_FRONTS) -DFRONT_H_ABC=\"$(ESMF_DEP_FRONT)\"
+else ifneq (,$(findstring .so,$(ESMF_DEP_FRONT)))
+DEP_FRONTS    := $(DEP_FRONTS) -DFRONT_SO_ABC=\"$(ESMF_DEP_FRONT)\"
+else
+DEP_FRONTS    := $(DEP_FRONTS) -DFRONT_ABC=$(ESMF_DEP_FRONT)
+endif
+DEP_FRONTS    := $(DEP_FRONTS) -DFRONT_ABC=$(ESMF_DEP_FRONT)
+DEP_INCS      := $(DEP_INCS) $(addprefix -I, $(ESMF_DEP_INCPATH))
+DEP_CMPL_OBJS := $(DEP_CMPL_OBJS) $(ESMF_DEP_CMPL_OBJS)
+DEP_LINK_OBJS := $(DEP_LINK_OBJS) $(ESMF_DEP_LINK_OBJS)
+DEP_SHRD_PATH := $(DEP_SHRD_PATH) $(addprefix -L, $(ESMF_DEP_SHRD_PATH)) \
+  $(addprefix -Wl$(COMMA)-rpath$(COMMA), $(ESMF_DEP_SHRD_PATH))
+DEP_SHRD_LIBS := $(DEP_SHRD_LIBS) $(addprefix -l, $(ESMF_DEP_SHRD_LIBS))
+
+ +

+The above makefile segment will end up setting macro FRONT_H_ABC to the header file name, if the component described in "abc.mk" is a C/C++ component. It will instead set macro FRONT_SO_ABC to the shared object if this is how the component is made available, or set macro FRONT_ABC to the Fortran module name if that is the mechanism for gaining access to the component code. The calling code can use these macros to activate the corresponding code, as well as has access to the required name string in each case + +

+The internal variables set by the above makefile code can be used by the same makefile rules shown for the statically linked case. This usage implements the correct dependency rules, and passes the macros through the compiler flags. + +

+ +
+esmf_support@ucar.edu +
+ + diff --git a/docs/nightly/fix/reconcile-info/NUOPC_refdoc/node6.html b/docs/nightly/fix/reconcile-info/NUOPC_refdoc/node6.html new file mode 100644 index 000000000..165e1bd1e --- /dev/null +++ b/docs/nightly/fix/reconcile-info/NUOPC_refdoc/node6.html @@ -0,0 +1,356 @@ + + + + + +5 NUOPC Layer Compliance + + + + + + + + + + + + + + + + + + + + + +Subsections + + + +
+ +

+5 NUOPC Layer Compliance +

+ +

+ +

+The NUOPC Layer introduces a modeling system architecture based on Models, Mediators, Connectors, and Drivers. The Layer defines the rules of engagement between these components. Many of these rules are formulated on the basis of metadata. This metadata can be expected for compliance. + +

+One of the challenges when inspecting a component for NUOPC Layer compliance is that many of the rules of engagement are run-time rules. This means that they address the dynamical behavior of a component during run-time. For this reason, comprehensive compliance testing cannot be done statically but requires the execution of code. + +

+Currently there are two sets of tools available to address the issue of NUOPC Layer compliance testing. The Compliance Checker is a runtime analysis tool that can be enabled by setting an ESMF environment variable at runtime. When active, the Compliance Checker intercepts all interactions between components that go throught the ESMF component interface, and analyzes them with respect to the NUOPC Layer rules of engagement. Warnings are printed to the log files when issues or non-compliances are detected. + +

+The Component Explorer is another compliance testing tool. It focuses on interacting with a single component, and analyzing it during the early initialization phases. The Component Explorer and Compliance Checker are compatible with each other and it is often useful to use them both at the same time. + +

+5.1 The Compliance Checker +

+ +

+ +

+The NUOPC Compliance Checker is a run-time analysis tool that can be turned on for any ESMF application. The Compliance Checker is turned off by default, as to not negatively affect performance critical runs. The Compliance Checker is enabled by setting the following ESMF runtime environment variable: +

+ESMF_RUNTIME_COMPLIANCECHECK=ON
+
+As a run-time variable, setting it does not require recompilation of the ESMF library or the user application. The same executable and library will start to generate Compliance Checker output when the above variable is found set during execution. + +

+The function of the Compliance Checker is to intercept all interactions between the components of an ESMF application, and to analyze them according to the NUOPC Layer rules of engagement. The following aspects are currently reported on: + +

    +
  • Presence of the standard ESMF Initialize, Run, and Finalize methods and the number of phases in each. +
  • +
  • Timekeeping and whether it conforms with the NUOPC Layer rules. +
  • +
  • Fields or FieldBundles (not Arrays/ArrayBundles) being passed between Components. +
  • +
  • Details about the Fields being passed through import and export States. +
  • +
  • Component and Field metadata. +
  • +
+ +

+Besides the above aspects, the output of the Compliance Checker also provides a means to easily get an idea of the exact dynamical control flow between the components of an application. + +

+The Compliance Checker uses the ESMF Log facility to produce the compliance report during the execution of an ESMF application. The output is located in the default ESMF Log files. There are advantages of using the existing Log facility to generate the compliance report. First, the ESMF Log facility offers time stamping of messages, and deals with all of the file access and multi-PET issues. Second, going through the ESMF Log guarantees that all the output appears in the correct chronological order. This applies to all of the output, including entries from other ESMF system levels or from the user level. + +

+A sample output of the Compliance Checker output in action: + +

+

+20131108 172844.458 INFO     PET0 COMPLIANCECHECKER:|->|->|->:ATM:>START register compliance check.
+20131108 172844.458 INFO     PET0 COMPLIANCECHECKER:|->|->|->:ATM: phase Zero for Initialize registered.
+20131108 172844.458 INFO     PET0 COMPLIANCECHECKER:|->|->|->:ATM:             5 phase(s) of Initialize registered.
+20131108 172844.458 INFO     PET0 COMPLIANCECHECKER:|->|->|->:ATM:             1 phase(s) of Run registered.
+20131108 172844.458 INFO     PET0 COMPLIANCECHECKER:|->|->|->:ATM:             1 phase(s) of Finalize registered.
+20131108 172844.458 INFO     PET0 COMPLIANCECHECKER:|->|->|->:ATM:>STOP register compliance check.
+20131108 172844.458 INFO     PET0 COMPLIANCECHECKER:|->|->|->:ATM2MED:>START register compliance check.
+20131108 172844.458 INFO     PET0 COMPLIANCECHECKER:|->|->|->:ATM2MED: phase Zero for Initialize registered.
+20131108 172844.458 INFO     PET0 COMPLIANCECHECKER:|->|->|->:ATM2MED:             3 phase(s) of Initialize registered.
+20131108 172844.458 INFO     PET0 COMPLIANCECHECKER:|->|->|->:ATM2MED:             1 phase(s) of Run registered.
+20131108 172844.458 INFO     PET0 COMPLIANCECHECKER:|->|->|->:ATM2MED:             1 phase(s) of Finalize registered.
+20131108 172844.458 INFO     PET0 COMPLIANCECHECKER:|->|->|->:ATM2MED:>STOP register compliance check.
+20131108 172844.458 INFO     PET0 COMPLIANCECHECKER:|->|->|->:MED2ATM:>START register compliance check.
+20131108 172844.458 INFO     PET0 COMPLIANCECHECKER:|->|->|->:MED2ATM: phase Zero for Initialize registered.
+20131108 172844.458 INFO     PET0 COMPLIANCECHECKER:|->|->|->:MED2ATM:             3 phase(s) of Initialize registered.
+20131108 172844.458 INFO     PET0 COMPLIANCECHECKER:|->|->|->:MED2ATM:             1 phase(s) of Run registered.
+20131108 172844.458 INFO     PET0 COMPLIANCECHECKER:|->|->|->:MED2ATM:             1 phase(s) of Finalize registered.
+20131108 172844.458 INFO     PET0 COMPLIANCECHECKER:|->|->|->:MED2ATM:>STOP register compliance check.
+20131108 172844.459 INFO     PET0 COMPLIANCECHECKER:|->|->|->:ATM: >START InitializePrologue for phase=           0
+20131108 172844.459 INFO     PET0 COMPLIANCECHECKER:|->|->|->:ATM: importState name: modelComp 1 Import State
+20131108 172844.459 INFO     PET0 COMPLIANCECHECKER:|->|->|->:ATM: importState stateintent: ESMF_STATEINTENT_IMPORT
+20131108 172844.459 INFO     PET0 COMPLIANCECHECKER:|->|->|->:ATM: importState itemCount:            0
+20131108 172844.459 INFO     PET0 COMPLIANCECHECKER:|->|->|->:ATM: exportState name: modelComp 1 Export State
+20131108 172844.459 INFO     PET0 COMPLIANCECHECKER:|->|->|->:ATM: exportState stateintent: ESMF_STATEINTENT_EXPORT
+20131108 172844.459 INFO     PET0 COMPLIANCECHECKER:|->|->|->:ATM: exportState itemCount:            0
+20131108 172844.459 INFO     PET0 COMPLIANCECHECKER:|->|->|->:ATM:ESMF Stats: the virtual memory used by this PET (in KB): 974868
+20131108 172844.459 INFO     PET0 COMPLIANCECHECKER:|->|->|->:ATM:ESMF Stats: the physical memory used by this PET (in KB): 49440
+20131108 172844.459 INFO     PET0 COMPLIANCECHECKER:|->|->|->:ATM:ESMF Stats: ESMF Fortran objects referenced by the ESMF garbage collection: 0
+20131108 172844.459 INFO     PET0 COMPLIANCECHECKER:|->|->|->:ATM:ESMF Stats: ESMF objects (F & C++) referenced by the ESMF garbage collection: 0
+20131108 172844.459 INFO     PET0 COMPLIANCECHECKER:|->|->|->:ATM: >STOP InitializePrologue for phase=           0
+20131108 172844.459 INFO     PET0 COMPLIANCECHECKER:|<-|<-|<-:ATM: >START InitializeEpilogue for phase=           0
+20131108 172844.459 INFO     PET0 COMPLIANCECHECKER:|<-|<-|<-:ATM:ESMF Stats: the virtual memory used by this PET (in KB): 974868
+20131108 172844.459 INFO     PET0 COMPLIANCECHECKER:|<-|<-|<-:ATM:ESMF Stats: the physical memory used by this PET (in KB): 49448
+20131108 172844.459 INFO     PET0 COMPLIANCECHECKER:|<-|<-|<-:ATM:ESMF Stats: ESMF Fortran objects referenced by the ESMF garbage collection: 0
+20131108 172844.459 INFO     PET0 COMPLIANCECHECKER:|<-|<-|<-:ATM:ESMF Stats: ESMF objects (F & C++) referenced by the ESMF garbage collection: 0
+20131108 172844.459 INFO     PET0 COMPLIANCECHECKER:|<-|<-|<-:ATM: GridComp level attribute check: convention: 'NUOPC', purpose: 'General'.
+20131108 172844.459 WARNING  PET0 COMPLIANCECHECKER:|<-|<-|<-:ATM: ==> Component level attribute: <ShortName> present but NOT set!
+20131108 172844.459 WARNING  PET0 COMPLIANCECHECKER:|<-|<-|<-:ATM: ==> Component level attribute: <LongName> present but NOT set!
+20131108 172844.459 WARNING  PET0 COMPLIANCECHECKER:|<-|<-|<-:ATM: ==> Component level attribute: <Description> present but NOT set!
+20131108 172844.459 WARNING  PET0 COMPLIANCECHECKER:|<-|<-|<-:ATM: ==> Component level attribute: <ModelType> present but NOT set!
+20131108 172844.459 WARNING  PET0 COMPLIANCECHECKER:|<-|<-|<-:ATM: ==> Component level attribute: <ReleaseDate> present but NOT set!
+20131108 172844.459 WARNING  PET0 COMPLIANCECHECKER:|<-|<-|<-:ATM: ==> Component level attribute: <PreviousVersion> present but NOT set!
+20131108 172844.459 WARNING  PET0 COMPLIANCECHECKER:|<-|<-|<-:ATM: ==> Component level attribute: <ResponsiblePartyRole> present but NOT set!
+20131108 172844.459 WARNING  PET0 COMPLIANCECHECKER:|<-|<-|<-:ATM: ==> Component level attribute: <Name> present but NOT set!
+20131108 172844.459 WARNING  PET0 COMPLIANCECHECKER:|<-|<-|<-:ATM: ==> Component level attribute: <EmailAddress> present but NOT set!
+20131108 172844.459 WARNING  PET0 COMPLIANCECHECKER:|<-|<-|<-:ATM: ==> Component level attribute: <PhysicalAddress> present but NOT set!
+20131108 172844.459 WARNING  PET0 COMPLIANCECHECKER:|<-|<-|<-:ATM: ==> Component level attribute: <URL> present but NOT set!
+20131108 172844.459 INFO     PET0 COMPLIANCECHECKER:|<-|<-|<-:ATM: Component level attribute: <Verbosity> present and set: high
+20131108 172844.459 INFO     PET0 COMPLIANCECHECKER:|<-|<-|<-:ATM: Component level attribute: <InitializePhaseMap>[1] present and set: IPDv02p1=1
+20131108 172844.460 INFO     PET0 COMPLIANCECHECKER:|<-|<-|<-:ATM: Component level attribute: <InitializePhaseMap>[2] present and set: IPDv02p3=2
+20131108 172844.460 INFO     PET0 COMPLIANCECHECKER:|<-|<-|<-:ATM: Component level attribute: <InitializePhaseMap>[3] present and set: IPDv02p4=3
+20131108 172844.460 INFO     PET0 COMPLIANCECHECKER:|<-|<-|<-:ATM: Component level attribute: <InitializePhaseMap>[4] present and set: IPDv02p5=5
+20131108 172844.460 INFO     PET0 COMPLIANCECHECKER:|<-|<-|<-:ATM: Component level attribute: <NestingGeneration> present and set:            0
+20131108 172844.460 INFO     PET0 COMPLIANCECHECKER:|<-|<-|<-:ATM: Component level attribute: <Nestling> present and set:            0
+20131108 172844.460 INFO     PET0 COMPLIANCECHECKER:|<-|<-|<-:ATM: importState name: modelComp 1 Import State
+20131108 172844.460 INFO     PET0 COMPLIANCECHECKER:|<-|<-|<-:ATM: importState stateintent: ESMF_STATEINTENT_IMPORT
+20131108 172844.460 INFO     PET0 COMPLIANCECHECKER:|<-|<-|<-:ATM: importState itemCount:            0
+20131108 172844.460 INFO     PET0 COMPLIANCECHECKER:|<-|<-|<-:ATM: exportState name: modelComp 1 Export State
+20131108 172844.460 INFO     PET0 COMPLIANCECHECKER:|<-|<-|<-:ATM: exportState stateintent: ESMF_STATEINTENT_EXPORT
+20131108 172844.460 INFO     PET0 COMPLIANCECHECKER:|<-|<-|<-:ATM: exportState itemCount:            0
+20131108 172844.460 INFO     PET0 COMPLIANCECHECKER:|<-|<-|<-:ATM: The incoming Clock was not modified.
+20131108 172844.460 WARNING  PET0 COMPLIANCECHECKER:|<-|<-|<-:ATM: ==> The internal Clock is not present!
+20131108 172844.460 INFO     PET0 COMPLIANCECHECKER:|<-|<-|<-:ATM: >STOP InitializeEpilogue for phase=           0
+
+ +

+All of the output generated by the Compliance Checker contains the string COMPLIANCECHECK, which can be used to grep on. The checker currently generates two types of messages, INFO for general analysis output, and WARNING for when issues with respect to the NUOPC Layer rules are detected. + +

+In practice, when dealing with applications that have been componentized down to a very low level of the model, the output generated by the Compliance Checker can become overwhelming. For this reason a depth parameter is available that can be specified for the Compliance Checker environment variable: +

+ESMF_RUNTIME_COMPLIANCECHECK=ON:depth=4
+
+This will limit the number of component levels that the Compliance Checker parses (here 4 levels), starting from the top level application. + +

+ +

+5.2 The Component Explorer +

+ +

+ +

+The NUOPC Component Explorer is a run-time tool that can be used to gain insight into a NUOPC Layer compliant component, or to test a component's compliance. The Component Explorer is currently available as a separate download from the prototype repository: + +

+

+https://github.com/esmf-org/nuopc-app-prototypes/tree/develop/AtmOcnProto
+
+ +

+There are two parts to the Component Explorer. First the script nuopcExplorerScript is used to compile and link the explorer application specifically against a specified component. This part of the explorer leverages and tests the standardized component dependencies discussed in section 4. This step is initiated by calling the explorer script with the component's mk-file as an argument: + +

+

+./nuopcExplorerScript <component-mk-file>
+
+ +

+Any issues found during this step are reported. The successful completion of this step will produce an executable called nuopcExplorerApp. Success is indicated by + +

+

+SUCCESS: nuopcExplorerApp successfully built
+...exiting nuopcExplorerScript.
+
+ +

+and failure by + +

+

+FAILURE: nuopcExplorerApp failed to build
+...exiting nuopcExplorerScript.
+
+ +

+The second part of the Component Explorer is the explorer application itself. It can either be built using the explorer script as outlined above (recommended when a makefile fragment for the component is available) or by using the makefile directly: + +

+

+make nuopcExplorerApp
+
+ +

+In the second case the resulting nuopcExplorerApp is not tied to a specific component, instead the executable expects a component in form of a shared object to be specified as a command line argument when executing nuopcExplorerApp. In either case the explorer application needs to be started according to the execution requirements of the component it attempts to explore. This may mean that input files must be present, and that the executable be launched on a sufficient number of processes. In terms of the common mpirun tool, launching of nuopcExplorerApp may look like this +

+mpirun -np X ./nuopcExplorerApp
+
+for an executable that was built against a specific component. Or like this +
+mpirun -np X ./nuopcExplorerApp <component-shared-object-file>
+
+for an executable that expects a the component in form of a shared object. + +

+The nuopcExplorerApp expects to find a configuration file by the name of explorer.config in the run directory. The configuration file contains several basic model parameter used to explore the component. An example configuration file is shown here: + +

+

+### NUOPC Component Explorer configuration file ###
+
+start_year:               2009
+start_month:              12
+start_day:                01
+start_hour:               00
+start_minute:             0
+start_second:             0
+
+stop_year:                2009
+stop_month:               12
+stop_day:                 03
+stop_hour:                00
+stop_minute:              0
+stop_second:              0
+
+step_seconds:             21600
+
+filter_initialize_phases: no
+
+enable_run:               yes
+enable_finalize:          yes
+
+ +

+The nuopcExplorerApp starts to interact with the specified component, using the information read in from the configuration file. During the interaction the finding are reported to stdout, with output that will look similar to this: + +

+

+ NUOPC Component Explorer App
+ ----------------------------
+ Exploring a component with a Fortran module front...
+ Model component # 1 InitializePhaseMap:
+   IPDv00p1=1
+   IPDv00p2=2
+   IPDv00p3=3
+   IPDv00p4=4
+ Model component # 1 // name = ocnA
+   ocnA: <LongName>    : Attribute is present but NOT set!
+   ocnA: <ShortName>   : Attribute is present but NOT set!
+   ocnA: <Description> : Attribute is present but NOT set!
+      --------
+   ocnA: importState // itemCount = 2
+   ocnA: importState // item # 001 // [FIELD] name = pmsl
+               <StandardName> = air_pressure_at_sea_level
+                      <Units> = Pa
+                   <LongName> = Air Pressure at Sea Level
+                  <ShortName> = pmsl
+   ocnA: importState // item # 002 // [FIELD] name = rsns
+               <StandardName> = surface_net_downward_shortwave_flux
+                      <Units> = W m-2
+                   <LongName> = Surface Net Downward Shortwave Flux
+                  <ShortName> = rsns
+      --------
+   ocnA: exportState // itemCount = 1
+   ocnA: exportState // item # 001 // [FIELD] name = sst
+               <StandardName> = sea_surface_temperature
+                      <Units> = K
+                   <LongName> = Sea Surface Temperature
+                  <ShortName> = sst
+
+ +

+Turning on the Compliance Checker (see section 5.1) will result in additional information in the log files. + +

+ +

+ +
+esmf_support@ucar.edu +
+ + diff --git a/docs/nightly/fix/reconcile-info/NUOPC_refdoc/node7.html b/docs/nightly/fix/reconcile-info/NUOPC_refdoc/node7.html new file mode 100644 index 000000000..1d13ce0e2 --- /dev/null +++ b/docs/nightly/fix/reconcile-info/NUOPC_refdoc/node7.html @@ -0,0 +1,79 @@ + + + + + +6 Appendix A: Run Sequence Implementation + + + + + + + + + + + + + + + + + + + + + +

+6 Appendix A: Run Sequence Implementation +

+The NUOPC Driver utilizes an internal class to parametrize the run sequence. The NUOPC_RunSequence provides a unified data structure that allows simple as well as complex time loops to be encoded and executed. There are entry points that allow different run phases to be mapped against distinctly different time loops. +Figure 2 depicts the data structures surrounding the NUOPC_RunSequence, starting with the InternalState of the NUOPC_Driver generic component. + +
+ + + +
Figure 2: +NUOPC_RunSequence class as it relates to the surrounding data structures.
+
+ +\scalebox{0.6}{\includegraphics{NUOPC_RunSequence}} +
+
+ +

+
+esmf_support@ucar.edu +
+ + diff --git a/docs/nightly/fix/reconcile-info/NUOPC_refdoc/node8.html b/docs/nightly/fix/reconcile-info/NUOPC_refdoc/node8.html new file mode 100644 index 000000000..ca4e97ba5 --- /dev/null +++ b/docs/nightly/fix/reconcile-info/NUOPC_refdoc/node8.html @@ -0,0 +1,1589 @@ + + + + + +7 Appendix B: Initialize Phase Definition Versions + + + + + + + + + + + + + + + + + + + + + +Subsections + + + +
+ +

+7 Appendix B: Initialize Phase Definition Versions +

+ +

+ +

+IMPORTANT: Use of explicit Initialize Phase Definition versions and phase labels is deprecated - this section is provided only for reference for NUOPC caps that still use the IPD syntax. See the section on Semantic Specialization Labels for the preferred method of specializing NUOPC caps. + +

+The interaction between NUOPC compliant components during the initialization process is regulated by the Initialize Phase Definition or IPD. The IPDs are versioned, with a higher version number indicating backward compatibility with all previous versions. + +

+There are two perspectives of looking at the IPD. From the driver perspective the IPD regulates the sequence in which it must call the different phases of the Initialize() routines of its child components. To this end the generic NUOPC_Driver component implements support for IPDs up to a version specified in the API documentation. + +

+The other angle of looking at the IPD is from the driver's child components. From this perspective the IPD assigns specific meaning to each initialize phase. The child components of a driver can be divided into two groups with respect to the meaning the IPD assigns to each initialize phase. In one group are the model, mediator, and driver components, and in the other group are the connector components. Child components publish their available initialize phases through the InitializePhaseMap attribute. + +

+The driver also calls into its own internal initialize methods. This allows the driver to participate in the initialization of its children in a structured fashion. The internal initialization phases of a driver are published via the InternalInitializePhaseMap attribute. + +

+The following tables document the meaning of each initialization phase of the available IPD versions for the child components and for the driver component itself. The phases are listed in the sequence in which the driver calls them. +
+ +

+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
IPDv00 labelComponentMeaning
IPDv00p1driver-internalunspecified by NUOPC
IPDv00p1models, mediators, driversAdvertise their import and export Fields.
IPDv00p1connectorsConstruct their CplList Attribute.
IPDv00p2driver-internalunspecified by NUOPC
IPDv00p2models, mediators, driversRealize their import and export Fields.
IPDv00p2aconnectorsSet the Connected Attribute on each import and export Field according to the CplList Attribute. Reconcile the import and export States.
IPDv00p2bconnectorsPrecompute the RouteHandle.
IPDv00p3driver-internalunspecified by NUOPC
IPDv00p3models, mediators, driversCheck for compatibility of their Fields' Connected status.
IPDv00p4driver-internalunspecified by NUOPC
IPDv00p4models, mediators, driversHandle Field data initialization. Timestamp their export Fields.
+ +

+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
IPDv01 labelComponentMeaning
IPDv01p1driver-internalunspecified by NUOPC
IPDv01p1models, mediators, driversAdvertise their import and export Fields.
IPDv01p1connectorsConstruct their CplList Attribute.
IPDv01p2driver-internalModify the CplList Attributes on the Connectors.
IPDv01p2models, mediators, driversunspecified/unused by NUOPC
IPDv01p2connectorsSet the Connected Attribute on each import and export Field according to the CplList Attribute.
IPDv01p3driver-internalunspecified by NUOPC
IPDv01p3models, mediators, driversRealize their "connected" import and export Fields.
IPDv01p3aconnectorsReconcile the import and export States.
IPDv01p3bconnectorsPrecompute the RouteHandle according to the CplList Attribute.
IPDv01p4driver-internalunspecified by NUOPC
IPDv01p4models, mediators, driversCheck for compatibility of their Fields' Connected status.
IPDv01p5driver-internalunspecified by NUOPC
IPDv01p5models, mediators, driversHandle Field data initialization. Timestamp their export Fields.
+ +

+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
IPDv02 labelComponentMeaning
IPDv02p1driver-internalunspecified by NUOPC
IPDv02p1models, mediators, driversAdvertise their import and export Fields.
IPDv02p1connectorsConstruct their CplList Attribute.
IPDv02p2driver-internalModify the CplList Attributes on the Connectors.
IPDv02p2models, mediators, driversunspecified/unused by NUOPC
IPDv02p2connectorsSet the Connected Attribute on each import and export Field according to the CplList Attribute.
IPDv02p3driver-internalunspecified by NUOPC
IPDv02p3models, mediators, driversRealize their "connected" import and export Fields.
IPDv02p3aconnectorsReconcile the import and export States.
IPDv02p3bconnectorsPrecompute the RouteHandle according to the CplList Attribute.
IPDv02p4driver-internalunspecified by NUOPC
IPDv02p4models, mediators, driversCheck for compatibility of their Fields' Connected status.
IPDv02p5driver-internalunspecified by NUOPC
IPDv02p5models, mediators, driversHandle Field data initialization. Timestamp their export Fields.
A loop is entered over all those model, mediator, driver Components that use IPDv02 and have + unsatisfied data dependencies, repeating the following two steps:
Run()connectorsLoop over all Connectors that connect to the Component that is currently indexed by the outer loop.
IPDv02p5models, mediators, driversHandle Field data initialization. Timestamp their export Fields and set the Updated and InitializeDataComplete Attributes accordingly.
Repeat these two steps until all data + dependencies have been statisfied, or a dead-lock situation is detected.
+ +

+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
IPDv03 labelComponentMeaning
IPDv03p1driver-internalunspecified by NUOPC
IPDv03p1models, mediators, driversAdvertise their import and export Fields and set the TransferOfferGeomObject Attribute.
IPDv03p1connectorsConstruct their CplList Attribute.
IPDv03p2driver-internalModify the CplList Attributes on the Connectors.
IPDv03p2models, mediators, driversunspecified/unused by NUOPC
IPDv03p2connectorsSet the Connected Attribute on each import and export Field according to the CplList Attribute. Set the TransferActionGeomObject Attribute.
IPDv03p3driver-internalunspecified by NUOPC
IPDv03p3models, mediators, driversRealize their "connected" import and export Fields that have TransferActionGeomObject equal to "provide".
IPDv03p3connectorsTransfer the Grid/Mesh/LocStream objects (only DistGrid) for Field pairs that have a provider and an acceptor side.
IPDv03p4driver-internalunspecified by NUOPC
IPDv03p4models, mediators, driversOptionally modify the decomposition and distribution information of the accepted Grid/Mesh/LocStream by replacing the DistGrid.
IPDv03p4connectorsTransfer the full Grid/Mesh/LocStream objects (with coordinates) for Field pairs that have a provider and an acceptor side.
IPDv03p5driver-internalunspecified by NUOPC
IPDv03p5models, mediators, driversRealize all Fields that have TransferActionGeomObject equal to "accept" on the transferred Grid/Mesh/LocStream objects.
IPDv03p5aconnectorsReconcile the import and export States.
IPDv03p5bconnectorsPrecompute the RouteHandle according to the CplList Attribute.
IPDv03p6driver-internalunspecified by NUOPC
IPDv03p6models, mediators, driversCheck compatibility of their Fields' Connected status.
IPDv03p7driver-internalunspecified by NUOPC
IPDv03p7models, mediators, driversHandle Field data initialization. Timestamp the export Fields.
A loop is entered over all those model, mediator, driver Components that use IPDv02 and have + unsatisfied data dependencies, repeating the following two steps:
Run()connectorsLoop over all Connectors that connect to the Component that is currently indexed by the outer loop.
IPDv03p7models, mediators, driversHandle Field data initialization. Time stamp the export Fields and set the Updated and InitializeDataComplete Attributes accordingly.
Repeat these two steps until all data + dependencies have been statisfied, or a dead-lock situation is detected.
+ +

+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
IPDv04 labelComponentMeaning
IPDv04p1driver-internalunspecified by NUOPC
IPDv04p1models, mediators, driversAdvertise their import and export Fields and set the TransferOfferGeomObject Attribute.
IPDv04p1aconnectorsConsider all connection possibilities for their CplList Attribute.
IPDv04p1bconnectorsUnambiguous construction of their CplList Attribute.
IPDv04p2driver-internalModify the CplList Attributes on the Connectors.
IPDv04p2models, mediators, driversunspecified/unused by NUOPC
IPDv04p2connectorsSet the Connected Attribute on each import and export Field according to the CplList Attribute. Set the TransferActionGeomObject Attribute.
IPDv04p3driver-internalunspecified by NUOPC
IPDv04p3models, mediators, driversRealize their "connected" import and export Fields that have TransferActionGeomObject equal to "provide".
IPDv04p3connectorsTransfer the Grid/Mesh/LocStream objects (only DistGrid) for Field pairs that have a provider and an acceptor side.
IPDv04p4driver-internalunspecified by NUOPC
IPDv04p4models, mediators, driversOptionally modify the decomposition and distribution information of the accepted Grid/Mesh/LocStream by replacing the DistGrid.
IPDv04p4connectorsTransfer the full Grid/Mesh/LocStream objects (with coordinates) for Field pairs that have a provider and an acceptor side.
IPDv04p5driver-internalunspecified by NUOPC
IPDv04p5models, mediators, driversRealize all Fields that have TransferActionGeomObject equal to "accept" on the transferred Grid/Mesh/LocStream objects.
IPDv04p5aconnectorsReconcile the import and export States.
IPDv04p5bconnectorsPrecompute the RouteHandle according to the CplList Attribute.
IPDv04p6driver-internalunspecified by NUOPC
IPDv04p6models, mediators, driversCheck compatibility of their Fields' Connected status.
IPDv04p7driver-internalunspecified by NUOPC
IPDv04p7models, mediators, driversHandle Field data initialization. Timestamp the export Fields.
A loop is entered over all those model, mediator, driver Components that use IPDv02 and have + unsatisfied data dependencies, repeating the following two steps:
Run()connectorsLoop over all Connectors that connect to the Component that is currently indexed by the outer loop.
IPDv04p7models, mediators, driversHandle Field data initialization. Time stamp the export Fields and set the Updated and InitializeDataComplete Attributes accordingly.
Repeat these two steps until all data + dependencies have been statisfied, or a dead-lock situation is detected.
+ +

+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
IPDv05 labelComponentMeaning
IPDv05p1driver-internalAdvertise import and export Fields and set the TransferOfferGeomObject Attribute. Optionally set FieldTransferPolicy Attribute on States.
IPDv05p1models, mediators, driversAdvertise their import and export Fields and set the TransferOfferGeomObject Attribute. Optionally set FieldTransferPolicy Attribute on States.
IPDv05p1connectorsConsider FieldTransferPolicy Attribute on import and export States. Advertise Fields to be transferred.
IPDv05p2driver-internalOptionally modify import and export States before connectors construct CplList Attribute.
IPDv05p2models, mediators, driversOptionally modify import and export States before connectors construct CplList Attribute.
IPDv05p2aconnectorsConsider all connection possibilities for their CplList Attribute.
IPDv05p2bconnectorsUnambiguous construction of their CplList Attribute.
IPDv05p3driver-internalModify the CplList Attributes on the Connectors.
IPDv05p3models, mediators, driversunspecified/unused by NUOPC
IPDv05p3connectorsSet the Connected Attribute on each import and export Field according to the CplList Attribute. Set the TransferActionGeomObject Attribute.
IPDv05p4driver-internalRealize "connected" import and export Fields that have TransferActionGeomObject equal to "provide".
IPDv05p4models, mediators, driversRealize their "connected" import and export Fields that have TransferActionGeomObject equal to "provide".
IPDv05p4connectorsTransfer the Grid/Mesh/LocStream objects (only DistGrid) for Field pairs that have a provider and an acceptor side.
IPDv05p5driver-internalOptionally modify the decomposition and distribution information of the accepted Grid/Mesh/LocStream by replacing the DistGrid.
IPDv05p5models, mediators, driversOptionally modify the decomposition and distribution information of the accepted Grid/Mesh/LocStream by replacing the DistGrid.
IPDv05p5connectorsTransfer the full Grid/Mesh/LocStream objects (with coordinates) for Field pairs that have a provider and an acceptor side.
IPDv05p6driver-internalRealize all Fields that have TransferActionGeomObject equal to "accept" on the transferred Grid/Mesh/LocStream objects.
IPDv05p6models, mediators, driversRealize all Fields that have TransferActionGeomObject equal to "accept" on the transferred Grid/Mesh/LocStream objects.
IPDv05p6aconnectorsReconcile the import and export States.
IPDv05p6bconnectorsPrecompute the RouteHandle according to the CplList Attribute.
IPDv05p7driver-internalunspecified by NUOPC
IPDv05p7models, mediators, driversCheck compatibility of their Fields' Connected status.
IPDv05p8driver-internalunspecified by NUOPC
IPDv05p8models, mediators, driversHandle Field data initialization. Timestamp the export Fields.
A loop is entered over all those model, mediator, driver Components that use IPDv02 and have + unsatisfied data dependencies, repeating the following two steps:
Run()connectorsLoop over all Connectors that connect to the Component that is currently indexed by the outer loop.
IPDv05p8models, mediators, driversHandle Field data initialization. Time stamp the export Fields and set the Updated and InitializeDataComplete Attributes accordingly.
Repeat these two steps until all data + dependencies have been statisfied, or a dead-lock situation is detected.
+ +

+ +

+7.1 NUOPC_Driver IPD implementation +

+ +

+
+INITIALIZE: + +

    +
  • phase 0: (REQUIRED, NUOPC PROVIDED) + +
      +
    • Ensure that the InitializePhaseMap and InternalInitializePhaseMap attributes are set consistent with the available NUOPC Initialize Phase Definition (IPD) versions (see section 7 for a precise definition). The default implementation uses IPDv02 for InitializePhaseMap, and sets + +
        +
      • IPDv02p1 (NUOPC PROVIDED) +
      • +
      • IPDv02p3 (NUOPC PROVIDED) +
      • +
      • IPDv02p5 (NUOPC PROVIDED). + +
      • +
      + The default implementation uses IPDv05 for InternalInitializePhaseMap, and sets + +
        +
      • IPDv05p1 (NUOPC PROVIDED) +
      • +
      • IPDv05p2 (NUOPC PROVIDED) +
      • +
      • IPDv05p3 (NUOPC PROVIDED) +
      • +
      • IPDv05p4 (NUOPC PROVIDED) +
      • +
      • IPDv05p6 (NUOPC PROVIDED) +
      • +
      • IPDv05p8 (NUOPC PROVIDED). + +
      • +
      +
    • +
    +
  • +
  • phase 1: (REQUIRED, NUOPC PROVIDED) + +
      +
    • A default Initialize entry point for the higher level (e.g. application level) to initialize the Driver with a single call. +
    • +
    • Internally calls into the InitializePhaseMap: IPDv02p1, IPDv02p3, IPDv02p5 phases in sequence. + +
    • +
    + +

    +

  • +
  • InitializePhaseMap: IPDv02p1 (NUOPC PROVIDED) + +
      +
    • Allocate and initialize internal data structures. +
    • +
    • If the internal clock is not yet set, set the default internal clock to be a copy of the incoming clock, but only if the incoming clock is valid. +
    • +
    • Required specialization to set component services: label_SetModelServices. + +
        +
      • Call NUOPC_DriverAddComp() for all Model, Mediator, and Connector components to be added. +
      • +
      • Optionally replace the default clock. + +
      • +
      +
    • +
    • Create States for all of the child GridComps. +
    • +
    • Create Connectors to/from Driver component itself. +
    • +
    • Set default run sequence. +
    • +
    • Execute Initialize phase=0 for all Model, Mediator, and Connector components. This is the method where each component is required to initialize its InitializePhaseMap Attribute. +
    • +
    • Optional specialization to analyze and modify the InitializePhaseMap Attribute of the child components before the Driver uses it: label_ModifyInitializePhaseMap. +
    • +
    • Optional specialization to set run sequence: label_SetRunSequence. +
    • +
    • Drive the initialize sequence for the child components, compatible with up to IPDv05, as documented in section 7, through IPDv05p3. + +
    • +
    + +

    +

  • +
  • InitializePhaseMap: IPDv02p3 (NUOPC PROVIDED) + +
      +
    • Continue to drive the initialize sequence for the child components, compatible with up to IPDv05, as documented in section 7, through IPDv05p7. + +
    • +
    + +

    +

  • +
  • InitializePhaseMap: IPDv02p5 (NUOPC PROVIDED) + +
      +
    • Continue to drive the initialize sequence for the child components, compatible with up to IPDv05, as documented in section 7, through IPDv05p8. + +
    • +
    + +

    +

  • +
  • InternalInitializePhaseMap: IPDv05p1 (NUOPC PROVIDED) + +
      +
    • Request that fields in export and import State of child components are mirrored onto the driver's own import and export States. +
    • +
    • This includes transferring the associated Grid, Mesh, or LocStream objects. + +
    • +
    + +

    +

  • +
  • InternalInitializePhaseMap: IPDv05p2 (NUOPC PROVIDED) + +
      +
    • Reset the request of field mirroring. + +
    • +
    + +

    +

  • +
  • InternalInitializePhaseMap: IPDv05p3 (NUOPC PROVIDED) + +
      +
    • Add the REMAPMETHOD=redist option to all entries in CplList attribute on all Connectors to/from the driver itself. +
    • +
    • Optional specialization to modify the CplList attribute on all of the Connectors: label_ModifyCplLists. + +
    • +
    + +

    +

  • +
  • InternalInitializePhaseMap: IPDv05p4 (NUOPC PROVIDED) + +
      +
    • Check that all connected fields in the driver's own import and export State have a producer connection. + +
    • +
    + +

    +

  • +
  • InternalInitializePhaseMap: IPDv05p6 (NUOPC PROVIDED) + +
      +
    • Complete the allocation of all the fields in the driver's own import and export State. + +
    • +
    + +

    +

  • +
  • InternalInitializePhaseMap: IPDv05p8 (NUOPC PROVIDED) + +
      +
    • Set the InitializeDataComplete consistent with the data-dependency protocol. + +
    • +
    + +

    +

  • +
+ +

+ +

+
+RUN: + +

    +
  • phase 1: (REQUIRED, NUOPC PROVIDED) + +
      +
    • If the incoming clock is valid, set the internal stop time to one time step interval on the incoming clock. +
    • +
    • Drive the time stepping loop, from current time to stop time, incrementing by time step. + +
        +
      • For each time step iteration the Model and Connector components Run() methods are being called according to the run sequence. + +
      • +
      +
    • +
    +
  • +
+ +

+ +

+
+FINALIZE: + +

    +
  • phase 1: (REQUIRED, NUOPC PROVIDED) + +
      +
    • Execute the Finalize() methods of all Connector components in order. +
    • +
    • Execute the Finalize() methods of all Model components in order. +
    • +
    • Optional specialization to finalize custom parts of the component: label_Finalize. +
    • +
    • Destroy all Model components and their import and export states. +
    • +
    • Destroy all Connector components. +
    • +
    • Internal clean-up. + +
    • +
    +
  • +
+ +

+ +

+7.2 NUOPC_ModelBase IPD implementation +

+ +

+
+INITIALIZE: + +

    +
  • phase 0: (REQUIRED, NUOPC PROVIDED) + +
      +
    • Initialize the InitializePhaseMap Attribute according to the NUOPC Initialize Phase Definition (IPD) version 00 (see section 7 for a precise definition). The default implementation sets the following mapping: + +
        +
      • IPDv00p1 = 1: (REQUIRED, IMPLEMENTOR PROVIDED) +
      • +
      • IPDv00p2 = 2: (REQUIRED, IMPLEMENTOR PROVIDED) +
      • +
      • IPDv00p3 = 3: (REQUIRED, IMPLEMENTOR PROVIDED) +
      • +
      • IPDv00p4 = 4: (REQUIRED, IMPLEMENTOR PROVIDED) + +
      • +
      +
    • +
    +
  • +
+ +

+ +

+
+RUN: + +

    +
  • phase 1: (NUOPC PROVIDED) + +
      +
    • SPECIALIZATION REQUIRED/PROVIDED: label_SetRunClock to check and set the internal Clock against the incoming Clock. + +
        +
      • IF (Phase specific specialization present): Execute the phase specific specialization. +
      • +
      • ELSE: Execute the phase independent specialization. PROVIDED: By default check that internal Clock and incoming Clock agree on current time and that the time step of the incoming Clock is a multiple of the internal Clock time step. Under these conditions set the internal stop time to one time step interval of the incoming Clock. Otherwise exit with error, flagging an incompatibility. + +
      • +
      +
    • +
    • SPECIALIZATION REQUIRED/PROVIDED: label_CheckImport to check Fields in the import State. + +
        +
      • IF (Phase specific specialization is present): Execute the phase specific specialization. +
      • +
      • ELSE: Execute the phase independent specialization. PROVIDED: By default check that all import Fields are at the current time of the internal Clock. + +
      • +
      +
    • +
    • Time stepping loop: starting at current time, running to stop time of the internal Clock. + +
        +
      • Timestamp the Fields in the export State according to the current time of the internal Clock. +
      • +
      • SPECIALIZATION REQUIRED: label_Advance to execute model or mediation code. +
      • +
      • SPECIALIZATION OPTIONAL: label_AdvanceClock to advance the current time of the internal Clock. By default (without specialization) advance the current time of the internal Clock according to the time step of the internal Clock. + +
      • +
      +
    • +
    • SPECIALIZATION OPTIONAL: label_TimestampExport to timestamp Fields in the export State. + +
    • +
    +
  • +
+ +

+ +

+
+FINALIZE: + +

    +
  • phase 1: (REQUIRED, NUOPC PROVIDED) + +
      +
    • Optional specialization to finalize custom parts of the component: label_Finalize. + +
    • +
    +
  • +
+ +

+ +

+7.3 NUOPC_Model IPD implementation +

+ +

+
+INITIALIZE: + +

    +
  • phase 0: Set Initialize Phase Definition Version (REQUIRED, NUOPC PROVIDED) + +
      +
    • Initialize the InitializePhaseMap Attribute according to the NUOPC Initialize Phase Definition (IPD) version 00 (see section 7 for a precise definition). The default implementation sets the following mapping: + +
        +
      • IPDv00p1 = 1: (REQUIRED, IMPLEMENTOR PROVIDED) + +
          +
        • Advertise Fields in import and export States. + +
        • +
        +
      • +
      • IPDv00p2 = 2: (REQUIRED, IMPLEMENTOR PROVIDED) + +
          +
        • Realize the advertised Fields in import and export States. + +
        • +
        +
      • +
      • IPDv00p3 = 3: (REQUIRED, NUOPC PROVIDED) + +
          +
        • Check compatibility of the Fields' Connected status. + +
        • +
        +
      • +
      • IPDv00p4 = 4: (REQUIRED, NUOPC PROVIDED) + +
          +
        • Handle Field data initialization. Time stamp the export Fields. + +
        • +
        +
      • +
      +
    • +
    +
  • +
  • IPDv00p1, IPDv01p1, IPDv02p1, IPDv03p1, IPDv04p1, IPDv05p1: Advertise fields in import and export States (REQUIRED, IMPLEMENTOR PROVIDED) + +
      +
    • Advertise fields in import/export states using one of the two NUOPC_Advertise methods (3.9.3, 3.9.4). The methods require Standard Names for each field, and the Standard Names must appear in the NUOPC Field Dictionary or a runtime error is generated. NUOPC_Advertise accepts a TransferOfferGeomObject argument which may be one of: + +
        +
      • “will provide” (default) - The field will provide its own geometric object (i.e., Grid, Mesh, or LocStream) +
      • +
      • “can provide”- The field can provide its own geometric object, but only if the connected field in the other component will not provide it +
      • +
      • “cannot provide” - The field cannot provide its own geometric object. It must accept a geometric object from a connected field. + +
      • +
      + See section 2.4.7 for more details about transferring geometric objects between NUOPC components. + Memory is not allocated for advertised fields, but attributes are set on the field which can be used in later phases, especially for determining if another component can provide and/or consume the advertised field. + +
    • +
    +
  • +
  • IPDv00p2, IPDv01p3, IPDv02p3, IPDv03p3, IPDv04p3, IPDv05p4: Realize field providing a geometric object (REQUIRED*, IMPLEMENTOR PROVIDED) + +
      +
    • Realize connected import and export fields that have their TransferActionGeomObject attribute set to “provide”, i.e., that will provide their own geometric object (i.e., Grid, Mesh, or LocStream). “provide” is the default value of TransferActionGeomObject. Realize means an ESMF_Field object is created on a geometric object and memory for the field is allocated or referenced. + +

      +The NUOPC_Realize methods (3.9.22, 3.9.23, 3.9.24, 3.9.25, 3.9.26) are used to realize fields. Only previously advertised fields can be realized and the field's name is used to search the state for the previously advertised field. + +

      +*Note: This phase is not required if all fields are accepting a geometric object. + +

    • +
    +
  • +
  • IPDv03p4, IPDv04p4, IPDv05p5: Modify decomposition of accepted geometric object (OPTIONAL, IMPLEMENTOR PROVIDED) + +
      +
    • Optionally modify the decomposition information of any accepted geometric object by replacing the DistGrid. In the case of the Grid geometric object, this can be accomplished by retrieving the Grid (and its DistGrid) from the Field, creating a new DistGrid with modified decomposition, creating a new Grid on the new (modified) DistGrid, and then using ESMF_FieldEmptySet to replace the existing Grid with the new one. + +

      +This phase is useful when accepting a Grid from another component, but when the PET counts differ between components. In this case, a new decomposition needs to be set based on the current processor count. + +

    • +
    +
  • +
  • IPDv03p5, IPDv04p5, IPDv05p6: Realize fields accepting a geometric object (REQUIRED*, IMPLEMENTOR PROVIDED) + +
      +
    • Realize connected import and export fields that have their TransferActionGeomObject attribute set to “accept”, i.e., that will accept a geometric object from a connected field in another component. If the generic NUOPC_Connector is used, at this point the full geometric object has already been set in the field and only a call to ESMF_FieldEmptyComplete is required to allocate memory for the field. + +

      +The NUOPC_Realize methods (3.9.22, 3.9.23, 3.9.24, 3.9.25, 3.9.26) are used to realize fields. Only previously advertised fields can be realized and the field's name is used to search the state for the previously advertised field. + +

      +*Note: This phase is not required if all fields are providing a geometric object. + +

    • +
    +
  • +
  • IPDv00p3, IPDv01p4, IPDv02p4, IPDv03p6, IPDv04p6, IPDv05p7: Verify import fields connected and set clock (NUOPC PROVIDED) + +
      +
    • If the model internal clock is found to be not set, then set the model internal clock as a copy of the incoming clock. +
    • +
    • Optional specialization to set the internal clock and/or alarms: label_SetClock. +
    • +
    • Check compatibility, ensuring all advertised import Fields are connected. + +
    • +
    +
  • +
  • IPDv00p4, IPDv01p5: Initialize export fields (NUOPC PROVIDED) + +
      +
    • Optional specialization to initialize export Fields: label_DataInitialize +
    • +
    • Time stamp Fields in export State for compatibility checking. + +
    • +
    +
  • +
  • IPDv02p5, IPDv03p7, IPDv04p7, IPDv05p8: Initialize export fields (NUOPC PROVIDED) + +
      +
    • Optional specialization to initialize export Fields: label_DataInitialize +
    • +
    • Timestamp Fields in export State for compatibility checking. +
    • +
    • Set Component metadata used to resolve initialize data dependencies. + +
    • +
    +
  • +
+ +

+ +

+
+RUN: + +

    +
  • phase 1: (REQUIRED, NUOPC PROVIDED) + +
      +
    • SPECIALIZATION REQUIRED/PROVIDED: label_SetRunClock to check and set the internal Clock against the incoming Clock. + +
        +
      • IF (Phase specific specialization present): Execute the phase specific specialization. +
      • +
      • ELSE: Execute the phase independent specialization. PROVIDED: By default check that internal Clock and incoming Clock agree on current time and that the time step of the incoming Clock is a multiple of the internal Clock time step. Under these conditions set the internal stop time to one time step interval of the incoming Clock. Otherwise exit with error, flagging an incompatibility. + +
      • +
      +
    • +
    • SPECIALIZATION REQUIRED/PROVIDED: label_CheckImport to check Fields in the import State. + +
        +
      • IF (Phase specific specialization is present): Execute the phase specific specialization. +
      • +
      • ELSE: Execute the phase independent specialization. PROVIDED: By default check that all import Fields are at the current time of the internal Clock. + +
      • +
      +
    • +
    • Time stepping loop: starting at current time, running to stop time of the internal Clock. + +
        +
      • Timestamp the Fields in the export State according to the current time of the internal Clock. +
      • +
      • SPECIALIZATION REQUIRED: label_Advance to execute model code. +
      • +
      • SPECIALIZATION OPTIONAL: label_AdvanceClock to advance the current time of the internal Clock. By default (without specialization) advance the current time of the internal Clock according to the time step of the internal Clock. + +
      • +
      +
    • +
    • SPECIALIZATION OPTIONAL/PROVIDED: label_TimestampExport to timestamp Fields in the export State. + +
        +
      • IF (Phase specific specialization present): Execute the phase specific specialization. +
      • +
      • ELSE: Execute the phase independent specialization. PROVIDED: Timestamp all Fields in the export State according to the current time of the internal Clock, which now is identical to the stop time of the internal Clock. + +
      • +
      +
    • +
    +
  • +
+ +

+ +

+
+FINALIZE: + +

    +
  • phase 1: (REQUIRED, NUOPC PROVIDED) + +
      +
    • Optional specialization to finalize custom parts of the component: label_Finalize. + +
    • +
    +
  • +
+ +

+ +

+7.3.1 Initialize Phase Specialization - label_SetClock +

+OPTIONAL, IMPLEMENTOR PROVIDED +
Called from: IPDv00p3, IPDv01p4, IPDv02p4, IPDv03p6, IPDv04p6, IPDv05p7 +
+

+The specialization method can change aspects of the internal clock, which defaults to a copy of the incoming parent clock. For example, the timeStep size may be changed and/or Alarms may be set on the clock. +
+

+The method NUOPC_CompSetClock(comp, externalClock, stabilityTimeStep) (3.6.38) can be used to set the internal clock as a copy of externalClock, but with a timeStep that is less than or equal to the stabilityTimeStep. At the same time it ensures that the timeStep of the external clock is a multiple of the timeStep of the internal clock. If the stabilityTimeStep argument is not provided then the internal clock will simply be set as a copy of the external clock. + +

+ +

+7.3.2 Initialize Phase Specialization - label_DataInitialize +

+OPTIONAL, IMPLEMENTOR PROVIDED +
Called from: IPDv00p4, IPDv01p5, IPDv02p5, IPDv03p7, IPDv04p7, IPDv05p8 +
+

+The specialization method should initialize field data in the export state. Fields in the export state will be timestamped automatically by the calling phase for all fields that have the “Updated” attribute set to “true”. + +

+ +

+7.3.3 Run Phase Specialization - label_SetRunClock +

+REQUIRED, NUOPC PROVIDED +
Called from: default run phase +
+

+A specialization method to check and set the internal clock against the incoming clock. This method is called by the default run phase. +
+

+If not overridden, the default method will check that the internal clock and incoming clock agree on the current time and that the time step of the incoming clock is a multiple of the internal clock time step. Under these conditions set the internal stop time to one time step interval of the incoming clock. Otherwise exit with error, flagging an incompatibility. + +

+ +

+7.3.4 Run Phase Specialization - label_CheckImport +

+REQUIRED, NUOPC PROVIDED +
Called from: default run phase +
+

+A specialization method to verify import fields before advancing in time. If not overridden, the default method verifies that all import fields are at the current time of the internal clock. + +

+ +

+7.3.5 Run Phase Specialization - label_Advance +

+REQUIRED, IMPLEMENTOR PROVIDED +
Called from: default run phase +
+

+A specialization method that advances the model forward in time by one timestep of the internal clock. This method will be called iteratively by the default run phase until reaching the stop time on the internal clock. + +

+ +

+7.3.6 Run Phase Specialization - label_TimestampExport +

+REQUIRED, NUOPC PROVIDED +
Called from: default run phase +
+

+A specialization method to set the timestamp on export fields after the model has advanced. If not overridden, the default method sets the timestamp on all export fields to the stop time on the internal clock (which is also now the current model time). + +

+ +

+7.3.7 Finalize Phase Specialization - label_Finalize +

+OPTIONAL, IMPLEMENTOR PROVIDED +
Called from: default finalize phase +
+

+An optional specialization method for custom finalization code and deallocations of user data structures. + +

+ +

+7.4 NUOPC_Mediator IPD implementation +

+ +

+
+INITIALIZE: + +

    +
  • phase 0: (REQUIRED, NUOPC PROVIDED) + +
      +
    • Initialize the InitializePhaseMap Attribute according to the NUOPC Initialize Phase Definition (IPD) version 00 (see section 7 for a precise definition). The default implementation sets the following mapping: + +
        +
      • IPDv00p1 = 1: (REQUIRED, IMPLEMENTOR PROVIDED) + +
          +
        • Advertise Fields in import and export States. + +
        • +
        +
      • +
      • IPDv00p2 = 2: (REQUIRED, IMPLEMENTOR PROVIDED) + +
          +
        • Realize the advertised Fields in import and export States. + +
        • +
        +
      • +
      • IPDv00p3 = 3: (REQUIRED, NUOPC PROVIDED) + +
          +
        • Check compatibility of the Fields' Connected status. + +
        • +
        +
      • +
      • IPDv00p4 = 4: (REQUIRED, NUOPC PROVIDED) + +
          +
        • Handle Field data initialization. Time stamp the export Fields. + +
        • +
        +
      • +
      +
    • +
    +
  • +
  • IPDv00p3, IPDv01p4, IPDv02p4: (NUOPC PROVIDED) + +
      +
    • Set the Mediator internal clock as a copy of the incoming clock. +
    • +
    • Check compatibility, ensuring all advertised import Fields are connected. + +
    • +
    +
  • +
  • IPDv00p4, IPDv01p5: (NUOPC PROVIDED) + +
      +
    • Optional specialization to initialize export Fields: label_DataInitialize +
    • +
    • Time stamp Fields in import and export States for compatibility checking. + +
    • +
    +
  • +
  • IPDv02p5: (NUOPC PROVIDED) + +
      +
    • Optional specialization to initialize export Fields: label_DataInitialize +
    • +
    • Time stamp Fields in export State for compatibility checking. +
    • +
    • Set Component metadata used to resolve initialize data dependencies. + +
    • +
    +
  • +
+ +

+ +

+
+RUN: + +

    +
  • phase 1: (REQUIRED, NUOPC PROVIDED) + +
      +
    • SPECIALIZATION REQUIRED/PROVIDED: label_SetRunClock to check and set the internal Clock against the incoming Clock. + +
        +
      • IF (Phase specific specialization present): Execute the phase specific specialization. +
      • +
      • ELSE: Execute the phase independent specialization. PROVIDED: By default check that internal Clock and incoming Clock agree on current time and that the time step of the incoming Clock is a multiple of the internal Clock time step. Under these conditions set the internal stop time to one time step interval of the incoming Clock. Otherwise exit with error, flagging an incompatibility. + +
      • +
      +
    • +
    • SPECIALIZATION REQUIRED/PROVIDED: label_CheckImport to check Fields in the import State. + +
        +
      • IF (Phase specific specialization is present): Execute the phase specific specialization. +
      • +
      • ELSE: Execute the phase independent specialization. PROVIDED: By default check that all import Fields are at the current time of the internal Clock. + +
      • +
      +
    • +
    • Time stepping loop: starting at current time, running to stop time of the internal Clock. + +
        +
      • Timestamp the Fields in the export State according to the current time of the internal Clock. +
      • +
      • SPECIALIZATION REQUIRED: label_Advance to execute mediation code. +
      • +
      • SPECIALIZATION OPTIONAL: label_AdvanceClock to advance the current time of the internal Clock. By default (without specialization) advance the current time of the internal Clock according to the time step of the internal Clock. + +
      • +
      +
    • +
    • SPECIALIZATION OPTIONAL/PROVIDED: label_TimestampExport to timestamp Fields in the export State. + +
        +
      • IF (Phase specific specialization present): Execute the phase specific specialization. +
      • +
      • ELSE: Execute the phase independent specialization. PROVIDED: Timestamp all Fields in the export State according to the current time of the internal Clock when entering the RUN method. + +
      • +
      +
    • +
    +
  • +
+ +

+ +

+
+FINALIZE: + +

    +
  • phase 1: (REQUIRED, NUOPC PROVIDED) + +
      +
    • Optional specialization to finalize custom parts of the component: label_Finalize. + +
    • +
    +
  • +
+ +

+ +

+7.5 NUOPC_Connector IPD implementation +

+ +

+
+INITIALIZE: + +

    +
  • phase 0: (REQUIRED, NUOPC PROVIDED) + +
      +
    • Initialize the InitializePhaseMap Attribute according to the NUOPC Initialize Phase Definition (IPD) version 04 (see section 7 for a precise definition). The default implementation sets the following mapping: + +
        +
      • IPDv04p1a = phase : (REQUIRED, NUOPC PROVIDED) +
      • +
      • IPDv04p1b = phase : (REQUIRED, NUOPC PROVIDED) +
      • +
      • IPDv04p2 = phase : (REQUIRED, NUOPC PROVIDED) +
      • +
      • IPDv04p3 = phase : (REQUIRED, NUOPC PROVIDED) +
      • +
      • IPDv04p4 = phase : (REQUIRED, NUOPC PROVIDED) +
      • +
      • IPDv04p5a = phase : (REQUIRED, NUOPC PROVIDED) +
      • +
      • IPDv04p5b = phase : (REQUIRED, NUOPC PROVIDED) + +
      • +
      +
    • +
    +
  • +
  • IPDv01p1, IPDv02p1: (NUOPC PROVIDED) + +
      +
    • Construct a list of matching Field pairs between import and export State based on the StandardName Field metadata. +
    • +
    • Store this list of StandardName entries in the CplList attribute of the Connector Component metadata. + +
    • +
    +
  • +
  • IPDv01p2, IPDv02p2: (NUOPC PROVIDED) + +
      +
    • Allocate and initialize the internal state. +
    • +
    • Use the CplList attribute to construct srcFields and dstFields FieldBundles in the internal state that hold matched Field pairs. +
    • +
    • Set the Connected attribute to true in the Field metadata for each Field that is added to the srcFields and dstFields FieldBundles. + +
    • +
    +
  • +
  • IPDv01p3, IPDv02p3: (NUOPC PROVIDED) + +
      +
    • Use the CplList attribute to construct srcFields and dstFields FieldBundles in the internal state that hold matched Field pairs. +
    • +
    • Set the Connected attribute to true in the Field metadata for each Field that is added to the srcFields and dstFields FieldBundles. +
    • +
    • Optional specialization to precompute a Connector operation: label_ComputeRouteHandle. Simple custom implementations store the precomputed communication RouteHandle in the rh member of the internal state. More complex implementations use the state member in the internal state to store auxiliary Fields, FieldBundles, and RouteHandles. +
    • +
    • By default (if label_ComputeRouteHandle was not provided) precompute the Connector RouteHandle as a bilinear Regrid operation between srcFields and dstFields, with unmappedaction set to ESMF_UNMAPPEDACTION_IGNORE. The resulting RouteHandle is stored in the rh member of the internal state. + +
    • +
    +
  • +
+ +

+ +

+
+RUN: + +

    +
  • phase 1: (REQUIRED, NUOPC PROVIDED) + +
      +
    • Optional specialization to execute a Connector operation: label_ExecuteRouteHandle. Simple custom implementations access the srcFields, dstFields, and rh members of the internal state to implement the required data transfers. More complex implementations access the state member in the internal state, which holds the auxiliary Fields, FieldBundles, and RouteHandles that potentially were added during the optional label_ComputeRouteHandle method during initialize. +
    • +
    • By default (if label_ExecuteRouteHandle was not provided) execute the precomputed Connector RouteHandle between srcFields and dstFields. +
    • +
    • Update the time stamp on the Fields in dstFields to match the time stamp on the Fields in srcFields. + +
    • +
    +
  • +
+ +

+ +

+
+FINALIZE: + +

    +
  • phase 1: (REQUIRED, NUOPC PROVIDED) + +
      +
    • Optional specialization to release the custom Connector operation: label_ReleaseRouteHandle; or by default, if label_ReleaseRouteHandle was not provided, release the default Connector RouteHandle. +
    • +
    • Optional specialization to finalize custom parts of the component: label_Finalize. +
    • +
    • Internal clean-up. + +
    • +
    +
  • +
+ + + +
+esmf_support@ucar.edu +
+ + diff --git a/docs/nightly/fix/reconcile-info/NUOPC_refdoc/node9.html b/docs/nightly/fix/reconcile-info/NUOPC_refdoc/node9.html new file mode 100644 index 000000000..b57f8d952 --- /dev/null +++ b/docs/nightly/fix/reconcile-info/NUOPC_refdoc/node9.html @@ -0,0 +1,69 @@ + + + + + +About this document ... + + + + + + + + + + + + + + + + + + + +

+About this document ... +

+

+This document was generated using the +LaTeX2HTML translator Version 2018 (Released Feb 1, 2018) +

+Copyright © 1993, 1994, 1995, 1996, +Nikos Drakos, +Computer Based Learning Unit, University of Leeds. +
+Copyright © 1997, 1998, 1999, +Ross Moore, +Mathematics Department, Macquarie University, Sydney. +

+The command line arguments were:
+ latex2html -white -toc_depth 5 -split +1 -show_section_numbers -local_icons -address 'esmf_support@ucar.edu' NUOPC_refdoc.tex +

+The translation was initiated on 2024-12-03 +


+
+esmf_support@ucar.edu +
+ + diff --git a/docs/nightly/fix/reconcile-info/NUOPC_refdoc/prev.png b/docs/nightly/fix/reconcile-info/NUOPC_refdoc/prev.png new file mode 100644 index 000000000..e60b8b407 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/NUOPC_refdoc/prev.png differ diff --git a/docs/nightly/fix/reconcile-info/NUOPC_refdoc/prev_g.png b/docs/nightly/fix/reconcile-info/NUOPC_refdoc/prev_g.png new file mode 100644 index 000000000..ac6f0bceb Binary files /dev/null and b/docs/nightly/fix/reconcile-info/NUOPC_refdoc/prev_g.png differ diff --git a/docs/nightly/fix/reconcile-info/NUOPC_refdoc/up.png b/docs/nightly/fix/reconcile-info/NUOPC_refdoc/up.png new file mode 100644 index 000000000..3937e168f Binary files /dev/null and b/docs/nightly/fix/reconcile-info/NUOPC_refdoc/up.png differ diff --git a/docs/nightly/fix/reconcile-info/NUOPC_refdoc/up_g.png b/docs/nightly/fix/reconcile-info/NUOPC_refdoc/up_g.png new file mode 100644 index 000000000..fb36cf765 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/NUOPC_refdoc/up_g.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/WARNINGS b/docs/nightly/fix/reconcile-info/dev_guide/WARNINGS new file mode 100644 index 000000000..a48f82c06 --- /dev/null +++ b/docs/nightly/fix/reconcile-info/dev_guide/WARNINGS @@ -0,0 +1,28 @@ + +Substitution of arg to newlabelxx delayed. + +? brace missing for \oldcontentsline + +\end{sloppypar} not found (ignored). + +No number for "Thefouroptionsforsmoothcurvilineargrids;clockwisefromthetopleftcorner,acontactedgrid,anexpandedgrid,asymmetricsineperturbedgrid,andanasymmetricsineperturbedgrid." + +no reference for citation: FMSdevguide + +no reference for citation: CCSMdevguide + +no reference for citation: bib:ESMFprojectplan + +no reference for citation: mcconnell96 + +no reference for citation: bib:ESMFreqdoc + +no reference for citation: protex + +no reference for citation: uml + +no reference for citation: bib:ESMFimplrep + +no reference for citation: ref:f95 + +no reference for citation: ieee diff --git a/docs/nightly/fix/reconcile-info/dev_guide/contents.png b/docs/nightly/fix/reconcile-info/dev_guide/contents.png new file mode 100644 index 000000000..0c752c66c Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/contents.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/crossref.png b/docs/nightly/fix/reconcile-info/dev_guide/crossref.png new file mode 100644 index 000000000..7314fa7c5 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/crossref.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/dev_guide.css b/docs/nightly/fix/reconcile-info/dev_guide/dev_guide.css new file mode 100644 index 000000000..cba52ee75 --- /dev/null +++ b/docs/nightly/fix/reconcile-info/dev_guide/dev_guide.css @@ -0,0 +1,41 @@ +/* Century Schoolbook font is very similar to Computer Modern Math: cmmi */ +.MATH { font-family: "Century Schoolbook", serif; } +.MATH I { font-family: "Century Schoolbook", serif; font-style: italic } +.BOLDMATH { font-family: "Century Schoolbook", serif; font-weight: bold } + +/* implement both fixed-size and relative sizes */ +SMALL.XTINY { font-size : xx-small } +SMALL.TINY { font-size : x-small } +SMALL.SCRIPTSIZE { font-size : smaller } +SMALL.FOOTNOTESIZE { font-size : small } +SMALL.SMALL { } +BIG.LARGE { } +BIG.XLARGE { font-size : large } +BIG.XXLARGE { font-size : x-large } +BIG.HUGE { font-size : larger } +BIG.XHUGE { font-size : xx-large } + +/* heading styles */ +H1 { } +H2 { } +H3 { } +H4 { } +H5 { } + +/* mathematics styles */ +DIV.displaymath { } /* math displays */ +TD.eqno { } /* equation-number cells */ + + +/* document-specific styles come next */ +DIV.LaTeX { } +SPAN.bf { } +DIV.center { } +DIV.em { } +SPAN.it { } +DIV.logo-LaTeX { } +DIV.navigation { } +PRE.preform { } +SPAN.tt { } +SPAN.arabic { } +SPAN.textit { font-style: italic } diff --git a/docs/nightly/fix/reconcile-info/dev_guide/dev_guide.html b/docs/nightly/fix/reconcile-info/dev_guide/dev_guide.html new file mode 100644 index 000000000..da4d1c2a6 --- /dev/null +++ b/docs/nightly/fix/reconcile-info/dev_guide/dev_guide.html @@ -0,0 +1,535 @@ + + + + + +dev_guide + + + + + + + + + + + + + + + + + + +

+ +

+ +

+

+Earth System Modeling Framework +
Software Developer's Guide +
+

+
+

Silverio Vasquez, Sylvia Murphy, Cecelia DeLuca, Walter Spector, +Gerhard Theurich +
+
+
+
+
+December 3, 2024 + +
+ +

+ +

+


+ + + + + +

+
+esmf_support@ucar.edu +
+ + diff --git a/docs/nightly/fix/reconcile-info/dev_guide/images.aux b/docs/nightly/fix/reconcile-info/dev_guide/images.aux new file mode 100644 index 000000000..c01f471a8 --- /dev/null +++ b/docs/nightly/fix/reconcile-info/dev_guide/images.aux @@ -0,0 +1,19 @@ +\relax +\providecommand\hyper@newdestlabel[2]{} +\providecommand\HyperFirstAtBeginDocument{\AtBeginDocument} +\HyperFirstAtBeginDocument{\ifx\hyper@anchor\@undefined +\global\let\oldcontentsline\contentsline +\gdef\contentsline#1#2#3#4{\oldcontentsline{#1}{#2}{#3}} +\global\let\oldnewlabel\newlabel +\gdef\newlabel#1#2{\newlabelxx{#1}#2} +\gdef\newlabelxx#1#2#3#4#5#6{\oldnewlabel{#1}{{#2}{#3}}} +\AtEndDocument{\ifx\hyper@anchor\@undefined +\let\contentsline\oldcontentsline +\let\newlabel\oldnewlabel +\fi} +\fi} +\global\let\hyper@last\relax +\gdef\HyperFirstAtBeginDocument#1{#1} +\providecommand*\HyPL@Entry[1]{} +\HyPL@Entry{0<>} +\babel@aux{english}{} diff --git a/docs/nightly/fix/reconcile-info/dev_guide/images.bbl b/docs/nightly/fix/reconcile-info/dev_guide/images.bbl new file mode 100644 index 000000000..e69de29bb diff --git a/docs/nightly/fix/reconcile-info/dev_guide/images.log b/docs/nightly/fix/reconcile-info/dev_guide/images.log new file mode 100644 index 000000000..32367be03 --- /dev/null +++ b/docs/nightly/fix/reconcile-info/dev_guide/images.log @@ -0,0 +1,827 @@ +This is pdfTeX, Version 3.14159265-2.6-1.40.18 (TeX Live 2017/Debian) (preloaded format=latex 2022.7.28) 3 DEC 2024 17:28 +entering extended mode + restricted \write18 enabled. + %&-line parsing enabled. +**./images.tex +(./images.tex +LaTeX2e <2017-04-15> +Babel <3.18> and hyphenation patterns for 84 language(s) loaded. + +(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls +Document Class: article 2014/09/29 v1.4h Standard LaTeX document class +(/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo +File: size10.clo 2014/09/29 v1.4h Standard LaTeX file (size option) +) +\c@part=\count79 +\c@section=\count80 +\c@subsection=\count81 +\c@subsubsection=\count82 +\c@paragraph=\count83 +\c@subparagraph=\count84 +\c@figure=\count85 +\c@table=\count86 +\abovecaptionskip=\skip41 +\belowcaptionskip=\skip42 +\bibindent=\dimen102 +) (/usr/share/texlive/texmf-dist/tex/latex/base/ifthen.sty +Package: ifthen 2014/09/29 v1.1c Standard LaTeX ifthen package (DPC) +) (/usr/share/texlive/texmf-dist/tex/generic/epsf/epsf.sty +This is `epsf.tex' v2.7.4 <14 February 2011> +\epsffilein=\read1 +\epsfframemargin=\dimen103 +\epsfframethickness=\dimen104 +\epsfrsize=\dimen105 +\epsftmp=\dimen106 +\epsftsize=\dimen107 +\epsfxsize=\dimen108 +\epsfysize=\dimen109 +\pspoints=\dimen110 +) (/usr/share/texlive/texmf-dist/tex/generic/babel/babel.sty +Package: babel 2018/02/14 3.18 The Babel package +(/usr/share/texlive/texmf-dist/tex/generic/babel/switch.def +File: switch.def 2018/02/14 3.18 Babel switching mechanism +) (/usr/share/texlive/texmf-dist/tex/generic/babel-english/english.ldf +Language: english 2017/06/06 v3.3r English support from the babel system +(/usr/share/texlive/texmf-dist/tex/generic/babel/babel.def +File: babel.def 2018/02/14 3.18 Babel common definitions +\babel@savecnt=\count87 +\U@D=\dimen111 +(/usr/share/texlive/texmf-dist/tex/generic/babel/txtbabel.def) +\bbl@dirlevel=\count88 +) +\l@canadian = a dialect from \language\l@american +\l@australian = a dialect from \language\l@british +\l@newzealand = a dialect from \language\l@british +)) (/usr/share/texmf/tex/latex/html/html.sty +Package: html 1999/07/19 v1.38 hypertext commands for latex2html (nd, hws, rrm) + +\c@lpart=\count89 +\c@lchapter=\count90 +\c@chapter=\count91 +\c@lsection=\count92 +\c@lsubsection=\count93 +\c@lsubsubsection=\count94 +\c@lparagraph=\count95 +\c@lsubparagraph=\count96 +\c@lsubsubparagraph=\count97 +\ptrfile=\write3 +) (/usr/share/texlive/texmf-dist/tex/latex/psnfss/times.sty +Package: times 2005/04/12 PSNFSS-v9.2a (SPQR) +) (/usr/share/texlive/texmf-dist/tex/latex/graphics/graphicx.sty +Package: graphicx 2017/06/01 v1.1a Enhanced LaTeX Graphics (DPC,SPQR) +(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty +Package: keyval 2014/10/28 v1.15 key=value parser (DPC) +\KV@toks@=\toks14 +) (/usr/share/texlive/texmf-dist/tex/latex/graphics/graphics.sty +Package: graphics 2017/06/25 v1.2c Standard LaTeX Graphics (DPC,SPQR) +(/usr/share/texlive/texmf-dist/tex/latex/graphics/trig.sty +Package: trig 2016/01/03 v1.10 sin cos tan (DPC) +) (/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/graphics.cfg +File: graphics.cfg 2016/06/04 v1.11 sample graphics configuration +) +Package graphics Info: Driver file: dvips.def on input line 99. +(/usr/share/texlive/texmf-dist/tex/latex/graphics-def/dvips.def +File: dvips.def 2017/06/20 v3.1d Graphics/color driver for dvips +)) +\Gin@req@height=\dimen112 +\Gin@req@width=\dimen113 +) (/usr/share/texlive/texmf-dist/tex/latex/hyperref/hyperref.sty +Package: hyperref 2018/02/06 v6.86b Hypertext links for LaTeX +(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/hobsub-hyperref.sty +Package: hobsub-hyperref 2016/05/16 v1.14 Bundle oberdiek, subset hyperref (HO) + +(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/hobsub-generic.sty +Package: hobsub-generic 2016/05/16 v1.14 Bundle oberdiek, subset generic (HO) +Package: hobsub 2016/05/16 v1.14 Construct package bundles (HO) +Package: infwarerr 2016/05/16 v1.4 Providing info/warning/error messages (HO) +Package: ltxcmds 2016/05/16 v1.23 LaTeX kernel commands for general use (HO) +Package: ifluatex 2016/05/16 v1.4 Provides the ifluatex switch (HO) +Package ifluatex Info: LuaTeX not detected. +Package: ifvtex 2016/05/16 v1.6 Detect VTeX and its facilities (HO) +Package ifvtex Info: VTeX not detected. +Package: intcalc 2016/05/16 v1.2 Expandable calculations with integers (HO) +Package: ifpdf 2017/03/15 v3.2 Provides the ifpdf switch +Package: etexcmds 2016/05/16 v1.6 Avoid name clashes with e-TeX commands (HO) +Package etexcmds Info: Could not find \expanded. +(etexcmds) That can mean that you are not using pdfTeX 1.50 or +(etexcmds) that some package has redefined \expanded. +(etexcmds) In the latter case, load this package earlier. +Package: kvsetkeys 2016/05/16 v1.17 Key value parser (HO) +Package: kvdefinekeys 2016/05/16 v1.4 Define keys (HO) +Package: pdftexcmds 2018/01/21 v0.26 Utility functions of pdfTeX for LuaTeX (HO +) +Package pdftexcmds Info: LuaTeX not detected. +Package pdftexcmds Info: \pdf@primitive is available. +Package pdftexcmds Info: \pdf@ifprimitive is available. +Package pdftexcmds Info: \pdfdraftmode is ignored in DVI mode. +Package: pdfescape 2016/05/16 v1.14 Implements pdfTeX's escape features (HO) +Package: bigintcalc 2016/05/16 v1.4 Expandable calculations on big integers (HO +) +Package: bitset 2016/05/16 v1.2 Handle bit-vector datatype (HO) +Package: uniquecounter 2016/05/16 v1.3 Provide unlimited unique counter (HO) +) +Package hobsub Info: Skipping package `hobsub' (already loaded). +Package: letltxmacro 2016/05/16 v1.5 Let assignment for LaTeX macros (HO) +Package: hopatch 2016/05/16 v1.3 Wrapper for package hooks (HO) +Package: xcolor-patch 2016/05/16 xcolor patch +Package: atveryend 2016/05/16 v1.9 Hooks at the very end of document (HO) +Package atveryend Info: \enddocument detected (standard20110627). +Package: atbegshi 2016/06/09 v1.18 At begin shipout hook (HO) +Package: refcount 2016/05/16 v3.5 Data extraction from label references (HO) +Package: hycolor 2016/05/16 v1.8 Color options for hyperref/bookmark (HO) +) (/usr/share/texlive/texmf-dist/tex/generic/ifxetex/ifxetex.sty +Package: ifxetex 2010/09/12 v0.6 Provides ifxetex conditional +) (/usr/share/texlive/texmf-dist/tex/latex/oberdiek/auxhook.sty +Package: auxhook 2016/05/16 v1.4 Hooks for auxiliary files (HO) +) (/usr/share/texlive/texmf-dist/tex/latex/oberdiek/kvoptions.sty +Package: kvoptions 2016/05/16 v3.12 Key value format for package options (HO) +) +\@linkdim=\dimen114 +\Hy@linkcounter=\count98 +\Hy@pagecounter=\count99 +(/usr/share/texlive/texmf-dist/tex/latex/hyperref/pd1enc.def +File: pd1enc.def 2018/02/06 v6.86b Hyperref: PDFDocEncoding definition (HO) +) +\Hy@SavedSpaceFactor=\count100 +(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/hyperref.cfg +File: hyperref.cfg 2002/06/06 v1.2 hyperref configuration of TeXLive +) +Package hyperref Info: Hyper figures OFF on input line 4509. +Package hyperref Info: Link nesting OFF on input line 4514. +Package hyperref Info: Hyper index ON on input line 4517. +Package hyperref Info: Plain pages OFF on input line 4524. +Package hyperref Info: Backreferencing OFF on input line 4529. +Package hyperref Info: Implicit mode ON; LaTeX internals redefined. +Package hyperref Info: Bookmarks ON on input line 4762. +\c@Hy@tempcnt=\count101 +(/usr/share/texlive/texmf-dist/tex/latex/url/url.sty +\Urlmuskip=\muskip10 +Package: url 2013/09/16 ver 3.4 Verb mode for urls, etc. +) +LaTeX Info: Redefining \url on input line 5115. +LaTeX Info: Redefining \hyperref on input line 5126. +\XeTeXLinkMargin=\dimen115 +\Fld@menulength=\count102 +\Field@Width=\dimen116 +\Fld@charsize=\dimen117 +Package hyperref Info: Hyper figures OFF on input line 6369. +Package hyperref Info: Link nesting OFF on input line 6374. +Package hyperref Info: Hyper index ON on input line 6377. +Package hyperref Info: backreferencing OFF on input line 6384. +Package hyperref Info: Link coloring OFF on input line 6389. +Package hyperref Info: Link coloring with OCG OFF on input line 6394. +Package hyperref Info: PDF/A mode OFF on input line 6399. +LaTeX Info: Redefining \ref on input line 6439. +LaTeX Info: Redefining \pageref on input line 6443. +\Hy@abspage=\count103 +\c@Item=\count104 +\c@Hfootnote=\count105 +) +Package hyperref Info: Driver: hdvips. +(/usr/share/texlive/texmf-dist/tex/latex/hyperref/hdvips.def +File: hdvips.def 2018/02/06 v6.86b Hyperref driver for dvips +(/usr/share/texlive/texmf-dist/tex/latex/hyperref/pdfmark.def +File: pdfmark.def 2018/02/06 v6.86b Hyperref definitions for pdfmark specials +\pdf@docset=\toks15 +\pdf@box=\box26 +\pdf@toks=\toks16 +\pdf@defaulttoks=\toks17 +\HyField@AnnotCount=\count106 +\Fld@listcount=\count107 +\c@bookmark@seq@number=\count108 +(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/rerunfilecheck.sty +Package: rerunfilecheck 2016/05/16 v1.8 Rerun checks for auxiliary files (HO) +Package uniquecounter Info: New unique counter `rerunfilecheck' on input line 2 +82. +) +\Hy@SectionHShift=\skip43 +)) (/usr/share/texlive/texmf-dist/tex/latex/base/fontenc.sty +Package: fontenc 2017/04/05 v2.0i Standard LaTeX package +(/usr/share/texlive/texmf-dist/tex/latex/base/t1enc.def +File: t1enc.def 2017/04/05 v2.0i Standard LaTeX file +LaTeX Font Info: Redeclaring font encoding T1 on input line 48. +)) (/usr/share/texlive/texmf-dist/tex/latex/xcolor/xcolor.sty +Package: xcolor 2016/05/11 v2.12 LaTeX color extensions (UK) +(/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/color.cfg +File: color.cfg 2016/01/02 v1.6 sample color configuration +) +Package xcolor Info: Driver file: dvips.def on input line 225. +Package xcolor Info: Model `cmy' substituted by `cmy0' on input line 1348. +Package xcolor Info: Model `RGB' extended on input line 1364. +Package xcolor Info: Model `HTML' substituted by `rgb' on input line 1366. +Package xcolor Info: Model `Hsb' substituted by `hsb' on input line 1367. +Package xcolor Info: Model `tHsb' substituted by `hsb' on input line 1368. +Package xcolor Info: Model `HSB' substituted by `hsb' on input line 1369. +Package xcolor Info: Model `Gray' substituted by `gray' on input line 1370. +Package xcolor Info: Model `wave' substituted by `hsb' on input line 1371. +) (/usr/share/texlive/texmf-dist/tex/latex/base/inputenc.sty +Package: inputenc 2015/03/17 v1.2c Input encoding file +\inpenc@prehook=\toks18 +\inpenc@posthook=\toks19 +(/usr/share/texlive/texmf-dist/tex/latex/base/latin1.def +File: latin1.def 2015/03/17 v1.2c Input encoding file +)) +\sizebox=\box27 +\lthtmlwrite=\write4 +(./images.aux) +\openout1 = `images.aux'. + +LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 130. +LaTeX Font Info: ... okay on input line 130. +LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 130. +LaTeX Font Info: ... okay on input line 130. +LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 130. +LaTeX Font Info: ... okay on input line 130. +LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 130. +LaTeX Font Info: ... okay on input line 130. +LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 130. +LaTeX Font Info: ... okay on input line 130. +LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 130. +LaTeX Font Info: ... okay on input line 130. +LaTeX Font Info: Checking defaults for PD1/pdf/m/n on input line 130. +LaTeX Font Info: ... okay on input line 130. +LaTeX Font Info: Try loading font information for T1+ptm on input line 130. +(/usr/share/texlive/texmf-dist/tex/latex/psnfss/t1ptm.fd +File: t1ptm.fd 2001/06/04 font definitions for T1/ptm. +) +\AtBeginShipoutBox=\box28 +Package hyperref Info: Link coloring OFF on input line 130. +(/usr/share/texlive/texmf-dist/tex/latex/hyperref/nameref.sty +Package: nameref 2016/05/21 v2.44 Cross-referencing by name of section +(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/gettitlestring.sty +Package: gettitlestring 2016/05/16 v1.5 Cleanup title references (HO) +) +\c@section@level=\count109 +) +LaTeX Info: Redefining \ref on input line 130. +LaTeX Info: Redefining \pageref on input line 130. +LaTeX Info: Redefining \nameref on input line 130. +\@outlinefile=\write5 +\openout5 = `images.out'. + + +latex2htmlLength hsize=349.0pt + +latex2htmlLength vsize=697.295pt + +latex2htmlLength hoffset=0.0pt + +latex2htmlLength voffset=0.0pt + +latex2htmlLength topmargin=0.0pt + +latex2htmlLength topskip=0.00003pt + +latex2htmlLength headheight=0.0pt + +latex2htmlLength headsep=0.0pt + +latex2htmlLength parskip=0.0pt plus 1.0pt + +latex2htmlLength oddsidemargin=0.0pt + +latex2htmlLength evensidemargin=0.0pt + +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <7> on input line 222. +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <5> on input line 222. +l2hSize :tex2html_wrap_inline1471:8.0pt::8.0pt::39.00273pt. +[1 + + + +] +l2hSize :tex2html_wrap_inline1473:6.83331pt::0.0pt::8.36252pt. +[2 + + +] +l2hSize :tex2html_wrap_inline1475:8.0pt::8.0pt::36.22502pt. +[3 + + +] +l2hSize :tex2html_wrap_inline1477:6.83331pt::0.0pt::8.58684pt. +[4 + + +] +l2hSize :tex2html_wrap_inline1479:8.0pt::8.0pt::90.81642pt. +[5 + + +] +l2hSize :tex2html_wrap_inline1483:6.83331pt::0.0pt::8.41806pt. +[6 + + +] +l2hSize :tex2html_wrap_inline1487:8.0pt::8.0pt::75.58487pt. +[7 + + +] +l2hSize :tex2html_wrap_inline1489:7.24997pt::7.24997pt::8.59761pt. +[8 + + +] +l2hSize :tex2html_wrap_inline1491:8.0pt::8.0pt::44.62495pt. +[9 + + +] +l2hSize :tex2html_wrap_inline1493:7.44444pt::7.44444pt::8.83339pt. +[10 + + +] +l2hSize :tex2html_wrap_inline1495:7.24997pt::7.24997pt::8.27783pt. +[11 + + +] +l2hSize :tex2html_wrap_inline1497:6.74997pt::0.0pt::5.50005pt. +[12 + + +] +l2hSize :tex2html_wrap_inline1503:7.33331pt::7.33331pt::22.06345pt. +[13 + + +] +l2hSize :tex2html_wrap_inline1505:7.24997pt::7.24997pt::11.19893pt. +[14 + + +] +l2hSize :tex2html_wrap_inline1507:7.33331pt::7.33331pt::21.83913pt. +[15 + + +] +l2hSize :tex2html_wrap_inline1511:6.83331pt::0.0pt::8.00005pt. +[16 + + +] +l2hSize :tex2html_wrap_inline1513:8.0pt::8.0pt::70.7318pt. +[17 + + +] +l2hSize :tex2html_wrap_inline1519:7.24997pt::7.24997pt::21.61127pt. +[18 + + +] +l2hSize :tex2html_wrap_inline1521:7.24997pt::7.24997pt::35.64577pt. +[19 + + +] +l2hSize :tex2html_wrap_inline1523:7.24997pt::7.24997pt::6.75694pt. +[20 + + +] +l2hSize :tex2html_wrap_inline1527:6.83331pt::0.0pt::8.30907pt. +[21 + + +] +l2hSize :tex2html_wrap_inline1529:6.83331pt::0.0pt::8.36252pt. +[22 + + +] +l2hSize :tex2html_wrap_inline1531:6.83331pt::0.0pt::7.20834pt. +[23 + + +] +l2hSize :tex2html_wrap_inline1533:6.83331pt::0.0pt::9.625pt. +[24 + + +] +l2hSize :tex2html_wrap_inline1535:6.83331pt::0.0pt::9.56946pt. +[25 + + +] +l2hSize :tex2html_wrap_inline1541:6.74997pt::0.0pt::8.27783pt. +[26 + + +] +l2hSize :tex2html_wrap_inline1543:8.0pt::8.0pt::17.72221pt. +[27 + + +] +l2hSize :tex2html_wrap_inline1545:8.0pt::8.0pt::22.16667pt. +[28 + + +] +l2hSize :tex2html_wrap_inline1549:6.74997pt::0.0pt::5.50005pt. +[29 + + +] +l2hSize :tex2html_wrap_inline1551:8.0pt::8.0pt::24.9445pt. +[30 + + +] +l2hSize :tex2html_wrap_inline1553:8.0pt::8.0pt::30.50008pt. +[31 + + +] +l2hSize :tex2html_wrap_inline1555:8.0pt::8.0pt::27.72229pt. +[32 + + +] +l2hSize :tex2html_wrap_inline1557:8.0pt::8.0pt::27.72229pt. +[33 + + +] +l2hSize :eqnarraystar1206:29.86108pt::0.0pt::349.0pt. +[34 + + +] +l2hSize :tex2html_wrap_inline1569:7.33331pt::7.33331pt::15.8276pt. +[35 + + +] +l2hSize :tex2html_wrap_inline1571:7.33331pt::7.33331pt::13.34843pt. +[36 + + +] +l2hSize :tex2html_wrap_inline1573:7.44444pt::7.44444pt::9.54459pt. +[37 + + +] +l2hSize :tex2html_wrap_inline1575:7.44444pt::7.44444pt::9.61641pt. +[38 + + +] +l2hSize :tex2html_wrap_inline1577:7.24997pt::7.24997pt::41.22554pt. +[39 + + +] +l2hSize :tex2html_wrap_inline1579:6.83331pt::0.0pt::14.54866pt. +[40 + + +] +l2hSize :tex2html_wrap_inline1581:7.33331pt::7.33331pt::14.09499pt. +[41 + + +] +l2hSize :tex2html_wrap_inline1583:6.83331pt::0.0pt::6.75005pt. +[42 + + +] +l2hSize :tex2html_wrap_inline1587:8.0pt::8.0pt::37.1332pt. +[43 + + +] +l2hSize :tex2html_wrap_inline1589:8.0pt::8.0pt::290.72426pt. +[44 + + +] +l2hSize :tex2html_wrap_inline1591:8.0pt::8.0pt::290.34012pt. +[45 + + +] +l2hSize :tex2html_wrap_inline1593:8.0pt::8.0pt::290.72426pt. +[46 + + +] +l2hSize :tex2html_wrap_inline1595:8.0pt::8.0pt::290.34012pt. +[47 + + +] +l2hSize :tex2html_wrap_inline1597:8.0pt::8.0pt::176.12654pt. +[48 + + +] +l2hSize :tex2html_wrap_inline1599:8.0pt::8.0pt::175.89856pt. +[49 + + +] +l2hSize :tex2html_wrap_inline1603:8.0pt::8.0pt::176.61842pt. +[50 + + +] +File: Harness_ContractedGrid.eps Graphic file (type eps) + +l2hSize :tex2html_wrap1889:121.3546pt::0.0pt::349.0pt. +[51 + + +] +File: Harness_ExpandedGrid.eps Graphic file (type eps) + +l2hSize :tex2html_wrap1891:121.3546pt::0.0pt::349.0pt. +[52 + + +] +File: Harness_SymmetricGrid.eps Graphic file (type eps) + +l2hSize :tex2html_wrap1893:121.3546pt::0.0pt::349.0pt. +[53 + + +] +File: Harness_AsymmetricGrid.eps Graphic file (type eps) + +l2hSize :tex2html_wrap1895:121.3546pt::0.0pt::349.0pt. +[54 + + +] +l2hSize :tex2html_wrap_inline1607:6.94444pt::0.0pt::8.27783pt. +[55 + + +] +l2hSize :tex2html_wrap_inline1611:6.74997pt::0.0pt::13.27785pt. +[56 + + +] +l2hSize :tex2html_wrap_inline1613:6.74997pt::0.0pt::13.27785pt. +[57 + + +] +l2hSize :tex2html_wrap_inline1617:8.0pt::8.0pt::244.79816pt. +[58 + + +] +l2hSize :tex2html_wrap_inline1619:7.24997pt::7.24997pt::22.7222pt. +[59 + + +] +l2hSize :tex2html_wrap_inline1621:8.0pt::8.0pt::78.27768pt. +[60 + + +] +l2hSize :tex2html_wrap_inline1623:7.24997pt::7.24997pt::22.7222pt. +[61 + + +] +l2hSize :tex2html_wrap_inline1625:7.24997pt::7.24997pt::22.7222pt. +[62 + + +] +l2hSize :tex2html_wrap_inline1627:6.83331pt::0.0pt::40.16803pt. +[63 + + +] +l2hSize :tex2html_wrap_inline1629:6.83331pt::0.0pt::32.39023pt. +[64 + + +] +l2hSize :tex2html_wrap_inline1637:6.83331pt::0.0pt::37.39024pt. +[65 + + +] +l2hSize :tex2html_wrap_inline1639:7.33331pt::7.33331pt::56.55547pt. +[66 + + +] +l2hSize :tex2html_wrap_inline1641:7.33331pt::7.33331pt::56.55547pt. +[67 + + +] +l2hSize :tex2html_wrap_inline1643:6.83331pt::0.0pt::14.05699pt. +[68 + + +] +l2hSize :tex2html_wrap_inline1645:6.83331pt::0.0pt::14.05699pt. +[69 + + +] +l2hSize :tex2html_wrap_inline1651:6.83331pt::0.0pt::39.33331pt. +[70 + + +] +l2hSize :tex2html_wrap_inline1653:7.33331pt::7.33331pt::83.13861pt. +[71 + + +] +l2hSize :tex2html_wrap_inline1655:6.83331pt::0.0pt::57.66655pt. +[72 + + +] +l2hSize :tex2html_wrap_inline1657:6.83331pt::0.0pt::27.95824pt. +[73 + + +] +l2hSize :tex2html_wrap_inline1659:6.83331pt::0.0pt::57.66655pt. +[74 + + +] +l2hSize :tex2html_wrap_inline1663:6.74997pt::0.0pt::5.50005pt. +[75 + + +] +l2hSize :tex2html_wrap_inline1665:8.0pt::8.0pt::50.97217pt. +[76 + + +] +l2hSize :tex2html_wrap_inline1667:6.83331pt::0.0pt::37.39024pt. +[77 + + +] +l2hSize :tex2html_wrap_inline1669:8.0pt::8.0pt::50.97217pt. +[78 + + +] +l2hSize :tex2html_wrap_inline1679:7.33331pt::7.33331pt::40.16803pt. +[79 + + +] +l2hSize :tex2html_wrap_inline1681:6.83331pt::0.0pt::14.62502pt. +[80 + + +] +l2hSize :tex2html_wrap_inline1685:8.0pt::8.0pt::24.62505pt. +[81 + + +] +l2hSize :tex2html_wrap_inline1687:6.83331pt::0.0pt::45.16805pt. +[82 + + +] +l2hSize :tex2html_wrap_inline1689:8.0pt::8.0pt::57.4028pt. +[83 + + +] +l2hSize :tex2html_wrap_inline1693:8.0pt::8.0pt::83.74992pt. +[84 + + +] +l2hSize :tex2html_wrap_inline1703:8.0pt::8.0pt::57.4028pt. +[85 + + +] +l2hSize :tex2html_wrap_inline1705:7.33331pt::7.33331pt::16.08687pt. +[86 + + +] +l2hSize :tex2html_wrap_inline1707:7.24997pt::7.24997pt::32.72223pt. +[87 + + +] +l2hSize :tex2html_wrap_inline1709:8.0pt::8.0pt::33.3626pt. +[88 + + +] +l2hSize :tex2html_wrap_inline1711:8.0pt::8.0pt::33.3626pt. +[89 + + +] +l2hSize :tex2html_wrap_inline1713:7.24997pt::7.24997pt::41.71066pt. +[90 + + +] +l2hSize :tex2html_wrap_inline1715:8.0pt::8.0pt::47.57536pt. +[91 + + +] +l2hSize :tex2html_wrap_inline1717:8.0pt::8.0pt::28.5869pt. +[92 + + +] +l2hSize :tex2html_wrap_inline2758:8.0pt::8.0pt::23.83328pt. +[93 + + +] +l2hSize :tex2html_wrap_inline2760:8.0pt::8.0pt::23.83328pt. +[94 + + +] +l2hSize :tex2html_wrap_inline3187:8.14003pt::0.0pt::18.97232pt. +[95 + + +] +l2hSize :tex2html_wrap_inline3455:7.24997pt::7.24997pt::27.6134pt. +[96 + + +] +l2hSize :tex2html_wrap_inline4024:7.24997pt::7.24997pt::18.06721pt. +[97 + + +] +l2hSize :tex2html_wrap_inline4026:7.24997pt::7.24997pt::16.72298pt. +[98 + + +] +l2hSize :tex2html_wrap_inline4028:7.44444pt::7.44444pt::69.56789pt. +[99 + + +] +l2hSize :tex2html_wrap_inline4030:8.0pt::8.0pt::86.05545pt. +[100 + + +] +l2hSize :tex2html_wrap_inline4697:6.74997pt::0.0pt::5.50005pt. +[101 + + +] +Package atveryend Info: Empty hook `BeforeClearDocument' on input line 943. +Package atveryend Info: Empty hook `AfterLastShipout' on input line 943. +(./images.aux) +Package atveryend Info: Empty hook `AtVeryEndDocument' on input line 943. +Package atveryend Info: Executing hook `AtEndAfterFileList' on input line 943. + +Package rerunfilecheck Warning: File `images.out' has changed. +(rerunfilecheck) Rerun to get outlines right +(rerunfilecheck) or use package `bookmark'. + +Package rerunfilecheck Info: Checksums for `images.out': +(rerunfilecheck) Before: +(rerunfilecheck) After: D41D8CD98F00B204E9800998ECF8427E;0. +Package atveryend Info: Empty hook `AtVeryVeryEnd' on input line 943. + ) +Here is how much of TeX's memory you used: + 6187 strings out of 492983 + 88015 string characters out of 6134922 + 184392 words of memory out of 5000000 + 9718 multiletter control sequences out of 15000+600000 + 6047 words of font info for 16 fonts, out of 8000000 for 9000 + 1141 hyphenation exceptions out of 8191 + 29i,7n,35p,282b,369s stack positions out of 5000i,500n,10000p,200000b,80000s + +Output written on images.dvi (101 pages, 64224 bytes). diff --git a/docs/nightly/fix/reconcile-info/dev_guide/images.out b/docs/nightly/fix/reconcile-info/dev_guide/images.out new file mode 100644 index 000000000..e69de29bb diff --git a/docs/nightly/fix/reconcile-info/dev_guide/images.pl b/docs/nightly/fix/reconcile-info/dev_guide/images.pl new file mode 100644 index 000000000..ebc1fc718 --- /dev/null +++ b/docs/nightly/fix/reconcile-info/dev_guide/images.pl @@ -0,0 +1,615 @@ +# LaTeX2HTML 2018 (Released Feb 1, 2018) +# Associate images original text with physical files. + + +$key = q/#;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$\char93 $|; + +$key = q/&;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$\&$|; + +$key = q/(1,2)-->(2,1);MSF=1.6;AAT/; +$cached_env_img{$key} = q|$(1,2)->(2,1)$|; + +$key = q/(1slash2)(N)+1;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$(1/2)(N) +1$|; + +$key = q/(1slash2)(N+1);MSF=1.6;AAT/; +$cached_env_img{$key} = q|$(1/2)(N+1)$|; + +$key = q/+;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$+$|; + +$key = q/+P;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$+P$|; + +$key = q/--!!!>;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$- \!\!\! >$|; + +$key = q/-i8;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$-i8$|; + +$key = q/-r8;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$-r8$|; + +$key = q/0.1;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$0.1$|; + +$key = q/0;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$0$|; + +$key = q/0|; + +$key = q/10^{19};MSF=1.6;AAT/; +$cached_env_img{$key} = q|$10^{19}$|; + +$key = q/1slash2N;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$1/2N$|; + +$key = q/1slash2Ntimes2N;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$1/2 N \times 2N$|; + +$key = q/1times2;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$1 \times 2$|; + +$key = q/1timesNPETS;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$1 \times NPETS$|; + +$key = q/2.1;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$2.1$|; + +$key = q/2N;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$2N$|; + +$key = q/2Ntimes(1slash2)(N)+1;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$2N \times (1/2)(N) +1$|; + +$key = q/2Ntimes1slash2N;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$2 N \times 1/2 N$|; + +$key = q/2times1;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$2 \times 1$|; + +$key = q/2times3;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$2 \times 3$|; + +$key = q/4;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$4$|; + +$key = q/80times20;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$80 \times 20$|; + +$key = q/;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$<esmfKind>$|; + +$key = q/;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$<n>$|; + +$key = q/=;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$=$|; + +$key = q/=chi=>;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$=\chi=>$|; + +$key = q/A;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$A$|; + +$key = q/B1{npets};MSF=1.6;AAT/; +$cached_env_img{$key} = q|$B1 \{ npets \}$|; + +$key = q/B2{1};MSF=1.6;AAT/; +$cached_env_img{$key} = q|$B2 \{ 1 \}$|; + +$key = q/B;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$B$|; + +$key = q/B;i_D;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$B \; i_D$|; + +$key = q/C;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$C$|; + +$key = q/C;i_D;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$C \; i_D$|; + +$key = q/D1;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$D1$|; + +$key = q/D1=*2;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$D1=* 2$|; + +$key = q/D1==1;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$D1==1$|; + +$key = q/D2;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$D2$|; + +$key = q/D2=*0.5;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$D2=* 0.5$|; + +$key = q/D2=*1;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$D2=*1$|; + +$key = q/D2=+1;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$D2=+ 1$|; + +$key = q/D2=2;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$D2=2$|; + +$key = q/Deltax;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$\Delta x$|; + +$key = q/Deltay;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$\Delta y$|; + +$key = q/G1{80};MSF=1.6;AAT/; +$cached_env_img{$key} = q|$G1 \{80 \}$|; + +$key = q/G2{20};MSF=1.6;AAT/; +$cached_env_img{$key} = q|$G2 \{ 20 \}$|; + +$key = q/G;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$G$|; + +$key = q/Gamma(x_{i},y_{j});MSF=1.6;AAT/; +$cached_env_img{$key} = q|$\Gamma(x_{i},y_{j})$|; + +$key = q/Gamma;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$\Gamma$|; + +$key = q/Gamma_{x}(x_{i},y_{j})=+(x_{i}slashL_{x})(1-x_{i}slashL_{x})(0.5-x_{i}slashL_{x})(y_{j}slashL_{y})(1-y_{j}slashL_{y});MSF=1.6;AAT/; +$cached_env_img{$key} = q|$\Gamma_{x}(x_{i},y_{j}) = +(x_{i}/L_{x})(1-x_{i}/L_{x} )(0.5-x_{i}/L_{x} )(y_{j}/L_{y})(1-y_{j}/L_{y})$|; + +$key = q/Gamma_{x}(x_{i},y_{j})=-(x_{i}slashL_{x})(1-x_{i}slashL_{x})(0.5-x_{i}slashL_{x})(y_{j}slashL_{y})(1-y_{j}slashL_{y});MSF=1.6;AAT/; +$cached_env_img{$key} = q|$\Gamma_{x}(x_{i},y_{j}) = -(x_{i}/L_{x})(1-x_{i}/L_{x})(0.5-x_{i}/L_{x} )(y_{j}/L_{y})(1-y_{j}/L_{y})$|; + +$key = q/Gamma_{x}(x_{i},y_{j})=sin(4pix{i}slashL_{x})cos(6piy_{j})slashL_{y});MSF=1.6;AAT/; +$cached_env_img{$key} = q|$\Gamma_{x}(x_{i},y_{j}) = \sin(4 \pi x{i}/L_{x}) \cos(6 \pi y_{j})/L_{y})$|; + +$key = q/Gamma_{y}(x_{i},y_{j})=+(y_{j}slashL_{y})(1-y_{j}slashL_{y})(0.5-y_{j}slashL_{y})(x_{i}slashL_{x})(1-x_{i}slashL_{x});MSF=1.6;AAT/; +$cached_env_img{$key} = q|$\Gamma_{y}(x_{i},y_{j}) = +(y_{j}/L_{y})(1-y_{j}/L_{y})(0.5-y_{j}/L_{y} )(x_{i}/L_{x})(1-x_{i}/L_{x})$|; + +$key = q/Gamma_{y}(x_{i},y_{j})=-(y_{j}slashL_{y})(1-y_{j}slashL_{y})(0.5-y_{j}slashL_{y})(x_{i}slashL_{x})(1-x_{i}slashL_{x});MSF=1.6;AAT/; +$cached_env_img{$key} = q|$\Gamma_{y}(x_{i},y_{j}) = -(y_{j}/L_{y})(1-y_{j}/L_{y})(0.5-y_{j}/L_{y} )(x_{i}/L_{x})(1-x_{i}/L_{x})$|; + +$key = q/Gamma_{y}(x_{i},y_{j})=sin(4pix{i}slashL_{x})cos(6piy_{j})slashL_{y});MSF=1.6;AAT/; +$cached_env_img{$key} = q|$\Gamma_{y}(x_{i},y_{j}) = \sin(4 \pi x{i}/L_{x}) \cos(6 \pi y_{j})/L_{y})$|; + +$key = q/Gamma_{y}(x_{i},y_{j})=sin(4piy{j}slashL_{y})cos(6pix_{i})slashL_{x});MSF=1.6;AAT/; +$cached_env_img{$key} = q|$\Gamma_{y}(x_{i},y_{j}) = \sin(4 \pi y{j}/L_{y}) \cos(6 \pi x_{i})/L_{x})$|; + +$key = q/Gi_g;+H{#:#};MSF=1.6;AAT/; +$cached_env_img{$key} = q|$G i_g \; + H \{ \char93  : \char93  \}$|; + +$key = q/H{#:#};MSF=1.6;AAT/; +$cached_env_img{$key} = q|$H \{ \char93  : \char93  \}$|; + +$key = q/N;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$N$|; + +$key = q/N=2;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$N=2$|; + +$key = q/NPETS;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$NPETS$|; + +$key = q/NPETS=4;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$NPETS=4$|; + +$key = q/NPETS=6;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$NPETS=6$|; + +$key = q/NPETStimes1;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$NPETS \times 1$|; + +$key = q/NtimesNleqNPETS;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$N\times N \leq NPETS$|; + +$key = q/P;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$P$|; + +$key = q/S;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$S$|; + +$key = q/U;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$U$|; + +$key = q/X;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$X$|; + +$key = q/X_{ij};MSF=1.6;AAT/; +$cached_env_img{$key} = q|$X_{ij}$|; + +$key = q/Y_{ij};MSF=1.6;AAT/; +$cached_env_img{$key} = q|$Y_{ij}$|; + +$key = q/[42*(2**4)]=672;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$[42*(2**4)]=672$|; + +$key = q/[B1;G1;;B2;G2;;G3];MSF=1.6;AAT/; +$cached_env_img{$key} = q|$[B1 \; G1; \; B2 \; G2; \; G3]$|; + +$key = q/[B1;G1;;B2;G2];MSF=1.6;AAT/; +$cached_env_img{$key} = q|$[ B1 \; G1; \; B2 \; G2 ]$|; + +$key = q/[G1;;G2];MSF=1.6;AAT/; +$cached_env_img{$key} = q|$[ G1 \; ; G2 ]$|; + +$key = q/[G2;G1];MSF=1.6;AAT/; +$cached_env_img{$key} = q|$[ G2; G1 ]$|; + +$key = q/[cdots];MSF=1.6;AAT/; +$cached_env_img{$key} = q|$[ \cdots ]$|; + +$key = q/ast;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$\ast$|; + +$key = q/bullet;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$\bullet$|; + +$key = q/chi;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$\chi$|; + +$key = q/hat{x}_{i};MSF=1.6;AAT/; +$cached_env_img{$key} = q|$\hat{x}_{i}$|; + +$key = q/hat{y}_{j};MSF=1.6;AAT/; +$cached_env_img{$key} = q|$\hat{y}_{j}$|; + +$key = q/i_D;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$i_D$|; + +$key = q/i_g;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$i_g$|; + +$key = q/npetstimes1;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$npets \times 1$|; + +$key = q/scalebox{0.3}{includegraphics{Harness_AsymmetricGrid}};AAT/; +$cached_env_img{$key} = q|\scalebox{0.3}{\includegraphics{Harness_AsymmetricGrid} }|; + +$key = q/scalebox{0.3}{includegraphics{Harness_ContractedGrid}};AAT/; +$cached_env_img{$key} = q|\scalebox{0.3}{\includegraphics{Harness_ContractedGrid} }|; + +$key = q/scalebox{0.3}{includegraphics{Harness_ExpandedGrid}};AAT/; +$cached_env_img{$key} = q|\scalebox{0.3}{\includegraphics{Harness_ExpandedGrid} }|; + +$key = q/scalebox{0.3}{includegraphics{Harness_SymmetricGrid}};AAT/; +$cached_env_img{$key} = q|\scalebox{0.3}{\includegraphics{Harness_SymmetricGrid} }|; + +$key = q/slash=1;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$/=1$|; + +$key = q/slash=2;MSF=1.6;AAT/; +$cached_env_img{$key} = q|$/= 2$|; + +$key = q/{+,+};MSF=1.6;AAT/; +$cached_env_img{$key} = q|$\{ +,+ \}$|; + +$key = q/{+,0};MSF=1.6;AAT/; +$cached_env_img{$key} = q|$\{ +, 0 \}$|; + +$key = q/{0,+};MSF=1.6;AAT/; +$cached_env_img{$key} = q|$\{ 0,+ \}$|; + +$key = q/{0,0};MSF=1.6;AAT/; +$cached_env_img{$key} = q|$\{ 0,0 \}$|; + +$key = q/{cdots};MSF=1.6;AAT/; +$cached_env_img{$key} = q|$\{ \cdots \}$|; + +$key = q/{eqnarraystar}X_{ij}&=&hat{x}_{i}+epsilonDeltaxGamma_{x}(x_{i},y_{j})Y_{ij}&=&hat{y}_{j}+epsilonDeltayGamma_{y}(x_{i},y_{j}){eqnarraystar};MSF=1.6;TAGS=R;AAT/; +$cached_env_img{$key} = q|\begin{eqnarray*}
+X_{ij} &=& \hat{x}_{i} + \epsilon \Delta x \Gamma_{x}(x_{i},y_...
+...{ij} &=& \hat{y}_{j} + \epsilon \Delta y \Gamma_{y}(x_{i},y_{j})
+\end{eqnarray*}|; + +$key = q/|a+b|+a*cos(2pi*k_x*xslashL_x)+b*sin(2pi*l_y*xslashL_y);MSF=1.6;AAT/; +$cached_env_img{$key} = q|$\vert a+b\vert + a*\cos(2\pi * k_x * x/L_x ) + b*\sin(2\pi * l_y * x/L_y )$|; + +1; + diff --git a/docs/nightly/fix/reconcile-info/dev_guide/images.tex b/docs/nightly/fix/reconcile-info/dev_guide/images.tex new file mode 100644 index 000000000..f98e7b563 --- /dev/null +++ b/docs/nightly/fix/reconcile-info/dev_guide/images.tex @@ -0,0 +1,943 @@ +\batchmode + +\documentclass[english,dvips]{article} +\RequirePackage{ifthen} + + +\usepackage{epsf} +\usepackage{babel} +\usepackage{html} +\usepackage{times} +\usepackage{graphicx} +\usepackage{hyperref} +\usepackage[T1]{fontenc} + + + +\setlength{\textwidth}{6.5truein} + +\setlength{\textheight}{8.5truein} + +\setlength{\oddsidemargin}{0in} + +\setlength{\unitlength}{1truecm} + + + + +\usepackage{xcolor} + +\usepackage[latin1]{inputenc} + + + +\makeatletter + +\makeatletter +\count@=\the\catcode`\_ \catcode`\_=8 +\newenvironment{tex2html_wrap}{}{}% +\catcode`\<=12\catcode`\_=\count@ +\newcommand{\providedcommand}[1]{\expandafter\providecommand\csname #1\endcsname}% +\newcommand{\renewedcommand}[1]{\expandafter\providecommand\csname #1\endcsname{}% + \expandafter\renewcommand\csname #1\endcsname}% +\newcommand{\newedenvironment}[1]{\newenvironment{#1}{}{}\renewenvironment{#1}}% +\let\newedcommand\renewedcommand +\let\renewedenvironment\newedenvironment +\makeatother +\let\mathon=$ +\let\mathoff=$ +\ifx\AtBeginDocument\undefined \newcommand{\AtBeginDocument}[1]{}\fi +\newbox\sizebox +\setlength{\hoffset}{0pt}\setlength{\voffset}{0pt} +\addtolength{\textheight}{\footskip}\setlength{\footskip}{0pt} +\addtolength{\textheight}{\topmargin}\setlength{\topmargin}{0pt} +\addtolength{\textheight}{\headheight}\setlength{\headheight}{0pt} +\addtolength{\textheight}{\headsep}\setlength{\headsep}{0pt} +\setlength{\textwidth}{349pt} +\newwrite\lthtmlwrite +\makeatletter +\let\realnormalsize=\normalsize +\global\topskip=2sp +\def\preveqno{}\let\real@float=\@float \let\realend@float=\end@float +\def\@float{\let\@savefreelist\@freelist\real@float} +\def\liih@math{\ifmmode$\else\bad@math\fi} +\def\end@float{\realend@float\global\let\@freelist\@savefreelist} +\let\real@dbflt=\@dbflt \let\end@dblfloat=\end@float +\let\@largefloatcheck=\relax +\let\if@boxedmulticols=\iftrue +\def\@dbflt{\let\@savefreelist\@freelist\real@dbflt} +\def\adjustnormalsize{\def\normalsize{\mathsurround=0pt \realnormalsize + \parindent=0pt\abovedisplayskip=0pt\belowdisplayskip=0pt}% + \def\phantompar{\csname par\endcsname}\normalsize}% +\def\lthtmltypeout#1{{\let\protect\string \immediate\write\lthtmlwrite{#1}}}% +\newcommand\lthtmlhboxmathA{\adjustnormalsize\setbox\sizebox=\hbox\bgroup\kern.05em }% +\newcommand\lthtmlhboxmathB{\adjustnormalsize\setbox\sizebox=\hbox to\hsize\bgroup\hfill }% +\newcommand\lthtmlvboxmathA{\adjustnormalsize\setbox\sizebox=\vbox\bgroup % + \let\ifinner=\iffalse \let\)\liih@math }% +\newcommand\lthtmlboxmathZ{\@next\next\@currlist{}{\def\next{\voidb@x}}% + \expandafter\box\next\egroup}% +\newcommand\lthtmlmathtype[1]{\gdef\lthtmlmathenv{#1}}% +\newcommand\lthtmllogmath{\dimen0\ht\sizebox \advance\dimen0\dp\sizebox + \ifdim\dimen0>.95\vsize + \lthtmltypeout{% +*** image for \lthtmlmathenv\space is too tall at \the\dimen0, reducing to .95 vsize ***}% + \ht\sizebox.95\vsize \dp\sizebox\z@ \fi + \lthtmltypeout{l2hSize % +:\lthtmlmathenv:\the\ht\sizebox::\the\dp\sizebox::\the\wd\sizebox.\preveqno}}% +\newcommand\lthtmlfigureA[1]{\let\@savefreelist\@freelist + \lthtmlmathtype{#1}\lthtmlvboxmathA}% +\newcommand\lthtmlpictureA{\bgroup\catcode`\_=8 \lthtmlpictureB}% +\newcommand\lthtmlpictureB[1]{\lthtmlmathtype{#1}\egroup + \let\@savefreelist\@freelist \lthtmlhboxmathB}% +\newcommand\lthtmlpictureZ[1]{\hfill\lthtmlfigureZ}% +\newcommand\lthtmlfigureZ{\lthtmlboxmathZ\lthtmllogmath\copy\sizebox + \global\let\@freelist\@savefreelist}% +\newcommand\lthtmldisplayA{\bgroup\catcode`\_=8 \lthtmldisplayAi}% +\newcommand\lthtmldisplayAi[1]{\lthtmlmathtype{#1}\egroup\lthtmlvboxmathA}% +\newcommand\lthtmldisplayB[1]{\edef\preveqno{(\theequation)}% + \lthtmldisplayA{#1}\let\@eqnnum\relax}% +\newcommand\lthtmldisplayZ{\lthtmlboxmathZ\lthtmllogmath\lthtmlsetmath}% +\newcommand\lthtmlinlinemathA{\bgroup\catcode`\_=8 \lthtmlinlinemathB} +\newcommand\lthtmlinlinemathB[1]{\lthtmlmathtype{#1}\egroup\lthtmlhboxmathA + \vrule height1.5ex width0pt }% +\newcommand\lthtmlinlineA{\bgroup\catcode`\_=8 \lthtmlinlineB}% +\newcommand\lthtmlinlineB[1]{\lthtmlmathtype{#1}\egroup\lthtmlhboxmathA}% +\newcommand\lthtmlinlineZ{\egroup\expandafter\ifdim\dp\sizebox>0pt % + \expandafter\centerinlinemath\fi\lthtmllogmath\lthtmlsetinline} +\newcommand\lthtmlinlinemathZ{\egroup\expandafter\ifdim\dp\sizebox>0pt % + \expandafter\centerinlinemath\fi\lthtmllogmath\lthtmlsetmath} +\newcommand\lthtmlindisplaymathZ{\egroup % + \centerinlinemath\lthtmllogmath\lthtmlsetmath} +\def\lthtmlsetinline{\hbox{\vrule width.1em \vtop{\vbox{% + \kern.1em\copy\sizebox}\ifdim\dp\sizebox>0pt\kern.1em\else\kern.3pt\fi + \ifdim\hsize>\wd\sizebox \hrule depth1pt\fi}}} +\def\lthtmlsetmath{\hbox{\vrule width.1em\kern-.05em\vtop{\vbox{% + \kern.1em\kern0.8 pt\hbox{\hglue.17em\copy\sizebox\hglue0.8 pt}}\kern.3pt% + \ifdim\dp\sizebox>0pt\kern.1em\fi \kern0.8 pt% + \ifdim\hsize>\wd\sizebox \hrule depth1pt\fi}}} +\def\centerinlinemath{% + \dimen1=\ifdim\ht\sizebox<\dp\sizebox \dp\sizebox\else\ht\sizebox\fi + \advance\dimen1by.5pt \vrule width0pt height\dimen1 depth\dimen1 + \dp\sizebox=\dimen1\ht\sizebox=\dimen1\relax} + +\def\lthtmlcheckvsize{\ifdim\ht\sizebox<\vsize + \ifdim\wd\sizebox<\hsize\expandafter\hfill\fi \expandafter\vfill + \else\expandafter\vss\fi}% +\providecommand{\selectlanguage}[1]{}% +\makeatletter \tracingstats = 1 + + +\begin{document} +\pagestyle{empty}\thispagestyle{empty}\lthtmltypeout{}% +\lthtmltypeout{latex2htmlLength hsize=\the\hsize}\lthtmltypeout{}% +\lthtmltypeout{latex2htmlLength vsize=\the\vsize}\lthtmltypeout{}% +\lthtmltypeout{latex2htmlLength hoffset=\the\hoffset}\lthtmltypeout{}% +\lthtmltypeout{latex2htmlLength voffset=\the\voffset}\lthtmltypeout{}% +\lthtmltypeout{latex2htmlLength topmargin=\the\topmargin}\lthtmltypeout{}% +\lthtmltypeout{latex2htmlLength topskip=\the\topskip}\lthtmltypeout{}% +\lthtmltypeout{latex2htmlLength headheight=\the\headheight}\lthtmltypeout{}% +\lthtmltypeout{latex2htmlLength headsep=\the\headsep}\lthtmltypeout{}% +\lthtmltypeout{latex2htmlLength parskip=\the\parskip}\lthtmltypeout{}% +\lthtmltypeout{latex2htmlLength oddsidemargin=\the\oddsidemargin}\lthtmltypeout{}% +\makeatletter +\if@twoside\lthtmltypeout{latex2htmlLength evensidemargin=\the\evensidemargin}% +\else\lthtmltypeout{latex2htmlLength evensidemargin=\the\oddsidemargin}\fi% +\lthtmltypeout{}% +\makeatother +\setcounter{page}{1} +\onecolumn + +% !!! IMAGES START HERE !!! + +\stepcounter{section} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{section} +\stepcounter{subsection} +\stepcounter{subsubsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{section} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsubsection} +\stepcounter{section} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsection} +\stepcounter{subsubsection} +\stepcounter{paragraph} +\stepcounter{paragraph} +\stepcounter{paragraph} +\stepcounter{paragraph} +\stepcounter{subsubsection} +\stepcounter{paragraph} +\stepcounter{subsubsection} +\stepcounter{paragraph} +\stepcounter{paragraph} +\stepcounter{subsubsection} +\stepcounter{paragraph} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{section} +\stepcounter{section} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1471}% +$[ G1 \; ; G2 ]$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1473}% +$G$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1475}% +$[ G2; G1 ]$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1477}% +$B$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1479}% +$[B1 \; G1; \; B2 \; G2; \; G3]$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +\stepcounter{paragraph} +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1483}% +$U$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1487}% +$G i_g \; + H \{ \# : \# \}$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1489}% +$i_g$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1491}% +$H \{ \# : \# \}$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1493}% +$\#$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1495}% +$+$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1497}% +$\ast$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +\stepcounter{paragraph} +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1503}% +$B \; i_D$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1505}% +$i_D$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1507}% +$C \; i_D$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1511}% +$A$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1513}% +$[ B1 \; G1; \; B2 \; G2 ]$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +\stepcounter{paragraph} +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1519}% +$-- \!\!\! >$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1521}% +$=\chi=>$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1523}% +$\chi$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1527}% +$P$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1529}% +$C$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1531}% +$S$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1533}% +$N$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1535}% +$X$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1541}% +$=$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +\stepcounter{paragraph} +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1543}% +$[ \cdots ]$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1545}% +$\{ \cdots \}$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1549}% +$0$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1551}% +$\{ 0,0 \}$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1553}% +$\{ +,+ \}$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1555}% +$\{ +, 0 \}$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1557}% +$\{ 0,+ \}$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{paragraph} +{\newpage\clearpage +\lthtmldisplayA{eqnarraystar1206}% +\begin{eqnarray*} +X_{ij} &=& \hat{x}_{i} + \epsilon \Delta x \Gamma_{x}(x_{i},y_{j}) \\ +Y_{ij} &=& \hat{y}_{j} + \epsilon \Delta y \Gamma_{y}(x_{i},y_{j}) +\end{eqnarray*}% +\lthtmldisplayZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1569}% +$X_{ij}$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1571}% +$Y_{ij}$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1573}% +$\hat{x}_{i}$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1575}% +$\hat{y}_{j}$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1577}% +$0 < \epsilon < 1$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1579}% +$\Delta x$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1581}% +$\Delta y$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1583}% +$\Gamma$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1587}% +$\Gamma(x_{i},y_{j})$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1589}% +$\Gamma_{x}(x_{i},y_{j}) = -(x_{i}/L_{x})(1-x_{i}/L_{x})(0.5-x_{i}/L_{x} )(y_{j}/L_{y})(1-y_{j}/L_{y})$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1591}% +$\Gamma_{y}(x_{i},y_{j}) = -(y_{j}/L_{y})(1-y_{j}/L_{y})(0.5-y_{j}/L_{y} )(x_{i}/L_{x})(1-x_{i}/L_{x})$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1593}% +$\Gamma_{x}(x_{i},y_{j}) = +(x_{i}/L_{x})(1-x_{i}/L_{x} )(0.5-x_{i}/L_{x} )(y_{j}/L_{y})(1-y_{j}/L_{y})$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1595}% +$\Gamma_{y}(x_{i},y_{j}) = +(y_{j}/L_{y})(1-y_{j}/L_{y})(0.5-y_{j}/L_{y} )(x_{i}/L_{x})(1-x_{i}/L_{x})$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1597}% +$ \Gamma_{x}(x_{i},y_{j}) = \sin(4 \pi x{i}/L_{x}) \cos(6 \pi y_{j})/L_{y})$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1599}% +$ \Gamma_{y}(x_{i},y_{j}) = \sin(4 \pi x{i}/L_{x}) \cos(6 \pi y_{j})/L_{y})$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1603}% +$ \Gamma_{y}(x_{i},y_{j}) = \sin(4 \pi y{j}/L_{y}) \cos(6 \pi x_{i})/L_{x})$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlpictureA{tex2html_wrap1889}% +\scalebox{0.3}{\includegraphics{Harness_ContractedGrid} }% +\lthtmlpictureZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlpictureA{tex2html_wrap1891}% +\scalebox{0.3}{\includegraphics{Harness_ExpandedGrid} }% +\lthtmlpictureZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlpictureA{tex2html_wrap1893}% +\scalebox{0.3}{\includegraphics{Harness_SymmetricGrid} }% +\lthtmlpictureZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlpictureA{tex2html_wrap1895}% +\scalebox{0.3}{\includegraphics{Harness_AsymmetricGrid} }% +\lthtmlpictureZ +\lthtmlcheckvsize\clearpage} + +\stepcounter{paragraph} +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1607}% +$\&$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +\stepcounter{paragraph} +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1611}% +$2.1$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1613}% +$0.1$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1617}% +$|a+b| + a*\cos(2\pi * k_x * x/L_x ) + b*\sin(2\pi * l_y * x/L_y )$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +\stepcounter{subsubsection} +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1619}% +$2 \times 3$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1621}% +$(1,2)-->(2,1)$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1623}% +$ 1 \times 2$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1625}% +$ 2 \times 1$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1627}% +$D1==1$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1629}% +$D2=2$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1637}% +$D2=*1$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1639}% +$ 1 \times NPETS$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1641}% +$NPETS \times 1$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1643}% +$D1$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1645}% +$D2$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1651}% +$NPETS$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1653}% +$N\times N \leq NPETS$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1655}% +$NPETS=4$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1657}% +$N=2$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1659}% +$NPETS=6$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1663}% +$4$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1665}% +$2 N \times 1/2 N$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1667}% +$D1=* 2$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1669}% +$1/2 N \times 2N$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1679}% +$D2=+ 1$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1681}% +$2N$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1685}% +$1/2N$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1687}% +$D2=* 0.5$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1689}% +$(1/2)(N) +1$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1693}% +$2N \times (1/2)(N) +1$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1703}% +$(1/2)(N+1)$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +\stepcounter{subsubsection} +\stepcounter{subsection} +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1705}% +$+P$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1707}% +$80 \times 20$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1709}% +$G1 \{80 \}$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1711}% +$G2 \{ 20 \}$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1713}% +$npets \times 1$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1715}% +$B1 \{ npets \}$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline1717}% +$B2 \{ 1 \}$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +\stepcounter{section} +\stepcounter{subsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline2758}% +$/=1$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline2760}% +$/= 2$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsection} +\stepcounter{subsubsection} +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline3187}% +$10^{19}$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline3455}% +$$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsection} +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline4024}% +$-r8$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline4026}% +$-i8$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +\stepcounter{subsubsection} +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline4028}% +$$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline4030}% +$[42*(2**4)]=672$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + +\stepcounter{subsection} +\stepcounter{subsubsection} +\stepcounter{subsection} +\stepcounter{subsubsection} +\stepcounter{subsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsection} +\stepcounter{section} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{subsubsection} +\stepcounter{section} +\stepcounter{subsection} +\stepcounter{subsection} +{\newpage\clearpage +\lthtmlinlinemathA{tex2html_wrap_inline4697}% +$\bullet$% +\lthtmlinlinemathZ +\lthtmlcheckvsize\clearpage} + + +\end{document} diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img1.png b/docs/nightly/fix/reconcile-info/dev_guide/img1.png new file mode 100644 index 000000000..7f6b7a36d Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img1.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img10.png b/docs/nightly/fix/reconcile-info/dev_guide/img10.png new file mode 100644 index 000000000..551288fd7 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img10.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img100.png b/docs/nightly/fix/reconcile-info/dev_guide/img100.png new file mode 100644 index 000000000..1d6596c0e Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img100.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img101.png b/docs/nightly/fix/reconcile-info/dev_guide/img101.png new file mode 100644 index 000000000..4c69decb9 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img101.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img11.png b/docs/nightly/fix/reconcile-info/dev_guide/img11.png new file mode 100644 index 000000000..3cc9e049c Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img11.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img12.png b/docs/nightly/fix/reconcile-info/dev_guide/img12.png new file mode 100644 index 000000000..00adfdce3 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img12.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img13.png b/docs/nightly/fix/reconcile-info/dev_guide/img13.png new file mode 100644 index 000000000..d98f2ec1b Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img13.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img14.png b/docs/nightly/fix/reconcile-info/dev_guide/img14.png new file mode 100644 index 000000000..c9d09154e Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img14.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img15.png b/docs/nightly/fix/reconcile-info/dev_guide/img15.png new file mode 100644 index 000000000..4eca764c3 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img15.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img16.png b/docs/nightly/fix/reconcile-info/dev_guide/img16.png new file mode 100644 index 000000000..e7280f00d Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img16.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img17.png b/docs/nightly/fix/reconcile-info/dev_guide/img17.png new file mode 100644 index 000000000..ee9957293 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img17.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img18.png b/docs/nightly/fix/reconcile-info/dev_guide/img18.png new file mode 100644 index 000000000..f9cb33262 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img18.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img19.png b/docs/nightly/fix/reconcile-info/dev_guide/img19.png new file mode 100644 index 000000000..4a66f807d Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img19.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img2.png b/docs/nightly/fix/reconcile-info/dev_guide/img2.png new file mode 100644 index 000000000..a04c177b3 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img2.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img20.png b/docs/nightly/fix/reconcile-info/dev_guide/img20.png new file mode 100644 index 000000000..492444564 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img20.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img21.png b/docs/nightly/fix/reconcile-info/dev_guide/img21.png new file mode 100644 index 000000000..dceacc00f Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img21.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img22.png b/docs/nightly/fix/reconcile-info/dev_guide/img22.png new file mode 100644 index 000000000..205e400e4 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img22.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img23.png b/docs/nightly/fix/reconcile-info/dev_guide/img23.png new file mode 100644 index 000000000..3d8b606b5 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img23.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img24.png b/docs/nightly/fix/reconcile-info/dev_guide/img24.png new file mode 100644 index 000000000..d7f670c34 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img24.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img25.png b/docs/nightly/fix/reconcile-info/dev_guide/img25.png new file mode 100644 index 000000000..774985d60 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img25.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img26.png b/docs/nightly/fix/reconcile-info/dev_guide/img26.png new file mode 100644 index 000000000..f789ed7ae Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img26.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img27.png b/docs/nightly/fix/reconcile-info/dev_guide/img27.png new file mode 100644 index 000000000..9189c46ab Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img27.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img28.png b/docs/nightly/fix/reconcile-info/dev_guide/img28.png new file mode 100644 index 000000000..1d525b24f Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img28.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img29.png b/docs/nightly/fix/reconcile-info/dev_guide/img29.png new file mode 100644 index 000000000..55cf30c9e Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img29.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img3.png b/docs/nightly/fix/reconcile-info/dev_guide/img3.png new file mode 100644 index 000000000..7bdbe54da Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img3.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img30.png b/docs/nightly/fix/reconcile-info/dev_guide/img30.png new file mode 100644 index 000000000..5e32ff386 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img30.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img31.png b/docs/nightly/fix/reconcile-info/dev_guide/img31.png new file mode 100644 index 000000000..3d6fd9b92 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img31.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img32.png b/docs/nightly/fix/reconcile-info/dev_guide/img32.png new file mode 100644 index 000000000..79f0141fa Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img32.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img33.png b/docs/nightly/fix/reconcile-info/dev_guide/img33.png new file mode 100644 index 000000000..797bad7e3 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img33.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img34.png b/docs/nightly/fix/reconcile-info/dev_guide/img34.png new file mode 100644 index 000000000..42c7bd866 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img34.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img35.png b/docs/nightly/fix/reconcile-info/dev_guide/img35.png new file mode 100644 index 000000000..6685ad11e Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img35.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img36.png b/docs/nightly/fix/reconcile-info/dev_guide/img36.png new file mode 100644 index 000000000..c2300cc2f Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img36.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img37.png b/docs/nightly/fix/reconcile-info/dev_guide/img37.png new file mode 100644 index 000000000..9037191fb Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img37.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img38.png b/docs/nightly/fix/reconcile-info/dev_guide/img38.png new file mode 100644 index 000000000..90c85718c Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img38.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img39.png b/docs/nightly/fix/reconcile-info/dev_guide/img39.png new file mode 100644 index 000000000..28a36ea8f Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img39.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img4.png b/docs/nightly/fix/reconcile-info/dev_guide/img4.png new file mode 100644 index 000000000..bd8b1dc69 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img4.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img40.png b/docs/nightly/fix/reconcile-info/dev_guide/img40.png new file mode 100644 index 000000000..4cc3c13bf Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img40.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img41.png b/docs/nightly/fix/reconcile-info/dev_guide/img41.png new file mode 100644 index 000000000..fefa33004 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img41.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img42.png b/docs/nightly/fix/reconcile-info/dev_guide/img42.png new file mode 100644 index 000000000..15e95d5cf Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img42.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img43.png b/docs/nightly/fix/reconcile-info/dev_guide/img43.png new file mode 100644 index 000000000..2081c79d3 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img43.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img44.png b/docs/nightly/fix/reconcile-info/dev_guide/img44.png new file mode 100644 index 000000000..10fbfaa81 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img44.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img45.png b/docs/nightly/fix/reconcile-info/dev_guide/img45.png new file mode 100644 index 000000000..cfbf4e8c8 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img45.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img46.png b/docs/nightly/fix/reconcile-info/dev_guide/img46.png new file mode 100644 index 000000000..69a0dc018 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img46.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img47.png b/docs/nightly/fix/reconcile-info/dev_guide/img47.png new file mode 100644 index 000000000..dc525421f Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img47.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img48.png b/docs/nightly/fix/reconcile-info/dev_guide/img48.png new file mode 100644 index 000000000..d195c7932 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img48.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img49.png b/docs/nightly/fix/reconcile-info/dev_guide/img49.png new file mode 100644 index 000000000..867a1e8a2 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img49.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img5.png b/docs/nightly/fix/reconcile-info/dev_guide/img5.png new file mode 100644 index 000000000..61f729a81 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img5.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img50.png b/docs/nightly/fix/reconcile-info/dev_guide/img50.png new file mode 100644 index 000000000..0a510c119 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img50.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img51.png b/docs/nightly/fix/reconcile-info/dev_guide/img51.png new file mode 100644 index 000000000..3d327dd2c Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img51.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img52.png b/docs/nightly/fix/reconcile-info/dev_guide/img52.png new file mode 100644 index 000000000..cde932ade Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img52.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img53.png b/docs/nightly/fix/reconcile-info/dev_guide/img53.png new file mode 100644 index 000000000..9c71eac12 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img53.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img54.png b/docs/nightly/fix/reconcile-info/dev_guide/img54.png new file mode 100644 index 000000000..5d68e5653 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img54.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img55.png b/docs/nightly/fix/reconcile-info/dev_guide/img55.png new file mode 100644 index 000000000..16a173825 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img55.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img56.png b/docs/nightly/fix/reconcile-info/dev_guide/img56.png new file mode 100644 index 000000000..b4895475a Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img56.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img57.png b/docs/nightly/fix/reconcile-info/dev_guide/img57.png new file mode 100644 index 000000000..1ecd87a07 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img57.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img58.png b/docs/nightly/fix/reconcile-info/dev_guide/img58.png new file mode 100644 index 000000000..b6bdd9ee0 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img58.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img59.png b/docs/nightly/fix/reconcile-info/dev_guide/img59.png new file mode 100644 index 000000000..c7a701780 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img59.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img6.png b/docs/nightly/fix/reconcile-info/dev_guide/img6.png new file mode 100644 index 000000000..995661e29 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img6.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img60.png b/docs/nightly/fix/reconcile-info/dev_guide/img60.png new file mode 100644 index 000000000..dbb5d8f76 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img60.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img61.png b/docs/nightly/fix/reconcile-info/dev_guide/img61.png new file mode 100644 index 000000000..0f8cbf090 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img61.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img62.png b/docs/nightly/fix/reconcile-info/dev_guide/img62.png new file mode 100644 index 000000000..abd5dc136 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img62.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img63.png b/docs/nightly/fix/reconcile-info/dev_guide/img63.png new file mode 100644 index 000000000..3956a69c2 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img63.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img64.png b/docs/nightly/fix/reconcile-info/dev_guide/img64.png new file mode 100644 index 000000000..ba46391e4 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img64.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img65.png b/docs/nightly/fix/reconcile-info/dev_guide/img65.png new file mode 100644 index 000000000..f3da50e06 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img65.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img66.png b/docs/nightly/fix/reconcile-info/dev_guide/img66.png new file mode 100644 index 000000000..21ab69f88 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img66.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img67.png b/docs/nightly/fix/reconcile-info/dev_guide/img67.png new file mode 100644 index 000000000..df8797799 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img67.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img68.png b/docs/nightly/fix/reconcile-info/dev_guide/img68.png new file mode 100644 index 000000000..9d8ff2fff Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img68.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img69.png b/docs/nightly/fix/reconcile-info/dev_guide/img69.png new file mode 100644 index 000000000..83e3ac5e1 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img69.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img7.png b/docs/nightly/fix/reconcile-info/dev_guide/img7.png new file mode 100644 index 000000000..3fd586908 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img7.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img70.png b/docs/nightly/fix/reconcile-info/dev_guide/img70.png new file mode 100644 index 000000000..19fbee284 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img70.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img71.png b/docs/nightly/fix/reconcile-info/dev_guide/img71.png new file mode 100644 index 000000000..8ac2c9fdb Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img71.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img72.png b/docs/nightly/fix/reconcile-info/dev_guide/img72.png new file mode 100644 index 000000000..de5c55afe Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img72.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img73.png b/docs/nightly/fix/reconcile-info/dev_guide/img73.png new file mode 100644 index 000000000..e4bf42ca7 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img73.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img74.png b/docs/nightly/fix/reconcile-info/dev_guide/img74.png new file mode 100644 index 000000000..f40f8598a Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img74.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img75.png b/docs/nightly/fix/reconcile-info/dev_guide/img75.png new file mode 100644 index 000000000..bf3e5c76f Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img75.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img76.png b/docs/nightly/fix/reconcile-info/dev_guide/img76.png new file mode 100644 index 000000000..7a9f345fd Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img76.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img77.png b/docs/nightly/fix/reconcile-info/dev_guide/img77.png new file mode 100644 index 000000000..f87aa8a0f Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img77.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img78.png b/docs/nightly/fix/reconcile-info/dev_guide/img78.png new file mode 100644 index 000000000..64025593e Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img78.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img79.png b/docs/nightly/fix/reconcile-info/dev_guide/img79.png new file mode 100644 index 000000000..0480941ee Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img79.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img8.png b/docs/nightly/fix/reconcile-info/dev_guide/img8.png new file mode 100644 index 000000000..65f9ebe28 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img8.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img80.png b/docs/nightly/fix/reconcile-info/dev_guide/img80.png new file mode 100644 index 000000000..ba9d5b601 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img80.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img81.png b/docs/nightly/fix/reconcile-info/dev_guide/img81.png new file mode 100644 index 000000000..eeee172b2 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img81.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img82.png b/docs/nightly/fix/reconcile-info/dev_guide/img82.png new file mode 100644 index 000000000..8b783d6e8 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img82.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img83.png b/docs/nightly/fix/reconcile-info/dev_guide/img83.png new file mode 100644 index 000000000..1e2d8bdf7 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img83.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img84.png b/docs/nightly/fix/reconcile-info/dev_guide/img84.png new file mode 100644 index 000000000..3ce012609 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img84.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img85.png b/docs/nightly/fix/reconcile-info/dev_guide/img85.png new file mode 100644 index 000000000..8c624cde6 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img85.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img86.png b/docs/nightly/fix/reconcile-info/dev_guide/img86.png new file mode 100644 index 000000000..860e0952d Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img86.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img87.png b/docs/nightly/fix/reconcile-info/dev_guide/img87.png new file mode 100644 index 000000000..82e798848 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img87.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img88.png b/docs/nightly/fix/reconcile-info/dev_guide/img88.png new file mode 100644 index 000000000..f112f9c5f Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img88.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img89.png b/docs/nightly/fix/reconcile-info/dev_guide/img89.png new file mode 100644 index 000000000..677c05f0b Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img89.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img9.png b/docs/nightly/fix/reconcile-info/dev_guide/img9.png new file mode 100644 index 000000000..b5687a190 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img9.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img90.png b/docs/nightly/fix/reconcile-info/dev_guide/img90.png new file mode 100644 index 000000000..882cb3ce5 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img90.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img91.png b/docs/nightly/fix/reconcile-info/dev_guide/img91.png new file mode 100644 index 000000000..9ed9c5bfb Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img91.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img92.png b/docs/nightly/fix/reconcile-info/dev_guide/img92.png new file mode 100644 index 000000000..2c0ff2291 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img92.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img93.png b/docs/nightly/fix/reconcile-info/dev_guide/img93.png new file mode 100644 index 000000000..91ffbe7a3 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img93.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img94.png b/docs/nightly/fix/reconcile-info/dev_guide/img94.png new file mode 100644 index 000000000..deb4057ab Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img94.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img95.png b/docs/nightly/fix/reconcile-info/dev_guide/img95.png new file mode 100644 index 000000000..13d785270 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img95.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img96.png b/docs/nightly/fix/reconcile-info/dev_guide/img96.png new file mode 100644 index 000000000..1ccf86de1 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img96.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img97.png b/docs/nightly/fix/reconcile-info/dev_guide/img97.png new file mode 100644 index 000000000..3c66cdccf Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img97.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img98.png b/docs/nightly/fix/reconcile-info/dev_guide/img98.png new file mode 100644 index 000000000..5576bb58d Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img98.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/img99.png b/docs/nightly/fix/reconcile-info/dev_guide/img99.png new file mode 100644 index 000000000..7ef567c2b Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/img99.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/index.html b/docs/nightly/fix/reconcile-info/dev_guide/index.html new file mode 100644 index 000000000..da4d1c2a6 --- /dev/null +++ b/docs/nightly/fix/reconcile-info/dev_guide/index.html @@ -0,0 +1,535 @@ + + + + + +dev_guide + + + + + + + + + + + + + + + + + + +

+ +

+ +

+

+Earth System Modeling Framework +
Software Developer's Guide +
+

+
+

Silverio Vasquez, Sylvia Murphy, Cecelia DeLuca, Walter Spector, +Gerhard Theurich +
+
+
+
+
+December 3, 2024 + +
+ +

+ +

+


+ + + + + +

+
+esmf_support@ucar.edu +
+ + diff --git a/docs/nightly/fix/reconcile-info/dev_guide/internals.pl b/docs/nightly/fix/reconcile-info/dev_guide/internals.pl new file mode 100644 index 000000000..cb127c222 --- /dev/null +++ b/docs/nightly/fix/reconcile-info/dev_guide/internals.pl @@ -0,0 +1,102 @@ +# LaTeX2HTML 2018 (Released Feb 1, 2018) +# Associate internals original text with physical files. + + +$key = q/core/; +$ref_files{$key} = "$dir".q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/crb/; +$ref_files{$key} = "$dir".q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:harness_smoothGrids/; +$ref_files{$key} = "$dir".q|node7.html|; +$noresave{$key} = "$nosave"; + +$key = q/infomail/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/is:typelist/; +$ref_files{$key} = "$dir".q|node8.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:Apps/; +$ref_files{$key} = "$dir".q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:code_conv/; +$ref_files{$key} = "$dir".q|node8.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:code_conv_cam/; +$ref_files{$key} = "$dir".q|node8.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:code_templates/; +$ref_files{$key} = "$dir".q|node8.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:docguidelines/; +$ref_files{$key} = "$dir".q|node8.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:harness/; +$ref_files{$key} = "$dir".q|node7.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:harness_distributionsspecifier/; +$ref_files{$key} = "$dir".q|node7.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:harness_gridspecifier/; +$ref_files{$key} = "$dir".q|node7.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:harness_problemdescriptorfile/; +$ref_files{$key} = "$dir".q|node7.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:harness_toplevelfile/; +$ref_files{$key} = "$dir".q|node7.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:intro/; +$ref_files{$key} = "$dir".q|node2.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:lib/; +$ref_files{$key} = "$dir".q|node10.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:life_cycle/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:longticket/; +$ref_files{$key} = "$dir".q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:tagging/; +$ref_files{$key} = "$dir".q|node8.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:testing/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:trackertypes/; +$ref_files{$key} = "$dir".q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:usr_support/; +$ref_files{$key} = "$dir".q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/tracking_tools/; +$ref_files{$key} = "$dir".q|node9.html|; +$noresave{$key} = "$nosave"; + +1; + diff --git a/docs/nightly/fix/reconcile-info/dev_guide/labels.pl b/docs/nightly/fix/reconcile-info/dev_guide/labels.pl new file mode 100644 index 000000000..87596e2e7 --- /dev/null +++ b/docs/nightly/fix/reconcile-info/dev_guide/labels.pl @@ -0,0 +1,125 @@ +# LaTeX2HTML 2018 (Released Feb 1, 2018) +# Associate labels original text with physical files. + + +$key = q/core/; +$external_labels{$key} = "$URL/" . q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/crb/; +$external_labels{$key} = "$URL/" . q|node3.html|; +$noresave{$key} = "$nosave"; + +$key = q/fig:harness_smoothGrids/; +$external_labels{$key} = "$URL/" . q|node7.html|; +$noresave{$key} = "$nosave"; + +$key = q/infomail/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/is:typelist/; +$external_labels{$key} = "$URL/" . q|node8.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:Apps/; +$external_labels{$key} = "$URL/" . q|node6.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:code_conv/; +$external_labels{$key} = "$URL/" . q|node8.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:code_conv_cam/; +$external_labels{$key} = "$URL/" . q|node8.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:code_templates/; +$external_labels{$key} = "$URL/" . q|node8.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:docguidelines/; +$external_labels{$key} = "$URL/" . q|node8.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:harness/; +$external_labels{$key} = "$URL/" . q|node7.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:harness_distributionsspecifier/; +$external_labels{$key} = "$URL/" . q|node7.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:harness_gridspecifier/; +$external_labels{$key} = "$URL/" . q|node7.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:harness_problemdescriptorfile/; +$external_labels{$key} = "$URL/" . q|node7.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:harness_toplevelfile/; +$external_labels{$key} = "$URL/" . q|node7.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:intro/; +$external_labels{$key} = "$URL/" . q|node2.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:lib/; +$external_labels{$key} = "$URL/" . q|node10.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:life_cycle/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:longticket/; +$external_labels{$key} = "$URL/" . q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:tagging/; +$external_labels{$key} = "$URL/" . q|node8.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:testing/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:trackertypes/; +$external_labels{$key} = "$URL/" . q|node9.html|; +$noresave{$key} = "$nosave"; + +$key = q/sec:usr_support/; +$external_labels{$key} = "$URL/" . q|node5.html|; +$noresave{$key} = "$nosave"; + +$key = q/tracking_tools/; +$external_labels{$key} = "$URL/" . q|node9.html|; +$noresave{$key} = "$nosave"; + +1; + + +# LaTeX2HTML 2018 (Released Feb 1, 2018) +# labels from external_latex_labels array. + + +$key = q/_/; +$external_latex_labels{$key} = q|<|; +$noresave{$key} = "$nosave"; + +$key = q/core/; +$external_latex_labels{$key} = q|2.1.1|; +$noresave{$key} = "$nosave"; + +$key = q/crb/; +$external_latex_labels{$key} = q|2.3|; +$noresave{$key} = "$nosave"; + +$key = q/sec:intro/; +$external_latex_labels{$key} = q|1|; +$noresave{$key} = "$nosave"; + +1; + diff --git a/docs/nightly/fix/reconcile-info/dev_guide/next.png b/docs/nightly/fix/reconcile-info/dev_guide/next.png new file mode 100644 index 000000000..1628652aa Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/next.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/next_g.png b/docs/nightly/fix/reconcile-info/dev_guide/next_g.png new file mode 100644 index 000000000..3c1c3f569 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/next_g.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/node1.html b/docs/nightly/fix/reconcile-info/dev_guide/node1.html new file mode 100644 index 000000000..6766b21e5 --- /dev/null +++ b/docs/nightly/fix/reconcile-info/dev_guide/node1.html @@ -0,0 +1,475 @@ + + + + + +Contents + + + + + + + + + + + + + + + + + + + + +
+ +

+Contents +

+ + + + +

+ +

+ +

+


+
+esmf_support@ucar.edu +
+ + diff --git a/docs/nightly/fix/reconcile-info/dev_guide/node10.html b/docs/nightly/fix/reconcile-info/dev_guide/node10.html new file mode 100644 index 000000000..a244bc22d --- /dev/null +++ b/docs/nightly/fix/reconcile-info/dev_guide/node10.html @@ -0,0 +1,103 @@ + + + + + +9 Policies + + + + + + + + + + + + + + + + + + + + + +Subsections + + + +
+ +

+9 Policies +

+ +

+ +

+ +
+9.1 External Software Libraries +

+ +

+ESMF developers are encouraged to use as few external +software libraries as possible, to minimize the effort +needed to build and run the ESMF software. The external +utilities and libraries that the ESMF distribution relies +on are listed on the Download tab of the ESMF website. + +

+ +

+9.2 Graphics Packages +

+ +

+ESMF uses the MS Visio package to produce its graphics. +Both Visio files and *.eps files are checked into the +main repository. + +

+ +

+ + +

+


+
+esmf_support@ucar.edu +
+ + diff --git a/docs/nightly/fix/reconcile-info/dev_guide/node11.html b/docs/nightly/fix/reconcile-info/dev_guide/node11.html new file mode 100644 index 000000000..ece450bf2 --- /dev/null +++ b/docs/nightly/fix/reconcile-info/dev_guide/node11.html @@ -0,0 +1,164 @@ + + + + + +Appendix A: Testing Terminology + + + + + + + + + + + + + + + + + + + + + +

+Appendix A: Testing Terminology +

+ +

+Industry-accepted definitions exist for software errors and defects (faults), found in the ANSI/IEEE, +Glossary of Software Engineering Terminology, are +listed in Table A1. +
+

+Table A1 - IEEE Software Engineering Terminology [#!ieee!#] +
+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CategoryDefinition
ErrorThe difference between a computed, observed, or measured value or + condition and the true, specified, or theoretically correct value + or condition.
FaultAn incorrect step, process, or data definition in a computer program.
DebugTo detect, locate, and correct faults in a computer program.
FailureThe inability of a system or component to perform its required functions + within specified performance requirements. It is manifested as a fault.
TestingThe process of analyzing a software item to detect the differences between + existing and required conditions (that is, bugs) and to evaluate the features + of the software items.
Static analysisThe process of evaluating a system or component based on its form, + structure, content, or documentation.
Dynamic analysisThe process of evaluating a system or component based on its behavior + during execution.
Correctness$\bullet$ The degree to which a system or component is free from faults in its + specification, design, and implementation.
+ $\bullet$ The degree to which software, documentation, or other items meet + specified requirements.
+ $\bullet$ The degree to which software, documentation, or other items meet user + needs and expectations, whether specified or not.
Verification$\bullet$ The process of evaluating a system or component to determine whether the + products of a given development phase satisfy the conditions imposed at + the start of that phase.
+ $\bullet$ Formal proof of program correctness.
ValidationThe process of evaluating a system or component during or at the end of + the development process to determine whether it satisfies specified + requirements.
+ +

+ +

+ +

+ +
+esmf_support@ucar.edu +
+ + diff --git a/docs/nightly/fix/reconcile-info/dev_guide/node12.html b/docs/nightly/fix/reconcile-info/dev_guide/node12.html new file mode 100644 index 000000000..58769983a --- /dev/null +++ b/docs/nightly/fix/reconcile-info/dev_guide/node12.html @@ -0,0 +1,56 @@ + + + + + +Bibliography + + + + + + + + + + + + + + + + + + + + + +

+


+
+esmf_support@ucar.edu +
+ + diff --git a/docs/nightly/fix/reconcile-info/dev_guide/node13.html b/docs/nightly/fix/reconcile-info/dev_guide/node13.html new file mode 100644 index 000000000..7133b7eb8 --- /dev/null +++ b/docs/nightly/fix/reconcile-info/dev_guide/node13.html @@ -0,0 +1,69 @@ + + + + + +About this document ... + + + + + + + + + + + + + + + + + + + +

+About this document ... +

+

+This document was generated using the +LaTeX2HTML translator Version 2018 (Released Feb 1, 2018) +

+Copyright © 1993, 1994, 1995, 1996, +Nikos Drakos, +Computer Based Learning Unit, University of Leeds. +
+Copyright © 1997, 1998, 1999, +Ross Moore, +Mathematics Department, Macquarie University, Sydney. +

+The command line arguments were:
+ latex2html -white -toc_depth 5 -split 4 -local_icons -show_section_numbers -address 'esmf_support@ucar.edu' dev_guide.tex +

+The translation was initiated on 2024-12-03 +


+
+esmf_support@ucar.edu +
+ + diff --git a/docs/nightly/fix/reconcile-info/dev_guide/node2.html b/docs/nightly/fix/reconcile-info/dev_guide/node2.html new file mode 100644 index 000000000..01a6bbb2f --- /dev/null +++ b/docs/nightly/fix/reconcile-info/dev_guide/node2.html @@ -0,0 +1,156 @@ + + + + + +1 Introduction + + + + + + + + + + + + + + + + + + + + + +Subsections + + + +
+ +

+ +
+1 Introduction +

+ +

+ +

+1.1 About this Document +

+The Earth System Modeling Framework (ESMF) Software Developer's Guide, +or simply the Guide, is the reference handbook that describes +the practices, standards, and conventions recommended for ESMF core software +development. It is updated as needed. + +

+Suggestions on how to improve the Guide should be sent to +esmf_support@ucar.edu. + +

+ +

+1.2 Supplementary Information +

+An important source of supplementary information is the ESMF website: + +This website is referred to throughout the Guide. +It includes a link to the ESMF CVS repository, the current release +schedule, task lists, and many other types of project information. + +

+The Guide doesn't contain instructions on how to build +ESMF, adapt user codes for ESMF, or use the ESMF interfaces. +For documentation corresponding to the last public release, see +the Users tab on the ESMF website. For documentation of +all releases, including internal releases and previous public releases, +click the Download tab on the website and then View All +Releases. + +

+ +

+1.3 Acknowledgments +

+Sections of this document were derived from the GFDL +Flexible Modeling System Developers' Manual +[#!FMSdevguide!#] and the now-defunct Community Climate System Model Software + Developer's Guide +[#!CCSMdevguide!#]. These have been adapted with the permission of the respective authors. + +

+ +

+ +

+ +

+ +
+esmf_support@ucar.edu +
+ + diff --git a/docs/nightly/fix/reconcile-info/dev_guide/node3.html b/docs/nightly/fix/reconcile-info/dev_guide/node3.html new file mode 100644 index 000000000..9959852be --- /dev/null +++ b/docs/nightly/fix/reconcile-info/dev_guide/node3.html @@ -0,0 +1,307 @@ + + + + + +2 Groups and Roles in ESMF Development + + + + + + + + + + + + + + + + + + + + + +Subsections + + + +
+ +

+2 Groups and Roles in ESMF Development +

+ +

+For more detail on the groups below, including their Terms of +Reference, see the ESMF Project Plan[#!bib:ESMFprojectplan!#]. +This document is available via the Management link on +the ESMF website navigation bar. + +

+ +

+2.1 Core Team +

+ESMF software implementation is led by a distributed Core Team which is based in the +Technology Development Division (TDD) of the National Center for +Atmospheric Research (NCAR). The Core Team relies on close interaction +with customers, and the work of many contributors. Core Team +activities are open to all active ESMF developers. + +

+All Core Team members are responsible for helping to +develop effective project processes and for following +processes that are in place. + +

+ +

+ +
+2.1.1 Core Team Roles +

+Developers are the Core Team members that design, implement, document, and test +ESMF software. They are expected to interact with customers throughout the entire +development process in order to understand customer requirements. Developer priorities are set by the Change Review Board (CRB) but developers are expected to understand customer requirements and +needs and to manage their own time. + +

+The Integrator is the lead tester. He or she is responsible for running regression +tests, managing project computing accounts, preparing for releases, +generating project metrics, and overseeing request and bug tracking. + +

+The Core Team Manager is responsible for overseeing the overall development, and +for coordinating the activities of multiple developers +so that project schedules and priorities are achieved. +Responsibilities include: + +

+ +

    +
  • Project administration and the assignment of tasks +
  • +
  • Acquisition of funding +
  • +
  • Deciding on short-term priorities based on longer-term objectives +
  • +
  • Monitoring conformance to processes and conventions +
  • +
  • Representation of the Core Team to NCAR executive management, the CRB, and sponsors. +
  • +
+ +

+Code Advocates are Core Team members who have been assigned to interface with owners of +a particular code e.g. CCSM, GEOS-5. Advocates are expected to contact the code owners and keep track of what and how they are doing. They should know the following things about their assigned code: + +

+ +

    +
  • contact info +
  • +
  • models or components being ESMF-ized +
  • +
  • what the customer is trying to do +
  • +
  • what platforms they are working on +
  • +
  • what pieces of ESMF they are using +
  • +
  • their current status of ESMF-ization +
  • +
  • what is holding them up if anything +
  • +
  • open tickets (see section [*] for types) and their status +
  • +
+ +

+Code Advocates should do the following for their code: + +

    +
  • Touch base periodically and find out how things are going +
  • +
  • Coordinate the resolution of all tickets (see section [*] for types) +
  • +
  • Be prepared to brief the status of all requests and issues +
  • +
  • Update or ensure the update of related tickets (see Section [*] for details on +the proper handling of tickets). +
  • +
+ +

+Advocates are NOT responsible for: + +

    +
  • Representing the code to the CRB +
  • +
  • Fielding support related phone calls. + +

    +All customers should send support requests to esmf_support@ucar.edu. +They should not call their Advocate or other developers. Dire emergencies are exempt from the no-phone rule. +There are many good reason for doing this, including developer absences, group visibility and communication, +and enabling developers to set priorities. If a customer really feels the need to talk with an +Advocate or developer, they need to arrange for a date and time through the support list. +

  • +
+ +

+Handlers are developers assigned to fix a particular problem reported on one of the trackers (see + [*] for list). They are expected to be sufficiently familiar with the issue and the +code involved so as to not unnecessarily pester the customer with requests for information (e.g. the +information is contained in previous tickets from the same customer). See section [*] for +a complete list of Handlers activities in the support process. + +

+Support Lead is a Core Team member who has been assigned the responsibility for monitoring customer relations and the quality of the customer support process. Specific duties include: + +

    +
  • Ensure IMAP folders are properly named and utilized +
  • +
  • Assist Advocates in understanding the status of support requests related to their codes +
  • +
  • Clear out mail list spam filters and clear all pending moderation requests +
  • +
  • Conduct monthly support request review meetings +
  • +
  • With the assistance of the Advocates, update the Core Team on the status of codes +
  • +
  • Monitor the teams customer relations management (CRM) software and database +
  • +
+ +

+ +

+2.2 Joint Specification Team (JST) +

+The Core Team, along with contributors, customers, technical +managers, and other stakeholders in development, are collectively +referred to as the ESMF Joint Specification Team, or JST. +JST membership is open to members of the science, computing, and +related communities. + +

+ +

+ +
+2.3 Change Review Board (CRB) +

+ESMF development priorities and schedules are set by a +Change Review Board (CRB) that consists of individuals +associated with major ESMF initiatives and applications. +Members of the CRB are chosen by the ESMF Executive Management. + +

+ +

+2.4 Quality Assurance Responsibilities +

+ +

+Collective public reviews and the intelligence and attentiveness of +project staff are the two primary mechanisms for software quality assurance. + +

+Requirements, design, code, and project documents such as plans +are subject to public review. The purpose of the reviews is +to look for models of good documentation, as well as inconsistencies, +errors, inefficiencies, and areas for improvement. Reviews also +increase coordination and awareness within the ESMF project. + +

+The Integrator ensures that support requests +and bugs are reported, tracked, and resolved, and that automated +test and backup scripts are operating correctly. + +

+The Core Team Manager works with team to ensure that documentation +is sufficient, tracks consistency between documentation and source +code before releases, and monitors conformance to coding and +documentation standards. The Core Team Manager is also responsible +for ensuring the quality and accuracy of the ESMF source code +distribution overall, by leading the development, +implementation and documentation of development, test, and release +procedures. + +

+ +

+ +

+ +

+ +
+esmf_support@ucar.edu +
+ + diff --git a/docs/nightly/fix/reconcile-info/dev_guide/node4.html b/docs/nightly/fix/reconcile-info/dev_guide/node4.html new file mode 100644 index 000000000..005a543de --- /dev/null +++ b/docs/nightly/fix/reconcile-info/dev_guide/node4.html @@ -0,0 +1,270 @@ + + + + + +3 Collaboration Environment and Communication + + + + + + + + + + + + + + + + + + + + + +Subsections + + + +
+ +

+3 Collaboration Environment and Communication +

+ +

+ +

+3.1 Mailing Lists +

+ +

+The main ESMF technical mailing list is: +

+ +

+This list handles telecon announcements, technical questions and +comments, discussions and materials relating to design and code +reviews, planning discussions, project announcements, and any other +items that concern the JST. + +

+The list for active ESMF developers is: +

+ +

+This list is for people who are developing code and checking +it into the ESMF repository. Mails here may cover coordination +issues relating to check-ins and releases, technical material that +is not yet ready for the JST, and information specific to NCAR +and particular development platforms. + +

+Support questions should be directed to: +

+ +

+The Users tab on the ESMF website describes +how to submit an effective support request and outlines the ESMF support +policy. + +

+People who are interested in occasional high-level project updates +can join the mailing list: +

+ +

+Subscribers to this list receive more or less quarterly newletters +describing ESMF achievements and events. + +

+To subscribe to any of these lists on-line, see the Users +tab on the ESMF website. + +

+ +

+3.2 Meetings and Telecons +

+ +

+ESMF JST telecons are held as needed, typically on a weekly basis. +Normal telecon times are 1:00pm MT Thursdays, and sometimes Tuesdays. +A calendar of telecon topics is maintained on the home page of +the ESMF website. These telecons are open and are announced to +the esmf_jst@cgd.ucar.edu list. + +

+The Core Team meets weekly, at 9:30am MT on Wednesdays. The +meeting is also set up as a telecon. Core Team meetings are open +to active developers. + +

+The ESMF project has open community meetings on an annual basis, +usually during late spring. + +

+CRB meetings are held quarterly and are closed. However, prior +to each CRB meeting a JST telecon is devoted to collecting comments, +requirements, and priorities from JST members for consideration by +the CRB. + +

+ +

+3.3 GitHub Open Source Development Environment +

+The ESMF project utilizes the GitHub open source development +environment. It provides a variety of tools as well as web-browsable +repositories. + +

+ +

+3.3.1 The Main ESMF Site and Repository +

+ +

+The main ESMF GitHub site is at: +

+ +

+This site is accessible from the ESMF website, +via either the Developers link or the GitHub +logo on the navigation bar. It is used for + +

    +
  • hosting and browsing the ESMF source code Git repository; +
  • +
  • maintaining task lists; +
  • +
  • archiving mailing lists; +
  • +
  • providing tarballs of public source code releases (releases + are also made available on the ESMF website); +
  • +
  • tracking bugs; and +
  • +
  • tracking support requests. +
  • +
+ +

+The source code and tools on this site are maintained by the +ESMF Core Team, and contributions and changes cannot be made to +them without coordination with the Core Team. + +

+The main ESMF Git repository is web-accessible at: +https://github.com/esmf-org/esmf +

+The GitHub site has instructions for checking out code. + +

+All ESMF documents, source code and test and other scripts are stored +in the main repository. + +

+The GitHub repository contains only the ESMF framework. Components +that use ESMF are stored in repositories at their home institutions. + +

+ +

+Contributors in the broader community can use this site +to archive and share code related to ESMF. Coordination is +not required with the ESMF Core Team in order to check into the +contributions repository. + +

+ +

+ +

+ +

+ +
+esmf_support@ucar.edu +
+ + diff --git a/docs/nightly/fix/reconcile-info/dev_guide/node5.html b/docs/nightly/fix/reconcile-info/dev_guide/node5.html new file mode 100644 index 000000000..05a580e57 --- /dev/null +++ b/docs/nightly/fix/reconcile-info/dev_guide/node5.html @@ -0,0 +1,1799 @@ + + + + + +4 Processes + + + + + + + + + + + + + + + + + + + + + +Subsections + + + +
+ +

+ +
+4 Processes +

+ +

+The ESMF development environment has several defining characteristics. +First, both the ESMF Core Team and the JST are distributed. This makes +incorporating simple, efficient communication mechanisms into the +development process essential. Second, the JST and Core Team work on +a range of different platforms, at sites that don't have the time, resources, +or inclination to install demanding packages. Collaboration +tools that require no purchase or installation before use are essential. +Finally, ESMF is committed to open development. As much as possible, +the ESMF team tries to keep the workings of the project - metrics, +support and bug lists, schedules, task lists, source code, you name it - +visible to the broad community. + +

+ +

+4.1 Software Process Model +

+ +

+The ESMF software development cycle is based on the staged +delivery model [#!mcconnell96!#]. The steps in this software development +model are: + +

+ +

    +
  1. Software Concept Collect and itemize the high-level requirements of the system and identify the basic functions that the system must perform. + +

    +

  2. +
  3. Requirements Analysis Write and review a requirements document - a detailed statement of the scientific and computational requirements for the software. + +

    +

  4. +
  5. Architectural Design Define a high-level software architecture that outlines the functions, relationships, and interfaces for major components. Write and review an architecture document. + +

    +

  6. +
  7. Stage 1, 2, ..., n Repeat the following steps creating a potentially releasable product at the end of each stage. Each stage produces a more robust, complete version of the software. + +

    + +

      +
    • Detailed Design Create a detailed design document and API specification. Incorporate the interface specification +into a detailed design document and review the design. + +

      +

    • +
    • Code Construction and Unit Testing Implement the interface, +debug and unit test. + +

      +

    • +
    • System Testing Assemble the complete system, verify that the +code satisfies all requirements. + +

      +

    • +
    • Release Create a potentially releasable product, including User's Guide and User's Reference Manual. Frequently code produced at intermediate stages software will be used internally. +
    • +
    + +

    +

  8. +
  9. Code Distribution and Maintenance Official public release +of the software, beginning of maintenance phase. + +

    +

  10. +
+ +

+We have customized and extended this standard model to suit the ESMF project. +At this stage of ESMF development, we are in the iterative design/implement/release +cycle. Below are a few notes on earlier stages. + +

+ +

+4.2 ESMF Process History +

+ +

+ +

+4.2.1 Software Concept +

+Participants in the ESMF project completed the Software Concept +stage in the process of developing a unified set of proposals. +A summary of the high-level requirements of ESMF - a statement of project +scope and vision - is included in the General Requirements +part of the ESMF Requirements Document[#!bib:ESMFreqdoc!#]. +This was a successful effort in defining the scope of the project +and agreeing to an overall design strategy. + +

+ +

+4.2.2 Requirements Analysis +

+The ESMF Team spent about six months at the start of the project +producing the ESMF Requirements Document. +This outlined the major ESMF capabilities necessary to meet project milestones +and achieve project goals. The second part of the document was a detailed +requirements specification for each functionality class included in +the framework. This document also included a discussion of the +process that was used to initially collect requirements. +The Requirements Document was a useful reference for the development +team, especially for new developers coming in from outside of the +Earth science domain. However, as the framework matured, support +requests and the Change Review Board process took precedence in defining +development tasks and setting priorities. The Requirements +Document is bundled with the ESMF source distribution through version 2; +with version 3 it was removed. + +

+ +

+4.2.3 Architectural Design +

+The project had difficulty with the Architecture Document. +The comments received back on the completed work, informally and +from a peer review body, indicated that the presentation of the document +was ineffective at conveying how the ESMF worked. Although the +document was full of detailed and complex diagrams, the terminology and +diagrams were oriented to software engineers and were not especially +scientist-friendly. The detailed diagrams also made the document difficult +to maintain. This experience helped to guide the ESMF project +towards more user-oriented documents, but it also left a gap in the +documentation that has taken time to fill. + +

+ +

+4.3 Ongoing Development +

+ +

+The following are processes the ESMF team is actively following. These +guidelines apply to core team developers and outside contributors +who will be checking code into the main ESMF repository. + +

+All design and code reviews are telecons held with the JST. +Telecons are scheduled with the Core Team Manager, put on the ESMF +calendar on the home page of the ESMF website, and announced on the +esmf_jst@ucar.edu list. + +

+ +

+4.3.1 Telecon Etiquette +

+ +

+When you call in, it's nice to give your name at the first opportunity. +Telecon hosts will make an effort to introduce people on the JST calls, +especially first-timers. Please don't put the telecon on hold (we sometimes +get telecon-stopping music or beeps this way). + +

+Within a week or so after the telecon, the host (the developer if it's a design +or code review) is expected to send out a summary to esmf_jst@ucar.edu +with the date of the call, the participants, and notes or conclusions. + +

+ +

+4.3.2 Design Reviews +

+ +

+ +

    +
  1. Introductory telecon(s). The point here is to scope out the problem +at hand. These calls cover the following, as they apply. + +
      +
    • Understand the capability needed and review requirements. +
    • +
    • Discuss design alternatives. +
    • +
    • Survey and discuss any existing packages that cover the new functionality. +
    • +
    • Discuss potential use test cases. +
    • +
    • Figure out which customers will be involved in use test case development and identify customers that are likely to provide important input +(sometimes we offer a friendly reminder service to these folks before relevant +telecons). +
    • +
    + +

    +For these introductory discussions, any form of material is fine - diagrams, +slides, plain text ramblings, lists of questions, ... + +

    +

  2. +
  3. Initial design review(s). The document presented should be in the format +of the ESMF Reference Manual, either in plain text or in latex/ProTeX. +This is so the document can be incorporated into project documentation +after implementation. The initial review document should include at least +the following sections: + +
      +
    • Class description. +
    • +
    • Use and Examples. Here the examples begin with the very simplest +cases. +
    • +
    • API sufficient to cover the examples. This is because it can be difficult +to follow the examples (e.g. tell what arguments and options are) without the +basic API entries accompanying them. +
    • +
    + +

    +This step is iterated until developers and customers converge. + +

    +

  4. +
  5. Full telecon review(s). The developer should prepare the API specification +using latex and ProTex following the conventions in the Reference Manual. +Most of the Reference Manual section(s) for the new or modified class(es), +including Class Options and Restrictions and Future Work, should be available +at the time of this review. Diagrams should be ready here too. + +

    +

  6. +
  7. Use test case telecon review. For each major piece of functionality, a use +test case is prepared in collaboration with customers and executed before +release. The use test case is performed on a realistic number of processors +and with realistic input data sets. + +

    +It doesn't have to work (and probably won't) before it's reviewed, but it +needs to work before the functionality appears in a release. The developer +checks it into the top-level use_test_case directory on SourceForge and +prepares a HTML page outlining it for the Test & Validation page on the +ESMF website. Unlike unit and system tests, use test cases aren't +distributed with the ESMF source. +

  8. +
+ +

+ +

+4.3.3 Implementation and Test Before Internal Release +

+ +

+Code should be written in accordance with the interface specifications +agreed to during design reviews and the coding conventions described in +Section [*]. + +

+There is an internal release checklist on the Test & Validation page of the +ESMF website that contains an exhaustive listing of develop and tester +responsibilities for releases. For additional discussion +of test and validation procedures, see Section [*]. + +

+The developer is responsible for working with the tester(s) to make sure +that the following are present before an internal release: + +

    +
  • 100% unit and system test coverage of new interfaces, with the exception +of interfaces where type/kind/rank is heavily overloaded. All arguments tested +at least once. +
  • +
  • Use test cases work +
  • +
+ +

+ +

+4.3.4 Implementation and Test Before Public Release +

+ +

+There is a public release checklist on the Test & Validation page of the ESMF +website that contains an exhaustive listing of develop and tester +responsibilities for releases. For additional discussion +of test and validation procedures, see Section [*]. + +

+Same as for internal release, plus: + +

    +
  • Design and Implementation Notes section for Reference Manual complete. +
  • +
  • Developer and tester ensure that test coverage for new interfaces is sufficient, implementing any additional tests to make it so. This includes testing of options and tests for error handling and recovery. +
  • +
+ +

+ +

+4.3.5 Code Check-In +

+ +

+Developers are encouraged to check their changes into the repository +as they complete them, as frequently as possible without breaking the +existing code base. + +

+ +

    +
  1. Both core and contributors should test on at least three compilers before commit. +
  2. +
  3. For core team developers, a mail should go out to esmf_core@ucar.edu +before check-in for very large commits and for commits that will break the +HEAD. For contributors a mail should go out to esmf_core@ucar.edu before +ANY commit. +
  4. +
  5. No code commits should be made between 0.00 and 4:00 Mountain Time. During +this time the regression tests scripts are checking out code and any commits +will lead to inconsistent test results which are hard to interpret. +
  6. +
  7. Core team developers can be set up to receive email from GitHub +for every check-in by subscribing to esmf_commits@ucar.edu. +
  8. +
+ +

+To accomplish the first item on the list after a commit of source code, an email can be sent +to esmftest@cgd,ucar.edu with the exact subject "Run_ESMF_Test_Build". The mailbox is checked +every quarter hour on the quarter hour. This email initiates a test on pluto that +builds and installs ESMF with four compilers: g95, gfortran, lahey, and nag, with +ESMF_BOPT set to "g" and "O". + +

+When the test is started an email with the subject "ESMF_Test_Builds_Pluto_started", +is sent to esmf_core@ucar.edu, with a time stamp in the body of the message. +If a test is already running, an email, with the subject "ESMF_Test_Builds_Pluto_not_started", +is sent with "Test not started, a test is already running." in the body. +The test that is running will run to completion, a new test will NOT be queued up. A new +"Run_ESMF_Test_Build" email must be sent when the running test is completed. + +

+ +

+4.3.6 Code Reviews +

+ +
    +
  1. All significant chunks of externally contributed code are reviewed +by the JST. It's usual to do the code review after check-in. The code review should +be scheduled with the Core Team Manager when the code is checked in, and +the code review held before the next release. +
  2. +
  3. We also do code reviews with core team members, as desired/required +by the JST. +
  4. +
+ +

+ +

+4.3.7 Releases +

+ +

+The ESMF produces internal releases and public releases based +on the schedule generated by the CRB. Every public release +is preceded by an internal release three months prior, for the +purpose of beta testing. During those three months, bugs may be +fixed and documentation improved, but no new functionality may be +added. Occasionally the Core Team releases an internal release +that does not become a public release. This would happen, for +example, when major changes are being made to ESMF and user +input is needed for multiple preliminary versions of the software. + +

+The Integrator tags new system versions with coherent changes prior +to release. The tagging convention for public and internal releases is +described in Section [*]. + +

+Prior to release all ESMF software is regression-tested on all platforms +and interfaces. The Integrator is responsible for regression testing, +identifying problems and notifying the appropriate developers, and +collecting and sending out Release Notes and Known Bugs. + +

+ESMF releases are announced +on the esmf_jst@ucar.edu mailing list and are posted on the ESMF +website. Source code is available for download from the ESMF +website and from the main ESMF GitHub page. + +

+ +

+4.3.8 Backups +

+ +

+The backup strategy for each entity of the ESMF project is as follows: + +

+ +

    +
  • ESMF CVS source +
    +Run rsync daily on the ESMF cvs repository and roll a tarball. +On Sundays roll a tarball with a date stamp and move it to the Pluto archive directory. + +

    +

  • +
  • ESMF GIT source +
    +Run rsync daily on the ESMF git repository and roll a tarball. +On Sundays roll a tarball with a date stamp and move it to the Pluto archive directory. + +

    +

  • +
  • ESMFCONTRIB CVS source +
    +Run rsync daily on the ESMFCONTRIB cvs repository and roll a tarball. +On Sundays roll a tarball with a date stamp and move it to the Pluto archive directory. + +

    +

  • +
  • ESMF website +
    +On Sundays make a tarball with a date stamp of the ESMF website and move it to the Pluto archive directory. +
  • +
+ +

+To conserve memory only the backup files for the current year and the prior year are retained. For years beyond the prior year, only 6 month backup files are retained i.e. for 2010 to 2012 of the ESMF cvs files are: + +

+20100103.esmf-cvsroot.tar.gz +
+20100606.esmf-cvsroot.tar.gz +
+20110102.esmf-cvsroot.tar.gz +
+20110605.esmf-cvsroot.tar.gz +
+20120101.esmf-cvsroot.tar.gz +
+All of 1012 and 1013 +
+ +

+Once a year in January, the backup files of the year before the prior year will be cleaned up. For example, In January 2014 all of backup files of 2012 and 2013 would be archived, so the 2012 backup files will be cleaned up and only 6 month backup files will be retained. + +

+ +

+ +

+ +

+ +
+4.4 Testing and Validation +

+ +

+ESMF software is subject to the following tests: + +

    +
  1. Unit tests, which are simple per-class tests. +
  2. +
  3. Testing Harness, parameter space spanning tests similar to the unit tests +
  4. +
  5. System tests, which generally involve inter-component interactions. +
  6. +
  7. Use test cases (UTCs), which are tests at realistic problem +sizes (e.g., large data sets, processor counts, grids). +
  8. +
  9. Examples that range from simple to complex. +
  10. +
  11. Beta testing through preliminary releases. +
  12. +
+Unit tests, system tests, and examples are distributed with the +ESMF software. UTCs, because of their size, are +stored and distributed separately. Tests are run nightly, +following a weekly schedule, on a wide variety of platforms. +Beta testing of ESMF software is done by providing an Internal Release +to customers three months before public release. + +

+The ESMF team keeps track of test coverage on a per-method basis. +This information is on the Metrics page under the Development +link on the navigation bar. + +

+Testing information is stored on a Test and Validation web page, +under the Development link on the ESMF +web site. This web page includes: + +

    +
  • separate web pages for each system test and UTC; +
  • +
  • links to the Developer's Guide, GitHub Tracker, Requirements +Spreadsheet, and any other pertinent information; and +
  • +
  • separate web page for automated regression test information and results. +
  • +
+ +

+The ESMF is designed to run on several target platforms, in different +configurations, and is required to interoperate with many combinations +of application software. Thus our test strategy includes the following. + +

+ +

    +
  • Tests are executed on as many target platforms as possible. +
  • +
  • Tests are executed on a variety of programming paradigms +(e.g pure shared memory, pure distributed memory and a mix of both). +
  • +
  • Tests are executed in multiple configurations (e.g. uni-processor, +multi-processor). +
  • +
  • The result of each test is a PASS/FAIL. +
  • +
  • In some cases, for floating point comparisons, an epsilon value +will be used. +
  • +
  • Tests are implemented for each language interface that is +supported. +
  • +
+ +

+ +

+4.4.1 Unit Tests +

+ +

+Each class in the framework is associated with a suite of unit tests. +Typically the unit tests are stored in one file per class, and are +located near the corresponding source code in a test directory. The +framework make system will have an option to build and run unit tests. +The user has the option of building either a "sanity check" type test +or an exhaustive suite. The exhaustive tests include tests of many +functionalities and a variety of valid and invalid input values. The sanity +check tests are a minimum set of tests to indicate whether, for example, the +software has been installed correctly. It is the responsibility of the +software developer to write and execute the unit tests. Unit tests +are distributed with the framework software. + +

+To achieve adequate unit testing, developers shall attempt to meet the following goals. + +

+ +

    +
  • Individual procedures will be evaluated with at least one unit +test function. However, as many test functions as necessary will be +implemented to assure that each procedure works properly. +
  • +
  • Developers should unit test their code to the degree possible +before it is checked into the repository. It is assumed that +developers will use stubs as necessary. +
  • +
  • Variables are tested for acceptable range and precision. +
  • +
  • Variables are tested for a range of valid values, including boundary +values. +
  • +
  • Unit tests should verify that error handling works correctly. +
  • +
+ +

+ +

+4.4.1.1 Writing Unit Tests +

+ +

+Unit tests usually test a single argument of a method to make it easier to +identify the bug when a unit test fails. +There are several steps to writing a unit test. +First, each unit test must be labeled with one of the following tags: + +

    +
  • NEX_UTest - This tag signifies a non-exhaustive test. These tests are always run and +are considered to be sanity tests they usually consist of creating and destroying a specific class. +
  • +
  • EX_UTest - This tag signifies an exhaustive unit test. These tests are more rigorous and +are run when the ESMF_EXHAUSTIVE environmental variable is set to ON. These unit test must be between the #ifdef ESMF_EXHAUSTIVE +and #endif definitions in the unit test file. +
  • +
  • NEX_UTest_Multi_Proc_Only - These are non-exhaustive multi-processor unit tests that will not be +run when the run_unit_tests_uni or unit_test_uni targets are specified. +
  • +
  • EX_UTest_Multi_Proc_Only - These are exhaustive multi-proccesor unit tests that will not be +run when the run_unit_tests_uni or unit_tests_uni targets are specified. +
  • +
+Note that when the NEX_UTest_Multi_Proc_Only or EX_UTest_Multi_Proc_Only tags are used, all the unit tests in +the file must be labeled as such. You may not mix these tags with the other tags. In addition, verify that the makefile +does not allow the unit tests with these tags to be run uni. + +

+Second, a string is specified describing the test, for example: +

+	write(name, *) "Grid Destroy Test"
+
+Third, a string to be printed when the test fails is specified, for example: +
+	write(failMsg, *) "Did not return ESMF_SUCCESS"
+
+Fourth, the ESMF_Test subroutine is called to determine the test results, for example: +
+	call ESMF_Test((rc.eq.ESMF_SUCCESS), name, failMsg, result, ESMF_SRCLINE)
+
+The following two tests are good examples of how unit tests should be written. +The first test verify that getting the attribute count from a Field returns ESMF_SUCCESS, while +the second verifies the attribute count is correct. These two tests could be combined into one +with a logical AND statement when calling ESMF_Test, but breaking the tests up allows you +to identify the source of the bug immediately. +
+      !------------------------------------------------------------------------
+      !EX_UTest
+      ! Getting Attrubute count from a Field
+      call ESMF_FieldGetAttributeCount(f1, count, rc=rc)
+      write(failMsg, *) "Did not return ESMF_SUCCESS"
+      write(name, *) "Getting Attribute count from a Field "
+      call ESMF_Test((rc.eq.ESMF_SUCCESS), name, failMsg, result, ESMF_SRCLINE)
+
+      !------------------------------------------------------------------------
+      !EX_UTest
+      ! Verify Attribute Count Test
+      write(failMsg, *) "Incorrect count"
+      write(name, *) "Verify Attribute count from a Field "
+      call ESMF_Test((count.eq.0), name, failMsg, result, ESMF_SRCLINE)
+
+      !------------------------------------------------------------------------
+
+ +

+Sometimes a unit test is written expecting a subset of the processors to fail the test. To +handle this case, the unit test must verify results from each processor as in the unit test below: +

+    !------------------------------------------------------------------------
+    !EX_UTest
+    ! Verify that the rc is correct on all pets.
+    write(failMsg, *) "Did not return FAILURE  on PET 1, SUCCESS otherwise"
+    write(name, *) "Verify rc of a Gridded Component Test"
+    if (localPet==1) then
+      call ESMF_Test((rc.eq.ESMF_FAILURE), name, failMsg, result, ESMF_SRCLINE)
+    else
+      call ESMF_Test((rc.eq.ESMF_SUCCESS), name, failMsg, result, ESMF_SRCLINE)
+    endif
+
+    !------------------------------------------------------------------------
+
+ +

+Some tests may require that a loop be written to verify multiple results. The following is +an example of how a single tag, NEX_UTest, is used instead of a tag for each loop iteration. + +

+

+ !-----------------------------------------------------------------------------
+  !NEX_UTest
+  write(name, *) "Verifying data in Array via Fortran array pointer access"
+  write(failMsg, *) "Incorrect data detected"
+  looptest = .true.
+  do i = -12, -6
+    j = i + 12 + lbound(fptr, 1)
+    print *, fptr(j), fdata(i)
+    if (fptr(j) /= fdata(i)) looptest = .false.
+  enddo
+  call ESMF_Test(looptest, name, failMsg, result, ESMF_SRCLINE)
+  !-----------------------------------------------------------------------------
+
+ +

+ +

+4.4.1.2 Analyzing unit test results +

+When unit test are run, a Perl script prints out the test results as shown in +Section "Running ESMF Unit Tests" in the ESMF User's Guide. To print out the test results, +the Perl script must determine the number of unit tests in each test file and the number of +processors executing the unit test. It determines the number of tests by counting the +EX_UTest, NEX_UTest, EX_UTest_Multi_Proc_Only, or NEX_UTest_Multi_Proc_Only +tags in the test source file whichever is appropriate for the test being run. +To determine the number of processors, it counts the number of "NUMBER_OF_PROCESSORS" strings in the +unit test output Log file. The script then counts the number of PASS and FAIL strings in the +test Log file. +The Perl script first divides the number of PASS strings by the number of processors. If the +quotient is not a whole number then the script concludes that the test crashed. If the quotient +is a whole number, the script then divides the number of FAIL strings by the number of processors. +The sum of the two quotients must equal the total number of tests, if not the test is marked +as crashed. + +

+ +

+4.4.1.3 Disabling unit tests +

+Sometimes in the software development process it becomes necessary to disable one or more unit tests. +To disable a unit test, two lines need to be modified. First, the line calling "ESMF_Test" must be commented out. +Second, the NEX_UTest, EX_UTest, NEX_UTest_Multi_Proc_Only and EX_UTest_Multi_Proc_Only tags must be modified +so that they are not found by the Perl script that analyzes the test results. +The recommended way to modify these tags is to replace the first underscore with "_disable_", thus NEX_UTest becomes +NEX_disable_UTest. + +

+ +

+4.4.1.4 Benchmarking Unit Tests +

+Benchmark testing is included in the ESMF regression tests to detect any unexpected +change in the performance of the software. This capability is available to developers. +Developers can run the unit tests and save their execution +times to be used as a benchmark for future unit test runs. + +

+The following section now appears in the output of "make info". + +

+

+ 
+--------------------------------------------------------------
+ * ESMF Benchmark directory and parameters *
+ESMF_BENCHMARK_PREFIX:    ./DEFAULTBENCHMARKDIR
+ESMF_BENCHMARK_TOLERANCE: 3%
+ESMF_BENCHMARK_THRESHOLD_MSEC: 500
+ 
+--------------------------------------------------------------
+
+ +

+The steps for using the benchmarking test tool are as follows: + +

+ +

    +
  • After building the unit tests, execute "make run_unit_tests" and +verify that all tests pass. It not recommended that failing tests be benchmarked. +
  • +
  • Set "BENCHMARKINSTALL = YES" and execute "make run_unit_tests_benchmark". +This will cause the unit tests stdout files to be copied to the "DEFAULTBENCHMARKDIR" +directory. The elapsed times of these unit tests are the now the benchmark. +The default of DEFAULTBENCHMARKDIR is $ESMF_DIR/DEFAULTBENCHMARKDIR. +It is advised that the benchmarking directory be outside the ESMF structure, to allow +the developer to benchmark different versions of the software. The benchmark directory +can be changed by setting ESMF_BENCHMARK_PREFIX. +
  • +
  • Run the unit test a second time. +
  • +
  • To compare the elapsed times of this unit test run to the benchmared run, set +"BENCHMARKINSTALL = NO", and execute "make run_unit_tests_benchmark". +
  • +
+ +

+According to the default settings above, the benchmarking test will only analyze unit tests that run +500 msecs (ESMF_BENCHMARK_THRESHOLD_MSEC) +or longer. If a unit test runs 3 percent (ESMF_BENCHMARK_TOLERANCE) or more beyond the benchmarked +unit test, it will be flagged as failing the benchmark test. The developer may change these parameters +as desired. The following is an example of the output of running "make run_unit_tests_benchmark": + +

+ +

 
+
+
+
+The following unit tests with a threshold of 500 msecs. passed the 3% 
+ tolerance benchmark test:
+
+PASS: src/Infrastructure/DELayout/tests/ESMF_DELayoutWorkQueueUTest.F90
+PASS: src/Infrastructure/Field/tests/ESMF_FieldCreateGetUTest.F90
+PASS: src/Infrastructure/Field/tests/ESMF_FieldRegridCsrvUTest.F90
+PASS: src/Infrastructure/Field/tests/ESMF_FieldRegridXGUTest.F90
+PASS: src/Infrastructure/Field/tests/ESMF_FieldStressUTest.F90
+PASS: src/Infrastructure/TimeMgr/tests/ESMF_CalRangeUTest.F90
+PASS: src/Infrastructure/VM/tests/ESMF_VMBarrierUTest.F90
+PASS: src/Infrastructure/VM/tests/ESMF_VMUTest.F90
+PASS: src/Infrastructure/XGrid/tests/ESMF_XGridMaskingUTest.F90
+PASS: src/Infrastructure/XGrid/tests/ESMF_XGridUTest.F90
+PASS: src/Superstructure/Component/tests/ESMF_CompTunnelUTest.F90
+
+
+The following unit tests with a threshold of 500 msecs. failed the 3% 
+ tolerance benchmark test:
+
+FAIL: src/Infrastructure/Field/tests/ESMF_FieldRegridUTest.F90
+      Test elapsed time: 4331.446 msec.
+      Benchmark elapsed time: 2958.47675 msec.
+      Increase: 46.41%
+
+FAIL: src/Infrastructure/FieldBundle/tests/ESMF_FieldBundleRegridUTest.F90
+      Test elapsed time: 2051.05675 msec.
+      Benchmark elapsed time: 1920.42125 msec.
+      Increase: 6.8%
+
+FAIL: src/Infrastructure/LogErr/tests/ESMF_LogErrUTest.F90
+      Test elapsed time: 2986.40425 msec.
+      Benchmark elapsed time: 2583.36775 msec.
+      Increase: 15.6%
+
+
+
+Found 167 exhaustive multi-processor unit tests files, of those with a 
+ threshold of 500 msecs. 11 passed the 3% tolerance benchmark test, and 3 failed.
+
+Benchmark install date: Thu Jun  4 13:26:55 MDT 2015
+
+ +

+Note that only the unit tests that have an elapsed time of 500 msecs. or greater are listed. In addition, the date when +the benchmark install was completed is displayed. + +

+When a unit test run it benchmarked it is written to a directory such as + "BENCHMARKDIR/test/testg/Darwin.gfortran.64.mpich2.default/". +Therefore you can only compare unit tests elapsed between the identical configurations. + +

+To implement the benchmarking tool, the unit tests were modified to record the elapsed time of each PET. +The stdout file of each unit test has the following lines i.e. + +

+

+ESMF_GridItemUTest.stdout: PET 0 Test Elapsed Time 5.7840000000000007 msec.
+ESMF_GridItemUTest.stdout: PET 1 Test Elapsed Time 5.7259999999999982 msec.
+ESMF_GridItemUTest.stdout: PET 2 Test Elapsed Time 6.6200000000000010 msec.
+ESMF_GridItemUTest.stdout: PET 3 Test Elapsed Time 5.7190000000000021 msec.
+
+ +

+The benchmarking tool uses the average of the four elapsed times to determine the test results +since the elapsed times of each PET can vary. + +

+ +

+4.4.2 Examples +

+The examples are written to help users understand a specific use of an +ESMF capability. The examples appear as text in the ESMF Reference Manual, therefore +care must be taken to insure that correct portions of the examples appear in the +document. Latex tags have been created to designate which portions of the +examples are visible in the document. + +

+BOE and EOE are used between text describing the example. BOC and EOC are used between +actual working code that appears in the Reference Manual. Below is an example of how +the tags are used: + +

+

+!-------------------------------- Example -----------------------------
+!>%>%>%>%>%>%>%>%>%>%>%>%>%>%>%>%>%>%>%>%>%>%>%>%>%>%>%>%>%>%>%>%>%>%>%
+!BOE
+!\subsubsection{Get Grid and Array and other information from a Field}
+!\label{sec:field:usage:field_get_default}
+!
+!  A user can get the internal {\tt ESMF\_Grid} and {\tt ESMF\_Array}
+!  from a {\tt ESMF\_Field}.  Note that the user should not issue any destroy command
+!  on the retrieved grid or array object since they are referenced
+!  from within the {\tt ESMF\_Field}. The retrieved objects should be used
+!  in a read-only fashion to query additional information not directly
+!  available through the {\tt ESMF\_FieldGet()} interface.
+!
+!EOE
+
+!BOC
+    call ESMF_FieldGet(field, grid=grid, array=array, &
+        typekind=typekind, dimCount=dimCount, staggerloc=staggerloc, &
+        gridToFieldMap=gridToFieldMap, &
+        ungriddedLBound=ungriddedLBound, ungriddedUBound=ungriddedUBound, &
+        totalLWidth=totalLWidth, totalUWidth=totalUWidth, &
+        name=name, &
+        rc=rc)
+!EOC
+    if(rc .ne. ESMF_SUCCESS) finalrc = ESMF_FAILURE
+    print *, "Field Get Grid and Array example returned"
+
+    call ESMF_FieldDestroy(field, rc=rc)
+    if(rc .ne. ESMF_SUCCESS) finalrc = ESMF_FAILURE
+!>%>%>%>%>%>%>%>%>%>%>%>%>%>%>%>%>%>%>%>%>%>%>%>%>%>%>%>%>%>%>%>%>%>%>%
+
+ +

+Note that any code or text that is not contained within the tag pairs does not appear in the +Reference Manual. + +

+Most examples can be run on multiple processors or a single processor. Those examples should +have the tag, "ESMF_EXAMPLE" as a comment in the body of the example file. If the example +can only run on multiple processors then use the tag, "ESMF_MULTI_PROC_EXAMPLE". + +

+ +

+4.4.2.1 Disabling examples +

+When an example is removed from the makefile, the "ESMF_EXAMPLE" or +"ESMF_MULTI_PROC_EXAMPLE" +tags must be modified so that the example is not flagged as failed. +The recommended way to modify these tags is to replace the first underscore with "_disable_", +thus "ESMF_EXAMPLE" becomes +"ESMF_disable_EXAMPLE". + +

+ +

+4.4.3 System Tests +

+ +

+System tests are written to test functionality that spans several +classes. The following areas should be addressed in system testing. + +

+ +

    +
  • Design omissions (e.g. incomplete or incorrect behaviors). +
  • +
  • Associations between objects (e.g. fields, grids, bundles). +
  • +
  • Control and infrastructure. (e.g. couplers, time management, error handling). +
  • +
  • Feature interactions or side effects when multiple features are used +simultaneously. +
  • +
+ +

+The system tester should issue a test log after each software release is tested, +which is recorded on the Test and Validation web page. The test +log shall +include: a test ID number, a software release ID number, testing environment +descriptions, a list of test cases executed, results, and any unexpected +events. + +

+ +

+4.4.3.1 Writing System Tests +

+ +

+System tests should contain the following sections: + +

    +
  • Create - Create Components, Couplers, Clock, Grids, States etc. +
  • +
  • Register - Register Components and the initialize, run and finalize subroutines. +
  • +
  • Initialize - Initialize as needed. +
  • +
  • Run - Run the test. +
  • +
  • Finalize - Verify results. +
  • +
  • Destroy - Destory all classes. +
  • +
+ +

+Most system tests can be run on multiple processors or a single processor. Those system tests should +have the tag, "ESMF_SYSTEM_TEST" as a comment in the body of the system test. If the system test +can only run on multiple processors then use the tag, "ESMF_MULTI_PROC_SYSTEM_TEST". + +

+At the end of the system it is recommended that the ESMF_TestGlobal subroutine be used to gather +test results from all processors and print out a single PASS/FAIL message instead +of individual PASS/FAIL messages from all the processors. +After the test is written it must be documented on the ESMF Test & Validation +web page: + +

+

+http://www.earthsystemmodeling.org/developers/test/system/
+
+ +

+ +

+4.4.3.2 Disabling system tests +

+When a system test is removed from the makefile, the "ESMF_SYSTEM_TEST" or +"ESMF_MULTI_PROC_SYSTEM_TEST" +tags must be modified so that the system test is not counted as failed. +The recommended way to modify these tags is to replace the first underscore with "_disable_", thus +ESMF_SYSTEM_TEST becomes +ESMF_disable_SYSTEM_TEST. + +

+ +

+4.4.4 Test Harness +

+The Test Harness is a highly configurable test control system for conducting +thorough testing of the Regridding and Redistribution processes. The Test Harness +consists of a single shared executable and a collection of customizable resource +files that define an ensemble of test configurations tailored to each ESMF class. +The Test Harness is integrated into the Unit test framework, enabling +the Test Harness to be built and run as part of the Unit tests. The test results +are reported to a single standard-out file which is located with the unit test +results. + +

+See section [*] for a complete discussion of the test harness. + +

+ +

+4.4.4.1 Analyzing Test Harness results +

+When the Test Harness completes a run, the results from the ensemble of tests are +reported in two ways. The first is analogous to the unit test reporting, since the +test harness is run as part of the unit tests, a summary of the results are recorded +just as with the unit tests. In addition to the standard unit test reporting, the +test harness is also able to produce a human readable report. The report consists +of a concise summary of the test configuration along with the test results. The test +configuration is described in terms of the Field Taxonomy syntax and user provided +strings. The intent is not to provide a exhaustive description of the test, but +rather to provide a useful description of the failed tests. + +

+Consider another example similar to the previous one, where two descriptor strings +describing an ensemble regridding tests. The first uses the patch method and the +second uses bilinear interpolation. + +

+

+
+[ B1 G1; B2 G2 ] =P=> [ B1 G1; B2 G2 ] 
+[ B1 G1; B2 G2 ] =B=> [ B1 G1; B2 G2 ]
+
+
+
+ +

+Suppose the associated specifier files indicate that the source grid is rectilinear +and is 100 X 50 in size. The destination grid is also rectilinear and is 80 X 20 +in size. +Both grids are block distributed in two +ways, 1 X NPETS and NPETS X 1. And suppose that the first dimension of both the +source and destination grids are periodic. If the test succeeds for the bilinear +regridding, but fails for one of the patch regridding configurations, the reported results +could look something like + +

+

+SUCCESS: [B1 G1; B2 G2 ] =B=> [B1 G1; B2 G2 ] 
+FAILURE: [B1{1} G1{100}+P; B2{npets} G2{50} ] =P=> [B1{1} G1{80}+P; B2{npets} G2{20} ] 
+     failure at line 101 of test.F90
+SUCCESS: [ B1{npets} G1{100} +P; B2{1} G2{50} ] =P=> [ B1{npets} G1{80}+P; B2{1} G2{20} ]
+
+ +

+The report indicates that all the test configurations for the bilinear regridding +are successful. This is indicated by the key word SUCCESS which is followed by the +successful problem descriptor string. Since all of the tests in the first case pass, +there is no need to include any of the specifier information. For the second +ensemble of tests, one configuration passed, while the other failed. In this case, +since there is a mixture of successes and failures, the report includes +specifier information for all configurations to help indicate the source of the +test failure. The supplemental information, while not a complete problem description +since it lacks items such as the physical coordinates of the grid and the nature of +the test field, includes information crucial to isolating the failed test. + +

+ +

+4.4.5 Use Test Cases (UTCs) +

+ +

+Use Test Cases are problems of realistic size created to test the ESMF +software. They were initiated when the ESMF team and its users saw that +often ESMF capabilities could pass simple system tests but would fail +out in the field, for real customer problems. UTCs have realistic +processor counts, data set sizes, and grid and data array sizes. UTCs are +listed on the Test & Validation page of the ESMF website. They +are not distributed with the ESMF software; instead they are stored in +a separate module in the main repository called use_test_cases. + +

+ +

+4.4.6 Beta Testing +

+ +

+ESMF software is released in a beta form, as an Internal Release, +three months before it is publicly released. This gives users +a chance to test the software and report back any problems to +support. + +

+ +

+4.4.7 Automated Regression Tests +

+ +

+The purpose of regression testing is to reveal faults caused by new +or modified software (e.g. side effects, incompatibility between +releases, and bad bug fixes). +Regression tests regularly exercise all interfaces of the code on +all target platforms. +The regression test results for the last two weeks can be found +here. +This web page provides a complete color-coded current view of the state of the trunk ESMF software, sorting options by platform or compiler are provided. +A similiar test results web page for the branch is also available. +Clicking on any of the cells will display the specific test report for that day. +Hovering over the test name i.e., Blues gfortran, will reveal notes particular to that platform/compiler. Clicking on the test name, will take you to the home page of the platform. + +

+The platforms that run the regression tests, email the test results to a server that updates the test results web page. A script checks for test reports every 15 minutes, and updates the web page. The time of the last update appears on the web page. + +

+ +

+4.4.8 Investigating Test Failures +

+The regression test results web +page +provides a color-coded view of the state of the software. +When a developer finds that a test fails on a particular platform with a particular compiler, sometimes the bug is readily identified and fixed. +However other times the developer may want to know if the test fails on other platforms and if the failure is related to a compiler, mpi configuration or optimized/debug execution. +The developer would need to click to all the cells of different platforms searching for the test results for that particular test. + +

+A tool was created to allow the developers to query the test results for a specific test for a specific date, as long as it is within two weeks of the current date. +The developer may send a query test results message to the following email address: esmftest@cgd.ucar.edu +The subject of the email must be exactly "Test_Results_Query". The body of the email message must be "Test:" followed by the test name and "Date" followed by the desired date. The format must be a three letter month and a number. If the date is 2 digits, greater than 9, then insert one space between the month and date e.g. Apr 25. If the day is a single digit insert two spaces, between the month and day e.g. Apr 4. + +

+

+Test:ESMF_FieldBundleSMMUTest.F90
+Date:Feb  8
+   or
+Date Feb 28
+
+ +

+This mail box is checked every quarter hour on the quarter hour, the results are emailed to:esmf_test@cgd.ucar.edu. +The subject of the results email for this example would be: +

+        ESMF_FieldBundleSMMUTest.F90 test results for Feb  8
+
+ +

+The body of the email would be as follows: + +

+

+	ESMF_Blues_PGI:PASS: mvapich2/g: src/Infrastructure/FieldBundle/tests/ESMF_FieldBundleSMMUTest.F90
+	ESMF_Blues_PGI:PASS: mvapich2/O: src/Infrastructure/FieldBundle/tests/ESMF_FieldBundleSMMUTest.F90
+	ESMF_Blues_PGI:CRASHED: mpich3/g: src/Infrastructure/FieldBundle/tests/ESMF_FieldBundleSMMUTest.F90
+	ESMF_Blues_PGI:PASS: mpich3/O: src/Infrastructure/FieldBundle/tests/ESMF_FieldBundleSMMUTest.F90
+	ESMF_Blues_PGI:PASS: openmpi/g: src/Infrastructure/FieldBundle/tests/ESMF_FieldBundleSMMUTest.F90
+	ESMF_Blues_PGI:PASS: openmpi/O: src/Infrastructure/FieldBundle/tests/ESMF_FieldBundleSMMUTest.F90
+	ESMF_Discover_g95:PASS: mvapich2/g: src/Infrastructure/FieldBundle/tests/ESMF_FieldBundleSMMUTest.F90
+	ESMF_Discover_g95:PASS: mvapich2/O: src/Infrastructure/FieldBundle/tests/ESMF_FieldBundleSMMUTest.F90
+	ESMF_Haumea_g95:PASS: mpich2/g: src/Infrastructure/FieldBundle/tests/ESMF_FieldBundleSMMUTest.F90
+	ESMF_Haumea_g95:PASS: mpich2/O: src/Infrastructure/FieldBundle/tests/ESMF_FieldBundleSMMUTest.F90
+	ESMF_Haumea_g95:PASS: mvapich2/g: src/Infrastructure/FieldBundle/tests/ESMF_FieldBundleSMMUTest.F90
+	ESMF_Haumea_g95:PASS: mvapich2/O: src/Infrastructure/FieldBundle/tests/ESMF_FieldBundleSMMUTest.F90
+	ESMF_Pluto_g95:FAIL: mpich2/g: src/Infrastructure/FieldBundle/tests/ESMF_FieldBundleSMMUTest.F90
+	ESMF_Pluto_g95:FAIL: mpich2/O: src/Infrastructure/FieldBundle/tests/ESMF_FieldBundleSMMUTest.F90
+	ESMF_Pluto_g95:FAIL: mvapich2/g: src/Infrastructure/FieldBundle/tests/ESMF_FieldBundleSMMUTest.F90
+	ESMF_Pluto_g95:FAIL: mvapich2/O: src/Infrastructure/FieldBundle/tests/ESMF_FieldBundleSMMUTest.F90
+
+ +

+Note that if the date of the query is the current day, the developer should query periodically during the day since +the test results are being updated as platforms report their test results. +If a test crashes it can be because another test hung and the test in question did not run. + +

+Another instance where this tool is useful is when a developer adds a new test, after the nightly tests run, the developer can run a query to quickly see the test results. + +

+ +

+4.4.9 Building the Documentation +

+ +

+As software development progresses, the documentation is updated, built and posted at +http://earthsystemmodeling.org/docs/nightly/develop/dev_guide/ +

+The documents are built daily in the early morning, the results of the builds are posted at +http://earthsystemmodeling.org/doc/ +

+These documents can be updated by the developers, by checking out the documents from the repository and submitting the edited files. To have the new version of the documents posted on the web, the developer must sent a request to the following email address: esmftest@cgd.ucar.edu. The subject of the email indicates which document to build and post. +The following is the list of subjects that have been implemented: + +

+ +

    +
  • Build_Dev_Guide_Doc +
  • +
  • Build_NUOPC_Doc +
  • +
  • Build_Ref_Doc +
  • +
  • Build_ESMPy_Doc +
  • +
  • Build_CICE_NUOPC_CAP_Doc +
  • +
  • Build_HYCOM_NUOPC_CAP_Doc +
  • +
  • Build_LIS_NUOPC_CAP_Doc +
  • +
  • Build_MOM_NUOPC_CAP_Doc +
  • +
  • Build_WRFHYRO_NUOPC_CAP_Doc +
  • +
+ +

+ +

+4.4.10 Testing for Releases +

+ +

+We provide two types of tar files, the ESMF source and the shared +libraries of the supported platforms. Consequently, there are two test +procedures followed before placing the tar files on the ESMF download website. + +

+The Source Code Test Procedure is followed on all the supported +platforms for the particular release. + +

+ +

    +
  1. Verify that the source code builds in both BOPT=g and BOPT=O. +
  2. +
  3. Verify that the ESMF_COUPLED_FLOW demonstration executes successfully. +
  4. +
  5. Verify that the unit tests run successfully, and that there are no NON-EXHAUSTIVE unit tests failures. +
  6. +
  7. Verify that all system tests run successfully. +
  8. +
+ +

+The Shared Libraries Test Procedure is also followed on all supported +platforms for a release. + +

+ +

    +
  1. Change to the CoupledFlowEx directory and execute make. Verify that the demo runs successfully. +
  2. +
  3. Change to the CoupledFlowSrc directory and execute make then make run. Verify that the demo runs successfully. +
  4. +
  5. Change to the examples directory and execute make and make run. Verify that the example runs successfully. +
  6. +
+ +

+ +

+ +

+ +
+4.5 User Support +

+ +

+ +

+4.5.1 Roles +

+The Advocate is the staff person assigned to a particular code e.g. GEOS-5. See section 2.1.1 for a full definition and list of responsibilities. +The Handler is the staff person assigned to solve a support ticket. The Advocate and the Handler may be the same person or they may be different. See section 2.1.1 for complete definition and list of responsibilities. + +

+ +

+4.5.2 Support Categories +

+New is a request that has not been replied to. +Closed is a request that has been fixed to the user's satisfaction. +Pending is a request that has been fixed to the Handler's satisfaction but has not yet been approved by the user. + +

+ +

+4.5.3 Summary Work Flow +

+ +
    +
  1. Message received. +
  2. +
  3. The Integrator or in his absence the Support Lead, generates a GitHub issue. +
  4. +
  5. If the request contains more than one topic, then Integrator will open multiple tickets, one per topic. This can been done initially if obvious, or later if more research indicates it is necessary. + +
      +
    • The top line of the entry should be WHO: <Requester Name>. +
    • +
    • Indicate the institution and model if known. +
    • +
    • Keep title of initial email and the title of the SF ticket the +same or close enough to be able to determine they are one and the same. +
    • +
    • Assign the ticket to the staff person best able to solve the ticket's issue. + +
    • +
    + +

    +

  6. +
  7. Initial contact is made by: + +

    + +

      +
    • The Handler assigned by the Integrator in the ticket. +
    • +
    • The Support Lead if the Handler will be unavailable for more than a week. +
    • +
    + +

    +

  8. +
  9. The Handler works to solve the tickets issues. He or she will communicate +periodically with the ticket's originator and will keep the rest of the Core team +informed on the tickets progress at the monthly ticket review meetings. Once the +issue has been solved, the ticket will be marked pending by the Handler. + +

    +

  10. +
  11. At this point, the Handler contacts the originator to gauge their satisfaction with +the solution. If the originator is satisfied, the ticket may be closed, and the mail +folder on the IMAP server moved from Open to Closed by the Support Lead. If the customer +does not respond, an attempt at contact will be made once a month for two months. +If after this period, the originator still does not reply, a pending ticket may be closed +with final notification to the originator. +
  12. +
+ +

+ +

+4.5.4 General Guidelines for Handling Tickets +

+ +
    +
  • Include title and ticket number on all correspondence. +
  • +
  • Make initial contact within 48 hours even if just to say message received. +
  • +
  • The email address for ticket originators can be found in either freeCRM or the mail archive. Do not hesitate to contact the Support Lead if a required email address can not be found. +
  • +
  • Copy esmf_support@ucar.edu on all replies. +
  • +
  • Bugs that are fixed should be marked Closed, and Fixed. They should never be deleted. +
  • +
  • Bugs that are duplicates should be marked Deleted, and Duplicate. +
  • +
  • If the main issue in a Bug, Feature Request, or Support Request has not been implemented it should stay Open. +
  • +
  • Users are always notified via email when their ticket is being closed even if they have been unresponsive. +
  • +
  • If the solution to a ticket involves a test code, this should be incorporated into the code body as standard test. It should not be sent to the user as an unofficial code fragment. +
  • +
  • If the solution to a ticket involved changes to the code, the user should be given a stable beta snapshot. The user should not be directed to the HEAD, which is inherently unstable. +
  • +
  • If a ticket involves an older version of the code and a computing environment that the current distribution runs on, the ticket should be considered for closure when there is no means of testing or fixing the older code. +
  • +
  • The Handler is responsible for changing the status of tickets assigned to them. +
  • +
+ +

+ +

+4.5.5 esmf_support@ucar.edu Mail Archives +

+The Support Lead manages the archive of esmf_support@ucar.edu email traffic and is responsible for the creation of ticket folders, component folders, and the proper placement of mail messages. The archive is located on the main CISL IMAP server and can be accessed by any Core member. Contact the Support Lead if you wish your local mail client enabled to view the archive. The IMAP archive will have the following appearance: + +
    +
  • Component Name + +
      +
    • Open + +
        +
      • Numbered Ticket Folder +
      • +
      • Numbered Ticket Folder +
      • +
      • Numbered Ticket Folder + +
      • +
      +
    • +
    • Closed + +
        +
      • Numbered Ticket Folder +
      • +
      • Numbered Ticket Folder +
      • +
      • Numbered Ticket Folder + +
      • +
      +
    • +
    +
  • +
  • Component Name +
  • +
+ +

+The following rules apply to the above: + +

+ +

    +
  • Email messages will be filed by component and number. +
  • +
  • A folder labeled with the request number will be created. +
  • +
  • This folder will then be placed in the components Open folder until closed. +
  • +
  • The Support Lead will copy each related email message to its numbered folder. +
  • +
  • When a ticket has been closed, the Support Lead will move the numbered folder from the components Open folder to its Closed folder. +
  • +
  • There will be only one New folder to which highly active tickets may be placed +for easier filing at the discretion of the Support Lead. +
  • +
+ +

+ +

+ +
+4.5.6 INFO:Code (subject) mail messages +

+ +

+Advocates need to share the information they have received from their codes with the rest +of the Core team. This will be done by sending an email to esmf_support@ucar.edu with a +subject line labeled INFO: Code e.g. INFO: CCSM, INFO: GEOS-5. These messages will be +filed on the IMAP server (see above section) under the code referenced. All information +about a code that is general and not related to a specific support request will be archived +in this manner. + +

+ +

+4.5.7 freeCRM +

+A client relationship management tool (freeCRM http://www.freecrm.com) is being used +to archive codes, their affiliated contacts, degree of componentization, issues, and +applicable funding information if known. The following is a list of roles and +responsibilities associated with this software: + +
    +
  • Advocates are responsible for the accuracy and completeness of all information +associated with codes to which they are assigned. This information includes a pull +down menu that specifies the state of the code's ESMF'ization. This piece of +information is critical and needs to be updated whenever an Advocate updates his or +her codes. Other information includes type of code, parent agency etc. This +information will be reviewed on a semi-annual basis. +
  • +
  • The Integrator is responsible for creating a back up of all freeCRM data on a +monthly basis. +
  • +
  • The Core Team Manager is responsible for the accuracy and completeness of all +funding related information. +
  • +
  • The Support Lead is responsible for creating code 'companies' and informing +the Integrator of any additions so that the back up scripts can be modified. He or +she is additionally responsible for conducting semi-annual quality control checks of +all information in the system. +
  • +
  • All team members are responsible for updating and adding to the list of +contacts. +
  • +
+ +

+ +

+4.5.8 Annual Code Contact +

+Once a year all codes in the freeCRM data base will be contacted in order to gauge +their development progress, and to update our component metrics. This process will +contain the following steps: + +
    +
  • Advocates will login into freeCRM and get a list of all their codes. +This list will be emailed to esmf_core@cgd.ucar.edu. +
  • +
  • Advocates will review their list and determine which codes on the list need to be +contacted. Contact is not needed if sufficient knowledge is already known about a +code. +
  • +
  • Advocates will review all the information contained in freeCRM concerning their +assigned codes AND review all the esmf_support traffic for the last year. +
  • +
  • Advocates will draft the contact email and send it to esmf_core@cgd.ucar.edu to be +reviewed by the Core Team Manager. Once corrected, the Advocates may send their email. Since +this is a group level effort, the email message may be signed “The ESMF Team” if +desired. +
  • +
  • The Support Lead will track the draft and completed emails as well as the +responses and will provide a report to the Core Team Manager at the end of the +process. +
  • +
  • As responses come in, the Advocates are responsible for updating the +information in freeCRM. +
  • +
  • The Support Lead will tally the results and update the components page on the +ESMF Web site and will also update the components metric chart. +
  • +
+ +

+ +

+4.5.9 Dealing with Applications that use ESMF +

+More and more applications are being distributed with embedded ESMF interfaces. It may +difficult to determine if a reported problem with one of these applications is related +to an incorrect ESMF implementation, a true ESMF bug, or an issue within the parent model. +The following are several definitions: + +
    +
  • End User: A person who downloads or otherwise receives an application that contains +ESMF code. While they may be trying to modify this application, they were not the person +or persons who originally inserted ESMF into the application. Most likely, they will be +entirely unfamiliar with ESMF. +
  • +
  • Application Developer: The person or persons who took a model, inserted ESMF code, +and made the resulting application available to others. +
  • +
+The following are some guidelines for dealing with such Applications that use ESMF: + +
    +
  • For support requests related to applications that include ESMF, our primary contact +for resolving the request should be the developers of the distributed application and not +the End User. As such, every effort should be made to identify and contact the developers +of the distributed application in order to make them aware of the reported issue and to get +them actively engaged in resolution of the problem. Additionally, they should be cc'ed on +all correspondence with the End User. +
  • +
  • During the resolution of the issue, it will be necessary to cc all email traffic to the +End User. In dealings with the End User emphasize that the ESMF group is committed to any user +of ESMF regardless of source. That commitment is predicated, however, on participation of the +application developers. +
  • +
  • The Handler should establish which version of ESMF the application is using. +
  • +
  • The Handler should try and determine whether the ESMF code in question was modified in any +way by the Application Developers. +
  • +
  • The Handler should try and determine whether the code in question has ESMF interface names +but is not ESMF code. The time manager in WRF falls into this category. It has ESMF interfaces +but was not developed by us. +
  • +
  • It will be solely the Core Team's discretion whether or not to support older versions of ESMF, +ESMF code that has been modified by others, or code that uses ESMF interface names but was developed +entirely separate from ESMF. +
  • +
  • In no way should the Handler try running the End User's code. +
  • +
  • In the event that the developers of the distributed application are +unknown, unreachable, or uncooperative, the End User must be politely informed that the group +can not troubleshoot code belonging to another group. This will have to been handled with a +degree of sensitivity because it is likely that the end user has already tried to contact the +application developers without success. +
  • +
+ +

+ +

+ +

+ +
+esmf_support@ucar.edu +
+ + diff --git a/docs/nightly/fix/reconcile-info/dev_guide/node6.html b/docs/nightly/fix/reconcile-info/dev_guide/node6.html new file mode 100644 index 000000000..d2e61aa24 --- /dev/null +++ b/docs/nightly/fix/reconcile-info/dev_guide/node6.html @@ -0,0 +1,78 @@ + + + + + +5 Apps + + + + + + + + + + + + + + + + + + + + + +

+ +
+5 Apps +

+ +

+The ESMF source distribution contains a few executables that are built on top +of the ESMF library during installation. These executables are referred to as +apps. Apps are command line tools intended to be used by the end user of +ESMF. ESMF follows the GNU conventions for command line tools. There are +currently three mandatory command line options that every distributed app must +implement: + +

+

+--help      Print a help message, documenting all of the available command line arguments and their usage.
+--version   Print the version of ESMF in long format and the copyright message.
+-V          Print just the version string of ESMF.
+
+ +

+


+
+esmf_support@ucar.edu +
+ + diff --git a/docs/nightly/fix/reconcile-info/dev_guide/node7.html b/docs/nightly/fix/reconcile-info/dev_guide/node7.html new file mode 100644 index 000000000..cf39a173f --- /dev/null +++ b/docs/nightly/fix/reconcile-info/dev_guide/node7.html @@ -0,0 +1,1888 @@ + + + + + +6 Test Harness + + + + + + + + + + + + + + + + + + + + + +Subsections + + + +
+ +

+ +
+6 Test Harness +

+ +

+The Test Harness is a flexible test control system intended to provide a thorough +parameter space exploration of remapping and redistribution of distributed arrays and fields. +The parameter space is defined through configuration files which are interpreted at +run time to perform the desired tests. + +

+The Test Harness is integrated into the Unit test framework, enabling +the Test Harness to be built and run as part of the Unit tests. The test results +are reported to a single standard-out file which is located with the unit test +results. + +

+The motivation for employing such a hierarchy configuration files is to allow a +high degree of customization of the test configurations by combining individual +specification files. Complex combinations of test cases are easily specified in high level terms. +Each class will have its own collection of specification files tailored to the needs of that class. + +

+ +

+6.1 Specifying Test Harness Tests +

+The test harness code consists of a single executable that uses a customizable configuration +files which are located within the <classdir>/tests/harness_config directory of each +supported class; currently only ESMF_ARRAY and ESMF_FIELD. + +

+There are three ways to invoke the test harness, as an integral part of running unit +tests; as a stand-alone test invoked through gmake; and as a standalone test invoked through the command line. + +

+Running the harness along with the unit tests provides +frequent regression testing of the redistribution and regridding features. + +

+Running the test harness +in stand alone mode using gmake is useful for isolating faults in failed test cases. + +

+Running the test harness from the command line provides the most control over Test Harness execution. +Understanding the underlying program allows the developer full access to test harness features. +This is useful in developing makefiles, scripts, and configuration files. + +

+ +

+6.2 Running Test Harness Tests as Part of Unit Tests +

+When running as an integral part of the unit tests, the makefile contained in the +<classdir>/tests directory of each supported class is executed through the run_unit_tests target. +As part of this target, the makefile selects the desired test harness target using a class +specific environment variable (e.g. ESMF_TESTHARNESS_FIELD). A default case is provided in +case the environment variable variable is not set. + +

+The environment variables currently defined are: + +

    +
  • ESMF_TESTHARNESS_ARRAY - set target for Array class tests +
  • +
  • ESMF_TESTHARNESS_FIELD - set target for Field class tests +
  • +
+ +

+The targets currently supported for the ESMF_TESTHARNESS_ARRAY variable are: + +

    +
  • RUN_ESMF_TestHarnessArray_default - Used to verify functionality of the test harness +
  • +
  • RUN_ESMF_TestHarnessArray_1 - Basic test of 2D and 3D redistribution +
  • +
  • RUN_ESMF_TestHarnessArray_2 - Quick test of 2D and 3D redistribution +
  • +
  • RUN_ESMF_TestHarnessArrayUNI_default - Used to verify functionality of the test harness in uni-PET mode +
  • +
  • RUN_ESMF_TestHarnessArrayUNI_1 - Basic test of 2D and 3D redistribution in uni-PET mode +
  • +
  • RUN_ESMF_TestHarnessArrayUNI_2 - Quick test of 2D and 3D redistribution in uni-PET mode +
  • +
+ +

+The targets currently supported for the ESMF_TESTHARNESS_FIELD variable are: + +

    +
  • RUN_ESMF_TestHarnessField_default - Used to verify functionality of the test harness +
  • +
  • RUN_ESMF_TestHarnessField_1 - Basic test of 2D and 3D regrid +
  • +
  • RUN_ESMF_TestHarnessFieldUNI_default - Used to verify functionality of the test harness in uni-PET mode +
  • +
  • RUN_ESMF_TestHarnessFieldUNI_1 - Basic test of 2D and 3D regrid in uni-PET mode +
  • +
+ +

+Each target selects the desired sequence of test cases for that target. +For example, a series of test cases could be developed to run on different days providing partial +test coverage on a particular day, but complete coverage over a week. +In this case, each day would have a separate target and the environment variable would be set for +that day's test case. + +

+An example of a test harness appears below. +

+RUN_ESMF_TestHarnessField_1:
+	\$(MAKE) TESTHARNESSCASE=field_1 NP=4 run_test_harness
+
+ +

+In this example, the test harness target is RUN_ESMF_TestHarnessField_1. This target will execute a +single test harness test case. Additional lines can be added if additional steps are desired. +The next section will describe the details of invoking a test case. + +

+ +

+6.3 Invoking a Single Test Harness Test Case Using gmake +

+A single test harness test case can be invoked from the <classdir>/tests +directory through the make command with the local parameters TESTHARNESSCASE and +NP with the run_test_harness target. + +

+For example, +

+gmake TESTHARNESSCASE=field_1 NP=4 run_test_harness
+
+will run the test harness test case, field_1 on 4 processors. + +

+Each test case is defeined by a series of configuration files in the +<classdir>/tests/harness_config directory. +All of the configuration files for a particular test case will be prefixed with +<casename>_ where <classname> is a unique name for the test. +The top level configuration file will have a suffix of _test.rc. +Thus, the top level configuration file for the field_1 test case will be +field_1_test.rc. + +

+The next section describes invoking the Test Harness from the Command Line. + +

+ +

+6.4 Invoking a Single Test Harness Test Case from the Command Line +

+The Test Harness is built by invoking gmake from the $ESMF_DIR/src/test_harness/src directory or +by building all the unit tests. This creates the exececutable file ESMF_TestHarnessUTest in +the currently selected test directory. + +

+To run the executable, enter: +

+\<run path\>ESMF\_TestHarnessUTest \<cmd args\>
+where,
+\<run path\> is the path to the executable,
+and \<cmd args\> are the optional command arguments
+
+The cmd args are as follows:
+-path \<config path\>
+-case \<case filename\>
+-xml \<xml filename\>
+-norun
+
+ +

+The path argument sets the path to the configuration files. All of the configuration files +for a testcase must reside in the same directory. If this argument is not present, the current working directory +will be used as the path. + +

+The case argument is the name of the top level configuration file. This is described in a later +section of this document. If this argument is not present, test_harness.rc will be used. + +

+The xml argument instructs the test harness to generate an XML test case summary file +in the current working directory. + +

+The norun argument instructs the test harness not to run the test cases. The configuration files will be parsed +and if selected, an XML file will be generated. The XML file can be post-processed to generate human +readable test configuration summary reports. + +

+If running under mpi, you would need to prefix this command with the proper mpirun command. + +

+The next section describes the format of the top level resource file. + +

+ +

+ +
+6.5 Top Level Configuration File +

+As mentioned above, the top level configuration file will be located in the +<classdir>/tests/harness_config directory and named <casename>_test.rc. + +

+The top level configuration file specifies the test class, the +format for reporting the test results, and the location and file names containing +the problem descriptor files. + +

+Originally, the test harness had a single configuration file for each class and +supported only two test cases, a non-exhaustive case and an exhaustive case. +This turned out to be too restrictive and test cases are now selected through environment variables. +Unfortunately, some of the old constructs remain until the obsolete feature is removed. + +

+Currently, the test harness only uses the non-exhaustive test case for each configuration file. +So, referencing the example below, only the nonexhaustive tag is actually used by the test harness. + +

+Also note, that comments are preceded by the # sign, that single parameter values follow +a single colon : punctuation mark, while tables of multiple parameter values follow, +and are terminated by, a double set of colon :: punctuation marks. +This file is read by the ESMF_Config class methods, therefore must adhere +to their specific syntax requirements. +The entries can be in any order, but the name tags must be exact - including CAPITALIZATION. +While it is not strictly necessary, the file names are enclosed in quotation marks, +either single or double, to guarantee they are read correctly. +

+# Field test Harness Config file
+
+# test class
+test_class: FIELD 
+
+# report a summary of the test configurations before actually conducting tests
+setup_report: TRUE
+
+# test result report - options are:
+# test_report: FULL  - full report presenting both success and failure configs
+# test_report: FAILURE - report only failure configurations
+# test_report: SUCCESS - report only successful configurations
+# test_report: NONE - no report
+test_report: FAILURE
+
+# descriptor file for the nonexhaustive case
+nonexhaustive::
+   'nonexhaustive_descriptor.rc'
+::   # end of list
+
+# descriptor files for the exhaustive case (obsolete, but keep in for awhile)
+exhaustive::
+   'exhaustive_descriptor.rc'
+:: # end of list
+
+ +

+The argument for the tag test_class: specifies the ESMF class to be tested. +Here it is Field.The tag setup_report: specifies if a setup report is sent to the test report. +The tag test_report: specifies the style of report to be constructed. +This report is appended to the standard-out file which is located with the Unit test results. +The tag nonexhaustive:: delimits a table which contains the file names of +problem descriptor files pertaining to the current test configuration. + +

+The tag exhaustive is obsolete and will be removed when time permits. It has been replaced with the Test Harness +environment variables which can select the desired test case from the available portfolio. + +

+ +

+ +
+6.5.1 Problem descriptor file +

+ +

+The problem descriptor files contain descriptor strings that describe the family +of problems with the same memory topology, distribution, and grid association. +The files also contain the names of specifier files which complete the descriptions +contained within the descriptor strings. This structure allows a high level of customization of the test suite. + +

+The problem descriptor file contains only one table, again conforming to the ESMF_Config class standard. +The contents of the table must be delimited by the tag problem_descriptor_string::. +The first element on the line, enclosed by quotes, is the problem descriptor string itself. +Since the descriptor strings contain gaps and special characters, it is necessary +to enclose the strings in quotation marks to guarantee proper parsing. +The problem descriptor table may contain any number of descriptor strings, +up to the limit imposed by the ESMF_Config class, each on a new line. +Lines can be continued by use of an ampersand & as a continuation symbol +at the beginning of any continued line. +The syntax of the problem descriptor string follows the field taxonomy syntax. +The following is a basic redistribution example. +

+# Basic redistribution example
+#####################################
+problem_descriptor_string::
+'[B1G1;B2G2] --> [B1G1;B2G2]'  -d Dist.rc -g Grid.rc 
+'[B1G1;B2G2] --> [B1G2;B2G1]'  -d DistGrid.rc 
+ & otherDistGrid.rc yetanotherDistGrid.rc
+ &  -g Grid.rc anotherGrid.rc  
+::   # end of list
+
+In the above example, the two problem descriptor strings specify that a redistribution test +is to be conducted, indicated by the syntax ->, between a pair of rank two blocks of memory. +Following the problem descriptor string, are multiple flags and the names of specifier files. +Each flag indicates a portion of the configuration space which is defined by the contents +of the indicated specifier files. +
+ + + + + + + + + + +
argument definition
-dDELayout/DistGrid specification
-gGrid specification
+
+The filenames following a flag are used to specify the values for the parameter associated with that flag. +The specified values from each file are combined to define that parameter's span of values. +All the files associated with all the flags are combined to define the full ensemble of tests. +The first problem descriptor string in the example indicates that the ensemble of distribution +configurations to be tested are specified by the configurations contained within the file Dist.rc. +Similarly, the range of grid configurations are specified within the single file Grid.rc. +For the second problem descriptor string, the ensemble of distribution configurations +to be tested are specified by the union of configurations contained within the +three files DistGrid.rc, otherDistGrid.rc, and yetanotherDistGrid.rc. +While in the first case, the range of grid configurations is specified by the single +file Grid.rc, the second case adds the configurations found in anotherGrid.rc to the ensemble. + +

+ +

+6.5.2 Problem descriptor string syntax +

+The problem descriptor string is contained in the problem descriptor file and describes a +class of tests to be conducted. +The basic syntax describes a contiguous chunk of memory spanned by some sort of logically +rectangular indexing, where the left most index varies fastest in memory. +Each semicolon delineated entry is associated with a native array dimension. +The index locations are replaced by signifiers that express associations and distributions +of the memory through the use of short descriptors. + +

+For example +$[ G1 \; ; G2 ]$ indicates that a 2D logically rectangular block of memory +is associated with a 2D grid in its natural order. +The signifier $G$ represents an undistributed tensor grid. +Reversing the grid signifiers $[ G2; G1 ]$ indicates that the fastest varying dimension +is instead associated with the second grid dimension. +Specific information about the grid, such as its size, type, topology are left to be defined +by the specifier files. It is the associations between memory and the grid that are stressed with this syntax. + +

+To distribute the grid, a distribution signifier is needed. +The block distribution of each memory dimension is indicated by the signifier $B$. +Therefore +$[B1 \; G1; \; B2 \; G2; \; G3]$ signifies that a 3D logically rectangular block of memory, +which has a 3D associated grid, is distributed in its first two dimensions, and not its third. + +

+ +

+6.5.2.1 Grid syntax +

+As we have already seen, the symbol $G$ in the problem descriptor string indicates +that a dimension of a tensor grid is associated with a memory location. +Alternatively, an unstructured grid is indicated with the symbol $U$. + +

+As an example, consider a block of memory. To associate a tensor grid with specific dimensions of that block, +the symbol $G$ is used with a numerical suffix to indicate a specific dimension of the grid. +The specific aspects of this grid are left undefined at this point, only the fact +that a particular dimension of a grid is associated with a particular dimension +of the memory block is implied by the grid syntax. + +

+The complete syntax for a tensor grid specification is +$G i_g \; + H \{ \char93  : \char93  \}$ where + +

    +
  • where $i_g$ is the index of the grid axis, +
  • +
  • +$H \{ \char93  : \char93  \}$, is the optional signifier indicating the upper and lower sizes of the halo, where the $\char93 $ symbols represent integer values. The option of a separate upper and lower values allow the indication of asymmetric haloes. +
  • +
+The symbol to indicate a halo is appended to the grid description through use of a $+$ sign. Its absence indicates that there is no halo. Currently, only symmetric haloes are supported. + +

+To illustrate the use of this syntax consider the following example. +

+
+ [ G1 ; G2 + H{1:1} ]
+
+
+
+This string indicates that each memory location of a 2D block of memory is associated with a grid dimension. +The first memory location with the first grid dimension, and the second memory location +with the second grid dimension. In addition the second memory index has an asymmetric halo +of size one at the low end, and size 1 at the high end. + +

+At times a memory location might have no grid association. +The symbol $\ast$ is used in this case as a place holder. For example, +

+
+ [ G2 ; G1 ; * ]
+
+
+
+indicates that only the first two memory locations are associated with grid dimensions. +The symbol $\ast$ located in the last memory location is a placeholder that indicates +that location in memory has no associations. +We will see later that the $\ast$ can be used to indicate that a memory location +has both no grid and no distribution association. + +

+In this example, the grid association has been reversed from from its natural order. +The first memory location is associated with the second grid dimension, +and the second memory location with the first grid dimension. + +

+ +

+6.5.2.2 Distribution syntax +

+The distribution syntax describes how a contiguous chunk of memory is distributed among the DEs. +The syntax is analogous to the grid description syntax.Three styles of memory distribution are supported; +
+
simple block
+
$B \; i_D$; where $i_D$ is the distribution space axis. + +
+
full block-cyclic
+
$C \; i_D$; where $i_D$ is the distribution space axis. + +
+
arbitrary
+
$A$ +
+
+Assuming a two dimensional distribution, the expression +$[ B1 \; G1; \; B2 \; G2 ]$ indicates +that the two dimensional logically rectangular block of memory is; + +
    +
  • associated with a two dimensional grid, in its natural order. +
  • +
  • the first memory dimension is distributed according to the first distribution axis. +
  • +
  • the second memory dimension is distributed according to the second distribution axis. +
  • +
+The order of the distribution signifiers can be reversed just as with the grid association. + +

+As was mentioned before, the symbol $\ast$ is used as a place holder to indicate a lack of association. +If the third memory location of an undistributed block of memory has no grid association, it would look like this; +

+
+[ G1; G2; * ]
+
+
+
+Alternatively if the first two dimensions of a block of memory are distributed, +but all three have associated grid dimensions it would take the form; +
+
+[ B1 G1; B2 G2; * G3 ]
+
+
+
+An example of where the third memory location would have a grid association, but no distribution, +is the case where the domain has been decomposed along the horizontal, but not the vertical. +This is common for a 3D field such as the ocean or atmosphere. + +

+Lastly, if the last memory location has no associations, it would look like; +

+
+[ B1 G1; B2 G2; * * ]
+
+
+
+The purpose of the $\ast$ symbols is increase readability by acting as a place holder. +An illustrative example of this memory configuration is a two dimensional spatial field +with multiple species or tracers represented by the third dimension. + +

+ +

+6.5.2.3 Transformation method +

+The action of redistribution and remapping are signified by the symbols $-- \!\!\! >$ and $=\chi=>$ +respectively, where $\chi$ refers to a character key representing a specific interpolation method. +The currently supported interpolation methods are $B$ for first order bilinear and $P$ +for the patch recovery method, which provides a smoother first order surface, which can meaningly differentiated. +Future implementations will include $C$, for first order conservative, $S$ for second order bilinear, +and $N$ for nearest neighbor. The character $X$ is reserved for unknown or user provided methods. + +

+

+ + + + + + + + + + + + + + + + + + + + + + + + + +
$\chi$Action
Bfirst order bilinear interpolation
Ppatch recovery interpolation
  
Cfirst order conservative interpolation
Ssecond order conservative interpolation
Nnearest neighbor distance weighted average interpolation
Xunknown or user provided interpolation
+
+ +

+The problem descriptor string +

+
+      [B1 G1; B2 G2 ] --> [B1 G1; B2 G2 ]
+
+
+
+indicates an ensemble of redistribution problems where a 2D distributed source field, associated with a 2D grid, is redistributed into a new 2D destination distribution. + +

+Alternatively the example +

+
+      [ B1 G1; B2 G2 ] =C=>  [ B1 G1; B2 G2 ]
+
+
+
+indicates the interpolation of one distributed 2D gridded field to another 2D grid using a first order conservative method. The interpolation method of first order conservative is indicated by placing a character $C$ in between a pair of equal $=$ signs. + +

+ +

+6.5.2.4 Staggering syntax (Not currently implemented) +

+In addition to the default grid description, the stagger of the associated grid +can be indicated by appending a key with an @ sign to the end of the block memory syntax. Since the stagger relates to the whole grid and not individual components of the grid, it is natural for it to be located outside of the block memory syntax $[ \cdots ]$. +
+
+      [ B1 G1; B2 G2 ] @{#,#}
+
+
+
+The key consists of values enclosed by a pair of brackets $\{ \cdots \}$. The rank of these values, equals the rank of the associated grid. Thus in the above example, there are two values indicating the stagger since the grid is of rank two. + +

+The stagger location key represents the location of a field with respect to the cell center location. It is indicated by relative cartesian coordinates of a unit square, cube etc. To illustrate this further, consider the example of a 2D grid. The cell is represented by a unit square with the xy axis placed at its center, with the positive x-axis oriented East and the positive y-axis oriented North. The actual values are suppressed, only the directions $+$, and $0$ are used. This geometry is for reference purposes only, and does not literally represent the shape of an actual cell. + +

+The cell center, located at the origin of the cell, is indicated by $\{ 0,0 \}$. The corner of the cell is indicated by $\{ +,+ \}$, where the ones have been dropped to just leave the plus signs. The cell face normal to the X axis (right wall) is indicated by $\{ +, 0 \}$, while the face normal to the Y axis ( top wall) is indicated by $\{ 0,+ \}$. This approach generalizes well to higher dimensions. +

+ + + + + + + + + + + + + + + + +
argument definition
Center{ 0,0 }
Corner{ +,+ }
Face normal to X axis{+,0 }
Face normal to Y axis{0,+ }
+
+ +

+With these four locations, it is possible to indicate the standard Arakawa grid staggerings. A key of $\{ 0,0 \}$ would be equivalent to an Arakawa A-grid, while a key of $\{ +,+ \}$ would represent an Arakawa B-grid. Components of the C and D grids would be indicated by wall positions $\{ +, 0 \}$ and $\{ 0,+ \}$. +

+ + + + + + + + + + + + + +
Grid Stagger coordinates
A-grid{ 0,0 }
B-grid{ 1,1 }
C-grid & D-grid{ 0,1 } and { 1,0}
+
+Therefore a key of $\{ 0,0 \}$ in the previous example would indicate that the stagger is located at the cell center location, or the A-grid. Typically the stagger coordinates are suppressed for the A-grid. + +

+For example, the string +

+[B1 G1; B2 G2 ] =C=> [B1 G1; B2 G2 ] @(+,+)
+
+indicates that a collection of regridding tests are to be run where a block distributed two dimensional field, is interpolated from one two dimensional grid onto a second two dimensional grid, using a first order conservative method. The source field data is located at the cell centers (an A-grid stagger location) and the destination field is to be located at north east corner (a B-grid stagger location). Additional information about the pair of grids and their distributions must be specified to run an actual test. + +

+This process generalizes to higher dimensions. Consider +

+[B1 G1; B2 G2 ; G3 ] =C=> [B1 G1; B2 G2 ; G3 ] @(+,+,+)
+
+indicates that a collection of regridding tests are to be run between a 3D source grid (cell centered) and a 3D destination grid where the field stagger location is the upper corner of the 3D cell (B-grid horizontally and top of the cell vertically). + +

+A further discussion on grid staggers can be found in section on the ESMF Grid class in the Reference manual. + +

+ +

+6.5.3 General Data Structures +

+It is possible to represent more general data structures which cannot be described as simple logically rectangular blocks of memory. These embedded structures are represented by combining multiple contiguous data chunks separated by commas. + +

+For example, in models with nested grids or which employ multi-grid methods, it is useful to have an indexed structure of logically rectangular blocks of memory, where each block is generally a different shape and size. Such a structure can be represented with parentheses as delimiters, such as +

+
+   ( tile , [ B1 G1; B2 G2 ] )
+
+
+
+Here we have a collection of 2D blocks of memory, each block being associated with a 2D grid and being distributed in both dimensions. + +

+ +

+6.5.4 Specifier files +

+The problem descriptor strings are augmented by two types of specifier files which complete the description of the test configuration. The specifier files indicate which members of the family described by the problem descriptor string are to be tested. The two types of specifier files define the grid and the distribution information needed to completely define a test. The two specifier files define information such as the type, size, and coordinates of the grid, the test function to be interpolated or redistributed, and the size of the distribution. + +

+The nature of the grid specifier file varies depending on whether the test is a redistribution or a regridding. A redistribution test takes a field associated with a grid and rearranges it in processor space. So while a source and destination distribution are needed, only a single grid is necessary to conduct the test. A regridding test, on the other hand, takes a field associated with a source grid and interpolates it to a destination grid thaty is also part of a field. In this case both source and destination grids are needed. It is also assumed that a source and destination distribution is specified. +

+ + + + + + + + + + + + + +
Redistributionsource grid
 source & destination distribution
Regriddingsource & destination grids
 source & destination distribution
+
+ +

+ +

+ +
+6.5.5 Grid Specification +

+For the purposes of the test harness, a grid is completely defined in terms of its type, size, coordinates, and units. From this information either a rectilinear or a curvilinear grid is generated. + +

+The first step of the grid generation is to generate a rectilinear grid of specified size, range of coordinates, and either uniform or gaussian spacing between the coordinates. If only a rectilinear grid needed, the grid generation is finished. If a curvilinear grid is desired, the rectilinear grid is taken as a base grid and its coordinates are smoothly stretched and/or shrunk according to an analytical function, to produce a curvilinear mesh according. + +

+ +

+6.5.5.1 Curvilinear Grid Coordinate Generation (For Future Implementation) +

+If a curvilinear grid is desired, the rectilinear grid is taken as a base grid and its coordinates are smoothly stretched and/or shrunk according to an analytical function, to produce a curvilinear mesh according. +The algebraic grid generation takes the form +

+
+ +\begin{eqnarray*}
+X_{ij} &=& \hat{x}_{i} + \epsilon \Delta x \Gamma_{x}(x_{i},y_...
+...{ij} &=& \hat{y}_{j} + \epsilon \Delta y \Gamma_{y}(x_{i},y_{j})
+\end{eqnarray*}
+

+

+where the new curvilinear coordinates $X_{ij}$ and $Y_{ij}$ are functions of the original rectilinear grid coordinates $\hat{x}_{i}$ and $\hat{y}_{j}$, a small parameter +$0 < \epsilon < 1$, the smallest mesh spacings $\Delta x$ and $\Delta y$, and an analytical function of the coordinates $\Gamma$. Four forms of $\Gamma$ are supported, a contacted grid, an expanded grid, a symmetric sine perturbed grid, and an asymmetric sine perturbed grid. + +

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
key word formula +$\Gamma(x_{i},y_{j})$
contracting +$\Gamma_{x}(x_{i},y_{j}) = -(x_{i}/L_{x})(1-x_{i}/L_{x})(0.5-x_{i}/L_{x} )(y_{j}/L_{y})(1-y_{j}/L_{y})$
  +$\Gamma_{y}(x_{i},y_{j}) = -(y_{j}/L_{y})(1-y_{j}/L_{y})(0.5-y_{j}/L_{y} )(x_{i}/L_{x})(1-x_{i}/L_{x})$
expanding +$\Gamma_{x}(x_{i},y_{j}) = +(x_{i}/L_{x})(1-x_{i}/L_{x} )(0.5-x_{i}/L_{x} )(y_{j}/L_{y})(1-y_{j}/L_{y})$
  +$\Gamma_{y}(x_{i},y_{j}) = +(y_{j}/L_{y})(1-y_{j}/L_{y})(0.5-y_{j}/L_{y} )(x_{i}/L_{x})(1-x_{i}/L_{x})$
symmetric_sin +$\Gamma_{x}(x_{i},y_{j}) = \sin(4 \pi x{i}/L_{x}) \cos(6 \pi y_{j})/L_{y})$
  +$\Gamma_{y}(x_{i},y_{j}) = \sin(4 \pi x{i}/L_{x}) \cos(6 \pi y_{j})/L_{y})$
asymmetric_sin +$\Gamma_{x}(x_{i},y_{j}) = \sin(4 \pi x{i}/L_{x}) \cos(6 \pi y_{j})/L_{y})$
  +$\Gamma_{y}(x_{i},y_{j}) = \sin(4 \pi y{j}/L_{y}) \cos(6 \pi x_{i})/L_{x})$
+
+ +

+These four choices for $\Gamma$ equate into four options for analytically generated curvilinear grids. + +

+Examples of these four curvilinear grid options are plotted in figure [*]. + +

+

+
+
+ + + +
Figure: +The four options for smooth curvilinear grids; clockwise from the top left corner, a contacted grid, an expanded grid, a symmetric sine perturbed grid, and an asymmetric sine perturbed grid.
+ + + + + + +
+\scalebox{0.3}{\includegraphics{Harness_ContractedGrid} } +\scalebox{0.3}{\includegraphics{Harness_ExpandedGrid} }
+\scalebox{0.3}{\includegraphics{Harness_SymmetricGrid} } +\scalebox{0.3}{\includegraphics{Harness_AsymmetricGrid} }
+
+
+
+ +

+This adds up to a total of 2 types of rectilinear grids (uniform and gaussian), each with three options (no connection, spherical pole connection, and a periodic option). A large variety of grids can be formed by mixing and matching the grid types and options. For example a standard latitude-longitude grid on a sphere is formed by using the pair of grid types uniform_periodic and uniform_pole. A gaussian grid is formed with uniform_periodic and gaussian_pole. And a regional grid on a sphere, without periodicity, with uniform and uniform. A summary of the rectilinear grid types is given below. +

+ + + + + + + + + + + + + + + + + + + + + + + + +
Rectilinear grid options
grid type modifier
UNIFORMnone
 _POLE
 _PERIODIC
GAUSSIANnone
 _POLE
 _PERIODIC
+
+ +

+The various curvilinear grid types are created in the same way of mixing and matching grid type options. A regional expanding grid is formed using the grid types expanding and expanding. Likewise a rotated regional grid is created by +using the grid types rotation_15degrees and rotation_15degrees to indicate the grid type. A summary of the curvilinear grid types is given below. +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Curvilinear grid options
grid type modifier
CONTRACTINGnone
 _POLE
 _PERIODIC
EXPANDINGnone
 _POLE
 _PERIODIC
SYMMETRIC_SINnone
 _POLE
 _PERIODIC
ASYMMETRIC_SINnone
 _POLE
 _PERIODIC
rotation_15degreesnone
rotation_30degreesnone
rotation_30degreesnone
+
+It should be noted that the rotated grid type only supports non-connected domains, and therefore has no option for _pole and _periodic connectivity. + +

+ +

+6.5.5.2 Specifier file syntax for redistribution +

+Since a redistribution test takes either an array or a field and rearranges it in processor space, the test requires only a single grid for the source and destination. The information required is: +
+ + + + + + + + + + + +
parameters to define a grid for redistribution
Grid rank
Grid dimensions
Range of the coordinate axis
Coordinate units
+
+ +

+This is the information is provided by the redistribution grid specifier file. +An example of a redistribution grid specifier file is provided below. +

+
+# grid.rc
+########################################
+map_type: REDISTRIBUTION
+
+# regular rectilinear Grid specification 
+map_redist::
+#rank spacing  size  range (min/max)  units
+#
+2  'UNIFORM'  120  -3.14159  3.14159  'RAD'   'UNIFORM'  90  -1.57  1.57  'RAD'   
+#
+2  'UNIFORM'  400  -180   180  'DEG_E'  'GAUSSIAN'  200 -88   88   'DEG_N'  
+::
+
+
+
+ +

+The first piece of information required for the file is the map_type key. It should be set to REDISTRIBUTION to indicate that it is intended to define grids for a redistribution test. Next is a configuration table which specifies multiple grids. The specification can be stretched over multiple table lines by use of the continuation symbol $\&$. The order of information is as follows: +

+ + + + + + + + + + + + + +
parameters to define a grid for redistribution
Grid rank
Grid axis type
Grid size
Range of the coordinate axis
Coordinate units
+
+ +

+There are two 2D grids specified in the file. The first is a standard uniformly spaced latitude-longitude grid, where none of the grid coordinates has any topological connections. The horizontal coordinates are in radians. The second 2D grid is a gaussian spherical grid. The gaussian grid has a spherical topology and is in degrees. + +

+Four types of coordinate units are supported; degrees, radians, meters and kilometers. Each has multiple equivalent key words. +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Supported units
name key word
DegreesDEGREES
 DEG
 DEG_E
 DEG_N
RadiansRADIANS
 RAD
MetersMETERS
 M
KilometersKILOMETERS
 KM
+
+ +

+ +

+6.5.5.3 Specifier file syntax for regridding +

+The process of regridding takes a distributed test field from a source grid and interpolates it to a distributed destination grid. Therefore it requires information specifying both a source and destination grid, and an explicit test function to interpolate. The information required is: +
+ + + + + + + + + + + + + + + +
parameters to define a grid for remapping
source and destination grid rank
source and destination grid axis type
source and destination grid dimensions
source and destination range of coordinate axis
source and destination coordinate units
test function with parameters to interpolate
+
+ +

+This information is provided by the regridding grid specifier file. +An example of a regridding grid specifier file is provided below. +

+
+# grid.rc
+########################################
+map_type: REGRID
+
+################################################################################
+# grid | source | grid    |    grid   | grid  | units | destination | 
+# rank |  tag   | spacing | dimension | range |       |    tag      |
+################################################################################
+# Grid specification for regridding
+
+#rank spacing  size  range (min/max)  units
+map_regrid::
+# example of a pair of 2D periodic grids 
+2   SRC    UNIFORM_PERIODIC   120   -3.14159  3.14159  RADIANS   
+&              UNIFORM_POLE             90    -1.57        1.57        RADIANS   
+&   DST    UNIFORM_PERIODIC   120  -180      180             DEG_E   
+&              GAUSSIAN_POLE           88    -88        88             DEG_N   
+&   FUNCTION    CONSTANT   2.1 0.1  END
+::
+
+
+
+ +

+The first piece of information required for the file is the map_type key. It should be set to REGRID to indicate that it is intended to define grids for a regridding test. Next is a configuration table which specifies multiple pairs of grids. The specification can be stretched over multiple table lines by use of the continuation symbol $\&$. The order of information is as follows: +

+ + + + + + + + + + + + + + + + + + + + + + + +
parameters to define a grid for reremapping
Grid rank
Source grid axis type
Source grid size
Source range of the coordinate axis
Source coordinate units
Destination grid axis type
Destination grid size
Destination range of the coordinate axis
Destination coordinate units
Test function and parameters
+
+ +

+The regridding grid specifier file contains a pair of 2D grids. The source grid is a standard latitude-longitude grid on a spherical topology. The destination grid is a spherical gaussian grid also on a spherical topology. The source grid is in radians, while the destination grid is in degrees. The test function is a periodic function of the grid coordinates. + +

+The one new piece of information for the regridding specifier files are the predefined test functions. The test functions provide a physical field to be interpolated and are generated as an analytical function of the grid coordinates. Supported options include: +

+ + + + + + + + + + + + + + + + + + + + +
Test functions  
name functionparameters
constantset value at all locationsvalue, relative error
coordinateset to a multiple of the coordinate valuesscale, relative error
spherical harmonicperiodic function of the grid coordinatesamplitudes and phases, relative error
+
+ +

+The CONSTANT value test function sets the field to the value of the first parameter following the name. The second value is the relative error threshold. For example, the test function specification: + +

+

+
+&   FUNCTION    CONSTANT   2.1 0.1  END
+
+
+
+ +

+indicates that the field is set to the constant value of $2.1$, with a relative error threshold +of $0.1$. This test function specification holds for grids of any rank. + +

+The COORDINATE test function sets the field to the value of the one of the grid coordinates multiplied by the value of the first parameter following the name. The second value is the relative error threshold. For example, the test function specification: + +

+

+
+&   FUNCTION    COORDINATEX   0.5 0.1  END
+
+
+
+ +

+indicates that the field is set to one half of the X coordinate values. For a 2D grid the coordinate options include COORDINATEX and COORDINATEY. For a 3D grid there is the additional option of COORDINATEZ. Again, the relative error threshold is $0.1$. +This test function specification holds for grids of any rank. + +

+The SPHERICAL_HARMONIC test function sets the field to the periodic harmonic function + +$\vert a+b\vert + a*\cos(2\pi * k_x * x/L_x ) + b*\sin(2\pi * l_y * x/L_y )$. +The parameters follow the order + +

+

+
+&   FUNCTION    SPHERICAL_HARMONIC  a   kx  b   ly    rel_error  END
+
+
+
+ +

+This test function specification is only valid for 2D grids. + +

+ +

+ +
+6.5.6 Distribution Specification +

+The purpose of the distribution specification is to characterize the distribution of the grid. It differs from the grid specification in that it is designed to specify the distribution as both absolute values such as $2 \times 3$ PETs as well as in relative terms based on fractions of the total number of PETs. This second option is intended to allow the distribution space to scale with changing machine resources without having to change the distribution specification file. + +

+Here is an example of a distribution specification file for block and block cyclic distributions. +

+
+##################################################
+# descriptive | source | source | operator | destination | dest | operator | end
+# string      |  tag   |  rank  |  & value |     tag     | rank | & value  | tag
+##################################################
+
+# table specifing 2D to 2D distributions
+distgrid_block_2d2d::
+
+# example with two fixed distribution sizes
+ '(1,2)-->(2,1)'  'SRC' 2  'D1==' 1  'D2==' 2  'DST' 2  'D1==' 2  'D2==' 1  'END'  
+
+# example with one fixed and one variable distribution size
+ '(1,n)-->(n,1)'  'SRC' 2  'D1==' 1  'D2=*' 1  'DST' 2  'D1=*' 1  'D2==' 1  'END'  
+
+# example with variable distribution sizes
+ '(2n,n/2)-->(n/2,2n)'  'SRC'  2  'D1=*'  2    'D2=*'  0.5  
+ &                      'DST'  2  'D1=*'  0.5  'D2=*'  2     'END'
+
+# another example with variable distribution sizes
+ '(2n,n/2)-->(2n,(n/2)-1)'  'SRC' 2  'D1=*' 2  'D2=*'  0.5  
+ &                          'DST' 2  'D1=*' 2  'D2=*'  0.5  'D2=+' 1   'END'
+::
+
+# table specifing 3D to 3D distributions
+distgrid_block_3d3d::
+
+# example with two fixed distribution sizes
+ '(1,2,1)-->(2,1,1)'  'SRC' 3  'D1==' 1  'D2==' 2  'D3==' 1  
+ &                    'DST' 3  'D1==' 2  'D2==' 1  'D3==' 1  'END'  
+::
+
+
+
+The contents of the file are tables which specify pairs of distributions. Each table specifies a particular rank of distributions. The first table consists of 2D to 2D distributions, while the second table consists of a 3D to 3D pair of distributions. +The order of information is as follows: +
+ + + + + + + + + + + + + + + + + + + + + +
parameters to define a grid distribution
Descriptive string
Source key
Source distribution rank
Source distribution axis and size for each dimension of the distribution
Destination key
Destination distribution rank
Destination grid size
Destination distribution axis and size for each dimension of the distribution
Termination key
+
+The first example in the table starts with a string used by the report as a brief description of the distribution. Such as $(1,2)-->(2,1)$ which indicates a source distribution of $1 \times 2$ and a destination distribution of $2 \times 1$. Next comes a key word, either SRC or DST to indicate the beginning of the source and destination descriptions, respectively. Following each tag is a specification of the distribution. In the first case a fixed source distribution is specified by the entries $D1==1$ and $D2=2$. This indicates that the source distribution is fixed to be $1 \times 2$, provided that the test is running with at least two processors. Likewise the destination distribution is fixed to $2 \times 1$. + +

+The second example, illustrates how to indicate a scalable distribution. Again the entry $D1==1$ indicates that the first dimension of the distribution is set to one, but the entry $D2=*1$ has a different meaning. It takes the total number of PETs NPETS and scales it by one. Therefore the source distribution becomes +$1 \times NPETS$. It automatically scales with the number of PETs. Likewise, the destination distribution is set to +$NPETS \times 1$. + +

+The third example is completely dynamic. Since both $D1$ and $D2$ are scalable, each dimension starts with $N$ PETs, where $N$ is the square root of $NPETS$ rounded down to the nearest integer. Therefore +$N\times N \leq NPETS$. So if $NPETS=4$, Then $N=2$. If $NPETS=6$ then $N$ still equals $4$. This base value is then modified by the indicated entries. In this case the source distribution is +$2 N \times 1/2 N$, since the tag $D1=* 2$ indicates that first dimension is the result of the base value being multiplied by two, and the second dimension is the result of the base value being multiplied by one half. Likewise, the destination distribution is set to +$1/2 N \times 2N$, no matter the number of $NPETS$. + +

+For a rank three scalable distribution, $N$ is the cube root of NPETS rounded down to the next integer. And so on for higher rank distributions. + +

+The fourth example illustrates the last option in the syntax. Again, since the distribution specifies two scalable distributions, $N$ is the square root of $NPETS$ rounded down to the nearest integer. The source distribution is exactly the same as in the third example, but destination distribution has a new entry $D2=+ 1$. The first dimension of the destination distribution is set to $2N$ by the entry $D1=* 2$. the second dimension is first set to $1/2N$ by the entry $D2=* 0.5$, but then modified further to $(1/2)(N) +1$ by the entry $D2=+ 1$. The resulting destination distribution is +$2N \times (1/2)(N) +1$. + +

+The syntax for modifying the size of the distribution space combines according to the order of the operations. The entries $D2=* 0.5$ and $D2=+ 1$, are not identical to $D2=+ 1$ and $D2=* 0.5$, which would result in a dimension of size $(1/2)(N+1)$. + +

+Three operations are supported: +

+ + + + + + + + + + + + + +
Distribution specification operations 
D# ==specify a fixed value
D# =*multiply a base value by a constant
D# =+add a constant to the base value
+
+ +

+ +

+6.5.7 Class Specification +

+The class specific specifier file is current unused, but is made available for future test expansion. + +

+ +

+6.6 Reporting test results +

+The test harness offers the option of producing a human readable report on the test results. The report consists of a concise summary of the test configuration along with the test results. The test configuration is described in terms of the Field Taxonomy syntax and user provided strings. The intent is not to provide a exhaustive description of the test, but rather to provide a useful description of the failed tests. + +

+Consider a problem descriptor string consisting of two descriptor strings describing an ensemble of remapping tests. +

+
+[ B1 G1; B2 G2 ] =C=> [ B1 G1; B2 G2 ] @{+,+}
+[ B1 G1; B2 G2 ] =B=> [ B1 G1; B2 G2 ] @{+,+}
+
+
+
+ +

+Suppose the associated specifier files indicate that the source grid is rectilinear and is 100 X 50 in size. The destination grid is also rectilinear and is 80 X 20 in size. The remapping is conducted from the A-grid position of the source grid to the B-grid stagger of the destination grid. Both grids are block distributed in two ways, 1 X NPETS and NPETS X 1. And suppose that the first dimension of both the source and destination grids are periodic. If the test succeeds for the conservative remapping, but fails for one of the first order bilinear remapping configurations, the reported results +could look something like +

+
+SUCCESS: [B1 G1; B2 G2 ] =C=> [B1 G1; B2 G2 ] @{+,+}
+FAILURE: [B1{1} G1{100}+P; B2{npets} G2{50} ] =B=> 
+                         [B1{1} G1{80}+P; B2{npets} G2{20} ] @{+,+}
+     failure at line 101 of test.F90
+SUCCESS: [ B1{npets} G1{100} +P; B2{1} G2{50} ] =B=> 
+                         [ B1{npets} G1{80}+P; B2{1} G2{20} ] @{+,+}
+
+
+
+Notice that the problem descriptor string differs from that of the configuration files. This is because it represents specific realizations of ensemble. For example +
+
+[ B1{npets} G1{80}+P; B2{1} G2{20} ] @{+,+}
+
+
+
+indicates that the 2D block of memory is periodic in the first dimension by the addition of the $+P$ to the first grid key. The size of the grid is indicated as $80 \times 20$ by the size arguments appended to the grid indicators $G1 \{80 \}$ and $G2 \{ 20 \}$. The size of the distribution is indicated in the same way as +$npets \times 1$ by the block distribution indicators +$B1 \{ npets \}$ and $B2 \{ 1 \}$. + +

+The report indicates that all the test configurations for the conservative remapping are successful. This is indicated by the key word SUCCESS which is followed by the successful problem descriptor string. Since all of the tests in the first case pass,there is no need to include any of the specifier information. For the second ensemble of tests, one configuration passed, while the other failed. In this case, since there is a mixture of successes and failures, the report includes specifier information for all the configurations to help indicate the source of the test failure. + +

+The supplemental information, while not a complete problem description, since it lacks items such as the physical coordinates of the grid and the nature of the test field, includes information crucial to isolating the failed test. + +

+ +

+ +

+ +
+esmf_support@ucar.edu +
+ + diff --git a/docs/nightly/fix/reconcile-info/dev_guide/node8.html b/docs/nightly/fix/reconcile-info/dev_guide/node8.html new file mode 100644 index 000000000..afa5c60b2 --- /dev/null +++ b/docs/nightly/fix/reconcile-info/dev_guide/node8.html @@ -0,0 +1,4539 @@ + + + + + +7 Conventions + + + + + + + + + + + + + + + + + + + + + +Subsections + + + +
+ +

+ +
+7 Conventions +

+ +

+Code and documentation developed for the ESMF will follow conventions +for both style and content. The goal is to create software with a consistent +look and feel so that it is easier to read and maintain. + +

+Because much ESMF documentation is generated directly from source +code, code and documentation conventions are closely intertwined. + +

+ +

+ +
+7.1 Docs: Code and Documentation Templates and Associated Scripts +

+ +

+ESMF maintains a set of templates for developing Fortran and +C++ codes and their documentation. The documentation templates +include requirements, design, and reference documents. +These templates are bundled with the source distribution, in +the following directory: +
+

+$(ESMF_DIR)/scripts/doc_templates
+
+ +

+ +

+7.1.1 Documentation Generation Script +

+ +

+The do_newdoc script in the document templates package creates +a new document directory and populates it with the appropriate files. +The READMEs in the package describe the procedure for running the +script. + +

+ +

+7.1.2 Code Generation Scripts +

+A set of scripts is available that creates a set of new directories for either +a C++ or Fortran class and populates them with the appropriate code and +document files. The READMEs in the doc_templates +package describe the procedures for doing this. + +

+The following scripts are included in the doc_templates package: +

+
do_newcomp
+
This script creates a new component. It makes a new component directory +tree if one does not already exist. In addition, it adds the required template files +in the component directory tree with the proper root file names. +
+
do_newclass
+
This script creates a new class template in the current directory. +It may be used for both C++ and Fortran 90 classes. For C++, it adds an include +file (ESMC_class.h) in the component include directory, if one does not exist. +
+
+ +

+ +

+ +
+7.2 Docs: Documentation Guidelines and Conventions +

+ +

+ +

+7.2.1 Accessibility +

+ +

+Software documentation for the last public release is at: +

+  http://www.earthsystemmodeling.org -> Users -> Documentation
+
+ +

+Software documentation for all releases is at: +

+  http://www.earthsystemmodeling.org -> Download -> View All Releases
+
+ +

+Documents are available to developers for editing through the +ESMF repository on the GitHub site. + +

+ +

+7.2.2 File format +

+ +

+Documents will be available in both web-browsable (e.g. html) and +printer-friendly formats. They will be written in LATEX and based on a +set of templates. LATEX was chosen because: + +

+ +

    +
  • it is a format that many people are already familiar with; +
  • +
  • it can produce both print and web documentation by using text-to-html +tools such as latex2html; +
  • +
  • it is the format generated by the F90/C++ compatible +auto-documentation tool ProTeX[#!protex!#], +which we shall use. +
  • +
+ +

+ +

+7.2.3 Typeface and Diagram Conventions +

+ +

+ +

+The following conventions for fonts and capitalization are used +in this and other ESMF documents.
+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
StyleMeaningExample
italicsdocumentsESMF Reference Manual
couriercode fragmentsESMF_TRUE
courier()ESMF method nameESMF_FieldGet()
boldfacefirst definitionsAn address space is ...
boldfaceweb links and tabsDevelopers tab on the website
CapitalsESMF class nameDataMap
+ +

+ESMF class names frequently coincide with words commonly +used within the Earth system domain (field, grid, component, array, +etc.) The convention we adopt in this manual is that if a word is +used in the context of an ESMF class name it is capitalized, and +if the word is used in a more general context it remains in lower +case. We would write, for example, that an ESMF Field class +represents a physical field. + +

+Diagrams are drawn using the Unified Modeling Language (UML). UML +is a visual tool that can illustrate the structure of +classes, define relationships between classes, and describe sequences +of actions. A reader interested in more detail can refer to a +text such as The Unified Modeling Language Reference Manual. + [#!uml!#] + +

+ +

+7.2.4 Style Rules for LATEX +

+ +

+General style recommendations for LATEX documentation include the +following: + +

+ +

    +
  1. Limiting the source file text width to 80 characters; +
  2. +
  3. The use of proper indentation in sections and environments; +
  4. +
  5. The liberal use of blank lines to delimit blocks; +
  6. +
  7. Leaving as much of the typesetting as possible to LATEX itself + (user-specified lengths, pagebreaks, etc. are discouraged); +
  8. +
  9. The use of the html package for convenient production + of HTML and print formats; +
  10. +
  11. The use of the fontenc packages + to permit use of LATEX special tokens in source; +
  12. +
  13. The use of a Type-I font (e.g the times or + palatcm packages) to provide scaling PDF documents. +
  14. +
+ +

+ +

+7.3 Docs: Performance Report Conventions +

+Measurements and analysis of ESMF performance are documented in +performance reports. These reports are used to communicate +information about framework performance, and are used to +define and assess the success of optimization efforts. +They are posted on the ESMF website under the Performance +link. Reports typically contain the following sections: Objective, +Description of the Benchmark, Results, Optimizations +and Conclusions. + +

+Performance reports should contain the following specific +information: + +

    +
  1. The tag or version of the framework used (not a moving tag, +like HEAD or LAST_STABLE) +
  2. +
  3. Where to get the source code +
  4. +
  5. Machine location and type +
  6. +
  7. OS and compiler version +
  8. +
  9. Processor counts +
  10. +
  11. Complete description of grids and distributions or where +to get that info +
  12. +
  13. How many iterations were performed for each data point +
  14. +
  15. How the timings were obtained from the iterations +
  16. +
+ +

+ +

+7.4 Docs: Reference Manual Conventions +

+ +

+ +

+7.4.1 Description, Use and Examples, and Other Introductory Sections +

+ +

+ +

    +
  1. These sections shall contain thorough coverage of class +behavior and usage. Any mention of private classes or implementation +strategies shall be reserved for the sections called Design and +Implementation Notes. Restrictions shall be listed in the +Restrictions and Future Work sections. + +

    +

  2. +
  3. If a method name is referred to in the text it shall be in this +fashion ESMF_<Class><MethodName>(). If a code fragment or flag is +included in the text, we shall use the form ESMF_<FLAG_NAME> +or surround the fragment with the LATEX verbatim command. The +goal is to get all code fragments in an identifiable font. + +

    +

  4. +
  5. Class names shall be capitalized in these sections, and +in the normal text font, e.g. Field. The reason is that +Field is not an ESMF derived type or code fragment and writing +the full type, e.g. ESMF_Field, everywhere makes long +explanations less readable. + +

    +

  6. +
  7. Verbs like halo and regrid shall not be capitalized since they +are not public classes. The exception is when such a verb is also a +private class, and it is written about in that context. For example, +when writing about Regrid as a private class in a Design and +Implementation Notes section it is appropriate to capitalize it. + +

    +

  8. +
  9. Full class names shall be used everywhere (e.g., Layout will +not be used as a shorthand for DELayout). + +

    +

  10. +
+ +

+ +

+7.4.2 Examples Sections +

+ +

+A standard template for examples has not yet been created. + +

+ +

+7.4.3 Flags and Options Sections +

+ +

+ +

    +
  1. All flags and options (hereafter referred to as options) +shall be broken out into separate sections called <Class> Options. +Options shall each have their own derived type, +e.g. ESMF_Sync_Flag, and valid values will be all capitals +with underscore separators, e.g. ESMF_SYNC_NONBLOCKING. + +

    +

  2. +
  3. When possible, call options <Class>Type or <Something>Flag and +name the argument in the argument list the same thing. For example, +the option ESMF_Sync_Flag has associated arguments +called syncflag. + +

    +

  4. +
  5. The purpose of options shall be fully described along with all +valid values in the options sections of the document. See the +standard format in Calendar Options or Grid Options. + +

    +

  6. +
  7. In the sections describing the usage and values for options, +only use the full class name, e.g. ESMF_Field, method names such +as ESMF_FieldWrite, or particular argument names, such as syncflag. Do not use the more informal form of the short class +name in a regular font, e.g. Field. The rationale is that here we +are carefully specifying interface behavior and are referring only +to particular ESMF types, values, and methods. It is a pain in +the neck to be that rigorous in the longer text sections +(like Description), but it is helpful to be precise for the +API specification. +
  8. +
+ +

+ +

+7.4.4 Class API Sections +

+ +

+ +

    +
  1. Public class methods shall be capitalized by name within a file. +Generally private methods are listed at the end of the file. Especially +for classes with many methods, this makes locating a particular method +somewhat easier. + +

    +

  2. +
  3. All public methods shall be fully documented in the Reference +Manual. Private methods without interfaces shall not appear at all. +Private methods that are overloaded with public interface shall follow +a standard format that clearly indicates that the methods are overloaded; +see ESMF_FieldCreate() for an example. + +

    +

  4. +
  5. The Reference Manual shall include for each class a thorough +specification of behavior, including any default values or behaviors. +Description of options can reference <Class> Options sections. +All descriptions should contain complete sentences with periods, +e.g. "This method sets invalid values for an ESMF_FieldBundle object." + +

    +

  6. +
  7. The brief one-line description that follows the method name shall +begin with a capital and have no period at the end. + +

    +

  8. +
  9. All methods shall conform to method naming conventions. + +

    +

  10. +
  11. Functions shall have their data type and return variable name declared +on a separate line after the function statement, and prior to the +argument list declarations. The data type shall not appear in the +function statement. The optional result clause should also +not be used. + +

    +

  12. +
  13. All arguments shall conform to variable naming conventions +for capitalization and standard use of terms such as count, dim, etc. +The conventions shall be used even if names become fairly long. +All class names will be used in full, e.g. DELayout will not be +used instead of DELayout. Cryptic abbreviations like btype +shall not be used - use bundleType instead. + +

    +

  14. +
  15. As with descriptions of flags and options: in the sections describing +methods, only use the full class name, e.g. ESMF_Field, method names such +as ESMF_FieldWrite, or particular argument names, such as syncflag. Do not use the more informal short form in regular +font, e.g. Field. + +

    +

  16. +
+ +

+ +

+7.5 Code: Method Conventions +

+ +

+ +

+7.5.1 Standard Method Names +

+ +

+ESMF defines a set of standard methods and interface rules that +hold across the entire API. These are: + +

+ +

    +
  • ESMF/C_<Class>Create() and ESMF_<Class>Destroy(), for creating and +destroying classes. The ESMF_<Class>Create() method allocates +memory for the class structure itself and for internal variables, and +initializes variables as appropriate. It is always written as a +Fortran function that returns a derived type instance of the class. + +

    +

  • +
  • ESMF/C_<Class>Set() and ESMF_<Class>Get(), for setting +and retrieving a particular item or flag. In general, these methods are +overloaded for all cases where the item can be manipulated as a +name/value pair. If identifying the item requires more than a +name, or if the class is of sufficient complexity that overloading +in this way would result in an overwhelming number of options, we +define specific ESMF_<Class>Set<Something> and +ESMF_<Class>Get<Something> interfaces. + +

    +

  • +
  • ESMF/C_<Class>Add(), ESMF_<Class>Get(), and +ESMF_<Class>Remove() for manipulating +items that can be appended or inserted into a list of like +items within a class. For example, the ESMF_StateAdd() +method adds another Field to the list of Fields contained +in the State class. + +

    +

  • +
  • ESMF/C_<Class>Print(), for printing the contents of a class to +standard out. This method is mainly intended for debugging. + +

    +

  • +
  • ESMF/C_<Class>ReadRestart() and ESMF_<Class>WriteRestart, +for saving the contents of a class and restoring it exactly. Read +and write restart methods have not yet been implemented for most +ESMF classes, so where necessary the user needs to write restart +values themselves. + +

    +

  • +
  • ESMF/C_<Class>Validate(), for determining whether a class is +internally consistent. For example, ESMF_FieldValidate checks +whether the Array and Grid associated with a Field are consistent. + +

    +

  • +
  • ESM[F/C]_<Class>Construct() and ESM[F/C]_<Class>Destruct(), +for initializing a previously allocated object with valid data. This +function is called by the create function. Depending on the type of +object this function may or may not allocate resources that need to be freed. +Only for ESMF internal usage; not visible to users. + +

    +

  • +
+ +

+ +

+7.5.2 Use of *Set and *Get +

In general, Set and Get calls with optional arguments +for each possible attribute to be processed shall be used instead of individual +Set and Get calls. The goals are a smaller, clearer interface and easier extensibility. +An exception is when the Set or Get does not translate to a simple name/value pair, +for instance when one element of an array of internal attributes must be retrieved. + +

+ +

+7.5.3 Use of Is* and Has* +

Methods names that indicate the +presence of some attribute or quality shall use the Has* form. Methods +that indicate a condition shall use the Is* form; for example, +ESMF_DELayoutIsLocal. In Fortran, these should return logical +data type results. The goals are consistency and clarity. + +

+ +

+7.5.4 Functions vs. Subroutines +

+Most Fortran calls in the ESMF are subroutines, with +any returned values passed through the interface. For the sake of +convenience, some ESMF calls are written as functions. + +

+ +

+7.5.5 Source and Destination Ordering +

+In ESMF we shall follow a source first, then destination convention when ordering +arguments. + +

+ +

+7.6 Code: Argument Conventions +

+ +

+The naming conventions listed here apply to arguments that appear in +ESMF public interfaces. It is nice if internal arguments also adhere +to these conventions, but not enforced as it is as the interface. + +

+ +

+7.6.1 Standard Variable Names +

+ +

+The following table lists a set of standard terms that we use in ESMF. + +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Cellgrid cell
Coordcoordinate
Countcount
Dimdimension, used for grids
Dstdestination
Listindicates that the quantity is an array
Localindicates that the quantity is associated with a PET or DE
Perper item
Rankdata array dimension
Sendsend
Srcsource
Recvreceive
+ +

+These are used in combination to create argument and variable names. +For example, localCellCountPerDimList is an array of counts, per +dimension, of the number of local grid cells. + +

+ +

+7.6.2 Use of Is* and Has* +

Variable names that indicate the +presence of some attribute or quality shall use the Has* form; e.g., a +variable such as hasGrid. Variables that indicate a condition shall +use the Is* form. In Fortran, these should return logical +data type results. The goals are consistency and clarity. + +

+ +

+7.6.3 Variable Capitalization +

+For method arguments that are multi-word, the first word is lower +case and subsequent words begin with upper case. ESMF class +names (including typed flags) are an exception. When multi-word +class names appear in argument lists, all letters after the first +are lower case. The first letter is lower case if the class is the +first word in the argument and upper case otherwise. For +example, in an argument list the DELayout class name may appear +as delayout or srcDelayout. + +

+ +

+7.6.4 Variables Associated with Options +

+Variables associated with flags or option shall have the same name as +the option (as long as it is not too awkward); for example, an option +ESMF_Sync_Flag has an associated argument syncflag. + +

+ +

+7.6.5 Variables Having Logical Data Type +

+Variables associated with flags or other boolean values shall use +the Fortran logical data type in the public ESMF API. The ESMF_Logical +derived type shall only be used in Fortran code internally, for example when passing +logical values between Fortran and C++ code. + +

+ +

+7.6.6 Arguments which are Arrays +

+Arguments which are arrays shall use the Fortran assumed-shape passing style. +This allows the procedure to use intrinsic functions such as size, +lbound, and ubound within the method to determine array +dimension sizes. Also, ESMF convention is to place the array specification +following the variable name, rather than by using the dimension +attribute or a separate dimension statement. For example: +
+    type(ESMF_Field), intent(in) :: fieldList(:)
+
+ +

+ +

+7.6.7 Arguments which are Pointers +

+Arguments which are pointers may point to either scalar or array targets. +Pointers are typically used when an object must be allocated within the method +and returned to the caller. A second use is when the original array bounds +must be maintained. No intent attributes are currently used with +pointers because they are not part of Fortran-90 or Fortran-95. + +

+ +

+7.7 Code: File Rules +

+ +

+ +

+7.7.1 License and Copyright Information +

+ +

+Source and documentation files must contain the ESMF license and +copyright header: + +

+

+! Earth System Modeling Framework
+! Copyright (c) 2002-2024, University Corporation for Atmospheric Research,
+! Massachusetts Institute of Technology, Geophysical Fluid Dynamics
+! Laboratory, University of Michigan, National Centers for Environmental
+! Prediction, Los Alamos National Laboratory, Argonne National Laboratory,
+! NASA Goddard Space Flight Center.
+! Licensed under the University of Illinois-NCSA License.
+
+ +

+ +

+7.7.2 TODO: Reminder +

+To identify code sections that need +additional work or other pending activity that must be done before a release, +the code will be marked with a TODO identifier. +
+example:
+! TODO: add support for other data types (CMD 4/01).
+
+This will allow developers to 'grep' source files before software releases. + +

+ +

+7.7.3 FILENAME Macros +

+Source code files should define the /tt ESMF_FILENAME or /tt ESMC_FILENAME +macros to ensure that the filename is correctly displayed from the ESMF logging. +This can be done using the following code: + +

+

+#define ESMC_FILENAME "./src/Infrastructure/Attribute/src/ESMCI_Attribute.C"
+
+ +

+with the appropriate filename. Note that the path is relative to the ESMF +root directory. + +

+ +

+7.8 Code: Style Rules for Source Code +

+ +

+General style recommendations for source code include the following: + +

+ +

    +
  1. Limiting the text width to 80 characters; +
  2. +
  3. Each class implementation will be in a single file; +
  4. +
  5. The use of proper indentation of loops and blocks; +
  6. +
  7. The liberal use of blank lines to delimit code blocks; +
  8. +
  9. The use of comment lines of dashes or dots to delimit + procedures; +
  10. +
  11. The use of useful descriptive names for physically meaningful + variables; short conventional names for iterators (e.g + (i,j,k) for spatial grid indices); +
  12. +
  13. The use of short comments on the same line to identify variables + (i.e using ! or //); longer comments in + well-delineated blocks to describe what a portion of code is doing; +
  14. +
  15. Compact code units: long procedures should be split up if + possible. 200 lines is a rule-of-thumb procedure length limit. +
  16. +
  17. Use of global variables or public class variables should be +kept to a minimum to increase encapsulation and ensure modular code. +
  18. +
+ +

+ +

+ +

+7.9 Code: Error Handling Conventions +

+ +

+ +

+7.9.1 Objectives +

+ +

+The objectives of these conventions are: + +

+ +

    +
  1. to produce appropriate error messages when users try to call a method or branch in the ESMF software that is incomplete; +
  2. +
  3. to produce appropriate error messages for methods that have been implemented and reviewed, and to identify these methods clearly in the ESMF source code; +
  4. +
  5. to create defaults that enable developers to generate appropriate error messages throughout the development process, with a minimum of effort; +
  6. +
  7. to flexibly move between a mode where incomplete code is treated as an error (the user perspective) to a mode where it is not (the developer perspective, when using stubs for code construction). +
  8. +
+ +

+ +

+7.9.2 Approach +

+ +

+ESMF methods are classified into two categories: pre-review, and post-review. As of the version 3.0.1 release, *all* methods are pre-review. + +

+Reviews are expected to begin once conventions for framework behavior are sufficiently well-defined. To pass review, methods must have their basic functionality fully implemented. If any unimplemented options are present, they must be documented and must generate appropriate errors in order for the method to pass review. + +

+A pre-review method has its return code (rc) initialized to the value ESMF_RC_NOT_IMPL (not implemented). Possible sources of specific errors within the method, such as subroutine calls, generate local return codes (localrc). + +

+The localrc values are evaluated using the function ESMF_LogMsgFoundError(), which takes both the localrc and the rc as input arguments. If the localrc does not indicate an error, rc is output from ESMF_LogMsgFoundError() with the value it had going into the call, and the value of the function is .false.. If localrc does indicate an error, rc is set to the localrc value before being output from ESMF_LogMsgFoundError(), and the value of the function is .true.. + +

+The convention is to place ESMF_LogMsgFoundError() into a conditional statement that causes a return from the method, with the correctly set rc, when an error is found in localrc, e.g.: +

+if (ESMF_LogFoundError(localrc, <other args ...>, rc)) return
+
+Use of the ESMF_LogMsgFoundError() function is further described in the ESMF Reference Manual. + +

+Note that if no error is found, rc retains its ESMF_RC_NOT_IMPL status throughout the method. The developer must explicitly set the rc to ESMF_SUCCESS just before returning from any branch that is believed to be successful. + +

+The default rc value thus becomes ESMF_RC_NOT_IMPL for any code that is not explicitly marked as reaching success by the developer. Stub methods and incomplete branches can be handled very naturally this way - the developer simply does not set rc=ESMF_SUCCESS before returning. There are two differences in the treatment of pre-review and post-review methods: + +

    +
  1. Post-review methods have their rc initialized to the ESMF_RC_NOT_SET value. The rationale is that methods that are supposed to be implemented should not default to an error code that says that they are unimplemented. The difference in initialization also indicates a particular method's review status to someone browsing the source code. + +

    +

  2. +
  3. Any unimplemented or incomplete branch must have its rc value explicitly set by the developer to ESMF_RC_NOT_IMPL before returning. This is to ensure that the behavior of the method is communicated as accurately as possible to the user via its return codes. + +

    +

  4. +
+ +

+These conventions achieve the first three objectives above, namely producing appropriate error messages throughout a method's life cycle, with minimal developer effort. + +

+ +

+7.9.3 Error Masking +

+ +

+Under normal use - what a user will encounter by default - ESMF_RC_NOT_IMPL is treated as an error. However, through a special LogErr setting a developer who wishes to use stub methods and prototyping during code construction can equate ESMF_RC_NOT_IMPL with ESMF_SUCCESS. This achieves the fourth objective above, allowing for different user and developer modes of handling incomplete code. This is done by setting the errorMask argument in the ESMF_LogSet() call to ESMF_RC_NOT_IMPL, e.g.: + +

+

+call ESMF_LogSet(errorMask = /ESMF_RC_NOT_IMPL/)
+
+ +

+ +

+7.9.4 Example (pre-review method) +

+ +

+The following is an example of a pre-review method, sub(), that calls two subroutines internally, subsub1() and subsub2(). The subroutine sub() takes as input an integer argument that it can branch on and outputs a return code. Here branch==1 is fully implemented, branch==2 is incomplete, and other values of branch are not yet addressed. Several possible error scenarios are described following the code listing. + +

+

+subroutine sub(branch, rc)
+integer :: branch
+integer, optional :: rc
+integer :: localrc   ! local return code
+
+if (present(rc)) rc=ESMF_RC_NOT_IMPL
+! ...code...
+if (branch==1) then
+call subsub1(localrc)
+if (ESMF_LogFoundError(localrc, &
+  ESMF_ERR_PASSTHRU, &
+  ESMF_CONTEXT, rc=rc)) then
+  !   ... any necessary garbage collection ...
+  return ! Return point 1
+endif !   ...fully implemented code...
+if (present(rc)) rc=ESMF_SUCCESS
+elseif (branch==2) then call subsub2(localrc)
+if (ESMF_LogFoundError(localrc, &
+  ESMF_ERR_PASSTHRU, &
+  ESMF_CONTEXT, rc=rc)) then
+  !   ... any necessary garbage collection ...
+  return ! Return point 2
+endif
+!   ...incomplete code...
+end if
+
+end subroutine
+
+ +

+Note: This example is quite artificial, since simple branching like this would be better handled with a switch case statement that had a well-defined default. However, the control sequence shown better illustrates the sorts of errors that can occur in a real code with complex conditionals. + +

+Possible scenarios: + +

    +
  1. branch==1 and there is no error in subsub1(). In this case, rc retains the value of ESMF_RC_NOT_IMPL up to the point at which it is set to ESMF_SUCCESS, after which sub() ends. + +

    +

  2. +
  3. branch==1 and there is an error in subsub1(). The localrc returned by subsub1() will have the value of a specific error code, say ESMF_RC_DIV_ZERO. This will get passed into the evaluation ESMF_LogMsgFoundErr(), which will set rc to the localrc error value. Since the value of the evaluation expression is true, the method will return at Return point 1. It is important to perform any necessary garbage collection before returning to avoid memory leaks. + +

    +

  4. +
  5. branch==2 and there is no error in subsub2(). Here the value of rc is still ESMF_RC_NOT_IMPL when it is input into the ESMF_LogMsgFoundErr() call following subsub2(). Since the code in this branch is not complete and rc is never set to ESMF_SUCCESS, the rc value is still ESMF_RC_NOT_IMPL at the end of sub(). Note that to allow the default to work properly, rc should not be set to ESMF_SUCCESS right before the end of the method! + +

    +

  6. +
  7. branch==2 and there is an error in subsub2(). Much like scenario 2, the localrc returned by subsub2() will have the value of a specific error code. The localrc will get passed into ESMF_LogMsgFoundErr(), which will set rc to the localrc error value, and then cause a return at Return point 2. + +

    +

  8. +
  9. any value where branch $/=1$ and branch $/= 2$ (e.g. branch==0). Here there is a “hole” in the code, since the behavior of branch==0 is not yet addressed. However, with this approach the rc value remains ESMF_RC_NOT_IMPL when sub() ends, producing an appropriate error message for the user. + +

    +

  10. +
+

+7.9.5 Example (post-review method) +

+ +

+This example is modeled on the pre-review example, but illustrates error handling for a post-review method. Here branch==1 is fully implemented, branch==2 is known to be incomplete, and other values of branch are cases that the developer and reviewers have missed. This is not what one would wish to see in reviewed code - ideally all cases should be implemented - but we cannot count on this. This example shows how deficiencies can most effectively be handled. + +

+The return code rc is now initialized to ESMF_RC_NOT_SET. The developer has recognized that the branch==2 code is incomplete and rc is set explicitly to ESMF_RC_NOT_IMPL before returning. + +

+

+subroutine sub(branch, rc)
+integer :: branch
+integer, optional :: rc
+integer :: localrc   ! local return code
+
+if (present(rc)) rc=ESMF_RC_NOT_SET
+! ...code...
+if (branch==1) then
+call subsub1(localrc)
+if (ESMF_LogFoundError(localrc, &
+  ESMF_ERR_PASSTHRU, &
+  ESMF_CONTEXT, rc=rc)) then
+  !   ... any necessary garbage collection ...      return ! Return point 1
+endif
+!   ...fully implemented code...
+if (present(rc)) rc=ESMF_SUCCESS
+elseif (branch==2) then call subsub2(localrc)
+if (ESMF_LogFoundError(localrc, &
+  ESMF_ERR_PASSTHRU, &
+  ESMF_CONTEXT, rc=rc)) then
+  !   ... any necessary garbage collection ...
+  return ! Return point 2
+endif
+!   ...incomplete code...
+if (present(rc)) rc=ESMF_RC_NOT_IMPL       end if
+end subroutine
+{
+
+ +

+Possible scenarios: + +

+branch==1. Here the behavior is essentially the same as in scenarios 1 and 2. When there is an error in subsub1(), the returned rc from sub() has the error code subsub1() generated. When there is not an error in subsub1(), the returned rc from sub() is ESMF_SUCCESS. + +

+branch==2 and there is an error in subsub2(). The behavior here is analogous to scenario 3. The returned rc from sub() has the error code subsub2() generated. + +

+branch==2 and there is no error in subsub2(). The value of rc remains ESMF_RC_NOT_SET up to the point at which it is explicitly set to ESMF_RC_NOT_IMPL, and sub() ends. Method documentation is expected to explain the gap in functionality. + +

+any value where branch $/=1$ and branch $/= 2$ (e.g. branch==0). Here rc is not explicitly set to a value before the branch returns, and so sub() returns with the default rc value of ESMF_RC_NOT_SET. The user can tell from this error code that the developer did not consider this either unimplemented code or successful code, and that there is an unexpected “hole” in the method's functionality. + +

+ +

+ +

+7.9.6 Memory Allocation Checking +

+ +

+In Fortran code, the allocate and deallocate statements should +always have their success or failure checked by using stat= and checking +the value it returns. Since this value is defined by the Fortran +standard, and is not an ESMF return code, the alternative checking calls are +ESMF_LogFoundAllocError() and ESMF_LogFoundDeAllocError(). +To further distinguish the difference between a Fortran status return +and a ESMF return code, the local error variable should be named “memstat” +rather than “localrc”. + +

+

+  real, allocatable :: big_array(:,:)
+  integer :: memstat
+  ! ...
+  allocate (big_array(m,n), stat=memstat)
+  if (ESMF_LogFoundAllocError(memstat, &
+    ESMF_ERR_PASSTHRU, &
+    ESMF_CONTEXT, rc=rc)) then
+    ! ... any necessary clean up
+    return
+  end if
+  ! ... use big_array for a while
+  deallocate (big_array, stat=memstat)
+  if (ESMF_LogFoundDeAllocError(memstat, &
+    ESMF_ERR_PASSTHRU, &
+    ESMF_CONTEXT, rc=rc)) then
+    ! ... any necessary clean up
+    return
+  end if
+
+ +

+In C++ code, where the new operator is used, allocation errors can +be caught by wrapping the allocation code inside a try block to catch +any exceptions. Multiple allocations may be wrapped inside a single block +in order to reduce the amount of checking code. + +

+

+#include "ESMCI.h"
+//...
+void alloc_func (int m, int n, int *rc) {
+#undef  ESMC_METHOD
+#define ESMC_METHOD alloc_func
+  double *array1, *array2;
+  try {
+    array1 = new double[m];
+    array2 = new double[n];
+  }
+  catch (std::bad_alloc) {
+    // ... any necessary clean up
+    ESMC_LogDefault.MsgAllocError("allocating array1 and array2",
+        ESMC_CONTEXT, rc);
+    return;
+  }
+  // ... use array1 and array2 for a while
+  delete array2;
+  delete array1;
+}
+
+ +

+In code which uses malloc() and free(), +the return value from malloc() may be tested against +NULL to determine if an error occurred. No checking is +possible with free(). In new code, the C++ new +operator and associated checking should be used. + +

+ +

+ +

+7.10 Initialization Standardization Instructions +

+ +

+ +

+7.10.1 Overview +

+ +

+Currently not all Fortran compilers support the +automatic initialization of class components. However, +in the ESMF system this initialization is used for two +tasks. The first is the initialization of shallow class +components which need to be set before they're used +(e.g. flags). The second is the detection of invalid +(e.g. not yet created) deep class variables. In order +to handle these tasks in the absence of compiler +initialization a software based solution has been +developed. + +

+The software solution is based on the improbability of +an uninitialized variable containing a specific value. For +example, given a 64 bit integer variable x, the +probability of x containing the value 10 are approximately +1 in $10^{19}$. This of course assumes that the value in +an uninitialized variable is a uniformly distributed random +variable, which is not necessarily true. However, the small probability +of a given value occurring is not an unreasonable assumption +given that the value is not pathological +(e.g. 0 or binary 111111..). The probability can +also be made as small as is necessary +by using larger precision types. + +

+Given the improbability of a specific value occurring in an +uninitialized variable, the task of initializing a shallow +class is implemented as follows. First, a non-pathological +value, ESMF_INIT_DEFINED, is chosen. Next, an integer +component, isInit, is added to the shallow class. +Finally, for every routine taking the shallow +class as an input variable, the component isInit is checked +against ESMF_INIT_DEFINED. If they don't match, then the variable +containing isInit is initialized, including setting isInit to +ESMF_INIT_DEFINED. If they do match, then with extremely high probability +the variable has already been initialized and nothing +need be done. This algorithm helps to ensure that the shallow +class is initialized before being used in the system. + +

+The task of detecting an invalid deep class is +implemented as follows. As before, we chose a value +ESMF_INIT_CREATED, and add the isInit component to the class +definition. Next, inside the constructors for +the class isInit is set to ESMF_INIT_CREATED, and +inside the destructors for the class isInit +is set to something other than ESMF_INIT_CREATED. +Finally, for every routine taking the deep class +as an input variable, the component isInit is +checked against ESMF_INIT_CREATED. If they match, then +nothing happens because with extremely high +probability the variable has been though the +constructor and thus is valid. If they don't match, +then the variable is invalid and an error occurs. +This allows invalid deep class variables to be detected +before being used in the system. + +

+In order to make the process of adding these non-compiler +based initialization tasks easier, a set of macros has been defined. +The following is a description of the procedures to use them. + +

+ +

+7.10.2 Instructions +

+ +

+These changes should be added to all new F90 code in both the source +(/src) and interface (/interface) subdirectories of the classes. + +

+When adding code as a part of this task remember to use +the standard ESMF coding conventions. In particular, when adding +new routines remember to use the standard +ESMF protex style (BOP/EOP) subroutine description, like those that +appear in every other ESMF subroutine. For Validate use +the BOP/EOP tags for ESMF_TYPEGetInit and ESMF_TYPEInit +use the internal BOPI/EOPI tags. + +

+Some F90 source files are autogenerated. In this case, modify +the macro file which is used to create the autogenerated file. +The macro file is usually named something like ESMF_TypeMacos.h. +When modifying a macro file remember to end each line +with: @ To recognize when an F90 file is autogenerated +they usually have the line: <Created by maco - do not edit directly> +close to the beginning. There will also usually be a .cpp +file with the same name as the .F90 file. + +

+For the purposes of initialization standardization the +classes in the system have been divided into three types: shallow, deep, +and parameter. Shallow classes have little if any allocation and +can often be used right after declaration. An example of a shallow +class is ESMF_ArraySpec. Deep classes on the other hand have a lot of +allocated data and need to be constructed before being used. An example of +a deep class is ESMF_State. Parameter classes are +those which are used to add type checking to a set of parameter values. +This type of class is typically just a single integer wrapped in a Fortran type. +An example of a parameter class is ESMF_GridType. Both shallow and +deep classes are effected by the standardization, but parameter classes +are left unchanged. See section [*] for a list of +ESMF classes and their classification. + +

+The instructions for the standardization have been broken +up by what to do for each module, what to do for each type of class, +and what to do for routines. + +

+ +

+7.10.3 Module +

+ +

+When adding a new F90 module do the following: + +

+ +

    +
  1. If the following line is not present in the use statement list, then add +it (except in ESMF_LogErr.F90 and ESMF_UtilTypes.F90): +
    +    use ESMF_InitMacrosMod
    +
    + +

    +

  2. +
  3. If the following line is not present in the include statement list, then add it (except in ESMF_LogErr.F90): +
    +    #include "ESMF.h"
    +
    +
  4. +
+ +

+ +

+7.10.4 Shallow Class +

+ +

+When adding a new shallow class definition perform the following steps: + +

+ +

    +
  1. If the line: +
    +    use ESMF_UtilTypesMod
    +
    + isn't in the list of used modules, then add it. + +

    +

  2. +
  3. Add the line ESMF_INIT_DECLARE to the type definition. +
  4. +
  5. Be sure the #ifndef ESMF_NO_INITIALIZERS construct is + used around any initialization of type components. + The declarations inside the #else to #endif half of the construct + should be identical to the #ifndef half except without initialization. +
  6. +
  7. Create an initialization subroutine for the class. + Given that the name of the class is ESMF_STYPE, + the name of the subroutine should be ESMF_STYPEInit(). + This subroutine should take a single parameter of class + ESMF_STYPE and set all the variables that are + initialized in the #ifndef ESMF_NO_INITIALIZERS branch + of 3. Note, for pointers that are set using ptr->Null() + in the type initialization, use nullify(t%ptr) in the + ESMF_STYPEInit subroutine instead. +
  8. +
  9. Add the line ESMF_INIT_SET_DEFINED(S1) to the body of + the new subroutine ESMF_STYPEInit() described in 4. + S1 is the variable being initialized in ESMF_STYPEInit(). +
  10. +
  11. Create an access subroutine for the new init component. + The name of the subroutine should be ESMF_STYPEGetInit. + It should have the following form: + +

    +

    +    function ESMF_STYPEGetInit(s)
    +       type(ESMF_STYPE), intent(in), optional :: s
    +       ESMF_INIT_TYPE :: ESMF_STYPEGetInit
    +
    +      if (present(s)) then
    +          ESMF_STYPEGetInit=ESMF_INIT_GET(s)
    +      else
    +          ESMF_STYPEGetInit=ESMF_INIT_DEFINED
    +      endif
    +
    +    end function ESMF_STYPEGetInit
    +
    + +

    +

  12. +
  13. Create an ESMF_STYPEValidate subroutine with the following form: + +

    +

    +    ! Comments describing validate (see ESMF_StateValidate for an example)
    +    subroutine ESMF_STYPEValidate(s,rc)
    +       type(ESMF_STYPE), intent(inout) :: s
    +       integer, intent(out),optional :: rc
    +
    +       ! check initialization status
    +       ESMF_INIT_CHECK_SET_SHALLOW(ESMF_STYPEGetInit,ESMF_STYPEInit,s)
    +       
    +       ! return success
    +       if (present(rc)) then
    +          rc=ESMF_SUCCESS
    +       endif
    +
    +    end subroutine ESMF_STYPEValidate
    +
    + +

    +

  14. +
  15. If the shallow class in question is public, then + add the lines: +
    +       public ESMF_STYPEInit
    +       public ESMF_STYPEGetInit
    +       public ESMF_STYPEValidate
    +
    + to the PUBLIC MEMBER FUNCTION section. + +

    +

  16. +
  17. Add the new class to the list in section [*]. + +

    +

  18. +
+ +

+Here is an example illustrating the whole procedure: +
+

+Starting with this shallow class definition: + +

+

+   module ESMF_ExampleMod
+
+       type ESMF_Shallow
+           private
+            ... other components ...
+#ifndef ESMF_NO_INITIALIZERS
+            integer :: num=0
+            integer, pointer :: list(:) => Null()
+#else
+            integer :: num
+            integer, pointer :: list(:)
+#endif
+       end type
+
+! !PUBLIC TYPES:
+      public ESMF_Shallow 
+     
+! !PUBLIC MEMBER FUNCTIONS:
+
+       contains
+
+       ... other routines ...
+
+   end module ESMF_ExampleMod
+
+ +

+The standardization procedure yields this: +
(modified lines marked with *) + +

+

+   module ESMF_ExampleMod
+*       use ESMF_UtilTypesMod 
+*       use ESMF_InitMacrosMod 
+
+       type ESMF_Shallow
+            private
+            ... other components ...
+#ifndef ESMF_NO_INITIALIZERS
+            integer :: num=0
+            integer, pointer :: list(:) => Null()
+#else
+            integer :: num
+            integer, pointer :: list(:)
+#endif
+*            ESMF_INIT_DECLARE
+       end type
+
+! !PUBLIC TYPES:
+      public ESMF_Shallow 
+
+! !PUBLIC MEMBER FUNCTIONS:
+*      public ESMF_ShallowInit
+*      public ESMF_ShallowValidate
+*      public ESMF_ShallowGetInit
+
+       contains
+
+*    function ESMF_ShallowGetInit(s)
+*       type(ESMF_Shallow), intent(in), optional :: s
+*       ESMF_INIT_TYPE :: ESMF_ShallowGetInit
+*
+*      if (present(s)) then
+*          ESMF_ShallowGetInit=ESMF_INIT_GET(s)
+*      else
+*          ESMF_ShallowGetInit=ESMF_INIT_DEFINED
+*      endif
+*
+*    end function ESMF_ShallowGetInit
+*
+*    subroutine ESMF_ShallowInit(s)
+*       type(ESMF_Shallow) :: s
+*    
+*        s%num=0 
+*        nullify(s%list)
+*
+*        ESMF_INIT_SET_DEFINED(s) 
+*    end subroutine ESMF_ShallowInit
+*
+*    subroutine ESMF_ShallowValidate(s,rc)
+*       type(ESMF_Shallow), intent(inout) :: s
+*       integer, intent(out),optional :: rc
+*
+*       ! check initialization status
+*       ESMF_INIT_CHECK_SET_SHALLOW(ESMF_ShallowGetInit,ESMF_ShallowInit,s)
+*       
+*       ! return success
+*       if (present(rc)) then
+*          rc=ESMF_SUCCESS
+*       endif
+*
+*    end subroutine ESMF_ShallowValidate
+
+       ... other routines ...
+
+   end module ESMF_Shallow
+
+ +

+ +

+7.10.5 Deep Class +

+ +

+When adding a new deep class definition perform the following steps: + +

+ +

    +
  1. If the line: +
    +      use ESMF_UtilTypesMod
    +
    + isn't in the list of used modules, then add it. +
  2. +
  3. Add the line ESMF_INIT_DECLARE to the type definition. +
  4. +
  5. Add the line ESMF_INIT_SET_CREATED(D1) to the + TypeCreate() function. D1 is the deep class variable + being created. +
  6. +
  7. Add the line ESMF_INIT_SET_DELETED(D1) to the + TypeDestroy() subroutine. D1 is the deep class + variable being destroyed. +
  8. +
  9. Create an access subroutine for the new init component. + The name of the subroutine should be ESMF_DTYPEGetInit. + It should have the following form: +
    +    function ESMF_DTYPEGetInit(d)
    +       type(ESMF_DTYPE), intent(in),optional :: d
    +       ESMF_INIT_TYPE :: ESMF_DTYPEGetInit
    +
    +      if (present(d)) then
    +          ESMF_DTYPEGetInit=ESMF_INIT_GET(d)
    +      else
    +          ESMF_DTYPEGetInit=ESMF_INIT_CREATED
    +      endif
    +
    +    end function ESMF_DTYPEGetInit
    +
    + +

    +

  10. +
  11. Given that the deep class is ESMF_DTYPE create a validate subroutine + with the following form: +
    +    ! Comments describing validate (see ESMF_StateValidate for an example)
    +    subroutine ESMF_DTYPEValidate(d1,rc)
    +       type(ESMF_DTYPE), intent(in) :: d1
    +       integer, intent(out),optional :: rc
    +
    +       ! Check Init Status
    +       ESMF_INIT_CHECK_DEEP(ESMF_DTYPEGetInit,d1,rc)
    +
    +       ! Add other checks here
    +
    +       ! If all checks passed return success
    +       if (present(rc)) then
    +           rc=ESMF_SUCCESS
    +       endif
    +
    +    end subroutine ESMF_DTYPEValidate
    +
    + +

    +

  12. +
  13. If the deep class in question is public, then + add the lines: +
    +       public ESMF_DTYPEGetInit
    +       public ESMF_DTYPEValidate
    +
    + to the PUBLIC MEMBER FUNCTION section. + +

    +

  14. +
  15. Some deep classes are private and occasionally it +will become necessary to access their internal components +to set the initialization flag or get the this pointer +in code which doesn't have access. The standard way +to do this in ESMF is to write a public subroutine in the +class module where the subroutine can have access to +the classes' internal components. + +

    +The following are the standard names for the subroutines +which set a class as created, set a class as deleted, and set the this +pointer, and get the this pointer: +

    +ESMF_DTYPESetInitCreated
    +ESMF_DTYPESetInitDeleted
    +ESMF_DTYPESetThis
    +ESMF_DTYPEGetThis
    +
    + +

    +

  16. +
  17. Add the new class to the list in section [*]. + +

    +

  18. +
+ +

+Here is an example illustrating the whole procedure: +
+

+Starting with this deep type definition: + +

+

+   module ESMF_ExampleMod
+
+       type ESMF_Deep
+            private
+            ... other components ...
+       end type
+
+! !PUBLIC TYPES:
+      public ESMF_Deep
+
+! !PUBLIC MEMBER FUNCTIONS:
+
+       contains
+
+        function ESMF_DeepCreate()
+              type(ESMF_Deep) :: ESMF_DeepCreate
+
+              ... other create code ...
+
+        end function ESMF_DeepCreate
+
+        subroutine ESMF_DeepDestroy(d)
+              type(ESMF_Deep) :: d
+
+              ... other create code ...
+
+        end subroutine ESMF_DeepDestroy
+
+        ... other routines ...
+
+   end module ESMF_ExampleMod
+
+ +

+The standardization procedure yields this: +
(modified lines marked with *) + +

+

+   module ESMF_ExampleMod
+*       use ESMF_UtilTypesMod 
+*       use ESMF_InitMacrosMod       
+
+       type ESMF_Deep
+           private
+           ... other components ...
+*           ESMF_INIT_DECLARE
+       end type
+
+! !PUBLIC TYPES:
+      public ESMF_Deep
+
+! !PUBLIC MEMBER FUNCTIONS:
+*      public ESMF_DeepValidate     
+*      public ESMF_DeepGetInit     
+
+       contains
+
+*    function ESMF_DeepGetInit(d)
+*       type(ESMF_Deep), intent(in),optional :: d
+*       ESMF_INIT_TYPE :: ESMF_DeepGetInit
+*
+*       if (present(d)) then
+*          ESMF_DeepGetInit=ESMF_INIT_GET(d)
+*      else
+*          ESMF_DeepGetInit=ESMF_INIT_CREATED
+*      endif
+*
+*    end function ESMF_DeepGetInit
+*
+*       subroutine ESMF_DeepValidate(d,rc)
+*          type(ESMF_Deep), intent(in) :: d
+*          integer, intent(out),optional :: rc
+*
+*          ! Check Init Status
+*          ESMF_INIT_CHECK_DEEP(ESMF_DeepGetInit,d,rc)
+*
+*         ! Add other checks here
+*
+*         ! If all checks passed return success
+*         if (present(rc)) then
+*            rc=ESMF_SUCCESS
+*         endif
+*
+*        end subroutine ESMF_DeepValidate
+
+        function ESMF_DeepCreate()
+              type(ESMF_Deep) :: ESMF_DeepCreate
+
+              ... other create code ...
+
+*              ESMF_INIT_SET_CREATED(ESMF_DeepCreate)
+
+        end function ESMF_DeepCreate
+
+        subroutine ESMF_DeepDestroy(d)
+              type(ESMF_Deep) :: d
+
+              ... other create code ...
+
+*              ESMF_INIT_SET_DELETED(d)
+
+        end subroutine ESMF_DeepDestroy
+
+        ... other routines ...
+
+   end module ESMF_ExampleMod
+
+ +

+ +

+7.10.6 Parameter Class +

+ +

+When adding a new parameter class definition, don't add any initialization +standardization code. However, do add the new class to the class list in +section [*]. + +

+ +

+7.10.7 Subroutine +

+ +

+When adding a new subroutine or function (both referred +to as 'routine' henceforth) perform the following steps: + +

+ +

    +
  1. At the beginning of the routine, for each shallow + class parameter S1 of type ESMF_STYPE. Add the line + ESMF_INIT_CHECK_SHALLOW(ESMF_STYPEGetInit, ESMF_STYPEInit, S1). + In addition, if the intent of S1 is intent(in), switch it to + intent(inout) to allow it to be modified. + +

    +

  2. +
  3. At the beginning of each routine, for each deep + class *input* parameter D1 of type ESMF_DTYPE, add the line + ESMF_INIT_CHECK_DEEP(ESMF_DTYPEGetInit, D1, rc). + Here rc is the return code variable + for the routine. +
  4. +
+ +

+The initialization macros in 1. and 2. should be +added before any code which uses the types being checked. + +

+When adding the check macros to code there are a couple of issues +to keep in mind for compatibility with all compilers. First, +don't break up the macro across lines (e.g. using &). +Second, some compilers have a maximum line length. Occasionally, +the Deep class check macro will expand to larger than this +length, if you find that this is occurring with a particular +line use the ESMF_INIT_CHECK_DEEP_SHORT macro instead. +It takes exactly the same parameter list as the normal deep class +check macro, but expands to a much shorter line. + +

+Here is an example illustrating this procedure: +
+

+Starting with this routine: + +

+

+   subroutine ESMF_EXAMPLE(s1,d1,s2,d2,d3,rc)
+         type(ESMF_Shallow1), intent(in) :: s1
+         type(ESMF_Shallow2), intent(out) :: s2
+         type(ESMF_Deep1),intent(in) :: d1
+         type(ESMF_Deep2),intent(inout) :: d2
+         type(ESMF_Deep3),intent(out) :: d3
+         integer :: rc
+         .... local variable declarations ...
+
+         ! initialize return code
+         rc=ESMF_FAILURE
+
+          ...... rest of subroutine code....
+
+  end subroutine ESMF_Example
+
+ +

+The standardization yields this: +
(modified lines marked with *) + +

+

+   subroutine ESMF_EXAMPLE(s1,d1,s2,d2,d3,rc)
+*         type(ESMF_Shallow1), intent(inout) :: s1
+         type(ESMF_Shallow2) :: s2
+         type(ESMF_Deep1) :: d1
+         type(ESMF_Deep2),intent(inout) :: d2
+         type(ESMF_Deep3),intent(out) :: d3
+         integer :: rc
+         .... other local variable declarations ...
+
+         ! initialize return code
+         rc=ESMF_FAILURE
+
+*         ! check variables
+*         ESMF_INIT_CHECK_DEEP(ESMF_Deep1GetInit,d1,rc)
+*         ESMF_INIT_CHECK_DEEP(ESMF_Deep2GetInit,d2,rc)
+*
+*         ESMF_INIT_CHECK_SET_SHALLOW(ESMF_Shallow1GetInit,ESMF_Shallow1Init,s1)
+*         ESMF_INIT_CHECK_SET_SHALLOW(ESMF_Shallow2GetInit,ESMF_Shallow2Init,s2)
+
+          ...... rest of subroutine code....
+
+  end subroutine ESMF_Example
+
+ +

+ +

+
+7.10.8 ESMF Class Types +

+ +

+CAUTION: The following lists are very much outdated!!! + +

+

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ClassTypeFortranESMF
ESMF_AlarmDeeppublicpublic
ESMF_AlarmList_FlagParameterpublicpublic
ESMF_ArrayDeep  
ESMF_ArrayBundleDeep  
ESMF_ArraySpecShallow  
ESMF_AttributeShallow  
ESMF_BaseDeep  
ESMF_BaseTimeShallow  
ESMF_CWrapDeep  
ESMF_CalendarDeep  
ESMF_CalKind_FlagParameter  
ESMF_ClockDeep  
ESMF_CommHandleDeep  
ESMF_CommTableDeep  
ESMF_CompClassDeep  
ESMF_CompType_FlagParameter  
ESMF_ConfigDeep  
ESMF_ConfigAttrUsedShallow  
ESMF_Context_FlagParameter  
ESMF_CoordOrderParameter  
ESMF_CplCompDeep  
ESMF_DELayoutDeep  
ESMF_DataHolderShallow  
ESMF_DataValueIgnore  
ESMF_Decomp_FlagParameter  
ESMF_Direction_FlagParameter  
ESMF_DistGridDeep  
ESMF_FieldDeep  
ESMF_FieldBundleDeep  
ESMF_FieldBundleDataMapShallow  
ESMF_FieldBundleTypeDeep  
ESMF_FieldDataMapShallow  
ESMF_FieldTypeDeep  
ESMF_FractionShallow  
ESMF_GridDeep  
ESMF_GridCompDeep  
ESMF_GridStatus_FlagParameter  
ESMF_Index_FlagParameter  
ESMF_InterfaceIntIgnore  
+
+
+ +

+

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ClassTypeFortranESMF
ESMF_LOGENTRYShallow  
ESMF_LocalArrayDeep  
ESMF_LogShallow  
ESMF_LogKind_FlagParameter  
ESMF_LogicalIgnore  
ESMF_MaskShallow  
ESMF_LogMsg_FlagParameter  
ESMF_NeededFlagParameter  
ESMF_ObjectIDShallow  
ESMF_Pin_FlagParameter  
ESMF_PhysGridDeep  
ESMF_PointerIgnore  
ESMF_ReadyFlagParameter  
ESMF_Reduce_FlagParameter  
ESMF_Region_FlagParameter  
ESMF_RegridMethod_FlagParameter  
ESMF_RelLocParameter  
ESMF_ReqForRestartFlagParameter  
ESMF_RouteDeep  
ESMF_RouteHandleDeep  
ESMF_StaggerLocShallow  
ESMF_StateDeep  
ESMF_StateClassDeep  
ESMF_StateItemShallow  
ESMF_StateItem_FlagParameter  
ESMF_StateIntent_FlagParameter  
ESMF_StatusParameter  
ESMF_Sync_FlagParameter  
ESMF_End_FlagParameter  
ESMF_TimeShallow  
ESMF_TimeIntervalShallow  
ESMF_VMDeep  
ESMF_VMIdDeep  
ESMF_VMPlanDeep  
ESMF_ValidFlagParameter  
+
+
+ +

+ +

+ +

+ +

+7.11 Code: Data Type Consistency Guidelines +

+ +

+The following tools and guidelines are in place in order to maintain the ESMF framework's portability and robustness, in light of the fact that neither the Fortran nor C++ standards require a fixed size for any given data type and/or kind. Please note that these guidelines pertain to the internal ESMF code, not to the user code that interfaces to it. + +

+ +

+7.11.1 Use ESMF names for data types in C and ESMF data kinds in Fortran +

+ +

+ +

+7.11.2 Fortran +

+ +

+Any occurrence of Fortran data kind parameters within ESMF code must be specified with ESMF parameters only. e.g. +

+       ESMF_KIND_I4
+       ESMF_KIND_I8
+       ESMF_KIND_R4
+       ESMF_KIND_R8
+
+These are internally defined such that the size of the data they describe is the number at the end of the parameter. e.g. in + +

+

+       integer(ESMF_KIND_I8) :: someInteger
+
+someInteger is an 8 byte integer in any platform. + +

+Kind of literal constants: + +

+Only the ESMF kind parameters listed above are allowed when specifying the kind of literal Fortran constants. e.g. + +

+

+     real(ESMF_KIND_R8) :: a,b
+     a=b*0.1_ESMF_KIND_R8
+
+ +

+In the example above 0.1_ESMF_KIND_R8 is a literal constant of kind ESMF_KIND_R8 and value 0.1. + +

+This means that any other syntax, such as: +

+           a=b*0.1d0
+           a=b*0.1_8
+
+is NOT to be used. + +

+ESMF_KIND_I, ESMF_KIND_R: Note that the ESMF_TypeKind_Flag parameters: ESMF_KIND_I and ESMF_KIND_R are defined for use in user code only. They are handles offered to the user for ESMF internal default kinds and not to be used internally in the ESMF framework. + +

+Real Data: + +

    +
  1. All real data in Fortran should be declared with an explicit ESMF defined kind parameter in the form: +
    +              real(ESMF_KIND_R<n>) :: RealVariable
    +
    + +

    +where $<n>$ is the size in bytes of the memory occupied by each real datum. Allowed values of n are those that correspond to supported type/kind data, e.g. +

    +              real (ESMF_KIND_R8) :: a,b
    +
    + declares a and b to be 8 byte reals + +

    +

  2. +
  3. Routines should be overloaded for all supported kinds(sizes) of real user data (e.g. in Array class routines). + +

    +

  4. +
  5. Real parameter arguments, such as the arguments to grid or regrid routines need not be cause for overloading. They should be declared with the kind required for appropriate accuracy and uniform behavior across platforms. Documentation should identify when specific data types and kinds are required in calling such routines. +
  6. +
+ +

+Integer Data: + +

+The standards for integer data differ between integers that store user data and integers that do not. + +

+Routines with user integer data arguments (e.g. integer arrays), must be overloaded for all integer data kinds supported. These will be declared as +

+                         integer(ESMF_KIND_I<n>)
+
+where $<n>$ denotes data size in byte units. + +

+Integers that do not represent user data must generally be declared without a specific kind (see the section below on Default Type Representation). Possible exceptions to this rule follow on items (3) and (4) below. + +

+Care should be exercised to insure that integer arguments to intrinsic Fortran functions are of the correct kind (usually default). Likewise, argument parameters to VM routines should be of default kind. + +

+In the case where a specific kind is required for integer ESMF routine arguments, such as occurs in TimeMgr routines, the requirement must be clearly documented (as noted above, ESMF kind parameters are to be used to specify the kind). + +

+Default Type Representation: + +

+Default Integer Data Internal to the ESMF: + +

+Internally in the ESMF framework, all integer data intended to be of default kind must be declared without specifying their kind, e.g. +

+               subroutine ESMF_SomeRoutine(foo)
+               integer :: foo
+
+This is for clarity purposes, as well as to minimize the overall size of the framework. + +

+ESMF_KIND_I must not be used to declare data internally within ESMF. + +

+To provide some background, the handle ESMF_KIND_I is provided to aid users who want to insure that their integer user code matches the kind of ESMF internal default integer data. It is particularly useful when user code is compiled with integer autopromotion. User code that calls ESMF routines with internal default integer arguments could declare those integers to be of kind=ESMF_KIND_I, e.g. +

+                 program myUserCode
+                 integer(ESMF_KIND_I) :: my_foo
+                 call ESMF_SomeRoutine(my_foo)
+
+ +

+Logical Data: + +

+The standards for logical data differ between logicals which are used as dummy arguments in user-callable entry points, and those which need to be passed +to ESMF C++ routines. + +

+Routines with user logical data arguments use default kind arguments: +

+                 logical :: isActive
+
+ +

+Local logicals within Fortran code also generally use the default Fortran logical data type. + +

+ESMF defines a ESMF_Logical derived type for use when passing logical values between Fortran and C++ code. The constants ESMF_TRUE and +ESMF_FALSE are available, and must be used to ensure compatibility with the C++ code. + +

+For convenience, defined assignment operators are available which convert between Fortran logical and the ESMF_Logical derived type. +Finally, there are .eq. and .ne. operators defined to compare ESMF_Logical values. + +

+

+               subroutine ESMF_SomeRoutine(myFlag)
+                 use ESMF
+                 implicit none
+		 
+                 logical, intent(inout) :: myFlag
+	       
+                 type(ESMF_Logical) :: myFlag_local
+
+                 myFlag_local = myFlag                  ! Defined assignment
+                 if (myFlag_local .eq. ESMF_TRUE) then  ! Use of .eq. operator
+                   call c_ESMC_SomeCRoutine (myFlag_local)  ! Pass to C++
+                 else
+                   call c_ESMC_OtherCRtoutine (myFlag_local)
+                 end if
+                 myFlag = myFlag_local                  ! Defined assignment
+               end subroutine
+
+ +

+ +

+7.11.3 C and C++ +

+ +

+ESMF C datatypes are also declared with the property that their size remains constant across platforms. This convention is set in order to make ESMF more robust in terms of portability, as well as for the correct matching of Fortran-C routine interfaces. They have a direct size correspondence to their Fortran counterparts. Their names are: + +

+

   
+          ESMC_I4 (=) integer type of size 4 bytes
+          ESMC_I8 (=) integer type of size 8 bytes
+          ESMC_R4 (=) floating point type of size 4 bytes
+          ESMC_R8 (=) floating point type of size 8 bytes
+
+ +

+e.g. +

+          ESMC_R4 someFloat;
+
+here someFloat is a 4 byte floating point in any platform. + +

+Real Data: + +

    +
  1. All real data in C should be declared with an explicit ESMF type in the form: +
    +              ESMC_R<n>  RealVariable;
    +
    + where $<n>$ is the size in bytes of the memory occupied by each real datum. (Allowed values of n are those that correspond to supported type/kind data). e.g. +
    +              ESMC_R8  a,b;
    +
    + which declares a and b to be 8 byte reals. + +

    +

  2. +
  3. Methods containing user data - such as arrays - as arguments must handle all supported real user data types and sizes. +
  4. +
+ +

+Integer Data: + +

    +
  1. All integers that do not represent user data must be declared using the C datatype int. + +

    +

  2. +
  3. Methods containing user data - such as arrays - as arguments must handle all supported integer user data types and sizes. +
  4. +
+ +

+Boolean Data: + +

    +
  1. Boolean values used internally within the C++ routines may use the bool data type. + +

    +

  2. +
  3. Methods which are Fortran-callable, and pass boolean values through the dummy argument list, must use the +ESMC_Logical enumerated type. The constants ESMF_TRUE and ESMF_FALSE are available +for comparison purposes. These constants must be used to ensure compatibility with the Fortran code. +
  4. +
+ +

+

+               void fortran_caller(bool &myFlag) {	       
+                 ESMF_Logical myFlag_local;
+
+                 myFlag_local = myFlag;
+                 if (myFlag_local == ESMF_TRUE)
+                   ESMF_SomeFortranRoutine (&myFlag_local);  // Pass to Fortran
+                 else
+                   ESMF_OtherFortranRtoutine (&myFlag_local);
+
+                 myFlag = myFlag_local;
+               }
+
+ +

+ +

+7.11.4 ESMF_TypeKind_Flag “labels”: When knowing the data type/kind is necessary +

+ +

+An enumerated parameter in C++ and a corresponding sequence parameter in Fortran are provided in order to identify the type-and-kind of data being processed in various ESMF routines. There is a one to one correspondence between the Fortran sequence and the C++ enumerated type. They are mostly used as a tool to customize code for a specific data type and kind, and to insure the correct handling of user data across Fortran-C interfaces. + +

+In Fortran this sequenced type's name is ESMF_TypeKind_Flag. + +

+The ESMF_TypeKind_Flag parameter names declared are: + +

+

+               ESMF_TYPEKIND_I4   (4 byte integer)
+               ESMF_TYPEKIND_I8   (8 byte integer)
+               ESMF_TYPEKIND_R4   (4 byte floating point)
+               ESMF_TYPEKIND_R8   (8 byte floating point)
+
+ +

+The following are supported for user interface use only (they are not to be used internally in the ESMF framework): +

+               ESMF_TYPEKIND_I    (labels integer_not_autopromoted data)
+               ESMF_TYPEKIND_R    (labels real_not_autopromoted data)
+
+ +

+Fortran ESMF_TypeKind_Flag parameters mostly appear in calls to C routines that create or manipulate arrays, fields, or bundles. e.g. +

+         ....
+         ESMF_TypeKind_Flag :: tk
+         ...
+          !-set tk
+         ...
+         call FTN_X(c_ESMC_VMAllFullReduce( ..., tk, ...  )
+         ...
+         ...
+
+Likewise in C the enumerated type's name is ESMC_TypeKind_Flag. + +

+The ESMC_TypeKind_Flag parameter names declared are: +

+               ESMC_TYPEKIND_I4   (4 byte integer)
+               ESMC_TYPEKIND_I8   (8 byte integer)
+               ESMC_TYPEKIND_R4   (4 byte floating point)
+               ESMC_TYPEKIND_R8   (8 byte floating point)
+
+ +

+In C, ESMC_TypeKind_Flag parameters are used to tailor computation to the type and kind of user data arguments being processed. e.g +

+  void FTN_X(c_esmc_vmallfullreduce)(.., ESMC_TypeKind_Flag *dtk, ..,int *rc){
+    .....      
+    switch (*dtk){
+    case ESMC_TYPEKIND_I4:
+      ....
+      break;
+    case ESMC_TYPEKIND_R4:
+      ....
+      break;
+    case ESMC_TYPEKIND_R8:
+      ...         
+      break;
+    default:
+      ....
+    }
+    ...
+
+ +

+ +

+7.11.5 Guidelines for Fortran-C Interfaces +

+ +

+There must be a one to one correspondence of Fortran and C arguments as illustrated in the table below. So for example, if a Fortran routine calls a C method that expects an argument of type ESMC_I4, the argument in the Fortran call should be declared to be an integer of kind=ESMF_KIND_I4. +

+     integer(ESMF_KIND_I4)  <-->  ESMC_I4  [4 bytes]
+     integer(ESMF_KIND_I8)  <-->  ESMC_I8  [8 bytes]
+     real(ESMF_KIND_R4)     <-->  ESMC_R4  [4 bytes]
+     real(ESMF_KIND_R8)     <-->  ESMC_R8  [8 bytes]
+     integer                <-->  int
+     type(ESMF_Logical)     <-->  ESMC_Logical
+     etc.
+
+Also, ESMF_TypeKind_Flag and ESMC_TypeKind_Flag values are set to have matching values. That is: +
+             ESMF_TYPEKIND_I<n> = ESMC_TYPEKIND_I<n>
+             ESMF_TYPEKIND_R<n> = ESMC_TYPEKIND_R<n>
+
+ +

+Character strings: + +

+When passing character strings to subprograms, most Fortran compilers pass +'hidden' string length arguments by value after all of the user-supplied arguments. +Each hidden argument corresponds to each character string that is passed. +Because of varying compiler support of 32-bit vs 64-bit string lengths, +the ESMCI_FortranStrLenArg macro is used in C++ code to specify the +data type of the hidden arguments. + +

+For input arguments is usually convenient to copy the Fortran string into a +C++ string. The ESMC_F90lentrim procedure provides a common way +to obtain the length of the Fortran string - while ignoring trailing blanks. +It is analogous to the Fortran len_trim intrinsic function. + +

+

+  void FTN_X(c_esmc_somecode) (
+      const char *name1,   // in - some name in a character string
+      const char *name2,   // in - some other name
+      int *rc,             // out - return code
+      ESMCI_FortranStrLenArg name1_l,   // in - hidden length of name1
+      ESMCI_FortranStrLenArg name2_l) { // in - hidden length of name2
+
+      string name1_local = string (name1, ESMC_F90lentrim (name1, name1_l));
+      string name2_local = string (name2, ESMC_F90lentrim (name2, name2_l));
+      ...
+  }
+
+ +

+Likewise, when C++ code needs to pass a character string to Fortran code, +passing the string itself is performed by it address. The hidden length +argument uses the standard string length method: + +

+

+      FTN_X(f_esmf_somef90code) (
+          name1_local.c_str(),
+          name2_local.c_str(),
+          &localrc,
+          (ESMCI_FortranStrLenArg) name1_local.length(),
+          (ESMCI_FortranStrLenArg) name2_local.length())
+
+ +

+Note that when an array of characters is passed, the hidden string size is +that of an individual array element. The size of each dimension of the array +should be explicitly passed through separate arguments. Thus, in the following +declaration, the hidden argument would have a value of 32. The dimensions, 20 +and 30, would need to be separately passed: + +

+

+    character(32) :: char_array(20,30)
+    :
+    call c_esmc_something (  &
+        char_array, size (char_array,1), size (char_array, 2), &
+        localrc)
+
+ +

+ +

+ +

+7.12 Code: Optional Argument Conventions for the C/C++ API +

+ +

+ +

+7.12.1 Overview +

+ +

+Optional arguments in the public ESMC interface are implemented using the +variable-length argument list functionality provided by <stdarg.h>. +The <stdarg.h> header contains a set of macros which allows portable +functions that accept variable-length argument lists (also known as variadic +functions) to be written. Variadic functions are declared with an ellipsis in +place of the last parameter and must have at least one named (fixed) parameter. +A typical example of such a function is printf which is declared as + +

+

+        int printf(char *fmt, ...).
+
+ +

+The following type and macros are provided by <stdarg.h> for processing +variable-length argument lists. + +

    +
  • va_list +
    +Type suitable for use in accessing the variable-length argument list of a function +with the stdarg macros; +
  • +
  • void va_start(va_list ap, last_arg) +
    +Initializes the variable argument list pointer ap to the beginning of the +variable argument list, before any calls to va_arg. last_arg is +the last fixed argument being passed to the function (the argument before the +ellipsis). +
  • +
  • type va_arg(va_list ap, type) +
    +Returns the next argument in the variable-length argument list pointed to by +ap. Each invocation of va_arg modifies ap such that +the values of successive arguments are returned in turn. The type +parameter is the type the argument is expected to be. The parameter type +is a type name specified so that the type of a pointer to an object that has the +specified type can be obtained simply by adding a * to type. +Different types can be mixed, but it is up to the function to know what type of +argument is expected. Note that ap must be initialized with +va_start. If there is no next argument, then the result is undefined. +
  • +
  • void va_end(va_list ap) +
    +Destroys the variable argument list pointer ap, rendering it invalid +unless va_start is called again. Each invocation of va_start +must be matched by a corresponding invocation of va_end in the same +function. After the call va_end(ap) the variable ap is +undefined. Multiple traversals of the list, each bracketed by va_start +and va_end are possible. +
  • +
+ +Arguments corresponding to the variable-length argument list specified by +",..." in a function prototype always undergo the following argument +conversions: bool or char or short are converted to +int, and float is converted to double. +
+ +

+In order to correctly retrieve arguments from the variable argument list it is +necessary to know the type of each argument. In order to correctly terminate +parsing the variable argument list it is also necessary to know the number of +arguments in the list. Since the number of arguments and their types +are not known at compile time the best one can do is establish a convention +such that the caller will provide type and length information about the variable +argument list. The convention, however, is not a guarantee that the caller does +not mistakenly specify the types or number of arguments. +The scanf and printf functions do this by having +the last fixed argument be a character (format) string in which the caller +specifies the types (for example, "%f%d%s" for each argument in the +variable argument list. Although, the format string specifies the number of +expected arguments there is no actual "termination-flag" inserted at the end of +the variable argument list. If the caller incorrectly specifies the in the format +string more arguments than are actually provided then the function will likely +access invalid sections of memory while parsing the variable argument list. +Unless this error is trapped by the system the function will unwittingly process +erroneous data. + +

+ +

+7.12.2 Approach +

+ +

+The following conventions are established for the public ESMC optional argument +API. The "class" associated with this API is called ESMC_Arg and its +header files are located in Infrastructure/Util/include. The public +optional argument API for a class is provided by the public header for that class +together with ESMC_Arg.h. Macros for internal processing of optional +arguments are provided by the ESMCI_Arg.h header. +Each ESMC class has a set of named optional arguments associated with its +methods. Associated with each optional argument of a class is a unique (within +the class) optional argument identifier (id) of type +ESMCI_ArgID. The optional argument list provided by +the caller must consist of a sequence of argument identifier and argument +(id, arg) pairs. The optional argument list must be terminated +by the global identifier ESMCI_ArgLastID. +The ESMC_ArgLast macro is provided by ESMC_Arg.h for the +user to indicate the end of an optional argument list. +
+ +

+The global identifier ESMCI_ArgBaseID is the starting identifier for +local (class) optional argument identifiers. ESMCI_ArgBaseID +establishes a set of global optional argument identifiers, such that, the global +set does not intersect with any class identifier set. +The optional argument identifier list for a class will be declared in the public +header for that class. The naming convention for optional argument identifiers +is +

+                ESMCI_<ClassName>Arg<ArgName>ID
+
+where ClassName is the +name of the class and ArgName is the name of the optional argument with +the first letter capitalized. The optional argument identifier list is declared +as enumeration constants with the first identifier set equal to +ESMCI_ArgBaseID. Here is an example for a class called "Xclass". +
+   // Optional argument identifier list for the ESMC_Xclass API.
+   enum {
+     ESMCI_XclassArgAoptID = ESMCI_ArgBaseID,  // ESMC_I1
+     ESMCI_XclassArgBoptID,                    // ESMC_I4
+     ESMCI_XclassArgCoptID,                    // ESMC_R4
+     ESMCI_XclassArgDoptID,                    // ESMC_R8
+     ESMCI_XclassArgEoptID,                    // ESMC_Fred
+   };
+
+ +It is helpful for the class developer to list the data type of +each optional argument (as a comment) with its associated id. +
+ +

+The ESMCI_Arg(ID,AR) internal macro (declared in ESMC_Arg.h) +is provided for casting an optional argument and its associated id into +the required sequence for passing to functions. +

+   #define ESMCI_Arg(ID,ARG)  ((ESMCI_ArgID)ID),(ARG)
+
+ +Each class will use this internal macro in its public header to declare +user macros for the class specific optional arguments. +The naming convention for class specific optional argument expansion macros +is +
+                ESMC_<ClassName>Arg<ArgName>(ARG)
+
+where ClassName is the +name of the class and ArgName is the name of the optional argument with +the first letter capitalized. The argument of the macro is the actual caller +provided optional argument. Here is an example of how the macros are used for +the class "Xclass". +
+   // Argument expansion macros for the ESMC_Xclass API.
+   #define ESMC_XclassArgAopt(ARG)  ESMCI_Arg(ESMCI_XclassArgAoptID,ARG)
+   #define ESMC_XclassArgBopt(ARG)  ESMCI_Arg(ESMCI_XclassArgBoptID,ARG)
+   #define ESMC_XclassArgCopt(ARG)  ESMCI_Arg(ESMCI_XclassArgCoptID,ARG)
+   #define ESMC_XclassArgDopt(ARG)  ESMCI_Arg(ESMCI_XclassArgDoptID,ARG)
+   #define ESMC_XclassArgEopt(ARG)  ESMCI_Arg(ESMCI_XclassArgEoptID,ARG)
+
+ +Here is an example call, with properly specified optional arguments, to a class +function. The function has three named (fixed) arguments. +
+   rc = ESMC_XclassFunc(fixedArg1,fixedArg2,fixedArg3,
+                        ESMC_XclassArgAopt(aOptArg),
+                        ESMC_XclassArgCopt(cOptArg),
+                        ESMC_XclassArgDopt(dOptArg),
+                        ESMC_ArgLast)
+
+ +

+ +

+7.12.3 Internal Macros for Processing the Optional Argument List +

+ +

+Internal macros for processing the optional argument list are declared in +ESMCI_Arg.h. These macros provide a consistent internal interface to +the macros defined in stdarg.h. What follows is a description of each +macro available to a class developer. + +

+ +

    +
  • ESMCI_ArgList +
    +Optional argument list data type (va_list). The variable used for +accessing the optional argument list must be declared as this type. +
  • +
  • ESMCI_ArgStart(AP,LAST) +
    +Internal macro to initialize optional argument list processing. AP is +the optional argument list pointer. LAST is the last fixed argument +(before the optional argument list). +
  • +
  • ESMCI_ArgEnd(AP) +
    +Internal macro to finalize optional argument list processing. AP is +the optional argument list pointer. +
  • +
  • ESMCI_ArgGetID(AP) +
    +Internal macro to return an optional argument identifier. AP is +the optional argument list pointer. +
  • +
+ +

+The following type specific ESMCI_ArgGet macros are provided for +returning optional argument values. These macros correctly account for the +forced type conversions described above. In each macro, AP is the +optional argument list pointer. +
+
+Internal macros for returning standard C (non-pointer) types. +

+   #define ESMCI_ArgGetChar(AP)           (char)va_arg(AP,int)
+   #define ESMCI_ArgGetShort(AP)         (short)va_arg(AP,int)
+   #define ESMCI_ArgGetInt(AP)             (int)va_arg(AP,int)
+   #define ESMCI_ArgGetLong(AP)           (long)va_arg(AP,long)
+   #define ESMCI_ArgGetLongLong(AP)  (long long)va_arg(AP,long long)
+   #define ESMCI_ArgGetFloat(AP)         (float)va_arg(AP,double)
+   #define ESMCI_ArgGetDouble(AP)       (double)va_arg(AP,double)
+
+ +Internal macros for returning defined ESMC types. +
+   #define ESMCI_ArgGetI1(AP)          (ESMC_I1)va_arg(AP,int)
+   #define ESMCI_ArgGetI2(AP)          (ESMC_I2)va_arg(AP,int)
+   #define ESMCI_ArgGetI4(AP)          (ESMC_I4)va_arg(AP,int)
+   #define ESMCI_ArgGetI8(AP)          (ESMC_I8)va_arg(AP,ESMC_I8)
+   #define ESMCI_ArgGetR8(AP)          (ESMC_R8)va_arg(AP,double)
+   #define ESMCI_ArgGetR4(AP)          (ESMC_R4)va_arg(AP,double)
+
+ +Special internal macro for returning strings. +
+   #define ESMCI_ArgGetString(AP)               va_arg(AP,char*)
+
+ +General internal macro for returning all non-converted types. +
+   #define ESMCI_ArgGet(AP,TYPE)                va_arg(AP,TYPE)
+
+ +TYPE is the expected type of returned argument. + +

+ +

+7.12.4 Parsing the Optional Argument List +

+ +

+Each class function with optional arguments will declare an optional argument +list pointer and optional argument list id. +

+  ESMCI_ArgList argPtr;       // optional argument list pointer
+  ESMCI_ArgID argID;          // optional argument list id
+
+ +

+Parsing the optional argument list consists of three distinct phases: initializing +the argument list pointer, retrieving each argument in succession based on its +id, and finalizing the argument list pointer. The block for retrieving +arguments must first retrieve an argument id. If that id is +not ESMCI_ArgLastID and is in the set of valid ids for that function, +then the argument is retrieved using a type-appropriate ESMCI_ArgGet +macro. The following example code should be considered as "template" code for +parsing an optional argument list. +

+  // parse the optional argument list:
+  ESMCI_ArgStart(argPtr,ifix);
+  while ( (argID = ESMCI_ArgGetID(argPtr)) != ESMCI_ArgLastID ) {
+    switch ( argID ) {
+      case ESMCI_XclassArgAoptID:
+        aOpt = ESMCI_ArgGetI1(argPtr);
+        break;
+      case ESMCI_XclassArgBoptID:
+        bOpt = ESMCI_ArgGetI4(argPtr);
+        break;
+      case ESMCI_XclassArgCoptID:
+        cOpt = ESMCI_ArgGetR4(argPtr);
+        break;
+      case ESMCI_XclassArgDoptID:
+        dOpt = ESMCI_ArgGetR8(argPtr);
+        break;
+      case ESMCI_XclassArgEoptID:
+        eOpt = ESMCI_ArgGet(argPtr,ESMC_Fred);
+        break;
+      default:
+        ESMC_LogDefault.MsgFoundError(ESMC_RC_OPTARG_BAD, "", &rc);
+        return rc;
+    } // end switch (argID)
+  } // end while (argID)
+  ESMCI_ArgEnd(argPtr);
+
+ +

+Prior to actually parsing the optional argument list a function must check the +list for proper specification. This is done by using a code block similar to the +parsing block shown above. The difference is that in this case the +ESMCI_ArgGet macros are only used to increment the argument list pointer. +

+  // check the optional argument list:
+  ESMCI_ArgStart(argPtr,lastFixed);
+  while ( (argID = ESMCI_ArgGetID(argPtr)) != ESMCI_ArgLastID ) {
+    switch ( argID ) {
+      case ESMCI_XclassArgAoptID: ESMCI_ArgGetI1(argPtr); break;
+      case ESMCI_XclassArgBoptID: ESMCI_ArgGetI4(argPtr); break;
+      case ESMCI_XclassArgCoptID: ESMCI_ArgGetR4(argPtr); break;
+      case ESMCI_XclassArgDoptID: ESMCI_ArgGetR8(argPtr); break;
+      case ESMCI_XclassArgEoptID: ESMCI_ArgGet(argPtr,ESMC_Fred); break;
+      default:
+        ESMC_LogDefault.MsgFoundError(ESMC_RC_OPTARG_BAD, "", &rc);
+        return rc;
+    } // end switch (argID)
+  } // end while (argID)
+  ESMCI_ArgEnd(argPtr);
+
+ +

+The following example shows how an optional argument list check block can be +structured to handle an optional argument whose type is call dependent. In this +case the type of the dValue optional argument depends on the value of the +ESMC_TypeKind_Flag argument tk (which is the last fixed argument). +

+  // check the optional argument list:
+  ESMCI_ArgStart(argPtr,tk);
+  while ( (argID = ESMCI_ArgGetID(argPtr)) != ESMCI_ArgLastID ) {
+    switch ( argID ) {
+      case ESMCI_ConfigArgCountID: ESMCI_ArgGetInt(argPtr); break;
+      case ESMCI_ConfigArgLabelID: ESMCI_ArgGetString(argPtr); break;
+      case ESMCI_ConfigArgDvalueID:
+        switch ( tk ) {
+          case ESMC_TYPEKIND_I4: ESMCI_ArgGetI4(argPtr); break;
+          case ESMC_TYPEKIND_I8: ESMCI_ArgGetI8(argPtr); break;
+          case ESMC_TYPEKIND_R4: ESMCI_ArgGetR4(argPtr); break;
+          case ESMC_TYPEKIND_R8: ESMCI_ArgGetR8(argPtr); break;
+          case ESMC_TYPEKIND_LOGICAL: ESMCI_ArgGetInt(argPtr); break;
+          case ESMC_TYPEKIND_CHARACTER: ESMCI_ArgGetString(argPtr); break;
+        } // end switch (tk)
+        break;
+      default:
+        ESMC_LogDefault.MsgFoundError(ESMC_RC_OPTARG_BAD, "", &rc);
+        return rc;
+    } // end switch (argID)
+  } // end while (argID)
+  ESMCI_ArgEnd(argPtr);
+
+ +

+ +

+ +

+ +

+7.13 Code: Makefile Conventions +

+ +

+The makefiles use GNU standard target names when possible. +The default rule is to remake the ESMF library. Targets exist +to build the unit and system tests, the examples, the demos, +and to run them together or individually. Targets also exist +to build the documentation and create pdf and html versions. +For more details on targets, refer to the README file in the top +level ESMF directory, and also the ESMF User's Guide. + +

+ +

+7.13.1 Code Building Rules +

+During software development it is advantageous to recompile a portion of +ESMF and not build the entire framework when testing localized software +modifications. The makefiles are configured to compile only files in the +current directory and rebuild the shared libraries only when necessary. +Therefore when "make" is entered in any directory, only files in that +directory are compiled. However, the entire ESMF framework may be built +from any directory by entering "make lib". + +

+The unit tests, the system tests, the examples, and the demos all share +a common set of targets. The following target list illustrates the +options for the examples. The names unit_tests, system_tests, +demos, and all_tests can be substituted wherever examples +occurs. +

+
examples
+
build and run all examples +
+
examples_uni
+
build and run all examples single process +
+
build_examples
+
build the examples +
+
run_examples
+
run the examples and report the success/fail status +
+
run_examples_uni
+
run the examples single process +
+
check_examples
+
report the success/fail status without reexecution +
+
clean_examples
+
remove the example executables +
+
+ +

+ +

+7.13.2 Document Building Rules +

+The makefile rules for building documents are now located in: +
 build/common.mk
+
+The rules exist +as pattern rules and are controlled by the variables set in a doc +directory's makefile. The pattern rules will build .tex from source code +and .pdf, .dvi and html files from .ctex files. + +

+Variables that can be set in the individual doc/makefiles are called +"makefile variables". These are: +

+
DVIFILES
+
+
+
PDFFILES
+
+
+
HTMLFILES
+
+
+
TEXTFILES_TO_MAKE
+
+
+
+ +

+Document file dependencies are set with: +

+
REFDOC_DEP_FILES
+
+
+
+ +

+The makefiles targets work from both local directory and from ESMF_DIR: +

+
make alldoc
+
+
+
make pdf
+
+
+
make dvi
+
+
+
make html
+
+
+
+ +

+ +

+7.13.3 Include Files +

+At the highest directory level, the "include" +directory will contain public include files intended to be used in +user-written code. They will be broken up into separate files, with a +single "ESMF.h" include file which includes all the others. + +

+At the 'src' level, parallel to Infrastructure, Superstructure, and doc, +is another include directory. This is for private include files which are +ESMF-wide. These might include system-wide architecture dependent +#defines constants, etc. + +

+Below the Superstructure & Infrastructure level are the individual +component levels (TimeMgr, Field, Component, etc). Under each of these +directories is an include directory for the component specific include +files. + +

+ +

+ +

+7.14 Preprocessor Usage +

+ +

+ +

+7.14.1 Using the Preprocessor For Generic Fortran Code +

+ +

+Fortran allows the creation of generic subprogram names via the +INTERFACE facility. This lets the caller use a simplified +single name for a call. Then, based on the callers actual argument list, +the compiler will choose an appropriate specific routine to perform +the task. + +

+When several specific variants of a generic call exist, and only +differ in minor ways, for example by ESMF object type, it can be +desirable to have the variants generated from a single definition. +This allows improvements in the reliability and maintainability of +the code. Feature code can be added in a single place, and all +of the specific routines will automatically incorporate the new code. + +

+By convention, generic ESMF Fortran code uses the GNU C preprocessor +macro facility to generate specific routines. These routines generally +differ only in the type, kind, and rank of the dummy arguments. The +internal code is otherwise identical. + +

+When writing a cpp macro, the definition must be 'one line' long. +Since coding an entire subprogram requires many lines to implement, +a backslash character is used at the end of each line to concatenate +multiple lines from the input file into a single, very long, preprocessor +line. After macro expansion, each preprocessor line needs to be +converted into a sequence of Fortran statements. So again by +convention, at-sign characters, @, are used as the second-to-last +character in each line. After cpp has been run, the long lines from +the result are split at the @ characters by converting them to newline +characters. The tr command is used for this translation. + +

+ESMF Fortran files which need to be preprocessed in this manner use +the file name suffix .cppF90. This triggers the makefile system +to use the following sequence when processing the file: + +

+ +

    +
  • The gcc version of cpp is run. This causes a first pass of +preprocessing to occur. All macro expansion for generic routines +should be performed in this pass. + +

    +

  • +
  • The tr command is run to perform several transformations: + +

    + +

      +
    1. Convert @ characters to newline characters. As described above, this +converts the one very long line of any cpp macro expansion into multiple +source lines for the compiler. + +

      +

    2. +
    3. Convert caret, ^  characters to # characters +in order to allow selected preprocessing directives to pass through to the +second level of preprocessing performed by the actual compiler. + +

      +

    4. +
    5. Convert vertical bar, |, characters to apostrophe (single +quote) characters. Vertical bars should be used where apostrophe characters +need to appear. This is needed because some versions of cpp look for matching +apostrophes in order to properly issue code. Note that only lines within a +macro definition, i.e., those ending in @  need to use this transformation. + +

      +

    6. +
    + +

    +

  • +
  • The Fortran compiler is run. The built-in preprocessor is used for +the second preprocessing pass. This pass is used for other preprocessing +tasks - such as including header files needed for compilation, or for +conditional compilation of system-dependent code. + +

    +

  • +
+ +

+A simple example of generic code written in this style is: + +

+

+  module ESMF_Example_mod
+    use ESMF
+    implicit none
+
+! The following header needs to be preprocessed by the compiler,
+! not the first cpp pass.  So use a caret as the first character,
+! rather than a pound-sign.
+
+^include "my_header.inc"
+
+! Define a generic name with three specific routines
+
+    interface ESMF_generic_name
+      module procedure ESMF_ArraySpecifc
+      module procedure ESMF_FieldSpecfic
+      module procedure ESMF_MeshSpecific
+    end interface
+
+  contains
+
+! Define a macro for expansion.  Each line is terminated with a
+! @\ sequence.  Also note the use of ## for concatenation
+! and # for stringization.
+
+#define MySpecificMacro(mclass, mthis)  \
+  subroutine mclass##Specific (mthis, rc) @\
+    type(mclass), intent(inout) :: mthis @\
+    integer, optional :: rc @\
+ @\
+    print *, |class = |, #mclass @\
+ @\
+    if (present (rc)) rc = ESMF_SUCCESSFUL @\
+ @\
+  end subroutine mclass##Specfic @\
+
+! Expand macro for a few classes
+
+MySpecificMacro(ESMF_Array, array)
+MySpefificMacro(ESMF_Field, field)
+MySpecificMacro(ESMF_Mesh, mesh)
+
+end module ESMF_Example_mod
+
+ +

+Character string concatenation via the Fortran concatenation operator // +can be problematic due to the first pass preprocessing treating it as a C++ inline +comment. An alternative is to use the ESMF_StringConcat function. + +

+ +

+7.14.2 System Dependent Strategy Using Preprocessor +

Since the code +must compile across different platforms, a strategy must be adopted to +handle the system differences. Examples of system differences are: the +subroutines (bcopy vs memcopy) or include filenames (strings.h vs str.h, +etc). + +

+Rather than putting architecture names in all the source files, there will +be an ESMF-wide file which contains sections like this: +

+ #ifdef sgi 
+ #define HAS_VFORK 0 
+ #define BCOPY_FASTER 1 
+ #define FOPEN_3RD_ARG 1 
+ #endif
+
+ #ifdef sun 
+ #define HAS_VFORK 1 
+ #define BCOPY_FASTER 0 
+ #define FOPEN_3RD_ARG 1 
+ #endif
+
This allows system-dependent code to be bracketed with +meaningful names: + +

+

 
+
+ #if HAS_VFORK
+    vfork();
+ #else
+    fork(); 
+    exec();
+ #endif
+
+and not an endless string of architecture names. + +

+ +

+ +

+7.15 ESMF Data Type Autopromotion Support Policy and Guide +

+ +

+ESMF supports autopromotion of user code with respect to integer and real data types. This is data that a user would put in an array or field. By autopromotion we mean compiling user code with $-r8$, $-i8$ or similar options on those platforms where these options are available. If a code is compiled with autopromotion, user data will be processed correctly by ESMF. That is because user data arguments in ESMF calls already are overloaded for all TKR(type-kind-rank). It is important to note that ESMF itself must not be compiled with autopromotion flags. + +

+The ESMF API distinguishes four different flavors of integer and real arguments: + +

    +
  • integer parameters +
  • +
  • integer user data +
  • +
  • real parameters +
  • +
  • real user data +
  • +
+ +

+The ESMF API handles integer user data by overloading for TKR. The ESMF API handles real user data by overloading for TKR. The ESMF API handles integer parameters by using the system's default integer type. The ESMF API handles real parameters by explicitly specifying a kind. + +

+As a result of the ESMF API conventions the autopromotion of integer and real user data is automatically handled within ESMF. + +

+Integer parameters that are arguments to ESMF calls must be protected against integer autopromotion by explicitly specifying their kind as ESMF_KIND_I in the user code. + +

+The safest way to handle real parameters is for the user to specify their explicit kind as expected by the API. However, the user may choose to omit the kind specifier for reasons of convenience. This however will make their code vulnerable with respect to autopromotion and make the user code less portable, breaking it where the system default real kind does not match the ESMF API. + +

+The requirements for safe interfacing of autopromoted user code with ESMF are as follows: + +

    +
  1. All integer parameter arguments (as opposed to user data) to ESMF routines must be of kind ESMF_KIND_I. Following is an example of an ESMF call that includes both a user data argument, and integer parameter arguments +
    +    ...
    +
    + integer, dimension(:), pointer :: intptr        !User data arg.
    +                                                 !->No need for 
    +                                                 !kind specifier.
    +
    + integer(ESMF_KIND_I), dimension(3) :: counts    ! Integer 
    +                                                 ! parameter 
    +
    + integer(ESMF_KIND_I), dimension(3) :: lbounds   ! Integer 
    +                                                 ! parameter
    +
    + integer(ESMF_KIND_I), dimension(3) :: ubounds   ! Integer 
    +                                                 ! parameter
    +
    + integer(ESMF_KIND_I) :: rc                      ! Integer 
    +                                                 ! parameter
    +  ...
    + call  ESMF_LocalArrayCreate(array, counts, intptr, &
    +         lboounds, ubounds, rc)
    +
    + +

    +

  2. +
  3. As explained in section I.3 above, all real parameters must be of the kind expected by the routine being called. e.g. In a call to ESMF_ClockGet(), the runTimeStepCount argument must be of kind ESMF_KIND_R8. +
    +             ...
    +            type(ESMF_Clock)  :: clock
    +            real(ESMF_KIND_R8) :: runTimeStepCount
    +            integer(ESMF_KIND_I) :: rc
    +             ...
    +            call ESMF_ClockGet(clock, runTimeStepCount, rc)
    +
    +
  4. +
  5. When user data is autopromoted, the ESMF_TypeKind_Flag parameter argument corresponding to the autopromoted data must be adjusted appropriately. The ESMF_TypeKind_Flag parameter for an array or field that has been autopromoted can be obtained during execution by using the function ESMF_TypeKindFind(). ESMF_TypeKindFind() is an overloaded function that returns the ESMF_TypeKind_Flag parameter corresponding to the runtime type and kind of an input scalar. + +

    +e.g. In the following code excerpt ESMF_TypeKindFind() is used to determine at runtime the correct ESMF_TypeKind_Flag parameter to use in the ESMF_ArraySpecSet() routine in preparation for creation of an ESMF Array that will store integer data that may or may not be autopromoted. +

    +          ...
    +          integer :: iScalar
    +          ...
    +          type(ESMF_TypeKind_Flag) myTypeKind
    +          myTypeKind= ESMF_TypeKindFind(iScalar)
    +          call ESMF_ArraySpecSet(arrayspec, rank, myTypeKind, rc)
    +
    +
  6. +
+ +

+ +

+7.15.1 How We Arrived at This Autopromotion Support Policy +

+ +

+We considered the possibility of expanding autopromotion support to ESMF routine integer parameter arguments, in addition to those storing user data. Two options were considered as explained below. The reasons why we decided against such support, after discussion with the ESMF community, are as follows: + +

    +
  1. All user interfaces would need to be overloaded -this in addition to the overloading already present on some routines for user data. +
  2. +
  3. Most likely, cpp macros for all user interfaces would be needed, which does not improve readability. +
  4. +
  5. The additional necessary overloading would double (or more, depending on the option) the size of our post-processor code base. +
  6. +
  7. Typecasting support would incur performance overhead, regardless of whether autopromotion is used or not. +
  8. +
  9. There are routines, such as ESMF_LocalArrayCreate(), where all integer parameter arguments are optional. Overloading those routines violates the Fortran 95 standard and will not compile. +
  10. +
+ +

+Rejected Options: + +

+We considered and rejected two alternate options for autopromotion support. Here we illustrate with an example their impact on both the user code and the ESMF code. Note that this routine is overloaded for data arrays for all TKR supported and thus supports both real and integer autopromotion of user data. + +

+1st option: support autopromotion of integers (options sizes 4 or 8 bytes) as long as all integer parameter arguments are of the same kind. + +

+2nd option: support autopromotion of integers (options sizes 4 or 8 bytes). Mixed integer argument kinds. + +

+For our example we use a call to ESMF_LocalArrayCreate() in each of the 2 option scenarios. In reading these example scenarios please keep in mind that ESMF code will not be compiled with autopromotion. + +

+That is because only user code autopromotion is being considered. Thus the following statement could have different meaning if it is found within ESMF than in user code: +

+                         integer :: foo
+
+ In ESMF-------------------------------- ===>  foo is of default 
+                                               integer kind/size.
+
+ In User code compiled with autopromotion ==>  foo is an integer
+                                               of kind/size 
+                                               determined by
+                                               autopromotion flag.
+
+ +

+With 1st Option: + +

+

+  USER CODE:
+  ---- -----
+      ...
+     integer, dimension(:), pointer :: intptr
+     integer             , dimension(3) :: counts
+     integer             , dimension(3) :: lbounds
+     integer             , dimension(3) :: ubounds
+     integer              :: rc
+      ...
+      ...
+     call  ESMF_LocalArrayCreate(array, counts, intptr, &
+           lboounds, ubounds, rc)
+
+ +

+Changes in ESMF: + +

+The routine would need to be further overloaded in order to insure that all integer parameter call arguments (counts, lbounds, ubounds, and rc), are typecast to default integer inside the method (note that ESMF kind can be of size 4 or 8). It would be something like this: +

+  
+   subroutine ESMF_LocalArrayCreate(array, counts, intptr,.... &
+                       lbounds, ubounds, rc)
+   ......
+    integer(<esmfKind>) , intent(in), optional :: counts, &
+                          lbounds, ubounds
+    integer(<esmfKind>), intent(out), optional :: rc 
+    integer :: counts_noAP, lbounds_noAP, ubounds_noAP, rc_noAP
+  
+    if (PRESENT(counts)) counts_noAP=counts
+    if (PRESENT(lbounds)) lbounds_noAP=lbounds
+    if (PRESENT(ubounds)) ubounds_noAP=ubounds
+   ...
+   ....
+    if (PRESENT(rc)) rc=rc_nonAP
+   return
+
+ +

+With $<esmfKind>$ = ESMF_KIND_I4 in one copy and ESMF_KIND_I8 in the other. The number of copies of the routine will increase from 42 to 84. + +

+*(Note that in this particular routine, overloading is problematic because all the integer parameters are optional) + +

+With 2nd Option: +

+  USER CODE:
+  ---- -----
+      ...
+     integer, dimension(:), pointer :: intptr
+     integer(ESMF_KIND_I4) , dimension(3) :: counts
+     integer(ESMF_KIND_I8), dimension(3) :: lbounds
+     integer             , dimension(3) :: ubounds
+     integer              :: rc
+      ...
+      ...
+     call  ESMF_LocalArrayCreate(array, counts, intptr, &
+                      lboounds, ubounds, rc)
+
+Changes in ESMF: + +

+The routine would need to be further overloaded to support call arguments counts, lbounds, ubounds, and rc each being of either 4-byte or 8-byte size. In order to provide for all possible combinations of data sizes for these 4 integer parameters, the number of overloads would increase from 42 to +$[42*(2**4)]=672$, which explains why support of this option is not practical. + +

+ +

+ +

+ +

+7.16 Scripts: Script Coding Standard +

+ +

+ +

+7.16.1 Content Rules +

+ +

+ +

    +
  • Prologues Scripts included in the ESMF should be identified +with a header that includes the name of the script, a description, an +interface summary, the author and the origination date. + +

    +

  • +
+ +

+ +

+ +

+ +

+7.17 Lang: Interlanguage Coding Conventions +

+ +

+ESMF is written in a combination of C/C++ and Fortran. +Techniques used in ESMF for interfacing C/C++ and Fortran codes +are described in the ESMF Implementation Report[#!bib:ESMFimplrep!#], +which is available via the Users tab on the ESMF website. These +techniques, which address issues of memory allocation, passing +objects across language boundaries, handling optional arguments, +and so on, are general and have been applied to multiple projects. + +

+We distinguish between these techniques and the conventions used +by the ESMF project when interfacing C/C++ and Fortran. These +conventions, which represent specific implementation choices, +require additional input and explanation, and this section in +the Guide is currently incomplete. The list below outlines +the topics that we intend to address: + +

+ +

    +
  1. Logicals across language interfaces +
  2. +
  3. Optional arguments across language interfaces +
  4. +
  5. Layering Fortran on top of C/C++ +
  6. +
  7. Layering C/C++ on top of Fortran +
  8. +
+ +

+ +

+7.17.1 Optional Arguments Across Language Interfaces +

+ +

+It is often necessary for C++ code to call Fortran code where optional arguments are +used. By convention, most Fortran compilers use a C NULL for the argument address +to indicate that the optional argument is missing. + +

+The following Fortran subroutine has optional arguments. Note that Fortran 77 style +adjustable size array dimensioning is used for array b: + +

+

+    subroutine f_ESMF_SomeProcedure (a, b, b_size, rc)
+      implicit none
+      real,    intent(in),  optional :: a
+      integer, intent(in)            :: b_size
+      real,    intent(out), optional :: b(b_size)
+      integer, intent(out), optional :: rc
+
+      if (present (a)) then
+        ... = a
+      end if
+      ...
+      if (present (b)) then
+        b(i) = ...
+      end if
+      ...
+      if (present (rc)) then
+        rc = localrc
+      end if
+    end subroutine f_ESMF_SomeProcedure
+
+ +

+When calling the above from C++, NULL can be used to indicate missing arguments: + +

+

+    extern "C" {
+        FTN_X(f_esmf_someprocedure)(float &a, float &b, int &b_size, int &rc);
+    }
+    ...
+    // array b not present, so use NULL.
+    int b_size = 0;
+    FTN_X(f_esmf_someprocedure)(&a, NULL, &b_size, &rc);
+    ...
+    // array b is present.  Pass size and address.
+    float *b = new float[20];
+    int b_size = 20;
+    FTN_X(f_esmf_someprocedure)(&a, b, &b_size, &rc);
+
+ +

+ +

+ +
+7.18 Lang: Fortran Coding Standard +

+ +

+This standard is derived from the GFDL Flexible + Modeling System Developers' + Manual +and the +coding standard for the NCAR Community Atmospheric + Model(CAM) +developed by Jim Rosinski. Other documents containing coding +conventions include the "Report on Column Physics Standards" +(http://nsipp.gsfc.nasa.gov/infra/) +and "European Standards For Writing and Documenting Exchangeable +Fortran 90 Code" +(http://nsipp.gsfc.nasa.gov/infra/eurorules.html). + +

+The conventions assume the use of embedded documentation extractor +ProTeX. + +

+ +

+7.18.1 Content Rules +

+ +

+

+
F95 Standard
+
ESMF will adhere to the Fortran 95 language + standard [#!ref:f95!#], to the extent that it is implemented. + +

+ +

    +
  1. All elements of the ANSI f95 standard are permitted, + with a few listed exceptions whose use is discouraged or prohibited. + These are enumerated below. +
  2. +
  3. Language extensions are severely restricted. They may be used in + limited fashion, provided a pressing reason exists (e.g major + performance enhancement using a particular proprietary software + system), and an alternate formulation is provided for compiling + environments that do not permit the extension. +
  4. +
  5. The standard may change in the future, e.g to Fortran 2003, or + any other, after review. +
  6. +
+ +

+

+
Preprocessing
+
The use of preprocessing directives is intended + for language extensions, and in some circumstances, it is used to + generate module procedures under a generic interface for variables + of different type, kind and rank (thus circumventing f90's + strict typing), while maintaining a single copy of the source. + +

+The use of preprocessor directives in ESMF is permitted under the +following conditions: + +

+ +

    +
  1. Where language extensions are used, cpp + #ifdef statements must be used to shield lines from + compilers that may not recognize them. +
  2. +
  3. Use is restricted to the built-in preprocessor of the + f90 compiler (based on cpp), and cannot be based + on external preprocessors such as m4. This condition may be + relaxed on platforms where the builtin preprocessor proves to be + inadequate. +
  4. +
  5. Use is restricted to short code sections (a useful rule of thumb + is that an #ifdef and the matching #endif should + both be visible on a single 80x24 editor + window). +
  6. +
  7. Tokens must be uppercase. +
  8. +
  9. Owing to restrictions in certain compilers, preprocessor + variable names may not exceed 31 characters. +
  10. +
+ +

+

+
Source files
+
Each source code file defines a single + program or f90 module. The filename must be the + same as the module name with the following extensions: +
+filename.f - fixed format, no preprocessing.
+filename.F - free format, no preprocessing.
+
+
+filename.f90 - fixed format, with preprocessing.
+filename.F90 - free format, with preprocessing.
+
+
+
Module name
+
The names of Fortran procedure interfaces will be + preceded by ESMF_. Class names will normally be the first + item in a procedure name, followed by the specific method, e.g., + ESMF_TimeMgrGetCurrDate. Compilers produce object code for + each source file, usually with a .o extension. During + linking, it is required that each object file have a unique name; + extremely generic names must be avoided. This convention is used to + prevent name collisions. + +

+

+
Scope
+
Each module in ESMF must have private scope by + default. Each public interface therefore needs to be explicitly + published. + +

+

+
Typing
+
The use of implicit typing is forbidden. Every module + must contain the line: + +

+

+implicit none
+
+ +

+in the module header, and every variable explicitly declared. + +

+There are a few restrictions on the length of a character variable: + +

+ +

    +
  1. Character variables that are arguments to routines should + be declared with (len=*). It has been observed that + compilers are inconsistent in their “padding” practices, and the + standard is silent on the subject. +
  2. +
  3. It is recommended that other character variables be declared + with length a multiple of 4, or preferably 8. This is a + requirement for variables that are components of derived + types, since it has been observed that without these restriction, + there are occasional word alignment fault errors generated. +
  4. +
+ +

+

+
Arguments
+
The intent of arguments to subroutines and + functions must be explictly specified. + +

+

+
Intrinsics
+
The f90 language provides a number of + intrinsic functions for performing common operations. The use of the + standard intrinsics is generally encouraged. Notes: + +

+ +

    +
  1. The generic form of the intrinsic (e.g max()) must be + used rather than the specific one (e.g dmax0()). This + permits flexibility to later changes of type. +
  2. +
  3. Many of the intrinsic array operations have been found to be + poorly optimized for performance (e.g reshape(), + matmul()) since they have to be perfectly general. These + must be used with care in code regions that are critical for + performance. +
  4. +
  5. Several older standard intrinsic names have been declared + obsolescent, and the current names are preferred (e.g + modulo() instead of mod(), real() instead + of float()). +
  6. +
+ +

+

+
Constants and magic numbers
+
Shared constants + must never be hardcoded: instead mnemonically useful names are + required. This applies to physical constants such as the universal + gas constant, gravity, and so on, but also for flags used to select + code options. In particular, this coding construct: + +

+

+subroutine advection(flag)
+integer, intent(in) :: flag
+...
+if( flag.EQ.1 )then
+    call upwind_advection( ... )
+else if( flag.EQ.2 )then
+    call smolar_advection( ... )
+...
+endif
+end subroutine advection
+...
+call advection(1)
+
+ +

+is discouraged. This should instead be written as: + +

+

+integer, parameter :: UPWIND=1, SMOLAR=2
+...
+subroutine advection(flag)
+integer, intent(in) :: flag
+...
+if( flag.EQ.UPWIND )then
+    call upwind_advection( ... )
+else if( flag.EQ.SMOLAR )then
+    call smolar_advection( ... )
+...
+endif
+end subroutine advection
+...
+call advection(UPWIND)
+
+ +

+

+
Procedural interfaces
+
Procedural interfaces are the public + interfaces to subroutines and functions provided by a module. + +

+ +

    +
  1. Procedures that perform the same function on different datatypes + (e.g of differing type, kind or rank) should have a single generic + interface. When the generic public interface exists, all the + module procedures that constitute it must be private. +
  2. +
  3. Optional arguments, if any, should follow the required + arguments, so that the procedure may be called without explicit + argument keywords. Optional arguments in all new public interfaces must + have a keywordEnforcer argument separating the required arguments from the + optional arguments. This requires the caller to specify keywords for the arguments, + allowing for upward compatibility as new optional arguments are added over time. +
  4. +
  5. Argument lists should be as short as possible. If necessary, related elements of + an argument list should be encapsulated in a public derived type. +
  6. +
+ +

+

+
Deprecated elements of the standard
+
Deprecated language + elements include: + +

+ +

    +
  1. implicit typing. Use implicit none in all modules and external + procedures. +
  2. +
  3. common blocks. Use module global variables instead; +
  4. +
  5. assumed size arrays: i.e declarations of the form a(*) + or a(1) with the intention of over-indexing. This can + inhibit effective bounds-checking at compile- and runtime. +
  6. +
  7. STOP statements: this can generate single-processor + exits in some parallel environments; +
  8. +
  9. array syntax. Though compact and concise, many compilers have + trouble generating efficient code from source written in this + notation. +
  10. +
+ +

+

+
mkmf
+
The + mkmf +tool + may be used to generate Makefiles with correct dependencies for F90 + and hybrid-language codes. This places minor restrictions on + module and use statements: these declarations must + be on a single line, and the use of continuation lines, e.g: + +

+

+module &
+  module_name
+use &
+  module_name
+
+ +

+is forbidden. + +

+

+
Use statement
+
    +
  1. The use statement must appear on the same line as + the module name, i.e, do not use: + +

    +

    +use &
    +  module_name
    +
    + +

    +This is to be consistent with the dependency analysis performed by + mkmf outlined above. +

  2. +
  3. The use, only: clause is required so that all + imported elements are explicitly declared. +
  4. +
  5. Variables imported by a use statement must not be + modified by the importing module. +
  6. +
  7. Modules cannot publish variables and interfaces imported from + another module. Thus, each public element of a module is only + available through that module. +
  8. +
+ +

+

+
+ +

+ +

+7.18.2 Style Rules +

+ +

+Style is somewhat personal, and it would be needlessly restrictive to +attempt to impose style requirements. These are recommendations which +we believe will lead to pleasant encounters with clear, legible and +understandable code. The only style requirement we place is that of +consistency: a single code unit is required to be rigorous in +using the author's preferred set of stylistic attributes. It is not +onerous to follow a style: modern editors have many language-aware +features designed to produce a consistent, customizable style. + +

+Style recommendations include the following: + +

+ +

    +
  1. The use of free format; +
  2. +
  3. The use of do...end do constructs (as opposed to numbered loops + as in Fortran-IV); +
  4. +
  5. The use of proper indentation of loops and blocks; +
  6. +
  7. The liberal use of blank lines to delimit code blocks; +
  8. +
  9. The use of comment lines of dashes or dots to delimit + procedures; +
  10. +
  11. The use of useful descriptive names for physically meaningful + variables; short conventional names for iterators (e.g + (i,j,k) for spatial grid indices); +
  12. +
  13. The use of uppercase for constants (parameters), lowercase for + variables; +
  14. +
  15. The use of verbose syntax on end statements (e.g + subroutine sub...end subroutine sub rather than + subroutine sub...end); +
  16. +
  17. The use of short comments on the same line to identify + variables; longer comments in well-delineated blocks to describe + what a portion of code is doing; +
  18. +
  19. Compact code units: long procedures should be split up if + possible. 200 lines is a rule-of-thumb procedure length limit. +
  20. +
+ +

+ +

+7.19 Lang: C/C++ Coding Standard +

+ +

+ +

    +
  • Use of namespaces +To avoid conflict in symbols, ESMF C++ code will utilize namespaces to +add either ESMC (interface code) or ESMCI to symbol names. + +

    +Example: + +

    +The header file for an ESMC_Widget is as follows: +

    +**file ESMCI_Widget.h
    +// Internal Widget esmf class
    +#ifndef ESMCI_Widget_h
    +#define ESMCI_Widget_h
    +
    +namespace ESMCI {
    +
    +class Widget {
    +public:
    +Widget();
    +~Widget();
    +void Manufacture();
    +};
    +
    +} // namespace ESMCI
    +
    + +

    +The implementation file is: +

    +***file ESMCI_Widget.C
    +#include <ESMCI_Widget.h>
    +
    +namespace ESMCI {
    +
    +Widget::Widget() {
    +...
    +}
    +Widget::~Widget() {
    +...
    +}
    +void Widget::Manufacture() {
    +...
    +}
    +
    +} // namespace ESMCI
    +
    + +

    +Lastly, when this object is used from C interface code, the following constructs are used: + +

    +

    +*** file ESMC_SomeInterface_F.C
    +#include <ESMCI_Widget.h>
    +
    +extern "C" {
    +// this cannot be in the ESMCI namespace, else it would change the
    +// linkage. We have two choices: 1) add using namespace ESMCI and
    +// then use Widget, else 2) qualify Widget, ESMCI::Widget
    +void FTN(c_esmc_someinterface)(
    +ESMCI::Widget **wptr, int *rc){
    +#undef ESMC_METHOD
    +#define ESMC_METHOD "c_esmc_someinterface()"
    +if (rc!=NULL)
    +*rc = ESMC_RC_NOT_IMPL;
    +
    +.....
    +(*wptr)->Manufacture();
    +
    +}
    +
    +} // extern "C"
    +
    + +

    +

  • +
  • Protex Prologues Each C or C++ function, subroutine, or +module will include a prologue instrumented for use with the + ProTeX auto-documentation script. Prologue templates are +included in the ESMF document templates package described in +Section [*]. This convention may be relaxed +when absorbing large external code bases that may have their own +documentation conventions. + +

    +

  • +
+ +

+ +

+ +

+ +

+ +
+7.20 Repo: Source Code Naming and Tagging Conventions +

+ +

+We provide two types of releases, public and internal, with similar tagging conventions. + +

+ +

+7.20.1 Public Releases +

+Public releases are each given a branch created from the main CVS repository ESMF trunk. The tagging convention +for public releases is +ESMF_*_*_*r[p#], e.g., ESMF_0_2_1r, where the first digit represents a major release, the +second digit an incremental release, the third digit a routine update, and an official release r. +Subsequent patches to the release are identified with the letter p followed by the patch number, +e.g., ESMF_1_0_0rp2. Patches are tagged on the release branch. + +

+ +

+7.20.2 Internal Releases +

+ESMF software internal releases are identified as tags on the CVS main trunk. +The tagging convention for internal releases is +ESMF_*_*_*, e.g., ESMF_1_0_1, where the first digit represents a +major release, the second digit an incremental release, and the third digit a routine update. + +

+ +

+ +

+7.21 Data Management Conventions +

+ +

+The ESMF team will adopt the Climate and Forecast (CF) Metadata +conventions. These are available at: +
+http://www.unidata.ucar.edu/software/netcdf/conventions.html +

+ +

+ +

+ +

+ +
+esmf_support@ucar.edu +
+ + diff --git a/docs/nightly/fix/reconcile-info/dev_guide/node9.html b/docs/nightly/fix/reconcile-info/dev_guide/node9.html new file mode 100644 index 000000000..3b0988f95 --- /dev/null +++ b/docs/nightly/fix/reconcile-info/dev_guide/node9.html @@ -0,0 +1,425 @@ + + + + + +8 Tracking and Metrics + + + + + + + + + + + + + + + + + + + + + +Subsections + + + +
+ +

+8 Tracking and Metrics +

+ +

+ +

+8.1 Release Schedule +

+ +

+The ESMF Release Schedule is generated by the Change Review Board (CRB) (see section 2.3) +as the main outcome of its quarterly meetings. The release schedule is posted on the ESMF website home page +under Quick Links. + +

+ +

+8.2 Task List +

+ +

+The Task List +is used +to archive past, current, and future development tasks. It's updated by the Core Team +Manager during and after quarterly CRB meetings. The CRB bases the Release Schedule +on the Task List. The Task List is browsable by anyone and is located at +http://www.sourceforge.net/projects/esmf (click on Tasks). + +

+ +

+ +
+8.3 Trackers +

+ +

+SourceForge provides the development team with a set of trackers. Current trackers are +Support Requests, Bugs, Feature Requests, Application Issues, and Operations. These are +described in more detail in section [*]. + +

+An item entered into a tracker is called a ticket. Tickets are assigned a unique +number and can move from tracker to tracker. Tickets may be opened in response to a customer +request or as a result of some finding or need of the development team. + +

+The process for handling customer requests is located in Section [*]. + +

+All trackers categorize requests similarly. Pull down menus can assign various criteria +including Assignee, Status (Open, Closed, etc.), Category (Array, Regrid, etc.), and Group +(Bug, Feature Request, etc.) Tickets can be sorted and viewed based on these criteria and +can be moved from one tracker to another. For example a ticket may start out as a support +request and be moved to the bug tracker for resolution. To move a ticket, simply change +the type using the type pull down menu. + +

+ +

+8.3.1 Setting Ticket Priorities +

+ +

+The SourceForge trackers allow the user to set the priority of a ticket. Priority nine is used +to label tickets that are associated with a task scheduled for release on the Task List. +These are the only tickets that should be labeled at this level. Priority levels one through +five can be used by individual developers to prioritize tickets that are not associated with +any upcoming release. + +

+ +

+ +
+8.3.2 Labeling Tickets Longer than 2 Weeks +

+The CRB only manages tickets that will take longer than two calendar weeks. +All tickets that are estimated to be two calendar weeks or longer should +be labeled with LONG: prepended to the title of the ticket. + +

+
+Examples: + +

    +
  • LONG: wants one-sided communications options (2) +
  • +
  • LONG: typekind vs type and kind (4) +
  • +
+ +

+ +

+8.3.3 Estimating Ticket Completion Time +

+ +

+The following guidelines should be used when determining ticket completion times: + +

+ +

    +
  • Estimates are in calendar weeks. +
  • +
  • Estimates do not include the 25% time spent on support. Thus +time for ticket items is allocated at 3 weeks per month. +
  • +
  • Estimates do not include integration and release preparation. +
  • +
  • Estimates do include any research time that's part of the developer's position. Calendar weeks are not corrected for this. +
  • +
  • Estimates include design time. +
  • +
  • Design estimates do include looking at other packages, design, design documentation, time for iterating on telecoms, design reviews, feedback, and prototyping. +
  • +
  • Implementation estimates do include implementation, code reviews, testing, and documentation. As a rule of thumb, documentation time and testing time are at least equal to coding time. Also include any peripheral capabilities that will be needed to support the main item. +
  • +
  • Use the past as a guide and estimate long. +
  • +
+ +

+ +

+8.3.4 Labeling Tickets with Time Estimates +

+ +

+An estimated time to completion should be placed at the end of any ticket title labeled with +the LONG: key. If the time includes a design phase, this should be included in the +total estimate e.g. (7) equals 3 weeks design plus 4 additional weeks for completion. + +

+ +

+8.3.5 Cross-Referencing the Task List and Trackers +

+ +

+The tasks in the Task List are usually associated with +one or more items in the Feature Request, Bug, and Support Request +trackers. In order to cross-reference items, developers should label +both the item on the Task List and tracker tickets with a +unique key. The key should describe the task, be unique, and be followed by a +colon. Careful placement of keys will allow the CRB to quickly visualize +through the search mechanism all tasks necessary for a new release. The key +is highlighted in the example below: + +

+ +

+8.3.6 Summary +

+There are multiple steps to properly identifying tickets. The preceding sections +cover these steps, which are summarized here: + +
    +
  1. Use key words to link tracker tickets with items in the Task List +
  2. +
  3. Label all tickets with LONG: that will take longer than two calendar weeks +
  4. +
  5. Put the completion time estimate after the title (DESIGN + COMPLETION) +
  6. +
  7. Label tickets scheduled for release on the Task List with a priority nine. +
  8. +
  9. Prioritize other tickets using levels one through five. +
  10. +
+ +

+
+In Task List: STDIZE_INIT: Standardize Initialization Behavior + +

+
+In Bug Tracker: + +

    +
  • LONG:STDIZE_INIT:Std hand. of Verify rc for declared obj (4) +
  • +
  • LONG:STDIZE_INIT:Field count from uninitialized FieldBundle(4) +
  • +
  • STDIZE_INIT:Fld ct on uninit Bndle is not 0 on nag (4) +
  • +
  • LONG:STDIZE_INIT:BndleGetFildNmes crashes if Bndle uninit(4) +
  • +
+ +

+ +

+ +
+8.3.7 Types of Trackers +

+ +
    +
  • Support Requests: Support requests are monitored on the Support Request tracker on SourceForge. +(See Support Requests Tracker). + +

    +

  • +
  • Bugs: Bugs are tracked using the Bug Tracker. Bugs are issues with capabilities that already exist e.g. optimization, documentation, and tests. Bugs can be of short or long duration. +Bugs may be identified independently, or they may originate as a support request. If the bug originated independently, the Integrator will create the initial entry. If it originated as a support request, then the Handler or Advocate (see section 2.1.1 for definitions) will transfer the support request to the bug tracker. When a bug is opened, provide as much detail as possible to help the Handler reproduce the problem. Indicate where the bug was found e.g. trunk, branch, or both. A bug that exists on both the trunk and a branch will generally be fixed only on the trunk. If the bug is fixed on both the trunk and branch, the ticket must state this explicitly. When the bug is fixed, the Handler adds a note to the ticket and changes the status to Pending. Once the customer who originated the bug or initial support request has confirmed the fix, the ticket can be closed. + +

    +

  • +
  • Feature Requests: Features are various requests that involve creating new functionality. Features are tracked using the +Feature Requests Tracker +

    +

  • +
  • Applications Issues: The Applications Issues tracker exists to segregate tickets that +involve ESMF code that is embedded in third-party applications and which it is believed the problem +lies with the application and not ESMF. This category includes issues with ESMF code that +has been modified by a third party, code that has ESMF interface names but was not developed by +the Core Team, and and implementation issues with the Application itself. This segregation is +necessary because such tickets can remain open for extended periods of time, which would have +a negative impact on our support metrics. This tracker is located at +Applications Issues Tracker +

    +

  • +
  • Operations: Current infrastructure related items are recorded using the +Operations Tracker +
  • +
+ +

+ +

+8.4 Metrics +

+ +

+The Integrator is responsible for tracking various aspects of the +ESMF project to measure the implementation and testing progress. + +

+ +

+8.4.1 Unit and System Tests Coverage +

+Throughout the ESMF software development process, the software is constantly +being unit and system tested. It is essential to know the percentage of the +code that has been fully or partially tested. A script has been written that +lists all the public interface subprograms (functions and subroutines) and +determines which of these have been unit and/or system tested. From this script +output, the tested percentage can be calculated. + +

+ +

+8.4.2 ESMF Requirements Coverage +

+An Excel spreadsheet is maintained listing the requirements as described in the +ESMF Requirements Document. A hard copy of the spreadsheet has been posted in a +convenient place for the core team. Using color coding the core team indicates +which requirements have been implemented and of these which have been tested. + +

+ +

+8.4.3 Source Lines of Code, SLOC +

+The ESMF SLOC information is provided in an internal ESMF web page. The +SLOC data is presented in graph form with the following columns: + +

+

+
Fortran
+
+
+
C++
+
+
+
c
+
+
+
Makefiles
+
+
+
SLOC Total
+
+
+
Lines of text
+
+
+
+ +

+The graphs are a monthly breakdown from January 1, 2002 to the present. + +

+ +

+ +

+ +

+ +
+esmf_support@ucar.edu +
+ + diff --git a/docs/nightly/fix/reconcile-info/dev_guide/prev.png b/docs/nightly/fix/reconcile-info/dev_guide/prev.png new file mode 100644 index 000000000..e60b8b407 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/prev.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/prev_g.png b/docs/nightly/fix/reconcile-info/dev_guide/prev_g.png new file mode 100644 index 000000000..ac6f0bceb Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/prev_g.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/up.png b/docs/nightly/fix/reconcile-info/dev_guide/up.png new file mode 100644 index 000000000..3937e168f Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/up.png differ diff --git a/docs/nightly/fix/reconcile-info/dev_guide/up_g.png b/docs/nightly/fix/reconcile-info/dev_guide/up_g.png new file mode 100644 index 000000000..fb36cf765 Binary files /dev/null and b/docs/nightly/fix/reconcile-info/dev_guide/up_g.png differ