NRC-Research / SNAP-issues

This repository was created to provide a public location to record and display the status of "issues" for the SNAP application. The SNAP developers will acknowledge, provide (and maybe request) feedback on the reported issues, and in general use the information to improve SNAP code.
3 stars 0 forks source link

SPACEDIF=6 option not available #68

Open NRCgg opened 7 months ago

NRCgg commented 7 months ago

As reported by Chris Murray [ @murpup ] via email (copy of email contents follows):


I had a question today from an NRC staff member about using Lax-Wendroff numerical method. This has caused me to identify several bugs in documentation and the codes.

1) SNAP does not appear to allow use of SPACEDIF=6 as a second-order numerical method, This needs to be corrected 2) The TRACE documentation is incomplete in that it does not indicate that SPACEDIF=6 is possible for each of the individual component types. I have mostly corrected this with the exception being the CANCHAN component. 3) It does not appear that the code is set up to allow the TIMEMETHOD and SPACEMETHOD to be read in for the CANCHAN component when MIXEDNUMERICS > 0. The IF test in ReadNumericalMethods() appears to not include that component type, but it probably should. 4) I am also not 100% sure that TIMEMETHOD and SPACEMETHOD are read in properly for CHAN components. It looks like compDat is set up to read that card in for CHAN and CANCHAN components, but then in rdcomp, at the point where the remaining cards would be read in, there are comments indicating those component types were already read in. This makes me question whether I truly understand how the input processing for CHAN and CANCHAN are handled. So while item (3) is being addressed, I would also like someone from ISL to take a more detailed look and verify that CHAN components are properly reading in TIMEMETHOD and SPACEMETHOD when MIXEDNUMERICS > 0. We may already have a test problem to demonstrate this, but I have not looked.

WDunsford commented 7 months ago

SNAP supports SPACEDIF=6 when the integration method is set to 2. To turn this on for a component in the SNAP property view:

  1. Set the Enabmed Mixed Numerics to "True"
  2. Set the Time Integrate Method to [2] Semi-Implicit
  3. Set the Spacial Diff. Method to [6] Lax-Wendrof

The Mixed Numerics options are not currently supported for CANCHAN components.

murpupNRC commented 6 months ago

Is there any way to export a model with MixedNumerics namelist option = 1? Does not look like it.

WDunsford commented 6 months ago

Is there any way to export a model with MixedNumerics namelist option = 1? Does not look like it.

Currently no. Two formats (1 vs 2) are functionally equivalent in that they define what components include MixedNumerics, and what methods they use. The GUI editor in Model Options provides a tabular view of all the 1D hydraulic components in the model, and allows managing which components use the different options easily. The ASCII importer should import models that use MixedNumerics=1, and the generated ASCII input file should be the equivelent.

murpupNRC commented 6 months ago

I recognize that they are functionally equivalent. My only thought is that perhaps a user would not wish to have their model permuted in this way, especially if they are operating under a strict QA program.