I have some meteorological data wich are exported to netCDF
format and I want to display them in Google Maps.
I tried the Panoply software, mainly following these http://marinedataliteracy.org/ops/pano_gridsvecs.htm instructions and succesfully exported the data into .kml
files.
The kml file displays fine in Google Earth, but when loading it in Google Maps nothing is being displayed.
The JavaScript code that is loading the kml is definitely correct, because other types of kml are displayed correctly. Just in case, this is the code:
var kmzLayer = new google.maps.KmlLayer("LINK_TO_KML");
kmzLayer.setMap(map);
There is also a project called netcdf2gmaps
here http://code.google.com/p/netcdf2gmaps/ but it seems abandoned and there is no feedback for it.
So is there any way to display the netCDF data to Google Maps?
To read a netCDF file of known structure, you need to: open the file - Specify the file name and whether you want read-write or read-only access. read variable or attribute data - Read the data or attributes of interest. close the file - Release all resources associated with this file.
I don't know if you solved your problem, but for reference to question title I thought to add more info.
Panoply (or IDV) export to KMZ (zipped KML) in a manner of simple PNG snapshot of their current display and lon/lat boundaries, like this:
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.0">
<GroundOverlay>
<name>Maximum_temperature_Maximum_unwe in GEFS_Global_1p0deg_Ensemble_deri</name>
<Icon>
<href>Maximum_temperature_Maximum_unwe in GEFS_Global_1p0deg_Ensemble_deri.png</href>
</Icon>
<LatLonBox>
<west>-29.1622</west>
<north>55.0</north>
<east>49.1622</east>
<south>25.0</south>
</LatLonBox>
</GroundOverlay>
</kml>
And that seems like only way to Google Earth interface - bitmap images. Which is a sad fact that Google Earth is not designed for visualization or numerical model data, as it can't represent varaious other features.
If overlaying bitmap in Google Earth/Maps is the task than as you have already noticed it's just a matter of double clicking produced KMZ file:
or for Google Maps, uploading the file and pasting the path in Google Maps search bar:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With