JiriRichter / WRFDomainWizard

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

Uncaught Error: Invalid IJ coordinates #26

Closed everdaniel closed 5 months ago

everdaniel commented 5 months ago

Describe the bug I'm trying to edit a namelist.wps that was created with WRFDomainWizard but I'm seeing an error on the browser console when I try to edit the values after I loaded the namelist.wps -- more specifically I'm trying to increase the e_sn value, the specific error I'm seeing is this:

wrf.projection.js:108 Uncaught Error: Invalid IJ coordinates
    at WrfProjection.ij_to_latlon (wrf.projection.js:108:19)
    at Geogrid.unstaggered_ij_to_latlon (geogrid.js:269:33)
    at Geogrid._initialize (geogrid.js:219:22)
    at new Geogrid (geogrid.js:54:14)
    at e._initGeogrid (leaflet.wrf-grid.js:80:16)
    at e.update (leaflet.wrf-grid.js:694:29)
    at e.update (leaflet.wrf-domain.js:173:24)
    at setGridValues (domain-wizard.sidebar.wps.panel.js:121:20)
    at HTMLButtonElement.<anonymous> (domain-wizard.sidebar.wps.panel.js:156:13)
    at HTMLButtonElement.dispatch (jquery.min.js:2:40035)

To Reproduce Steps to reproduce the behavior:

  1. Go to wrfdomainwizard.net
  2. Click on the Open button
  3. Select the attached file: namelist.txt
  4. Increase the value in e_sn for d01 from 480 to 490
  5. Click on the Update button
  6. See the error above in the browser console

Expected behavior I expect the increased value to be updated on the domain or to see an error if the value fails a validation

Screenshots Screenshot 2024-04-26 at 12 26 07 AM

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

JiriRichter commented 5 months ago

This seems similar to bug #22. Invesitigating.

JiriRichter commented 5 months ago

The previous bug fix did not cover all scenarios. I hope with this code change the issue will not surface again. @everdaniel, wrfdomainwizard.net has been updated with this fix.