Changeset 97 for trunk/src/interp_erai_lwr_1989_2009.pro
- Timestamp:
- 08/30/11 14:38:29 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/interp_erai_lwr_1989_2009.pro
r94 r97 12 12 ; Interpolation of str from ERA-I grid to OAFLUX grid 13 13 ; 14 ; :file:`${PROJECT_ID}/20c3m_erai_str_TROP_1989_2009.nc` 15 ; containing str from ERA-I 14 ; :file:`${PROJECT_ID}/20c3m_erai_str_TROP_1989_2009.nc` 15 ; containing str from ERA-I 16 16 ; has been produced 17 17 ; by :ref:`compute_erai_daily_region_2d.sh`. 18 18 ; 19 ; :file:`${PROJECT_ID}/mask_oaflux_30N30S.nc` 19 ; :file:`${PROJECT_ID}/mask_oaflux_30N30S.nc` 20 20 ; containing OAFLUX mask 21 ; has been produced by 21 ; has been produced by 22 22 ; :ref:`oaflux_mask_30N30S.pro`. 23 23 ; 24 24 ; Interpolated str is written in 25 ; :file:`${PROJECT_OD}/erai_lwr_19890102_20091231_oafluxgrid.nc` 25 ; :file:`${PROJECT_OD}/erai_lwr_19890102_20091231_oafluxgrid.nc` 26 26 ; if this file not already exists. 27 27 ; 28 ; This output file 29 ; :file:`${PROJECT_OD}/erai_lwr_19890102_20091231_oafluxgrid.nc` 28 ; This output file 29 ; :file:`${PROJECT_OD}/erai_lwr_19890102_20091231_oafluxgrid.nc` 30 30 ; must be processed after by :ref:`add_198900101.sh`. 31 31 ; … … 207 207 STOP 208 208 ENDIF 209 210 st=19890101 209 ; 210 st=19890101 211 211 en=20090801 212 212 ; 213 213 ; build data filename 214 214 filename='20c3m_erai_str_TROP_1989_2009.nc' … … 260 260 lwrin=read_ncdf("str",0,7668,/timestep,file=fullfilename,/nostr) 261 261 lwrin=-1*lwrin 262 262 ; 263 263 initncdf, fullfilename 264 264 domdef 265 latin=reform(gphit(0,*)) 265 latin=reform(gphit(0,*)) 266 266 lonin=reform(glamt(*,0)) 267 267 print, 'lat grid ',min(latin),max(latin),latin(1)-latin(0) 268 268 print, 'lon grid ',min(lonin),max(lonin),lonin(1)-lonin(0) 269 270 timein=time 269 ; 270 timein=time 271 271 jptin=jpt 272 272 tab=lwrin(*,*,0) 273 273 mskin=glamt*0.+1. 274 274 ; 275 275 initncdf, fullfilename_msk 276 276 domdef … … 279 279 print, 'lon grid ',min(lonout),max(lonout),lonout(1)-lonout(0) 280 280 mskout=read_ncdf("msk", file=fullfilename_msk,/nostr) 281 281 ; 282 282 si=size(lwrin) 283 283 lwrout=fltarr(jpi,jpj,jptin) 284 284 ; 285 285 for jt=0,jptin-1 do begin 286 286 ; ++print, 'Interpolation jt=',jt,' / ',jptin-1 287 287 ; 288 288 tab=reform(lwrin(*,*,jt)) 289 289 lwrout(*,*,jt)=call_interp2d(tab,lonin,latin,mskin $ … … 291 291 , OUTMASK_IND=mskout, SET_OUTMSKVAL=mskout) 292 292 lwrout(*,*,jt)=lwrout(*,*,jt)*mskout+(1.-mskout)*1.e20 293 293 ; 294 294 endfor 295 296 time=timegen(7669, start=julday(1,2,1989,0), units='days') 295 ; 296 time=timegen(7669, start=julday(1,2,1989,0), units='days') 297 297 jpt=n_elements(time) 298 tt=time 298 tt=time 299 299 jptin=jpt 300 300 cda0=string(jul2date(tt(0)),format='(i8.8)') 301 301 cda1=string(jul2date(tt(jpt-1)),format='(i8.8)') 302 302 tt=tt-julday(1,1,1950,00,00,00) 303 xlon=reform(glamt(*,0) ) 303 xlon=reform(glamt(*,0) ) 304 304 ylat=reform(gphit(0,*)) 305 305 ; 306 306 initncdf, fullfilename_msk 307 307 valmask=1.e20 308 308 ; 309 309 ylat=latout 310 310 xlon=lonout … … 313 313 lat_attr={units:'degrees_north',long_name:'Latitude'} 314 314 time_attr={units:'days since 1950-01-01 00:00:00',long_name:'Time axis',time_origin:' 1950-JAN-01 00:00:00'} 315 315 ; 316 316 lwr_attr={units:'W/m2',missing_value:valmask,long_name:'Surface net longwave radiation ',short_name:'lwr',axis:'TYX'} 317 317 time_attr={units:'days since 1950-01-01 00:00:00',long_name:'Time axis',time_origin:' 1950-JAN-01 00:00:00'} 318 318 globattr={source:'Tropical ocean fluxes obtained from ERA Interim',timerange:cda0+' - '+cda1} 319 319 ; 320 320 ncfields = 'lwr[longitude,latitude,time]=lwrout:lwr_attr; ' $ 321 321 + 'longitude[]=xlon:lon_attr; ' $ … … 323 323 + 'tt[*time]=tt:time_attr ' $ 324 324 + ' @ globattr' 325 325 ; 326 326 @ncdf_quickwrite 327 327 ; 328 328 end
Note: See TracChangeset
for help on using the changeset viewer.