Changeset 170
- Timestamp:
- 03/20/12 12:03:36 (12 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/docs/docs_dev/source/guides/data_content.rst
r167 r170 137 137 - :func:`interp_erai_dewt` 138 138 - :func:`interp_erai_lwr` 139 - : ref:`interp_erai_sst_1989_2009.pro`139 - :func:`interp_erai_sst` 140 140 - :func:`interp_erai_t2m` 141 141 - :ref:`interp_erai_ws_1989_2009.pro` -
trunk/docs/docs_dev/source/guides/generate_tropflux.rst
r167 r170 102 102 - :func:`interp_erai_dewt` 103 103 - :func:`interp_erai_lwr` 104 - : ref:`interp_erai_sst_1989_2009.pro`104 - :func:`interp_erai_sst` 105 105 - :func:`interp_erai_msl.pro` 106 106 - :func:`interp_erai_t2m` -
trunk/src/interp_erai_sst.pro
r166 r170 1 1 ;+ 2 2 ; 3 ; .. _interp_erai_sst_1989_2009.pro: 4 ; 5 ; ============================= 6 ; interp_erai_sst_1989_2009.pro 7 ; ============================= 3 ; 4 ; =================== 5 ; interp_erai_sst.pro 6 ; =================== 7 ; 8 ; .. function:: interp_erai_sst(yyyymmddb,yyyymmdde) 8 9 ; 9 10 ; DESCRIPTION … … 25 26 ; Interpolated sst 26 27 ; is written in 27 ; :file:`${PROJECT_OD}/erai_sst_ 19890101_20091231_oafluxgrid.nc`28 ; :file:`${PROJECT_OD}/erai_sst_{yyyymmdd}_{yyyymmdd}_oafluxgrid.nc` 28 29 ; if this file not already exists. 29 30 ; 30 31 ; This output file 31 ; :file:`${PROJECT_OD}/erai_sst_ 19890101_20091231_oafluxgrid.nc`32 ; :file:`${PROJECT_OD}/erai_sst_{yyyymmdd}_{yyyymmdd}_oafluxgrid.nc` 32 33 ; must be processed after by 33 34 ; :ref:`sst_correction_ncdf.pro`. … … 41 42 ; .. graphviz:: 42 43 ; 43 ; digraph interp_erai_sst _1989_2009{44 ; digraph interp_erai_sst { 44 45 ; 45 46 ; file_in [shape=ellipse,fontname=Courier,label="${PROJECT_ID}/20c3m_erai_sstk_TROP_1989_2009.nc"]; 46 47 ; mask [shape=ellipse,fontname=Courier,label="${PROJECT_ID}/mask_oaflux_30N30S.nc"]; 47 ; file_out [shape=ellipse,fontname=Courier,label="${PROJECT_OD}/erai_sst_ 19890101_20091231_oafluxgrid.nc"];48 ; 49 ; interp_erai_sst _1989_2009[shape=box,48 ; file_out [shape=ellipse,fontname=Courier,label="${PROJECT_OD}/erai_sst_{yyyymmdd}_{yyyymmdd}_oafluxgrid.nc"]; 49 ; 50 ; interp_erai_sst [shape=box, 50 51 ; fontname=Courier, 51 52 ; color=blue, 52 ; URL="http://forge.ipsl.jussieu.fr/tropflux/browser/trunk/src/interp_erai_sst _1989_2009.pro",53 ; label="${PROJECT}/src/interp_erai_sst _1989_2009.pro"];54 ; 55 ; {file_in mask} -> {interp_erai_sst _1989_2009} -> {file_out}53 ; URL="http://forge.ipsl.jussieu.fr/tropflux/browser/trunk/src/interp_erai_sst.pro", 54 ; label="${PROJECT}/src/interp_erai_sst.pro"]; 55 ; 56 ; {file_in mask} -> {interp_erai_sst} -> {file_out} 56 57 ; 57 58 ; } … … 61 62 ; 62 63 ; :ref:`interpolate_data` 64 ; 65 ; Used by :ref:`tropflux.sh` 63 66 ; 64 67 ; :ref:`project_profile.sh` … … 81 84 ; 82 85 ; IDL> .compile file_interp 83 ; IDL> interp_erai_sst_1989_2009 86 ; IDL> yyyymmddb = 19890101 87 ; IDL> yyyymmdde = 20091231 88 ; IDL> result = interp_erai_sst(yyyymmddb, yyymmdde) 89 ; IDL> print, result 90 ; 84 91 ; 85 92 ; TODO … … 94 101 ; use real output of :ref:`compute_erai_daily_region_2d.sh`. 95 102 ; 103 ; scientific validation (strange look of data with ncview now) 104 ; 105 ; check [yyyymmddb,yyyymmdde] validity 106 ; 107 ; check if [yyyymmddb,yyyymmdde] is included in ERA-I file 108 ; 109 ; what happen if yyyymmdde > 20091231 : need to read an other ERA-I file 110 ; 111 ; add an example with only one month (ie 200001) 112 ; 96 113 ; KNOWN ISSUES 97 114 ; ============ … … 105 122 ; $Id$ 106 123 ; 107 ; $URL: svn+ssh://pinsard@forge.ipsl.jussieu.fr/ipsl/forge/projets/tropflux/svn/trunk/src/interp_erai_sst_1989_2009.pro $ 124 ; $URL: svn+ssh://pinsard@forge.ipsl.jussieu.fr/ipsl/forge/projets/tropflux/svn/trunk/src/interp_erai_sst.pro $ 125 ; 126 ; - fplod 20120320 127 ; 128 ; * taking project_overwite into account 129 ; * try to add compile_opt seems to be incompatible with ncdf_quickwrite 130 ; * pro -> function 108 131 ; 109 132 ; - pinsard 2011-08-23T09:09:16Z loholt1.ipsl.polytechnique.fr (Linux) … … 136 159 ; 137 160 ;- 138 pro interp_erai_sst_1989_2009 161 function interp_erai_sst $ 162 , yyyymmddb $ 163 , yyyymmdde 164 ; 165 ;++compile_opt idl2, strictarrsubs, logical_predicate 139 166 ; 140 167 @cm_4cal … … 144 171 @cm_project 145 172 ; 173 ; Return to caller if errors 174 ON_ERROR, 2 175 ; 176 result = -1 177 ; 178 usage = 'result = interp_erai_lwr(yyyymmddb, yyyymmdde) 179 nparam = N_PARAMS() 180 IF (nparam NE 2) THEN BEGIN 181 ras = report(['Incorrect number of arguments.' $ 182 + '!C' $ 183 + 'Usage : ' + usage]) 184 return, result 185 ENDIF 186 ; 146 187 ; check for input directory 147 188 ; … … 151 192 msg = 'eee : ${PROJECT_ID} is not defined' 152 193 ras = report(msg) 153 STOP194 return, result 154 195 END 155 196 ELSE: BEGIN … … 165 206 msg = 'eee : the directory' + iodirin + ' is not accessible.' 166 207 ras = report(msg) 167 STOP208 return, result 168 209 ENDIF 169 210 ; … … 178 219 msg = 'eee : the file ' + fullfilename_msk + ' was not found.' 179 220 ras = report(msg) 180 STOP221 return, result 181 222 ENDIF 182 223 ; … … 191 232 msg = 'eee : the file ' + fullfilename + ' was not found.' 192 233 ras = report(msg) 193 STOP234 return, result 194 235 ENDIF 195 236 ; … … 199 240 msg = 'eee : ${PROJECT_OD} is not defined' 200 241 ras = report(msg) 201 STOP242 return, result 202 243 END 203 244 ELSE: BEGIN … … 214 255 msg = 'eee : the directory' + iodirout + ' was not found.' 215 256 ras = report(msg) 216 STOP257 return, result 217 258 ENDIF 218 259 ; 219 260 ; build output filename 220 filename_out = 'erai_sst_ 19890101_20091231_oafluxgrid.nc'261 filename_out = 'erai_sst_' + string(yyyymmddb,format='(I8.8)') + '_' + string(yyyymmdde,format='(I8.8)') + '_oafluxgrid.nc' 221 262 fullfilename_out = iodirout + filename_out 222 263 ; in order to avoid unexpected overwritten 223 IF ( FILE_TEST(fullfilename_out) EQ 1) THEN BEGIN264 IF ((FILE_TEST(fullfilename_out) EQ 1) AND (project_overwrite EQ 0)) THEN BEGIN 224 265 msg = 'eee : the file ' + fullfilename_out + ' already exists.' 225 266 ras = report(msg) 226 STOP267 return, result 227 268 ENDIF 228 269 ; 229 270 initncdf, fullfilename 230 271 domdef 231 latin=reform(gphit (0,*))232 lonin=reform(glamt (*,0))233 print, 'lat grid ',min(latin),max(latin),latin (1)-latin(0)234 print, 'lon grid ',min(lonin),max(lonin),lonin (1)-lonin(0)272 latin=reform(gphit[0,*]) 273 lonin=reform(glamt[*,0]) 274 print, 'lat grid ',min(latin),max(latin),latin[1]-latin[0] 275 print, 'lon grid ',min(lonin),max(lonin),lonin[1]-lonin[0] 235 276 sstkin=read_ncdf("sstk",19871201,20100930,file=fullfilename,/nostr) 236 277 ; 237 278 timein=time 238 279 jptin=jpt 239 tab=sstkin (*,*,0)280 tab=sstkin[*,*,0] 240 281 mskin=glamt*0.+1. 241 282 ind=where((tab eq 1.e9) or finite(tab,/nan)) 242 mskin (ind)=0.283 mskin[ind]=0. 243 284 ; 244 285 initncdf, fullfilename_msk 245 286 domdef 246 latout=reform(gphit (0,*))247 lonout=reform(glamt (*,0))248 print, 'lat grid ',min(latout),max(latout),latout (1)-latout(0)249 print, 'lon grid ',min(lonout),max(lonout),lonout (1)-lonout(0)287 latout=reform(gphit[0,*]) 288 lonout=reform(glamt[*,0]) 289 print, 'lat grid ',min(latout),max(latout),latout[1]-latout[0] 290 print, 'lon grid ',min(lonout),max(lonout),lonout[1]-lonout[0] 250 291 mskout=read_ncdf("msk", file=fullfilename_msk,/nostr) 251 292 ; … … 255 296 for jt=0,jptin-1 do begin 256 297 ; ++print, 'Interpolation jt=',jt,' / ',jptin-1 257 tab=reform(sstkin (*,*,jt))258 sstkout (*,*,jt)=call_interp2d(tab,lonin,latin,mskin $298 tab=reform(sstkin[*,*,jt]) 299 sstkout[*,*,jt]=call_interp2d(tab,lonin,latin,mskin $ 259 300 , lonout,latout,method='bilinear' $ 260 301 , OUTMASK_IND=mskout, SET_OUTMSKVAL=mskout) 261 sstkout (*,*,jt)=sstkout(*,*,jt)*mskout+(1.-mskout)*1.e20302 sstkout[*,*,jt]=sstkout[*,*,jt]*mskout+(1.-mskout)*1.e20 262 303 endfor 263 304 ; … … 265 306 time=timegen(7670, start=julday(1,1,1989,0), units='days') 266 307 jpt=n_elements(time) 267 cda0=string(jul2date(time (0)),format='(i8.8)')268 cda1=string(jul2date(time (jpt-1)),format='(i8.8)')308 cda0=string(jul2date(time[0]),format='(i8.8)') 309 cda1=string(jul2date(time[jpt-1]),format='(i8.8)') 269 310 timein=timein-julday(1,1,1950,00,00) 270 311 ; … … 286 327 @ncdf_quickwrite 287 328 ; 329 result = 0 330 return, result 331 ; 332 288 333 end -
trunk/src/oaflux_mask_30n30s.pro
r167 r170 65 65 ; :func:`interp_erai_dewt`, 66 66 ; :func:`interp_erai_lwr`, 67 ; : ref:`interp_erai_sst_1989_2009.pro`,67 ; :func:`interp_erai_sst`, 68 68 ; :func:`interp_erai_t2m`, 69 69 ; :ref:`interp_erai_ws_1989_2009.pro`, -
trunk/src/sst_correction_ncdf.pro
r100 r170 13 13 ; ++ 14 14 ; has been produced by 15 ; : ref:`interp_erai_sst_1989_2009.pro`.15 ; :func:`interp_erai_sst`. 16 16 ; 17 17 ; Corrected sst on OAFLUX grid … … 61 61 ; :ref:`mooring_corrections` 62 62 ; 63 ; : ref:`interp_erai_sst_1989_2009.pro`63 ; :func:`interp_erai_sst` 64 64 ; 65 65 ; :func:`initncdf <saxo:initncdf>` -
trunk/src/tropflux.sh
r167 r170 91 91 # :func:`oaflux_mask_30n30s`, :func:`interp_erai_t2m`, 92 92 # :func:`interp_erai_msl`, :func:`interp_erai_dewt`, :func:`interp_erai_lwr`, 93 # etc.93 # :func:`interp_erai_sst`, etc. 94 94 # 95 95 # Next step : +validation ++ comparison … … 112 112 # 113 113 # $URL$ 114 # 115 # - pinsard 20120320 116 # 117 # * handling error of inter_erai_sst (now function) 114 118 # 115 119 # - pinsard 20120319 … … 317 321 exit 318 322 ENDIF 319 ;interp_erai_sst_1989_2009 323 result = interp_erai_sst(${yyyymmddb}, ${yyyymmdde}) 324 IF result < 0 THEN BEGIN 325 msg = 'eee : pb after interp_erai_t2m' + string(result) 326 err = report(msg) 327 exit 328 ENDIF 320 329 result = interp_erai_t2m(${yyyymmddb}, ${yyyymmdde}) 321 330 IF result < 0 THEN BEGIN
Note: See TracChangeset
for help on using the changeset viewer.