Re: float type - division

From: Micah Sklut <micahs2005_at_nyahnyahspammersnyahnyah>
Date: Tue Dec 06 2011 - 10:24:36 MST

Ah, of course, the decimal point!
Thanks for the update on the latest release.... I'm hesitant on upgrading
due to a bunch of operational scripts that will likely be effected, but
I'll look into it.

Micah

On Tue, Dec 6, 2011 at 12:22 PM, Adam Phillips <asphilli@ucar.edu> wrote:

> Hi Micah,
> Putting a period after the 15 should do the trick:
> lat(i) = 47 - (i/15.)
>
> (The period converts the 15 to a float.)
>
> Secondly, I would highly recommend upgrading to the newest version of NCL.
> v4.3.1 is quite old. You can either upgrade to v6.0.0 now or wait for the
> January release of v6.1.0. v6.1.0 is supposed to include the much
> anticipated ESMF regridding capability, amongst other upgrades.
> Good luck,
> Adam
>
>
> On 12/06/2011 10:14 AM, Micah Sklut wrote:
>
> Hi NCL people,
>
> I have a very simple problem.
>
> I am creating float arrays, for lat, lon, like this:
>
> lat = new((/481/),"float")
> lon = new((/586/),"float")
>
> nloc = 2 ; number of wind barbs
>
> do i = 0,480
> lat(i) = 47 - (i/15)
> end do
>
> do i = 0,585
> lon(i) = 261 + (i/15)
> end do
>
>
> However, my lats/lons turn into integers.
> What is the appropriate solution to create my float vars?
>
> Thank you!
>
> PS.
> I am using an old ncl version - 4.3.1.
>
>
> --
> Micah Sklut
>
>
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
> --
> ______________________________________________________________
> Adam Phillips asphilli@ucar.edu
> NCAR/Climate and Global Dynamics Division (303) 497-1726
> P.O. Box 3000
> Boulder, CO 80307-3000 http://www.cgd.ucar.edu/cas/asphilli
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>

-- 
Micah Sklut

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Dec 6 10:24:49 2011

This archive was generated by hypermail 2.1.8 : Fri Dec 09 2011 - 13:09:09 MST