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