[43] | 1 | ;+ |
---|
[46] | 2 | ; .. _icoads_ws_stats_paper.pro: |
---|
[43] | 3 | ; |
---|
| 4 | ; ========================= |
---|
| 5 | ; icoads_ws_stats_paper.pro |
---|
| 6 | ; ========================= |
---|
| 7 | ; |
---|
| 8 | ; DESCRIPTION |
---|
| 9 | ; =========== |
---|
| 10 | ; |
---|
[46] | 11 | ; .. graphviz:: |
---|
| 12 | ; |
---|
| 13 | ; digraph icoads_ws_stats_paper { |
---|
| 14 | ; graph [ |
---|
| 15 | ; rankdir="LR", |
---|
| 16 | ; ] |
---|
| 17 | ; ws [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/ws_monthly_1960_2010_oafluxgrid.nc"]; |
---|
| 18 | ; ws_tropflux [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/ws_TropFlux_global_monthly_1989_2009.nc"]; |
---|
| 19 | ; ws_oaflux [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/ws_OAFlux_global_monthly_1989_2009.nc"]; |
---|
| 20 | ; ws_erai [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/ws_ERAI_global_monthly_1989_2009.nc"]; |
---|
| 21 | ; ws_ncep2 [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/ws_NCEP2_global_monthly_1989_2009.nc"]; |
---|
| 22 | ; ws_ncep1 [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/ws_NCEP1_global_monthly_1989_2009.nc"]; |
---|
| 23 | ; ws_noc [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/nocv2_ws_19890101_20091231_oafluxgrid.nc"]; |
---|
| 24 | ; |
---|
| 25 | ; figure [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/icoads_ws_stats_paper.ps"]; |
---|
| 26 | ; |
---|
| 27 | ; icoads_ws_stats_paper [shape=box, |
---|
| 28 | ; fontname=Courier, |
---|
| 29 | ; color=blue, |
---|
| 30 | ; URL="http://forge.ipsl.jussieu.fr/tropflux/browser/trunk/src/paper01/fig6/icoads_ws_stats_paper.pro", |
---|
| 31 | ; label="${TROPFLUX}/src/paper01/fig6/icoads_ws_stats_paper.pro"]; |
---|
| 32 | ; |
---|
| 33 | ; {ws ws_tropflux ws_oaflux ws_erai ws_ncep2 ws_ncep1 ws_noc} -> {icoads_ws_stats_paper} -> {figure} |
---|
| 34 | ; } |
---|
| 35 | ; |
---|
[43] | 36 | ; SEE ALSO |
---|
| 37 | ; ======== |
---|
| 38 | ; |
---|
| 39 | ; :ref:`tropflux_profile.sh` |
---|
[46] | 40 | ; :ref:`tropflux_init.pro` |
---|
[43] | 41 | ; |
---|
[46] | 42 | ; :ref:`statistics.pro` |
---|
| 43 | ; |
---|
[43] | 44 | ; EXAMPLES |
---|
| 45 | ; ======== |
---|
| 46 | ; |
---|
| 47 | ; :: |
---|
| 48 | ; |
---|
| 49 | ; IDL> @tropflux_init |
---|
| 50 | ; IDL> icoads_ws_stats_paper |
---|
| 51 | ; |
---|
[46] | 52 | ; |
---|
| 53 | ; TODO |
---|
| 54 | ; ==== |
---|
| 55 | ; |
---|
[47] | 56 | ; make it work (missing data, box definition) |
---|
[46] | 57 | ; |
---|
| 58 | ; coding rules |
---|
| 59 | ; |
---|
| 60 | ; get rid of spwan |
---|
| 61 | ; |
---|
| 62 | ; complete description |
---|
| 63 | ; |
---|
| 64 | ; handle IO error |
---|
| 65 | ; |
---|
[43] | 66 | ; EVOLUTIONS |
---|
| 67 | ; ========== |
---|
| 68 | ; |
---|
| 69 | ; $Id$ |
---|
| 70 | ; |
---|
[46] | 71 | ; - fplod 20110420T092454Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
| 72 | ; |
---|
| 73 | ; * remove hard coding path |
---|
| 74 | ; * add graphviz |
---|
| 75 | ; |
---|
[43] | 76 | ; - fplod 20110411T142955Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
| 77 | ; |
---|
| 78 | ; * minimal header |
---|
| 79 | ; |
---|
| 80 | ;- |
---|
[41] | 81 | pro icoads_ws_stats_paper |
---|
[46] | 82 | @cm_general |
---|
| 83 | @cm_tropflux |
---|
[41] | 84 | reinitplt, /z,/invert |
---|
| 85 | key_portrait = 1 |
---|
| 86 | coefpalit=.9 |
---|
| 87 | |
---|
| 88 | openps, FILENAME = 'idl.ps' |
---|
| 89 | ; partie a changer |
---|
| 90 | marge=[-2,-2, -4,2] |
---|
| 91 | st=19890101 & en=20091231 |
---|
| 92 | domdef, box |
---|
| 93 | |
---|
[46] | 94 | file=tropflux_id_env+'ws_monthly_1960_2010_oafluxgrid.nc" |
---|
[41] | 95 | initncdf, file |
---|
| 96 | icoads=read_ncdf("ws", st-1, en , file=file,/nostr, box=box) |
---|
| 97 | help, icoads |
---|
| 98 | |
---|
[46] | 99 | file=tropflux_id_env+"ws_TropFlux_global_monthly_1989_2009.nc" |
---|
[41] | 100 | initncdf, file |
---|
| 101 | trop=read_ncdf("ws", st, en , file=file,/nostr, box=box) |
---|
| 102 | help, trop |
---|
| 103 | |
---|
[46] | 104 | file=tropflux_id_env+"ws_OAFlux_global_monthly_1989_2009.nc" |
---|
[41] | 105 | initncdf, file |
---|
| 106 | oaf=read_ncdf("ws", st, en , file=file,/nostr, box=box) |
---|
| 107 | help, oaf |
---|
| 108 | |
---|
[46] | 109 | file=tropflux_id_env+"ws_ERAI_global_monthly_1989_2009.nc" |
---|
[41] | 110 | initncdf, file |
---|
| 111 | erai=read_ncdf("ws", st, en , file=file,/nostr, box=box) |
---|
| 112 | help, erai |
---|
| 113 | |
---|
[46] | 114 | file=tropflux_id_env+"ws_NCEP2_global_monthly_1989_2009.nc" |
---|
[41] | 115 | initncdf, file |
---|
| 116 | ncep2=read_ncdf("wsm", st, en , file=file,/nostr, box=box) |
---|
| 117 | help, ncep2 |
---|
| 118 | |
---|
[46] | 119 | file=tropflux_id_env+"ws_NCEP1_global_monthly_1989_2009.nc" |
---|
[41] | 120 | initncdf, file |
---|
| 121 | ncep1=read_ncdf("ws", st, en , file=file,/nostr, box=box) |
---|
| 122 | help, ncep1 |
---|
| 123 | |
---|
[46] | 124 | file=tropflux_id_env+'nocv2_ws_19890101_20091231_oafluxgrid.nc' |
---|
[41] | 125 | initncdf, file |
---|
| 126 | noc=read_ncdf("ws", st, en , file=file,/nostr, box=box) |
---|
| 127 | help, noc |
---|
| 128 | |
---|
| 129 | si=size(trop) & nt=si(3) |
---|
| 130 | |
---|
| 131 | lat_rama=[67, 55, 55, 80.5, 80.5, 80.5, 80.5, 90, 90, 90, 90, 90, 90, 90, 95] |
---|
| 132 | lon_rama=[-8, -12, -8,-8, -1.5, 0, 1.5, -1.5, 0, 1.5, 4, 8, 12, 15, -5] |
---|
| 133 | |
---|
| 134 | lat_pirata=[0, 350, 337, 325, 350, 337, 322, 328, 322, 326, 322, 337, 337, 322, 350, 322, 330] |
---|
| 135 | lon_pirata=[0, 0, 0, 0, -10, 12, 12, -14, 15, -19, 20, 21, 4, 4, -6, 8, -8] |
---|
| 136 | |
---|
| 137 | lat_tao=[165, 180, 205, 235, 250, 265, 156, 165, 180, 190, 205, 220, 235, 250, 265, 156, 165, 180, 190, 205, 220, 235, 250, 265, 147, 156, $ |
---|
| 138 | 165, 180, 190, 205, 220, 235, 250, 265, 147, 156, 165, 180, 190, 205, 220, 235, 250, 265, 147, 156, 165, 190, 205, 220, 235, 250, 265, $ |
---|
| 139 | 156, 165, 180, 190, 220, 235, 250, 265] |
---|
| 140 | |
---|
| 141 | lon_tao=[-8, -8, -8, -8, -8, -8, -5, -5, -5, -5, -5, -5, -5, -5, -5, -2, -2, -2, -2, -2, -2, -2, -2, -2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, $ |
---|
| 142 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 5, 5, 5, 5, 5, 5, 5, 8, 8, 8, 8, 9, 8, 8, 8] |
---|
| 143 | |
---|
| 144 | lat=[lat_rama, lat_pirata, lat_tao] |
---|
| 145 | lon=[lon_rama, lon_pirata, lon_tao] |
---|
| 146 | |
---|
| 147 | lat_tao=lat & lon_tao=lon |
---|
| 148 | nn=n_elements(lat) |
---|
| 149 | |
---|
| 150 | list=0 |
---|
| 151 | for n=0, nn-1 do begin |
---|
| 152 | x=lat_tao(n) |
---|
| 153 | y=lon_tao(n) |
---|
| 154 | dx=abs(reform(glamt-x)) & dy=abs(reform(gphit)-y) |
---|
| 155 | ind=where((dx le 0.5) and (dy le 0.5)) |
---|
| 156 | if (total(ind) ge 0.) then begin |
---|
| 157 | list=[list,ind] |
---|
| 158 | endif |
---|
| 159 | endfor |
---|
| 160 | |
---|
| 161 | msk=replicate(1,nxt,nyt) |
---|
| 162 | msk(list)=!Values.f_nan |
---|
| 163 | |
---|
| 164 | mask=trop*0 |
---|
| 165 | for jt=0,jpt-1 do begin |
---|
| 166 | t=reform(msk(*,*)) |
---|
| 167 | mask(*,*,jt)=t |
---|
| 168 | endfor |
---|
| 169 | |
---|
| 170 | param=icoads*mask |
---|
| 171 | trop=trop*mask & oaf=oaf*mask & erai=erai*mask |
---|
| 172 | ncep2=ncep2*mask & ncep1=ncep1*mask |
---|
| 173 | noc=noc*mask |
---|
| 174 | |
---|
| 175 | ind=where(finite(param) and finite(noc) and finite(erai) and finite(trop) and finite(oaf) and finite(ncep2) and finite(ncep1)) |
---|
| 176 | x=param(ind) & y=trop(ind) |
---|
| 177 | param=param(ind) & trop=trop(ind) & erai=erai(ind) & oaf=oaf(ind) & ncep2=ncep2(ind) & ncep1=ncep1(ind) |
---|
| 178 | noc=noc(ind) |
---|
| 179 | |
---|
| 180 | ; |
---|
| 181 | statistics, param, trop, $ |
---|
| 182 | cor, bias, std, rmsd |
---|
| 183 | print, cor, bias, std, rmsd |
---|
| 184 | cstat_trop=string(cor, bias, std, rmsd, format='(f4.2,2x,f6.3,2x,f4.2,1x,f6.2)') |
---|
| 185 | abs_diff=total(abs(trop-param))/n_elements(trop) |
---|
| 186 | abs_trop=string(abs_diff, format='(f5.2)') |
---|
| 187 | ; |
---|
| 188 | statistics, param, oaf, $ |
---|
| 189 | cor, bias, std, rmsd |
---|
| 190 | print, cor, bias, std, rmsd |
---|
| 191 | cstat_oaf=string(cor, bias, std, rmsd, format='(f4.2,2x,f6.3,2x,f4.2,1x,f6.2)') |
---|
| 192 | abs_diff=total(abs(oaf-param))/n_elements(oaf) |
---|
| 193 | abs_oaf=string(abs_diff, format='(f5.2)') |
---|
| 194 | ; |
---|
| 195 | statistics, param, erai, $ |
---|
| 196 | cor, bias, std, rmsd |
---|
| 197 | print, cor, bias, std, rmsd |
---|
| 198 | cstat_erai=string(cor, bias, std, rmsd, format='(f4.2,2x,f6.3,2x,f4.2,1x,f6.2)') |
---|
| 199 | abs_diff=total(abs(erai-param))/n_elements(erai) |
---|
| 200 | abs_erai=string(abs_diff, format='(f5.2)') |
---|
| 201 | |
---|
| 202 | ; |
---|
| 203 | statistics, param, ncep2, $ |
---|
| 204 | cor, bias, std, rmsd |
---|
| 205 | print, cor, bias, std, rmsd |
---|
| 206 | cstat_ncep2=string(cor, bias, std, rmsd, format='(f4.2,2x,f6.3,2x,f4.2,1x,f6.2)') |
---|
| 207 | abs_diff=total(abs(ncep2-param))/n_elements(ncep2) |
---|
| 208 | abs_ncep2=string(abs_diff, format='(f5.2)') |
---|
| 209 | ; |
---|
| 210 | statistics, param, ncep1, $ |
---|
| 211 | cor, bias, std, rmsd |
---|
| 212 | print, cor, bias, std, rmsd |
---|
| 213 | cstat_ncep1=string(cor, bias, std, rmsd, format='(f4.2,2x,f6.3,2x,f4.2,1x,f6.2)') |
---|
| 214 | abs_diff=total(abs(ncep1-param))/n_elements(ncep1) |
---|
| 215 | abs_ncep1=string(abs_diff, format='(f5.2)') |
---|
| 216 | ; |
---|
| 217 | statistics, param, noc, $ |
---|
| 218 | cor, bias, std, rmsd |
---|
| 219 | print, cor, bias, std, rmsd |
---|
| 220 | cstat_noc=string(cor, bias, std, rmsd, format='(f4.2,2x,f6.3,2x,f4.2,1x,f6.2)') |
---|
| 221 | abs_diff=total(abs(noc-param))/n_elements(noc) |
---|
| 222 | abs_noc=string(abs_diff, format='(f5.2)') |
---|
| 223 | ; |
---|
| 224 | mio=0 & mao=15 & inx=1 & nx=(mao-mio)/inx+1l & xx=mio+indgen(nx)*inx |
---|
| 225 | mis=0 & mas=15 & iny=1 & ny=(mas-mis)/iny+1l & yy=mis+indgen(ny)*iny |
---|
| 226 | xp=4 & yp=13 |
---|
| 227 | x1=0 & x2=15 & y1=x1 & y2=x2 |
---|
| 228 | ; |
---|
| 229 | pdf, param,trop,mio,mao,inx,mis,mas,iny, $ |
---|
| 230 | pdf,xx,yy |
---|
| 231 | scontour, pdf,xx,yy ,/noer, charsize=1, nlevels=30,/fill, $ |
---|
| 232 | title="ws - ICOADS/TropFlux", small=[2,3,1], $ |
---|
| 233 | xrange=[x1, x2], yrange=[y1, y2] |
---|
| 234 | xyouts, xp, yp, cstat_trop, charsize=1 |
---|
| 235 | xyouts, xp, yp-1, abs_trop, charsize=1 |
---|
| 236 | |
---|
| 237 | ; |
---|
| 238 | pdf, param,oaf,mio,mao,inx,mis,mas,iny, $ |
---|
| 239 | pdf,xx,yy |
---|
| 240 | scontour, pdf,xx,yy ,/noer, charsize=1, nlevels=30,/fill, $ |
---|
| 241 | title="ws - ICOADS/OAFlux", small=[2,3,2], $ |
---|
| 242 | xrange=[x1, x2], yrange=[y1, y2] |
---|
| 243 | xyouts, xp, yp, cstat_oaf, charsize=1 |
---|
| 244 | xyouts, xp, yp-1, abs_oaf, charsize=1 |
---|
| 245 | |
---|
| 246 | ; |
---|
| 247 | pdf, param,erai,mio,mao,inx,mis,mas,iny, $ |
---|
| 248 | pdf,xx,yy |
---|
| 249 | scontour, pdf,xx,yy ,/noer, charsize=1, nlevels=30,/fill, $ |
---|
| 250 | title="ws - ICOADS/ERAI", small=[2,3,3], $ |
---|
| 251 | xrange=[x1, x2], yrange=[y1, y2] |
---|
| 252 | xyouts, xp, yp, cstat_erai, charsize=1 |
---|
| 253 | xyouts, xp, yp-1, abs_erai, charsize=1 |
---|
| 254 | |
---|
| 255 | ; |
---|
| 256 | pdf, param,ncep2,mio,mao,inx,mis,mas,iny, $ |
---|
| 257 | pdf,xx,yy |
---|
| 258 | scontour, pdf,xx,yy ,/noer, charsize=1, nlevels=30,/fill, $ |
---|
| 259 | title="ws - ICOADS/NCEP2", small=[2,3,4], $ |
---|
| 260 | xrange=[x1, x2], yrange=[y1, y2] |
---|
| 261 | xyouts, xp, yp, cstat_ncep2, charsize=1 |
---|
| 262 | xyouts, xp, yp-1, abs_ncep2, charsize=1 |
---|
| 263 | |
---|
| 264 | ; |
---|
| 265 | pdf, param,ncep1,mio,mao,inx,mis,mas,iny, $ |
---|
| 266 | pdf,xx,yy |
---|
| 267 | scontour, pdf,xx,yy ,/noer, charsize=1, nlevels=30,/fill, $ |
---|
| 268 | title="ws - ICOADS/NCEP1", small=[2,3,5], $ |
---|
| 269 | xrange=[x1, x2], yrange=[y1, y2] |
---|
| 270 | xyouts, xp, yp, cstat_ncep1, charsize=1 |
---|
| 271 | xyouts, xp, yp-1, abs_ncep1, charsize=1 |
---|
| 272 | ; |
---|
| 273 | pdf, param,noc,mio,mao,inx,mis,mas,iny, $ |
---|
| 274 | pdf,xx,yy |
---|
| 275 | scontour, pdf,xx,yy ,/noer, charsize=1, nlevels=30,/fill, $ |
---|
| 276 | title="ws - ICOADS/NOC", small=[2,3,6], $ |
---|
| 277 | xrange=[x1, x2], yrange=[y1, y2] |
---|
| 278 | xyouts, xp, yp, cstat_noc, charsize=1 |
---|
| 279 | xyouts, xp, yp-1, abs_noc, charsize=1 |
---|
| 280 | |
---|
| 281 | closeps |
---|
[46] | 282 | fig=tropflux_od_env+"icoads_ws_stats_paper.ps" |
---|
| 283 | spawn, 'mv '+psdir+'idl.ps '+fig |
---|
| 284 | spawn, 'gv '+fig |
---|
[41] | 285 | end |
---|