Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement pan-Arctic maps for all CMIP6-based items #181

Merged
merged 10 commits into from
Jan 14, 2025
10 changes: 8 additions & 2 deletions components/Map.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@ const mapStore = useMapStore()

const props = defineProps<{
mapId: string
crs?: string
}>()

let crs = props.crs || 'EPSG:3338'

onMounted(() => {
mapStore.create(props.mapId)
mapStore.create(props.mapId, crs)
})

onUnmounted(() => {
Expand All @@ -16,7 +19,7 @@ onUnmounted(() => {
</script>

<template>
<div :id="mapId" class="map"></div>
<div :id="mapId" :crs="crs" class="map"></div>
</template>

<style lang="scss" scoped>
Expand Down Expand Up @@ -45,4 +48,7 @@ onUnmounted(() => {
font-size: 0.8em;
}
}
:deep(.leaflet-marker-icon) {
cursor: grab;
}
</style>
3 changes: 2 additions & 1 deletion components/MapBlock.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<script setup lang="ts">
const props = defineProps<{
mapId: string
crs?: string
}>()
</script>

Expand All @@ -10,7 +11,7 @@ const props = defineProps<{
<slot name="layers"></slot>
</div>
<div class="column">
<Map :mapId="mapId" class="map" />
<Map :mapId="mapId" :crs="crs" class="map" />
</div>
</div>
</template>
Expand Down
14 changes: 7 additions & 7 deletions components/global/EvaporationCmip6.vue
Original file line number Diff line number Diff line change
Expand Up @@ -110,24 +110,24 @@ const layers: MapLayer[] = [

const legend: Record<string, LegendItem[]> = {
evspsbl: [
{ color: '#006837', label: '&lt;0µ kg/m<sup>2</sup>/s' },
{ color: '#538b69', label: '&lt;0µ kg/m<sup>2</sup>/s' },
{
color: '#31a354',
color: '#6eb47e',
label: '&ge;0µ kg/m<sup>2</sup>/s, &lt;10µ kg/m<sup>2</sup>/s',
},
{
color: '#78c679',
color: '#98cd97',
label: '&ge;10µ kg/m<sup>2</sup>/s, &lt;20µ kg/m<sup>2</sup>/s',
},
{
color: '#addd8e',
color: '#bbdea6',
label: '&ge;20µ kg/m<sup>2</sup>/s, &lt;30µ kg/m<sup>2</sup>/s',
},
{
color: '#d9f0a3',
color: '#dbebb5',
label: '&ge;30µ kg/m<sup>2</sup>/s, &lt;40µ kg/m<sup>2</sup>/s',
},
{ color: '#ffffcc', label: '&ge;40µ kg/m<sup>2</sup>/s' },
{ color: '#f5f5d1', label: '&ge;40µ kg/m<sup>2</sup>/s' },
],
}

Expand All @@ -149,7 +149,7 @@ onUnmounted(() => {
Intervals from 2025–2100 are based on the SSP5-8.5 emissions scenario.
</p>

<MapBlock :mapId="mapId" class="mb-6">
<MapBlock :mapId="mapId" crs="EPSG:3572" class="mb-6">
<template v-slot:layers>
<MapLayer :mapId="mapId" :layer="layers[0]" default>
<template v-slot:title>{{ layers[0].title }}</template>
Expand Down
12 changes: 6 additions & 6 deletions components/global/IndicatorDwCmip6.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ const layers: MapLayer[] = [

const legend: Record<string, LegendItem[]> = {
deep_winter_days: [
{ color: '#c6dbef', label: '&ge;1 day, &lt;10 days' },
{ color: '#9ecae1', label: '&ge;10 days, &lt;20 days' },
{ color: '#6baed6', label: '&ge;20 days, &lt;40 days' },
{ color: '#3182bd', label: '&ge;40 days, &lt;80 days' },
{ color: '#08519c', label: '&ge;80 days' },
{ color: '#cddce9', label: '&ge;0 days, &lt;10 days' },
{ color: '#b1d0e0', label: '&ge;10 days, &lt;20 days' },
{ color: '#8fbcd8', label: '&ge;20 days, &lt;40 days' },
{ color: '#699dc7', label: '&ge;40 days, &lt;80 days' },
{ color: '#507bb0', label: '&ge;80 days' },
],
}

Expand All @@ -68,7 +68,7 @@ mapStore.setLegendItems(mapId, legend)
scenario.
</p>

<MapBlock :mapId="mapId" class="mb-6">
<MapBlock :mapId="mapId" crs="EPSG:3572" class="mb-6">
<template v-slot:layers>
<MapLayer :mapId="mapId" :layer="layers[0]" default>
<template v-slot:title>{{ layers[0].title }}</template>
Expand Down
12 changes: 6 additions & 6 deletions components/global/IndicatorFtcCmip6.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ const layers: MapLayer[] = [

const legend: Record<string, LegendItem[]> = {
freeze_thaw_cycle: [
{ color: '#f7f7f7', label: '&ge;1 day, &lt;20 days' },
{ color: '#cccccc', label: '&ge;20 days, &lt;40 days' },
{ color: '#969696', label: '&ge;40 days, &lt;60 days' },
{ color: '#636363', label: '&ge;60 days, &lt;80 days' },
{ color: '#252525', label: '&ge;80 days' },
{ color: '#efefef', label: '&ge;0 days, &lt;20 days' },
{ color: '#dddddd', label: '&ge;20 days, &lt;40 days' },
{ color: '#ababab', label: '&ge;40 days, &lt;60 days' },
{ color: '#878787', label: '&ge;60 days, &lt;80 days' },
{ color: '#5c5c5c', label: '&ge;80 days' },
],
}

Expand All @@ -69,7 +69,7 @@ mapStore.setLegendItems(mapId, legend)
scenario.
</p>

<MapBlock :mapId="mapId" class="mb-6">
<MapBlock :mapId="mapId" crs="EPSG:3572" class="mb-6">
<template v-slot:layers>
<MapLayer :mapId="mapId" :layer="layers[0]" default>
<template v-slot:title>{{ layers[0].title }}</template>
Expand Down
12 changes: 6 additions & 6 deletions components/global/IndicatorRx1dayCmip6.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ const layers: MapLayer[] = [

const legend: Record<string, LegendItem[]> = {
rx1day: [
{ color: '#edf8fb', label: '&ge;0㎜, &lt;10㎜' },
{ color: '#b2e2e2', label: '&ge;10㎜, &lt;20㎜' },
{ color: '#66c2a4', label: '&ge;20㎜, &lt;30㎜' },
{ color: '#2ca25f', label: '&ge;30㎜, &lt;40㎜' },
{ color: '#006d2c', label: '&ge;40㎜' },
{ color: '#e9f0f2', label: '&ge;0㎜, &lt;10㎜' },
{ color: '#c0e1e2', label: '&ge;10㎜, &lt;20㎜' },
{ color: '#8dcbb5', label: '&ge;20㎜, &lt;30㎜' },
{ color: '#6ab385', label: '&ge;30㎜, &lt;40㎜' },
{ color: '#548f62', label: '&ge;40㎜' },
],
}

Expand All @@ -67,7 +67,7 @@ mapStore.setLegendItems(mapId, legend)
scenario.
</p>

<MapBlock :mapId="mapId" class="mb-6">
<MapBlock :mapId="mapId" crs="EPSG:3572" class="mb-6">
<template v-slot:layers>
<MapLayer :mapId="mapId" :layer="layers[0]" default>
<template v-slot:title>{{ layers[0].title }}</template>
Expand Down
12 changes: 6 additions & 6 deletions components/global/IndicatorSuCmip6.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ const layers: MapLayer[] = [

const legend: Record<string, LegendItem[]> = {
summer_days: [
{ color: '#fdd0a2', label: '&ge;1 day, &lt;5 days' },
{ color: '#fdae6b', label: '&ge;5 days, &lt;10 days' },
{ color: '#fd8d3c', label: '&ge;10 days, &lt;20 days' },
{ color: '#e6550d', label: '&ge;20 days, &lt;40 days' },
{ color: '#a63603', label: '&ge;40 days' },
{ color: '#f4d4b4', label: '&ge;0 days, &lt;5 days' },
{ color: '#f4bc8f', label: '&ge;5 days, &lt;10 days' },
{ color: '#f5a570', label: '&ge;10 days, &lt;20 days' },
{ color: '#e58057', label: '&ge;20 days, &lt;40 days' },
{ color: '#b8694d', label: '&ge;40 days' },
],
}

Expand All @@ -67,7 +67,7 @@ mapStore.setLegendItems(mapId, legend)
TaiESM1 model under the SSP5-8.5 emissions scenario.
</p>

<MapBlock :mapId="mapId" class="mb-6">
<MapBlock :mapId="mapId" crs="EPSG:3572" class="mb-6">
<template v-slot:layers>
<MapLayer :mapId="mapId" :layer="layers[0]" default>
<template v-slot:title>{{ layers[0].title }}</template>
Expand Down
32 changes: 16 additions & 16 deletions components/global/OceanographyCmip6.vue
Original file line number Diff line number Diff line change
Expand Up @@ -68,23 +68,23 @@ const layers: MapLayer[] = [

const legend: Record<string, LegendItem[]> = {
psl: [
{ color: '#4575b4', label: '&ge;100000 Pa, &lt;100250 Pa' },
{ color: '#91bfdb', label: '&ge;100250 Pa, &lt;100500 Pa' },
{ color: '#e0f3f8', label: '&ge;100500 Pa, &lt;100750 Pa' },
{ color: '#fee090', label: '&ge;100750 Pa, &lt;101000 Pa' },
{ color: '#fc8d59', label: '&ge;101000 Pa' },
{ color: '#7394c1', label: '&ge;100000 Pa, &lt;100250 Pa' },
{ color: '#a8c8db', label: '&ge;100250 Pa, &lt;100500 Pa' },
{ color: '#e0ecf1', label: '&ge;100500 Pa, &lt;100750 Pa' },
{ color: '#f4e0a9', label: '&ge;100750 Pa, &lt;101000 Pa' },
{ color: '#f4a582', label: '&ge;101000 Pa' },
],
ts: [
{ color: '#313695', label: '&lt;-20°C' },
{ color: '#4575b4', label: '&ge;-20°C, &lt;-15°C' },
{ color: '#74add1', label: '&ge;-15°C, &lt;-10°C' },
{ color: '#abd9e9', label: '&ge;-10°C, &lt;-5°C' },
{ color: '#e0f3f8', label: '&ge;-5°C, &lt;0°C' },
{ color: '#fee090', label: '&ge;0°C, &lt;5°C' },
{ color: '#fdae61', label: '&ge;5°C, &lt;10°C' },
{ color: '#f46d43', label: '&ge;10°C, &lt;15°C' },
{ color: '#d73027', label: '&ge;15°C, &lt;20°C' },
{ color: '#a50026', label: '&ge;20°C' },
{ color: '#6468ac', label: '&lt;-20°C' },
{ color: '#7394c1', label: '&ge;-20°C, &lt;-15°C' },
{ color: '#94bcd5', label: '&ge;-15°C, &lt;-10°C' },
{ color: '#badae5', label: '&ge;-10°C, &lt;-5°C' },
{ color: '#e0ecf1', label: '&ge;-5°C, &lt;0°C' },
{ color: '#f4e0a9', label: '&ge;0°C, &lt;5°C' },
{ color: '#f4bc88', label: '&ge;5°C, &lt;10°C' },
{ color: '#ef9073', label: '&ge;10°C, &lt;15°C' },
{ color: '#dc6961', label: '&ge;15°C, &lt;20°C' },
{ color: '#ba505e', label: '&ge;20°C' },
],
}

Expand All @@ -107,7 +107,7 @@ onUnmounted(() => {
SSP5-8.5 emissions scenario.
</p>

<MapBlock :mapId="mapId" class="mb-6">
<MapBlock :mapId="mapId" crs="EPSG:3572" class="mb-6">
<template v-slot:layers>
<h4 class="title is-4 mb-3">Sea Level Pressure</h4>
<MapLayer :mapId="mapId" :layer="layers[0]" default>
Expand Down
12 changes: 6 additions & 6 deletions components/global/PrecipitationCmip6.vue
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,11 @@ const layers: MapLayer[] = [

const legend: Record<string, LegendItem[]> = {
pr: [
{ color: '#edf8fbff', label: '&ge;0㎜, &lt;50㎜' },
{ color: '#b2e2e2ff', label: '&ge;50㎜, &lt;100㎜' },
{ color: '#66c2a4ff', label: '&ge;100㎜, &lt;150㎜' },
{ color: '#2ca25fff', label: '&ge;150㎜, &lt;200㎜' },
{ color: '#006d2cff', label: '&ge;200㎜' },
{ color: '#e9f0f2', label: '&ge;0㎜, &lt;50㎜' },
{ color: '#c0e1e2', label: '&ge;50㎜, &lt;100㎜' },
{ color: '#8dcbb5', label: '&ge;100㎜, &lt;150㎜' },
{ color: '#6ab385', label: '&ge;150㎜, &lt;200㎜' },
{ color: '#548f62', label: '&ge;200㎜' },
],
}

Expand All @@ -136,7 +136,7 @@ onUnmounted(() => {
Intervals from 2025–2100 are based on the SSP5-8.5 emissions scenario.
</p>

<MapBlock :mapId="mapId" class="mb-6">
<MapBlock :mapId="mapId" crs="EPSG:3572" class="mb-6">
<template v-slot:layers>
<MapLayer :mapId="mapId" :layer="layers[0]" default>
<template v-slot:title>{{ layers[0].title }}</template>
Expand Down
32 changes: 16 additions & 16 deletions components/global/SolarRadiationCloudCoverCmip6.vue
Original file line number Diff line number Diff line change
Expand Up @@ -97,54 +97,54 @@ const layers: MapLayer[] = [
const legend: Record<string, LegendItem[]> = {
rsds: [
{
color: '#ffffbf',
color: '#f5f5c8',
label: '&ge;0 W/m<sup>2</sup>, &lt;50 W/m<sup>2</sup>',
},
{
color: '#fee090',
color: '#f4e0a9',
label: '&ge;50 W/m<sup>2</sup>, &lt;100 W/m<sup>2</sup>',
},
{
color: '#fdae61',
color: '#f4bc88',
label: '&ge;100 W/m<sup>2</sup>, &lt;150 W/m<sup>2</sup>',
},
{
color: '#f46d43',
color: '#ef9073',
label: '&ge;150 W/m<sup>2</sup>, &lt;200 W/m<sup>2</sup>',
},
{
color: '#d73027',
color: '#dc6961',
label: '&ge;200 W/m<sup>2</sup>',
},
],
rlds: [
{
color: '#ffffbf',
color: '#f5f5c8',
label: '&ge;100 W/m<sup>100</sup>, &lt;175 W/m<sup>2</sup>',
},
{
color: '#fee090',
color: '#f4e0a9',
label: '&ge;175 W/m<sup>2</sup>, &lt;250 W/m<sup>2</sup>',
},
{
color: '#fdae61',
color: '#f4bc88',
label: '&ge;250 W/m<sup>2</sup>, &lt;325 W/m<sup>2</sup>',
},
{
color: '#f46d43',
color: '#ef9073',
label: '&ge;325 W/m<sup>2</sup>, &lt;400 W/m<sup>2</sup>',
},
{
color: '#d73027',
color: '#dc6961',
label: '&ge;400 W/m<sup>2</sup>',
},
],
clt: [
{ color: '#045a8d', label: '&ge;0%, &lt;60%' },
{ color: '#2b8cbe', label: '&ge;60%, &lt;70%' },
{ color: '#74a9cf', label: '&ge;70%, &lt;80%' },
{ color: '#bdc9e1', label: '&ge;80%, &lt;90%' },
{ color: '#f1eef6', label: '&ge;90%' },
{ color: '#5082a5', label: '&ge;0%, &lt;60%' },
{ color: '#67a4c7', label: '&ge;60%, &lt;70%' },
{ color: '#94b9d4', label: '&ge;70%, &lt;80%' },
{ color: '#c7cfe0', label: '&ge;80%, &lt;90%' },
{ color: '#ebe9f0', label: '&ge;90%' },
],
}

Expand All @@ -167,7 +167,7 @@ onUnmounted(() => {
year 2100 are based on the SSP5-8.5 emissions scenario.
</p>

<MapBlock :mapId="mapId" class="mb-6">
<MapBlock :mapId="mapId" crs="EPSG:3572" class="mb-6">
<template v-slot:layers>
<h4 class="title is-4 mb-3">Downwelling Shortwave Flux</h4>
<MapLayer :mapId="mapId" :layer="layers[0]" default>
Expand Down
Loading