Problem reading in netcdf file at higher resolution

Mesh generators, CAD programs, and other tools
Post Reply
chenry
Posts: 10
Joined: 11 Nov 2020, 19:05
Antispam: Yes

Problem reading in netcdf file at higher resolution

Post by chenry »

Hi,

I'm having some trouble reading in a netcdf file with an increased mesh resolution, causing a seg fault and stopping at the line:

Code: Select all

GridDataReader: Performing interpolation for variable: vx
My simulation runs fine with a mesh resolution of 500 m, but an increase to 450 m causes this seg fault. Is this likely to be due to insufficient memory? I would have expected a seg fault during the simulation rather than while simply reading in data.

The netcdf file has a resolution of 500 m. I have separately tried increasing the resolution to 250 m using the

Code: Select all

gmt grdsample
command, but this has also resulted in a seg fault.

Has anyone had this problem before and has a fix, or have I just pushed past my memory limit?

Many thanks for any help!

All the best,

Clara
raback
Site Admin
Posts: 4832
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Problem reading in netcdf file at higher resolution

Post by raback »

Hi

What line causes the segfault? Is it netcdf reader or Elmer side? If you increase verbosity to 30 what is the last line Elmer writes on std out?

-Peter
chenry
Posts: 10
Joined: 11 Nov 2020, 19:05
Antispam: Yes

Re: Problem reading in netcdf file at higher resolution

Post by chenry »

Hi Peter,

Thanks for your reply. The error is occurring when reading in the data using the netcdf reader (GridDataReader). The last lines with a verbosity of 30 are:

Code: Select all

 0: GridDataReader: Found 1 dimensional coordinate variable > x < : 1
 0: GridDataReader: Found dimension > x < with id 1 and size 311
 0: GridDataReader: Grid parameter of dimension > x < is    2.500E+02
 0: GridDataReader: Range of dimension > x < is [   9.205E+05   9.980E+05]
 0: GridDataReader: Found 1 dimensional coordinate variable > y < : 1
 0: GridDataReader: Found dimension > y < with id 2 and size 345
 0: GridDataReader: Grid parameter of dimension > y < is    2.500E+02
 0: GridDataReader: Range of dimension > y < is [   1.880E+06   1.966E+06]
 0: GridDataReader: Omitting the extra dimensions of Elmer mesh
 0: GridDataReader: No time given, using 1st step
 0: GridDataReader: Performing interpolation for variable: vx
Best,

Clara
chenry
Posts: 10
Joined: 11 Nov 2020, 19:05
Antispam: Yes

Re: Problem reading in netcdf file at higher resolution

Post by chenry »

Just a quick update on this. I have slightly reduced the size of the domain and am no longer having problems with the GridDataReader. This doesn't explain why the GridDataReader didn't work with the previous domain at a higher res, but at least there is a solution to the problem.

-C
raback
Site Admin
Posts: 4832
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Problem reading in netcdf file at higher resolution

Post by raback »

Hi

I added a few days ago some more output (with high "max output level") so you might get a better idea now what is going on. Generally memory issues may be difficult and if it happens in netcdf library it is hard to tell. In Elmer it is a good idea to always use and check the optional STAT argument with ALLOCATE. That sometimes helps, but didn't see the problem here.

-Peter
Post Reply