miniufo / xgrads

Parse and read ctl and associated binary file commonly used by GrADS into xarray
https://xgrads.readthedocs.io/
MIT License
71 stars 27 forks source link

pdef and template quick fix and test file #31

Closed singledoggy closed 2 years ago

singledoggy commented 2 years ago

I make a quick fix: here add some test files: test8_5.ctl test8_6.ctl

Change of the empty line is the default setting of my ide, it can avoid many bugs.

By the way, would you mind to change your code to PEP8? There are many tools and can make your code more beautiful.

singledoggy commented 2 years ago

Closes #30

miniufo commented 2 years ago

I see there shoud be an 'if pdef is None'. Thanks for you quick solution. I'll give a test run later. BTW, what's your IDE? Spyder or VS code? I am not sure if PEP8 is more elegant but thanks for your remind. I have some kind of coding '强迫症', but this (following PEP8) is not one of them. ∩_∩

miniufo commented 2 years ago

Could you send me some small chunks of binary data so I can give a try with the data? Only ctls are not enough for a test.

singledoggy commented 2 years ago

Actually PDF only influence the projection information, it's in someway independent, so I guess you can use your data in your test dataset, like test8_5.ctl and test8_6.ctl.

IDK how to generate a smalll chunk, I have a set of file each size is 339.8 MB and I need to ask my boss if I can share it. Do you need the large file? If so I'll ask him anyway.

I use spyder and sometimes vim+vim-plug: python mode. I don't remember which change the default indentation format.

AND THANKS FOR YOUR EXCELLENT WORK!

miniufo commented 2 years ago

Hi, I did not notice these two ctls are based on my examples. Now I merge your PR. Thank you for your contribution to the package!!!