JiriRichter / WRFDomainWizard

GNU General Public License v3.0
45 stars 13 forks source link

Website cannot open namelist.wps for mercator projection #20

Closed HathewayWill closed 6 months ago

HathewayWill commented 6 months ago

Describe the bug When loading your own mercator projection you cannot see any graphics displayed. It appears that the lambert projection works but not the mercator. I haven't tested any other projection yet.

To Reproduce Steps to reproduce the behavior:

  1. Go to Open
  2. Click on Load namelist.wps
  3. Select this file namelist.zip or 4, See error

Expected behavior should be able to open any namelist file for wps and display domain

HathewayWill commented 6 months ago

Cannot open mercator even made from the website

JiriRichter commented 6 months ago

The namelist is not loaded because of an issue when calculating grid center in IJ coordinates by calling:

var grid_center_ij = this._projection.latlon_to_ij(this._proj_ref_lat, this._proj_ref_lon);

this translates to proj4 library call with the following values:

proj4( '+units=m +proj=longlat +a=6370000 +b=6370000 +towgs84=0,0,0 +no_defs=True', '+units=m +proj=merc +lat_ts=8.401 +lon_0=null +a=6370000 +b=6370000 +towgs84=0,0,0 +no_defs=True +nadgrids=null', [1.278, 8.401]);

This will require more investigating. I will treat this bug at higher priority