Changeset 607
- Timestamp:
- 11/30/12 17:38:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/file_bathy_to_mem.pro
r595 r607 83 83 ; ========== 84 84 ; 85 ; - lelod 20121127 86 ; introduction d'une interpolation bilineaire de la topographie 87 ; pas reussi a faire marcher file_interp, donc creation du tableau 88 ; interpole à l'appel (tres rapide) sur la zone choisie 89 ; la zone est codee comme latmin, lonmin -marge; latmax, lonmax +marge 90 ; marge code en dur = 16 91 85 92 ; $Id$ 86 93 ; … … 113 120 ; lecture fichier land - sea (S. Masson) 114 121 file=project_id_env+'/MASK/ETOPO1_Ice_g_gmt4.nc' 115 ;attention: zone prise en compte limitee par le choix des nos en x et 116 ;y dans initncdf. La region traitee ne doit pas exceder lonmin=-25 & 117 ;lonmax=40 & latmin=-5 & latmax=40 118 xmin=(lonmin-16+180)*60. 119 ymin=(latmin-16+90.)*60. 120 xmax=(lonmax+16+180)*60. 121 ymax=(latmax+16+90.)*60. 122 fileout=project_id_env+'/MASK/ETOPO1_interp.nc' 123 124 ; lonmin=0 & latmin=0 125 ; lonmax=20 & latmax=20 126 ; marge autour du domaine cible pour restriction des recherches dans l'orbite 127 marge=16. 128 xmin=(lonmin-marge+180)*60. 129 ymin=(latmin-marge+90.)*60. 130 xmax=(lonmax+marge+180)*60. 131 ymax=(latmax+marge+90.)*60. 122 132 123 133 ;initncdf,file, zaxisname='toto',xaxisname='lon',yaxisname='lat',XMINMESH=8000,XMAXMESH=15000, YMINMESH=4500,YMAXMESH=8500 124 134 initncdf,file,zaxisname='toto',xaxisname='lon',yaxisname='lat',XMINMESH=xmin,XMAXMESH=xmax,YMINMESH=ymin,YMAXMESH=ymax 125 domdef,lonmin-15., lonmax+15., latmin-15., latmax+15. 135 domdef,lonmin-marge, lonmax+marge, latmin-marge, latmax+marge 136 ;file_interp,file,fileout,[2,2], method='bilinear' 137 126 138 bathy=read_ncdf('z',file=file) 127 139 bate=bathy.arr gt 0 140 128 141 xxe1=reform(glamt[*,0]) 129 zonx=where(xxe1 ge lonmin- 15. and xxe1 le lonmax+15.)130 xxe =xxe1[zonx]142 zonx=where(xxe1 ge lonmin-marge and xxe1 le lonmax+marge) 143 xxe2=xxe1[zonx] 131 144 yye1=reform(gphit[0,*]) 132 zony=where(yye1 ge latmin-15. and yye1 le latmax+15.) 133 yye=yye1[zony] 134 ; 145 zony=where(yye1 ge latmin-marge and yye1 le latmax+marge) 146 yye2=yye1[zony] 147 ;xxf=fltarr(max(size(zonx))/2,max(size(zony))/2) 148 ;yyf=fltarr(max(size(zonx))/2,max(size(zony))/2) 149 ;for j=0,max(size(zony))/2-1 do xxf(*,j)=indgen(max(size(xxe))/2)*2*(max(xxe)-min(xxe))/max(size(xxe))+min(xxe) 150 ;for i=0,max(size(zonx))/2-1 do yyf(i,*)=indgen(max(size(yye))/2)*2*(max(yye)-min(yye))/max(size(yye))+min(yye) 151 xxf=indgen(max(size(xxe))/2)*2 152 yyf=indgen(max(size(yye))/2)*2 153 Result = bilinear( bathy.arr,xxf, yyf) 154 xxe=indgen(max(size(xxe))/2)*2*(max(xxe)-min(xxe))/max(size(xxe))+min(xxe) 155 yye=indgen(max(size(yye))/2)*2*(max(yye)-min(yye))/max(size(yye))+min(yye) 156 bate=result gt 0. 157 135 158 IF key_performance EQ 1 THEN BEGIN 136 159 msg = report(['ppp : ' + routine + ' : durée totale ' $
Note: See TracChangeset
for help on using the changeset viewer.