[6] | 1 | ;+ |
---|
| 2 | ; |
---|
| 3 | ; |
---|
[172] | 4 | ; ================== |
---|
| 5 | ; interp_erai_ws.pro |
---|
| 6 | ; ================== |
---|
[9] | 7 | ; |
---|
[172] | 8 | ; .. function:: interp_erai_ws(yyyymmddb,yyyymmdde) |
---|
| 9 | ; |
---|
[67] | 10 | ; DESCRIPTION |
---|
| 11 | ; =========== |
---|
| 12 | ; |
---|
[66] | 13 | ; Interpolation of u10 and v10 from ERA-I grid to OAFLUX grid |
---|
| 14 | ; |
---|
[92] | 15 | ; :file:`${PROJECT_ID}/20c3m_erai_u10_TROP_1989_2009.nc` |
---|
| 16 | ; containing |
---|
| 17 | ; u10 from ERA-I |
---|
[93] | 18 | ; has been produced by |
---|
[92] | 19 | ; :ref:`compute_erai_daily_region_2d.sh`. |
---|
[66] | 20 | ; |
---|
[92] | 21 | ; :file:`${PROJECT_ID}/20c3m_erai_v10_TROP_1989_2009.nc` |
---|
| 22 | ; containing |
---|
| 23 | ; v10 from ERA-I |
---|
[93] | 24 | ; has been produced by |
---|
[92] | 25 | ; :ref:`compute_erai_daily_region_2d.sh`. |
---|
[66] | 26 | ; |
---|
[92] | 27 | ; :file:`${PROJECT_ID}/mask_oaflux_30N30S.nc` |
---|
| 28 | ; containing OAFLUX grid |
---|
[93] | 29 | ; has been produced by |
---|
[172] | 30 | ; :func:`oaflux_mask_30n30s`. |
---|
[66] | 31 | ; |
---|
[92] | 32 | ; Interpolated u10 and v10 are written in |
---|
| 33 | ; :file:`${PROJECT_OD}/erai_ws_19890101_20091231_oafluxgrid.nc` |
---|
| 34 | ; if this file not already exists. |
---|
[66] | 35 | ; |
---|
[92] | 36 | ; This output file |
---|
| 37 | ; :file:`${PROJECT_OD}/erai_ws_19890101_20091231_oafluxgrid.nc` |
---|
| 38 | ; must be processed after by |
---|
[175] | 39 | ; :func:`ws_correction_ncdf`. |
---|
[66] | 40 | ; |
---|
[92] | 41 | ; .. only:: man |
---|
| 42 | ; |
---|
| 43 | ; Figure is visible on PDF and HTML documents only. |
---|
| 44 | ; |
---|
| 45 | ; .. only:: html or latex |
---|
| 46 | ; |
---|
[9] | 47 | ; .. graphviz:: |
---|
| 48 | ; |
---|
[172] | 49 | ; digraph interp_erai_ws { |
---|
[71] | 50 | ; |
---|
[66] | 51 | ; file_u10 [shape=ellipse,fontname=Courier,label="${PROJECT_ID}/20c3m_erai_u10_TROP_1989_2009.nc"]; |
---|
| 52 | ; file_v10 [shape=ellipse,fontname=Courier,label="${PROJECT_ID}/20c3m_erai_v10_TROP_1989_2009.nc"]; |
---|
[50] | 53 | ; mask [shape=ellipse,fontname=Courier,label="${PROJECT_ID}/mask_oaflux_30N30S.nc"]; |
---|
[71] | 54 | ; file_out [shape=ellipse,fontname=Courier,label="${PROJECT_OD}/erai_ws_19890101_20091231_oafluxgrid.nc"]; |
---|
[9] | 55 | ; |
---|
[172] | 56 | ; interp_erai_ws [shape=box, |
---|
[9] | 57 | ; fontname=Courier, |
---|
| 58 | ; color=blue, |
---|
[172] | 59 | ; URL="http://forge.ipsl.jussieu.fr/tropflux/browser/trunk/src/interp_erai_ws.pro", |
---|
| 60 | ; label="${PROJECT}/src/interp_erai_ws.pro"]; |
---|
[9] | 61 | ; |
---|
[172] | 62 | ; {file_u10 file_v10 mask} -> {interp_erai_ws} -> {file_out} |
---|
[9] | 63 | ; |
---|
[100] | 64 | ; } |
---|
[9] | 65 | ; |
---|
[6] | 66 | ; SEE ALSO |
---|
| 67 | ; ======== |
---|
| 68 | ; |
---|
[92] | 69 | ; :ref:`interpolate_data` |
---|
| 70 | ; |
---|
[50] | 71 | ; :ref:`project_profile.sh` |
---|
[19] | 72 | ; |
---|
[172] | 73 | ; Used by :ref:`tropflux.sh` |
---|
| 74 | ; |
---|
[20] | 75 | ; :func:`report <saxo:report>` |
---|
| 76 | ; :func:`isadirectory <saxo:isadirectory>` |
---|
| 77 | ; :func:`isafile <saxo:isafile>` |
---|
| 78 | ; :func:`initncdf <saxo:initncdf>` |
---|
| 79 | ; :func:`read_ncdf <saxo:read_ncdf>` |
---|
| 80 | ; :func:`domdef <saxo:domdef>` |
---|
| 81 | ; :func:`call_interp2d <saxo:call_interp2d>` |
---|
| 82 | ; :func:`ncdf_quickwrite <saxo:ncdf_quickwrite>` |
---|
| 83 | ; |
---|
[175] | 84 | ; :func:`ws_correction_ncdf` |
---|
[66] | 85 | ; |
---|
[6] | 86 | ; EXAMPLES |
---|
| 87 | ; ======== |
---|
| 88 | ; |
---|
| 89 | ; :: |
---|
| 90 | ; |
---|
[66] | 91 | ; IDL> .compile file_interp |
---|
[172] | 92 | ; IDL> yyyymmddb = 20000101L |
---|
| 93 | ; IDL> yyyymmdde = 20001231L |
---|
| 94 | ; IDL> result = interp_erai_ws(yyyymmddb, yyyymmdde) |
---|
| 95 | ; IDL> print, result |
---|
[6] | 96 | ; |
---|
| 97 | ; TODO |
---|
| 98 | ; ==== |
---|
| 99 | ; |
---|
[172] | 100 | ; compare time between u10 and v10 after reading |
---|
| 101 | ; |
---|
[93] | 102 | ; make it work : pb on loholt1 idl8 |
---|
[6] | 103 | ; |
---|
[93] | 104 | ; reach end but bad values et nb timestep 4581:: |
---|
[66] | 105 | ; |
---|
[97] | 106 | ; ncks -v u10 -d time,0,1 -d latitude,0,1 -d longitude,0,1 /homedata/pinsard/tropflux_d/erai_ws_19890101_20091231_oafluxgrid.nc |
---|
[93] | 107 | ; latitude[0]=-29.5 degrees_north |
---|
| 108 | ; latitude[1]=-28.5 degrees_north |
---|
[97] | 109 | ; |
---|
[93] | 110 | ; longitude[0]=30.5 degrees_east |
---|
| 111 | ; longitude[1]=31.5 degrees_east |
---|
[97] | 112 | ; |
---|
[93] | 113 | ; time[0] latitude[0]=-29.5 longitude[0]=30.5 u10[0]=9.96921e+36 m/s |
---|
| 114 | ; time[0] latitude[0]=-29.5 longitude[1]=31.5 u10[1]=9.96921e+36 m/s |
---|
| 115 | ; time[0] latitude[1]=-28.5 longitude[0]=30.5 u10[350]=9.96921e+36 m/s |
---|
| 116 | ; time[0] latitude[1]=-28.5 longitude[1]=31.5 u10[351]=9.96921e+36 m/s |
---|
| 117 | ; time[1] latitude[0]=-29.5 longitude[0]=30.5 u10[21000]=9.96921e+36 m/s |
---|
| 118 | ; time[1] latitude[0]=-29.5 longitude[1]=31.5 u10[21001]=9.96921e+36 m/s |
---|
| 119 | ; time[1] latitude[1]=-28.5 longitude[0]=30.5 u10[21350]=9.96921e+36 m/s |
---|
| 120 | ; time[1] latitude[1]=-28.5 longitude[1]=31.5 u10[21351]=9.96921e+36 m/s |
---|
| 121 | ; |
---|
[73] | 122 | ; make it work : pb on loholt1 idl6:: |
---|
| 123 | ; |
---|
[92] | 124 | ; Writing fields: |
---|
[73] | 125 | ; u10[longitude,latitude,time]=u10out:u10_attr; v10[longitude,latitude,time]=v10out:v10_attr; longitude[]=xlon:lon_attr; latitude[]=ylat:lat_attr; tt[*time]=tt:time_attr @ globattr |
---|
[172] | 126 | ; % NCDF_VARPUT: Operation Failed, bad file (6) or variable [0] id ? |
---|
[73] | 127 | ; (NC_ERROR=-31) |
---|
| 128 | ; % Stop encountered: INTERP_ERAI_WS_1989_2009 1 |
---|
| 129 | ; |
---|
[70] | 130 | ; check OUTMASK_IND and SET_OUTMSKVAL added to call_interp2d call |
---|
| 131 | ; |
---|
| 132 | ; use real output of :ref:`compute_erai_daily_region_2d.sh`. |
---|
| 133 | ; |
---|
[6] | 134 | ; coding rules |
---|
| 135 | ; |
---|
[172] | 136 | ; check [yyyymmddb,yyyymmdde] validity |
---|
| 137 | ; |
---|
| 138 | ; check if [yyyymmddb,yyyymmdde] is included in ERA-I file |
---|
| 139 | ; |
---|
| 140 | ; what happen if yyyymmdde > 20091231 : need to read an other ERA-I file |
---|
| 141 | ; |
---|
[19] | 142 | ; KNOWN ISSUES |
---|
| 143 | ; ============ |
---|
| 144 | ; |
---|
| 145 | ; test of existence of fullfilename_msk not very efficient because |
---|
| 146 | ; MUST_EXIST keyword of :func:`isafile <saxo:isafile>` not yet implemented |
---|
| 147 | ; |
---|
[6] | 148 | ; EVOLUTIONS |
---|
| 149 | ; ========== |
---|
| 150 | ; |
---|
[66] | 151 | ; $Id$ |
---|
| 152 | ; |
---|
[172] | 153 | ; $URL: svn+ssh://pinsard@forge.ipsl.jussieu.fr/ipsl/forge/projets/tropflux/svn/trunk/src/interp_erai_ws.pro $ |
---|
[66] | 154 | ; |
---|
[172] | 155 | ; - fplod 20120320 |
---|
| 156 | ; |
---|
| 157 | ; * taking project_overwite into account |
---|
| 158 | ; * try to add compile_opt seems to be incompatible with ncdf_quickwrite |
---|
| 159 | ; * pro -> function |
---|
| 160 | ; * hard coded st and en replaced by yyyymmddb and yyyymmdde parameters |
---|
| 161 | ; * start to homogenize time handling regarding :func:`interp_erai_t2m` |
---|
| 162 | ; |
---|
[98] | 163 | ; - fplod 20110830T135212Z cratos (Linux) |
---|
| 164 | ; |
---|
| 165 | ; * replace tt by time |
---|
| 166 | ; |
---|
[92] | 167 | ; - pinsard 2011-08-23T09:09:16Z loholt1.ipsl.polytechnique.fr (Linux) |
---|
| 168 | ; |
---|
| 169 | ; * retry on loholt1 with idl8 and idl6 |
---|
| 170 | ; |
---|
[70] | 171 | ; - fplod 20110808T094156Z cratos (Linux) |
---|
| 172 | ; |
---|
| 173 | ; * add OUTMASK_IND and SET_OUTMSKVAL to call_interp2d call |
---|
| 174 | ; |
---|
[66] | 175 | ; - pinsard 2011-07-05T07:33:36Z loholt1.ipsl.polytechnique.fr (Linux) |
---|
| 176 | ; |
---|
| 177 | ; * usage of $PROJECT_ID and $PROJECT_OD |
---|
| 178 | ; |
---|
[19] | 179 | ; - fplod 20101217T140745Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
| 180 | ; |
---|
| 181 | ; * remove hard coded directory for mask_oaflux_30N30S.nc |
---|
| 182 | ; |
---|
[9] | 183 | ; - fplod 20101215T112657Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
| 184 | ; |
---|
| 185 | ; * add graph in header |
---|
| 186 | ; |
---|
[6] | 187 | ; - fplod 20101214T093615Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
| 188 | ; |
---|
| 189 | ; * minimal header |
---|
| 190 | ; |
---|
| 191 | ; - pbk 2008 |
---|
| 192 | ; |
---|
| 193 | ; * creation |
---|
| 194 | ; |
---|
| 195 | ;- |
---|
[172] | 196 | function interp_erai_ws $ |
---|
| 197 | , yyyymmddb $ |
---|
| 198 | , yyyymmdde |
---|
[66] | 199 | ; |
---|
[172] | 200 | ;++compile_opt idl2, strictarrsubs, logical_predicate |
---|
| 201 | ; |
---|
| 202 | ; Return to caller if errors |
---|
| 203 | ON_ERROR, 2 |
---|
| 204 | ; |
---|
| 205 | result = -1 |
---|
| 206 | ; |
---|
| 207 | usage = 'result = interp_erai_lwr(yyyymmddb, yyyymmdde)' |
---|
| 208 | nparam = N_PARAMS() |
---|
| 209 | IF (nparam NE 2) THEN BEGIN |
---|
| 210 | ras = report(['Incorrect number of arguments.' $ |
---|
| 211 | + '!C' $ |
---|
| 212 | + 'Usage : ' + usage]) |
---|
| 213 | return, result |
---|
| 214 | ENDIF |
---|
| 215 | ; |
---|
[66] | 216 | @cm_4cal |
---|
| 217 | @cm_4data |
---|
| 218 | @cm_4mesh |
---|
| 219 | @cm_4data |
---|
[50] | 220 | @cm_project |
---|
[19] | 221 | ; |
---|
[20] | 222 | ; check for input directory |
---|
[19] | 223 | ; |
---|
[50] | 224 | ; test if ${PROJECT_ID} defined |
---|
| 225 | CASE project_id_env OF |
---|
[19] | 226 | '' : BEGIN |
---|
[50] | 227 | msg = 'eee : ${PROJECT_ID} is not defined' |
---|
[19] | 228 | ras = report(msg) |
---|
[172] | 229 | return, result |
---|
[19] | 230 | END |
---|
| 231 | ELSE: BEGIN |
---|
[50] | 232 | msg = 'iii : ${PROJECT_ID} is ' + project_id_env |
---|
[19] | 233 | ras = report(msg) |
---|
| 234 | END |
---|
| 235 | ENDCASE |
---|
| 236 | ; |
---|
[50] | 237 | iodirin = isadirectory(project_id_env) |
---|
[19] | 238 | ; |
---|
[50] | 239 | ; existence and protection of ${PROJECT_ID} |
---|
[19] | 240 | IF (FILE_TEST(iodirin, /DIRECTORY, /EXECUTABLE, /READ) EQ 0) THEN BEGIN |
---|
| 241 | msg = 'eee : the directory' + iodirin + ' is not accessible.' |
---|
| 242 | ras = report(msg) |
---|
[172] | 243 | return, result |
---|
[19] | 244 | ENDIF |
---|
| 245 | ; |
---|
| 246 | ; build mask filename |
---|
| 247 | filename_msk='mask_oaflux_30N30S.nc' |
---|
| 248 | ; |
---|
| 249 | ; check if this file exists |
---|
[92] | 250 | msg='iii : looking for ' + filename_msk |
---|
| 251 | ras = report(msg) |
---|
[19] | 252 | fullfilename_msk = isafile(iodirin + filename_msk, NEW=0, /MUST_EXIST) |
---|
| 253 | IF fullfilename_msk[0] EQ '' THEN BEGIN |
---|
| 254 | msg = 'eee : the file ' + fullfilename_msk + ' was not found.' |
---|
| 255 | ras = report(msg) |
---|
[172] | 256 | return, result |
---|
[19] | 257 | ENDIF |
---|
[66] | 258 | ; |
---|
| 259 | ; build u10 data filename |
---|
| 260 | filename='20c3m_erai_u10_TROP_1989_2009.nc' |
---|
| 261 | ; |
---|
| 262 | ; check if this file exists |
---|
[92] | 263 | msg='iii : looking for ' + filename |
---|
| 264 | ras = report(msg) |
---|
[66] | 265 | fullfilename = isafile(iodirin + filename, NEW=0, /MUST_EXIST) |
---|
| 266 | IF fullfilename[0] EQ '' THEN BEGIN |
---|
| 267 | msg = 'eee : the file ' + fullfilename + ' was not found.' |
---|
| 268 | ras = report(msg) |
---|
[172] | 269 | return, result |
---|
[66] | 270 | ENDIF |
---|
| 271 | ; |
---|
| 272 | ; test if ${PROJECT_OD} defined |
---|
| 273 | CASE project_od_env OF |
---|
| 274 | '' : BEGIN |
---|
| 275 | msg = 'eee : ${PROJECT_OD} is not defined' |
---|
| 276 | ras = report(msg) |
---|
[172] | 277 | return, result |
---|
[66] | 278 | END |
---|
| 279 | ELSE: BEGIN |
---|
| 280 | msg = 'iii : ${PROJECT_OD} is ' + project_od_env |
---|
| 281 | ras = report(msg) |
---|
| 282 | END |
---|
| 283 | ENDCASE |
---|
| 284 | ; |
---|
| 285 | ; check if output data will be possible |
---|
| 286 | iodirout = isadirectory(project_od_env) |
---|
| 287 | ; |
---|
| 288 | ; existence and protection |
---|
| 289 | IF (FILE_TEST(iodirout, /DIRECTORY, /WRITE) EQ 0) THEN BEGIN |
---|
| 290 | msg = 'eee : the directory' + iodirout + ' was not found.' |
---|
| 291 | ras = report(msg) |
---|
[172] | 292 | return, result |
---|
[66] | 293 | ENDIF |
---|
| 294 | ; |
---|
| 295 | ; build output filename |
---|
[172] | 296 | filename_out = 'erai_ws_' + string(yyyymmddb,format='(I8.8)') + '_' + string(yyyymmdde,format='(I8.8)') + '_oafluxgrid.nc' |
---|
[66] | 297 | fullfilename_out = iodirout + filename_out |
---|
| 298 | ; in order to avoid unexpected overwritten |
---|
[172] | 299 | IF ((FILE_TEST(fullfilename_out) EQ 1) AND (project_overwrite EQ 0)) THEN BEGIN |
---|
[66] | 300 | msg = 'eee : the file ' + fullfilename_out + ' already exists.' |
---|
| 301 | ras = report(msg) |
---|
[172] | 302 | return, result |
---|
[66] | 303 | ENDIF |
---|
| 304 | ; |
---|
| 305 | initncdf, fullfilename |
---|
[172] | 306 | u10in=read_ncdf("u10", yyyymmddb - .5d, yyyymmdde, file=fullfilename,/nostr) |
---|
[97] | 307 | ; |
---|
[175] | 308 | timein=24.d*(time-julday(1,1,1957,0,0,0)) |
---|
[172] | 309 | jpt=n_elements(timein) |
---|
| 310 | da=jul2date(time[0]) |
---|
| 311 | cda0=string(da,format='(i8.8)') |
---|
[175] | 312 | da=jul2date(time[jpt-1]) |
---|
[172] | 313 | cda1=string(da,format='(i8.8)') |
---|
| 314 | print, 'u10 first date ', cda0 |
---|
| 315 | print, 'u10 last date ' , cda1 |
---|
| 316 | ; |
---|
[66] | 317 | ; build v10 data filename |
---|
| 318 | filename='20c3m_erai_v10_TROP_1989_2009.nc' |
---|
| 319 | ; |
---|
| 320 | ; check if this file exists |
---|
[92] | 321 | msg='iii : looking for ' + filename |
---|
| 322 | ras = report(msg) |
---|
[66] | 323 | fullfilename = isafile(iodirin + filename, NEW=0, /MUST_EXIST) |
---|
| 324 | IF fullfilename[0] EQ '' THEN BEGIN |
---|
| 325 | msg = 'eee : the file ' + fullfilename + ' was not found.' |
---|
| 326 | ras = report(msg) |
---|
[172] | 327 | return, result |
---|
[66] | 328 | ENDIF |
---|
| 329 | initncdf, fullfilename |
---|
[172] | 330 | v10in=read_ncdf("v10", yyyymmddb - .5d, yyyymmdde, file=fullfilename,/nostr) |
---|
[97] | 331 | ; |
---|
[66] | 332 | initncdf, fullfilename |
---|
[5] | 333 | domdef |
---|
[172] | 334 | latin=reform(gphit[0,*]) |
---|
| 335 | lonin=reform(glamt[*,0]) |
---|
| 336 | print, 'lat grid ',min(latin),max(latin),latin[1]-latin[0] |
---|
| 337 | print, 'lon grid ',min(lonin),max(lonin),lonin[1]-lonin[0] |
---|
[97] | 338 | ; |
---|
[172] | 339 | timein=24.d*(time-julday(1,1,1957,0,0,0)) |
---|
| 340 | jptin=n_elements(timein) |
---|
| 341 | da=jul2date(time[0]) |
---|
| 342 | cda0=string(da,format='(i8.8)') |
---|
| 343 | da=jul2date(time[jpt-1]) |
---|
| 344 | cda1=string(da,format='(i8.8)') |
---|
| 345 | print, 'v10 first date ', cda0 |
---|
| 346 | print, 'v10 last date ' , cda1 |
---|
| 347 | help, v10in |
---|
| 348 | ; |
---|
| 349 | tab=u10in[*,*,0] |
---|
[5] | 350 | mskin=glamt*0.+1. |
---|
[97] | 351 | ; |
---|
[19] | 352 | initncdf, fullfilename_msk |
---|
[5] | 353 | domdef |
---|
[172] | 354 | latout=reform(gphit[0,*]) |
---|
| 355 | lonout=reform(glamt[*,0]) |
---|
| 356 | print, 'lat grid ',min(latout),max(latout),latout[1]-latout[0] |
---|
| 357 | print, 'lon grid ',min(lonout),max(lonout),lonout[1]-lonout[0] |
---|
[19] | 358 | mskout=read_ncdf("msk", file=fullfilename_msk,/nostr) |
---|
[97] | 359 | ; |
---|
[5] | 360 | help, u10in, v10in,lonin,latin,mskin,lonout,latout,mskout |
---|
[97] | 361 | ; |
---|
[5] | 362 | u10out=fltarr(jpi,jpj,jptin) |
---|
| 363 | v10out=fltarr(jpi,jpj,jptin) |
---|
[97] | 364 | ; |
---|
[5] | 365 | for jt=0,jptin-1 do begin |
---|
[92] | 366 | ; ++print, 'Interpolation jt=',jt,' / ',jptin-1 |
---|
[172] | 367 | tab=reform(u10in[*,*,jt]) |
---|
| 368 | u10out[*,*,jt]=call_interp2d(tab,lonin,latin,mskin $ |
---|
[70] | 369 | , lonout,latout,method='bilinear' $ |
---|
| 370 | , OUTMASK_IND=mskout, SET_OUTMSKVAL=mskout) |
---|
[172] | 371 | u10out[*,*,jt]=u10out[*,*,jt]*mskout+(1.-mskout)*1.e20 |
---|
[97] | 372 | ; |
---|
[172] | 373 | tab=reform(v10in[*,*,jt]) |
---|
| 374 | v10out[*,*,jt]=call_interp2d(tab,lonin,latin,mskin $ |
---|
[70] | 375 | , lonout,latout,method='bilinear' $ |
---|
| 376 | , OUTMASK_IND=mskout, SET_OUTMSKVAL=mskout) |
---|
[172] | 377 | v10out[*,*,jt]=v10out[*,*,jt]*mskout+(1.-mskout)*1.e20 |
---|
[97] | 378 | ; |
---|
[5] | 379 | endfor |
---|
[97] | 380 | ; |
---|
[172] | 381 | xlon=reform(glamt[*,0] ) |
---|
| 382 | ylat=reform(gphit[0,*]) |
---|
[97] | 383 | ; |
---|
[19] | 384 | initncdf, fullfilename_msk |
---|
[5] | 385 | valmask=1.e20 |
---|
[97] | 386 | ; |
---|
[5] | 387 | ylat=latout |
---|
| 388 | xlon=lonout |
---|
[66] | 389 | ncfile='!' + fullfilename_out |
---|
[5] | 390 | lon_attr={units:'degrees_east',long_name:'Longitude'} |
---|
| 391 | lat_attr={units:'degrees_north',long_name:'Latitude'} |
---|
[100] | 392 | time_attr={units:'days since 1950-01-01 00:00:00',long_name:'Time axis',time_origin:'1950-JAN-01 00:00:00'} |
---|
| 393 | globattr={source:'Tropical ocean winds obtained from ERA Interim',timerange:cda0+' - '+cda1} |
---|
[5] | 394 | u10_attr={units:'m/s',missing_value:valmask,long_name:'10 metre u wind component',short_name:'u10',axis:'TYX'} |
---|
| 395 | v10_attr={units:'m/s',missing_value:valmask,long_name:'10 metre v wind component',short_name:'v10',axis:'TYX'} |
---|
[97] | 396 | ; |
---|
[172] | 397 | help, u10out |
---|
| 398 | help, v10out |
---|
| 399 | help, timein |
---|
[97] | 400 | ; |
---|
[172] | 401 | ncfields = 'u10[longitude,latitude,*time]=u10out:u10_attr; ' $ |
---|
| 402 | +'v10[longitude,latitude,*time]=v10out:v10_attr; ' $ |
---|
[5] | 403 | + 'longitude[]=xlon:lon_attr; ' $ |
---|
| 404 | + 'latitude[]=ylat:lat_attr; ' $ |
---|
[172] | 405 | + 'time[]=timein:time_attr ' $ |
---|
[5] | 406 | + ' @ globattr' |
---|
[97] | 407 | ; |
---|
[5] | 408 | @ncdf_quickwrite |
---|
[97] | 409 | ; |
---|
[172] | 410 | result = 0 |
---|
| 411 | return, result |
---|
| 412 | ; |
---|
[5] | 413 | end |
---|