[ncl-talk] Sub: WRAPIT help..

Dennis Shea shea at ucar.edu
Mon Aug 21 22:04:06 MDT 2017


[1]
You have a

 begin

but this *requires* an

 end

You have no 'end'. If you have a 'begin' you *must* have an 'end'

[2]

You have two 'do loops'

do yr = 1981,2013-1
do i = 0,9

but no corresponding loop terminations. Where are the 'end do'  ?  ie:

  end do   ; end do fi 'i' loop
end do     ; end do fot 'yr' loop

[3]

You have a 'return' in the script. A 'return' should be used *only* in a
function.

   function foo
   begin
       ,,,,
       return(...)
   end

[4] Please indent your code to add some structure. ncl-talk wants to help
but our time is valuable too! walking through non-indented code is a
nuisance. Structure helps!

[5] Use variables rather than hard-wired constants.

ua = a->uas(ii1:ii2,15:40,180:255)

    latS_idx = 15
    latN_idx = 40
    lonL_idx = 180
    lonR_idx = 255
ua = a->uas(ii1:ii2, latS_idx:latN_idx, lonL_idx:lonR_idx)

Better, if the grid is rectilinear, use coordinate variables.

   latS =
   latN =
   lonL =
   lonR =
ua = a->uas(ii1:ii2, {lats:latN}, {lonL:lonR})

---
Please read the NCL User Guide:
   http://www.ncl.ucar.edu/Document/Manuals/NCL_User_Guide/

Good luck








On Mon, Aug 21, 2017 at 9:25 PM, dale zuri <dalezuri at gmail.com> wrote:

>
>
>
> Hi,
>
> Fortran program doesn't seem to have any issues. But, NCL script produces
> a segmentation fault.
> I have attached here a script.
>
> I would appreciate any help and suggestions.
>
> Thanks
> Dz
>
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170821/e87bd761/attachment.html 


More information about the ncl-talk mailing list