You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The minimal example you provided looks correct to me. The reason the node_lon appears to be all zeros is because it is only printing a handfull of the values for the repr.
Here's a slightly modified example that works for me. Our plotting API is written using HoloViews, so I needed to make a few modifications to the code you provided.
importuxarrayasuximportholoviewsashvhv.extension('matplotlib')
grid_path="/Users/philipc/Downloads/ne30pg2_scrip_c20191218.nc"data_path="/Users/philipc/Downloads/20240703_SSP245_ZATM_BGC_ne30pg2_f09_oEC60to30v3.eam.h0.2075-06.nc"uxds=ux.open_dataset(grid_path, data_path)
# generate and store a plot as a variableout=uxds['SFCO2'][0].plot(backend='matplotlib',
fig_size=350,
pixel_ratio=4.0)
# safe plot as a PNGhv.save(out, 'SFCO2.png', fmt='png')
Activity
rljacob commentedon Jul 8, 2024
The file can be found here: https://web.lcrc.anl.gov/public/e3sm/inputdata/share/meshes/homme/ne30pg2_scrip_c20191218.nc
(Edit: corrected file)
philipc2 commentedon Jul 8, 2024
Hi @evasinha
The minimal example you provided looks correct to me. The reason the
node_lonappears to be all zeros is because it is only printing a handfull of the values for the repr.I'd suggest taking a look at our User Guide section on Plotting
@rytam2 is also working on an E3SM visualuzation notebook in #836
evasinha-pnnl commentedon Jul 8, 2024
Thanks @philipc2
When I try to generate a plot using uxarray it show up as blank:
Is it possible that there are some issues rendering the image and if so how can those be resolved?
evasinha-pnnl commentedon Jul 8, 2024
The file mentioned above can be downloaded from - https://web.lcrc.anl.gov/public/e3sm/diagnostic_output/ac.eva.sinha/tmp/
philipc2 commentedon Jul 8, 2024
@evasinha
Here's a slightly modified example that works for me. Our plotting API is written using HoloViews, so I needed to make a few modifications to the code you provided.
evasinha-pnnl commentedon Jul 8, 2024
@philipc2 Thank you very much for the modified working example. The modified script worked effortlessly for me as well.
whannah1 commentedon Jul 8, 2024
@philipc2 is there a similar example that also specifies a map projection?