Changeset 607


Ignore:
Timestamp:
11/30/12 17:38:00 (12 years ago)
Author:
lelod
Message:

test interpolation bathy

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/file_bathy_to_mem.pro

    r595 r607  
    8383; ========== 
    8484; 
     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 
    8592; $Id$ 
    8693; 
     
    113120; lecture fichier land - sea (S. Masson) 
    114121file=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. 
     122fileout=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 
     127marge=16. 
     128xmin=(lonmin-marge+180)*60. 
     129ymin=(latmin-marge+90.)*60. 
     130xmax=(lonmax+marge+180)*60. 
     131ymax=(latmax+marge+90.)*60. 
    122132 
    123133;initncdf,file, zaxisname='toto',xaxisname='lon',yaxisname='lat',XMINMESH=8000,XMAXMESH=15000, YMINMESH=4500,YMAXMESH=8500 
    124134initncdf,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. 
     135domdef,lonmin-marge, lonmax+marge, latmin-marge, latmax+marge 
     136;file_interp,file,fileout,[2,2], method='bilinear' 
     137 
    126138bathy=read_ncdf('z',file=file) 
    127139bate=bathy.arr gt 0 
     140 
    128141xxe1=reform(glamt[*,0]) 
    129 zonx=where(xxe1 ge lonmin-15. and xxe1 le lonmax+15.) 
    130 xxe=xxe1[zonx] 
     142zonx=where(xxe1 ge lonmin-marge and xxe1 le lonmax+marge) 
     143xxe2=xxe1[zonx] 
    131144yye1=reform(gphit[0,*]) 
    132 zony=where(yye1 ge latmin-15. and yye1 le latmax+15.) 
    133 yye=yye1[zony] 
    134 ; 
     145zony=where(yye1 ge latmin-marge and yye1 le latmax+marge) 
     146yye2=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) 
     151xxf=indgen(max(size(xxe))/2)*2 
     152yyf=indgen(max(size(yye))/2)*2 
     153Result = bilinear( bathy.arr,xxf, yyf)  
     154xxe=indgen(max(size(xxe))/2)*2*(max(xxe)-min(xxe))/max(size(xxe))+min(xxe) 
     155yye=indgen(max(size(yye))/2)*2*(max(yye)-min(yye))/max(size(yye))+min(yye) 
     156bate=result gt 0. 
     157 
    135158IF key_performance EQ 1 THEN BEGIN 
    136159    msg = report(['ppp : ' + routine + ' : durée totale ' $ 
Note: See TracChangeset for help on using the changeset viewer.