[ecco-support] [EXTERNAL] Confusion about the ECCO Python package
Fenty, Ian G (US 329C)
ian.fenty at jpl.nasa.gov
Tue May 18 14:07:39 EDT 2021
Dear Nanjian,
Today I also encountered this error, it happens when Cartopy version is < 0.18.0. I updated to Cartopy 0.19.0 and the error disappeared.
Good luck!
-Ian
On 4/15/21, 10:42 PM, "ecco-support-bounces at mit.edu<mailto:ecco-support-bounces at mit.edu> on behalf of Wang, Ou (US 329B)" <ecco-support-bounces at mit.edu<mailto:ecco-support-bounces at mit.edu> on behalf of ou.wang at jpl.nasa.gov<mailto:ou.wang at jpl.nasa.gov>> wrote:
Hello Nanjian,
I can’t reproduce the error. Using the code attached below, I’m able to generate the attached map. I’m using the latest ECCOv4-py from https://github.com/ECCO-GROUP/ECCOv4-py.git<https://urldefense.us/v3/__https:/github.com/ECCO-GROUP/ECCOv4-py.git__;!!PvBDto6Hs4WbVuu7!cTMGadP8UpF0vtZYkipRe-Z1DxH27jAns866CfkLrIaylh0pYEG3fSOjDxvQHnuNt6EB$> and cartopy Version 0.18.0.
Your screen capture only shows part of the error message. It would be helpful if you could post the complete error message.
Regards,
Ou
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import xarray as xr
import matplotlib.pylab as plt
import sys
sys.path.append('~/modules/ECCOv4-py/')
import ecco_v4_py as ecco
grid_dir='./V4grid/'
grid_nm='ECCO-GRID.nc'
plt.figure(figsize=(12,6))
ecco_ds=xr.open_dataset(grid_dir+grid_nm)
lat=20
ones=xr.ones_like(ecco_ds.YC)
dome_maskc=ones.where(ecco_ds.YC>lat,0)
ecco.plot_proj_to_latlon_grid(ecco_ds.XC, ecco_ds.YC, dome_maskc,
projection_type='robin',cmap='viridis')
From: <ecco-support-bounces at mit.edu> on behalf of 刘南健 <liunanjian20 at mails.ucas.ac.cn>
Reply-To: "ECCO support list, wider membership" <ecco-support at mit.edu>
Date: Thursday, April 15, 2021 at 9:45 PM
To: "ecco-support at mit.edu" <ecco-support at mit.edu>
Subject: [EXTERNAL] [ecco-support] Confusion about the ECCO Python package
Dear teacher, I am a postgraduate student from the University of Chinese Academy of Sciences. Recently, I have encountered some problems when using the ECCO package, so I am writing this email to consult with you.It worked well when I used it before, but I found that it didn't work in recent days. The problem is in the ECCO.PLOT_PROJ_TO_LATLON_GRID section. Let me show it with a screenshot.I also looked for some solutions on the Internet, but they didn't work out. So I'm sorry to bother you
[cid:image001.png at 01D74BD6.037B8470]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/pipermail/ecco-support/attachments/20210518/d20cc7b8/attachment-0001.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 125730 bytes
Desc: image001.png
Url : http://mailman.mit.edu/pipermail/ecco-support/attachments/20210518/d20cc7b8/attachment-0001.png
More information about the ecco-support
mailing list