Displaying differences for changeset
 
display as  

src/java/m/wrfhydro/V1_0.java

@@ -36,14 +36,12 @@
 @Category("Hydrology")
 @Category("Flood prediction")
 
-@Path("m/wrfhydro/1.0")
-@Resource(file = "/usr/local/tomcat/WRF/wrf_hydro_NoahMP.exe", id = WRF_HYDRO, type = REFERENCE)
+@Path("m/wrf-hydro/5.0.3")
 @Resource(file = MPI, type = REFERENCE, id = MPI)
 @Resource(file = "diag_hydro.* *.txt", type = OUTPUT)
 public class V1_0 extends ModelDataService {
 
   public static final String MPI = "mpirun";
-  public static final String WRF_HYDRO = "wrf_hydro";
 
 
   @Override
@@ -55,11 +53,13 @@
     threads = metainfo().getInt("mpi.cores", threads);
 
     Executable mpi = resources().getExe(MPI);
-    File wrf_hydro = resources().getFile(WRF_HYDRO);
+    File wrf_hydro = new File("/usr/local/tomcat/WRF/wrf_hydro_NoahMP.exe");
+    if (!wrf_hydro.exists()) {
+      throw new ServiceException("Not found: " + wrf_hydro.toString());
+    }
 
     mpi.addArguments(
         "-wdir", getWorkspaceDir(),
-        //        "--oversubscribe",
         "-np", threads,
         wrf_hydro.toString()
     );