Cartopy: latitude axis gridlines disappear when stand_lon is changed in namelist.wps
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 25/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- python
- Área
- data-visualization
Línea de trabajo
Comienza reproduciendo el flujo de trabajo de trazado de Python Cartopy descrito en el issue utilizando la salida de WRF geogrid.exe y namelist.wps con diferentes valores de stand_lon. Compara las etiquetas de las líneas de cuadrícula de latitud con las etiquetas de longitud y determina si el recorte se produce en wrf-python o en la dependencia de trazado; se considera terminado cuando las etiquetas de latitud sigan siendo visibles para la configuración de proyección indicada.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Hi!
I was unsure whether to share this on the Cartopy Github page, but because the issue occurs due to a change related to WPS, it seemed appropriate to bring it up here.
I am using Cartopy 0.18.0 to plot out my WRF domains on a map. My process is running geogrid.exe and then executing a Python script that calls Cartopy to create the basemap.
In namelist.wps, I have been toying with the stand_lon variable - I would like it to deviate largely from ref_lon. However, when I set the value to be far enough away from ref_lon, run geogrid.exe, then try to plot the basemap with domain boxes overlaid, the latitude axis labels disappear! I want to have a much higher stand_lon so that my domains exclude higher-level terrain (the Rockies).
I use matplotlib.ticker.FixedLocator (Matplotlib 3.3.2) to add specific y-axis labels, but the issue seems to occur regardless of what tick method I choose. This is a specific issue for the y-axis only, as the longitudes on the x-axis seem fine. I did a test to see the extent of the problem by plotting a bunch of latitudes - and there seems to be a cutoff where Cartopy stops adding axis labels. Strange!
Initial figure: stand_lon = -123.5 = ref_lon

Final figure: stand_lon = -88.5, ref_lon = -123.5

Below are some lines of code connected to this problem.
Thanks so much for your help!
- Anthony
` import cartopy.crs as ccrs
from cartopy.feature import BORDERS, COASTLINE, COLORS, LAKES, NaturalEarthFeature
from matplotlib.ticker import FixedLocator, MultipleLocator
import numpy as np
states = NaturalEarthFeature(category='cultural', scale='50m', name='admin_1_states_provinces_shp', facecolor='none')
ax.add_feature(states, edgecolor='k', linewidth=0.3)
ax.add_feature(COASTLINE, edgecolor='k', linewidth=0.5)
ax.add_feature(LAKES, edgecolor='k', facecolor='none', linewidth=0.5)
ax.add_feature(BORDERS, edgecolor='k', linewidth=0.5)
minlon = int(5*np.ceil(lons[(0,0)]/5))
maxlon = int(5*np.ceil(lons[(0,-1)]/5))
minlat = int(4*np.floor(lats[(0,0)]/4))
maxlat = int(4*np.ceil(lats[(-1,0)]/4))
lonticks = range(minlon,maxlon+1,5)
latticks = range(minlat,maxlat+1,4)
glnolabs = ax.gridlines(crs=ccrs.PlateCarree(), draw_labels=False, linewidth=1.5, linestyle='--')
glnolabs.xlocator = MultipleLocator(base=5)
glnolabs.ylocator = MultipleLocator(base=5)
gl = ax.gridlines(crs=ccrs.PlateCarree(), draw_labels=True, linewidth=1.5, linestyle='--')
gl.top_labels = False
gl.right_labels = False
gl.x_inline = False
gl.y_inline = False
gl.xlocator = FixedLocator(lonticks)
gl.ylocator = FixedLocator([40,41,42,43,44,45,46,47,48,49,50,51,52])
gl.xlabel_style = {'size':lblsz, 'color':'black', 'rotation':0}
gl.ylabel_style = {'size':lblsz, 'color':'black', 'rotation':0}
`
- Lenguaje dominante
- Python
- Estrellas
- 498
- Forks
- 178
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de NCAR/wrf-python
-
NCAR/wrf-python#309 · 1 asignado ·
-
Windows builds on conda-forge Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 38/100
NCAR/wrf-python#307 · 5 comentarios ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
NCAR/wrf-python#286 · 3 comentarios ·
-
Windows builds and testing Abierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
NCAR/wrf-python#282 · 1 comentario ·
-
PyPI releases Abierto
NCAR/wrf-python#274 · 5 comentarios · 1 reacción · 1 asignado ·
Todos los issues de NCAR/wrf-python
Issues similares
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
stephrobert/dsoxlab#238 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
sublimehq/package_control#1780 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
nwg-piotr/nwg-displays#145 ·