Skip to content
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

Input Data Missing Error from Standard Solver #133

Open
WHBSpeiser opened this issue Oct 12, 2022 · 1 comment
Open

Input Data Missing Error from Standard Solver #133

WHBSpeiser opened this issue Oct 12, 2022 · 1 comment

Comments

@WHBSpeiser
Copy link

WHBSpeiser commented Oct 12, 2022

Hi! I am trying to use the standard solver on a netcdf file that has a data variable (reflectance values), a lat variable, a lon variable, and a time dimension. When I put it into the standard solver, I get an error saying all input data is missing even though I have verified there is reflectance data present... I also tried converting to an xarray and using that xarray solver but got the same warning. Could it be because there are too many masked values? Sorry if I am missing something obvious, I've been picking away at it for quite a while now- thank you for any insights you may be able to provide! Code and example .nc file below

`

filename = '/home/williamcoast/Desktop/test_csv/test.nc'
ncin = Dataset(filename, 'r')
color = ncin.variables['data'][:]
lons = ncin.variables['longitude'][:]
lats = ncin.variables['latitude'][:]
ncin.close()


coslat = np.cos(np.deg2rad(lats))
wgts = np.sqrt(coslat)[..., np.newaxis]
solver = Eof(color, weights=wgts)

`
test_netcdf.zip

@ajdawson
Copy link
Owner

The eofs software missing value handling was designed for things like masked land areas when analysing ocean fields, where the missing values are in the same location at every time slice. If there is a missing value present in a location at any time the whole time series will be marked as missing. Perhaps your data is sampled at different locations for each time slice, resulting in no locations that have a complete time series?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants