Is your feature request related to a problem? Please describe.
The point source emission files used as input to CMAQ (generated by SMOKE) can't be visualized by VERDI.
The tar.gz package below contains three files:
inln_mole_pt_oilgas_20180806_12US1_12Listos_cmaq_cb6_2018ff_18j_WR401.ncf
stack_groups_pt_oilgas_12US1_12Listos_2018ff_18j_WR401.ncf
GRIDDESC
The STACK_GROUPS file is automatically read by SMKPLOT if it is in the same directory as the pt source emissions file inln_mole_pt_oilgas_12US1_12Listos_2018ff_18j_WR401.ncf
The GRIDDESC file is also automatically read by SMKPLOT if it is in the same directory.
SMOKE Documentation on point source emission files:
https://www.cmascenter.org/smoke/documentation/3.0/html/ch02s05s03.html
Describe the solution you'd like
VERDI could provide an option to load the point source emissions file, stack group and GRIDDESC files, and create a tile plot the data similar to SMKPLOT.
Screenshot of the SMKPLOT GUI, note, that I selected the pollutant: NO, and used the following controls, Log Scale to see the white background and Zoom to Data to see the data over the Long Island Sound Region, and then selected Generate Plot (button at the bottom left of the SMKPLOT GUI.
Describe alternatives you've considered
SMKPLOT is able to plot these types of CMAQ emission point source files.
https://github.com/hnqtran/SMKPLOT
Obtain the code using the command:
git clone https://github.com/hnqtran/SMKPLOT.git
Example files
example_cmaq_ptsource.tar.gz
I placed the three files from the above tar.gz file directly in the SMKPLOT directory:
Command used to run smkplot.py
./smkplot.py -f inln_mole_pt_oilgas_20180806_12US1_12Listos_cmaq_cb6_2018ff_18j_WR401.ncf
Output from smkplot.py:
INFO Run mode not specified; defaulting to GUI mode.
INFO Auto-selected: Native Qt GUI (gui.py)
INFO Launching Native Qt GUI (gui.py)...
INFO Multithreading with maximum 8 threads
>>> GUI_FLOW: Entering _start_progress (msg: Loading data...) <<<
WARNING GUI_DEBUG: [_start_progress] Disabling button. msg: Loading data...
INFO Auto-detected STACK_GROUPS file (fallback): /proj/ie/proj/CMAS/SMKPLOT/stack_groups_pt_oilgas_12US1_12Listos_2018ff_18j_WR401.ncf
INFO Detected inline point sources. Converting to grid in-memory (Lazy Mode)...
INFO DEBUG: Calling read_inline_emissions_lazy for inln_mole_pt_oilgas_20180806_12US1_12Listos_cmaq_cb6_2018ff_18j_WR401.ncf
INFO DEBUG: Reading STACK_GROUPS: /proj/ie/proj/CMAS/SMKPLOT/stack_groups_pt_oilgas_12US1_12Listos_2018ff_18j_WR401.ncf
INFO Inferred spatial grid dimensions from STACK_GROUPS FILEDESC: 459x299
INFO DEBUG: Mapping 220 sources...
INFO Inline geometry: 0.16s for 137241 cells
INFO DEBUG: Creating GeoDataFrame...
INFO DEBUG: Adding GRID_RC...
INFO Inline Lazy Load Complete: 137241 cells with emissions.
INFO Reading 1 file (sequential): inln_mole_pt_oilgas_20180806_12US1_12Listos_cmaq_cb6_2018ff_18j_WR401.ncf
INFO Reading 1 file (sequential): inln_mole_pt_oilgas_20180806_12US1_12Listos_cmaq_cb6_2018ff_18j_WR401.ncf
INFO Detected NetCDF binary format. Reading as IOAPI NetCDF...
INFO Detected NetCDF binary format. Reading as IOAPI NetCDF...
INFO Auto-detected STACK_GROUPS file (fallback): /proj/ie/proj/CMAS/SMKPLOT/stack_groups_pt_oilgas_12US1_12Listos_2018ff_18j_WR401.ncf
INFO Auto-detected STACK_GROUPS file (fallback): /proj/ie/proj/CMAS/SMKPLOT/stack_groups_pt_oilgas_12US1_12Listos_2018ff_18j_WR401.ncf
INFO Detected inline point sources. Converting to grid in-memory (Lazy Mode)...
INFO Detected inline point sources. Converting to grid in-memory (Lazy Mode)...
INFO Inline geometry: 0.16s for 137241 cells
INFO Inline geometry: 0.16s for 137241 cells
INFO Inline Lazy Load Complete: 137241 cells with emissions.
INFO Inline Lazy Load Complete: 137241 cells with emissions.
INFO Generating grid from NetCDF attributes...
INFO Generating grid from NetCDF attributes...
INFO Fetching online counties for 2020...
INFO Fetching online counties for 2020...
>>> GUI_FLOW: Entering _start_progress (msg: Downloading shapefile...) <<<
WARNING GUI_DEBUG: [_start_progress] Disabling button. msg: Downloading shapefile...
INFO Loaded counties: 3234 features
INFO Loaded counties: 3234 features
INFO Grid geometry loaded from NetCDF.
INFO Grid geometry loaded from NetCDF.
>>> SCC_DEBUG: Columns found: ['ROW', 'COL', 'BUTADIENE13', 'ACROLEIN', 'HCL', 'CL2', 'CO', 'NH3', 'NH3_FERT', 'HONO', 'NO', 'NO2', 'PAL', 'PCA', 'PCL', 'PEC', 'PFE', 'PH2O', 'PK', 'PMG', 'PMN', 'PMOTHR', 'PNA', 'PNCOM', 'PNH4', 'PNO3', 'POC', 'PSI', 'PSO4', 'PTI', 'PMC', 'SO2', 'SULF', 'ACET', 'ALD2', 'ALD2_PRIMARY', 'ALDX', 'BENZ', 'CH4', 'ETH', 'ETHA', 'ETHY', 'ETOH', 'FORM', 'FORM_PRIMARY', 'IOLE', 'ISOP', 'KET', 'MEOH', 'NAPH', 'NMOG', 'NVOL', 'OLE', 'PAR', 'PRPA', 'SOAALK', 'TERP', 'TOL', 'UNR', 'XYLMN', 'VOC_INV', 'geometry', 'GRID_RC']
>>> SCC_DEBUG: scc_col=None, desc_col=None
>>> SCC_DEBUG: No SCC or Description column found.
>>> SCC_DEBUG: SCC dropdown DISABLED (no items).
INFO Loaded 137241 rows. Found 59 pollutants.
INFO Data load complete.
INFO Data load complete.
CRITICAL UNCAUGHT EXCEPTION
Traceback (most recent call last):
File "/proj/ie/proj/CMAS/SMKPLOT/gui.py", line 2748, in _pollutant_changed
from PyQt5.QtCore import QTimer
ModuleNotFoundError: No module named 'PyQt5'
Traceback (most recent call last):
File "/proj/ie/proj/CMAS/SMKPLOT/gui.py", line 2748, in _pollutant_changed
from PyQt5.QtCore import QTimer
ModuleNotFoundError: No module named 'PyQt5'
>>> GUI_EVENT: [GENERATE PLOT] Button Clicked! <<<
WARNING GUI_DEBUG: [_on_main_plot_clicked] Entering...
>>> GUI_FLOW: Entering on_generate_clicked <<<
WARNING GUI_DEBUG: [on_generate_clicked] Entering method...
>>> GUI_FLOW: update_plot for 'NO' <<<
WARNING GUI_DEBUG: [update_plot] Started for 'NO'
DEBUG: [update_plot] Proceeding with pollutant: NO
INFO DEBUG: [update_plot] Processing pollutant: NO
WARNING GUI_DEBUG: [update_plot] Starting background thread for NO...
GUI_DEBUG: [update_plot] Starting background thread for NO...
>>> GUI_FLOW: Entering _start_progress (msg: Processing...) <<<
WARNING GUI_DEBUG: [_start_progress] Disabling button. msg: Processing...
WARNING GUI_DEBUG: [PlotWorker] Starting for NO
GUI_DEBUG: [PlotWorker] Thread started for NO
INFO DEBUG: [PlotWorker] Calling _merged...
WARNING GUI_DEBUG: [_merged] Start. Pollutant: NO, FillNaN: False
WARNING GUI_DEBUG: [_merged] State: has_geometry=True, is_native=True, mode=auto, len=137241
WARNING GUI_DEBUG: [_merged] Native/Geometry shortcut triggered for NO
DEBUG: [PlotWorker] _merged success. Rows: 137241
INFO DEBUG: [PlotWorker] _merged returned. Type: <class 'geopandas.geodataframe.GeoDataFrame'>, Rows: 137241
INFO DEBUG: [PlotWorker] Target CRS: +proj=lcc +lat_1=33.0 +lat_2=45.0 +lat_0=40.0 +lon_0=-97.0 +x_0=0 +y_0=0 +a=6370000 +b=6370000 +units=m +no_defs +type=crs
INFO Native grid shortcut: Skipping per-cell vector reprojection.
INFO DEBUG: Final plot CRS: +proj=lcc +lat_1=33.0 +lat_2=45.0 +lat_0=40.0 +lon_0=-97.0 +x_0=0 +y_0=0 +a=6370000 +b=6370000 +units=m +no_defs +type=crs
INFO DEBUG: [PlotWorker] Emitting plot_ready_signal for NO
INFO DEBUG: [PlotWorker] Signal emitted.
INFO DEBUG: [PlotWorker] Finished. Stopping progress.
INFO DEBUG: [_render_plot_on_main] Entered. Pollutant: NO, GDF Rows: 137241
INFO DEBUG: Rendering plot with Actual CRS: +proj=lcc +lat_1=33.0 +lat_2=45.0 +lat_0=40.0 +lon_0=-97.0 +x_0=0 +y_0=0 +a=6370000 +b=6370000 +units=m +no_defs +type=crs
INFO DEBUG: Calling create_map_plot...
INFO DEBUG: [_render_plot_on_main] Starting create_map_plot...
INFO Using Optimized QuadMesh for 137241 cells.
INFO DEBUG: [_render_plot_on_main] create_map_plot finished.
INFO Plotted NO
INFO Plotted NO
>>> GUI_EVENT: [GENERATE PLOT] Button Clicked! <<<
WARNING GUI_DEBUG: [_on_main_plot_clicked] Entering...
>>> GUI_FLOW: Entering on_generate_clicked <<<
WARNING GUI_DEBUG: [on_generate_clicked] Entering method...
>>> GUI_FLOW: update_plot for 'NO' <<<
WARNING GUI_DEBUG: [update_plot] Started for 'NO'
DEBUG: [update_plot] Proceeding with pollutant: NO
INFO DEBUG: [update_plot] Processing pollutant: NO
WARNING GUI_DEBUG: [update_plot] Starting background thread for NO...
GUI_DEBUG: [update_plot] Starting background thread for NO...
>>> GUI_FLOW: Entering _start_progress (msg: Processing...) <<<
WARNING GUI_DEBUG: [_start_progress] Disabling button. msg: Processing...
WARNING GUI_DEBUG: [PlotWorker] Starting for NO
GUI_DEBUG: [PlotWorker] Thread started for NO
INFO DEBUG: [PlotWorker] Calling _merged...
WARNING GUI_DEBUG: [_merged] Start. Pollutant: NO, FillNaN: False
WARNING GUI_DEBUG: [_merged] State: has_geometry=True, is_native=True, mode=auto, len=137241
WARNING GUI_DEBUG: [_merged] Native/Geometry shortcut triggered for NO
DEBUG: [PlotWorker] _merged success. Rows: 137241
INFO DEBUG: [PlotWorker] _merged returned. Type: <class 'geopandas.geodataframe.GeoDataFrame'>, Rows: 137241
INFO DEBUG: [PlotWorker] Target CRS: +proj=lcc +lat_1=33.0 +lat_2=45.0 +lat_0=40.0 +lon_0=-97.0 +x_0=0 +y_0=0 +a=6370000 +b=6370000 +units=m +no_defs +type=crs
INFO Native grid shortcut: Skipping per-cell vector reprojection.
INFO DEBUG: Final plot CRS: +proj=lcc +lat_1=33.0 +lat_2=45.0 +lat_0=40.0 +lon_0=-97.0 +x_0=0 +y_0=0 +a=6370000 +b=6370000 +units=m +no_defs +type=crs
INFO DEBUG: [PlotWorker] Emitting plot_ready_signal for NO
INFO DEBUG: [PlotWorker] Signal emitted.
INFO DEBUG: [PlotWorker] Finished. Stopping progress.
INFO DEBUG: [_render_plot_on_main] Entered. Pollutant: NO, GDF Rows: 137241
INFO DEBUG: Rendering plot with Actual CRS: +proj=lcc +lat_1=33.0 +lat_2=45.0 +lat_0=40.0 +lon_0=-97.0 +x_0=0 +y_0=0 +a=6370000 +b=6370000 +units=m +no_defs +type=crs
INFO DEBUG: Calling create_map_plot...
INFO DEBUG: [_render_plot_on_main] Starting create_map_plot...
INFO Using Optimized QuadMesh for 137241 cells.
INFO DEBUG: [_render_plot_on_main] create_map_plot finished.
INFO Plotted NO
INFO Plotted NO
Additional context
Add any other context or screenshots about the feature request here.
Is your feature request related to a problem? Please describe.
The point source emission files used as input to CMAQ (generated by SMOKE) can't be visualized by VERDI.
The tar.gz package below contains three files:
inln_mole_pt_oilgas_20180806_12US1_12Listos_cmaq_cb6_2018ff_18j_WR401.ncf
stack_groups_pt_oilgas_12US1_12Listos_2018ff_18j_WR401.ncf
GRIDDESC
The STACK_GROUPS file is automatically read by SMKPLOT if it is in the same directory as the pt source emissions file inln_mole_pt_oilgas_12US1_12Listos_2018ff_18j_WR401.ncf
The GRIDDESC file is also automatically read by SMKPLOT if it is in the same directory.
SMOKE Documentation on point source emission files:
https://www.cmascenter.org/smoke/documentation/3.0/html/ch02s05s03.html
Describe the solution you'd like
VERDI could provide an option to load the point source emissions file, stack group and GRIDDESC files, and create a tile plot the data similar to SMKPLOT.
Screenshot of the SMKPLOT GUI, note, that I selected the pollutant: NO, and used the following controls, Log Scale to see the white background and Zoom to Data to see the data over the Long Island Sound Region, and then selected Generate Plot (button at the bottom left of the SMKPLOT GUI.
Describe alternatives you've considered
SMKPLOT is able to plot these types of CMAQ emission point source files.
https://github.com/hnqtran/SMKPLOT
Obtain the code using the command:
Example files
example_cmaq_ptsource.tar.gz
I placed the three files from the above tar.gz file directly in the SMKPLOT directory:
Command used to run smkplot.py
Output from smkplot.py:
Additional context
Add any other context or screenshots about the feature request here.