Re: systemfunc returning an integer

From: David Brown <dbrown_at_nyahnyahspammersnyahnyah>
Date: Thu Feb 16 2012 - 14:05:45 MST

Hi Joe,
You are correct. We will fix it to return a missing string value instead.
 -dave

On Feb 16, 2012, at 1:52 PM, Joe Grim wrote:

> Hi,
>
> I am trying to use the systemfunc function in order to check if a
> directory exists. The NCL documentation
> (http://www.ncl.ucar.edu/Document/Functions/Built-in/systemfunc.shtml)
> says that the returned array should be of type string. However, I keep
> getting it of type integer. What I am ultimately trying to do is see if
> the directory exists, and if not, create it.
>
> Here is the code snippet:
> dir_check = systemfunc("ls
> /d1/fieldData/CoSPA_INIT_CASES/ncf/MCS_grid/20100603/")
> print(dir_check)
>
> And the relevant output:
> ls: cannot access /d1/fieldData/CoSPA_INIT_CASES/ncf/MCS_grid/20100603/:
> No such file or directory
>
>
> Variable: dir_check
> Type: integer
> Total Size: 4 bytes
> 1 values
> Number of Dimensions: 1
> Dimensions and sizes: [1]
> Coordinates:
> Number Of Attributes: 1
> _FillValue : -2147483647
> (0) -2147483647
>
> It looks to me like if it returns an error message, it decides to return
> it as an integer with a missing value. Is this the way it should be?
> The problem is that I am trying to test for a string.
>
> Thanks for your help.
>
> Joe Grim
> --
> NCAR - RAL
> FL2 Rm 2068
> (303) 497-8397
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Feb 16 14:05:58 2012

This archive was generated by hypermail 2.1.8 : Fri Feb 17 2012 - 08:50:10 MST