-
Notifications
You must be signed in to change notification settings - Fork 96
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 with ncdf files #729
Comments
I can reproduce that, but managed to read the file using > nc <- stars::read_stars(.x = nc_file)
There were 22 warnings (use warnings() to see them)
> nc
stars object with 4 dimensions and 1 attribute
attribute(s), summary of first 1e+05 cells:
Min. 1st Qu. Median
Mass Concentration of Total... [kg/m^3] 1.837166e-07 7.611779e-07 1.62674e-06
Mean 3rd Qu. Max.
Mass Concentration of Total... [kg/m^3] 3.080384e-06 4.044461e-06 3.34308e-05
NA's
Mass Concentration of Total... [kg/m^3] 18119
dimension(s):
from to refsys values x/y
x 1 802 NA [802x404] 0.005916 [°],...,360 [°] [x]
y 1 404 NA [802x404] -78.72 [°],...,89.76 [°] [y]
lev 1 40 udunits [6,17) [m],...,[5720,6270) [m]
time 1 60 POSIXct 2015-01-16 12:00:00,...,2019-12-16 12:00:00
curvilinear grid and > x = read_mdim(nc_file)
> x
stars object with 4 dimensions and 1 attribute
attribute(s), summary of first 1e+05 cells:
Min. 1st Qu. Median Mean 3rd Qu.
chl [kg/m^3] 6.839074e-10 2.858014e-09 1.985313e-07 2.226392e-07 3.982834e-07
Max. NA's
chl [kg/m^3] 4.758287e-06 65786
dimension(s):
from to offset delta refsys values x/y
i 1 802 -0.5 [1] 1 [1] udunits NULL [x]
j 1 404 -0.5 [1] 1 [1] udunits NULL [y]
lev 1 40 NA NA NA [0,12),...,[5420,6020)
time 1 60 NA NA Date 2015-01-16,...,2019-12-16 The difference in summary statistics of the first 1e5 cells is, I guess, caused by a different dimension ordering of the two interfaces. As the lon/lat "cells" are defined by 4 corners, I'm not sure they are read in sensibly by |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi Edzer!,
Thanks for the stars package!
I am struggling with reading an NC file. Could you take a look, please? I tried my best to sort the issue myself...
Download the file (1.1G) from Google Drive: https://drive.google.com/file/d/1GGt68l6HOo5Q4aGuX4ZLIRTRXgZSDKs3/view?usp=sharing.
With:
I get this error:
I managed to narrowed it down to the fact that
dims
gets anNA
instart
at this location:stars/R/ncdf.R
Line 165 in 76df605
The text was updated successfully, but these errors were encountered: