PageRenderTime 27ms CodeModel.GetById 12ms RepoModel.GetById 1ms app.codeStats 0ms

/docs/1.1.8/generated/cf.FieldList.cos.html

https://bitbucket.org/cfpython/cfpython.bitbucket.org
HTML | 230 lines | 186 code | 14 blank | 30 comment | 0 complexity | 47dd020803e545c7c57d2b74c6b24b89 MD5 | raw file
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  6. <title>cf.FieldList.cos &mdash; Documentation</title>
  7. <link rel="stylesheet" href="../_static/classic.css" type="text/css" />
  8. <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
  9. <script type="text/javascript">
  10. var DOCUMENTATION_OPTIONS = {
  11. URL_ROOT: '../',
  12. VERSION: '1.1.8',
  13. COLLAPSE_INDEX: false,
  14. FILE_SUFFIX: '.html',
  15. HAS_SOURCE: true
  16. };
  17. </script>
  18. <script type="text/javascript" src="../_static/jquery.js"></script>
  19. <script type="text/javascript" src="../_static/underscore.js"></script>
  20. <script type="text/javascript" src="../_static/doctools.js"></script>
  21. <script type="text/javascript" src="../_static/copybutton.js"></script>
  22. <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
  23. <link rel="top" title="Documentation" href="../index.html" />
  24. <link rel="up" title="cf.FieldList" href="../classes/cf.FieldList.html" />
  25. <link rel="next" title="cf.FieldList.sin" href="cf.FieldList.sin.html" />
  26. <link rel="prev" title="cf.FieldList.subspace" href="cf.FieldList.subspace.html" />
  27. </head>
  28. <body role="document">
  29. <div class="related" role="navigation" aria-label="related navigation">
  30. <h3>Navigation</h3>
  31. <ul>
  32. <li class="right" style="margin-right: 10px">
  33. <a href="../genindex.html" title="General Index"
  34. accesskey="I">index</a></li>
  35. <li class="right" >
  36. <a href="cf.FieldList.sin.html" title="cf.FieldList.sin"
  37. accesskey="N">next</a> |</li>
  38. <li class="right" >
  39. <a href="cf.FieldList.subspace.html" title="cf.FieldList.subspace"
  40. accesskey="P">previous</a> |</li>
  41. <li><a target="_blank" href="http://cfpython.bitbucket.org">cf-python 1.1.8</a> &raquo;</li>
  42. <!--
  43. <li><a target="_blank" href="http://cfpython.bitbucket.org">cf-python</a> &raquo;</li>
  44. <li><select onchange="location = this.options[this.selectedIndex].value;">
  45. <option value="../../1.0/index.html">1.0
  46. <option value="../../0.9.9/index.html">0.9.9
  47. <option value="../../0.9.8.3/index.html">0.9.8.3
  48. <option value="../../archive.html">Archive
  49. </select>
  50. </li>
  51. -->
  52. <li class="nav-item nav-item-0"><a href="../index.html">Documentation</a> &raquo;</li>
  53. <li class="nav-item nav-item-1"><a href="../reference.html" >Reference manual</a> &raquo;</li>
  54. <li class="nav-item nav-item-2"><a href="../class.html" >Classes of the <code class="docutils literal"><span class="pre">cf</span></code> module</a> &raquo;</li>
  55. <li class="nav-item nav-item-3"><a href="../classes/cf.FieldList.html" accesskey="U">cf.FieldList</a> &raquo;</li>
  56. </ul>
  57. </div>
  58. <div class="document">
  59. <div class="documentwrapper">
  60. <div class="bodywrapper">
  61. <div class="body" role="main">
  62. <div class="section" id="cf-fieldlist-cos">
  63. <h1>cf.FieldList.cos<a class="headerlink" href="#cf-fieldlist-cos" title="Permalink to this headline">Âś</a></h1>
  64. <dl class="method">
  65. <dt id="cf.FieldList.cos">
  66. <code class="descclassname">FieldList.</code><code class="descname">cos</code><span class="sig-paren">(</span><em>i=False</em><span class="sig-paren">)</span><a class="reference external" href="https://bitbucket.org/cfpython/cf-python/src/v1.1.8/cf/variable.py#variable.py-4224"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#cf.FieldList.cos" title="Permalink to this definition">Âś</a></dt>
  67. <dd><p>For each field, take the trigonometric cosine of the data array.</p>
  68. <p>Units are accounted for in the calculation, so that the the cosine of
  69. 90 degrees_east is 0.0, as is the cosine of 1.57079632 radians. If the
  70. units are not equivalent to radians (such as Kelvin) then they are
  71. treated as if they were radians.</p>
  72. <p>The output units are &#8216;1&#8217; (nondimensionsal).</p>
  73. <div class="admonition seealso">
  74. <p class="first admonition-title">See also</p>
  75. <p class="last"><a class="reference internal" href="cf.FieldList.sin.html#cf.FieldList.sin" title="cf.FieldList.sin"><code class="xref py py-obj docutils literal"><span class="pre">sin</span></code></a>, <a class="reference internal" href="cf.FieldList.tan.html#cf.FieldList.tan" title="cf.FieldList.tan"><code class="xref py py-obj docutils literal"><span class="pre">tan</span></code></a></p>
  76. </div>
  77. <table class="docutils field-list" frame="void" rules="none">
  78. <col class="field-name" />
  79. <col class="field-body" />
  80. <tbody valign="top">
  81. <tr class="field-odd field"><th class="field-name">Examples 1:</th><td class="field-body"></td>
  82. </tr>
  83. </tbody>
  84. </table>
  85. <div class="highlight-python"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">g</span> <span class="o">=</span> <span class="n">f</span><span class="o">.</span><span class="n">cos</span><span class="p">()</span>
  86. </pre></div>
  87. </div>
  88. <table class="docutils field-list" frame="void" rules="none">
  89. <col class="field-name" />
  90. <col class="field-body" />
  91. <tbody valign="top">
  92. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first docutils">
  93. <dt>i <span class="classifier-delimiter">:</span> <span class="classifier">bool, optional</span></dt>
  94. <dd><p class="first last">If True then update the field list in place. By default a new
  95. field list is created. In either case, a field list is
  96. returned.</p>
  97. </dd>
  98. </dl>
  99. </td>
  100. </tr>
  101. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><dl class="first docutils">
  102. <dt>out <span class="classifier-delimiter">:</span> <span class="classifier">cf.FieldList </span></dt>
  103. <dd><p class="first last">For each field, the field list with the cosine of data array values.</p>
  104. </dd>
  105. </dl>
  106. </td>
  107. </tr>
  108. <tr class="field-odd field"><th class="field-name">Examples 2:</th><td class="field-body"></td>
  109. </tr>
  110. </tbody>
  111. </table>
  112. <div class="highlight-python"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">f</span><span class="o">.</span><span class="n">Units</span>
  113. <span class="go">&lt;CF Units: degrees_east&gt;</span>
  114. <span class="gp">&gt;&gt;&gt; </span><span class="k">print</span> <span class="n">f</span><span class="o">.</span><span class="n">array</span>
  115. <span class="go">[[-90 0 90 --]]</span>
  116. <span class="gp">&gt;&gt;&gt; </span><span class="n">f</span><span class="o">.</span><span class="n">cos</span><span class="p">()</span>
  117. <span class="gp">&gt;&gt;&gt; </span><span class="n">f</span><span class="o">.</span><span class="n">Units</span>
  118. <span class="go">&lt;CF Units: 1&gt;</span>
  119. <span class="gp">&gt;&gt;&gt; </span><span class="k">print</span> <span class="n">f</span><span class="o">.</span><span class="n">array</span>
  120. <span class="go">[[0.0 1.0 0.0 --]]</span>
  121. </pre></div>
  122. </div>
  123. <div class="highlight-python"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">f</span><span class="o">.</span><span class="n">Units</span>
  124. <span class="go">&lt;CF Units: m s-1&gt;</span>
  125. <span class="gp">&gt;&gt;&gt; </span><span class="k">print</span> <span class="n">f</span><span class="o">.</span><span class="n">array</span>
  126. <span class="go">[[1 2 3 --]]</span>
  127. <span class="gp">&gt;&gt;&gt; </span><span class="n">f</span><span class="o">.</span><span class="n">cos</span><span class="p">()</span>
  128. <span class="gp">&gt;&gt;&gt; </span><span class="n">f</span><span class="o">.</span><span class="n">Units</span>
  129. <span class="go">&lt;CF Units: 1&gt;</span>
  130. <span class="gp">&gt;&gt;&gt; </span><span class="k">print</span> <span class="n">f</span><span class="o">.</span><span class="n">array</span>
  131. <span class="go">[[0.540302305868 -0.416146836547 -0.9899924966 --]]</span>
  132. </pre></div>
  133. </div>
  134. </dd></dl>
  135. </div>
  136. </div>
  137. </div>
  138. </div>
  139. <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
  140. <div class="sphinxsidebarwrapper">
  141. <h4>Previous topic</h4>
  142. <p class="topless"><a href="cf.FieldList.subspace.html"
  143. title="previous chapter">cf.FieldList.subspace</a></p>
  144. <h4>Next topic</h4>
  145. <p class="topless"><a href="cf.FieldList.sin.html"
  146. title="next chapter">cf.FieldList.sin</a></p>
  147. <div role="note" aria-label="source link">
  148. <h3>This Page</h3>
  149. <ul class="this-page-menu">
  150. <li><a href="../_sources/generated/cf.FieldList.cos.txt"
  151. rel="nofollow">Show Source</a></li>
  152. </ul>
  153. </div>
  154. <div id="searchbox" style="display: none" role="search">
  155. <h3>Quick search</h3>
  156. <form class="search" action="../search.html" method="get">
  157. <input type="text" name="q" />
  158. <input type="submit" value="Go" />
  159. <input type="hidden" name="check_keywords" value="yes" />
  160. <input type="hidden" name="area" value="default" />
  161. </form>
  162. <p class="searchtip" style="font-size: 90%">
  163. Enter search terms or a module, class or function name.
  164. </p>
  165. </div>
  166. <script type="text/javascript">$('#searchbox').show(0);</script>
  167. </div>
  168. </div>
  169. <div class="clearer"></div>
  170. </div>
  171. <div class="related" role="navigation" aria-label="related navigation">
  172. <h3>Navigation</h3>
  173. <ul>
  174. <li class="right" style="margin-right: 10px">
  175. <a href="../genindex.html" title="General Index"
  176. >index</a></li>
  177. <li class="right" >
  178. <a href="cf.FieldList.sin.html" title="cf.FieldList.sin"
  179. >next</a> |</li>
  180. <li class="right" >
  181. <a href="cf.FieldList.subspace.html" title="cf.FieldList.subspace"
  182. >previous</a> |</li>
  183. <li><a target="_blank" href="http://cfpython.bitbucket.org">cf-python 1.1.8</a> &raquo;</li>
  184. <!--
  185. <li><a target="_blank" href="http://cfpython.bitbucket.org">cf-python</a> &raquo;</li>
  186. <li><select onchange="location = this.options[this.selectedIndex].value;">
  187. <option value="../../1.0/index.html">1.0
  188. <option value="../../0.9.9/index.html">0.9.9
  189. <option value="../../0.9.8.3/index.html">0.9.8.3
  190. <option value="../../archive.html">Archive
  191. </select>
  192. </li>
  193. -->
  194. <li class="nav-item nav-item-0"><a href="../index.html">Documentation</a> &raquo;</li>
  195. <li class="nav-item nav-item-1"><a href="../reference.html" >Reference manual</a> &raquo;</li>
  196. <li class="nav-item nav-item-2"><a href="../class.html" >Classes of the <code class="docutils literal"><span class="pre">cf</span></code> module</a> &raquo;</li>
  197. <li class="nav-item nav-item-3"><a href="../classes/cf.FieldList.html" >cf.FieldList</a> &raquo;</li>
  198. </ul>
  199. </div>
  200. <div class="footer" role="contentinfo">
  201. &copy; Copyright 2016, David Hassell.
  202. Last updated on May 18, 2016.
  203. Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.3.5.
  204. </div>
  205. </body>
  206. </html>