gcpy
gcpy copied to clipboard
Bugs about automatic regridding for cube-sphere when plotting
Name and Institution (Required)
Name: Yuanjian Zhang Institution: WashU
Confirm you have reviewed the following documentation
Description of your issue or question
Current main branch of GcPy seems to have trouble reformatting during the process of cube-sphere regridding.
- Cube-sphere emissions and column AOD will trigger an error in the auto reformatting in
compare_single_level
functions due to lack of the dimensionlev
. - Auto regridding in
compare_single_level
for standard cube-sphere grids will only pickref
instead of finer resolution as documented. - Current regridding methods for cube-sphere grids will flipped
Xdim
,Ydim
andlon
,lat
, which is causing horizontal flip when plotting single level insingle_panel
andabsdiff
,fracdiff
incompare_single_level
.
Issue 1
When doing benchmark_emis_plot
and benchmark_aod_plot
between two cube-sphere files with different resolution, the program will trigger an error that says "cannot find lev
" in xarray.rename
.
Issue 2 and 3
compare_single_level(refds,'ref',devds,'dev',['SpeciesConcVV_DST1'])
The function automatically chooses
c24
as comparing resolutiuon(issue 2), and we can also find the weird strips and incorrect negative bias in the figure(dev
's values should be larger than ref
). The latter issue is caused by horizontal flip after regridding(issue 3), which can be confirmed by the figure following:
single_panel(devds_regridded_from_c30_to_c24['SpeciesConcVV_DST1'].isel(lev=0,time=0))
- devds_regridded_from_c30_to_c24 is regridded from devds using file_regrid function following documentation
Thank you @yuanjianz! I think this addresses an old issue that was closed due to becoming stale: https://github.com/geoschem/gcpy/issues/167
And this issue too: https://github.com/geoschem/gcpy/issues/147
Hi @lizziel, I am convinced that these strips are caused by horizontal flip when plotting the regridded data. The reformatting process in regridding functions does not correctly reshape regridded files follwing the sequence of either lat
,lon
or Ydim
, Xdim
. This could be handled by reshape_MAPL_cs
but I would rather the output from regridding process to be already in good shape. Please see the pull request #311.
Also note that each cube-sphere face is flipped separately, thus typical horizontal flip features cannot be told from a global plot.
We can close this issue as PR #311 has been merged into GCPy 1.5.0.