Re: [netcdfgroup] File offsets in header

Hi Duane,

The documentation for the netCDF "classic" format is here:

  http://www.unidata.ucar.edu/netcdf/docs/netcdf.html#NetCDF-Classic-Format

but here's a picture from the online netCDF training workshop that might
clarify how the data is organized:

  
http://www.unidata.ucar.edu/netcdf/workshops/2012/performance/ClassicParts.html

--Russ
  
> This is a multipart message in MIME format.
> 
> --===============1971848916==
> Content-Type: multipart/alternative;
>       boundary="----=_NextPart_000_0004_01CE3A7A.35C66A60"
> Content-Language: en-us
> 
> This is a multipart message in MIME format.
> 
> ------=_NextPart_000_0004_01CE3A7A.35C66A60
> Content-Type: text/plain;
>       charset="us-ascii"
> Content-Transfer-Encoding: 7bit
> 
> Hello, I wrote a small utility for parsing NetCDF files, and am not
> understanding how the variable parameters [vsize] and [begin] are used when
> a record dimension is present. A typical file containing monthly
> precipitation has dimensions lat, lon and time, with time being unlimited.
> The [begin] values for lat and lon are as expected. The [begin] for precip
> is what I would expect -- since time values do not seem to be stored, but
> rather are derived from the metadata, I would expect the precip values to
> begin immediately after lat and lon. The [vsize] is not at all what I'd
> expect. I would think it should be n-lat * n-lon * n-time-records *
> sizeof(precip), but instead it is n-lat * n-lon * sizeof(precip). That leads
> to the [begin] value for time, which I would not think should even exist.
> The [vsize] for time is what the documentation explains, which is
> sizeof(time). In short, the header suggests that the precip consists of a
> single time interval, and that there is a block of time values. Obviously
> I'm misinterpreting the values. I have not been able to find any
> documentation that makes this clear. Any direction would be appreciated.
> 
>  
> 
> Duane 
> 
> 
> ------=_NextPart_000_0004_01CE3A7A.35C66A60
> Content-Type: text/html;
>       charset="us-ascii"
> Content-Transfer-Encoding: quoted-printable
> 
> <html xmlns:v=3D"urn:schemas-microsoft-com:vml" =
> xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
> xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
> xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml"; =
> xmlns=3D"http://www.w3.org/TR/REC-html40";><head><meta =
> http-equiv=3DContent-Type content=3D"text/html; =
> charset=3Dus-ascii"><meta name=3DGenerator content=3D"Microsoft Word 14 =
> (filtered medium)"><style><!--
> /* Font Definitions */
> @font-face
>       {font-family:Calibri;
>       panose-1:2 15 5 2 2 2 4 3 2 4;}
> /* Style Definitions */
> p.MsoNormal, li.MsoNormal, div.MsoNormal
>       {margin:0in;
>       margin-bottom:.0001pt;
>       font-size:11.0pt;
>       font-family:"Calibri","sans-serif";}
> a:link, span.MsoHyperlink
>       {mso-style-priority:99;
>       color:blue;
>       text-decoration:underline;}
> a:visited, span.MsoHyperlinkFollowed
>       {mso-style-priority:99;
>       color:purple;
>       text-decoration:underline;}
> span.EmailStyle17
>       {mso-style-type:personal-compose;
>       font-family:"Calibri","sans-serif";
>       color:windowtext;}
> .MsoChpDefault
>       {mso-style-type:export-only;
>       font-family:"Calibri","sans-serif";}
> @page WordSection1
>       {size:8.5in 11.0in;
>       margin:1.0in 1.0in 1.0in 1.0in;}
> div.WordSection1
>       {page:WordSection1;}
> --></style><!--[if gte mso 9]><xml>
> <o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
> </xml><![endif]--><!--[if gte mso 9]><xml>
> <o:shapelayout v:ext=3D"edit">
> <o:idmap v:ext=3D"edit" data=3D"1" />
> </o:shapelayout></xml><![endif]--></head><body lang=3DEN-US link=3Dblue =
> vlink=3Dpurple><div class=3DWordSection1><p class=3DMsoNormal>Hello, I =
> wrote a small utility for parsing NetCDF files, and am not understanding =
> how the variable parameters [vsize] and [begin] are used when a record =
> dimension is present. A typical file containing monthly precipitation =
> has dimensions lat, lon and time, with time being unlimited. &nbsp;The =
> [begin] values for lat and lon are as expected. The [begin] for precip =
> is what I would expect -- since time values do not seem to be stored, =
> but rather are derived from the metadata, I would expect the precip =
> values to begin immediately after lat and lon. The [vsize] is not at all =
> what I&#8217;d expect. I would think it should be n-lat * n-lon * =
> n-time-records * sizeof(precip), but instead it is n-lat * n-lon * =
> sizeof(precip). That leads to the [begin] value for time, which I would =
> not think should even exist. The [vsize] for time is what the =
> documentation explains, which is sizeof(time). In short, the header =
> suggests that the precip consists of a single time interval, and that =
> there is a block of time values. Obviously I&#8217;m misinterpreting the =
> values. I have not been able to find any documentation that makes this =
> clear. Any direction would be appreciated.<o:p></o:p></p><p =
> class=3DMsoNormal><o:p>&nbsp;</o:p></p><p class=3DMsoNormal>Duane =
> <o:p></o:p></p></div></body></html>
> ------=_NextPart_000_0004_01CE3A7A.35C66A60--
> 
> 
> --===============1971848916==
> Content-Type: text/plain; charset="us-ascii"
> MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
> Content-Disposition: inline
> 
> _______________________________________________
> netcdfgroup mailing list
> netcdfgroup@xxxxxxxxxxxxxxxx
> For list information or to unsubscribe,  visit: http://www.unidata.ucar.edu/m
> ailing_lists/ 
> --===============1971848916==--



  • 2013 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: