// mm5meteogram.js
function mm5meteograms4km() {
humanmm5run=mostrecentmm5meteo4km.substr(0,4)+"-"+mostrecentmm5meteo4km.substr(4,2)+"-"+mostrecentmm5meteo4km.substr(6,2)+" at "+mostrecentmm5meteo4km.substr(8,2)
mm5meteo_gif_urlknuw="http://www.atmos.washington.edu/mm5rt/rt/meteogram_gen/images/"+mostrecentmm5meteo4km+"/meteo.d3.mm5gfs.eno."+mostrecentmm5meteo4km+".KNUW.gif"
mm5meteo_gif_urlsmith="http://www.atmos.washington.edu/mm5rt/rt/meteogram_gen/images/"+mostrecentmm5meteo4km+"/meteo.d3.mm5gfs.eno."+mostrecentmm5meteo4km+".BAQM.gif"


document.write("Below is the mm5 meteogram (wind only visible) from University of Washington for Whidbey Naval Air Station KNUW<br>")
document.write( "generated from the mm5/GFS model run at "+humanmm5run+" UTC. &nbsp; All times on X-axis are UTC from right to left &nbsp;dd/hh  21h&rarr;2PM PDT")



document.write("<div class=\"meteogram\">")
document.write("<br><img class=\"meteo\" title=\"KNUW METEOGRAM "+mostrecentmm5meteo4km+"\"  src=\""+mm5meteo_gif_urlknuw+"\"><br>")
document.write("</div>")


document.write("Smith Island and Ft Ebey &darr; &nbsp;  &nbsp;lat= 48.22 &nbsp;&nbsp;lon= -122.76 &nbsp;   All times on X-axis are UTC from right to left &nbsp; dd/hh   21h&rarr;2PM PDT<br>")

document.write("<div class=\"meteogram\">")
document.write("<a href='http://www.atmos.washington.edu/mm5rt/rt/meteogram_gen/cgi/met_process.cgi?date=current_gfs&domain=d3&map=full&model=mm5_gfs&lat=48.2169&lon=122.7624' target=_new><img class=\"meteo\" title=Smith"+mostrecentmm5meteo4km+"  src="+mm5meteo_gif_urlsmith+"  alt=\"Click here if there is no image here to cause  the image to be generated.\"><br>")
document.write("</div>")

//document.write("If there is no meteogram above, <a  class=afake_button   href=\"http://www.atmos.washington.edu/mm5rt/rt/meteogram_gen/cgi/met_process.cgi?date=current_gfs&domain=d3&map=full&model=mm5_gfs&lat=48.2169&lon=122.7624&station=&coord.x=&coord.y= target=\"_new\" >")
//document.write("<b>For the most recently available 4km Domain MM5 meteogram for Ft Ebey/Smith Island click here</a> <br> It is sometimes different from KNUW.  Once generated, that metogram will show up just above after a reload. <br>")
}
