Changeset 142 for trunk/SRC/ToBeReviewed/CALCULS/depth2floatlevel.pro
- Timestamp:
- 07/21/06 14:47:49 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/ToBeReviewed/CALCULS/depth2floatlevel.pro
r134 r142 3 3 ;------------------------------------------------------------ 4 4 ;+ 5 ; NAME:depth2floatlevel 5 ; @file_comments 6 ; Rather comparable to depth2level but here, the calculated level is in float. 7 ; For example, the level 5.4 correspond to a depth equal 8 ; to gdep[5]+.4*(gdep[6]-gdep[5]) 6 9 ; 7 ; PURPOSE: assez comparable a depth2level mais ici le niveau calcule 8 ; est en float. Par ex le niveau 5.4 correspond a une profondeur egale 9 ; a gdep[5]+.4*(gdep[6]-gdep[5]) 10 ; @categories 11 ; Without loop. 10 12 ; 11 ; CATEGORY: SANS BOUCLE 13 ; @param TAB {in}{required} 14 ; 2d depth array (or a structure respecting litchamp criterions) 12 15 ; 13 ; CALLING SEQUENCE:res=depth2floatlevel(depth2d) 14 ; 15 ; INPUTS: depth2d tableau 2d de profondeur (ou une structure repondant 16 ; aux criteres de litchamp) 16 ; @keyword NOMASK 17 ; To do not mask land points 17 18 ; 18 ; KEYWORD PARAMETERS:19 ; /NOMASK: pour ne pas masquer les points terres19 ; @returns 20 ; An 2d array of float containing levels's values. 20 21 ; 21 ; OUTPUTS: un tableau 2d de float contenant les valeurs des niveaux. 22 ; @uses 23 ; common.pro 22 24 ; 23 ; COMMON BLOCKS:common.pro 25 ; @restrictions 26 ; Accept values at !values.f_nan and mask land points at valmask. 24 27 ; 25 ; SIDE EFFECTS:accepte les vcaleurs a !values.f_nan et masque les 26 ; points terres a valmask. 27 ; 28 ; RESTRICTIONS: 29 ; 30 ; EXAMPLE: 31 ; 28 ; @examples 32 29 ; IDL> a=(jpk-1)/(1.*jpi*jpj)*findgen(jpi,jpj) 33 30 ; IDL> plt, 1e6*(a-floatlevel2depth(depth2floatlevel(a))),/nocontour … … 35 32 ; ->champ nul a 1e-6 pres 36 33 ; 37 ; MODIFICATION HISTORY:Sebastien Masson (smasson@lodyc.jussieu.fr) 34 ; @history 35 ; Sebastien Masson (smasson@lodyc.jussieu.fr) 38 36 ; 15/06/2000 37 ; 38 ; @version 39 ; $Id$ 40 ; 39 41 ;- 40 42 ;------------------------------------------------------------ … … 45 47 compile_opt idl2, strictarrsubs 46 48 ; 47 tempsun = systime(1) ; pour key_performance49 tempsun = systime(1) ; for key_performance 48 50 @common 49 51 ;------------------------------------------------------------ … … 55 57 levellow = depth2level(depthin, /lower, /nomask) 56 58 depthlow = level2depth(levellow, /nomask) 57 ; calcul e de la distance depthlow-depthup et gestion du cas ou cette58 ; distance est nulle ou egale a!values.f_nan59 ; calculate the distance depthlow-depthup and management of the case 60 ; of this distance is null or eqal to !values.f_nan 59 61 divi = depthlow-depthup 60 62 nan = where(finite(divi) EQ 0) … … 62 64 nan = where(divi EQ 0) 63 65 if nan[0] NE -1 then divi[nan] = !values.f_nan 64 ; calcul e du resultat66 ; calculation of the result 65 67 res = levelup+(depthin-depthup)/divi 66 ; on masque les points terre avalmask68 ; We mask land point at valmask 67 69 if NOT keyword_set(nomask) then begin 68 70 grille,mask
Note: See TracChangeset
for help on using the changeset viewer.