-
Notifications
You must be signed in to change notification settings - Fork 69
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
Function to read ICGEM data files #10
Comments
@santis19 would you mind porting fatiando/fatiando#421 to harmonica? There a few changes that will need to be done:
The function can go in a new |
@leouieda I've just started working on this. I have |
We need |
Yep, test coverage is a must for merging. Github automatically bars merging if coverage of the diff is less than 80%. Leaving it for later is a recipe for never doing it, as I learned from fatiando.
The fatiando version has some tests that you can use, if I'm not mistaken. But try to see if you can get 100% coverage. It's worth the exercise as you learn a lot about designing good code. For example, it might be best to try to allow a file name or a file object as input. This way we can use StringIO for testing.
Please include it in the |
Port of the `load_icgem_gdf` function from `fatiando.datasets` to `harmonica`. The new `load_icgem_gdf` loads gdf files that are downloaded from the [ICGEM Calculation Service](https://icgem.gfz-potsdam.de/) with a few changes: - Returns an `xarray.Dataset` instance instead of a dictionary. - The `assert` lines have been replaced by proper `if...raise` checks. - The `usecols` argument have been explicitly removed, but it still can be passed through `**kwargs`. - The gdf file header is passed as a dictionary to the `attr` argument of `xarray.Dataset`. Fixes #10
Description of the desired feature
The ICGEM Calculation Service is an amazing resource to get gravity data. Their grids are in an ASCII format that can be tricky to parse because some values are included in the header. It would be great to have a function that reads the ICGEM file and returns an
xarray.Dataset
.This will really help with #9
The text was updated successfully, but these errors were encountered: