Open arturimgw opened 3 years ago
Copying my findings from slack:
It seems the width
argument is not considered in pycoast's add_overlay_from_dict
:
https://github.com/pytroll/pycoast/blob/master/pycoast/cw_base.py#L885-L891
There seem to be three different sets of keyword arguments now that either currently work everywhere, used to work, or work for some interfaces, but none of them are properly documented:
a. lon_major/lat_major/lon_minor/lat_minor: only seem to be a thing in the add_overlay_from_dict
method in pycoast: https://github.com/pytroll/pycoast/blob/master/pycoast/cw_base.py#L859-L862
b. dlonlat and Dlonlat: These are used in the actual add_grid
method: https://pycoast.readthedocs.io/en/latest/api/pycoast.html#pycoast.cw_agg.ContourWriterAGG.add_grid
c. major_lonlat, minor_lonlat: Seem to only be in the old satpy add_overlay function but are mapped to dlonlat/Dlonlat now: https://satpy.readthedocs.io/en/latest/_modules/satpy/writers.html#add_overlay
Describe the bug The usage of pycoast 1.4.0 to change frequency and width of the graticules has no effect on the image. When save_datasets are used regadles kwargs major_latlon are always in 10 deg cadence, and minor_latlon are always in 2 deg cadence. change arguments (major_latlon and minor_latlon) to (lon_major, lat_major, lon_minor, lat_minor) allows to change the cadence. However 'width' cannot be change.
To Reproduce
Expected behavior Should change graticules appearances (width and frequency).
Actual results (pytroll-stacja) [troll@Gaja 15min]$ python img/msg_hrv_test.py /home/troll/msg/5min/H-000-MSG3-MSG3_RSS_-____-EPI__-202010291025-__ /home/troll/anaconda3/envs/pytroll-stacja/lib/python3.6/site-packages/satpy/resample.py:150: UserWarning: Gradient search resampler not available, upgrade Pyresample. warnings.warn('Gradient search resampler not available, upgrade Pyresample.') /home/troll/anaconda3/envs/pytroll-stacja/lib/python3.6/site-packages/pyresample/geometry.py:1113: RuntimeWarning: invalid value encountered in double_scalars self.pixel_size_y = (area_extent[3] - area_extent[1]) / float(height) /home/troll/anaconda3/envs/pytroll-stacja/lib/python3.6/site-packages/pyproj/crs/crs.py:543: UserWarning: You will likely lose important projection information when converting to a PROJ string from another format. See: https://proj.org/faq.html#what-is-the-best-format-for-describing-coordinate-reference-systems proj_string = self.to_proj4() /home/troll/anaconda3/envs/pytroll-stacja/lib/python3.6/site-packages/pyresample/geometry.py:1113: RuntimeWarning: invalid value encountered in double_scalars self.pixel_size_y = (area_extent[3] - area_extent[1]) / float(height) /home/troll/anaconda3/envs/pytroll-stacja/lib/python3.6/site-packages/pyproj/crs/crs.py:543: UserWarning: You will likely lose important projection information when converting to a PROJ string from another format. See: https://proj.org/faq.html#what-is-the-best-format-for-describing-coordinate-reference-systems proj_string = self.to_proj4() /home/troll/anaconda3/envs/pytroll-stacja/lib/python3.6/site-packages/pyresample/geometry.py:1113: RuntimeWarning: invalid value encountered in double_scalars self.pixel_size_y = (area_extent[3] - area_extent[1]) / float(height) /home/troll/anaconda3/envs/pytroll-stacja/lib/python3.6/site-packages/pyproj/crs/crs.py:543: UserWarning: You will likely lose important projection information when converting to a PROJ string from another format. See: https://proj.org/faq.html#what-is-the-best-format-for-describing-coordinate-reference-systems proj_string = self.to_proj4() /home/troll/anaconda3/envs/pytroll-stacja/lib/python3.6/site-packages/pyresample/geometry.py:1113: RuntimeWarning: invalid value encountered in double_scalars self.pixel_size_y = (area_extent[3] - area_extent[1]) / float(height) /home/troll/anaconda3/envs/pytroll-stacja/lib/python3.6/site-packages/pyproj/crs/crs.py:543: UserWarning: You will likely lose important projection information when converting to a PROJ string from another format. See: https://proj.org/faq.html#what-is-the-best-format-for-describing-coordinate-reference-systems proj_string = self.to_proj4() /home/troll/anaconda3/envs/pytroll-stacja/lib/python3.6/site-packages/pyresample/geometry.py:1113: RuntimeWarning: invalid value encountered in double_scalars self.pixel_size_y = (area_extent[3] - area_extent[1]) / float(height) /home/troll/anaconda3/envs/pytroll-stacja/lib/python3.6/site-packages/pyproj/crs/crs.py:543: UserWarning: You will likely lose important projection information when converting to a PROJ string from another format. See: https://proj.org/faq.html#what-is-the-best-format-for-describing-coordinate-reference-systems proj_string = self.to_proj4() /home/troll/anaconda3/envs/pytroll-stacja/lib/python3.6/site-packages/pyresample/geometry.py:1113: RuntimeWarning: invalid value encountered in double_scalars self.pixel_size_y = (area_extent[3] - area_extent[1]) / float(height) /home/troll/anaconda3/envs/pytroll-stacja/lib/python3.6/site-packages/pyproj/crs/crs.py:543: UserWarning: You will likely lose important projection information when converting to a PROJ string from another format. See: https://proj.org/faq.html#what-is-the-best-format-for-describing-coordinate-reference-systems proj_string = self.to_proj4() /home/troll/anaconda3/envs/pytroll-stacja/lib/python3.6/site-packages/pyresample/geometry.py:1113: RuntimeWarning: invalid value encountered in double_scalars self.pixel_size_y = (area_extent[3] - area_extent[1]) / float(height) /home/troll/anaconda3/envs/pytroll-stacja/lib/python3.6/site-packages/pyproj/crs/crs.py:543: UserWarning: You will likely lose important projection information when converting to a PROJ string from another format. See: https://proj.org/faq.html#what-is-the-best-format-for-describing-coordinate-reference-systems proj_string = self.to_proj4() /home/troll/anaconda3/envs/pytroll-stacja/lib/python3.6/site-packages/pyresample/geometry.py:1113: RuntimeWarning: invalid value encountered in double_scalars self.pixel_size_y = (area_extent[3] - area_extent[1]) / float(height) /home/troll/anaconda3/envs/pytroll-stacja/lib/python3.6/site-packages/pyproj/crs/crs.py:543: UserWarning: You will likely lose important projection information when converting to a PROJ string from another format. See: https://proj.org/faq.html#what-is-the-best-format-for-describing-coordinate-reference-systems proj_string = self.to_proj4() /home/troll/anaconda3/envs/pytroll-stacja/lib/python3.6/site-packages/pyresample/geometry.py:1113: RuntimeWarning: invalid value encountered in double_scalars self.pixel_size_y = (area_extent[3] - area_extent[1]) / float(height) /home/troll/anaconda3/envs/pytroll-stacja/lib/python3.6/site-packages/pyproj/crs/crs.py:543: UserWarning: You will likely lose important projection information when converting to a PROJ string from another format. See: https://proj.org/faq.html#what-is-the-best-format-for-describing-coordinate-reference-systems proj_string = self.to_proj4() /home/troll/anaconda3/envs/pytroll-stacja/lib/python3.6/site-packages/pyresample/geometry.py:1113: RuntimeWarning: invalid value encountered in double_scalars self.pixel_size_y = (area_extent[3] - area_extent[1]) / float(height) /home/troll/anaconda3/envs/pytroll-stacja/lib/python3.6/site-packages/pyproj/crs/crs.py:543: UserWarning: You will likely lose important projection information when converting to a PROJ string from another format. See: https://proj.org/faq.html#what-is-the-best-format-for-describing-coordinate-reference-systems proj_string = self.to_proj4() /home/troll/anaconda3/envs/pytroll-stacja/lib/python3.6/site-packages/pyproj/crs/crs.py:543: UserWarning: You will likely lose important projection information when converting to a PROJ string from another format. See: https://proj.org/faq.html#what-is-the-best-format-for-describing-coordinate-reference-systems proj_string = self.to_proj4() /home/troll/anaconda3/envs/pytroll-stacja/lib/python3.6/site-packages/pyproj/crs/crs.py:543: UserWarning: You will likely lose important projection information when converting to a PROJ string from another format. See: https://proj.org/faq.html#what-is-the-best-format-for-describing-coordinate-reference-systems proj_string = self.to_proj4() /home/troll/anaconda3/envs/pytroll-stacja/lib/python3.6/site-packages/pyproj/crs/crs.py:543: UserWarning: You will likely lose important projection information when converting to a PROJ string from another format. See: https://proj.org/faq.html#what-is-the-best-format-for-describing-coordinate-reference-systems proj_string = self.to_proj4() /home/troll/anaconda3/envs/pytroll-stacja/lib/python3.6/site-packages/pyproj/crs/crs.py:543: UserWarning: You will likely lose important projection information when converting to a PROJ string from another format. See: https://proj.org/faq.html#what-is-the-best-format-for-describing-coordinate-reference-systems proj_string = self.to_proj4() /home/troll/anaconda3/envs/pytroll-stacja/lib/python3.6/site-packages/pyproj/crs/crs.py:543: UserWarning: You will likely lose important projection information when converting to a PROJ string from another format. See: https://proj.org/faq.html#what-is-the-best-format-for-describing-coordinate-reference-systems proj_string = self.to_proj4() /home/troll/anaconda3/envs/pytroll-stacja/lib/python3.6/site-packages/pyproj/crs/crs.py:543: UserWarning: You will likely lose important projection information when converting to a PROJ string from another format. See: https://proj.org/faq.html#what-is-the-best-format-for-describing-coordinate-reference-systems proj_string = self.to_proj4() /home/troll/anaconda3/envs/pytroll-stacja/lib/python3.6/site-packages/pyproj/crs/crs.py:543: UserWarning: You will likely lose important projection information when converting to a PROJ string from another format. See: https://proj.org/faq.html#what-is-the-best-format-for-describing-coordinate-reference-systems proj_string = self.to_proj4() /home/troll/anaconda3/envs/pytroll-stacja/lib/python3.6/site-packages/pyproj/crs/crs.py:543: UserWarning: You will likely lose important projection information when converting to a PROJ string from another format. See: https://proj.org/faq.html#what-is-the-best-format-for-describing-coordinate-reference-systems proj_string = self.to_proj4() /home/troll/anaconda3/envs/pytroll-stacja/lib/python3.6/site-packages/pyproj/crs/crs.py:543: UserWarning: You will likely lose important projection information when converting to a PROJ string from another format. See: https://proj.org/faq.html#what-is-the-best-format-for-describing-coordinate-reference-systems proj_string = self.to_proj4() /home/troll/anaconda3/envs/pytroll-stacja/lib/python3.6/site-packages/pyproj/crs/crs.py:543: UserWarning: You will likely lose important projection information when converting to a PROJ string from another format. See: https://proj.org/faq.html#what-is-the-best-format-for-describing-coordinate-reference-systems proj_string = self.to_proj4() /home/troll/anaconda3/envs/pytroll-stacja/lib/python3.6/site-packages/pyproj/crs/crs.py:543: UserWarning: You will likely lose important projection information when converting to a PROJ string from another format. See: https://proj.org/faq.html#what-is-the-best-format-for-describing-coordinate-reference-systems proj_string = self.to_proj4() /home/troll/anaconda3/envs/pytroll-stacja/lib/python3.6/site-packages/pyproj/crs/crs.py:543: UserWarning: You will likely lose important projection information when converting to a PROJ string from another format. See: https://proj.org/faq.html#what-is-the-best-format-for-describing-coordinate-reference-systems proj_string = self.to_proj4() /home/troll/anaconda3/envs/pytroll-stacja/lib/python3.6/site-packages/pyproj/crs/crs.py:543: UserWarning: You will likely lose important projection information when converting to a PROJ string from another format. See: https://proj.org/faq.html#what-is-the-best-format-for-describing-coordinate-reference-systems proj_string = self.to_proj4() /home/troll/anaconda3/envs/pytroll-stacja/lib/python3.6/site-packages/pyproj/crs/crs.py:543: UserWarning: You will likely lose important projection information when converting to a PROJ string from another format. See: https://proj.org/faq.html#what-is-the-best-format-for-describing-coordinate-reference-systems proj_string = self.to_proj4() /home/troll/anaconda3/envs/pytroll-stacja/lib/python3.6/site-packages/pyproj/crs/crs.py:543: UserWarning: You will likely lose important projection information when converting to a PROJ string from another format. See: https://proj.org/faq.html#what-is-the-best-format-for-describing-coordinate-reference-systems proj_string = self.to_proj4() /home/troll/anaconda3/envs/pytroll-stacja/lib/python3.6/site-packages/pyproj/crs/crs.py:543: UserWarning: You will likely lose important projection information when converting to a PROJ string from another format. See: https://proj.org/faq.html#what-is-the-best-format-for-describing-coordinate-reference-systems proj_string = self.to_proj4() /home/troll/anaconda3/envs/pytroll-stacja/lib/python3.6/site-packages/pyproj/crs/crs.py:543: UserWarning: You will likely lose important projection information when converting to a PROJ string from another format. See: https://proj.org/faq.html#what-is-the-best-format-for-describing-coordinate-reference-systems proj_string = self.to_proj4() /home/troll/anaconda3/envs/pytroll-stacja/lib/python3.6/site-packages/pyproj/crs/crs.py:543: UserWarning: You will likely lose important projection information when converting to a PROJ string from another format. See: https://proj.org/faq.html#what-is-the-best-format-for-describing-coordinate-reference-systems proj_string = self.to_proj4() /home/troll/anaconda3/envs/pytroll-stacja/lib/python3.6/site-packages/pyproj/crs/crs.py:543: UserWarning: You will likely lose important projection information when converting to a PROJ string from another format. See: https://proj.org/faq.html#what-is-the-best-format-for-describing-coordinate-reference-systems proj_string = self.to_proj4() /home/troll/anaconda3/envs/pytroll-stacja/lib/python3.6/site-packages/pyproj/crs/crs.py:543: UserWarning: You will likely lose important projection information when converting to a PROJ string from another format. See: https://proj.org/faq.html#what-is-the-best-format-for-describing-coordinate-reference-systems proj_string = self.to_proj4() /home/troll/anaconda3/envs/pytroll-stacja/lib/python3.6/site-packages/pyproj/crs/crs.py:543: UserWarning: You will likely lose important projection information when converting to a PROJ string from another format. See: https://proj.org/faq.html#what-is-the-best-format-for-describing-coordinate-reference-systems proj_string = self.to_proj4() /home/troll/anaconda3/envs/pytroll-stacja/lib/python3.6/site-packages/pyproj/crs/crs.py:543: UserWarning: You will likely lose important projection information when converting to a PROJ string from another format. See: https://proj.org/faq.html#what-is-the-best-format-for-describing-coordinate-reference-systems proj_string = self.to_proj4() /home/troll/anaconda3/envs/pytroll-stacja/lib/python3.6/site-packages/pyproj/crs/crs.py:543: UserWarning: You will likely lose important projection information when converting to a PROJ string from another format. See: https://proj.org/faq.html#what-is-the-best-format-for-describing-coordinate-reference-systems proj_string = self.to_proj4() /home/troll/anaconda3/envs/pytroll-stacja/lib/python3.6/site-packages/pyproj/crs/crs.py:543: UserWarning: You will likely lose important projection information when converting to a PROJ string from another format. See: https://proj.org/faq.html#what-is-the-best-format-for-describing-coordinate-reference-systems proj_string = self.to_proj4() /home/troll/anaconda3/envs/pytroll-stacja/lib/python3.6/site-packages/pyproj/crs/crs.py:543: UserWarning: You will likely lose important projection information when converting to a PROJ string from another format. See: https://proj.org/faq.html#what-is-the-best-format-for-describing-coordinate-reference-systems proj_string = self.to_proj4() /home/troll/anaconda3/envs/pytroll-stacja/lib/python3.6/site-packages/pyproj/crs/crs.py:543: UserWarning: You will likely lose important projection information when converting to a PROJ string from another format. See: https://proj.org/faq.html#what-is-the-best-format-for-describing-coordinate-reference-systems proj_string = self.to_proj4() /home/troll/anaconda3/envs/pytroll-stacja/lib/python3.6/site-packages/pyproj/crs/crs.py:543: UserWarning: You will likely lose important projection information when converting to a PROJ string from another format. See: https://proj.org/faq.html#what-is-the-best-format-for-describing-coordinate-reference-systems proj_string = self.to_proj4() /home/troll/anaconda3/envs/pytroll-stacja/lib/python3.6/site-packages/pyproj/crs/crs.py:543: UserWarning: You will likely lose important projection information when converting to a PROJ string from another format. See: https://proj.org/faq.html#what-is-the-best-format-for-describing-coordinate-reference-systems proj_string = self.to_proj4() /home/troll/anaconda3/envs/pytroll-stacja/lib/python3.6/site-packages/pyproj/crs/crs.py:543: UserWarning: You will likely lose important projection information when converting to a PROJ string from another format. See: https://proj.org/faq.html#what-is-the-best-format-for-describing-coordinate-reference-systems proj_string = self.to_proj4() /home/troll/anaconda3/envs/pytroll-stacja/lib/python3.6/site-packages/pyproj/crs/crs.py:543: UserWarning: You will likely lose important projection information when converting to a PROJ string from another format. See: https://proj.org/faq.html#what-is-the-best-format-for-describing-coordinate-reference-systems proj_string = self.to_proj4() /home/troll/anaconda3/envs/pytroll-stacja/lib/python3.6/site-packages/pyproj/crs/crs.py:543: UserWarning: You will likely lose important projection information when converting to a PROJ string from another format. See: https://proj.org/faq.html#what-is-the-best-format-for-describing-coordinate-reference-systems proj_string = self.to_proj4() /home/troll/anaconda3/envs/pytroll-stacja/lib/python3.6/site-packages/pyproj/crs/crs.py:543: UserWarning: You will likely lose important projection information when converting to a PROJ string from another format. See: https://proj.org/faq.html#what-is-the-best-format-for-describing-coordinate-reference-systems proj_string = self.to_proj4() The following datasets were not created and may require resampling to be generated: DataID(name='hrv_clouds') /home/troll/anaconda3/envs/pytroll-stacja/lib/python3.6/site-packages/pyproj/crs/crs.py:543: UserWarning: You will likely lose important projection information when converting to a PROJ string from another format. See: https://proj.org/faq.html#what-is-the-best-format-for-describing-coordinate-reference-systems proj_string = self.to_proj4() /home/troll/anaconda3/envs/pytroll-stacja/lib/python3.6/site-packages/pyproj/crs/crs.py:543: UserWarning: You will likely lose important projection information when converting to a PROJ string from another format. See: https://proj.org/faq.html#what-is-the-best-format-for-describing-coordinate-reference-systems proj_string = self.to_proj4() /home/troll/anaconda3/envs/pytroll-stacja/lib/python3.6/site-packages/pyproj/crs/crs.py:543: UserWarning: You will likely lose important projection information when converting to a PROJ string from another format. See: https://proj.org/faq.html#what-is-the-best-format-for-describing-coordinate-reference-systems proj_string = self.to_proj4() /home/troll/anaconda3/envs/pytroll-stacja/lib/python3.6/site-packages/pyproj/crs/crs.py:543: UserWarning: You will likely lose important projection information when converting to a PROJ string from another format. See: https://proj.org/faq.html#what-is-the-best-format-for-describing-coordinate-reference-systems proj_string = self.to_proj4() /home/troll/anaconda3/envs/pytroll-stacja/lib/python3.6/site-packages/satpy/node.py:105: UserWarning: Attribute access to DataIDs is deprecated, use key access instead. return self.name == other.name /home/troll/anaconda3/envs/pytroll-stacja/lib/python3.6/site-packages/dask/core.py:121: RuntimeWarning: invalid value encountered in cos return func((_execute_task(a, cache) for a in args)) /home/troll/anaconda3/envs/pytroll-stacja/lib/python3.6/site-packages/dask/core.py:121: RuntimeWarning: invalid value encountered in sin return func((_execute_task(a, cache) for a in args)) /home/troll/anaconda3/envs/pytroll-stacja/lib/python3.6/site-packages/dask/core.py:121: RuntimeWarning: invalid value encountered in log return func(*(_execute_task(a, cache) for a in args))
Screenshots
Environment Info:
Readers and writers dependencies (when relevant): [run
from satpy.config import check_satpy; check_satpy()
] check_satpy() Readersabi_l1b: ok abi_l1b_scmi: ok acspo: ok ahi_hrit: ok ahi_hsd: ok amsr2_l1b: ok avhrr_l1b_aapp: ok avhrr_l1b_eps: ok avhrr_l1b_gaclac: cannot find module 'satpy.readers.avhrr_l1b_gaclac' (No module named 'pygac') avhrr_l1b_hrpt: cannot find module 'satpy.readers.hrpt' (No module named 'pygac') caliop_l2_cloud: cannot find module 'satpy.readers.caliop_l2_cloud' (No module named 'pyhdf') clavrx: cannot find module 'satpy.readers.clavrx' (No module named 'pyhdf') electrol_hrit: ok fci_l1c_fdhsi: ok generic_image: ok geocat: ok ghrsst_l3c_sst: ok goes-imager_hrit: ok goes-imager_nc: ok grib: cannot find module 'satpy.readers.grib' (No module named 'pygrib') iasi_l2: ok jami_hrit: ok li_l2: cannot find module 'satpy.readers.li_l2' (No module named 'h5netcdf') maia: ok modis_l1b: cannot find module 'satpy.readers.modis_l1b' (No module named 'pyhdf') msi_safe: cannot find module 'satpy.readers.msi_safe' (No module named 'glymur') mtsat2-imager_hrit: ok nucaps: ok nwcsaf-geo: ok nwcsaf-pps_nc: ok olci_l1b: ok olci_l2: ok omps_edr: ok safe_sar_l2_ocn: ok sar-c_safe: ok scatsat1_l2b: ok seviri_l1b_hrit: ok seviri_l1b_native: ok seviri_l1b_nc: ok slstr_l1b: ok viirs_compact: ok viirs_edr_active_fires: ok viirs_edr_flood: cannot find module 'satpy.readers.viirs_edr_flood' (No module named 'pyhdf') viirs_l1b: ok viirs_sdr: ok virr_l1b: ok
Writers
cf: ok geotiff: ok mitiff: ok ninjotiff: cannot find module 'satpy.writers.ninjotiff' (No module named 'pyninjotiff') scmi: ok simple_image: ok Additional context Add any other context about the problem here.