Hi Chen,
You can use a do...end do loop for this task:
newArray = new( dimsizes(A), typeof(A), A@_FillValue )
do i=0,dimsizes(time)-1
newArray( i, :, : ) = A( i, :, : ) - B
end do
Best regards,
Mateus
2009/8/4 Changlin Chen <clchen_at_ouc.edu.cn>
> Hi,
>
> I have a three-dimensional array A(time,lat,lon) and a two-dimensional
> array B(lat,lon) .
> The number of dimensions do not match.
> How can I calculate the anomaly of A by subtracting B from A?
> Thanks!
> clchen
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-- Mateus da Silva Teixeira Registered Linux User #466740
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Aug 03 2009 - 21:30:05 MDT
This archive was generated by hypermail 2.2.0 : Wed Aug 05 2009 - 20:36:03 MDT