Ignore:
Timestamp:
03/26/14 11:58:56 (10 years ago)
Author:
pinsard
Message:

fix thanks to coding rules; typo

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/interp_erai_ws.pro

    r203 r204  
    198198; - fplod 20120320 
    199199; 
    200 ;   * taking project_overwite into account 
     200;   * taking project_overwrite into account 
    201201;   * try to add compile_opt seems to be incompatible with ncdf_quickwrite 
    202202;   * pro -> function 
     
    252252nparam = N_PARAMS() 
    253253IF (nparam NE 3) THEN BEGIN 
    254 ras = report(['Incorrect number of arguments.' $ 
    255       + '!C' $ 
    256       + 'Usage : ' + usage]) 
    257       return, result 
     254    ras = report(['Incorrect number of arguments.' $ 
     255    + '!C' $ 
     256    + 'Usage : ' + usage]) 
     257    return, result 
    258258ENDIF 
    259259; 
     
    268268; test if ${PROJECT_ID} defined 
    269269CASE project_id_env OF 
    270     ''  : BEGIN 
    271      msg = 'eee : ${PROJECT_ID} is not defined' 
    272      ras = report(msg) 
    273      return, result 
    274            END 
    275  ELSE: BEGIN 
    276      msg = 'iii : ${PROJECT_ID} is ' + project_id_env 
    277      ras = report(msg) 
    278        END 
     270    '' : BEGIN 
     271        msg = 'eee : ${PROJECT_ID} is not defined' 
     272        ras = report(msg) 
     273        return, result 
     274    END 
     275    ELSE : BEGIN 
     276        msg = 'iii : ${PROJECT_ID} is ' + project_id_env 
     277        ras = report(msg) 
     278    END 
    279279ENDCASE 
    280280; 
     
    283283; existence and protection of ${PROJECT_ID} 
    284284IF (FILE_TEST(iodirin, /DIRECTORY, /EXECUTABLE, /READ) EQ 0) THEN BEGIN 
    285    msg = 'eee : the directory' + iodirin  + ' is not accessible.' 
    286    ras = report(msg) 
    287    return, result 
     285    msg = 'eee : the directory' + iodirin  + ' is not accessible.' 
     286    ras = report(msg) 
     287    return, result 
    288288ENDIF 
    289289; 
     
    296296fullfilename_msk = isafile(iodirin + filename_msk, NEW=0, /MUST_EXIST) 
    297297IF fullfilename_msk[0] EQ '' THEN BEGIN 
    298    msg = 'eee : the file ' + fullfilename_msk + ' was not found.' 
    299    ras = report(msg) 
    300    return, result 
     298    msg = 'eee : the file ' + fullfilename_msk + ' was not found.' 
     299    ras = report(msg) 
     300    return, result 
    301301ENDIF 
    302302; 
     
    322322fullfilename = isafile(iodirin + filename, NEW=0, /MUST_EXIST) 
    323323IF fullfilename[0] EQ '' THEN BEGIN 
    324    msg = 'eee : the file ' + fullfilename + ' was not found.' 
    325    ras = report(msg) 
    326    return, result 
     324    msg = 'eee : the file ' + fullfilename + ' was not found.' 
     325    ras = report(msg) 
     326    return, result 
    327327ENDIF 
    328328; 
    329329; test if ${PROJECT_OD} defined 
    330330CASE project_od_env OF 
    331   '' : BEGIN 
    332          msg = 'eee : ${PROJECT_OD} is not defined' 
    333          ras = report(msg) 
    334        return, result 
    335        END 
    336   ELSE: BEGIN 
    337           msg = 'iii : ${PROJECT_OD} is ' + project_od_env 
    338           ras = report(msg) 
    339         END 
    340  ENDCASE 
     331    '' : BEGIN 
     332        msg = 'eee : ${PROJECT_OD} is not defined' 
     333        ras = report(msg) 
     334        return, result 
     335    END 
     336    ELSE : BEGIN 
     337        msg = 'iii : ${PROJECT_OD} is ' + project_od_env 
     338        ras = report(msg) 
     339    END 
     340ENDCASE 
    341341; 
    342342; check if output data will be possible 
     
    355355; in order to avoid unexpected overwritten 
    356356IF ((FILE_TEST(fullfilename_out) EQ 1)  AND (project_overwrite EQ 0)) THEN BEGIN 
    357    msg = 'eee : the file ' + fullfilename_out  + ' already exists.' 
    358    ras = report(msg) 
    359    return, result 
     357    msg = 'eee : the file ' + fullfilename_out  + ' already exists.' 
     358    ras = report(msg) 
     359    return, result 
    360360ENDIF 
    361361; 
     
    389389fullfilename = isafile(iodirin + filename, NEW=0, /MUST_EXIST) 
    390390IF fullfilename[0] EQ '' THEN BEGIN 
    391    msg = 'eee : the file ' + fullfilename + ' was not found.' 
    392    ras = report(msg) 
    393    return, result 
     391    msg = 'eee : the file ' + fullfilename + ' was not found.' 
     392    ras = report(msg) 
     393    return, result 
    394394ENDIF 
    395395initncdf, fullfilename 
     
    430430; 
    431431for jt=0,jptin-1 do begin 
    432   ; ++print, 'Interpolation jt=',jt,' / ',jptin-1 
    433   tab=reform(u10in[*,*,jt]) 
    434   u10out[*,*,jt]=call_interp2d(tab,lonin,latin,mskin $ 
    435       , lonout,latout,method='bilinear' $ 
    436       , OUTMASK_IND=mskout, SET_OUTMSKVAL=mskout) 
    437   u10out[*,*,jt]=u10out[*,*,jt]*mskout+(1.-mskout)*1.e20 
    438 ; 
    439   tab=reform(v10in[*,*,jt]) 
    440   v10out[*,*,jt]=call_interp2d(tab,lonin,latin,mskin $ 
    441       , lonout,latout,method='bilinear' $ 
    442       , OUTMASK_IND=mskout, SET_OUTMSKVAL=mskout) 
    443   v10out[*,*,jt]=v10out[*,*,jt]*mskout+(1.-mskout)*1.e20 
    444 ; 
     432    ; ++print, 'Interpolation jt=',jt,' / ',jptin-1 
     433    tab=reform(u10in[*,*,jt]) 
     434    u10out[*,*,jt]=call_interp2d(tab,lonin,latin,mskin $ 
     435    , lonout,latout,method='bilinear' $ 
     436    , OUTMASK_IND=mskout, SET_OUTMSKVAL=mskout) 
     437    u10out[*,*,jt]=u10out[*,*,jt]*mskout+(1.-mskout)*1.e20 
     438    ; 
     439    tab=reform(v10in[*,*,jt]) 
     440    v10out[*,*,jt]=call_interp2d(tab,lonin,latin,mskin $ 
     441    , lonout,latout,method='bilinear' $ 
     442    , OUTMASK_IND=mskout, SET_OUTMSKVAL=mskout) 
     443    v10out[*,*,jt]=v10out[*,*,jt]*mskout+(1.-mskout)*1.e20 
     444    ; 
    445445endfor 
    446446; 
     
    466466; 
    467467ncfields = 'u10[longitude,latitude,*time]=u10out:u10_attr; ' $ 
    468           +'v10[longitude,latitude,*time]=v10out:v10_attr; ' $ 
    469                       + 'longitude[]=xlon:lon_attr; ' $ 
    470                       + 'latitude[]=ylat:lat_attr; ' $ 
    471                       + 'time[]=timein:time_attr ' $ 
    472                       + ' @ globattr' 
     468+ 'v10[longitude,latitude,*time]=v10out:v10_attr; ' $ 
     469+ 'longitude[]=xlon:lon_attr; ' $ 
     470+ 'latitude[]=ylat:lat_attr; ' $ 
     471+ 'time[]=timein:time_attr ' $ 
     472+ ' @ globattr' 
    473473; 
    474474@ncdf_quickwrite 
Note: See TracChangeset for help on using the changeset viewer.