FESOM / pyfesom

python library and tools for pre and post processing of the FESOM ocean model files
http://pyfesom.readthedocs.io/en/latest/index.html
MIT License
11 stars 6 forks source link

White line when plotting with polar stereo projections #13

Closed ackerlar closed 3 years ago

ackerlar commented 3 years ago

Hi, I am trying to plot FESOM1.4 with in a SouthPolarStereo projection and get this white line at one meridian, similar to what you have mentioned here, @koldunovn : https://github.com/koldunovn/pi_mesh_python/blob/master/triangular_mesh_maps_NorthPolarStereo.ipynb

I was just wondering, where to get the *.txt from (elements.txt, xnodes.txt, etc.) as they seem to be crucial for getting rid of this white line. Or are there other ways to accomplish that? Could someone maybe clarify this?

koldunovn commented 3 years ago

I use those names in the examples to make things easier for uninitiated (not FESOM users). It's just usual nodes and elements. In case of pyfesom mesh object:

xnodes = mesh.x2
ynodes = mesh.y2
elem   = mesh.elem
ackerlar commented 3 years ago

Thank you! I didn't think it would be so easy. However, when I use mesh.elem instead of elem_no_nan[::], m.drawmapboundary() does not work properly as the continent is not shown anymore.

without mesh.elem: 1pctAnt5_omldamax

with mesh.elem: 1pctAnt5_omldamax__

But I guess it is a Basemap issue, then.

koldunovn commented 3 years ago

Yes. Maybe Basemap tries to interpolate over, so the "fix" is just to overlay the continent. BTW the part of the issue I describe in this notebook is being solved in cartopy (https://github.com/SciTools/cartopy/issues/1345). I wouldn't stick to Basemap for very long, it's not supported anymore :(

ackerlar commented 3 years ago

Okay, thank you! I will close this issue then.