Changeset 161 for trunk/tools
- Timestamp:
- 11/12/09 17:15:09 (15 years ago)
- Location:
- trunk/tools
- Files:
-
- 24 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/density_binning/bining.pro
r2 r161 1 PRO bining, $ ; 2 3 4 ;INPUTS 5 density, $ ; density at T points (3D array) 6 x, $ ; field at T points (e.g. Salinity or Temperature) 7 ;OUTPUTS 8 depth_bin, $ ; depth of isopycnical surfaces (3D array) 9 x_bin, $ ; X averaged for each sigma-layer (3D array) 10 ; KEYWORDS 11 SIGMA = sigma, $ ; bining values (optionnal) 12 DEPTH_T = depth_t, $ ; depth of T level (NECESSARY) 13 DEPTH_W = depth_w, $ ; depth of W level (NECESSARY) 14 E3T = e3t, $ ; e3t (NECESSARY) 15 TMASK = tmask ; tmask (3D array) (NECESSARY) 16 1 PRO bining, $ 2 density, $ 3 x, $ 4 depth_bin, $ 5 x_bin, $ 6 SIGMA = sigma, $ 7 DEPTH_T = depth_t, $ 8 DEPTH_W = depth_w, $ 9 E3T = e3t, $ 10 TMASK = tmask 17 11 ;; 18 12 ;; PRINCIPE DU BINING … … 38 32 ;; et l'apparition d'un +2 dans la declaration des tableaux de sortie 39 33 ;; la couche 0 contient tous les points dont la densite est inferieure a la densite minimale du bining 40 ;; la couche N+1 " " " superieure " maximale 41 ;; 42 ;; 43 ;; Creation : 19/10/99 G. Roullet 34 ;; la couche N+1 " " " superieure " maximale 35 ;; 36 ;; 37 ; 38 ; @param DENSITY {in} 39 ; density at T points (3D array) 40 ; 41 ; @param X {in} 42 ; field at T points (e.g. Salinity or Temperature) 43 ; 44 ; @param DEPTH_BIN {out} 45 ; depth of sopycnical surfaces (3D array) 46 ; 47 ; @param X_BIN {out} 48 ; X averaged for each sigma-layer (3D array) 49 ; 50 ; @keyword SIGMA {in}{optional} 51 ; bining values 52 ; 53 ; @keyword DEPTH_T {in}{required} 54 ; depth of T level 55 ; 56 ; @keyword DEPTH_W {in}{required} 57 ; depth of W level 58 ; 59 ; @keyword E3T {in}{required} 60 ; 61 ; @keyword TMASK {in}{required} 62 ; tmask (3D array) 63 ; 64 ; @history 65 ; 19/10/99 G. Roullet 66 ; 44 67 ;; 45 68 size3d = size(density) -
trunk/tools/density_binning/bining2_bak.pro
r2 r161 1 PRO bining2, $ ; 2 ;INPUTS 3 density, $ ; density at T points (3D array) 4 x1, $ ; field at T points (e.g. Salinity or Temperature) 5 ;OUTPUTS 6 depth_bin, $ ; depth of layers (3D array) 7 thick_bin, $ ; thickness of layers (3D array) 8 x1_bin, $ ; X averaged for each sigma-layer (3D array) 9 ; KEYWORDS 10 SIGMA = sigma, $ ; bining values (optionnal) 11 DEPTH_T = depth_t, $ ; depth of T level (NECESSARY) 12 DEPTH_W = depth_w, $ ; depth of W level (NECESSARY) 1 PRO bining2, $ 2 density, $ 3 x1, $ 4 depth_bin, $ 5 thick_bin, $ 6 x1_bin, $ 7 SIGMA = sigma, $ 8 DEPTH_T = depth_t, $ 9 DEPTH_W = depth_w, $ 13 10 E3T = e3t, $ 14 11 E3W = e3w, $ 15 TMASK = tmask ; tmask (3D array) (NECESSARY) 16 12 TMASK = tmask 17 13 ;; 18 14 ;; PRINCIPE DU BINING … … 39 35 ;; la couche 0 contient tous les points dont la densite est inferieure a la densite minimale du bining 40 36 ;; la couche N+1 " " " superieure " maximale 41 ;; 42 ;; 43 ;; Creation : 19/10/99 G. Roullet 44 ;; 37 ; 38 ; @param DENSITY {in} 39 ; density at T points (3D array) 40 ; 41 ; @param X1 {in} 42 ; field at T points (e.g. Salinity or Temperature) 43 ; 44 ; @param DEPTH_BIN {out} 45 ; depth of layers (3D array) 46 ; 47 ; @param THICK_BIN {out} 48 ; thickness of layers (3D array) 49 ; 50 ; @param X1_BIN {out} 51 ; X averaged for each sigma-layer (3D array) 52 ; 53 ; @keyword SIGMA {in}{optional} 54 ; bining values 55 ; 56 ; @keyword DEPTH_T {in}{required} 57 ; depth of T level 58 ; 59 ; @keyword DEPTH_W {in}{required} 60 ; depth of W level 61 ; 62 ; @keyword E3T 63 ; 64 ; @keyword E3W 65 ; 66 ; @keyword TMASK{in}{required} 67 ; tmask (3D array) 68 ; 69 ; @history 70 ; 19/10/99 G. Roullet 71 ; 72 ;- 45 73 size3d = size(density) 46 74 jpi = size3d(1) -
trunk/tools/density_binning/binning_neutral_and_co/bin_velocity_New.pro
r2 r161 13 13 xmask = umask() 14 14 ENDIF 15 16 15 IF keyword_set(vv) THEN BEGIN 17 16 density = boundperio(vmask()*(dens+shift(dens, 0, -1, 0))/2, /vv, /orca2, /pscal) 18 17 xmask = vmask() 19 18 ENDIF 20 21 19 IF keyword_set(tt) THEN BEGIN 22 20 density = dens … … 31 29 c1_z = fltarr(N_z) ; profil du contenu vertical de x 32 30 s_z = fltarr(N_z) ; profil de la densite 33 34 31 ; vertical coordinate: in z-coord only 35 32 z_zt = gdept ; profondeur au point T (k=0 -> 5m) … … 73 70 ; 74 71 i_ocean = where(xmask(i, j, *) EQ 1) 75 76 72 z_s = z_s*0. 77 73 c1_s = c1_s*0. 78 74 x1_s = x1_s*0. 79 80 75 IF (i_ocean[0] NE -1) THEN BEGIN ; on n'entre que si il y a des points ocean 81 76 82 77 s_z(*) = density(i, j, *) 83 78 c1_z(*) = x1_content(i, j, *) 84 85 79 ; critere supplementaire a imposer sur le profil pour eviter les cas 86 80 ; pathologiques en attendant d'ecrire une vraie commande d'extraction 87 81 ; de progils stritement croissant. Il s'agit donc d'un test adhoc. 88 82 IF s_z(0) LT s_z(i_ocean(n_elements(i_ocean)-1)) THEN BEGIN 89 90 83 ;------------------------------------------------------------------------ 91 84 ; controle si le profil est bien strictement croissant (pour l'instant … … 97 90 ; croissant = ind(0) EQ -1 98 91 ;------------------------------------------------------------------------ 99 100 92 i_bottom = i_ocean(n_elements(i_ocean)-1) 101 102 93 z_s(N_s) = z_zw(i_bottom) 103 94 c1_s(N_s) = x1_content(i, j, jpk-1) … … 106 97 mini = min(s_z(i_ocean)) 107 98 maxi = max(s_z(i_ocean)) 108 109 99 i_min = where(s_z(i_ocean) EQ mini) 110 100 i_max = where(s_z(i_ocean) EQ maxi) … … 115 105 i_min = i_min[0] 116 106 i_max = i_max(n_elements(i_min)-1) 117 118 107 ; IF i_max GE jpk-1 THEN print, i, j, i_max 119 108 ; IF i_min LE 1 THEN print, i, j, i_min … … 127 116 c1_s(ind) = 0 &$ 128 117 ENDIF 129 130 118 ; Si la valeur du niveau (s_s) est plus elevee que la densite du fond, 131 119 ; l isopycne est mise au fond (z_s=z_zw(i_bottom)) … … 154 142 155 143 i_profil = i_ocean(i_min:i_max) 156 157 144 z_s(ind) = interpol(z_zt(i_profil), s_z(i_profil), s_s(ind)) 158 145 … … 183 170 ENDIF 184 171 ENDIF 185 186 172 x1_bin(i, j, *) = x1_s 187 173 … … 190 176 191 177 return, x1_bin 192 193 178 END -
trunk/tools/density_binning/binning_neutral_and_co/bn2.pro
r2 r161 60 60 endcase 61 61 domdef 62 63 62 ; coordonnees z : on s'assure qu'on a autant de points W que de points 64 63 ; T sur le domaine defini par domdef. 65 64 ; on va se servir dans les calculs de e3w (e3) et gdepw (gdep) 66 67 65 IF (nzt NE nzw ) THEN BEGIN 68 66 print, 'le domaine doit etre choisi avec autant de points' … … 77 75 GOTO, sortie 78 76 endif 79 80 77 cdgrid = 'W' 81 78 g = 9.81 82 79 grille, mask, glam, gphi, gdep, nx, ny,nz, premierx, premiery, premierz, dernierx, derniery, dernierz ,e1,e2,e3, TRI = tri 83 80 zgde3w = reform( (fltarr(nx*ny)+1)#(g/e3), nx, ny, nz) 84 85 81 ; 86 82 varname='Brunt-Vaisala frequency' … … 97 93 case 1 of 98 94 (neos EQ 0): begin 99 100 101 95 ; ... UNESCO seawater equation of state 102 96 ; ... temperature, salinity anomalie … … 111 105 * ( zalbet * ( shift(tn, 0, 0, 1) - tn ) $ 112 106 - ( shift(sn, 0, 0, 1) - sn ) ) 113 114 107 end 115 108 ( neos EQ 1 ): begin 116 117 109 ; ... First Linear density formulation (function of temperature only) 118 110 ; … … 122 114 end 123 115 ( neos EQ 2 ): begin 124 125 116 ; ... Second linear density formulation (function of temp. and salinity) 126 117 ; … … 136 127 end 137 128 endcase 138 139 129 ; 140 130 ; … … 144 134 z(*, *, 0) = 0 145 135 IF (gdep(nz-1) eq gdepw(jpk-1)) THEN z(*, *, nz-1) = 0 146 147 136 sortie: 148 137 return, z 149 150 138 END 151 -
trunk/tools/density_binning/binning_neutral_and_co/eos.pro
r2 r161 3 3 ;------------------------------------------------------------ 4 4 ; 5 ; NAME: EOS5 ; computes rho (in situ volumic mass) 6 6 ; 7 ; PURPOSE:8 ; computes rho (in situ volumic mass)7 ; @categories 8 ; calculation 9 9 ; 10 ; CATEGORY: 11 ; calculation 12 ; 13 ; CALLING SEQUENCE: 10 ; @examples 14 11 ; tableau=eos(t,s,sigma) 15 12 ; 16 ; INPUTS: 17 ; t : temperature 18 ; s : salinity 19 ; sigma : reference level (real number belonging to [0,5]) 20 ; for instance, sigma=3. means that rho will be referenced to 3000m 13 ; @param T {in}{required} 14 ; temperature 21 15 ; 22 ; COMMON BLOCKS: 16 ; @param S {in}{required} 17 ; salinity 18 ; 19 ; @param SIGMA {in}{required} 20 ; reference level (real number belonging to [0,5]) 21 ; for instance, sigma=3. means that rho will be referenced to 3000m 22 ; 23 ; @uses 23 24 ; common.pro 24 25 ; … … 44 45 ; Jackett, D.R., and T.J. McDougall. J. Atmos. Ocean. Tech., 1994 45 46 ; 46 ; MODIFICATION HISTORY:47 ; @history 47 48 ; Maurice Imbard 48 49 ; Eric Guilyardi - adaptation to post_it -
trunk/tools/density_binning/binning_neutral_and_co/eos_neutral.pro
r2 r161 1 ;------------------------------------------------------------ 2 ;------------------------------------------------------------ 3 ;------------------------------------------------------------ 1 ;+ 2 ; computes rho (in situ volumic mass) 4 3 ; 5 ; NAME: EOS 4 ; @categories 5 ; calculation 6 6 ; 7 ; PURPOSE: 8 ; computes rho (in situ volumic mass) 7 ; @examples 9 8 ; 10 ; CATEGORY: 11 ; calculation 9 ; IDL> tableau=eos(t,s) 12 10 ; 13 ; CALLING SEQUENCE:14 ; tableau=eos(t,s)11 ; @param T {in} 12 ; temperature 15 13 ; 16 ; INPUTS: 17 ; t : temperature 18 ; s : salinity 14 ; @param S {in} 15 ; salinity 19 16 ; 20 17 ; REFERENCE: … … 31 28 ; McDougall and Jackett, J. Mar Res., 2005 32 29 ; 33 ; MODIFICATION HISTORY: 34 ;- Gurvan Madec (04/14/2005) 35 ;------------------------------------------------------------ 36 ;------------------------------------------------------------ 37 ;------------------------------------------------------------ 30 ; @history 31 ; Gurvan Madec (04/14/2005) 32 ;- 38 33 FUNCTION eos_neutral, t, s 39 34 ; -
trunk/tools/density_binning/binning_neutral_and_co/fsalbt.pro
r2 r161 28 28 ; pfs : salinity anomaly (s-35) in psu 29 29 ; pfh : depth in meters 30 31 30 z = $ 32 31 ( ( ( -0.255019e-07 * pft + 0.298357e-05 ) * pft $ -
trunk/tools/density_binning/binning_neutral_and_co/fsbeta.pro
r2 r161 20 20 ;---------------------------------------------------------------------- 21 21 FUNCTION fsbeta, pft, pfs, pfh 22 23 22 ; 24 23 ; beta -
trunk/tools/density_binning/binning_neutral_and_co/msfs.pro
r2 r161 21 21 pe3v = read_ncdf('e3v_ps',0,/timestep,iodir=ioMESH,/nostruct,/tout,filename=fich_msh) 22 22 vvf = vv * reform(e1v[*]#replicate(1,jpk),jpi,jpj,jpk) * pe3v *vmask() 23 24 23 ;------------------------- 25 24 ; gibraltar cross land adv: 5 Sv … … 32 31 vvf(167,100, 20 ) = vvf(167,100, 20 )+2.5e+6 *vvmask(167,100, 20 ) 33 32 vvf(167,100, 21 ) = vvf(167,100, 21 )+0.8e+6/14.*vvmask(167,100, 21 ) 34 35 33 ;------------------------- 36 34 if keyword_set(mask) then begin &$ … … 38 36 if (size(mask))[0] eq 2 then vvf=vvf*reform(mask[*]#replicate(1,jpk),jpi,jpj,jpk) &$ 39 37 endif &$ 40 41 38 ;------------------------- 42 39 ; crude summation … … 45 42 x1_bin = fltarr(jpj, N_s) ; output array (transport function of density) 46 43 x1_bin(*,*) = 0.e0 47 48 44 FOR is = N_s-1,0,-1 DO begin &$ 49 45 dmsk= density GT s_s(is) &$ … … 51 47 ENDFOR &$ 52 48 msfs=x1_bin *1.e-6 53 54 49 ;------------------------ 55 50 return, msfs -
trunk/tools/density_binning/binning_neutral_and_co/npc.pro
r2 r161 114 114 ; sortie: 115 115 return, rhos 116 117 116 END 118 -
trunk/tools/density_binning/density_bin_IDL_gm/FIG_MSFeiv_submsk_all.pro
r2 r161 2 2 @1_initorca2_v2 3 3 ;@initorca2_o 4 5 4 ; draw the meridional stream function on one sheat 6 5 ; … … 54 53 for nbas=1,3 do pltz, msf(*,*,nbas,no)+msfe(*,*,nbas,no), min=z_ext[0], max=z_ext[1], int=z_ext[2], /noerase, $ 55 54 title=e_exp(no)+t_msf(nbas),/nocolor,lct=64, boite=(5000),zoom=5000, petit=[2,4,2*nbas+1], /rempli, ytitle='depth (m)' 56 57 55 z_ext=[-40.,40.,2.] 58 56 pltz, msf(*,*,0,n1)+msfe(*,*,0,n1), min=z_ext[0], max=z_ext[1], int=z_ext[2], /landscape, /noerase, $ … … 70 68 for nbas=1,3 do pltz, msfe(*,*,nbas,no), min=z_ext[0], max=z_ext[1], int=z_ext[2], /noerase, $ 71 69 title=e_exp(no)+t_msf(nbas),/nocolor,lct=64, boite=(5000),zoom=5000, petit=[2,4,2*nbas+1], /rempli, ytitle='depth (m)' 72 73 70 pltz, msfe(*,*,0,n1), min=z_ext[0], max=z_ext[1], int=z_ext[2], /landscape, /noerase, $ 74 71 title=e_exp(no)+t_msf(0),/nocolor,lct=64, boite=(5000),zoom=5000, petit=[2,4,2], /rempli, ytitle='depth (m)' -
trunk/tools/density_binning/density_bin_IDL_gm/bin_velocity.pro
r2 r161 13 13 xmask = umask() 14 14 ENDIF 15 16 15 IF keyword_set(vv) THEN BEGIN 17 16 density = boundperio(vmask()*(dens+shift(dens, 0, -1, 0))/2, /vv, /orca2, /pscal) 18 17 xmask = vmask() 19 18 ENDIF 20 21 19 IF keyword_set(tt) THEN BEGIN 22 20 density = dens … … 56 54 ; 57 55 i_ocean = where(xmask(i, j, *) EQ 1) 58 59 56 z_s = z_s*0. 60 57 c1_s = c1_s*0. 61 58 x1_s = x1_s*0. 62 63 59 IF (i_ocean[0] NE -1) THEN BEGIN ; on n'entre que si il y a des points ocean 64 60 65 61 s_z(*) = density(i, j, *) 66 62 c1_z(*) = x1_content(i, j, *) 67 68 63 ; critere supplementaire a imposer sur le profil pour eviter les cas 69 64 ; pathologiques en attendant d'ecrire une vraie commande d'extraction 70 65 ; de progils stritement croissant. Il s'agit donc d'un test adhoc. 71 66 IF s_z(0) LT s_z(i_ocean(n_elements(i_ocean)-1)) THEN BEGIN 72 73 67 ;------------------------------------------------------------------------ 74 68 ; controle si le profil est bien strictement croissant (pour l'instant … … 80 74 ; croissant = ind(0) EQ -1 81 75 ;------------------------------------------------------------------------ 82 83 76 i_bottom = i_ocean(n_elements(i_ocean)-1) 84 85 77 z_s(N_s) = z_zw(i_bottom) 86 78 c1_s(N_s) = x1_content(i, j, jpk-1) … … 89 81 mini = min(s_z(i_ocean)) 90 82 maxi = max(s_z(i_ocean)) 91 92 83 i_min = where(s_z(i_ocean) EQ mini) 93 84 i_max = where(s_z(i_ocean) EQ maxi) … … 98 89 i_min = i_min[0] 99 90 i_max = i_max(n_elements(i_min)-1) 100 101 91 ; IF i_max GE jpk-1 THEN print, i, j, i_max 102 92 ; IF i_min LE 1 THEN print, i, j, i_min … … 110 100 c1_s(ind) = 0 &$ 111 101 ENDIF 112 113 102 ; Si la valeur du niveau (s_s) est plus elevee que la densite du fond, 114 103 ; l isopycne est mise au fond (z_s=z_zw(i_bottom)) … … 137 126 138 127 i_profil = i_ocean(i_min:i_max) 139 140 128 z_s(ind) = interpol(z_zt(i_profil), s_z(i_profil), s_s(ind)) 141 129 … … 166 154 ENDIF 167 155 ENDIF 168 169 156 x1_bin(i, j, *) = x1_s 170 157 … … 173 160 174 161 return, x1_bin 175 176 162 END -
trunk/tools/density_binning/density_bin_IDL_gm/bining2.pro
r2 r161 1 PRO bining2, $ ; 2 ;INPUTS 3 density, $ ; density at T points (3D array) 4 x1, $ ; field at T points (e.g. Salinity or Temperature) 5 sobwlmax, $ ; bowl depth array 6 sig_bowl, $ ; switch for bowl overlay 7 ;OUTPUTS 8 depth_bin, $ ; depth of layers (3D array) 9 thick_bin, $ ; thickness of layers (3D array) 10 x1_bin, $ ; X averaged for each sigma-layer (3D array) 11 bowl_bin, $ ; bowl depth binned on density 12 ; KEYWORDS 13 SIGMA = sigma, $ ; bining values (optionnal) 14 DEPTH_T = depth_t, $ ; depth of T level (NECESSARY) 15 DEPTH_W = depth_w, $ ; depth of W level (NECESSARY) 1 PRO bining2, $ 2 density, $ 3 x1, $ 4 sobwlmax, $ 5 sig_bowl, $ 6 depth_bin, $ 7 thick_bin, $ 8 x1_bin, $ 9 bowl_bin, $ 10 SIGMA = sigma, $ 11 DEPTH_T = depth_t, $ 12 DEPTH_W = depth_w, $ 16 13 E3T = e3t, $ 17 14 E3W = e3w, $ 18 TMASK = tmask ; tmask (3D array) (NECESSARY) 19 15 TMASK = tmask 20 16 ;; 21 17 ;; PRINCIPE DU BINING … … 41 37 ;; et l'apparition d'un +1 dans la declaration des tableaux de sortie 42 38 ;; la couche 0 contient tous les points dont la densite est inferieure a la densite minimale du bining 43 ;; la couche N+1 " " " superieure " maximale 44 ;; 45 ;; 46 ;; Creation : 19/10/99 G. Roullet 47 ;; 39 ;; la couche N+1 " " " superieure " maximale 40 ;; 41 ;; 42 ; @param DENSITY {in} 43 ; density at T points (3D array) 44 ; 45 ; @param X1 {in} 46 ; field at T points (e.g. Salinity or Temperature) 47 ; 48 ; @param SOBWLMAX {in} 49 ; bowl depth array 50 ; 51 ; @param SIG_BOWL {in} 52 ; switch for bowl overlay 53 ; 54 ; @param DEPTH_BIN {out} 55 ; depth of layers (3D array) 56 ; 57 ; @param THICK_BIN {out} 58 ; thickness of layers (3D array) 59 ; 60 ; @param X1_BIN {out} 61 ; X averaged for each sigma-layer (3D array) 62 ; 63 ; @param BOWL_BIN {out} 64 ; bowl depth binned on density 65 ; 66 ; @keyword SIGMA {in}{optional} 67 ; bining values 68 ; 69 ; @keyword DEPTH_T {in}{required} 70 ; depth of T level 71 ; 72 ; @keyword DEPTH_W {in}{required} 73 ; depth of W level 74 ; 75 ; @keyword E3T 76 ; 77 ; @keyword E3W 78 ; 79 ; @keyword TMASK{in}{required} 80 ; tmask (3D array) 81 ; 82 ; @history 83 ; 19/10/99 G. Roullet 84 ;- 85 48 86 size3d = size(density) 49 87 jpi = size3d(1) -
trunk/tools/density_binning/density_bin_IDL_gm/eos.pro
r2 r161 3 3 ;------------------------------------------------------------ 4 4 ; 5 ; NAME: EOS5 ; computes rho (in situ volumic mass) 6 6 ; 7 ; PURPOSE: 8 ; computes rho (in situ volumic mass) 9 ; 10 ; CATEGORY: 7 ; @categories 11 8 ; calculation 12 9 ; 13 ; CALLING SEQUENCE:10 ; @examples 14 11 ; tableau=eos(t,s,sigma) 15 12 ; 16 ; INPUTS: 17 ; t : temperature 18 ; s : salinity 19 ; sigma : reference level (real number belonging to [0,5]) 20 ; for instance, sigma=3. means that rho will be referenced to 3000m 13 ; @param T {in}{required} 14 ; temperature 21 15 ; 22 ; COMMON BLOCKS: 16 ; @param S {in}{required} 17 ; salinity 18 ; 19 ; @param SIGMA {in}{required} 20 ; reference level (real number belonging to [0,5]) 21 ; for instance, sigma=3. means that rho will be referenced to 3000m 22 ; 23 ; @uses 23 24 ; common.pro 24 25 ; … … 44 45 ; Jackett, D.R., and T.J. McDougall. J. Atmos. Ocean. Tech., 1994 45 46 ; 46 ; MODIFICATION HISTORY:47 ; @history 47 48 ; Maurice Imbard 48 49 ; Eric Guilyardi - adaptation to post_it -
trunk/tools/density_binning/density_bin_IDL_gm/msfs.pro
r2 r161 10 10 tmask=replicate(1b,jpi,jpj,jpk) 11 11 domdef,0,jpi-1,0,jpj-1,0,jpk-1,/index 12 13 14 12 if keyword_set(mask) then begin 15 13 print, 'subdomain: use of mask argument' … … 20 18 msf=total(msf*(e1v[*]#replicate(1,jpk)),1,/nan) 21 19 msf=1e-6*msf 22 23 20 mmsk=msf 24 21 indm=where(mmsk NE 0 ) 25 22 mmsk(indm)=1 26 27 23 msf=total(msf,2,/cumulative) 28 24 ;msf=total(msf,2,/cumulative,/nan) … … 36 32 endfor 37 33 endif 38 39 34 ; mask the msf 40 35 msf=msf*mmsk 41 42 36 varname='Meridional Stream Function' 43 37 varunit='Sv' 44 38 vargrid='W' 45 46 47 39 if keyword_set(orca) then begin 48 40 case orca of … … 61 53 ;if n_elements(valmask) eq 0 then valmask=1e20 62 54 ;if terre[0] ne -1 then msf[terre]=valmask 63 64 55 ;------------------------ 65 56 return, msf -
trunk/tools/density_binning/density_bin_IDL_gm/msfz.pro
r2 r161 34 34 endfor 35 35 endif 36 37 36 varname='Meridional Stream Function' 38 37 varunit='Sv' 39 38 vargrid='W' 40 41 39 if keyword_set(orca) then begin 42 40 case orca of … … 55 53 ;if n_elements(valmask) eq 0 then valmask=1e20 56 54 ;if terre[0] ne -1 then msf[terre]=valmask 57 58 55 ;------------------------ 59 56 return, msf -
trunk/tools/density_binning/density_bin_IDL_gm/npc.pro
r2 r161 114 114 ; sortie: 115 115 return, rhos 116 117 116 END 118 -
trunk/tools/idl_netcdf/ncdf_ajoute.pro
r160 r161 1 1 ;+ 2 ; NAME:ncdf_ajoute2 ; permet d'ajouter une variable a la suite d'un fichier net-cdf 3 3 ; 4 ; PURPOSE:permet d''ajouter une variable a la suite d''un fichier net-cdf 4 ; @categories 5 ; bidouille NET-CDF 5 6 ; 6 ; CATEGORY:bidouille NET-CDF 7 ; 8 ; CALLING SEQUENCE:ndf_ajoute,'nomfich',struct 9 ; 10 ; INPUTS: 11 ; nomfich: string contenant le nom du fichier auquel il faut 7 ; @param NOMFICH {in}{required} 8 ; string contenant le nom du fichier auquel il faut 12 9 ; ajouter la strucure contenant la variable et tout ce qui va 13 10 ; autour 14 11 ; 15 ; nom: string contenant le nom de la variable 12 ; @param NOM {in}{required} 13 ; string contenant le nom de la variable 16 14 ; 17 ; tab:le tableau contenant la variable 15 ; @param TAB {in}{required} 16 ; le tableau contenant la variable 18 17 ; 19 ; dimension[nbredim]: un vecteur de string contennant le nom des 20 ; dimensions, par ex ['x','y','time_counter'] 18 ; @param DIMENSION {in}{required}{type=1D array nbredim} 19 ; un vecteur de string contennant le nom des 20 ; dimensions, par ex ['x','y','time_counter'] 21 21 ; 22 ; OPTIONAL INPUTS: 23 ; 24 ; attributs[nbreattributs,2]: un tableau 2d de string dont 22 ; @param ATTRIBUT {in}{optional}{type=2D array nbreattributs x 2} 23 ; un tableau 2d de string dont 25 24 ; chaque ligne contient le nom et la valeur de 26 25 ; l''attribut, par ex: attribut[i]=['titre','SST'] 27 26 ; 28 27 ; 29 ; KEYWORD PARAMETERS: 30 ; 31 ; OUTPUTS: 32 ; 33 ; OPTIONAL OUTPUTS: 34 ; 35 ; COMMON BLOCKS: 36 ; 37 ; SIDE EFFECTS: 38 ; 39 ; RESTRICTIONS: 40 ; 41 ; EXAMPLE: 42 ; 43 ; MODIFICATION HISTORY: Sebastien Masson (smasson\@lodyc.jussieu.fr) 28 ; @history 29 ; Sebastien Masson (smasson\@lodyc.jussieu.fr) 44 30 ; 25/11/98 45 31 ;- 46 ;-----------------------------------------------------------------------------------------47 32 PRO ncdf_ajoute, nomfich, nom, tab, dimension, attribut 48 33 ;----------------------------------------------------------------------------------------- … … 110 95 ;------------------------------------------------------------ 111 96 ncdf_close, cdfid 112 113 114 115 116 ;-----------------------------------------------------------------------------------------117 97 return 118 98 end -
trunk/tools/idl_netcdf/ncdf_ajoute2.pro
r160 r161 1 1 ;+ 2 ; NAME:ncdf_ajoute3 2 ; 4 ; PURPOSE:permet d''ajouter une variable a la suite d''un fichier net-cdf3 ; permet d''ajouter une variable a la suite d''un fichier net-cdf 5 4 ; 6 ; CATEGORY:bidouille NET-CDF 5 ; @categories 6 ; bidouille NET-CDF 7 7 ; 8 ; CALLING SEQUENCE:ndf_ajoute,'nomfich',struct 9 ; 10 ; INPUTS: 11 ; nomfich: string contenant le nom du fichier auquel il faut 12 ; ajouter la strucure contenant la variable et tout ce qui va 13 ; autour 8 ; @param NOMFICH {in}{required} 9 ; contenant le nom du fichier auquel il faut 10 ; ajouter la strucure contenant la variable et tout ce qui va 11 ; autour 14 12 ; 15 ; nom: string contenant le nom de la variable 13 ; @param NOM {in}{required} 14 ; string contenant le nom de la variable 16 15 ; 17 ; tab:le tableau contenant la variable 16 ; @param TAB {in}{required} 17 ; le tableau contenant la variable 18 18 ; 19 ; dimension[nbredim]: un vecteur de string contennant le nom des 20 ; dimensions, par ex ['x','y','time_counter'] 19 ; @param DIMENSION {in}{required}{type=1D array nbredim} 20 ; un vecteur de string contennant le nom des 21 ; dimensions, par ex ['x','y','time_counter'] 21 22 ; 22 ; OPTIONAL INPUTS: 23 ; 24 ; attributs[nbreattributs,2]: un tableau 2d de string dont 25 ; chaque ligne contient le nom et la valeur de 26 ; l''attribut, par ex: attribut[i]=['titre','SST'] 23 ; @param ATTRIBUT {in}{optional}{type=2D array nbreattributs x2} 24 ; un tableau 2d de string dont 25 ; chaque ligne contient le nom et la valeur de 26 ; l''attribut, par ex: attribut[i]=['titre','SST'] 27 27 ; 28 ; 29 ; KEYWORD PARAMETERS: 30 ; 31 ; OUTPUTS: 32 ; 33 ; OPTIONAL OUTPUTS: 34 ; 35 ; COMMON BLOCKS: 36 ; 37 ; SIDE EFFECTS: 38 ; 39 ; RESTRICTIONS: 40 ; 41 ; EXAMPLE: 42 ; 43 ; MODIFICATION HISTORY: Sebastien Masson (smasson\@lodyc.jussieu.fr) 28 ; @history 29 ; Sebastien Masson (smasson\@lodyc.jussieu.fr) 44 30 ; 25/11/98 45 31 ;- 46 ;-----------------------------------------------------------------------------------------47 32 PRO ncdf_ajoute, nomfich, nom, tab, dimension, attribut 48 33 ;----------------------------------------------------------------------------------------- … … 105 90 ;------------------------------------------------------------ 106 91 ncdf_close, cdfid 107 108 109 110 111 ;-----------------------------------------------------------------------------------------112 92 return 113 93 end -
trunk/tools/idl_netcdf/ncdf_colle.pro
r160 r161 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 ; NAME:ncdf_colle 6 ; 7 ; PURPOSE:permet de coller n fichiers entre eux suivant une 2 ; 3 ; permet de coller n fichiers entre eux suivant une 8 4 ; direction. c.a.d. qu''un nouveau fichier de sortie est ecrit et que 9 5 ; si les variables comportent la dimension a coller alors la variable 10 6 ; de sortie sera un collage des n variables d''entree suivant la dite dimension 11 7 ; 12 ; CATEGORY:bidouille de fichiers netcdf 13 ; 14 ; CALLING SEQUENCE:ncdf_colle,'nomfich1,nomfich2,nomfich3,...','nomfichout','nomdirection' 15 ; 16 ; INPUTS: 17 ; 'nomfich1,nomfich2,nomfich3,...': un string contenant la 8 ; @categories 9 ; bidouille de fichiers netcdf 10 ; 11 ; @param LISTIN {in}{required} 12 ; 'nomfich1,nomfich2,nomfich3,...': un string contenant la 18 13 ; liste des noms des ficchiers en entree separes par une virgule 19 14 ; 20 ; 'nomfichout': un string contenant le nom du fichier en sortie 21 ; 22 ; 'nomdirection': un string contenant le nom de la dimension 23 ; suivant laquelle on doit faire le collage. 24 ; 25 ; REMARQUE: si nomdimection n''existe pas ds le fichier et que les 15 ; @param NOMFICHOUT {in}{required} 16 ; un string contenant le nom du fichier en sortie 17 ; 18 ; @param NOMDIREC {in}{required} 19 ; un string contenant le nom de la dimension 20 ; suivant laquelle on doit faire le collage. 21 ; 22 ; REMARQUE: si nomdirec n''existe pas ds le fichier et que les 26 23 ; fichiers d''entree ne comportent pas de dimension infinie alors on cree la dimension 27 ; infinie nomdirec tionet on constitue pour chaque variable un24 ; infinie nomdirec et on constitue pour chaque variable un 28 25 ; "empilement" des n tableaux suivant la nouvelle direction. En clair 29 26 ; avec n fichiers sans dim temporelle on cree une serie temporelle de n pas de temps. 30 27 ; 31 ; KEYWORD PARAMETERS: 32 ; 33 ; GARDE: vecteur donnant les noms des variables a 28 ; @keyword GARDE 29 ; vecteur donnant les noms des variables a 34 30 ; selectionner. si il n'est pas active toutes les variables 35 31 ; sont selectionnees. 36 32 ; 37 ; EXCLU: vecteur donnant les noms des variablers a ne pas 33 ; @keyword EXCLU 34 ; vecteur donnant les noms des variablers a ne pas 38 35 ; selectionner. si il n'est pas active toutes les variables 39 36 ; sont selectionnees. 40 37 ; 41 ; OUTPUTS: 42 ; 43 ; COMMON BLOCKS: attention cette procedure fait appelle a la fonction 38 ; @uses 39 ; attention cette procedure fait appelle a la fonction 44 40 ; colle.pro 45 41 ; souvant pour une raison encore inexpliquee, IDL ne reconnait pas ds … … 63 59 ; plantages en serie IDL affiche unable to allocate memory... 64 60 ; 65 ; RESTRICTIONS: 66 ; 67 ; EXAMPLE: 68 ; 69 ; MODIFICATION HISTORY: Sebastien Masson (smasson\@lodyc.jussieu.fr) 61 ; @restrictions 62 ; 63 ; @examples 64 ; 65 ; @history 66 ; Sebastien Masson (smasson\@lodyc.jussieu.fr) 70 67 ; 23/11/98 71 68 ; 13/1/98 : attribut concernant le min et le max 72 69 ;- 73 ;------------------------------------------------------------74 ;------------------------------------------------------------75 ;------------------------------------------------------------76 70 PRO ncdf_colle, listin, nomfichout, nomdirec, GARDE = garde, EXCLU = exclu 77 71 nomdirec = strlowcase(nomdirec) -
trunk/tools/idl_netcdf/ncdf_colle2.pro
r160 r161 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 ; NAME:ncdf_colle 6 ; 7 ; PURPOSE:permet de coller n fichiers entre eux suivant une 2 ; permet de coller n fichiers entre eux suivant une 8 3 ; direction. c.a.d. qu''un nouveau fichier de sortie est ecrit et que 9 4 ; si les variables comportent la dimension a coller alors la variable 10 5 ; de sortie sera un collage des n variables d''entree suivant la dite dimension 11 6 ; 12 ; CATEGORY:bidouille de fichiers netcdf 13 ; 14 ; CALLING SEQUENCE:ncdf_colle,'nomfich1,nomfich2,nomfich3,...','nomfichout','nomdirection' 15 ; 16 ; INPUTS: 17 ; 'nomfich1,nomfich2,nomfich3,...': un string contenant la 18 ; liste des noms des ficchiers en entree separes par une virgule 19 ; 20 ; 'nomfichout': un string contenant le nom du fichier en sortie 21 ; 22 ; 'nomdirection': un string contenant le nom de la dimension 23 ; suivant laquelle on doit faire le collage. 24 ; 25 ; REMARQUE: si nomdimection n''existe pas ds le fichier et que les 7 ; @categories 8 ; bidouille de fichiers netcdf 9 ; 10 ; @param LISTIN {in}{required} 11 ; 'nomfich1,nomfich2,nomfich3,...': un string contenant la 12 ; liste des noms des fichiers en entree separes par une virgule 13 ; 14 ; @param NOMFICHOUT {in}{required} 15 ; un string contenant le nom du fichier en sortie 16 ; 17 ; @param NOMDIREC {in}{required} 18 ; un string contenant le nom de la dimension 19 ; suivant laquelle on doit faire le collage. 20 21 ; REMARQUE: si nomdirect n''existe pas ds le fichier et que les 26 22 ; fichiers d''entree ne comportent pas de dimension infinie alors on cree la dimension 27 ; infinie nomdirect ionet on constitue pour chaque variable un23 ; infinie nomdirect et on constitue pour chaque variable un 28 24 ; "empilement" des n tableaux suivant la nouvelle direction. En clair 29 25 ; avec n fichiers sans dim temporelle on cree une serie temporelle de n pas de temps. 30 26 ; 31 ; KEYWORD PARAMETERS: 32 ; 33 ; GARDE: vecteur donnant les noms des variables a 27 ; @keyword GARDE 28 ; vecteur donnant les noms des variables a 34 29 ; selectionner. si il n'est pas active toutes les variables 35 30 ; sont selectionnees. 36 31 ; 37 ; EXCLU: vecteur donnant les noms des variablers a ne pas 32 ; @keyword EXCLU 33 ; vecteur donnant les noms des variablers a ne pas 38 34 ; selectionner. si il n'est pas active toutes les variables 39 35 ; sont selectionnees. 40 36 ; 41 ; OUTPUTS: 42 ; 43 ; COMMON BLOCKS: attention cette procedure fait appelle a la fonction 37 ; @uses 38 ; attention cette procedure fait appelle a la fonction 44 39 ; colle.pro 45 40 ; souvant pour une raison encore inexpliquee, IDL ne reconnait pas ds … … 63 58 ; plantages en serie IDL affiche unable to allocate memory... 64 59 ; 65 ; RESTRICTIONS: 66 ; 67 ; EXAMPLE: 68 ; 69 ; MODIFICATION HISTORY: Sebastien Masson (smasson\@lodyc.jussieu.fr) 60 ; @restrictions 61 ; 62 ; @examples 63 ; 64 ; @history 65 ; Sebastien Masson (smasson\@lodyc.jussieu.fr) 70 66 ; 23/11/98 71 67 ; 13/1/98 : attribut concernant le min et le max … … 302 298 commande = 'mv travaille.nc '+nomfichout 303 299 spawn, commande 304 305 306 307 ;------------------------------------------------------------308 ;------------------------------------------------------------309 300 return 310 301 end -
trunk/tools/idl_netcdf/ncdf_extrait.pro
r160 r161 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 ; NAME:ncdf_extrait6 ; 7 ; PURPOSE:8 ; 9 ; CATEGORY:10 ; 11 ; CALLING SEQUENCE:ncdf_extrait,nomfich1,nomfich2 [,domaine]12 ; 13 ; INPUTS:14 ; 15 ; nomfich1 et nomfich2 :le nom du fichier d'entree de de celui16 ; de sortie17 ; 18 ; domaine:un vecteur de chaines de chatacteres qui permet de2 ; 3 ; @categories 4 ; 5 ; @examples 6 ; ncdf_extrait,nomfich1,nomfich2 [,domaine] 7 ; 8 ; @param NOMFICH1 {in}{required} 9 ; le nom du fichier d'entree 10 ; 11 ; @param NOMFICH2 {in}{required} 12 ; le nom du fichier de sortie 13 ; 14 ; @param DOMAINE {in}{optional} 15 ; un vecteur de chaines de chatacteres qui permet de 19 16 ; definir les dimensions a extraire. sa forme doit etre la 20 17 ; suivante: … … 23 20 ; les dimensions ne figurant pas ds domaine seront selectionnees ds leur integralite. 24 21 ; 25 ; KEYWORD PARAMETERS: 26 ; 27 ; GARDE: vecteur donnant les noms des variables a 22 ; @param NOMFICH2 {out} 23 ; 24 ; @keyword GARDE 25 ; vecteur donnant les noms des variables a 28 26 ; selectionner. si il n'est pas active toutes les variables 29 27 ; sont selectionnees. 30 28 ; 31 ; EXCLU: vecteur donnant les noms des variablers a ne pas 29 ; @keyword EXCLU 30 ; vecteur donnant les noms des variablers a ne pas 32 31 ; selectionner. si il n'est pas active toutes les variables 33 32 ; sont selectionnees. 34 33 ; 35 ; OUTPUTS:le fichier nomfich2 36 ; 37 ; COMMON BLOCKS: 38 ; common.pro 39 ; 40 ; SIDE EFFECTS: 41 ; 42 ; RESTRICTIONS: 34 ; @uses 35 ; common.pro 36 ; 37 ; @restrictions 43 38 ; ce programme ne marche que si les tableaux sont de 44 39 ; dimension inferieure ou egale a 4. … … 48 43 ; INDICATION BIDON... 49 44 ; 50 ; EXAMPLE: 51 ; 52 ; MODIFICATION HISTORY: Sebastien Masson (smasson\@lodyc.jussieu.fr) 45 ; @examples 46 ; 47 ; @history 48 ; Sebastien Masson (smasson\@lodyc.jussieu.fr) 53 49 ; 20/11/98 54 50 ; 13/1/98 : attribut concernant le min et le max … … 56 52 ; devenant =1) 57 53 ;- 58 ;59 ;------------------------------------------------------------60 ;------------------------------------------------------------61 ;------------------------------------------------------------62 54 PRO ncdf_extrait, nomfich1, nomfich2, domaine, GARDE = garde, EXCLU = exclu 63 55 ;------------------------------------------------------------ -
trunk/tools/msf_bin/msf_sigma.pro
r2 r161 1 1 FUNCTION msf_sigma, $ 2 ;INPUTS3 2 density, $ 4 3 sigma_values, $ ; valeurs de bining … … 8 7 ; 9 8 ; 10 ; 11 ; 12 ; Creation : 2001/06/05 G. Roullet <roullet@univ-brest.fr> 9 ; @param DENSITY {in}{required} 10 ; 11 ; @param SIGMA_VALUES {in}{required} 12 ; valeurs de bining 13 ; 14 ; @param U {in}{required} 15 ; 16 ; @param V {in}{required} 17 ; 18 ; @history 19 ; 2001/06/05 G. Roullet <roullet@univ-brest.fr> 13 20 ; 14 21 ;;; -
trunk/tools/retouche.pro
r160 r161 1 ;------------------------------------------------------------ 2 ;------------------------------------------------------------ 3 ;------------------------------------------------------------ 4 ; NAME: retouche 1 ;+ 5 2 ; 6 ; PURPOSE:retoucher le mask (lui ajouter des terres)3 ; retoucher le mask (lui ajouter des terres) 7 4 ; 8 ; CATEGORY:5 ; @categories 9 6 ; 10 ; CALLING SEQUENCE:nouvmask=tetouche(mask) 7 ; @examples 8 ; nouvmask=retouche(mask) 11 9 ; 12 ; INPUTS: mask:le tableau 2d de mask (compose de 1 sur la mer et de 0 10 ; @param TAB {in}{required} 11 ; le tableau 2d de mask (compose de 1 sur la mer et de 0 13 12 ; sur la terre) 14 13 ; 15 ; KEYWORD PARAMETERS: taillepoint:taille en pixel d''un point de la 14 ; @keyword taillepoint 15 ; taille en pixel d''un point de la 16 16 ; matrice lors de sa representation a l''ecran. 17 17 ; 18 ; OUTPUTS:le nouveau mask 18 ; @returns 19 ; new mask 19 20 ; 20 ; COMMON BLOCKS: 21 ; 22 ; SIDE EFFECTS: 23 ; 24 ; RESTRICTIONS: 25 ; 26 ; EXAMPLE: 21 ; @examples 27 22 ; 28 23 ; IDL> a=retouche(tmask[*,*,0], TAILLEPOINT =5) 24 ; 29 25 ; si on clique sur le boiton du milieu on remplit de terre le point 30 26 ; surlequel on a clique. … … 34 30 ; Pour sortir, on click sur le bouton de droite. 35 31 ; 36 ; MODIFICATION HISTORY: Sebastien Masson (smasson\@lodyc.jussieu.fr) 32 ; @history 33 ; Sebastien Masson (smasson\@lodyc.jussieu.fr) 37 34 ; 38 ;------------------------------------------------------------ 39 ;------------------------------------------------------------ 40 ;------------------------------------------------------------ 35 ;- 41 36 function retouche,tab, TAILLEPOINT = taillepoint 42 37 nouvmask=-1
Note: See TracChangeset
for help on using the changeset viewer.