// Compiled by ClojureScript 1.10.520 {}
goog.provide('vmt.fmap');
goog.require('cljs.core');
goog.require('octet.core');
goog.require('weathergen.math');
goog.require('weathergen.model');
vmt.fmap.weather_type_code__GT_type = new cljs.core.PersistentArrayMap(null, 4, [(1),new cljs.core.Keyword(null,"sunny","sunny",1448267778),(2),new cljs.core.Keyword(null,"fair","fair",1684139423),(3),new cljs.core.Keyword(null,"poor","poor",1462482211),(4),new cljs.core.Keyword(null,"inclement","inclement",-550669382)], null);
vmt.fmap.weather_type__GT_code = cljs.core.zipmap.call(null,cljs.core.vals.call(null,vmt.fmap.weather_type_code__GT_type),cljs.core.keys.call(null,vmt.fmap.weather_type_code__GT_type));
vmt.fmap.coverage_code__GT_type = new cljs.core.PersistentArrayMap(null, 5, [new cljs.core.Keyword(null,"none","none",1333468478),(0),new cljs.core.Keyword(null,"few","few",941665998),(1),new cljs.core.Keyword(null,"scattered","scattered",-1263632526),(5),new cljs.core.Keyword(null,"broken","broken",-1742446874),(9),new cljs.core.Keyword(null,"overcast","overcast",-2096313755),(13)], null);
vmt.fmap.header_spec = octet.core.spec.call(null,new cljs.core.Keyword("vmt.fmap","version","vmt.fmap/version",-891566703),octet.core.int32,new cljs.core.Keyword("vmt.fmap","rows","vmt.fmap/rows",-2077747017),octet.core.int32,new cljs.core.Keyword("vmt.fmap","cols","vmt.fmap/cols",-579722870),octet.core.int32,new cljs.core.Keyword("vmt.fmap","map-move-heading","vmt.fmap/map-move-heading",-1087640792),octet.core.int32,new cljs.core.Keyword("vmt.fmap","map-move-speed","vmt.fmap/map-move-speed",-502838238),octet.core.float$,new cljs.core.Keyword("vmt.fmap","stratus-z-fair","vmt.fmap/stratus-z-fair",680651391),octet.core.int32,new cljs.core.Keyword("vmt.fmap","stratus-z-inclement","vmt.fmap/stratus-z-inclement",-1379631644),octet.core.int32,new cljs.core.Keyword("vmt.fmap","contrails","vmt.fmap/contrails",-2100804586),octet.core.spec.call(null,new cljs.core.Keyword(null,"sunny","sunny",1448267778),octet.core.int32,new cljs.core.Keyword(null,"fair","fair",1684139423),octet.core.int32,new cljs.core.Keyword(null,"poor","poor",1462482211),octet.core.int32,new cljs.core.Keyword(null,"inclement","inclement",-550669382),octet.core.int32));
vmt.fmap.wind_data = octet.core.spec.call(null,new cljs.core.Keyword(null,"data-0","data-0",91600913),octet.core.float$,new cljs.core.Keyword(null,"data-3000","data-3000",1181021713),octet.core.float$,new cljs.core.Keyword(null,"data-6000","data-6000",-2114307240),octet.core.float$,new cljs.core.Keyword(null,"data-9000","data-9000",-1863816853),octet.core.float$,new cljs.core.Keyword(null,"data-12000","data-12000",1186648415),octet.core.float$,new cljs.core.Keyword(null,"data-18000","data-18000",1133358567),octet.core.float$,new cljs.core.Keyword(null,"data-24000","data-24000",951011067),octet.core.float$,new cljs.core.Keyword(null,"data-30000","data-30000",1569593243),octet.core.float$,new cljs.core.Keyword(null,"data-40000","data-40000",433116385),octet.core.float$,new cljs.core.Keyword(null,"data-50000","data-50000",-596290684),octet.core.float$);
vmt.fmap.data_spec = (function vmt$fmap$data_spec(p__36935){
var map__36936 = p__36935;
var map__36936__$1 = (((((!((map__36936 == null))))?(((((map__36936.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__36936.cljs$core$ISeq$))))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__36936):map__36936);
var header = map__36936__$1;
var rows = cljs.core.get.call(null,map__36936__$1,new cljs.core.Keyword("vmt.fmap","rows","vmt.fmap/rows",-2077747017));
var cols = cljs.core.get.call(null,map__36936__$1,new cljs.core.Keyword("vmt.fmap","cols","vmt.fmap/cols",-579722870));
var cells = (rows * cols);
return octet.core.spec.call(null,new cljs.core.Keyword("vmt.fmap","weather-type","vmt.fmap/weather-type",-357476417),octet.core.repeat.call(null,cells,octet.core.int32),new cljs.core.Keyword("vmt.fmap","pressure-mmhg","vmt.fmap/pressure-mmhg",2122955509),octet.core.repeat.call(null,cells,octet.core.float$),new cljs.core.Keyword("vmt.fmap","temperature","vmt.fmap/temperature",1125269734),octet.core.repeat.call(null,cells,octet.core.float$),new cljs.core.Keyword("vmt.fmap","wind-speed","vmt.fmap/wind-speed",-2132345843),octet.core.repeat.call(null,cells,vmt.fmap.wind_data),new cljs.core.Keyword("vmt.fmap","wind-heading","vmt.fmap/wind-heading",-1085391803),octet.core.repeat.call(null,cells,vmt.fmap.wind_data),new cljs.core.Keyword("vmt.fmap","cloud-base","vmt.fmap/cloud-base",1086566634),octet.core.repeat.call(null,cells,octet.core.float$),new cljs.core.Keyword("vmt.fmap","cloud-coverage","vmt.fmap/cloud-coverage",716283117),octet.core.repeat.call(null,cells,octet.core.int32),new cljs.core.Keyword("vmt.fmap","cloud-size","vmt.fmap/cloud-size",-755360788),octet.core.repeat.call(null,cells,octet.core.float$),new cljs.core.Keyword("vmt.fmap","towering-cumulus?","vmt.fmap/towering-cumulus?",-562813332),octet.core.repeat.call(null,cells,octet.core.int32),new cljs.core.Keyword("vmt.fmap","visibility-km","vmt.fmap/visibility-km",1588242188),octet.core.repeat.call(null,cells,octet.core.float$));
});
/**
 * Given FMAP data, decodes it into the internal representation.
 */
vmt.fmap.decode = (function vmt$fmap$decode(buf){
var _STAR_byte_order_STAR__orig_val__36940 = octet.buffer._STAR_byte_order_STAR_;
var _STAR_byte_order_STAR__temp_val__36941 = new cljs.core.Keyword(null,"little-endian","little-endian",1877303413);
octet.buffer._STAR_byte_order_STAR_ = _STAR_byte_order_STAR__temp_val__36941;

try{var header = octet.core.read.call(null,buf,vmt.fmap.header_spec);
var cells = (new cljs.core.Keyword("vmt.fmap","rows","vmt.fmap/rows",-2077747017).cljs$core$IFn$_invoke$arity$1(header) * new cljs.core.Keyword("vmt.fmap","cols","vmt.fmap/cols",-579722870).cljs$core$IFn$_invoke$arity$1(header));
var data = octet.core.read.call(null,buf,vmt.fmap.data_spec.call(null,header),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"offset","offset",296498311),octet.core.size.call(null,vmt.fmap.header_spec)], null));
var _QMARK_ = header;
var _QMARK___$1 = cljs.core.merge.call(null,_QMARK_,data);
var _QMARK___$2 = cljs.core.update.call(null,_QMARK___$1,new cljs.core.Keyword("vmt.fmap","towering-cumulus?","vmt.fmap/towering-cumulus?",-562813332),((function (_QMARK_,_QMARK___$1,header,cells,data,_STAR_byte_order_STAR__orig_val__36940,_STAR_byte_order_STAR__temp_val__36941){
return (function (p1__36938_SHARP_){
return cljs.core.mapv.call(null,cljs.core.comp.call(null,cljs.core.not,cljs.core.zero_QMARK_),p1__36938_SHARP_);
});})(_QMARK_,_QMARK___$1,header,cells,data,_STAR_byte_order_STAR__orig_val__36940,_STAR_byte_order_STAR__temp_val__36941))
);
var _QMARK___$3 = cljs.core.update.call(null,_QMARK___$2,new cljs.core.Keyword("vmt.fmap","weather-type","vmt.fmap/weather-type",-357476417),((function (_QMARK_,_QMARK___$1,_QMARK___$2,header,cells,data,_STAR_byte_order_STAR__orig_val__36940,_STAR_byte_order_STAR__temp_val__36941){
return (function (p1__36939_SHARP_){
return cljs.core.mapv.call(null,vmt.fmap.weather_type_code__GT_type,p1__36939_SHARP_);
});})(_QMARK_,_QMARK___$1,_QMARK___$2,header,cells,data,_STAR_byte_order_STAR__orig_val__36940,_STAR_byte_order_STAR__temp_val__36941))
);
var _QMARK___$4 = cljs.core.assoc.call(null,_QMARK___$3,new cljs.core.Keyword("vmt.fmap","wind-speed","vmt.fmap/wind-speed",-2132345843),cljs.core.map.call(null,((function (_QMARK_,_QMARK___$1,_QMARK___$2,_QMARK___$3,header,cells,data,_STAR_byte_order_STAR__orig_val__36940,_STAR_byte_order_STAR__temp_val__36941){
return (function (s0,s3,s6,s9,s12,s18,s24,s30,s40,s50){
return cljs.core.PersistentHashMap.fromArrays([(0),(12000),(18000),(3000),(9000),(40000),(30000),(24000),(50000),(6000)],[s0,s12,s18,s3,s9,s40,s30,s24,s50,s6]);
});})(_QMARK_,_QMARK___$1,_QMARK___$2,_QMARK___$3,header,cells,data,_STAR_byte_order_STAR__orig_val__36940,_STAR_byte_order_STAR__temp_val__36941))
,new cljs.core.Keyword("vmt.fmap","wind-speed-0","vmt.fmap/wind-speed-0",-680210885).cljs$core$IFn$_invoke$arity$1(_QMARK___$3),new cljs.core.Keyword("vmt.fmap","wind-speed-3000","vmt.fmap/wind-speed-3000",-1922437171).cljs$core$IFn$_invoke$arity$1(_QMARK___$3),new cljs.core.Keyword("vmt.fmap","wind-speed-6000","vmt.fmap/wind-speed-6000",-102569858).cljs$core$IFn$_invoke$arity$1(_QMARK___$3),new cljs.core.Keyword("vmt.fmap","wind-speed-9000","vmt.fmap/wind-speed-9000",649992788).cljs$core$IFn$_invoke$arity$1(_QMARK___$3),new cljs.core.Keyword("vmt.fmap","wind-speed-12000","vmt.fmap/wind-speed-12000",-1925951473).cljs$core$IFn$_invoke$arity$1(_QMARK___$3),new cljs.core.Keyword("vmt.fmap","wind-speed-18000","vmt.fmap/wind-speed-18000",705501907).cljs$core$IFn$_invoke$arity$1(_QMARK___$3),new cljs.core.Keyword("vmt.fmap","wind-speed-24000","vmt.fmap/wind-speed-24000",651275419).cljs$core$IFn$_invoke$arity$1(_QMARK___$3),new cljs.core.Keyword("vmt.fmap","wind-speed-30000","vmt.fmap/wind-speed-30000",-1749725472).cljs$core$IFn$_invoke$arity$1(_QMARK___$3),new cljs.core.Keyword("vmt.fmap","wind-speed-40000","vmt.fmap/wind-speed-40000",-1462690361).cljs$core$IFn$_invoke$arity$1(_QMARK___$3),new cljs.core.Keyword("vmt.fmap","wind-speed-50000","vmt.fmap/wind-speed-50000",318573486).cljs$core$IFn$_invoke$arity$1(_QMARK___$3)));
var _QMARK___$5 = cljs.core.dissoc.call(null,_QMARK___$4,new cljs.core.Keyword("vmt.fmap","wind-speed-0","vmt.fmap/wind-speed-0",-680210885),new cljs.core.Keyword("vmt.fmap","wind-speed-3000","vmt.fmap/wind-speed-3000",-1922437171),new cljs.core.Keyword("vmt.fmap","wind-speed-6000","vmt.fmap/wind-speed-6000",-102569858),new cljs.core.Keyword("vmt.fmap","wind-speed-9000","vmt.fmap/wind-speed-9000",649992788),new cljs.core.Keyword("vmt.fmap","wind-speed-12000","vmt.fmap/wind-speed-12000",-1925951473),new cljs.core.Keyword("vmt.fmap","wind-speed-18000","vmt.fmap/wind-speed-18000",705501907),new cljs.core.Keyword("vmt.fmap","wind-speed-24000","vmt.fmap/wind-speed-24000",651275419),new cljs.core.Keyword("vmt.fmap","wind-speed-30000","vmt.fmap/wind-speed-30000",-1749725472),new cljs.core.Keyword("vmt.fmap","wind-speed-40000","vmt.fmap/wind-speed-40000",-1462690361),new cljs.core.Keyword("vmt.fmap","wind-speed-50000","vmt.fmap/wind-speed-50000",318573486));
var _QMARK___$6 = cljs.core.assoc.call(null,_QMARK___$5,new cljs.core.Keyword("vmt.fmap","wind-heading","vmt.fmap/wind-heading",-1085391803),cljs.core.map.call(null,((function (_QMARK_,_QMARK___$1,_QMARK___$2,_QMARK___$3,_QMARK___$4,_QMARK___$5,header,cells,data,_STAR_byte_order_STAR__orig_val__36940,_STAR_byte_order_STAR__temp_val__36941){
return (function (s0,s3,s6,s9,s12,s18,s24,s30,s40,s50){
return cljs.core.PersistentHashMap.fromArrays([(0),(12000),(18000),(3000),(9000),(40000),(30000),(24000),(50000),(6000)],[s0,s12,s18,s3,s9,s40,s30,s24,s50,s6]);
});})(_QMARK_,_QMARK___$1,_QMARK___$2,_QMARK___$3,_QMARK___$4,_QMARK___$5,header,cells,data,_STAR_byte_order_STAR__orig_val__36940,_STAR_byte_order_STAR__temp_val__36941))
,new cljs.core.Keyword("vmt.fmap","wind-heading-0","vmt.fmap/wind-heading-0",-566409224).cljs$core$IFn$_invoke$arity$1(_QMARK___$5),new cljs.core.Keyword("vmt.fmap","wind-heading-3000","vmt.fmap/wind-heading-3000",2013286206).cljs$core$IFn$_invoke$arity$1(_QMARK___$5),new cljs.core.Keyword("vmt.fmap","wind-heading-6000","vmt.fmap/wind-heading-6000",1827592429).cljs$core$IFn$_invoke$arity$1(_QMARK___$5),new cljs.core.Keyword("vmt.fmap","wind-heading-9000","vmt.fmap/wind-heading-9000",2045515027).cljs$core$IFn$_invoke$arity$1(_QMARK___$5),new cljs.core.Keyword("vmt.fmap","wind-heading-12000","vmt.fmap/wind-heading-12000",2044633396).cljs$core$IFn$_invoke$arity$1(_QMARK___$5),new cljs.core.Keyword("vmt.fmap","wind-heading-18000","vmt.fmap/wind-heading-18000",749002599).cljs$core$IFn$_invoke$arity$1(_QMARK___$5),new cljs.core.Keyword("vmt.fmap","wind-heading-24000","vmt.fmap/wind-heading-24000",-1943819796).cljs$core$IFn$_invoke$arity$1(_QMARK___$5),new cljs.core.Keyword("vmt.fmap","wind-heading-30000","vmt.fmap/wind-heading-30000",925337525).cljs$core$IFn$_invoke$arity$1(_QMARK___$5),new cljs.core.Keyword("vmt.fmap","wind-heading-40000","vmt.fmap/wind-heading-40000",738253691).cljs$core$IFn$_invoke$arity$1(_QMARK___$5),new cljs.core.Keyword("vmt.fmap","wind-heading-50000","vmt.fmap/wind-heading-50000",152656464).cljs$core$IFn$_invoke$arity$1(_QMARK___$5)));
return cljs.core.dissoc.call(null,_QMARK___$6,new cljs.core.Keyword("vmt.fmap","wind-heading-0","vmt.fmap/wind-heading-0",-566409224),new cljs.core.Keyword("vmt.fmap","wind-heading-3000","vmt.fmap/wind-heading-3000",2013286206),new cljs.core.Keyword("vmt.fmap","wind-heading-6000","vmt.fmap/wind-heading-6000",1827592429),new cljs.core.Keyword("vmt.fmap","wind-heading-9000","vmt.fmap/wind-heading-9000",2045515027),new cljs.core.Keyword("vmt.fmap","wind-heading-12000","vmt.fmap/wind-heading-12000",2044633396),new cljs.core.Keyword("vmt.fmap","wind-heading-18000","vmt.fmap/wind-heading-18000",749002599),new cljs.core.Keyword("vmt.fmap","wind-heading-24000","vmt.fmap/wind-heading-24000",-1943819796),new cljs.core.Keyword("vmt.fmap","wind-heading-30000","vmt.fmap/wind-heading-30000",925337525),new cljs.core.Keyword("vmt.fmap","wind-heading-40000","vmt.fmap/wind-heading-40000",738253691),new cljs.core.Keyword("vmt.fmap","wind-heading-50000","vmt.fmap/wind-heading-50000",152656464));
}finally {octet.buffer._STAR_byte_order_STAR_ = _STAR_byte_order_STAR__orig_val__36940;
}});
/**
 * Convert from the data format VMT uses to the one in the FMAPs.
 */
