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
firstday(y,x) = time( min(ii) )
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
Received on Thu Apr 30 2009 - 14:45:30 MDT
This archive was generated by hypermail 2.2.0 : Thu Apr 30 2009 - 15:56:01 MDT