-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
error getting size of a grid #1030
Comments
Comment by @AnsleyManke on 30 Nov 2010 21:16 UTC In fact, the size of the variable using the longer time axis is returning an incorrect result too. It just happens that it represents an overflow that shows as a positive number. The grid in the example above, for the 5-year axis, is 36018020*1828 = 2.1474836E+09, larger than what a 32-bit integer variable can represent. (Max signed integer is 2147483647). For the 10-year axis,
There does not seem to be a flag for gnu gfortran to trap integer overflow. (There is for floating-point overflow; -ffpe-trap=overflow, but that is floating point only.) Seems to me the solution is to do these calculations using floating-point, or to check for integer overflow using floating-point variables, when computing grid size. See mem/cgrid_size.F, cgrid_size_delta.F, cgrid_size_max.F. |
Comment by @AnsleyManke on 4 Sep 2014 19:09 UTC The example above now looks like this:
And the longer time axis:
|
Adding @AndrewWittenberg |
Reported by @AnsleyManke on 7 Oct 2010 01:09 UTC
Define a large 4D grid. On LOADing the variable, we get an error that indicates the size of the grid couldn't be computed.
However, the same variable on an even longer time axis does result in a size being computed.
So something's amiss in getting the grid size.
Migrated-From: http://dunkel.pmel.noaa.gov/trac/ferret/ticket/1758
The text was updated successfully, but these errors were encountered: