ToBeReviewed/CALCULS/
projectondepth.pro
Allows to project a 3d field following a depth array.
projectondepth
Without loop
result = projectondepth(arrayin, depthin)
Return value
A 2d array which is the projection of the 3d array following depths indicated by depthin
Parameters
arrayin
type: 3d array
It is a 3d array whose 3rd dimension must be equal to jpk
depthin
type: 2d array
It is a 2d array indicating for each point n, at which depth to project
Examples
we build a possible depths array
IDL> a=gdept[jpk-1]/(1.*jpi*jpj)*findgen(jpi,jpj)
We build an array to project on these depths. For the test,
we build a 3d array whose each vector following z is the depth.
IDL> arraytest=replicate(1,jpi*jpj)#gdept
IDL> arraytest=reform(arraytest,jpi,jpj,jpk, /over)
We test the projection of the depth array on the depth...
IDL> plt, 1e6*(a-projectondepth(arraytest,a)),/nocontour
->null field at 1e-6 pres
verification projecting the temperature of 20°C for example...
Version history
Version
$Id: projectondepth.pro 370 2008-08-07 07:59:15Z pinsard $
History
Sebastien Masson (smasson@lodyc.jussieu.fr)
15/6/2000
Known issues
Restrictions
points at !values.f_nan impossible calculation. Land points masked at valmask.
Other attributes
Uses routines
common
Produced by IDLdoc 2.0.