Changeset 70 for trunk/src


Ignore:
Timestamp:
08/08/11 12:41:36 (13 years ago)
Author:
pinsard
Message:

fix call_interp2d call

Location:
trunk/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/interp_erai_dewt_1989_2009.pro

    • Property svn:keywords set to URL
    r67 r70  
    44; 
    55; ============================== 
    6 ; interp_erai_dewt_1989_2009.pro  
     6; interp_erai_dewt_1989_2009.pro 
    77; ============================== 
    88; 
     
    7373;   Variable is undefined: OUTMASK_IND. 
    7474; 
     75; check OUTMASK_IND and SET_OUTMSKVAL added to call_interp2d call 
     76; 
     77; use real output of :ref:`compute_erai_daily_region_2d.sh`. 
     78; 
    7579; coding rules 
    7680; 
     
    8791; 
    8892; $URL$ 
     93; 
     94; - fplod 20110808T094156Z cratos (Linux) 
     95; 
     96;   * add OUTMASK_IND and SET_OUTMSKVAL to call_interp2d call 
    8997; 
    9098; - pinsard 2011-07-05T07:33:36Z loholt1.ipsl.polytechnique.fr (Linux) 
     
    220228  print, 'Interpolation jt=',jt,' / ',jptin-1 
    221229  tab=reform(d2min(*,*,jt)) 
    222   d2mout(*,*,jt)=call_interp2d(tab,lonin,latin,mskin,lonout,latout,method='bilinear') 
     230  d2mout(*,*,jt)=call_interp2d(tab,lonin,latin,mskin $ 
     231      , lonout,latout,method='bilinear' $ 
     232      , OUTMASK_IND=mskout, SET_OUTMSKVAL=mskout) 
    223233  d2mout(*,*,jt)=d2mout(*,*,jt)*mskout+(1.-mskout)*1.e20 
    224234endfor 
  • trunk/src/interp_erai_lwr_1989_2009.pro

    • Property svn:keywords set to URL
    r67 r70  
    7575;   Variable is undefined: OUTMASK_IND. 
    7676; 
     77; check OUTMASK_IND and SET_OUTMSKVAL added to call_interp2d call 
     78; 
     79; use real output of :ref:`compute_erai_daily_region_2d.sh`. 
     80; 
     81; 19890101 is not provided in ERA-Intermim file str : a possible workaround is to copy 19890102 
     82; dataset to 19890101 using nco before processing. see :ref:`compute_erai_daily_region_2d.sh` 
     83; 
    7784; coding rules 
    7885; 
     
    8996; 
    9097; $URL$ 
     98; 
     99; - fplod 20110808T094156Z cratos (Linux) 
     100; 
     101;   * add OUTMASK_IND and SET_OUTMSKVAL to call_interp2d call 
     102;   * fix typo 
     103;     .. note:: 
     104; 
     105;        IDL do not warn when asking size of an undefined array:: 
     106; 
     107;           IDL> must_crash=size(ginette) 
    91108; 
    92109; - pinsard 2011-07-05T07:33:36Z loholt1.ipsl.polytechnique.fr (Linux) 
     
    203220lwrin=read_ncdf("str",0,7668,/timestep,file=fullfilename,/nostr) 
    204221lwrin=-1*lwrin 
    205 help, lwrin 
    206222 
    207223initncdf, fullfilename 
     
    222238mskout=read_ncdf("msk", file=fullfilename_msk,/nostr) 
    223239 
    224 help, lwrin 
    225  
    226 si=size(swrin) 
     240 
     241si=size(lwrin) 
    227242lwrout=fltarr(jpi,jpj,jptin) 
    228243 
     
    231246 
    232247  tab=reform(lwrin(*,*,jt)) 
    233   lwrout(*,*,jt)=call_interp2d(tab,lonin,latin,mskin,lonout,latout,method='bilinear') 
     248  lwrout(*,*,jt)=call_interp2d(tab,lonin,latin,mskin $ 
     249     , lonout,latout,method='bilinear' $ 
     250     , OUTMASK_IND=mskout, SET_OUTMSKVAL=mskout) 
     251  help, OUTMASK_IND 
     252  help, SET_OUTMSKVAL 
    234253  lwrout(*,*,jt)=lwrout(*,*,jt)*mskout+(1.-mskout)*1.e20 
    235254 
     
    257276globattr={source:'Tropical ocean fluxes obtained from ERA Interim',timerange:cda0+' - '+cda1} 
    258277 
    259 help,lwrout 
    260  
    261278ncfields = 'lwr[longitude,latitude,time]=lwrout:lwr_attr; ' $ 
    262279                      + 'longitude[]=xlon:lon_attr; ' $ 
  • trunk/src/interp_erai_sst_1989_2009.pro

    • Property svn:keywords set to URL
    r67 r70  
    7575;   Variable is undefined: OUTMASK_IND. 
    7676; 
     77; check OUTMASK_IND and SET_OUTMSKVAL added to call_interp2d call 
     78; 
    7779; coding rules 
    7880; 
     
    9193; 
    9294; $URL$ 
     95; 
     96; - fplod 20110808T094156Z cratos (Linux) 
     97; 
     98;   * add OUTMASK_IND and SET_OUTMSKVAL to call_interp2d call 
    9399; 
    94100; - pinsard 2011-07-04T15:45:35Z loholt1.ipsl.polytechnique.fr (Linux) 
     
    226232  print, 'Interpolation jt=',jt,' / ',jptin-1 
    227233  tab=reform(sstkin(*,*,jt)) 
    228   sstkout(*,*,jt)=call_interp2d(tab,lonin,latin,mskin,lonout,latout,method='bilinear') 
     234  sstkout(*,*,jt)=call_interp2d(tab,lonin,latin,mskin $ 
     235     , lonout,latout,method='bilinear' $ 
     236     , OUTMASK_IND=mskout, SET_OUTMSKVAL=mskout) 
    229237  sstkout(*,*,jt)=sstkout(*,*,jt)*mskout+(1.-mskout)*1.e20 
    230238endfor 
  • trunk/src/interp_erai_t2m_1989_2009.pro

    • Property svn:keywords set to URL
    r67 r70  
    7676;  IDL> interp_erai_t2m_1989_2009 
    7777; 
    78 ; 
    7978; TODO 
    8079; ==== 
     
    9796; why two "initncdf, fullfilename_msk" 
    9897; 
    99 ; hard coded attributes for t2m (missing value, short name, axis) and time (origin) : use ncdf_getatt  
     98; hard coded attributes for t2m (missing value, short name, axis) and time (origin) : use ncdf_getatt 
    10099; 
    101100; CF conventions 
     101; 
     102; check OUTMASK_IND and SET_OUTMSKVAL added to call_interp2d call 
     103; 
     104; remove ncdf_quickwrite exercices 
    102105; 
    103106; KNOWN ISSUES 
     
    109112; EVOLUTIONS 
    110113; ========== 
     114; 
     115; $Id$ 
     116; 
     117; $URL$ 
     118; 
     119; - fplod 20110808T094156Z cratos (Linux) 
     120; 
     121;   * add OUTMASK_IND and SET_OUTMSKVAL to call_interp2d call 
    111122; 
    112123; - fplod 20110103T153734Z aedon.locean-ipsl.upmc.fr (Darwin) 
     
    251262initncdf, fullfilename_t2 
    252263domdef 
    253 latin=reform(gphit(0,*))  
     264latin=reform(gphit(0,*)) 
    254265lonin=reform(glamt(*,0)) 
    255266print, 'lat grid from data',min(latin),max(latin),latin(1)-latin(0) 
     
    285296initncdf, fullfilename_msk 
    286297domdef 
    287 latout=reform(gphit(0,*))  
     298latout=reform(gphit(0,*)) 
    288299lonout=reform(glamt(*,0)) 
    289300print, 'lat grid from mask ',min(latout),max(latout),latout(1)-latout(0) 
     
    297308for jt=0,jptin-1 do begin 
    298309  tab=reform(t2min(*,*,jt)) 
    299   t2mout(*,*,jt)=call_interp2d(tab,lonin,latin,mskin,lonout,latout,method='bilinear') 
     310  t2mout(*,*,jt)=call_interp2d(tab,lonin,latin,mskin $ 
     311      , lonout,latout,method='bilinear' $ 
     312      , OUTMASK_IND=mskout, SET_OUTMSKVAL=mskout) 
    300313  t2mout(*,*,jt)=t2mout(*,*,jt)*mskout+(1.-mskout)*1.e20 
    301314endfor 
     
    324337help, t2mout 
    325338help, timein 
    326 ;ncfields = 't2m[longitude,latitude,*time]=t2mout:t2m_attr; ' $ 
    327 ;                      + 'longitude[]=lon:lon_attr; ' $ 
    328 ;                      + 'latitude[]=lat:lat_attr; ' $ 
    329 ;                     + 'time[]=timein:time_attr ' $ 
    330 ;                      + ' @globattr' 
     339ncfields = 't2m[longitude,latitude,*time]=t2mout:t2m_attr; ' $ 
     340                      + 'longitude[]=lon:lon_attr; ' $ 
     341                      + 'latitude[]=lat:lat_attr; ' $ 
     342                      + 'time[]=timein:time_attr ' $ 
     343                      + ' @globattr' 
     344@ncdf_quickwrite 
    331345 
    332346; ok ncfields = 'longitude[]=lon:lon_attr;latitude[]=lat:lat_attr' 
     
    354368help, lat 
    355369help, lon 
    356 help, t2m  
     370help, t2m 
    357371help, time 
    358372help, timein 
     
    368382;ncfields = 't2m[longitude,latitude,*time];longitude[]=lon:lon_attr;latitude[]=lat:lat_attr;time[]=timepb:time_attr' 
    369383 
    370 timepb=findgen(7670) 
    371 ncfields = 't2m[longitude,latitude,*time];longitude[]=lon:lon_attr;latitude[]=lat:lat_attr;time[]=timepb:time_attr' 
    372 @ncdf_quickwrite 
     384;++timepb=findgen(7670) 
     385;++ncfields = 't2m[longitude,latitude,*time];longitude[]=lon:lon_attr;latitude[]=lat:lat_attr;time[]=timepb:time_attr' 
     386;++@ncdf_quickwrite 
    373387 
    374388 
  • trunk/src/interp_erai_ws_1989_2009.pro

    • Property svn:keywords set to URL
    r67 r70  
    7878;   Variable is undefined: OUTMASK_IND. 
    7979; 
     80; check OUTMASK_IND and SET_OUTMSKVAL added to call_interp2d call 
     81; 
     82; use real output of :ref:`compute_erai_daily_region_2d.sh`. 
     83; 
    8084; coding rules 
    8185; 
     
    9296; 
    9397; $URL$ 
     98; 
     99; - fplod 20110808T094156Z cratos (Linux) 
     100; 
     101;   * add OUTMASK_IND and SET_OUTMSKVAL to call_interp2d call 
    94102; 
    95103; - pinsard 2011-07-05T07:33:36Z loholt1.ipsl.polytechnique.fr (Linux) 
     
    245253  print, 'Interpolation jt=',jt,' / ',jptin-1 
    246254  tab=reform(u10in(*,*,jt)) 
    247   u10out(*,*,jt)=call_interp2d(tab,lonin,latin,mskin,lonout,latout,method='bilinear') 
     255  u10out(*,*,jt)=call_interp2d(tab,lonin,latin,mskin $ 
     256      , lonout,latout,method='bilinear' $ 
     257      , OUTMASK_IND=mskout, SET_OUTMSKVAL=mskout) 
    248258  u10out(*,*,jt)=u10out(*,*,jt)*mskout+(1.-mskout)*1.e20 
    249259 
    250260  tab=reform(v10in(*,*,jt)) 
    251   v10out(*,*,jt)=call_interp2d(tab,lonin,latin,mskin,lonout,latout,method='bilinear') 
     261  v10out(*,*,jt)=call_interp2d(tab,lonin,latin,mskin $ 
     262      , lonout,latout,method='bilinear' $ 
     263      , OUTMASK_IND=mskout, SET_OUTMSKVAL=mskout) 
    252264  v10out(*,*,jt)=v10out(*,*,jt)*mskout+(1.-mskout)*1.e20 
    253265 
Note: See TracChangeset for help on using the changeset viewer.