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

Bugs about automatic regridding for cube-sphere when plotting #310

Closed
3 tasks done
yuanjianz opened this issue Apr 9, 2024 · 5 comments
Closed
3 tasks done

Bugs about automatic regridding for cube-sphere when plotting #310

yuanjianz opened this issue Apr 9, 2024 · 5 comments
Assignees
Labels
category: Bug Something isn't working topic: Benchmark Plots and Tables Issues pertaining to generating plots/tables from benchmark output topic: Regridding Issues pertaining to horizontal & vertical regridding
Milestone

Comments

@yuanjianz
Copy link
Contributor

yuanjianz commented Apr 9, 2024

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.

  1. Cube-sphere emissions and column AOD will trigger an error in the auto reformatting in compare_single_level functions due to lack of the dimension lev.
  2. Auto regridding in compare_single_level for standard cube-sphere grids will only pick ref instead of finer resolution as documented.
  3. Current regridding methods for cube-sphere grids will flipped Xdim, Ydim and lon, lat, which is causing horizontal flip when plotting single level in single_panel and absdiff, fracdiff in compare_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'])

image
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
    image
@yantosca yantosca self-assigned this Apr 9, 2024
@yantosca yantosca added category: Bug Something isn't working topic: Benchmark Plots and Tables Issues pertaining to generating plots/tables from benchmark output topic: Regridding Issues pertaining to horizontal & vertical regridding labels Apr 9, 2024
@lizziel
Copy link
Contributor

lizziel commented Apr 9, 2024

Thank you @yuanjianz! I think this addresses an old issue that was closed due to becoming stale: #167

@lizziel
Copy link
Contributor

lizziel commented Apr 9, 2024

And this issue too: #147

@yuanjianz
Copy link
Contributor Author

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.

@yuanjianz
Copy link
Contributor Author

Also note that each cube-sphere face is flipped separately, thus typical horizontal flip features cannot be told from a global plot.

@yantosca yantosca added this to the 1.5.0 milestone Apr 10, 2024
yantosca added a commit that referenced this issue May 13, 2024
This merge brings PR #310 (Add benchmark scripts to scrape timing information
from log files, by @yantosca) into the GCPy 1.5.0 development stream.

This PR adds the functionality to produce timing tables of Ref & Dev
models from benchmark logfile output.

Signed-off-by: Bob Yantosca <[email protected]>
@yantosca
Copy link
Contributor

We can close this issue as PR #311 has been merged into GCPy 1.5.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: Bug Something isn't working topic: Benchmark Plots and Tables Issues pertaining to generating plots/tables from benchmark output topic: Regridding Issues pertaining to horizontal & vertical regridding
Projects
None yet
Development

No branches or pull requests

3 participants