NCAR / VAPOR

VAPOR is the Visualization and Analysis Platform for Ocean, Atmosphere, and Solar Researchers
https://www.vapor.ucar.edu/
BSD 3-Clause "New" or "Revised" License
178 stars 49 forks source link

Crashed when loading Netcdf-CF file #2629

Closed luminoctum closed 11 months ago

luminoctum commented 3 years ago

Describe the bug

I install the most recent Mac distribution of VAPOR. My dataset is a netcdf-cf file. I used the "cfchecks" command to check whether my nc file is cf complaint. Here's the output

===================== Using CF Checker Version 4.0.0 Checking against CF Version CF-1.7 Using Standard Name Table Version 77 (2021-01-19T13:38:50Z) Using Area Type Table Version 10 (23 June 2020) Using Standardized Region Name Table Version 4 (18 December 2018)

WARN: (2.6.1): No 'Conventions' attribute present


Checking variable: time

WARN: (4.4.1): Use of the calendar and/or month_lengths attributes is recommended for time coordinate variables


Checking variable: x1


Checking variable: x1f


Checking variable: x2


Checking variable: x2f


Checking variable: x3


Checking variable: x3f


Checking variable: rho

WARN: (2.4): space/time dimensions appear in incorrect order WARN: (2.4): space/time dimensions appear in incorrect order


Checking variable: press

WARN: (2.4): space/time dimensions appear in incorrect order WARN: (2.4): space/time dimensions appear in incorrect order


Checking variable: vel1

WARN: (2.4): space/time dimensions appear in incorrect order WARN: (2.4): space/time dimensions appear in incorrect order


Checking variable: vel2

WARN: (2.4): space/time dimensions appear in incorrect order WARN: (2.4): space/time dimensions appear in incorrect order


Checking variable: vel3

WARN: (2.4): space/time dimensions appear in incorrect order WARN: (2.4): space/time dimensions appear in incorrect order

ERRORS detected: 0 WARNINGS given: 12 INFORMATION messages: 0

I got a few warnings but no error. However, when I load it to VAPOR using Netcdf-cf, the software crashed without any error. Here's the header file of my netcdf data.

====== netcdf hj.out2.00000 { dimensions: time = UNLIMITED ; // (1 currently) x1 = 32 ; x1f = 33 ; x2 = 36 ; x2f = 37 ; x3 = 72 ; x3f = 73 ; variables: float time(time) ; time:axis = "T" ; time:long_name = "time" ; time:units = "seconds since 1-1-1 0:0:0" ; float x1(x1) ; x1:axis = "Z" ; x1:units = "m" ; x1:long_name = "altitude" ; float x1f(x1f) ; x1f:axis = "Z" ; x1f:units = "m" ; x1f:long_name = "altitude" ; float x2(x2) ; x2:axis = "Y" ; x2:units = "degrees_north" ; x2:long_name = "latitude" ; float x2f(x2f) ; x2f:axis = "Y" ; x2f:units = "degrees_north" ; x2f:long_name = "latitude" ; float x3(x3) ; x3:axis = "X" ; x3:units = "degrees_east" ; x3:long_name = "longitude" ; float x3f(x3f) ; x3f:axis = "X" ; x3f:units = "degrees_east" ; x3f:long_name = "longitude" ; float rho(time, x3, x2, x1) ; rho:units = "kg/m^3" ; rho:long_name = "density" ; float press(time, x3, x2, x1) ; press:units = "pa" ; press:long_name = "pressure" ; float vel1(time, x3, x2, x1) ; vel1:units = "m/s" ; vel1:long_name = "velocity in z-coordinate" ; float vel2(time, x3, x2, x1) ; vel2:units = "m/s" ; vel2:long_name = "velocity in y-coordinate" ; float vel3(time, x3, x2, x1) ; vel3:units = "m/s" ; vel3:long_name = "velocity in x-coordinate" ; }

Could you help me with this problem?

Helpful additional information (Please click check boxes AFTER submitting ticket)

Impact

To Reproduce

Steps to reproduce the behavior. For example:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Additionally, please attach a session file to this ticket to easily reproduce (use File->Save Session).

Expected behavior

A clear and concise description of what you expected to happen.

Attachments

Desktop

Additional context

Add any other context about the problem here. Attach any (zipped) relevant files, such as data, configurations, session files, etc.

clyne commented 3 years ago

I'm not sure if this is your problem, but with georeferenced data VAPOR definitely expects the vertical dimension to be the slowest varying spatial dimension (this is probably what chchecks is complaining about). I.e. you have:

float vel2(time, x3, x2, x1) ;

try re-ordering your data variables so you have:

float vel2(time, x1, x2, x3) ;

luminoctum commented 3 years ago

I see. That may be the problem. Thanks!

luminoctum commented 3 years ago

But it would be better to have some error message. Right now, the program just crashes unexpectedly.

clyne commented 3 years ago

Agreed. Can you provide a test file that demonstrates the problem?

sgpearse commented 11 months ago

Related to #3301, in which we need better error messages. Nonetheless vapor should not be crashing. However we have no way to reproduce this so we will close for now.