That .cdl file opens readily in a basic text editor. It consists of a page of metadata of which the most interesting is flag_meanings = "none gimpdem mass_conservation none interpolation hydrodstatic_equilibrium kriging", then many pages of what I take as fill-in of the rectangular grid where there was no actual data (which will correspond to alpha channel in an eventual image).
Then come many pages of positive and negative numbers, 24 to a line, which seem to have a limited range of like -330 to 1159 and so could be the long-sought bedrock elevations themselves in meters).
I was expecting a semi-colon to be used as line break but it is only used as end of file. The grid is x = 10018 by y = 17946 which, depending how they are stepping through the array, says the line break symbol should come at 416 or 747 lines. It is the former as they are using blocks of 10018 that are distinguished by two spaces at the start and four spaces that begin each subsequent line. The end of the block has an ordinary single carriage return as do each of the internal lines.
This gives a satisfactory enough handle to quickly grep the data blocks into excel-readable comma separated value CSV format: delete space space space space, change comma space to comma, delete all CR, change space space to CR or end-of-block symbol CR.
From there it should be openable as a grayscale in ImageJ as a BMP or raw file. I'm thinking elevations have to be normalized to fit the 16 bit range and format conditions. That would involve an offset by the smallest negative to make everything positive and then division by the largest elevation followed by multiplication by 255 to put everything in [0,255] for 8 bit. Sounds simple enough but could be challenging given the sheer size of the array.
The resulting image would be 10018 x 17946 = 179,783,028 pixels or 179 MB which is about a fifth of a Landsat 15 m 16 bit file so quite manageable. However at 72 dpi it would take an 11 x 20 foot monitor to see it all, and a blog width of 700 pixels by 1254 height would require rescaling by 14:1 to 7%.
So here the first thing I would do is dumb it down in size by bicubic interpolation, 25% would give 4x4=16 fold reduction in file size and dimensions of 2504 by 4486 and 10% would just fill my monitor. It would be better to doing this much earlier on in the netCDF process, pre-dumping.
I'm not clear on what the lat,lon corners are, so not clear what the ground resolution is, for example if the calving front is 6 km wide, how many y numbers do we have on a transect of the channel? I suppose the resolution is in the Morlighem paper which probably uses the same grid as the Bamber paper.
It might be better to somehow tile the ncdump so that particular pieces of the Jakobshavn channel could be done at higher resolution. That is what Howat is doing on these gigantic 2 m resolution WorldView files. Then the end user downloads and tiles up just what they need, rather than cutting down a giant file.
Great progress, much thanks to jim and sidd here.
The data looks like this ...
bed =
_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _,
_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _,
_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _,
_, _, _, _, _, 12, 14, 19, 25, 37, 55, 79, 100, 113, 118, 114, 109, 101,
90, 76, 60, 47, 33, _, _, _, _, _, 16, 14, 13, _, 12, 11, _, _, _, _, _,
_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, 13, 14, 24, 47, 63, 100,
134, 165, 195, 220, 242, 264, 283, 298, 310, 319, 326, 330, 332, 332,
285, 233, 195, 161, 124, 82, 44, 0, -43, -84, -121, -144, -164, -178,
-185, -193, -194, -197, -198, -201, -203, -202, -200, -199, -189, -181,
-169, -156, -140, -124, -111, -100, -91, -85, -77, -68, -64, -61, -64,
netcdf MCdataset-2014-11-19 {
dimensions:
x = 10018 ;
y = 17946 ;
variables:
int x(x) ;
x:long_name = "Cartesian x-coordinate" ;
x:standard_name = "projection_x_coordinate" ;
x:units = "meter" ;
int y(y) ;
y:long_name = "Cartesian y-coordinate" ;
y:standard_name = "projection_y_coordinate" ;
y:units = "meter" ;
byte mask(y, x) ;
mask:long_name = "ma
...