Re: problem with "closest_val"

From: Carl J. Schreck, III <carl_at_nyahnyahspammersnyahnyah>
Date: Sun, 7 Sep 2008 08:15:23 -0400

Hi Marco,

I believe this sounds correct, except that index 311 should exist. As
you explained it, lat(1) should be 39, and lat(311) should be 44, so
closest_val( 999, lat ) should return 311, since that corresponds to
the largest (and therefore closest) value.

Hope this helps....

       Carl

On Sat, Sep 6, 2008 at 10:47 AM, Marco Pastore <marco.pastore_at_cmcc.it> wrote:
> Hi all.
>
> I tried to use this function in one script, to find index of a model grid,
> corresponding to definite lon,lat cordinates.
> I have an 1-D array (i.e. latitude between 39 and 44, float, with 311
> values).
> If i try to pass to the closest_val function a value greater than the max
> value in the array, the function give me as results the index 311, that not
> exist.
>
> It is correct ?
>
> Thanks, ciao Marco
>
> --
> ### ### ### ### ###
>
> MARCO PASTORE
>
> Istituto Nazionale di Geofisica e Vulcanologia
> Gruppo Nazionale di Oceanografia Operativa
> Viale Aldo Moro 44
> 40128, Bologna
>
> Tel:(+39)051-3782649
> Cel:(+39)339 8273965
>
> Skype: mapas71
>
> ### ### ### ### ###
> _______________________________________________
> ncl-talk mailing list
> ncl-talk_at_ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Sun Sep 07 2008 - 06:15:23 MDT

This archive was generated by hypermail 2.2.0 : Mon Sep 08 2008 - 14:49:02 MDT