Changeset 204 for trunk/src/interp_erai_ws.pro
- Timestamp:
- 03/26/14 11:58:56 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/interp_erai_ws.pro
r203 r204 198 198 ; - fplod 20120320 199 199 ; 200 ; * taking project_overw ite into account200 ; * taking project_overwrite into account 201 201 ; * try to add compile_opt seems to be incompatible with ncdf_quickwrite 202 202 ; * pro -> function … … 252 252 nparam = N_PARAMS() 253 253 IF (nparam NE 3) THEN BEGIN 254 ras = report(['Incorrect number of arguments.' $255 256 257 254 ras = report(['Incorrect number of arguments.' $ 255 + '!C' $ 256 + 'Usage : ' + usage]) 257 return, result 258 258 ENDIF 259 259 ; … … 268 268 ; test if ${PROJECT_ID} defined 269 269 CASE project_id_env OF 270 '' :BEGIN271 msg = 'eee : ${PROJECT_ID} is not defined'272 ras = report(msg)273 return, result274 275 ELSE: BEGIN276 msg = 'iii : ${PROJECT_ID} is ' + project_id_env277 ras = report(msg)278 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 279 279 ENDCASE 280 280 ; … … 283 283 ; existence and protection of ${PROJECT_ID} 284 284 IF (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, result285 msg = 'eee : the directory' + iodirin + ' is not accessible.' 286 ras = report(msg) 287 return, result 288 288 ENDIF 289 289 ; … … 296 296 fullfilename_msk = isafile(iodirin + filename_msk, NEW=0, /MUST_EXIST) 297 297 IF fullfilename_msk[0] EQ '' THEN BEGIN 298 msg = 'eee : the file ' + fullfilename_msk + ' was not found.'299 ras = report(msg)300 return, result298 msg = 'eee : the file ' + fullfilename_msk + ' was not found.' 299 ras = report(msg) 300 return, result 301 301 ENDIF 302 302 ; … … 322 322 fullfilename = isafile(iodirin + filename, NEW=0, /MUST_EXIST) 323 323 IF fullfilename[0] EQ '' THEN BEGIN 324 msg = 'eee : the file ' + fullfilename + ' was not found.'325 ras = report(msg)326 return, result324 msg = 'eee : the file ' + fullfilename + ' was not found.' 325 ras = report(msg) 326 return, result 327 327 ENDIF 328 328 ; 329 329 ; test if ${PROJECT_OD} defined 330 330 CASE project_od_env OF 331 '' : BEGIN332 333 334 return, result335 336 ELSE: BEGIN337 338 339 340 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 341 341 ; 342 342 ; check if output data will be possible … … 355 355 ; in order to avoid unexpected overwritten 356 356 IF ((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, result357 msg = 'eee : the file ' + fullfilename_out + ' already exists.' 358 ras = report(msg) 359 return, result 360 360 ENDIF 361 361 ; … … 389 389 fullfilename = isafile(iodirin + filename, NEW=0, /MUST_EXIST) 390 390 IF fullfilename[0] EQ '' THEN BEGIN 391 msg = 'eee : the file ' + fullfilename + ' was not found.'392 ras = report(msg)393 return, result391 msg = 'eee : the file ' + fullfilename + ' was not found.' 392 ras = report(msg) 393 return, result 394 394 ENDIF 395 395 initncdf, fullfilename … … 430 430 ; 431 431 for jt=0,jptin-1 do begin 432 ; ++print, 'Interpolation jt=',jt,' / ',jptin-1433 tab=reform(u10in[*,*,jt])434 u10out[*,*,jt]=call_interp2d(tab,lonin,latin,mskin $435 436 437 u10out[*,*,jt]=u10out[*,*,jt]*mskout+(1.-mskout)*1.e20438 ;439 tab=reform(v10in[*,*,jt])440 v10out[*,*,jt]=call_interp2d(tab,lonin,latin,mskin $441 442 443 v10out[*,*,jt]=v10out[*,*,jt]*mskout+(1.-mskout)*1.e20444 ;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 ; 445 445 endfor 446 446 ; … … 466 466 ; 467 467 ncfields = 'u10[longitude,latitude,*time]=u10out:u10_attr; ' $ 468 +'v10[longitude,latitude,*time]=v10out:v10_attr; ' $469 470 471 472 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' 473 473 ; 474 474 @ncdf_quickwrite
Note: See TracChangeset
for help on using the changeset viewer.