Paraview unable to render World Ocean Atlas NetCDF files

I am trying to visualize the .nc files belonging to the World Ocean Data Atlas, obtained from UNICAR/NOAA repository. I tried to read the data using the readers - NetCDF CAM Reader, NetCDF Reader and VisitNetCDFCCSM_STSDReader, using Paraview 5.7.0. But none of the readers are able to read and render the data contained in the .nc file. Any help towards visualizing this would be of great help.

Thank You in advance. I am posting the contents of the .nc file below -

******* File Content Start ******

netcdf woa13_A5B2_s01_01 {
dimensions:
nbounds = 2 ;
lat = 180 ;
lon = 360 ;
depth = 57 ;
time = 1 ;
variables:
int crs ;
crs:grid_mapping_name = “latitude_longitude” ;
crs:epsg_code = “EPSG:4326” ;
crs:longitude_of_prime_meridian = 0.f ;
crs:semi_major_axis = 6378137.f ;
crs:inverse_flattening = 298.2572f ;
float lat(lat) ;
lat:standard_name = “latitude” ;
lat:long_name = “latitude” ;
lat:units = “degrees_north” ;
lat:axis = “Y” ;
lat:bounds = “lat_bnds” ;
float lat_bnds(lat, nbounds) ;
lat_bnds:comment = “latitude bounds” ;
float lon(lon) ;
lon:standard_name = “longitude” ;
lon:long_name = “longitude” ;
lon:units = “degrees_east” ;
lon:axis = “X” ;
lon:bounds = “lon_bnds” ;
float lon_bnds(lon, nbounds) ;
lon_bnds:comment = “longitude bounds” ;
float depth(depth) ;
depth:standard_name = “depth” ;
depth:bounds = “depth_bnds” ;
depth:positive = “down” ;
depth:units = “meters” ;
depth:axis = “Z” ;
float depth_bnds(depth, nbounds) ;
depth_bnds:comment = “depth bounds” ;
float time(time) ;
time:standard_name = “time” ;
time:long_name = “time” ;
time:units = “months since 0000-01-01 00:00:00” ;
time:axis = “T” ;
time:climatology = “climatology_bounds” ;
float climatology_bounds(time, nbounds) ;
climatology_bounds:comment = “This variable defines the bounds of the climatological time period for each time” ;
float s_an(time, depth, lat, lon) ;
s_an:standard_name = “sea_water_salinity” ;
s_an:long_name = “Objectively analyzed mean fields for sea_water_salinity at standard depth levels.” ;
s_an:coordinates = “time lat lon depth” ;
s_an:cell_methods = “area: mean depth: mean time: mean” ;
s_an:grid_mapping = “crs” ;
s_an:units = “1” ;
s_an:_FillValue = 9.96921e+36f ;
float s_mn(time, depth, lat, lon) ;
s_mn:standard_name = “sea_water_salinity” ;
s_mn:long_name = “Average of all unflagged interpolated values at each standard depth level for sea_water_salinity in each grid-square which contain at least one measurement.” ;
s_mn:coordinates = “time lat lon depth” ;
s_mn:cell_methods = “area: mean depth: mean time: mean” ;
s_mn:grid_mapping = “crs” ;
s_mn:units = “1” ;
s_mn:_FillValue = 9.96921e+36f ;
int s_dd(time, depth, lat, lon) ;
s_dd:standard_name = “sea_water_salinity number_of_observations” ;
s_dd:long_name = “The number of observations of sea_water_salinity in each grid-square at each standard depth level.” ;
s_dd:coordinates = “time lat lon depth” ;
s_dd:cell_methods = “area: sum depth: point time: sum” ;
s_dd:grid_mapping = “crs” ;
s_dd:units = “1” ;
s_dd:_FillValue = -32767 ;
float s_sd(time, depth, lat, lon) ;
s_sd:long_name = “The standard deviation about the statistical mean of sea_water_salinity in each grid-square at each standard depth level.” ;
s_sd:coordinates = “time lat lon depth” ;
s_sd:cell_methods = “area: mean depth: mean time: standard_deviation” ;
s_sd:grid_mapping = “crs” ;
s_sd:units = “1” ;
s_sd:_FillValue = 9.96921e+36f ;
float s_se(time, depth, lat, lon) ;
s_se:standard_name = “sea_water_salinity standard_error” ;
s_se:long_name = “The standard error about the statistical mean of sea_water_salinity in each grid-square at each standard depth level.” ;
s_se:coordinates = “time lat lon depth” ;
s_se:cell_methods = “area: mean depth: mean time: mean” ;
s_se:grid_mapping = “crs” ;
s_se:units = “1” ;
s_se:_FillValue = 9.96921e+36f ;
float s_oa(time, depth, lat, lon) ;
s_oa:standard_name = “sea_water_salinity” ;
s_oa:long_name = “statistical mean value minus the objectively analyzed mean value for sea_water_salinity.” ;
s_oa:coordinates = “time lat lon depth” ;
s_oa:cell_methods = “area: mean depth: mean time: mean” ;
s_oa:grid_mapping = “crs” ;
s_oa:units = “1” ;
s_oa:_FillValue = 9.96921e+36f ;
float s_ma(time, depth, lat, lon) ;
s_ma:standard_name = “sea_water_salinity” ;
s_ma:long_name = " The objectively analyzed value for the given time period minus the objectively analyzed annual mean value for sea_water_salinity." ;
s_ma:coordinates = “time lat lon depth” ;
s_ma:cell_methods = “area: mean depth: mean time: mean” ;
s_ma:grid_mapping = “crs” ;
s_ma:units = “1” ;
s_ma:_FillValue = 9.96921e+36f ;
int s_gp(time, depth, lat, lon) ;
s_gp:standard_name = “sea_water_salinity” ;
s_gp:long_name = “The number of grid-squares within the smallest radius of influence around each grid-square which contain a statistical mean for sea_water_salinity.” ;
s_gp:coordinates = “time lat lon depth” ;
s_gp:cell_methods = “area: mean depth: mean time: mean” ;
s_gp:grid_mapping = “crs” ;
s_gp:units = “1” ;
s_gp:_FillValue = -32767 ;

// global attributes:
:Conventions = “CF-1.6” ;
:title = “World Ocean Atlas 2013 version 2 : sea_water_salinity January 1.00 degree” ;
:summary = “Climatological mean salinity for the global ocean from in situ profile data” ;
:references = “Zweng, M. M, J. R. Reagan, J. I. Antonov, R. A. Locarnini, A. V. Mishonov, T. P. Boyer, H. E. Garcia, O. K. Baranova, C. R. Paver, D. R. Johnson, D. Seidov, M. Biddle, , 2013: World Ocean Atlas 2013, Volume 2: Salinity. S. Levitus, Ed., A. Mishonov, technical editr, NOAA Atlas NESDIS 74.” ;
:institution = “National Oceanographic Data Center(NODC)” ;
:comment = “global climatology as part of the World Ocean Atlas project” ;
:id = “woa13_A5B2_s01_01.nc” ;
:naming_authority = “gov.noaa.nodc” ;
:standard_name_vocabulary = “NetCDF Climate and Forecast (CF) Metadata Convention Standard Name Table v29” ;
:sea_name = “World-Wide Distribution” ;
:time_coverage_start = “0000-01-01” ;
:time_coverage_duration = “P01M” ;
:time_coverage_resolution = “P01M” ;
:geospatial_lat_min = -90.f ;
:geospatial_lat_max = 90.f ;
:geospatial_lon_min = -180.f ;
:geospatial_lon_max = 180.f ;
:geospatial_vertical_min = 0.f ;
:geospatial_vertical_max = 1500.f ;
:geospatial_lat_units = “degrees_north” ;
:geospatial_lat_resolution = “1.00 degrees” ;
:geospatial_lon_units = “degrees_east” ;
:geospatial_lon_resolution = “1.00 degrees” ;
:geospatial_vertical_units = “m” ;
:geospatial_vertical_resolution = “” ;
:geospatial_vertical_positive = “down” ;
:creator_name = “Ocean Climate Laboratory” ;
:creator_email = "NODC.Services@noaa.gov" ;
:creator_url = “http://www.nodc.noaa.gov” ;
:project = “World Ocean Atlas” ;
:processing_level = “processed” ;
:keywords = “<ISO_TOPIC_Category> Oceans</ISO_TOPIC_Category>” ;
:keywords_vocabulary = “ISO 19115” ;
:contributor_name = “Ocean Climate Laboratory” ;
:contributor_role = “Calculation of climatologies” ;
:cdm_data_type = “Grid” ;
:publisher_name = “National Oceanographic Data Center” ;
:publisher_url = “http://www.nodc.noaa.gov/” ;
:publisher_email = "NODC.Services@noaa.gov" ;
:nodc_template_version = “NODC_NetCDF_Grid_Template_v1.0” ;
:license = “These data are openly available to the public. Please acknowledge the use of these data with the text given in the acknowledgment attribute.” ;
:Metadata_Conventions = “Unidata Dataset Discovery v1.0” ;
:metadata_link = “http://www.nodc.noaa.gov/OC5/WOA13/pr_woa13.html” ;
:date_created = "2011-09-28 " ;
:date_modified = "2011-09-28 " ;
data:

lat = -89.5, -88.5, -87.5, -86.5, -85.5, -84.5, -83.5, -82.5, -81.5, -80.5,
-79.5, -78.5, -77.5, -76.5, -75.5, -74.5, -73.5, -72.5, -71.5, -70.5,
-69.5, -68.5, -67.5, -66.5, -65.5, -64.5, -63.5, -62.5, -61.5, -60.5,
-59.5, -58.5, -57.5, -56.5, -55.5, -54.5, -53.5, -52.5, -51.5, -50.5,
-49.5, -48.5, -47.5, -46.5, -45.5, -44.5, -43.5, -42.5, -41.5, -40.5,
-39.5, -38.5, -37.5, -36.5, -35.5, -34.5, -33.5, -32.5, -31.5, -30.5,
-29.5, -28.5, -27.5, -26.5, -25.5, -24.5, -23.5, -22.5, -21.5, -20.5,
-19.5, -18.5, -17.5, -16.5, -15.5, -14.5, -13.5, -12.5, -11.5, -10.5,
-9.5, -8.5, -7.5, -6.5, -5.5, -4.5, -3.5, -2.5, -1.5, -0.5, 0.5, 1.5,
2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 8.5, 9.5, 10.5, 11.5, 12.5, 13.5, 14.5,
15.5, 16.5, 17.5, 18.5, 19.5, 20.5, 21.5, 22.5, 23.5, 24.5, 25.5, 26.5,
27.5, 28.5, 29.5, 30.5, 31.5, 32.5, 33.5, 34.5, 35.5, 36.5, 37.5, 38.5,
39.5, 40.5, 41.5, 42.5, 43.5, 44.5, 45.5, 46.5, 47.5, 48.5, 49.5, 50.5,
51.5, 52.5, 53.5, 54.5, 55.5, 56.5, 57.5, 58.5, 59.5, 60.5, 61.5, 62.5,
63.5, 64.5, 65.5, 66.5, 67.5, 68.5, 69.5, 70.5, 71.5, 72.5, 73.5, 74.5,
75.5, 76.5, 77.5, 78.5, 79.5, 80.5, 81.5, 82.5, 83.5, 84.5, 85.5, 86.5,
87.5, 88.5, 89.5 ;

lon = -179.5, -178.5, -177.5, -176.5, -175.5, -174.5, -173.5, -172.5,
-171.5, -170.5, -169.5, -168.5, -167.5, -166.5, -165.5, -164.5, -163.5,
-162.5, -161.5, -160.5, -159.5, -158.5, -157.5, -156.5, -155.5, -154.5,
-153.5, -152.5, -151.5, -150.5, -149.5, -148.5, -147.5, -146.5, -145.5,
-144.5, -143.5, -142.5, -141.5, -140.5, -139.5, -138.5, -137.5, -136.5,
-135.5, -134.5, -133.5, -132.5, -131.5, -130.5, -129.5, -128.5, -127.5,
-126.5, -125.5, -124.5, -123.5, -122.5, -121.5, -120.5, -119.5, -118.5,
-117.5, -116.5, -115.5, -114.5, -113.5, -112.5, -111.5, -110.5, -109.5,
-108.5, -107.5, -106.5, -105.5, -104.5, -103.5, -102.5, -101.5, -100.5,
-99.5, -98.5, -97.5, -96.5, -95.5, -94.5, -93.5, -92.5, -91.5, -90.5,
-89.5, -88.5, -87.5, -86.5, -85.5, -84.5, -83.5, -82.5, -81.5, -80.5,
-79.5, -78.5, -77.5, -76.5, -75.5, -74.5, -73.5, -72.5, -71.5, -70.5,
-69.5, -68.5, -67.5, -66.5, -65.5, -64.5, -63.5, -62.5, -61.5, -60.5,
-59.5, -58.5, -57.5, -56.5, -55.5, -54.5, -53.5, -52.5, -51.5, -50.5,
-49.5, -48.5, -47.5, -46.5, -45.5, -44.5, -43.5, -42.5, -41.5, -40.5,
-39.5, -38.5, -37.5, -36.5, -35.5, -34.5, -33.5, -32.5, -31.5, -30.5,
-29.5, -28.5, -27.5, -26.5, -25.5, -24.5, -23.5, -22.5, -21.5, -20.5,
-19.5, -18.5, -17.5, -16.5, -15.5, -14.5, -13.5, -12.5, -11.5, -10.5,
-9.5, -8.5, -7.5, -6.5, -5.5, -4.5, -3.5, -2.5, -1.5, -0.5, 0.5, 1.5,
2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 8.5, 9.5, 10.5, 11.5, 12.5, 13.5, 14.5,
15.5, 16.5, 17.5, 18.5, 19.5, 20.5, 21.5, 22.5, 23.5, 24.5, 25.5, 26.5,
27.5, 28.5, 29.5, 30.5, 31.5, 32.5, 33.5, 34.5, 35.5, 36.5, 37.5, 38.5,
39.5, 40.5, 41.5, 42.5, 43.5, 44.5, 45.5, 46.5, 47.5, 48.5, 49.5, 50.5,
51.5, 52.5, 53.5, 54.5, 55.5, 56.5, 57.5, 58.5, 59.5, 60.5, 61.5, 62.5,
63.5, 64.5, 65.5, 66.5, 67.5, 68.5, 69.5, 70.5, 71.5, 72.5, 73.5, 74.5,
75.5, 76.5, 77.5, 78.5, 79.5, 80.5, 81.5, 82.5, 83.5, 84.5, 85.5, 86.5,
87.5, 88.5, 89.5, 90.5, 91.5, 92.5, 93.5, 94.5, 95.5, 96.5, 97.5, 98.5,
99.5, 100.5, 101.5, 102.5, 103.5, 104.5, 105.5, 106.5, 107.5, 108.5,
109.5, 110.5, 111.5, 112.5, 113.5, 114.5, 115.5, 116.5, 117.5, 118.5,
119.5, 120.5, 121.5, 122.5, 123.5, 124.5, 125.5, 126.5, 127.5, 128.5,
129.5, 130.5, 131.5, 132.5, 133.5, 134.5, 135.5, 136.5, 137.5, 138.5,
139.5, 140.5, 141.5, 142.5, 143.5, 144.5, 145.5, 146.5, 147.5, 148.5,
149.5, 150.5, 151.5, 152.5, 153.5, 154.5, 155.5, 156.5, 157.5, 158.5,
159.5, 160.5, 161.5, 162.5, 163.5, 164.5, 165.5, 166.5, 167.5, 168.5,
169.5, 170.5, 171.5, 172.5, 173.5, 174.5, 175.5, 176.5, 177.5, 178.5,
179.5 ;

depth = 0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80,
85, 90, 95, 100, 125, 150, 175, 200, 225, 250, 275, 300, 325, 350, 375,
400, 425, 450, 475, 500, 550, 600, 650, 700, 750, 800, 850, 900, 950,
1000, 1050, 1100, 1150, 1200, 1250, 1300, 1350, 1400, 1450, 1500 ;

time = 0.5 ;
}

