55import java .awt .image .DataBuffer ;
66
77import org .geotools .coverage .grid .GridCoverage2D ;
8- import org .hortonmachine .hmachine .modules .hydrogeomorphology .scsrunoff . OmsScsRunoff ;
8+ import org .hortonmachine .hmachine .modules .hydrogeomorphology .swy . OmsSWYQuickflow ;
99import org .integratedmodelling .geoprocessing .TaskMonitor ;
1010import org .integratedmodelling .klab .api .data .general .IExpression ;
1111import org .integratedmodelling .klab .api .model .contextualization .IResolver ;
1717import org .integratedmodelling .klab .components .runtime .contextualizers .AbstractContextualizer ;
1818import org .integratedmodelling .klab .exceptions .KlabException ;
1919
20- public class ScsRunoffResolver extends AbstractContextualizer implements IResolver <IProcess >, IExpression {
20+ public class OmsSWYQuickflowResolver extends AbstractContextualizer implements IResolver <IProcess >, IExpression {
2121
2222 @ Override
2323 public Type getType () {
@@ -28,7 +28,7 @@ public Type getType() {
2828 public IProcess resolve (IProcess runoffProcess , IContextualizationScope context ) throws KlabException {
2929
3030 TaskMonitor taskMonitor = new TaskMonitor (context .getMonitor ());
31- taskMonitor .setTaskName ("SCS Runoff " );
31+ taskMonitor .setTaskName ("SWY Quickflow " );
3232
3333 IState rainfallVolumeState = getInput ("rainfall_volume" , IState .class );
3434 IState streamPresenceState = getInput ("presence_of_stream" , IState .class );
@@ -41,22 +41,22 @@ public IProcess resolve(IProcess runoffProcess, IContextualizationScope context)
4141
4242 IState runoffState = getOutput ("runoff_water_volume" , IState .class );
4343
44- OmsScsRunoff scsRunoff = new OmsScsRunoff ();
45- scsRunoff .pm = taskMonitor ;
46- scsRunoff .inRainfall = getGridCoverage (context , rainfallVolumeState );
47- scsRunoff .inNet = getGridCoverage (context , streamPresenceState );
48- scsRunoff .inCurveNumber = getGridCoverage (context , curveNumberState );
49- scsRunoff .inNumberOfEvents = getGridCoverage (context , numberOfEventsState );
44+ OmsSWYQuickflow swyQuickflow = new OmsSWYQuickflow ();
45+ swyQuickflow .pm = taskMonitor ;
46+ swyQuickflow .inRainfall = getGridCoverage (context , rainfallVolumeState );
47+ swyQuickflow .inNet = getGridCoverage (context , streamPresenceState );
48+ swyQuickflow .inCurveNumber = getGridCoverage (context , curveNumberState );
49+ swyQuickflow .inNumberOfEvents = getGridCoverage (context , numberOfEventsState );
5050 try {
51- scsRunoff .process ();
51+ swyQuickflow .process ();
5252 } catch (Exception e ) {
5353 throw new KlabException (e );
5454 }
5555 if (!context .getMonitor ().isInterrupted ()) {
56- GeotoolsUtils .INSTANCE .coverageToState (scsRunoff . outputDischarge , runoffState , context .getScale (), null );
56+ GeotoolsUtils .INSTANCE .coverageToState (swyQuickflow . outQuickflow , runoffState , context .getScale (), null );
5757 }
5858
59- GeotoolsUtils .INSTANCE .dumpToRaster (context , "ScsRunoff " , rainfallVolumeState , streamPresenceState , curveNumberState ,
59+ GeotoolsUtils .INSTANCE .dumpToRaster (context , "SWYQuickflow " , rainfallVolumeState , streamPresenceState , curveNumberState ,
6060 runoffState , numberOfEventsState );
6161
6262 return runoffProcess ;
@@ -71,7 +71,7 @@ private GridCoverage2D getGridCoverage(IContextualizationScope context, IState s
7171
7272 @ Override
7373 public Object eval (IContextualizationScope context , Object ... parameters ) throws KlabException {
74- return new ScsRunoffResolver ();
74+ return new OmsSWYQuickflowResolver ();
7575 }
7676
7777}
0 commit comments