Re: Problem with shea_util.ncl and WRAPIT

From: Barry Baker <bbaker_at_nyahnyahspammersnyahnyah>
Date: Wed Oct 13 2010 - 14:06:55 MDT

Thanks for the suggestion Dennis. Unfortunately I do have those lines in the ex01.ncl. At least I think I do here is the file.

load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
;
; if get error remember: WRAPIT -L /opt/local/lib/gcc44/ -m64 pet_jh.f

external EX01 "./ex01.so"
 
begin
;
; Calculate three values of a quadratic equation
;
   nump = 3
   x = (/ -1., 0.0, 1.0 /)
   qval = new(nump,float)
   EX01::cquad(-1., 2., 3., nump, x, qval) ; Call the NCL version of
                                           ; your Fortran subroutine.
   print("Polynomial value = " + qval) ; Should be (/0,3,4/)
 
;
; Calculate an arc length.
;
   xc = (/ 0., 1., 2. /)
   yc = (/ 0., 1., 0. /)
   arclen = EX01::arcln(nump,xc,yc) ; Call the NCL version of
                                        ; your Fortran function.
   print("Arc length = " + arclen) ; should be 2.82843
end

On Oct 13, 2010, at 1:59 PM, Dennis Shea wrote:

> It looks to me like you need to load contributed.ncl prior to shea_util.f
>
>
> $NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl
> $NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl
>
>
> On 10/13/2010 01:56 PM, Barry Baker wrote:
>> Hello,
>>
>> I am running NCL 5.2.1 on a Macbook Pro with 0SX 10.6.4. My bashrc
>> contains the export NCARG_ROOT=/usr/local and export
>> PATH=$NCARG_ROOT/bin:$PATH environmental variables. I am trying to use
>> the WRAPIT command with gcc4.4 gfortran and the example programs ex01.f
>> ex01.ncl The FORTRAN program compiles well with the following command
>> WRAPIT -L /opt/local/lib/gcc44/ ex01.f However, when I try running the
>> ncl file I get the error listed below. Any insight into why I may be
>> receiving this error would be greatly appreciated.
>>
>> I have used WRAPIT successfully on previous versions of NCL. Thanks in
>> advance, Barry
>>
>> fatal:syntax error: line 3202 in file
>> $NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl before or near \n
>> copy_VarCoords(x, advect)
>> ---------------------------^
>> fatal:syntax error: possibly an undefined procedure
>> fatal:Syntax Error in block, block not executed
>> fatal:error at line 3225 in file
>> $NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl
>> fatal:syntax error: line 3334 in file
>> $NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl before or near \n
>> copy_VarCoords(X, Xdp)
>> ------------------------^
>> fatal:syntax error: possibly an undefined procedure
>> fatal:Syntax Error in block, block not executed
>> fatal:error at line 3370 in file
>> $NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl
>> fatal:syntax error: line 3448 in file
>> $NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl before or near \n
>> copy_VarCoords(t, theta)
>> --------------------------^
>> fatal:syntax error: possibly an undefined procedure
>> fatal:Syntax Error in block, block not executed
>> fatal:error at line 3452 in file
>> $NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl
>> fatal:syntax error: line 3543 in file
>> $NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl before or near \n
>> copy_VarCoords(t,s)
>> ---------------------^
>> fatal:syntax error: possibly an undefined procedure
>> fatal:Syntax Error in block, block not executed
>> fatal:error at line 3546 in file
>> $NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl
>> fatal:syntax error: line 3636 in file
>> $NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl before or near \n
>> copy_VarCoords(t, theta)
>> --------------------------^
>> fatal:syntax error: possibly an undefined procedure
>> fatal:syntax error: line 3672 in file
>> $NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl before or near \n
>> copy_VarCoords(t,pv)
>> ----------------------^
>> fatal:syntax error: possibly an undefined procedure
>> fatal:Syntax Error in block, block not executed
>> fatal:error at line 3675 in file
>> $NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl
>> fatal:syntax error: line 3768 in file
>> $NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl before or near \n
>> copy_VarCoords(t, theta)
>> --------------------------^
>> fatal:syntax error: possibly an undefined procedure
>> fatal:syntax error: line 3779 in file
>> $NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl before or near \n
>> copy_VarCoords(t,s)
>> ---------------------^
>> fatal:syntax error: possibly an undefined procedure
>> fatal:syntax error: line 3811 in file
>> $NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl before or near \n
>> copy_VarCoords(t,pv)
>> ----------------------^
>> fatal:syntax error: possibly an undefined procedure
>>
>> fatal:Syntax Error in block, block not executed
>>
>> fatal:error at line 3814 in file
>> $NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl
>>
>> ___________________________________
>> Barry Baker, PhD
>> Director, Canyonlands Research Center
>> The Nature Conservancy
>> 820 Kane Creek Blvd.
>> P.O. Box 1329
>> Moab, UT 84532
>> Tel: 435-259-4183
>> Cell: 970-217-3068
>> _http://canyonlandsresearchcenter.org
>> _
>> “All is flux, nothing is stationary; Nothing endures but change”
>> ....Heraclitus (540 – 475 BC)
>>
>>
>>
>>
>>
>> _______________________________________________
>> ncl-talk mailing list
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
> --
> ======================================================
> Dennis J. Shea tel: 303-497-1361 |
> P.O. Box 3000 fax: 303-497-1333 |
> Climate Analysis Section |
> Climate & Global Dynamics Div. |
> National Center for Atmospheric Research |
> Boulder, CO 80307 |
> USA email: shea 'at' ucar.edu |
> ======================================================

___________________________________
Barry Baker, PhD
Director, Canyonlands Research Center
The Nature Conservancy
820 Kane Creek Blvd.
P.O. Box 1329
Moab, UT 84532
Tel: 435-259-4183
Cell: 970-217-3068
http://canyonlandsresearchcenter.org

“All is flux, nothing is stationary; Nothing endures but change” ....Heraclitus (540 – 475 BC)

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Oct 13 14:06:30 2010

This archive was generated by hypermail 2.1.8 : Tue Oct 19 2010 - 14:38:00 MDT