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

ncextract #59

Open
casadoj opened this issue Mar 22, 2024 · 1 comment
Open

ncextract #59

casadoj opened this issue Mar 22, 2024 · 1 comment

Comments

@casadoj
Copy link
Collaborator

casadoj commented Mar 22, 2024

I'm using the tool ncextract that Giuseppe developed (branch development). Two minor comments:

  1. The tool requires as an input a CSV file with the ID, latitude and longitude of the points for which the user wants to extract the time series. On the other hand, the tool cutmaps may use as input a TXT file with longitude, latitude and ID (tab separated). Wouldn't it be more coherent that the input file was the same in both tools (no matter whether the preferred option is the TXT or the CSV file)?

  2. The README.md in the branch development has a minor formatting error. The documentation of the ncextract tool contains a code snippet with the help message of this tool. This code snippet is not properly formatted and it is merged with the next section in the README file entitled Using lisfloodutilities programmatically.

@casadoj
Copy link
Collaborator Author

casadoj commented Mar 22, 2024

I had a look at the code ncextract.py, specifically at the snippet where it reads the CSV file.

poi = pd.read_csv(inputcsv)
poi_indexer = poi.set_index('id')[['lat', 'lon']].to_xarray()

The order of the columns ('id', 'lat', 'lon') in the CSV file is not important, but definetely the CSV file needs to be comma separated and have a header, whereas the TXT file in cutmaps does not. Personally, it seems clearer the use of a CSV file with headers.

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