vmt.fmap.convert = (function vmt$fmap$convert(data,rows,cols){
return cljs.core.PersistentHashMap.fromArrays([new cljs.core.Keyword("vmt.fmap","wind-heading","vmt.fmap/wind-heading",-1085391803),new cljs.core.Keyword("vmt.fmap","temperature","vmt.fmap/temperature",1125269734),new cljs.core.Keyword("vmt.fmap","cloud-base","vmt.fmap/cloud-base",1086566634),new cljs.core.Keyword("vmt.fmap","towering-cumulus?","vmt.fmap/towering-cumulus?",-562813332),new cljs.core.Keyword("vmt.fmap","visibility-km","vmt.fmap/visibility-km",1588242188),new cljs.core.Keyword("vmt.fmap","cloud-size","vmt.fmap/cloud-size",-755360788),new cljs.core.Keyword("vmt.fmap","wind-speed","vmt.fmap/wind-speed",-2132345843),new cljs.core.Keyword("vmt.fmap","cloud-coverage","vmt.fmap/cloud-coverage",716283117),new cljs.core.Keyword("vmt.fmap","pressure-mmhg","vmt.fmap/pressure-mmhg",2122955509),new cljs.core.Keyword("vmt.fmap","weather-type","vmt.fmap/weather-type",-357476417)],[(function (){var iter__4523__auto__ = (function vmt$fmap$convert_$_iter__36942(s__36943){
return (new cljs.core.LazySeq(null,(function (){
var s__36943__$1 = s__36943;
while(true){
var temp__5720__auto__ = cljs.core.seq.call(null,s__36943__$1);
if(temp__5720__auto__){
var xs__6277__auto__ = temp__5720__auto__;
var y = cljs.core.first.call(null,xs__6277__auto__);
var iterys__4519__auto__ = ((function (s__36943__$1,y,xs__6277__auto__,temp__5720__auto__){
return (function vmt$fmap$convert_$_iter__36942_$_iter__36944(s__36945){
return (new cljs.core.LazySeq(null,((function (s__36943__$1,y,xs__6277__auto__,temp__5720__auto__){
return (function (){
var s__36945__$1 = s__36945;
while(true){
var temp__5720__auto____$1 = cljs.core.seq.call(null,s__36945__$1);
if(temp__5720__auto____$1){
var s__36945__$2 = temp__5720__auto____$1;
if(cljs.core.chunked_seq_QMARK_.call(null,s__36945__$2)){
var c__4521__auto__ = cljs.core.chunk_first.call(null,s__36945__$2);
var size__4522__auto__ = cljs.core.count.call(null,c__4521__auto__);
var b__36947 = cljs.core.chunk_buffer.call(null,size__4522__auto__);
if((function (){var i__36946 = (0);
while(true){
if((i__36946 < size__4522__auto__)){
var x = cljs.core._nth.call(null,c__4521__auto__,i__36946);
cljs.core.chunk_append.call(null,b__36947,cljs.core.PersistentHashMap.fromArrays([new cljs.core.Keyword(null,"data-40000","data-40000",433116385),new cljs.core.Keyword(null,"data-50000","data-50000",-596290684),new cljs.core.Keyword(null,"data-18000","data-18000",1133358567),new cljs.core.Keyword(null,"data-9000","data-9000",-1863816853),new cljs.core.Keyword(null,"data-0","data-0",91600913),new cljs.core.Keyword(null,"data-3000","data-3000",1181021713),new cljs.core.Keyword(null,"data-6000","data-6000",-2114307240),new cljs.core.Keyword(null,"data-24000","data-24000",951011067),new cljs.core.Keyword(null,"data-30000","data-30000",1569593243),new cljs.core.Keyword(null,"data-12000","data-12000",1186648415)],[cljs.core.get_in.call(null,data,new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [x,y], null),new cljs.core.Keyword(null,"wind","wind",-527553074),(40000),new cljs.core.Keyword(null,"heading","heading",-1312171873)], null)),cljs.core.get_in.call(null,data,new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [x,y], null),new cljs.core.Keyword(null,"wind","wind",-527553074),(50000),new cljs.core.Keyword(null,"heading","heading",-1312171873)], null)),cljs.core.get_in.call(null,data,new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [x,y], null),new cljs.core.Keyword(null,"wind","wind",-527553074),(18000),new cljs.core.Keyword(null,"heading","heading",-1312171873)], null)),cljs.core.get_in.call(null,data,new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [x,y], null),new cljs.core.Keyword(null,"wind","wind",-527553074),(9000),new cljs.core.Keyword(null,"heading","heading",-1312171873)], null)),cljs.core.get_in.call(null,data,new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [x,y], null),new cljs.core.Keyword(null,"wind","wind",-527553074),(0),new cljs.core.Keyword(null,"heading","heading",-1312171873)], null)),cljs.core.get_in.call(null,data,new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [x,y], null),new cljs.core.Keyword(null,"wind","wind",-527553074),(3000),new cljs.core.Keyword(null,"heading","heading",-1312171873)], null)),cljs.core.get_in.call(null,data,new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [x,y], null),new cljs.core.Keyword(null,"wind","wind",-527553074),(6000),new cljs.core.Keyword(null,"heading","heading",-1312171873)], null)),cljs.core.get_in.call(null,data,new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [x,y], null),new cljs.core.Keyword(null,"wind","wind",-527553074),(24000),new cljs.core.Keyword(null,"heading","heading",-1312171873)], null)),cljs.core.get_in.call(null,data,new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [x,y], null),new cljs.core.Keyword(null,"wind","wind",-527553074),(30000),new cljs.core.Keyword(null,"heading","heading",-1312171873)], null)),cljs.core.get_in.call(null,data,new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [x,y], null),new cljs.core.Keyword(null,"wind","wind",-527553074),(12000),new cljs.core.Keyword(null,"heading","heading",-1312171873)], null))]));

var G__37006 = (i__36946 + (1));
i__36946 = G__37006;
continue;
} else {
return true;
}
break;
}
})()){
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__36947),vmt$fmap$convert_$_iter__36942_$_iter__36944.call(null,cljs.core.chunk_rest.call(null,s__36945__$2)));
} else {
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__36947),null);
}
} else {
var x = cljs.core.first.call(null,s__36945__$2);
return cljs.core.cons.call(null,cljs.core.PersistentHashMap.fromArrays([new cljs.core.Keyword(null,"data-40000","data-40000",433116385),new cljs.core.Keyword(null,"data-50000","data-50000",-596290684),new cljs.core.Keyword(null,"data-18000","data-18000",1133358567),new cljs.core.Keyword(null,"data-9000","data-9000",-1863816853),new cljs.core.Keyword(null,"data-0","data-0",91600913),new cljs.core.Keyword(null,"data-3000","data-3000",1181021713),new cljs.core.Keyword(null,"data-6000","data-6000",-2114307240),new cljs.core.Keyword(null,"data-24000","data-24000",951011067),new cljs.core.Keyword(null,"data-30000","data-30000",1569593243),new cljs.core.Keyword(null,"data-12000","data-12000",1186648415)],[cljs.core.get_in.call(null,data,new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [x,y], null),new cljs.core.Keyword(null,"wind","wind",-527553074),(40000),new cljs.core.Keyword(null,"heading","heading",-1312171873)], null)),cljs.core.get_in.call(null,data,new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [x,y], null),new cljs.core.Keyword(null,"wind","wind",-527553074),(50000),new cljs.core.Keyword(null,"heading","heading",-1312171873)], null)),cljs.core.get_in.call(null,data,new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [x,y], null),new cljs.core.Keyword(null,"wind","wind",-527553074),(18000),new cljs.core.Keyword(null,"heading","heading",-1312171873)], null)),cljs.core.get_in.call(null,data,new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [x,y], null),new cljs.core.Keyword(null,"wind","wind",-527553074),(9000),new cljs.core.Keyword(null,"heading","heading",-1312171873)], null)),cljs.core.get_in.call(null,data,new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [x,y], null),new cljs.core.Keyword(null,"wind","wind",-527553074),(0),new cljs.core.Keyword(null,"heading","heading",-1312171873)], null)),cljs.core.get_in.call(null,data,new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [x,y], null),new cljs.core.Keyword(null,"wind","wind",-527553074),(3000),new cljs.core.Keyword(null,"heading","heading",-1312171873)], null)),cljs.core.get_in.call(null,data,new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [x,y], null),new cljs.core.Keyword(null,"wind","wind",-527553074),(6000),new cljs.core.Keyword(null,"heading","heading",-1312171873)], null)),cljs.core.get_in.call(null,data,new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [x,y], null),new cljs.core.Keyword(null,"wind","wind",-527553074),(24000),new cljs.core.Keyword(null,"heading","heading",-1312171873)], null)),cljs.core.get_in.call(null,data,new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [x,y], null),new cljs.core.Keyword(null,"wind","wind",-527553074),(30000),new cljs.core.Keyword(null,"heading","heading",-1312171873)], null)),cljs.core.get_in.call(null,data,new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [x,y], null),new cljs.core.Keyword(null,"wind","wind",-527553074),(12000),new cljs.core.Keyword(null,"heading","heading",-1312171873)], null))]),vmt$fmap$convert_$_iter__36942_$_iter__36944.call(null,cljs.core.rest.call(null,s__36945__$2)));
}
} else {
return null;
}
break;
}
});})(s__36943__$1,y,xs__6277__auto__,temp__5720__auto__))
,null,null));
});})(s__36943__$1,y,xs__6277__auto__,temp__5720__auto__))
;
var fs__4520__auto__ = cljs.core.seq.call(null,iterys__4519__auto__.call(null,cljs.core.range.call(null,rows)));
if(fs__4520__auto__){
return cljs.core.concat.call(null,fs__4520__auto__,vmt$fmap$convert_$_iter__36942.call(null,cljs.core.rest.call(null,s__36943__$1)));
} else {
var G__37007 = cljs.core.rest.call(null,s__36943__$1);
s__36943__$1 = G__37007;
continue;
}
} else {
return null;
}
break;
}
}),null,null));
});
return iter__4523__auto__.call(null,cljs.core.range.call(null,rows));
})(),(function (){var iter__4523__auto__ = (function vmt$fmap$convert_$_iter__36948(s__36949){
return (new cljs.core.LazySeq(null,(function (){
var s__36949__$1 = s__36949;
while(true){
var temp__5720__auto__ = cljs.core.seq.call(null,s__36949__$1);
if(temp__5720__auto__){
var xs__6277__auto__ = temp__5720__auto__;
var y = cljs.core.first.call(null,xs__6277__auto__);
var iterys__4519__auto__ = ((function (s__36949__$1,y,xs__6277__auto__,temp__5720__auto__){
return (function vmt$fmap$convert_$_iter__36948_$_iter__36950(s__36951){
return (new cljs.core.LazySeq(null,((function (s__36949__$1,y,xs__6277__auto__,temp__5720__auto__){
return (function (){
var s__36951__$1 = s__36951;
while(true){
var temp__5720__auto____$1 = cljs.core.seq.call(null,s__36951__$1);
if(temp__5720__auto____$1){
var s__36951__$2 = temp__5720__auto____$1;
if(cljs.core.chunked_seq_QMARK_.call(null,s__36951__$2)){
var c__4521__auto__ = cljs.core.chunk_first.call(null,s__36951__$2);
var size__4522__auto__ = cljs.core.count.call(null,c__4521__auto__);
var b__36953 = cljs.core.chunk_buffer.call(null,size__4522__auto__);
if((function (){var i__36952 = (0);
while(true){
if((i__36952 < size__4522__auto__)){
var x = cljs.core._nth.call(null,c__4521__auto__,i__36952);
cljs.core.chunk_append.call(null,b__36953,cljs.core.get_in.call(null,data,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [x,y], null),new cljs.core.Keyword(null,"temperature","temperature",899018429)], null)));

var G__37008 = (i__36952 + (1));
i__36952 = G__37008;
continue;
} else {
return true;
}
break;
}
})()){
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__36953),vmt$fmap$convert_$_iter__36948_$_iter__36950.call(null,cljs.core.chunk_rest.call(null,s__36951__$2)));
} else {
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__36953),null);
}
} else {
var x = cljs.core.first.call(null,s__36951__$2);
return cljs.core.cons.call(null,cljs.core.get_in.call(null,data,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [x,y], null),new cljs.core.Keyword(null,"temperature","temperature",899018429)], null)),vmt$fmap$convert_$_iter__36948_$_iter__36950.call(null,cljs.core.rest.call(null,s__36951__$2)));
}
} else {
return null;
}
break;
}
});})(s__36949__$1,y,xs__6277__auto__,temp__5720__auto__))
,null,null));
});})(s__36949__$1,y,xs__6277__auto__,temp__5720__auto__))
;
var fs__4520__auto__ = cljs.core.seq.call(null,iterys__4519__auto__.call(null,cljs.core.range.call(null,cols)));
if(fs__4520__auto__){
return cljs.core.concat.call(null,fs__4520__auto__,vmt$fmap$convert_$_iter__36948.call(null,cljs.core.rest.call(null,s__36949__$1)));
} else {
var G__37009 = cljs.core.rest.call(null,s__36949__$1);
s__36949__$1 = G__37009;
continue;
}
} else {
return null;
}
break;
}
}),null,null));
});
return iter__4523__auto__.call(null,cljs.core.range.call(null,rows));
})(),(function (){var iter__4523__auto__ = (function vmt$fmap$convert_$_iter__36954(s__36955){
return (new cljs.core.LazySeq(null,(function (){
var s__36955__$1 = s__36955;
while(true){
var temp__5720__auto__ = cljs.core.seq.call(null,s__36955__$1);
if(temp__5720__auto__){
var xs__6277__auto__ = temp__5720__auto__;
var y = cljs.core.first.call(null,xs__6277__auto__);
var iterys__4519__auto__ = ((function (s__36955__$1,y,xs__6277__auto__,temp__5720__auto__){
return (function vmt$fmap$convert_$_iter__36954_$_iter__36956(s__36957){
return (new cljs.core.LazySeq(null,((function (s__36955__$1,y,xs__6277__auto__,temp__5720__auto__){
return (function (){
var s__36957__$1 = s__36957;
while(true){
var temp__5720__auto____$1 = cljs.core.seq.call(null,s__36957__$1);
if(temp__5720__auto____$1){
var s__36957__$2 = temp__5720__auto____$1;
if(cljs.core.chunked_seq_QMARK_.call(null,s__36957__$2)){
var c__4521__auto__ = cljs.core.chunk_first.call(null,s__36957__$2);
var size__4522__auto__ = cljs.core.count.call(null,c__4521__auto__);
var b__36959 = cljs.core.chunk_buffer.call(null,size__4522__auto__);
if((function (){var i__36958 = (0);
while(true){
if((i__36958 < size__4522__auto__)){
var x = cljs.core._nth.call(null,c__4521__auto__,i__36958);
cljs.core.chunk_append.call(null,b__36959,cljs.core.get_in.call(null,data,new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [x,y], null),new cljs.core.Keyword(null,"low-clouds","low-clouds",-702988471),new cljs.core.Keyword(null,"base","base",185279322)], null)));

var G__37010 = (i__36958 + (1));
i__36958 = G__37010;
continue;
} else {
return true;
}
break;
}
})()){
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__36959),vmt$fmap$convert_$_iter__36954_$_iter__36956.call(null,cljs.core.chunk_rest.call(null,s__36957__$2)));
} else {
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__36959),null);
}
} else {
var x = cljs.core.first.call(null,s__36957__$2);
return cljs.core.cons.call(null,cljs.core.get_in.call(null,data,new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [x,y], null),new cljs.core.Keyword(null,"low-clouds","low-clouds",-702988471),new cljs.core.Keyword(null,"base","base",185279322)], null)),vmt$fmap$convert_$_iter__36954_$_iter__36956.call(null,cljs.core.rest.call(null,s__36957__$2)));
}
} else {
return null;
}
break;
}
});})(s__36955__$1,y,xs__6277__auto__,temp__5720__auto__))
,null,null));
});})(s__36955__$1,y,xs__6277__auto__,temp__5720__auto__))
;
var fs__4520__auto__ = cljs.core.seq.call(null,iterys__4519__auto__.call(null,cljs.core.range.call(null,cols)));
if(fs__4520__auto__){
return cljs.core.concat.call(null,fs__4520__auto__,vmt$fmap$convert_$_iter__36954.call(null,cljs.core.rest.call(null,s__36955__$1)));
} else {
var G__37011 = cljs.core.rest.call(null,s__36955__$1);
s__36955__$1 = G__37011;
continue;
}
} else {
return null;
}
break;
}
}),null,null));
});
return iter__4523__auto__.call(null,cljs.core.range.call(null,rows));
})(),(function (){var iter__4523__auto__ = (function vmt$fmap$convert_$_iter__36960(s__36961){
return (new cljs.core.LazySeq(null,(function (){
var s__36961__$1 = s__36961;
while(true){
var temp__5720__auto__ = cljs.core.seq.call(null,s__36961__$1);
if(temp__5720__auto__){
var xs__6277__auto__ = temp__5720__auto__;
var y = cljs.core.first.call(null,xs__6277__auto__);
var iterys__4519__auto__ = ((function (s__36961__$1,y,xs__6277__auto__,temp__5720__auto__){
return (function vmt$fmap$convert_$_iter__36960_$_iter__36962(s__36963){
return (new cljs.core.LazySeq(null,((function (s__36961__$1,y,xs__6277__auto__,temp__5720__auto__){
return (function (){
var s__36963__$1 = s__36963;
while(true){
var temp__5720__auto____$1 = cljs.core.seq.call(null,s__36963__$1);
if(temp__5720__auto____$1){
var s__36963__$2 = temp__5720__auto____$1;
if(cljs.core.chunked_seq_QMARK_.call(null,s__36963__$2)){
var c__4521__auto__ = cljs.core.chunk_first.call(null,s__36963__$2);
var size__4522__auto__ = cljs.core.count.call(null,c__4521__auto__);
var b__36965 = cljs.core.chunk_buffer.call(null,size__4522__auto__);
if((function (){var i__36964 = (0);
while(true){
if((i__36964 < size__4522__auto__)){
var x = cljs.core._nth.call(null,c__4521__auto__,i__36964);
var towering_QMARK_ = cljs.core.get_in.call(null,data,new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [x,y], null),new cljs.core.Keyword(null,"low-clouds","low-clouds",-702988471),new cljs.core.Keyword(null,"towering?","towering?",2005070836)], null));
cljs.core.chunk_append.call(null,b__36965,(cljs.core.truth_(towering_QMARK_)?(1):(0)));

var G__37012 = (i__36964 + (1));
i__36964 = G__37012;
continue;
} else {
return true;
}
break;
}
})()){
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__36965),vmt$fmap$convert_$_iter__36960_$_iter__36962.call(null,cljs.core.chunk_rest.call(null,s__36963__$2)));
} else {
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__36965),null);
}
} else {
var x = cljs.core.first.call(null,s__36963__$2);
var towering_QMARK_ = cljs.core.get_in.call(null,data,new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [x,y], null),new cljs.core.Keyword(null,"low-clouds","low-clouds",-702988471),new cljs.core.Keyword(null,"towering?","towering?",2005070836)], null));
return cljs.core.cons.call(null,(cljs.core.truth_(towering_QMARK_)?(1):(0)),vmt$fmap$convert_$_iter__36960_$_iter__36962.call(null,cljs.core.rest.call(null,s__36963__$2)));
}
} else {
return null;
}
break;
}
});})(s__36961__$1,y,xs__6277__auto__,temp__5720__auto__))
,null,null));
});})(s__36961__$1,y,xs__6277__auto__,temp__5720__auto__))
;
var fs__4520__auto__ = cljs.core.seq.call(null,iterys__4519__auto__.call(null,cljs.core.range.call(null,cols)));
if(fs__4520__auto__){
return cljs.core.concat.call(null,fs__4520__auto__,vmt$fmap$convert_$_iter__36960.call(null,cljs.core.rest.call(null,s__36961__$1)));
} else {
var G__37013 = cljs.core.rest.call(null,s__36961__$1);
s__36961__$1 = G__37013;
continue;
}
} else {
return null;
}
break;
}
}),null,null));
});
return iter__4523__auto__.call(null,cljs.core.range.call(null,rows));
})(),(function (){var iter__4523__auto__ = (function vmt$fmap$convert_$_iter__36966(s__36967){
return (new cljs.core.LazySeq(null,(function (){
var s__36967__$1 = s__36967;
while(true){
var temp__5720__auto__ = cljs.core.seq.call(null,s__36967__$1);
if(temp__5720__auto__){
var xs__6277__auto__ = temp__5720__auto__;
var y = cljs.core.first.call(null,xs__6277__auto__);
var iterys__4519__auto__ = ((function (s__36967__$1,y,xs__6277__auto__,temp__5720__auto__){
return (function vmt$fmap$convert_$_iter__36966_$_iter__36968(s__36969){
return (new cljs.core.LazySeq(null,((function (s__36967__$1,y,xs__6277__auto__,temp__5720__auto__){
return (function (){
var s__36969__$1 = s__36969;
while(true){
var temp__5720__auto____$1 = cljs.core.seq.call(null,s__36969__$1);
if(temp__5720__auto____$1){
var s__36969__$2 = temp__5720__auto____$1;
if(cljs.core.chunked_seq_QMARK_.call(null,s__36969__$2)){
var c__4521__auto__ = cljs.core.chunk_first.call(null,s__36969__$2);
var size__4522__auto__ = cljs.core.count.call(null,c__4521__auto__);
var b__36971 = cljs.core.chunk_buffer.call(null,size__4522__auto__);
if((function (){var i__36970 = (0);
while(true){
if((i__36970 < size__4522__auto__)){
var x = cljs.core._nth.call(null,c__4521__auto__,i__36970);
cljs.core.chunk_append.call(null,b__36971,cljs.core.get_in.call(null,data,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [x,y], null),new cljs.core.Keyword(null,"visibility","visibility",1338380893)], null)));

var G__37014 = (i__36970 + (1));
i__36970 = G__37014;
continue;
} else {
return true;
}
break;
}
})()){
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__36971),vmt$fmap$convert_$_iter__36966_$_iter__36968.call(null,cljs.core.chunk_rest.call(null,s__36969__$2)));
} else {
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__36971),null);
}
} else {
var x = cljs.core.first.call(null,s__36969__$2);
return cljs.core.cons.call(null,cljs.core.get_in.call(null,data,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [x,y], null),new cljs.core.Keyword(null,"visibility","visibility",1338380893)], null)),vmt$fmap$convert_$_iter__36966_$_iter__36968.call(null,cljs.core.rest.call(null,s__36969__$2)));
}
} else {
return null;
}
break;
}
});})(s__36967__$1,y,xs__6277__auto__,temp__5720__auto__))
,null,null));
});})(s__36967__$1,y,xs__6277__auto__,temp__5720__auto__))
;
var fs__4520__auto__ = cljs.core.seq.call(null,iterys__4519__auto__.call(null,cljs.core.range.call(null,cols)));
if(fs__4520__auto__){
return cljs.core.concat.call(null,fs__4520__auto__,vmt$fmap$convert_$_iter__36966.call(null,cljs.core.rest.call(null,s__36967__$1)));
} else {
var G__37015 = cljs.core.rest.call(null,s__36967__$1);
s__36967__$1 = G__37015;
continue;
}
} else {
return null;
}
break;
}
}),null,null));
});
return iter__4523__auto__.call(null,cljs.core.range.call(null,rows));
})(),(function (){var iter__4523__auto__ = (function vmt$fmap$convert_$_iter__36972(s__36973){
return (new cljs.core.LazySeq(null,(function (){
var s__36973__$1 = s__36973;
while(true){
var temp__5720__auto__ = cljs.core.seq.call(null,s__36973__$1);
if(temp__5720__auto__){
var xs__6277__auto__ = temp__5720__auto__;
var y = cljs.core.first.call(null,xs__6277__auto__);
var iterys__4519__auto__ = ((function (s__36973__$1,y,xs__6277__auto__,temp__5720__auto__){
return (function vmt$fmap$convert_$_iter__36972_$_iter__36974(s__36975){
return (new cljs.core.LazySeq(null,((function (s__36973__$1,y,xs__6277__auto__,temp__5720__auto__){
return (function (){
var s__36975__$1 = s__36975;
while(true){
var temp__5720__auto____$1 = cljs.core.seq.call(null,s__36975__$1);
if(temp__5720__auto____$1){
var s__36975__$2 = temp__5720__auto____$1;
if(cljs.core.chunked_seq_QMARK_.call(null,s__36975__$2)){
var c__4521__auto__ = cljs.core.chunk_first.call(null,s__36975__$2);
var size__4522__auto__ = cljs.core.count.call(null,c__4521__auto__);
var b__36977 = cljs.core.chunk_buffer.call(null,size__4522__auto__);
if((function (){var i__36976 = (0);
while(true){
if((i__36976 < size__4522__auto__)){
var x = cljs.core._nth.call(null,c__4521__auto__,i__36976);
cljs.core.chunk_append.call(null,b__36977,cljs.core.get_in.call(null,data,new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [x,y], null),new cljs.core.Keyword(null,"low-clouds","low-clouds",-702988471),new cljs.core.Keyword(null,"size","size",1098693007)], null)));

var G__37016 = (i__36976 + (1));
i__36976 = G__37016;
continue;
} else {
return true;
}
break;
}
})()){
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__36977),vmt$fmap$convert_$_iter__36972_$_iter__36974.call(null,cljs.core.chunk_rest.call(null,s__36975__$2)));
} else {
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__36977),null);
}
} else {
var x = cljs.core.first.call(null,s__36975__$2);
return cljs.core.cons.call(null,cljs.core.get_in.call(null,data,new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [x,y], null),new cljs.core.Keyword(null,"low-clouds","low-clouds",-702988471),new cljs.core.Keyword(null,"size","size",1098693007)], null)),vmt$fmap$convert_$_iter__36972_$_iter__36974.call(null,cljs.core.rest.call(null,s__36975__$2)));
}
} else {
return null;
}
break;
}
});})(s__36973__$1,y,xs__6277__auto__,temp__5720__auto__))
,null,null));
});})(s__36973__$1,y,xs__6277__auto__,temp__5720__auto__))
;
var fs__4520__auto__ = cljs.core.seq.call(null,iterys__4519__auto__.call(null,cljs.core.range.call(null,cols)));
if(fs__4520__auto__){
return cljs.core.concat.call(null,fs__4520__auto__,vmt$fmap$convert_$_iter__36972.call(null,cljs.core.rest.call(null,s__36973__$1)));
} else {
var G__37017 = cljs.core.rest.call(null,s__36973__$1);
s__36973__$1 = G__37017;
continue;
}
} else {
return null;
}
break;
}
}),null,null));
});
return iter__4523__auto__.call(null,cljs.core.range.call(null,rows));
})(),(function (){var iter__4523__auto__ = (function vmt$fmap$convert_$_iter__36978(s__36979){
return (new cljs.core.LazySeq(null,(function (){
var s__36979__$1 = s__36979;
while(true){
var temp__5720__auto__ = cljs.core.seq.call(null,s__36979__$1);
if(temp__5720__auto__){
var xs__6277__auto__ = temp__5720__auto__;
var y = cljs.core.first.call(null,xs__6277__auto__);
var iterys__4519__auto__ = ((function (s__36979__$1,y,xs__6277__auto__,temp__5720__auto__){
return (function vmt$fmap$convert_$_iter__36978_$_iter__36980(s__36981){
return (new cljs.core.LazySeq(null,((function (s__36979__$1,y,xs__6277__auto__,temp__5720__auto__){
return (function (){
var s__36981__$1 = s__36981;
while(true){
var temp__5720__auto____$1 = cljs.core.seq.call(null,s__36981__$1);
if(temp__5720__auto____$1){
var s__36981__$2 = temp__5720__auto____$1;
if(cljs.core.chunked_seq_QMARK_.call(null,s__36981__$2)){
var c__4521__auto__ = cljs.core.chunk_first.call(null,s__36981__$2);
var size__4522__auto__ = cljs.core.count.call(null,c__4521__auto__);
var b__36983 = cljs.core.chunk_buffer.call(null,size__4522__auto__);
if((function (){var i__36982 = (0);
while(true){
if((i__36982 < size__4522__auto__)){
var x = cljs.core._nth.call(null,c__4521__auto__,i__36982);
cljs.core.chunk_append.call(null,b__36983,cljs.core.PersistentHashMap.fromArrays([new cljs.core.Keyword(null,"data-40000","data-40000",433116385),new cljs.core.Keyword(null,"data-50000","data-50000",-596290684),new cljs.core.Keyword(null,"data-18000","data-18000",1133358567),new cljs.core.Keyword(null,"data-9000","data-9000",-1863816853),new cljs.core.Keyword(null,"data-0","data-0",91600913),new cljs.core.Keyword(null,"data-3000","data-3000",1181021713),new cljs.core.Keyword(null,"data-6000","data-6000",-2114307240),new cljs.core.Keyword(null,"data-24000","data-24000",951011067),new cljs.core.Keyword(null,"data-30000","data-30000",1569593243),new cljs.core.Keyword(null,"data-12000","data-12000",1186648415)],[cljs.core.get_in.call(null,data,new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [x,y], null),new cljs.core.Keyword(null,"wind","wind",-527553074),(40000),new cljs.core.Keyword(null,"speed","speed",1257663751)], null)),cljs.core.get_in.call(null,data,new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [x,y], null),new cljs.core.Keyword(null,"wind","wind",-527553074),(50000),new cljs.core.Keyword(null,"speed","speed",1257663751)], null)),cljs.core.get_in.call(null,data,new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [x,y], null),new cljs.core.Keyword(null,"wind","wind",-527553074),(18000),new cljs.core.Keyword(null,"speed","speed",1257663751)], null)),cljs.core.get_in.call(null,data,new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [x,y], null),new cljs.core.Keyword(null,"wind","wind",-527553074),(9000),new cljs.core.Keyword(null,"speed","speed",1257663751)], null)),cljs.core.get_in.call(null,data,new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [x,y], null),new cljs.core.Keyword(null,"wind","wind",-527553074),(0),new cljs.core.Keyword(null,"speed","speed",1257663751)], null)),cljs.core.get_in.call(null,data,new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [x,y], null),new cljs.core.Keyword(null,"wind","wind",-527553074),(3000),new cljs.core.Keyword(null,"speed","speed",1257663751)], null)),cljs.core.get_in.call(null,data,new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [x,y], null),new cljs.core.Keyword(null,"wind","wind",-527553074),(6000),new cljs.core.Keyword(null,"speed","speed",1257663751)], null)),cljs.core.get_in.call(null,data,new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [x,y], null),new cljs.core.Keyword(null,"wind","wind",-527553074),(24000),new cljs.core.Keyword(null,"speed","speed",1257663751)], null)),cljs.core.get_in.call(null,data,new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [x,y], null),new cljs.core.Keyword(null,"wind","wind",-527553074),(30000),new cljs.core.Keyword(null,"speed","speed",1257663751)], null)),cljs.core.get_in.call(null,data,new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [x,y], null),new cljs.core.Keyword(null,"wind","wind",-527553074),(12000),new cljs.core.Keyword(null,"speed","speed",1257663751)], null))]));

