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

xarray selection tool: Bug when using a file with coordinates? #48

Open
annefou opened this issue Aug 10, 2021 · 0 comments
Open

xarray selection tool: Bug when using a file with coordinates? #48

annefou opened this issue Aug 10, 2021 · 0 comments

Comments

@annefou
Copy link
Contributor

annefou commented Aug 10, 2021

if a user pass a tabular file with coordinates, I understand it should be like:

latitude longitude
40.5 10.0

Then selection_from_coords is weird:

def selection_from_coords(self):
        fcoords = pd.read_csv(self.coords, sep='\t')
        for row in fcoords.itertuples():
            self.latvalN = row[0]
            self.lonvalE = row[1]
            print(self.latvalN, self.lonvalE)
            self.outfile = (os.path.join(self.outputdir,
                            self.select + '_' +
                            str(row.Index) + '.tabular'))

it won't select the proper location. We should have:

            self.latvalN = row[1]
            self.lonvalE = row[2]

What do you think?

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

1 participant