5/24/2023 0 Comments Panoply netcdf![]() Title: Native Format Berkeley Earth Surface Temperature An. Ĭonventions: Berkeley Earth Internal Convention (based on CF-1.5) Ĭlimatology (month_number, map_points) float32. 2.02e+03 2.02e+03ĭimensions without coordinates: map_points, month_number In : ds = xr.open_dataset('Complete_TAVG_EqualArea.nc')ĭimensions: (map_points: 5498, month_number: 12, time: 3240) I repeat the info here with my version of Xarray, which seems to a bit more verbose. You therefore cannot simply convert any netCDF file to CSV. ![]() A CSV file can only contain a single array of maximal 2 dimensions (or a set of 1D arrays if they all have the same length). A netCDF file can contain multiple arrays of any shape and size. ![]() What you are missing is that netCDF is a much more sophisticated format than CVS. CSV export appears to work only to export a single variable (which I'd like to see as a column) into a single-line file. MiB for an array with shape (279127962,) and data type int16 MemoryError Traceback (most recent call last) In : nc = xr.open_dataset('Complete_TAVG_Daily_EqualArea.nc')ĭimensions: (map_points: 5498, time: 50769)ĭimensions without coordinates: map_points, time I've tried loading the data into a pandas dataframe with xarray.to_dataframe(), but my notebook cannot allocate the required memory.I couldn't find any instruction on how to do so. ncdump from the netCDF utilities does not appear to generate an actual CSV file.I realize similar questions have been raised before, but I couldn't apply any of the solutions I came across. I'm struggling to convert several Berekeley Earth netCDF files into CSV or another tabular format.
0 Comments
Leave a Reply. |