From solferme at gmail.com Wed Jul 8 22:30:42 2015 From: solferme at gmail.com (Solange) Date: Wed, 8 Jul 2015 17:30:42 -0300 Subject: [Rnomads-user] handling ReadGrib errors in batch Message-ID: Hello everybody, I am using the rNOMADS package to work with GFS grib files. I run a R script in batch, using Rscript. As long as the file exists (and at least one combination of variable/level exists), everything goes smoothly. But when the file does not exist (or the only variable/level requested does not exist) an error occurs and the script stops. I would like to use this script for an operative purpose, so obviously I have to find a way to deal with this in batch. I tried using tryCatch but got not results. Did anyone have this problem before? Thanks!! Best regards, Solange -------------- next part -------------- An HTML attachment was scrubbed... URL: From haksaeng at live.unc.edu Thu Jul 9 18:28:46 2015 From: haksaeng at live.unc.edu (Bowman, Daniel) Date: Thu, 9 Jul 2015 16:28:46 +0000 Subject: [Rnomads-user] handling ReadGrib errors in batch In-Reply-To: References: Message-ID: Hi Solange, Can you provide the script, so we can see exactly what you're experiencing? Thanks, Danny Daniel C. Bowman Doctoral Candidate in Geophysics Mitchell 315 Department of Geological Sciences The University of North Carolina at Chapel Hill phone: 575-418-8555 email: daniel.bowman at unc.edu linkedin: https://www.linkedin.com/in/dannycbowman web:http://geosci.unc.edu/page/daniel-c-bowman twitter: @dannycbowman ________________________________ From: rnomads-user-bounces at lists.r-forge.r-project.org on behalf of Solange Sent: Wednesday, July 8, 2015 4:30 PM To: rnomads-user at lists.r-forge.r-project.org Subject: [Rnomads-user] handling ReadGrib errors in batch Hello everybody, I am using the rNOMADS package to work with GFS grib files. I run a R script in batch, using Rscript. As long as the file exists (and at least one combination of variable/level exists), everything goes smoothly. But when the file does not exist (or the only variable/level requested does not exist) an error occurs and the script stops. I would like to use this script for an operative purpose, so obviously I have to find a way to deal with this in batch. I tried using tryCatch but got not results. Did anyone have this problem before? Thanks!! Best regards, Solange -------------- next part -------------- An HTML attachment was scrubbed... URL: