Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Luke Marsden committed Mar 8, 2024
1 parent 885ec2e commit 9666694
Show file tree
Hide file tree
Showing 3 changed files with 83 additions and 23 deletions.
29 changes: 24 additions & 5 deletions 06_creating_multiple_cfnetcdf_files_in_one_go.html
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,25 @@ <h2> Contents </h2>

<section class="tex2jax_ignore mathjax_ignore" id="creating-multiple-cf-netcdf-files-in-one-go">
<h1>06: Creating multiple CF-NetCDF files in one go<a class="headerlink" href="#creating-multiple-cf-netcdf-files-in-one-go" title="Permalink to this heading">#</a></h1>
<div class="cell docutils container">
<div class="cell_input docutils container">
<div class="highlight-ipython3 notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">IPython.display</span> <span class="kn">import</span> <span class="n">YouTubeVideo</span>
<span class="n">YouTubeVideo</span><span class="p">(</span><span class="s1">&#39;TjL23unMMWI&#39;</span><span class="p">)</span>
</pre></div>
</div>
</div>
<div class="cell_output docutils container">
<div class="output text_html">
<iframe
width="400"
height="300"
src="https://www.youtube.com/embed/TjL23unMMWI"
frameborder="0"
allowfullscreen

></iframe>
</div></div>
</div>
<p>In some cases, people will choose to break down their data into multiple smaller netcdf files that they will publish in a single data collection. There are a number of good reasons to do this.</p>
<ul class="simple">
<li><p>The data user can access only the data they are interested in.</p></li>
Expand Down Expand Up @@ -882,14 +901,14 @@ <h2>A refresh of how to create a single NetCDF file<a class="headerlink" href="#
instrument_vocabulary: http://vocab.nerc.ac.uk/collection/L22/current/TO...
license: https://creativecommons.org/licenses/by/4.0/
featureType: profile
station_name: S1</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-0396e110-14d4-47c0-9895-ca0859806558' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-0396e110-14d4-47c0-9895-ca0859806558' class='xr-section-summary' title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>pressure</span>: 10</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-949550f1-3902-4a4f-a369-75944a707390' class='xr-section-summary-in' type='checkbox' checked><label for='section-949550f1-3902-4a4f-a369-75944a707390' class='xr-section-summary' >Coordinates: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>pressure</span></div><div class='xr-var-dims'>(pressure)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>39.46 58.12 57.36 ... 67.68 83.0</div><input id='attrs-c182c31e-231b-4d40-80cc-71685f025227' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-c182c31e-231b-4d40-80cc-71685f025227' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-2bf5758f-fd83-4d2b-87d2-e82be2c32bb1' class='xr-var-data-in' type='checkbox'><label for='data-2bf5758f-fd83-4d2b-87d2-e82be2c32bb1' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>standard_name :</span></dt><dd>sea_water_pressure</dd><dt><span>long_name :</span></dt><dd>Sea water pressure</dd><dt><span>units :</span></dt><dd>dbar</dd><dt><span>coverage_content_type :</span></dt><dd>coordinate</dd></dl></div><div class='xr-var-data'><pre>array([39.455654, 58.119035, 57.355769, 3.418398, 22.05053 , 18.760447,
94.570563, 2.230532, 67.67562 , 83.00015 ])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-83646b37-f166-4bdd-8ba2-f5bc270ba54b' class='xr-section-summary-in' type='checkbox' checked><label for='section-83646b37-f166-4bdd-8ba2-f5bc270ba54b' class='xr-section-summary' >Data variables: <span>(2)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>Temperature</span></div><div class='xr-var-dims'>(pressure)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>1.955 1.42 1.715 ... 2.004 1.583</div><input id='attrs-52356e0a-a7f1-44ba-a3f3-b8604c54eca8' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-52356e0a-a7f1-44ba-a3f3-b8604c54eca8' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-df749393-041d-49f4-8321-3892e549911a' class='xr-var-data-in' type='checkbox'><label for='data-df749393-041d-49f4-8321-3892e549911a' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>standard_name :</span></dt><dd>sea_water_temperature</dd><dt><span>long_name :</span></dt><dd>Temperature of sea water</dd><dt><span>units :</span></dt><dd>degrees_Celsius</dd><dt><span>coverage_content_type :</span></dt><dd>physicalMeasurement</dd></dl></div><div class='xr-var-data'><pre>array([1.95533107, 1.41958791, 1.71529616, 2.84360563, 2.41972826,
1.22250547, 2.05988036, 1.39393846, 2.0035247 , 1.58250776])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>Salinity</span></div><div class='xr-var-dims'>(pressure)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>34.7 34.84 34.73 ... 35.48 34.66</div><input id='attrs-755a2f38-38af-4666-a34b-25161fff263f' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-755a2f38-38af-4666-a34b-25161fff263f' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-e1b119b2-d801-4666-bd09-a7e66ab01e49' class='xr-var-data-in' type='checkbox'><label for='data-e1b119b2-d801-4666-bd09-a7e66ab01e49' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>standard_name :</span></dt><dd>sea_water_salinity</dd><dt><span>long_name :</span></dt><dd>Salinity of sea water</dd><dt><span>units :</span></dt><dd>PSU</dd><dt><span>coverage_content_type :</span></dt><dd>physicalMeasurement</dd></dl></div><div class='xr-var-data'><pre>array([34.69975973, 34.84037386, 34.72520826, 35.34808803, 34.83566471,
34.77718679, 35.03124111, 35.14946971, 35.47912241, 34.65869081])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-bab2b00d-717b-42ae-927c-c60ad7c362b5' class='xr-section-summary-in' type='checkbox' ><label for='section-bab2b00d-717b-42ae-927c-c60ad7c362b5' class='xr-section-summary' >Indexes: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-index-name'><div>pressure</div></div><div class='xr-index-preview'>PandasIndex</div><div></div><input id='index-8df44ac6-8f9d-4762-afdb-262f1e1b727a' class='xr-index-data-in' type='checkbox'/><label for='index-8df44ac6-8f9d-4762-afdb-262f1e1b727a' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([ 39.4556544280039, 58.11903479614398, 57.3557689889737,
station_name: S1</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-3969c375-1dfa-4144-829b-0b7d2b8a5777' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-3969c375-1dfa-4144-829b-0b7d2b8a5777' class='xr-section-summary' title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>pressure</span>: 10</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-5d04a36e-b1ec-4ad0-a4c5-38e44fd3252b' class='xr-section-summary-in' type='checkbox' checked><label for='section-5d04a36e-b1ec-4ad0-a4c5-38e44fd3252b' class='xr-section-summary' >Coordinates: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>pressure</span></div><div class='xr-var-dims'>(pressure)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>39.46 58.12 57.36 ... 67.68 83.0</div><input id='attrs-568087b8-711e-483c-8388-d3b56f4c1926' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-568087b8-711e-483c-8388-d3b56f4c1926' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-1166d0ae-9708-436a-8b52-40e3cb347427' class='xr-var-data-in' type='checkbox'><label for='data-1166d0ae-9708-436a-8b52-40e3cb347427' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>standard_name :</span></dt><dd>sea_water_pressure</dd><dt><span>long_name :</span></dt><dd>Sea water pressure</dd><dt><span>units :</span></dt><dd>dbar</dd><dt><span>coverage_content_type :</span></dt><dd>coordinate</dd></dl></div><div class='xr-var-data'><pre>array([39.455654, 58.119035, 57.355769, 3.418398, 22.05053 , 18.760447,
94.570563, 2.230532, 67.67562 , 83.00015 ])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-a0350c92-e3b1-4ae7-b7bc-3c48522f3500' class='xr-section-summary-in' type='checkbox' checked><label for='section-a0350c92-e3b1-4ae7-b7bc-3c48522f3500' class='xr-section-summary' >Data variables: <span>(2)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>Temperature</span></div><div class='xr-var-dims'>(pressure)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>1.955 1.42 1.715 ... 2.004 1.583</div><input id='attrs-4e416daf-b215-49c1-b807-ff723f19f200' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-4e416daf-b215-49c1-b807-ff723f19f200' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-3c3b18ef-9747-4c10-a656-774ab744dcb7' class='xr-var-data-in' type='checkbox'><label for='data-3c3b18ef-9747-4c10-a656-774ab744dcb7' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>standard_name :</span></dt><dd>sea_water_temperature</dd><dt><span>long_name :</span></dt><dd>Temperature of sea water</dd><dt><span>units :</span></dt><dd>degrees_Celsius</dd><dt><span>coverage_content_type :</span></dt><dd>physicalMeasurement</dd></dl></div><div class='xr-var-data'><pre>array([1.95533107, 1.41958791, 1.71529616, 2.84360563, 2.41972826,
1.22250547, 2.05988036, 1.39393846, 2.0035247 , 1.58250776])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>Salinity</span></div><div class='xr-var-dims'>(pressure)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>34.7 34.84 34.73 ... 35.48 34.66</div><input id='attrs-652be8c8-1f33-472e-8bf7-e64c75aef0e4' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-652be8c8-1f33-472e-8bf7-e64c75aef0e4' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-f6645c88-97da-4f52-b0b4-40d4128a7120' class='xr-var-data-in' type='checkbox'><label for='data-f6645c88-97da-4f52-b0b4-40d4128a7120' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>standard_name :</span></dt><dd>sea_water_salinity</dd><dt><span>long_name :</span></dt><dd>Salinity of sea water</dd><dt><span>units :</span></dt><dd>PSU</dd><dt><span>coverage_content_type :</span></dt><dd>physicalMeasurement</dd></dl></div><div class='xr-var-data'><pre>array([34.69975973, 34.84037386, 34.72520826, 35.34808803, 34.83566471,
34.77718679, 35.03124111, 35.14946971, 35.47912241, 34.65869081])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-fbc1b738-b14d-4981-9a23-46ea10625949' class='xr-section-summary-in' type='checkbox' ><label for='section-fbc1b738-b14d-4981-9a23-46ea10625949' class='xr-section-summary' >Indexes: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-index-name'><div>pressure</div></div><div class='xr-index-preview'>PandasIndex</div><div></div><input id='index-e3cfccfa-cf3d-4ca0-a9e6-00da0e34b38a' class='xr-index-data-in' type='checkbox'/><label for='index-e3cfccfa-cf3d-4ca0-a9e6-00da0e34b38a' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([ 39.4556544280039, 58.11903479614398, 57.3557689889737,
3.4183980542843884, 22.05053002488748, 18.76044658260758,
94.5705628202497, 2.2305319880886354, 67.67561997590708,
83.00015013251017],
dtype=&#x27;float64&#x27;, name=&#x27;pressure&#x27;))</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-bb7e3d27-735c-4306-bad5-79924ec10a93' class='xr-section-summary-in' type='checkbox' ><label for='section-bb7e3d27-735c-4306-bad5-79924ec10a93' class='xr-section-summary' >Attributes: <span>(32)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>id :</span></dt><dd>your_unique_id_here</dd><dt><span>naming_authority :</span></dt><dd>institution that provides the id</dd><dt><span>title :</span></dt><dd>Depth Profile Data</dd><dt><span>summary :</span></dt><dd>This dataset contains depth profiles of temperature and salinity measurements.</dd><dt><span>keywords :</span></dt><dd>sea_water_temperature, sea_water_salinity</dd><dt><span>keywords_vocabulary :</span></dt><dd>CF:NetCDF COARDS Climate and Forecast Standard Names</dd><dt><span>geospatial_lat_min :</span></dt><dd>80.6713</dd><dt><span>geospatial_lat_max :</span></dt><dd>80.6713</dd><dt><span>geospatial_lon_min :</span></dt><dd>31.2093</dd><dt><span>geospatial_lon_max :</span></dt><dd>31.2093</dd><dt><span>time_coverage_start :</span></dt><dd>2020-04-26T09:56:00Z</dd><dt><span>time_coverage_end :</span></dt><dd>2020-04-26T09:56:00Z</dd><dt><span>Conventions :</span></dt><dd>ACDD-1.3, CF-1.11</dd><dt><span>history :</span></dt><dd>2024-02-21T17:28:37Z: Modified by YourName using Python</dd><dt><span>source :</span></dt><dd>Measurement</dd><dt><span>processing_level :</span></dt><dd>Level of processing/quality control</dd><dt><span>date_created :</span></dt><dd>2024-02-21T17:28:37Z</dd><dt><span>creator_type :</span></dt><dd>person</dd><dt><span>creator_institution :</span></dt><dd>Your Institution</dd><dt><span>creator_name :</span></dt><dd>Your Name</dd><dt><span>creator_email :</span></dt><dd>your@email.com</dd><dt><span>creator_url :</span></dt><dd>your_url_here</dd><dt><span>institution :</span></dt><dd>Your Institution</dd><dt><span>publisher_name :</span></dt><dd>Publisher Name</dd><dt><span>publisher_email :</span></dt><dd>publisher@email.com</dd><dt><span>publisher_url :</span></dt><dd>publisher_url_here</dd><dt><span>project :</span></dt><dd>Your Project Name</dd><dt><span>instrument :</span></dt><dd>CTD</dd><dt><span>instrument_vocabulary :</span></dt><dd>http://vocab.nerc.ac.uk/collection/L22/current/TOOL0001/</dd><dt><span>license :</span></dt><dd>https://creativecommons.org/licenses/by/4.0/</dd><dt><span>featureType :</span></dt><dd>profile</dd><dt><span>station_name :</span></dt><dd>S1</dd></dl></div></li></ul></div></div></div></div>
dtype=&#x27;float64&#x27;, name=&#x27;pressure&#x27;))</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-dd53a43d-ab52-422a-aa80-9d4879e4a2c7' class='xr-section-summary-in' type='checkbox' ><label for='section-dd53a43d-ab52-422a-aa80-9d4879e4a2c7' class='xr-section-summary' >Attributes: <span>(32)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>id :</span></dt><dd>your_unique_id_here</dd><dt><span>naming_authority :</span></dt><dd>institution that provides the id</dd><dt><span>title :</span></dt><dd>Depth Profile Data</dd><dt><span>summary :</span></dt><dd>This dataset contains depth profiles of temperature and salinity measurements.</dd><dt><span>keywords :</span></dt><dd>sea_water_temperature, sea_water_salinity</dd><dt><span>keywords_vocabulary :</span></dt><dd>CF:NetCDF COARDS Climate and Forecast Standard Names</dd><dt><span>geospatial_lat_min :</span></dt><dd>80.6713</dd><dt><span>geospatial_lat_max :</span></dt><dd>80.6713</dd><dt><span>geospatial_lon_min :</span></dt><dd>31.2093</dd><dt><span>geospatial_lon_max :</span></dt><dd>31.2093</dd><dt><span>time_coverage_start :</span></dt><dd>2020-04-26T09:56:00Z</dd><dt><span>time_coverage_end :</span></dt><dd>2020-04-26T09:56:00Z</dd><dt><span>Conventions :</span></dt><dd>ACDD-1.3, CF-1.11</dd><dt><span>history :</span></dt><dd>2024-03-08T14:08:12Z: Modified by YourName using Python</dd><dt><span>source :</span></dt><dd>Measurement</dd><dt><span>processing_level :</span></dt><dd>Level of processing/quality control</dd><dt><span>date_created :</span></dt><dd>2024-03-08T14:08:12Z</dd><dt><span>creator_type :</span></dt><dd>person</dd><dt><span>creator_institution :</span></dt><dd>Your Institution</dd><dt><span>creator_name :</span></dt><dd>Your Name</dd><dt><span>creator_email :</span></dt><dd>your@email.com</dd><dt><span>creator_url :</span></dt><dd>your_url_here</dd><dt><span>institution :</span></dt><dd>Your Institution</dd><dt><span>publisher_name :</span></dt><dd>Publisher Name</dd><dt><span>publisher_email :</span></dt><dd>publisher@email.com</dd><dt><span>publisher_url :</span></dt><dd>publisher_url_here</dd><dt><span>project :</span></dt><dd>Your Project Name</dd><dt><span>instrument :</span></dt><dd>CTD</dd><dt><span>instrument_vocabulary :</span></dt><dd>http://vocab.nerc.ac.uk/collection/L22/current/TOOL0001/</dd><dt><span>license :</span></dt><dd>https://creativecommons.org/licenses/by/4.0/</dd><dt><span>featureType :</span></dt><dd>profile</dd><dt><span>station_name :</span></dt><dd>S1</dd></dl></div></li></ul></div></div></div></div>
</div>
</section>
<section id="a-quick-introduction-to-for-loops">
Expand Down
75 changes: 58 additions & 17 deletions _sources/06_creating_multiple_cfnetcdf_files_in_one_go.ipynb

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion searchindex.js

Large diffs are not rendered by default.

0 comments on commit 9666694

Please sign in to comment.