var G__37018 = (i__36982 + (1));
i__36982 = G__37018;
continue;
} else {
return true;
}
break;
}
})()){
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__36983),vmt$fmap$convert_$_iter__36978_$_iter__36980.call(null,cljs.core.chunk_rest.call(null,s__36981__$2)));
} else {
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__36983),null);
}
} else {
var x = cljs.core.first.call(null,s__36981__$2);
return cljs.core.cons.call(null,cljs.core.PersistentHashMap.fromArrays([new cljs.core.Keyword(null,"data-40000","data-40000",433116385),new cljs.core.Keyword(null,"data-50000","data-50000",-596290684),new cljs.core.Keyword(null,"data-18000","data-18000",1133358567),new cljs.core.Keyword(null,"data-9000","data-9000",-1863816853),new cljs.core.Keyword(null,"data-0","data-0",91600913),new cljs.core.Keyword(null,"data-3000","data-3000",1181021713),new cljs.core.Keyword(null,"data-6000","data-6000",-2114307240),new cljs.core.Keyword(null,"data-24000","data-24000",951011067),new cljs.core.Keyword(null,"data-30000","data-30000",1569593243),new cljs.core.Keyword(null,"data-12000","data-12000",1186648415)],[cljs.core.get_in.call(null,data,new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [x,y], null),new cljs.core.Keyword(null,"wind","wind",-527553074),(40000),new cljs.core.Keyword(null,"speed","speed",1257663751)], null)),cljs.core.get_in.call(null,data,new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [x,y], null),new cljs.core.Keyword(null,"wind","wind",-527553074),(50000),new cljs.core.Keyword(null,"speed","speed",1257663751)], null)),cljs.core.get_in.call(null,data,new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [x,y], null),new cljs.core.Keyword(null,"wind","wind",-527553074),(18000),new cljs.core.Keyword(null,"speed","speed",1257663751)], null)),cljs.core.get_in.call(null,data,new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [x,y], null),new cljs.core.Keyword(null,"wind","wind",-527553074),(9000),new cljs.core.Keyword(null,"speed","speed",1257663751)], null)),cljs.core.get_in.call(null,data,new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [x,y], null),new cljs.core.Keyword(null,"wind","wind",-527553074),(0),new cljs.core.Keyword(null,"speed","speed",1257663751)], null)),cljs.core.get_in.call(null,data,new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [x,y], null),new cljs.core.Keyword(null,"wind","wind",-527553074),(3000),new cljs.core.Keyword(null,"speed","speed",1257663751)], null)),cljs.core.get_in.call(null,data,new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [x,y], null),new cljs.core.Keyword(null,"wind","wind",-527553074),(6000),new cljs.core.Keyword(null,"speed","speed",1257663751)], null)),cljs.core.get_in.call(null,data,new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [x,y], null),new cljs.core.Keyword(null,"wind","wind",-527553074),(24000),new cljs.core.Keyword(null,"speed","speed",1257663751)], null)),cljs.core.get_in.call(null,data,new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [x,y], null),new cljs.core.Keyword(null,"wind","wind",-527553074),(30000),new cljs.core.Keyword(null,"speed","speed",1257663751)], null)),cljs.core.get_in.call(null,data,new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [x,y], null),new cljs.core.Keyword(null,"wind","wind",-527553074),(12000),new cljs.core.Keyword(null,"speed","speed",1257663751)], null))]),vmt$fmap$convert_$_iter__36978_$_iter__36980.call(null,cljs.core.rest.call(null,s__36981__$2)));
}
} else {
return null;
}
break;
}
});})(s__36979__$1,y,xs__6277__auto__,temp__5720__auto__))
,null,null));
});})(s__36979__$1,y,xs__6277__auto__,temp__5720__auto__))
;
var fs__4520__auto__ = cljs.core.seq.call(null,iterys__4519__auto__.call(null,cljs.core.range.call(null,rows)));
if(fs__4520__auto__){
return cljs.core.concat.call(null,fs__4520__auto__,vmt$fmap$convert_$_iter__36978.call(null,cljs.core.rest.call(null,s__36979__$1)));
} else {
var G__37019 = cljs.core.rest.call(null,s__36979__$1);
s__36979__$1 = G__37019;
continue;
}
} else {
return null;
}
break;
}
}),null,null));
});
return iter__4523__auto__.call(null,cljs.core.range.call(null,rows));
})(),(function (){var iter__4523__auto__ = (function vmt$fmap$convert_$_iter__36984(s__36985){
return (new cljs.core.LazySeq(null,(function (){
var s__36985__$1 = s__36985;
while(true){
var temp__5720__auto__ = cljs.core.seq.call(null,s__36985__$1);
if(temp__5720__auto__){
var xs__6277__auto__ = temp__5720__auto__;
var y = cljs.core.first.call(null,xs__6277__auto__);
var iterys__4519__auto__ = ((function (s__36985__$1,y,xs__6277__auto__,temp__5720__auto__){
return (function vmt$fmap$convert_$_iter__36984_$_iter__36986(s__36987){
return (new cljs.core.LazySeq(null,((function (s__36985__$1,y,xs__6277__auto__,temp__5720__auto__){
return (function (){
var s__36987__$1 = s__36987;
while(true){
var temp__5720__auto____$1 = cljs.core.seq.call(null,s__36987__$1);
if(temp__5720__auto____$1){
var s__36987__$2 = temp__5720__auto____$1;
if(cljs.core.chunked_seq_QMARK_.call(null,s__36987__$2)){
var c__4521__auto__ = cljs.core.chunk_first.call(null,s__36987__$2);
var size__4522__auto__ = cljs.core.count.call(null,c__4521__auto__);
var b__36989 = cljs.core.chunk_buffer.call(null,size__4522__auto__);
if((function (){var i__36988 = (0);
while(true){
if((i__36988 < size__4522__auto__)){
var x = cljs.core._nth.call(null,c__4521__auto__,i__36988);
cljs.core.chunk_append.call(null,b__36989,vmt.fmap.coverage_code__GT_type.call(null,cljs.core.get_in.call(null,data,new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [x,y], null),new cljs.core.Keyword(null,"low-clouds","low-clouds",-702988471),new cljs.core.Keyword(null,"coverage","coverage",1606292651)], null))));

var G__37020 = (i__36988 + (1));
i__36988 = G__37020;
continue;
} else {
return true;
}
break;
}
})()){
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__36989),vmt$fmap$convert_$_iter__36984_$_iter__36986.call(null,cljs.core.chunk_rest.call(null,s__36987__$2)));
} else {
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__36989),null);
}
} else {
var x = cljs.core.first.call(null,s__36987__$2);
return cljs.core.cons.call(null,vmt.fmap.coverage_code__GT_type.call(null,cljs.core.get_in.call(null,data,new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [x,y], null),new cljs.core.Keyword(null,"low-clouds","low-clouds",-702988471),new cljs.core.Keyword(null,"coverage","coverage",1606292651)], null))),vmt$fmap$convert_$_iter__36984_$_iter__36986.call(null,cljs.core.rest.call(null,s__36987__$2)));
}
} else {
return null;
}
break;
}
});})(s__36985__$1,y,xs__6277__auto__,temp__5720__auto__))
,null,null));
});})(s__36985__$1,y,xs__6277__auto__,temp__5720__auto__))
;
var fs__4520__auto__ = cljs.core.seq.call(null,iterys__4519__auto__.call(null,cljs.core.range.call(null,cols)));
if(fs__4520__auto__){
return cljs.core.concat.call(null,fs__4520__auto__,vmt$fmap$convert_$_iter__36984.call(null,cljs.core.rest.call(null,s__36985__$1)));
} else {
var G__37021 = cljs.core.rest.call(null,s__36985__$1);
s__36985__$1 = G__37021;
continue;
}
} else {
return null;
}
break;
}
}),null,null));
});
return iter__4523__auto__.call(null,cljs.core.range.call(null,rows));
})(),(function (){var iter__4523__auto__ = (function vmt$fmap$convert_$_iter__36990(s__36991){
return (new cljs.core.LazySeq(null,(function (){
var s__36991__$1 = s__36991;
while(true){
var temp__5720__auto__ = cljs.core.seq.call(null,s__36991__$1);
if(temp__5720__auto__){
var xs__6277__auto__ = temp__5720__auto__;
var y = cljs.core.first.call(null,xs__6277__auto__);
var iterys__4519__auto__ = ((function (s__36991__$1,y,xs__6277__auto__,temp__5720__auto__){
return (function vmt$fmap$convert_$_iter__36990_$_iter__36992(s__36993){
return (new cljs.core.LazySeq(null,((function (s__36991__$1,y,xs__6277__auto__,temp__5720__auto__){
return (function (){
var s__36993__$1 = s__36993;
while(true){
var temp__5720__auto____$1 = cljs.core.seq.call(null,s__36993__$1);
if(temp__5720__auto____$1){
var s__36993__$2 = temp__5720__auto____$1;
if(cljs.core.chunked_seq_QMARK_.call(null,s__36993__$2)){
var c__4521__auto__ = cljs.core.chunk_first.call(null,s__36993__$2);
var size__4522__auto__ = cljs.core.count.call(null,c__4521__auto__);
var b__36995 = cljs.core.chunk_buffer.call(null,size__4522__auto__);
if((function (){var i__36994 = (0);
while(true){
if((i__36994 < size__4522__auto__)){
var x = cljs.core._nth.call(null,c__4521__auto__,i__36994);
cljs.core.chunk_append.call(null,b__36995,(function (){var or__4131__auto__ = (function (){var G__36997 = data;
var G__36997__$1 = (((G__36997 == null))?null:cljs.core.get.call(null,G__36997,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [x,y], null)));
var G__36997__$2 = (((G__36997__$1 == null))?null:new cljs.core.Keyword(null,"pressure","pressure",505343747).cljs$core$IFn$_invoke$arity$1(G__36997__$1));
if((G__36997__$2 == null)){
return null;
} else {
return weathergen.model.inhg__GT_mmhg.call(null,G__36997__$2);
}
})();
if(cljs.core.truth_(or__4131__auto__)){
return or__4131__auto__;
} else {
if((0.1 < cljs.core.rand.call(null))){
return cljs.core.println.call(null,"pressure is nil",new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [x,y,cljs.core.get.call(null,data,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [x,y], null))], null));
} else {
return null;
}
}
})());

var G__37022 = (i__36994 + (1));
i__36994 = G__37022;
continue;
} else {
return true;
}
break;
}
})()){
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__36995),vmt$fmap$convert_$_iter__36990_$_iter__36992.call(null,cljs.core.chunk_rest.call(null,s__36993__$2)));
} else {
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__36995),null);
}
} else {
var x = cljs.core.first.call(null,s__36993__$2);
return cljs.core.cons.call(null,(function (){var or__4131__auto__ = (function (){var G__36999 = data;
var G__36999__$1 = (((G__36999 == null))?null:cljs.core.get.call(null,G__36999,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [x,y], null)));
var G__36999__$2 = (((G__36999__$1 == null))?null:new cljs.core.Keyword(null,"pressure","pressure",505343747).cljs$core$IFn$_invoke$arity$1(G__36999__$1));
if((G__36999__$2 == null)){
return null;
} else {
return weathergen.model.inhg__GT_mmhg.call(null,G__36999__$2);
}
})();
if(cljs.core.truth_(or__4131__auto__)){
return or__4131__auto__;
} else {
if((0.1 < cljs.core.rand.call(null))){
return cljs.core.println.call(null,"pressure is nil",new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [x,y,cljs.core.get.call(null,data,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [x,y], null))], null));
} else {
return null;
}
}
})(),vmt$fmap$convert_$_iter__36990_$_iter__36992.call(null,cljs.core.rest.call(null,s__36993__$2)));
}
} else {
return null;
}
break;
}
});})(s__36991__$1,y,xs__6277__auto__,temp__5720__auto__))
,null,null));
});})(s__36991__$1,y,xs__6277__auto__,temp__5720__auto__))
;
var fs__4520__auto__ = cljs.core.seq.call(null,iterys__4519__auto__.call(null,cljs.core.range.call(null,cols)));
if(fs__4520__auto__){
return cljs.core.concat.call(null,fs__4520__auto__,vmt$fmap$convert_$_iter__36990.call(null,cljs.core.rest.call(null,s__36991__$1)));
} else {
var G__37023 = cljs.core.rest.call(null,s__36991__$1);
s__36991__$1 = G__37023;
continue;
}
} else {
return null;
}
break;
}
}),null,null));
});
return iter__4523__auto__.call(null,cljs.core.range.call(null,rows));
})(),(function (){var iter__4523__auto__ = (function vmt$fmap$convert_$_iter__37000(s__37001){
return (new cljs.core.LazySeq(null,(function (){
var s__37001__$1 = s__37001;
while(true){
var temp__5720__auto__ = cljs.core.seq.call(null,s__37001__$1);
if(temp__5720__auto__){
var xs__6277__auto__ = temp__5720__auto__;
var y = cljs.core.first.call(null,xs__6277__auto__);
var iterys__4519__auto__ = ((function (s__37001__$1,y,xs__6277__auto__,temp__5720__auto__){
return (function vmt$fmap$convert_$_iter__37000_$_iter__37002(s__37003){
return (new cljs.core.LazySeq(null,((function (s__37001__$1,y,xs__6277__auto__,temp__5720__auto__){
return (function (){
var s__37003__$1 = s__37003;
while(true){
var temp__5720__auto____$1 = cljs.core.seq.call(null,s__37003__$1);
if(temp__5720__auto____$1){
var s__37003__$2 = temp__5720__auto____$1;
if(cljs.core.chunked_seq_QMARK_.call(null,s__37003__$2)){
var c__4521__auto__ = cljs.core.chunk_first.call(null,s__37003__$2);
var size__4522__auto__ = cljs.core.count.call(null,c__4521__auto__);
var b__37005 = cljs.core.chunk_buffer.call(null,size__4522__auto__);
if((function (){var i__37004 = (0);
while(true){
if((i__37004 < size__4522__auto__)){
var x = cljs.core._nth.call(null,c__4521__auto__,i__37004);
cljs.core.chunk_append.call(null,b__37005,vmt.fmap.weather_type__GT_code.call(null,new cljs.core.Keyword(null,"type","type",1174270348).cljs$core$IFn$_invoke$arity$1(cljs.core.get.call(null,data,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [x,y], null)))));

var G__37024 = (i__37004 + (1));
i__37004 = G__37024;
continue;
} else {
return true;
}
break;
}
})()){
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__37005),vmt$fmap$convert_$_iter__37000_$_iter__37002.call(null,cljs.core.chunk_rest.call(null,s__37003__$2)));
} else {
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__37005),null);
}
} else {
var x = cljs.core.first.call(null,s__37003__$2);
return cljs.core.cons.call(null,vmt.fmap.weather_type__GT_code.call(null,new cljs.core.Keyword(null,"type","type",1174270348).cljs$core$IFn$_invoke$arity$1(cljs.core.get.call(null,data,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [x,y], null)))),vmt$fmap$convert_$_iter__37000_$_iter__37002.call(null,cljs.core.rest.call(null,s__37003__$2)));
}
} else {
return null;
}
break;
}
});})(s__37001__$1,y,xs__6277__auto__,temp__5720__auto__))
,null,null));
});})(s__37001__$1,y,xs__6277__auto__,temp__5720__auto__))
;
var fs__4520__auto__ = cljs.core.seq.call(null,iterys__4519__auto__.call(null,cljs.core.range.call(null,cols)));
if(fs__4520__auto__){
return cljs.core.concat.call(null,fs__4520__auto__,vmt$fmap$convert_$_iter__37000.call(null,cljs.core.rest.call(null,s__37001__$1)));
} else {
var G__37025 = cljs.core.rest.call(null,s__37001__$1);
s__37001__$1 = G__37025;
continue;
}
} else {
return null;
}
break;
}
}),null,null));
});
return iter__4523__auto__.call(null,cljs.core.range.call(null,rows));
})()]);
});
/**
 * Given weather data in the VMT format, return a buffer or blob encoding it.
 */
