whobbs_at_ucla.edu wrote:
> Mike
>
> This is just my suggestion, there may be a more elegant way without the loops.
>
>
> begin
>
> time = temp&time
> firstday = new((/nlat, nlon/) typeof(time))
>
> do y = 0, nlat-1
> do x = 0, nlon-1
>
> ii = ind(temp(y,x,:).ge.50.)
>
> if (not(all(ismissing(ii)) then
>
if (.not.ismissing(ii(0))) then ; fewer operations
> firstday(y,x) = time( min(ii) )
>
firstday(y,x) = time( ii(0) ) ; no 'min' ii(0)
is the 1st
> end if
> delete(ii)
>
> end do
> end do
>
> end
>
> If the 'time' coords are not in a date format (e.g. 'hours since
> 01-01-00' or something) then you can use 'ut_calender()' to convert to
> the date format you want.
>
> Hope that helps
>
> Will
>
>
> Quoting Michael Notaro <mnotaro_at_wisc.edu>:
>
>
>> If I have a variable temp(lat,lon,time), where temp is the daily
>> temperature for one year,
>> what's an easy way to find firstday(lat,lon), where firstday is the
>> first day with a temperature
>> of at least 50F?
>>
>> Thanks, Mike
>> _______________________________________________
>> ncl-talk mailing list
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>>
>
>
> _______________________________________________
> 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 | ====================================================== _______________________________________________ ncl-talk mailing list List instructions, subscriber options, unsubscribe: http://mailman.ucar.edu/mailman/listinfo/ncl-talkReceived on Thu Apr 30 2009 - 17:16:37 MDT
This archive was generated by hypermail 2.2.0 : Fri May 01 2009 - 15:10:00 MDT