Hi Kara
I am not sure who created popslice_2.ncl.
I don't deal much with the ocean model POP grids.
I speculate that
i = ind(loni(1:ilon-1).lt.loni(0:ilon-2))
is returning an array > one element. Add print(i)
after the above.
Then the error occurs when you try to use
lono(0:ii-2) = (/ loni(i+1:ilon-1) /)
If i is not a single value ... you will get an error.
==========================================
Perhaps, the following may provide some insight into getting values near
the pole.
However, very recently, a paleo person asked me about some POP grids.
He sent his files and I did some plots. Ignore the fact that the paleo
land/sea
and current/sea land to not match. The paleo "pole" is over Greenland.
http://www.cgd.ucar.edu/~shea/paleo_1.png.0
http://www.cgd.ucar.edu/~shea/paleo_1.png.1
2
3
The paleo POP was remapped to the T31 ... you remapped to T42
[see: paleo_1.png.3]
The paleo POP grid had sizes
nlon = 100 ;
nlat = 122 ;
z_t = 25 ;
z_w = 25 ;
I speculate that your POP grid sizes are different. [ ncdump -h ...]
nlon = 320 ;
nlat = 384 ;
z_t = 40 ;
z_w = 40 ;
(Please make the appropriate adjustments if this is not correct.)
Note that the numbers on the bottom and left of paleo_1.png.[0/1]
are the subscript indices for the paleo grid. So, for your grid
they would like span 0-383 along the y-axis and 0-321 along
the x-axis.
see: http://www.ncl.ucar.edu/Applications/Images/popgrid_1_lg.png
Kara Sterling wrote:
> I am looking at the N. Atlantic and the Arctic, and have ocean slice plots
> for POP data that has been remapped to the T42 grid, but would like to
> compare them with the natural POP coordinate system. However, after first
> running popslice_1.ncl, and then switching to the more generalized
> popslice_2.ncl (a great help - Thank you!), I get the following error
> messages when I try to run anything past 76.0 N... (nlts > 366)
>
> fatal:Illegal Subscript. Only scalar values are allowed in subscript ranges.
>
> fatal:Execute: Error occurred at or near line 20 in file popsliceTEMP.ncl
>
> fatal:Execute: Error occurred at or near line 66 in file popsliceTEMP.ncl
>
> (part of the function reorder)
> lono = loni
> line 20 -> lono(0:ii-2) = (/ loni(i+1:ilon-1) /)
> lono(ii-1:) = (/ loni(0:i) /)
>
> I'm not sure what the problem here is, but have attached my program as well.
>
> ALSO, if the POP nlat coordinates run from [79.2 S to 77.2 N], how do I
> find ocean slices for the Arctic?
>
> Any help?
> Thanks!
>
> Kara
> ------------------------------------------------------------------------
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk_at_ucar.edu
> 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 | ====================================================== _______________________________________________ ncl-talk mailing list ncl-talk_at_ucar.edu http://mailman.ucar.edu/mailman/listinfo/ncl-talkReceived on Wed Oct 31 2007 - 11:24:51 MDT
This archive was generated by hypermail 2.2.0 : Fri Nov 02 2007 - 10:04:07 MDT