vmt.fmap.encode = (function vmt$fmap$encode(data,weather_params,movement_params,cloud_params){
var vec__37026 = new cljs.core.Keyword(null,"cell-count","cell-count",-441457582).cljs$core$IFn$_invoke$arity$1(weather_params);
var rows = cljs.core.nth.call(null,vec__37026,(0),null);
var cols = cljs.core.nth.call(null,vec__37026,(1),null);
var header = new cljs.core.PersistentArrayMap(null, 8, [new cljs.core.Keyword("vmt.fmap","version","vmt.fmap/version",-891566703),(5),new cljs.core.Keyword("vmt.fmap","rows","vmt.fmap/rows",-2077747017),rows,new cljs.core.Keyword("vmt.fmap","cols","vmt.fmap/cols",-579722870),cols,new cljs.core.Keyword("vmt.fmap","map-move-heading","vmt.fmap/map-move-heading",-1087640792),cljs.core.get_in.call(null,movement_params,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"direction","direction",-633359395),new cljs.core.Keyword(null,"heading","heading",-1312171873)], null)),new cljs.core.Keyword("vmt.fmap","map-move-speed","vmt.fmap/map-move-speed",-502838238),cljs.core.get_in.call(null,movement_params,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"direction","direction",-633359395),new cljs.core.Keyword(null,"speed","speed",1257663751)], null)),new cljs.core.Keyword("vmt.fmap","stratus-z-fair","vmt.fmap/stratus-z-fair",680651391),new cljs.core.Keyword(null,"stratus-z-fair","stratus-z-fair",2031975528).cljs$core$IFn$_invoke$arity$1(cloud_params),new cljs.core.Keyword("vmt.fmap","stratus-z-inclement","vmt.fmap/stratus-z-inclement",-1379631644),new cljs.core.Keyword(null,"stratus-z-inclement","stratus-z-inclement",1983411333).cljs$core$IFn$_invoke$arity$1(cloud_params),new cljs.core.Keyword("vmt.fmap","contrails","vmt.fmap/contrails",-2100804586),new cljs.core.Keyword(null,"contrails","contrails",1430581743).cljs$core$IFn$_invoke$arity$1(cloud_params)], null);
var data_spec = vmt.fmap.data_spec.call(null,header);
var buf = octet.core.allocate.call(null,(octet.core.size.call(null,vmt.fmap.header_spec) + octet.core.size.call(null,data_spec)));
var _STAR_byte_order_STAR__orig_val__37029_37031 = octet.buffer._STAR_byte_order_STAR_;
var _STAR_byte_order_STAR__temp_val__37030_37032 = new cljs.core.Keyword(null,"little-endian","little-endian",1877303413);
octet.buffer._STAR_byte_order_STAR_ = _STAR_byte_order_STAR__temp_val__37030_37032;

try{octet.core.write_BANG_.call(null,buf,header,vmt.fmap.header_spec);

octet.core.write_BANG_.call(null,buf,vmt.fmap.convert.call(null,data,rows,cols),data_spec,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"offset","offset",296498311),octet.core.size.call(null,vmt.fmap.header_spec)], null));
}finally {octet.buffer._STAR_byte_order_STAR_ = _STAR_byte_order_STAR__orig_val__37029_37031;
}
return buf;
});
