[ncl-talk] setfileoption

Mary Haley haley at ucar.edu
Mon Dec 12 10:16:46 MST 2016


I forgot to mention: would you be willing to try our "conda" versions of
NCL on your small script on your Mac?

You can get "conda" by installing miniconda (
http://conda.pydata.org/miniconda.html)

Once you have conda installed, here's how to get either the stable (V6.3.0)
or test version (V6.4.0 development):

Stable version:

conda create -n *ncl_stable* -c conda-forge ncl
source activate *ncl_stable*

Test version:

conda create -n *ncl_test* -c dbrown -c khallock ncl
source activate *ncl_test*

where *ncl_stable* or *ncl_test* are the names of the conda environments.
You can call them whatever you want.

To deactivate an environment (which should put you back in your default
environment):

source deactivate *ncl_test*

or

source deactivate *ncl_stable*

You can find full conda instructions here:

http://www.ncl.ucar.edu/Download/conda.shtml

Thanks,

--Mary


On Mon, Dec 12, 2016 at 10:08 AM, Mary Haley <haley at ucar.edu> wrote:

> Takeshi,
>
> Thanks for reporting this bug and providing a short script.  This was an
> elusive bug that we saw awhile back, but we were never able to reproduce it
> and hence couldn't fix it. Your script may help us narrow down the source
> of the problem.
>
> Your script doesn't fail for us, so could you email me offline with the
> following information so we can try to determine why it's not working for
> you.
>
> Which version of NCL:
>
>  ncl -V
>
> Did you build this NCL from source code?  If so, which compilers and their
> versions did you use?
> If you didn't build NCL from source code, then which binary did you
> download?
>
> What version of MacOS are you running
>
> sw_vers -productVersion
>
> Thanks,
>
> --Mary
>
>
>
>
> On Fri, Dec 9, 2016 at 9:42 PM, Takeshi Enomoto <takeshi at macports.org>
> wrote:
>
>> Hi,
>>
>> I haven’t been posted for a long time, but I regularly use NCL.
>> I appreciate the efforts of development and support.
>>
>> A user of ncarg of MacPorts reported a problem with ESMF.
>> The error appears to be cause with MacPorts’ ncl, not with the binary at
>> UCAR.
>>
>> <https://trac.macports.org/ticket/53031>
>>
>> I investigated the script and found that setfileoption() wipes the symbol
>> table:
>> after a call to setfileoption variables become undefined.
>>
>> I appreciate any suggestions for fixing the problem.
>>
>> Regards,
>>
>> T.
>>
>> $ cat bar.ncl
>> procedure curvilinear_to_SCRIP(Opt[1]:logical)
>> begin
>>     if (isatt(Opt,"NetCDFType").and.\
>>         str_lower(Opt at NetCDFType).eq."netcdf4") then
>>       setfileoption("nc","Format","netcdf4")
>>       nc_file_type = "netcdf4"
>>     else
>>       nc_file_type = "netcdf3"
>>     end if
>>     print(nc_file_type)
>> end     ; of curvilinear_to_SCRIP(...)
>> begin
>>   Opt = True
>>   curvilinear_to_SCRIP(Opt)
>>   Opt at NetCDFType = "netcdf4"
>>   curvilinear_to_SCRIP(Opt)
>>   Opt at NetCDFType = "netcdf3"
>>   curvilinear_to_SCRIP(Opt)
>> end
>>
>> $ ncl -nQ bar.ncl
>>
>>
>> Variable: nc_file_type
>> Type: string
>> Total Size: 8 bytes
>>             1 values
>> Number of Dimensions: 1
>> Dimensions and sizes: [1]
>> Coordinates:
>> netcdf3
>> fatal:Variable (nc_file_type) is undefined
>> fatal:["Execute.c":8575]:Execute: Error occurred at or near line 10 in
>> file bar.ncl
>>
>> fatal:["Execute.c":8575]:Execute: Error occurred at or near line 16 in
>> file bar.ncl
>>
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk at ucar.edu
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20161212/5892a010/attachment.html 


More information about the ncl-talk mailing list