******* File Content End ********

When you say this is “the contents of the .nc”, do you mean it is literally the contents of the file (i.e. what you would get with cat woa13_A5B2_s01_01.nc) or the representation of what is in the file (i.e. what you would get with ncdump woa13_A5B2_s01_01.nc)? The text you put itself is not a valid netCDF format, but it makes sense as a description of what would be in one.

It would be helpful if you could post the file or a link to the file.

Thank You for the reply, Kenneth.

You are right, what I had pasted above is the result of the command -
‘ncdump -c woa13_A5B2_s01_01.nc’

The link to the actual file is -

https://data.nodc.noaa.gov/thredds/catalog/nodc/archive/data/0114815/public/salinity/netcdf/A5B2/1.00/catalog.html?dataset=nodc/archive/data/0114815/public/salinity/netcdf/A5B2/1.00/woa13_A5B2_s01_01.nc

The file can be downloaded from any of the access servers mentioned in the above link. I used the OPENDAP link.

I am trying to visualize this woa13_A5B2_s01_01.nc file from the UNICAR/NOAA repository, using Paraview 5.7.0. I tried to read the data using the readers - NetCDF CAM Reader, NetCDF Reader and VisitNetCDFCCSM_STSDReader, available in Paraview 5.7.0. But none of the readers are able to read and render the data contained in the .nc file. Any help towards visualizing this would be of great help.

