Re: Failure of NCL when using nohup

From: Michael Murphy <mmurphy_at_nyahnyahspammersnyahnyah>
Date: Thu Nov 17 2011 - 17:04:34 MST

Problem apparently resolved!!

Putting an exit at the very end of the script seems to have solved my
problems with nohup & NCL. This is true for the simple script I gave in
my first email and also in more complex scripts that I use in my daily
work. In fact the "input in flex scanner failed" message I was getting
with nohup has completely disappeared.

I guess as a general rule of thumb it is always good to have an "exit"
command as the very last line of ones NCL scripts?

I really appreciate the help Saji; this problem had been a mysterious
pain in the neck for me for many months.

Thanks,
MJ

On 11/16/2011 07:29 PM, Saji Hameed wrote:
> Hi Michael,
>
> Try adding an 'exit' statement at the very end of the script. It may
> have to do with the flushing of I/O buffers.
>
> saji
>
> On Wed, Nov 16, 2011 at 11:45 AM, Michael Murphy <mmurphy@hrc-lab.org
> <mailto:mmurphy@hrc-lab.org>> wrote:
>
> NCL community,
>
> I have a request/challange for you. Can anyone get the following
> script to create it's output netCDF file (output.nc
> <http://output.nc>), including the global attributes, when using
> the nohup command (i.e. nohup ncl exampleScript.ncl):
>
> begin
> dummyVar = (/ 1,2,3,4,5,6,7,8,9,10 /)
> outfile = addfile("./output.nc <http://output.nc>","c")
> outfile->DUMVAR = dummyVar
>
>
> globalAtt = True
> globalAtt@CREATION_NOTES = "This is only an example
> to show that NCL fails with the nohup command"
> globalAtt@CREATION_DATE = systemfunc("date")
> fileattdef(outfile,globalAtt)
>
> end
>
> When I use nohup when running the above ncl script I consistently
> get the "input in flex scanner failed" message and an output file
> that does not contain the global attributes. I admit there is no
> error message but the output file is clearly flawed. If I run the
> script with out nohup every works fine.
>
> This same problem occurs on different machines and with different
> verisons of NCL (i.e. 5.2.1 & 6.0.0) and with numerous different
> NCL scripts. I am using NCL installed from binaries on Linux
> systems (CentOS).
>
> The example above is just a simple script but in more complex
> scripts designed to read variables from GRIB/NetCDF files and then
> write them to anew netCDF file, a new file is never even created
> at all!
>
>
> Thanks,
> MJ
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>

-- 
*Michael J Murphy*
Atmospheric Scientist
/Hydrologic Research Center
12555 High Bluff Drive #255
San Diego, CA 92130 USA
+1-858-461-4560 Tel
http://www.hrc-lab.org /

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Nov 17 17:04:45 2011

This archive was generated by hypermail 2.1.8 : Tue Nov 22 2011 - 14:17:53 MST