Conversion of NetCDF dataset to NetCDF-CF dataset


I am interested to use Vapor for flow visualisation of the results from a computational Fluid Dynamics (CFD) simulation code called Fire Dynamics Simulation (FDS). I have the results of FDS in a NetCDF format. I had converted it to NetCDF-CF format using some examples from “Example netCDF files
. However it doesn’t work at all in Vapor, when I load it.

I am attaching the ‘ncdump -h’ of the NetCDF-CF file.

Could you help me solve the issue ?

Thanks in advance

That looks correct at first glance. Can you share one of your files so we can take a look?

Thank you for your answer. I am attaching my NetCDF file here.

NetCDF file

I would be happy to know how to make it work in Vapor

This is strange. When I apply ncdump to the file on my macOS M1 machine, I get nothing back from the console. When I apply it on NCAR’s Casper cluster, I get the screenshot below, which does not show any attribute metadata.

Could you confirm that the file you provided is giving you the ncdump output provided in your original post after re-downloading it from the server? I’m wondering if might be modifying the binary file.

Hi Pearse,

My apologies. I had attached the raw NetCDF file instead of the NetCDF-CF file.

I am attaching the NetCDF-CF file here.

I created this with my macOS M1 max, so I hope it works on your macOS machine too. I would be happy to know why this file is not working properly on Vapor.

Thanks in advance

Hey Rakesh, I just wanted to let you know I haven’t forgotten about this. I’m swamped right now but I’m hoping to take a look at this next week. Sorry for the delay.

Hi Rakesh, have you had a chance to try visualizing the same file on a non-Apple M1 macbook? A x86 macbook or a linux machine would have better odds working correctly.

Hi Pearse, The link I posted earlier expired. This is the current link for the NetCDF-CF file

You can check this at your availability, thanks

Hi Sam, thank you for your answer. I tried the same file in a windows machine, and it still doesn’t work. I don’t have access to a linux machine. I can try linux on a virtual environment, and will keep you posted


@Rakesh I have the file and I need more time to look further into this. The thing that stands out to me right now is that the dimension ordering of your coordinate variables doesn’t follow the netCDF standard of time, Z, Y, X. Your MethaneVF variable does though. Reordering the coordinate variable dimensions might fix the problem. More info soon.

@Rakesh I wanted to just give you an update that I’m still looking into this and that reordering the dimensions does not fix the issue. Thank you for your patience.

Hi @Rakesh, a couple notes on what’s going on here.

Your data seems to be rectilinear, but is described as unstructured. Vapor does not support unstructured NetCDF data, but I think you can fix this.

If the data really is regular and rectilinear, your lat, lon, and z coordinate variables should be 1-dimensional and be functions of their dimension with the same name. If it’s curvilinear, lat and lon should be 2 dimensional, ie lat(lat,lon) and lon(lat,lon). The data also has to be monotonically increasing.

Either way, Vapor should be reporting an error when unstructured NetCDF data like this is loaded. I’ve submitted a new bug report that we will look into. Thank again for your patience and I hope that this helps.