Closed GoogleCodeExporter closed 8 years ago
Just a few lines above the 'print len(lon)' there is this:
>>> lon = rootgrp.createDimension('lon', 144)
so I don't see what you mean.
Note also that the complete tutorial code is in examples/tutorial.py.
Original comment by whitaker.jeffrey@gmail.com
on 23 Oct 2013 at 7:35
OK, thanks for getting back to me.
It seems the tutorial wasn't quite doing exactly what the person asking the
StackOverflow question above was hoping for. The code in the tutorial creates
dimensions, whereas the person asking the question was looking to read existing
dimensions. It seems they tried unsuccessfully to adapt the tutorial code to
their situation, quite probably because they are unfamiliar with Python.
It's unfortunate that someone spent an hour reading the documentation and
struggling with netCDF4, but I imagine that all of us programmers have at least
once in the past spent an hour or more struggling with a bit of code because we
can't see the elementary mistake we've made.
I take back any comment that there is a defect in the documentation. I
apologise for missing the line of code you mentioned above, and for not
identifying that the tutorial aims to do something slightly different to what
the StackOverflow questioner was asking. I've also updated my StackOverflow
answer appropriately. Please feel free to close this issue as 'not an issue'
or suchlike - I'm not sure I can do this myself.
Original comment by lackofl...@googlemail.com
on 24 Oct 2013 at 7:15
Original comment by whitaker.jeffrey@gmail.com
on 26 Feb 2014 at 2:04
Original issue reported on code.google.com by
lackofl...@googlemail.com
on 23 Oct 2013 at 6:54