-
Notifications
You must be signed in to change notification settings - Fork 34
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
bpch2nc in GEOS-Chem v12.9.1 #11
Comments
Thanks for writing. There is an example script in our https://github.com/geoschem/gcpy package: gcpy/examples/bpch_to_nc/bpch2nc.py. You can try that. Also -- I am not sure which version of GEOS-Chem you are using, but most of the bpch diagnostics have been superseded by the GEOS-Chem History diagnostics, which write output to netCDF format. Unless you are using one of the diagnostics that has not been ported to netCDF yet, we recommend using the History diagnostics instead of the bpch diagnostics. |
Thank you for replying. Actually I am using GEOS-Chem V12.9.1, and I want to apply the bpch2nc module for ND51 Satellite files. Your help is highly appreciated, if you need more error information please let me know. |
Dear Bob,
Thank you for replying in Github.Actually I am using GEOS-Chem V12.9.1, and I want to apply the bpch2nc module for ND51 Satellite files.Here is the problem I met, when I use old version(GEOS Chem V12.0.0) of diaginfo.dat and tracerinfo.dat in which tracers not listed in alphabetical order, everything is ok except for the output netCDF file in wrong orders.And if I used new diaginfo.dat and tracerinfo.dat produced by GEOS-Chem V12.9.1, it didn't work. I also tried the python file in gcpy package you offered, but the function open_bpchdataset didn't work when applying new diaginfo.dat and tracerinfo.dat.In addition, I also try the combinations of old tracerinfo.dat plus new diaginfor.dat, and new tracerinfo.dat plus old diaginfor.dat, neither of them work and I am quite confused.Your help is highly appreciated
|
Can you post here the steps that you did and the ouptut that you got? That would help us diagnose the issue. Also, in our GCPy package, there is an example script to convert bpch to netcdf. Clone the gcpy repo and then look in |
HI @chen-yuy, I was not able to reproduce the problem with using the xbpch function open_bpchdataset with the ND51 satellite output files. What version of xbpch are you using? Can you include your output error message? Also, please include your diaginfo.dat and tracerinfo.dat files. You can do this by adding extension '.txt' to the filenames and drag and drop them into the GitHub comment box. |
Thank you for the reply. Here is my error message when I using the xbpch function. KeyError Traceback (most recent call last) pandas_libs\index.pyx in pandas._libs.index.IndexEngine.get_loc() pandas_libs\index.pyx in pandas._libs.index.IndexEngine.get_loc() pandas_libs\index_class_helper.pxi in pandas._libs.index.Int64Engine._check_type() KeyError: 'name' During handling of the above exception, another exception occurred: KeyError Traceback (most recent call last) D:\Users\ding9\anaconda3\envs\bpch\lib\site-packages\xbpch\core.py in open_bpchdataset(filename, fields, categories, tracerinfo_file, diaginfo_file, endian, decode_cf, memmap, dask, return_store) D:\Users\ding9\anaconda3\envs\bpch\lib\site-packages\xbpch\core.py in init(self, filename, fields, categories, fix_cf, mode, endian, diaginfo_file, tracerinfo_file, use_mmap, dask_delayed) D:\Users\ding9\anaconda3\envs\bpch\lib\site-packages\xbpch\bpch.py in read_var_data(self) D:\Users\ding9\anaconda3\envs\bpch\lib\site-packages\pandas\core\frame.py in getitem(self, key) D:\Users\ding9\anaconda3\envs\bpch\lib\site-packages\pandas\core\indexes\base.py in get_loc(self, key, method, tolerance) pandas_libs\index.pyx in pandas._libs.index.IndexEngine.get_loc() pandas_libs\index.pyx in pandas._libs.index.IndexEngine.get_loc() pandas_libs\index_class_helper.pxi in pandas._libs.index.Int64Engine._check_type() KeyError: 'name' Here are my diaginfo.dat and tracerinfo.dat of GEOS-ChemV12.9.1 |
Hi @chen-yuy , I think this might be this issue that I reported recently: darothen/xbpch#25. |
I noticed that the files tracerinfo.dat and diaginfo.dat created by GEOS-Chem had been adjusted, which made old version bpch2nc conversion error. I want to know if there was a new version of the bpch2nc python module could solve this problem, and if it is possible send it to me [email protected].
Thank you so much.
The text was updated successfully, but these errors were encountered: