- Timestamp:
- 03/19/12 18:07:09 (12 years ago)
- Location:
- trunk/src
- Files:
-
- 5 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/d2m_to_q2m_erai.pro
r165 r166 13 13 ; ++ 14 14 ; has been produced by 15 ; : ref:`interp_erai_dewt_1989_2009.pro`.15 ; :func:`interp_erai_dewt`. 16 16 ; 17 17 ; :file:`${PROJECT_OD}/erai_t2m_19890101_20091231_oafluxgrid.nc` … … 74 74 ; :ref:`project_profile.sh` 75 75 ; 76 ; : ref:`interp_erai_dewt_1989_2009.pro`76 ; :func:`interp_erai_dewt` 77 77 ; :func:`interp_erai_msl` 78 78 ; :func:`interp_erai_t2m` -
trunk/src/interp_erai_dewt.pro
r164 r166 1 1 ;+ 2 2 ; 3 ; .. _interp_erai_dewt_1989_2009.pro:4 ; 5 ; ==================== ==========6 ; interp_erai_dewt_1989_2009.pro7 ; ==============================3 ; ==================== 4 ; interp_erai_dewt.pro 5 ; ==================== 6 ; 7 ; .. function:: interp_erai_dewt(yyyymmddb,yyyymmdde) 8 8 ; 9 9 ; DESCRIPTION … … 21 21 ; containing OAFLUX grid 22 22 ; has been produced by 23 ; :func:`oaflux_mask_30n30s .pro`.23 ; :func:`oaflux_mask_30n30s`. 24 24 ; 25 25 ; Interpolated d2 26 26 ; is written in 27 ; :file:`${PROJECT_OD}/erai_d2m_ 19890101_20091231_oafluxgrid.nc`27 ; :file:`${PROJECT_OD}/erai_d2m_{yyyymmdd}_{yyyymmdd}_oafluxgrid.nc` 28 28 ; if this file not already exists. 29 29 ; 30 30 ; This output file 31 ; :file:`${PROJECT_OD}/erai_d2m_ 19890101_20091231_oafluxgrid.nc`31 ; :file:`${PROJECT_OD}/erai_d2m_{yyyymmdd}_{yyyymmdd}_oafluxgrid.nc` 32 32 ; must be processed after by 33 33 ; :ref:`d2m_to_q2m_erai.pro`. … … 41 41 ; .. graphviz:: 42 42 ; 43 ; digraph interp_erai_dewt _1989_2009{43 ; digraph interp_erai_dewt { 44 44 ; 45 45 ; file_in [shape=ellipse,fontname=Courier,label="${PROJECT_ID}/20c3m_erai_d2_TROP_1989_2009.nc"]; 46 46 ; mask [shape=ellipse,fontname=Courier,label="${PROJECT_ID}/mask_oaflux_30N30S.nc"]; 47 ; file_out [shape=ellipse,fontname=Courier,label="${PROJECT_OD}/erai_d2m_ 19890101_20091231_oafluxgrid.nc"];48 ; 49 ; interp_erai_dewt _1989_2009[shape=box,47 ; file_out [shape=ellipse,fontname=Courier,label="${PROJECT_OD}/erai_d2m_{yyyymmdd}_{yyyymmdd}_oafluxgrid.nc"]; 48 ; 49 ; interp_erai_dewt [shape=box, 50 50 ; fontname=Courier, 51 51 ; color=blue, 52 ; URL="http://forge.ipsl.jussieu.fr/tropflux/browser/trunk/src/interp_erai_dewt _1989_2009.pro",53 ; label="${PROJECT}/src/interp_erai_dewt _1989_2009.pro"];54 ; 55 ; {file_in mask} -> {interp_erai_dewt _1989_2009} -> {file_out}52 ; URL="http://forge.ipsl.jussieu.fr/tropflux/browser/trunk/src/interp_erai_dewt.pro", 53 ; label="${PROJECT}/src/interp_erai_dewt.pro"]; 54 ; 55 ; {file_in mask} -> {interp_erai_dewt} -> {file_out} 56 56 ; 57 57 ; } … … 61 61 ; 62 62 ; :ref:`interpolate_data` 63 ; 64 ; Used by :ref:`tropflux.sh` 63 65 ; 64 66 ; :ref:`project_profile.sh` … … 81 83 ; 82 84 ; IDL> .compile file_interp 83 ; IDL> interp_erai_dewt_1989_2009 85 ; IDL> yyyymmddb = 19890101 86 ; IDL> yyyymmdde = 20091231 87 ; IDL> result = interp_erai_dewt(yyyymmddb, yyymmdde) 88 ; IDL> print, result 84 89 ; 85 90 ; TIPS … … 89 94 ; 90 95 ; $ ncks -v d2m -d time,0,1 -d latitude,0,1 -d longitude,0,1 \ 91 ; $PROJECT_ID/erai_d2m_19890101_200 96 ; $PROJECT_ID/erai_d2m_19890101_20091231_oafluxgrid.nc 92 97 ; 93 98 ; TODO … … 98 103 ; use real output of :ref:`compute_erai_daily_region_2d.sh`. 99 104 ; 105 ; why 19880101,20100930 as dates in read_ncdf. 106 ; now (20120319) should be yyyymmddb and yyymmdde 107 ; 108 ; check [yyyymmddb,yyyymmdde] validity 109 ; 110 ; check if [yyyymmddb,yyyymmdde] is included in ERA-I file 111 ; 112 ; what happen if yyyymmdde > 20091231 : need to read an other ERA-I file 113 ; 114 ; add an example with only one month (ie 200001) 115 ; 100 116 ; coding rules 117 ; 118 ; check time values 101 119 ; 102 120 ; KNOWN ISSUES … … 111 129 ; $Id$ 112 130 ; 113 ; $URL: svn+ssh://pinsard@forge.ipsl.jussieu.fr/ipsl/forge/projets/tropflux/svn/trunk/src/interp_erai_dewt_1989_2009.pro $ 131 ; $URL: svn+ssh://pinsard@forge.ipsl.jussieu.fr/ipsl/forge/projets/tropflux/svn/trunk/src/interp_erai_dewt.pro $ 132 ; 133 ; - fplod 20120319 134 ; 135 ; * taking project_overwite into account 136 ; * try to add compile_opt seems to be incompatible with ncdf_quickwrite 137 ; * pro -> function 114 138 ; 115 139 ; - pinsard 2011-08-23T09:09:16Z loholt1.ipsl.polytechnique.fr (Linux) … … 142 166 ; 143 167 ;- 144 pro interp_erai_dewt_1989_2009 168 function interp_erai_dewt $ 169 , yyyymmddb $ 170 , yyyymmdde 171 ; 172 ;++compile_opt idl2, strictarrsubs, logical_predicate 145 173 ; 146 174 @cm_4cal … … 150 178 @cm_project 151 179 ; 180 ; Return to caller if errors 181 ON_ERROR, 2 182 ; 183 result = -1 184 ; 185 usage = 'result = interp_erai_t2m(yyyymmddb, yyyymmdde) 186 nparam = N_PARAMS() 187 IF (nparam NE 2) THEN BEGIN 188 ras = report(['Incorrect number of arguments.' $ 189 + '!C' $ 190 + 'Usage : ' + usage]) 191 return, result 192 ENDIF 193 ; 152 194 ; check for input directory 153 195 ; … … 157 199 msg = 'eee : ${PROJECT_ID} is not defined' 158 200 ras = report(msg) 159 STOP201 return, result 160 202 END 161 203 ELSE: BEGIN … … 171 213 msg = 'eee : the directory' + iodirin + ' is not accessible.' 172 214 ras = report(msg) 173 STOP215 return, result 174 216 ENDIF 175 217 ; … … 184 226 msg = 'eee : the file ' + fullfilename_msk + ' was not found.' 185 227 ras = report(msg) 186 STOP228 return, result 187 229 ENDIF 188 230 ; … … 197 239 msg = 'eee : the file ' + fullfilename + ' was not found.' 198 240 ras = report(msg) 199 STOP241 return, result 200 242 ENDIF 201 243 ; … … 205 247 msg = 'eee : ${PROJECT_OD} is not defined' 206 248 ras = report(msg) 207 STOP249 return, result 208 250 END 209 251 ELSE: BEGIN … … 220 262 msg = 'eee : the directory' + iodirout + ' was not found.' 221 263 ras = report(msg) 222 STOP264 return, result 223 265 ENDIF 224 266 ; 225 267 ; build output filename 226 filename_out = 'erai_d2m_ 19890101_20091231_oafluxgrid.nc'268 filename_out = 'erai_d2m_' + string(yyyymmddb,format='(I8.8)') + '_' + string(yyyymmdde,format='(I8.8)') + '_oafluxgrid.nc' 227 269 fullfilename_out = iodirout + filename_out 228 270 ; in order to avoid unexpected overwritten 229 IF ( FILE_TEST(fullfilename_out) EQ 1) THEN BEGIN271 IF ((FILE_TEST(fullfilename_out) EQ 1) AND (project_overwrite EQ 0)) THEN BEGIN 230 272 msg = 'eee : the file ' + fullfilename_out + ' already exists.' 231 273 ras = report(msg) 232 STOP274 return, result 233 275 ENDIF 234 276 ; 235 277 initncdf, fullfilename 236 278 domdef 237 latin=reform(gphit (0,*))238 lonin=reform(glamt (*,0))239 print, 'lat grid ',min(latin),max(latin),latin (1)-latin(0)240 print, 'lon grid ',min(lonin),max(lonin),lonin (1)-lonin(0)279 latin=reform(gphit[0,*]) 280 lonin=reform(glamt[*,0]) 281 print, 'lat grid ',min(latin),max(latin),latin[1]-latin[0] 282 print, 'lon grid ',min(lonin),max(lonin),lonin[1]-lonin[0] 241 283 d2min=read_ncdf("d2",19881201,20101231,file=fullfilename,/nostr) 242 284 ; 243 285 jptin=jpt 244 tab=d2min (*,*,0)286 tab=d2min[*,*,0] 245 287 mskin=glamt*0.+1. 246 288 ; 247 289 initncdf, fullfilename_msk 248 290 domdef 249 latout=reform(gphit (0,*))250 lonout=reform(glamt (*,0))251 print, 'lat grid ',min(latout),max(latout),latout (1)-latout(0)252 print, 'lon grid ',min(lonout),max(lonout),lonout (1)-lonout(0)291 latout=reform(gphit[0,*]) 292 lonout=reform(glamt[*,0]) 293 print, 'lat grid ',min(latout),max(latout),latout[1]-latout[0] 294 print, 'lon grid ',min(lonout),max(lonout),lonout[1]-lonout[0] 253 295 mskout=read_ncdf("msk", file=fullfilename_msk,/nostr) 254 296 ; … … 258 300 for jt=0,jptin-1 do begin 259 301 ; ++ print, 'Interpolation jt=',jt,' / ',jptin-1 260 tab=reform(d2min (*,*,jt))261 d2mout (*,*,jt)=call_interp2d(tab,lonin,latin,mskin $302 tab=reform(d2min[*,*,jt]) 303 d2mout[*,*,jt]=call_interp2d(tab,lonin,latin,mskin $ 262 304 , lonout,latout,method='bilinear' $ 263 305 , OUTMASK_IND=mskout, SET_OUTMSKVAL=mskout) 264 d2mout (*,*,jt)=d2mout(*,*,jt)*mskout+(1.-mskout)*1.e20306 d2mout[*,*,jt]=d2mout[*,*,jt]*mskout+(1.-mskout)*1.e20 265 307 endfor 266 308 ; … … 269 311 time=timegen(7670, start=julday(1,1,1989,0), units='days') 270 312 jpt=n_elements(time) 271 cda0=string(jul2date(time (0)),format='(i8.8)')272 cda1=string(jul2date(time (jpt-1)),format='(i8.8)')313 cda0=string(jul2date(time[0]),format='(i8.8)') 314 cda1=string(jul2date(time[jpt-1]),format='(i8.8)') 273 315 time=time-julday(1,1,1950,00,00) 274 316 ; … … 290 332 @ncdf_quickwrite 291 333 ; 334 result = 0 335 return, result 336 ; 292 337 end -
trunk/src/interp_erai_msl.pro
r165 r166 324 324 @ncdf_quickwrite 325 325 ; 326 result = 0 327 return, result 328 ; 326 329 end -
trunk/src/interp_erai_t2m.pro
r165 r166 97 97 ; ==== 98 98 ; 99 ; scientific validation (st arnge look of data with ncview now)99 ; scientific validation (strange look of data with ncview now) 100 100 ; 101 101 ; check [yyyymmddb,yyyymmdde] validity … … 105 105 ; what happen if yyyymmdde > 20091231 : need to read an other ERA-I file 106 106 ; 107 ; add an example with only one month (ie 200 912)107 ; add an example with only one month (ie 200001) 108 108 ; 109 109 ; make it work : pb on loholt1 idl8 -
trunk/src/oaflux_mask_30n30s.pro
r163 r166 63 63 ; Following program use :func:`oaflux_mask_30n30s` output: 64 64 ; :ref:`TropFlux_19890101_20091231.pro`, 65 ; : ref:`interp_erai_dewt_1989_2009.pro`,65 ; :func:`interp_erai_dewt`, 66 66 ; :ref:`interp_erai_lwr_1989_2009.pro`, 67 67 ; :ref:`interp_erai_sst_1989_2009.pro`, … … 220 220 221 221 @ncdf_quickwrite 222 222 ; 223 223 result = 0 224 225 224 return, result 225 ; 226 226 END -
trunk/src/tropflux.sh
r165 r166 90 90 # Use : 91 91 # :func:`oaflux_mask_30n30s`, :func:`interp_erai_t2m`, 92 # :func:`interp_erai_msl`, etc.92 # :func:`interp_erai_msl`, :func:`interp_erai_dewt`, etc. 93 93 # 94 94 # Next step : +validation ++ comparison … … 116 116 # * add project_overwrite usage 117 117 # * handling error of inter_erai_msl (now function) 118 # * handling error of inter_erai_dewt (now function) 118 119 # 119 120 # - pinsard 20120306 … … 296 297 exit 297 298 ENDIF 298 ;interp_erai_dewt_1989_2009 299 result = interp_erai_dewt(${yyyymmddb}, ${yyyymmdde}) 300 IF result < 0 THEN BEGIN 301 msg = 'eee : pb after interp_erai_dewt' + string(result) 302 err = report(msg) 303 exit 304 ENDIF 299 305 ;interp_erai_lwr_1989_2009 300 306 result = interp_erai_msl(${yyyymmddb}, ${yyyymmdde})
Note: See TracChangeset
for help on using the changeset viewer.