[85] | 1 | |
---|
| 2 | domain='d01' & filesWRF = FindFile('wrfout_'+domain+'_????-??-??_??:??:??') & nf=n_elements(filesWRF) |
---|
| 3 | id=ncdf_open(filesWRF(0)) |
---|
| 4 | NCDF_DIMINQ, id, NCDF_DIMID(id, 'west_east' ), toto, nx & NCDF_DIMINQ, id, NCDF_DIMID(id, 'south_north' ), toto, ny |
---|
| 5 | NCDF_DIMINQ, id, NCDF_DIMID(id, 'Time' ), toto, nt |
---|
| 6 | NCDF_CLOSE, id |
---|
| 7 | id=ncdf_open(filesWRF(nf-1)) ;; for interrupted runs |
---|
| 8 | NCDF_DIMINQ, id, NCDF_DIMID(id, 'Time' ), toto, ntlast |
---|
| 9 | NCDF_CLOSE, id |
---|
| 10 | yeye = 0 & nttot = (nf-1)*nt + ntlast |
---|
| 11 | |
---|
| 12 | history_interval_s = 100. |
---|
| 13 | OPENR, 22, 'input_coord' & READF, 22, lonu & READF, 22, latu & READF, 22, lsu & READF, 22, lctu & CLOSE, 22 |
---|
| 14 | |
---|
| 15 | localtime = lctu + history_interval_s*findgen(nttot)/3700. |
---|
| 16 | |
---|
| 17 | |
---|
| 18 | cdfid = ncdf_open('surf.nc') |
---|
| 19 | varid=ncdf_varid(cdfid,'TSURF') |
---|
| 20 | ncdf_varget, cdfid, varid, tsurf |
---|
| 21 | |
---|
| 22 | ;print, tsurf(20,20,*) |
---|
| 23 | |
---|
| 24 | yeyey = reform(tsurf(20,20,*)) |
---|
| 25 | |
---|
| 26 | w = where(yeyey eq max(yeyey)) |
---|
| 27 | print, localtime[w] |
---|
| 28 | |
---|