<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://www.wiki.mohid.com/index.php?action=history&amp;feed=atom&amp;title=Snctools</id>
		<title>Snctools - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://www.wiki.mohid.com/index.php?action=history&amp;feed=atom&amp;title=Snctools"/>
		<link rel="alternate" type="text/html" href="http://www.wiki.mohid.com/index.php?title=Snctools&amp;action=history"/>
		<updated>2026-04-05T00:45:58Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.28.0</generator>

	<entry>
		<id>http://www.wiki.mohid.com/index.php?title=Snctools&amp;diff=862&amp;oldid=prev</id>
		<title>Guillaume: 1 revision</title>
		<link rel="alternate" type="text/html" href="http://www.wiki.mohid.com/index.php?title=Snctools&amp;diff=862&amp;oldid=prev"/>
				<updated>2008-12-03T10:39:05Z</updated>
		
		<summary type="html">&lt;p&gt;1 revision&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr style='vertical-align: top;' lang='en'&gt;
				&lt;td colspan='1' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='1' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 10:39, 3 December 2008&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan='2' style='text-align: center;' lang='en'&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Guillaume</name></author>	</entry>

	<entry>
		<id>http://www.wiki.mohid.com/index.php?title=Snctools&amp;diff=861&amp;oldid=prev</id>
		<title>192.168.20.177: /* read bathymetry variable */</title>
		<link rel="alternate" type="text/html" href="http://www.wiki.mohid.com/index.php?title=Snctools&amp;diff=861&amp;oldid=prev"/>
				<updated>2008-04-17T15:52:00Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;read bathymetry variable&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[Snctools]] are [[Matlab]] scripts that allow to manipulate local and remote([[OpenDAP]]) [[netcdf]] files. It requires [[Matlab#Netcdf%20package|mexnc]] to be installed prior. Proceed [[Matlab#Netcdf%20package|here]] for installation instructions.&lt;br /&gt;
&lt;br /&gt;
==Commands==&lt;br /&gt;
=== nc_dump ===&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; help nc_dump&lt;br /&gt;
  NC_DUMP:  a Matlab counterpart to the NetCDF utility 'ncdump'.&lt;br /&gt;
      NC_DUMP(NCFILE) prints metadata about the netCDF file NCFILE.  &lt;br /&gt;
      NC_DUMP(NCFILE,VARNAME) prints metadata about just the one netCDF variable&lt;br /&gt;
      named VARNAME.&lt;br /&gt;
&lt;br /&gt;
=== nc_varget ===&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; help nc_varget&lt;br /&gt;
  NC_VARGET:  Retrieve data from a netCDF variable.&lt;br /&gt;
 &lt;br /&gt;
  DATA = NC_VARGET(NCFILE,VARNAME) retrieves all the data from the &lt;br /&gt;
  variable VARNAME in the netCDF file NCFILE.&lt;br /&gt;
 &lt;br /&gt;
  DATA = NC_VARGET(NCFILE,VARNAME,START,COUNT) retrieves the contiguous&lt;br /&gt;
  portion of the variable specified by the index vectors START and &lt;br /&gt;
  COUNT.  Remember that SNCTOOLS indexing is zero-based, not &lt;br /&gt;
  one-based.  Specifying a -1 in COUNT means to retrieve everything &lt;br /&gt;
  along that dimension from the START coordinate.&lt;br /&gt;
 &lt;br /&gt;
  DATA = NC_VARGET(NCFILE,VARNAME,START,COUNT,STRIDE) retrieves &lt;br /&gt;
  a non-contiguous portion of the dataset.  The amount of&lt;br /&gt;
  skipping along each dimension is given through the STRIDE vector.&lt;br /&gt;
 &lt;br /&gt;
  NCFILE can also be an OPeNDAP URL if the proper SNCTOOLS backend is&lt;br /&gt;
  installed.  See the README for details.&lt;br /&gt;
  &lt;br /&gt;
  NC_VARGET tries to be intelligent about retrieving the data.&lt;br /&gt;
  Since most general matlab operations are done in double precision,&lt;br /&gt;
  retrieved numeric data will be cast to double precision, while &lt;br /&gt;
  character data remains just character data.  &lt;br /&gt;
 &lt;br /&gt;
  Singleton dimensions are removed from the output data.  &lt;br /&gt;
 &lt;br /&gt;
  A '_FillValue' attribute is honored by flagging those datums as NaN.&lt;br /&gt;
  A 'missing_value' attribute is honored by flagging those datums as &lt;br /&gt;
  NaN.  The exception to this is for NC_CHAR variables, as mixing &lt;br /&gt;
  character data and NaN doesn't really seem to work in matlab.&lt;br /&gt;
 &lt;br /&gt;
  If the named NetCDF variable has valid scale_factor and add_offset &lt;br /&gt;
  attributes, then the data is scaled accordingly.  &lt;br /&gt;
 &lt;br /&gt;
  EXAMPLE:&lt;br /&gt;
  #1.  In this case, the variable in question has rank 2, and has size &lt;br /&gt;
       500x700.  We want to retrieve starting at row 300, column 250.&lt;br /&gt;
       We want 100 contiguous rows, 200 contiguous columns.&lt;br /&gt;
  &lt;br /&gt;
       vardata = nc_varget ( file, variable_name, [300 250], [100 200] );&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
===dump===&lt;br /&gt;
 &amp;gt;&amp;gt; nc_dump('http://data.mohid.com/opendap/nph-dods/mercator-ist/Portugal/20080409_Portugal_WaterProperties.nc')&lt;br /&gt;
 netcdf  http://data.mohid.com/opendap/nph-dods/mercator-ist/Portugal/20080409_Portugal_WaterProperties.nc { &lt;br /&gt;
 &lt;br /&gt;
 dimensions:&lt;br /&gt;
 	time = UNLIMITED ; (8 currently)&lt;br /&gt;
 	lat = 177 ;&lt;br /&gt;
 	lon = 117 ;&lt;br /&gt;
 	lat_staggered = 178 ;&lt;br /&gt;
 	lon_staggered = 118 ;&lt;br /&gt;
 	depth = 42 ;&lt;br /&gt;
  &lt;br /&gt;
 &lt;br /&gt;
 variables:&lt;br /&gt;
 	double time(time), shape = [8]&lt;br /&gt;
 		time:long_name = &amp;quot;time&amp;quot; &lt;br /&gt;
 		time:standard_name = &amp;quot;time&amp;quot; &lt;br /&gt;
 		time:units = &amp;quot;seconds since 2008-04-04 12:00:00&amp;quot; &lt;br /&gt;
 	float lat(lat), shape = [177]&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
===read dimension variable===&lt;br /&gt;
 &amp;gt;&amp;gt; lon=nc_varget('http://data.mohid.com/opendap/nph-dods/mercator-ist/Portugal/20080409_Portugal_WaterProperties.nc', 'lon')&lt;br /&gt;
 &lt;br /&gt;
 lon =&lt;br /&gt;
 &lt;br /&gt;
   -12.5700&lt;br /&gt;
   -12.5100&lt;br /&gt;
   -12.4500&lt;br /&gt;
   -12.3900&lt;br /&gt;
   -12.3300&lt;br /&gt;
   -12.2700&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
===read bathymetry variable===&lt;br /&gt;
 &amp;gt;&amp;gt; bathym=nc_varget('http://data.mohid.com/opendap/nph-dods/mercator-ist/Portugal/20080409_Portugal_WaterProperties.nc', 'bathymetry', [0 0], [116 176], [1 1]);&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
*[http://mexcdf.sourceforge.net/ mexnc and snctools homepage]&lt;br /&gt;
*[http://mexcdf.sourceforge.net/tutorial/ch02.html Snctools manual]&lt;br /&gt;
&lt;br /&gt;
[[Category:Matlab]]&lt;br /&gt;
[[Category:Netcdf]]&lt;br /&gt;
[[Category:Tools]]&lt;/div&gt;</summary>
		<author><name>192.168.20.177</name></author>	</entry>

	</feed>
<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
  ga('create', 'UA-56589921-5', 'auto');
  ga('send', 'pageview');
</script>