Displaying differences for changeset
 
display as  

src/java/m/wrfhydro/V1_0.java

@@ -34,7 +34,6 @@
 @State(State.STABLE)
 @VersionInfo("$Id$")
 @Category("Hydrology")
-@Category("Flood prediction")
 
 @Path("m/5.0.3")
 @Resource(file = MPI, type = REFERENCE, id = MPI)
@@ -52,23 +51,23 @@
   protected void doProcess() throws Exception {
 
     // allow for num cores configuration
-    int threads = Config.getInt("mpirun.np", 2);
-    threads = metainfo().getInt("mpirun.np", threads);
+    int np = metainfo().getInt("mpirun.np", 2);
+    np = Config.getInt("mpirun.np", np);
 
     if (!new File(wrf_hydro).exists()) {
-      throw new ServiceException("Not found: " + wrf_hydro.toString());
+      throw new ServiceException("Not found: " + wrf_hydro);
     }
 
     Executable mpi = resources().getExe(MPI);
     mpi.addArguments(
         "-wdir", getWorkspaceDir(),
-        "-np", threads,
+        "-np", np,
         wrf_hydro
     );
 
     int ret = mpi.exec();
     if (ret != 0) {
-      throw new ServiceException("Error running mpi wrf_hydro:" + ret);
+      throw new ServiceException("Error running mpi wrf_hydro: " + ret);
     }
   }