Displaying differences for changeset
 
display as  

src/java/m/weps/V1_3.java

@@ -605,8 +605,12 @@
                         }
 
                         bInterpolatedWind = true;
+                        String interpolateOut = FileUtils.readFileToString(interpolate.stdout());
+                        if(interpolateOut.contains("ERROR"))
+                            throw new ServiceException("Wind Interpolation Error: \n"+ interpolateOut);
                         WeightsParser1 wp = new WeightsParser1();
-                        wp.weightsFile = FileUtils.readFileToString(interpolate.stdout());
+                        wp.weightsFile = interpolateOut;
+                        
                         LOG.info("exit value from pcInterpolate execution=" + ret);
                         // must process this monstrosity 
                         wp.parse();

src/java/m/weps/V1_4.java

@@ -590,10 +590,11 @@
                         throw new ServiceException(" Interpolation execution failed: " + ret);
                     }
 
-                    // Added small delay because occasionally the stdout was incomplete upon parsing
-                    Thread.sleep(300);
 
                     bInterpolatedWind = true;
+                    String interpolateOut = FileUtils.readFileToString(interpolate.stdout());
+                    if(interpolateOut.contains("ERROR"))
+                        throw new ServiceException("Wind Interpolation Error: \n"+ interpolateOut);
                     WeightsParser wp = new WeightsParser();
 //                    wp.weightsFile = pcInterpolate.stdout;
                     //wp.weightsFile = FileUtils.readFileToString(interpolate.stdout());