I’m having the same issue, I read .nc file downloaded from WOA and I read it with Paraview’s built-in netCDF reader. The result looks reasonable in representation of ‘Surface or Surface of Edges’. I’m wondering how to transfrom it into rectangular shape.

@Yoshino, thanks for poking me on this question. @dhiputm, sorry for the delay in response. I missed your reply.

To answer the original question, I was able to successfully load the woa13_A5B2_s01_01.nc file into ParaView 5.7.0. I used the following steps:

  1. When opening the file, select NetCDF Reader as the reader. This is the “generic” netCDF reader that follows COARDS/CF convention (as your this file does, too).
  2. Change the Dimensions combo box to read (depth, lat, lon).
  3. Hit Apply. (It is best to change the Dimensions parameter before Applying for the first time.)
  4. For this particular data, the data will come out as a curvilinear grid. To actually see the surface, change the representation from Outline to Surface (in the second toolbar).

Selecting the proper Dimensions is important to reading the data. The dimensions of arrays in netCDF defines the structure of the data loaded. Since a netCDF file can contain arrays of different dimensions, you have to select the dimensions that shape your data.

To answer @Yoshino’s part of the question, you can change the representation from sphere to rectangular shape by also unclicking the Spherical Coordinates option. This will treat the lat/lon as cartesian coordinates instead of coordinates on a sphere and the result will then look like a brick.

1 Like

Thanks for reply, now I get my brick and your explainations about dimensions is quite helpful.

Thank You @Kenneth_Moreland for the reply.
Following your advice, I was able to get the desired Contour and IsoVolume Viz., after applying certain Transform and Threshold filters. But, this has led to the following 2 issues -

  1. When I save the state as ‘.pvsm’, and try to load it later, I am getting error, which I have recorded and attached as ‘test1.txt’. In this context, I should also mention that, when save the state in py format, the load state function works. test1.txt (3.3 KB)
    Is it possible to shed some light into the save/load state functionality, with the WOA netcdf data, already mentioned in the previous post?

Thanks in advance.