Changeset 226 for trunk/SRC/ToBeReviewed/CALCULS/projectondepth.pro
- Timestamp:
- 03/16/07 10:22:26 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/ToBeReviewed/CALCULS/projectondepth.pro
r224 r226 12 12 ; @param ARRAYIN {type=3d array} 13 13 ; It is a 3d array whose 3rd dimension must be equal to jpk 14 ; 14 ; 15 15 ; @param DEPTHIN {type=2d array} 16 16 ; It is a 2d array indicating for each point n, at which depth to project 17 ; 17 ; 18 18 ; @returns 19 19 ; A 2d array which is the projection of the 3d array following depths indicated by depthin … … 22 22 ; common.pro 23 23 ; 24 ; @restrictions 24 ; @restrictions 25 25 ; points at !values.f_nan impossible calculation. Land points masked at valmask. 26 26 ; … … 29 29 ; IDL> a=gdept[jpk-1]/(1.*jpi*jpj)*findgen(jpi,jpj) 30 30 ; We build an array to project on these depths. For the test, 31 ; we build a 3d array whose each vector following z is the depth. 31 ; we build a 3d array whose each vector following z is the depth. 32 32 ; IDL> arraytest=replicate(1,jpi*jpj)#gdept 33 33 ; IDL> arraytest=reform(arraytest,jpi,jpj,jpk, /over) … … 35 35 ; IDL> plt, 1e6*(a-projectondepth(arraytest,a)),/nocontour 36 36 ; ->null field at 1e-6 pres 37 ; 38 ; verif cation projecting the temperature of 20°C for example...37 ; 38 ; verification projecting the temperature of 20°C for example... 39 39 ; 40 40 ; @history … … 63 63 if tailledepth[0] NE 2 THEN return, report('Depth array must have 2 dimensions') 64 64 if taillearray[0] NE 3 THEN return, report('Array in must have 3 dimensions') 65 ; verification of the coherence between array's size and the domain 65 ; verification of the coherence between array's size and the domain 66 66 grille, mask, -1, -1, -1,nx,ny,nz,firstx,firsty,firstz,lastx,lasty,lastz 67 67 case 1 of … … 103 103 if terre[0] NE -1 then res[terre] = valmask 104 104 ;------------------------------------------------------------ 105 if keyword_set(key_performance) THEN print, 'temps projectondepth', systime(1)-tempsun 105 if keyword_set(key_performance) THEN print, 'temps projectondepth', systime(1)-tempsun 106 106 return, res 107 107 end
Note: See TracChangeset
for help on using the changeset viewer.