Skip to content

Commit

Permalink
fix(data): update data triggers
Browse files Browse the repository at this point in the history
  • Loading branch information
pwambach committed Jun 22, 2020
1 parent 6738a05 commit bd21777
Show file tree
Hide file tree
Showing 22 changed files with 62 additions and 59 deletions.
2 changes: 1 addition & 1 deletion data/gdal-colors/colors-ice_conc.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
10000 0 255 0
0 255 0 0
0 255 0 0 0
nv 0 255 255 0
10 changes: 5 additions & 5 deletions data/layers-config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"fire.burned_area": {
"colorMap": "hot",
"colorMap": "afmhot",
"timeFormat": {
"year": "2-digit",
"month": "numeric",
Expand All @@ -24,15 +24,15 @@
}
},
"aerosol.AOD550_mean": {
"colorMap": "inferno",
"colorMap": "Oranges",
"timeFormat": {
"year": "numeric",
"month": "long",
"day": "2-digit"
}
},
"cloud.cfc": {
"colorMap": "bone",
"colorMap": "gray",
"timeFormat": {
"year": "numeric",
"month": "long",
Expand All @@ -56,15 +56,15 @@
}
},
"soil_moisture.sm": {
"colorMap": "inferno",
"colorMap": "BrBG",
"timeFormat": {
"year": "numeric",
"month": "long",
"day": "2-digit"
}
},
"ozone.atmosphere_mole_content_of_ozone": {
"colorMap": "jet",
"colorMap": "viridis",
"timeFormat": {
"year": "numeric",
"month": "long",
Expand Down
6 changes: 3 additions & 3 deletions data/triggers/aerosol_aod550_mean.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
TIMEOUT=8000
LAYER_ID="aerosol.AOD550_mean"
VARIABLE_ID="AOD550_mean"
VERSION="test"
VERSION="0.5.1"
ZOOM_LEVELS="0-3"
MIN="auto"
MAX="auto"
MIN="0"
MAX="5"
MACHINE_TYPE="N1_HIGHCPU_8"

if [ ! -f ./package.json ]; then
Expand Down
9 changes: 6 additions & 3 deletions data/triggers/biomass_agb.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/usr/bin/env bash

TIMEOUT=2000
TIMEOUT=8000
LAYER_ID="biomass.agb"
VARIABLE_ID="agb"
VERSION="0.4.1"
ZOOM_LEVELS="0-7"
VERSION="0.5.1"
ZOOM_LEVELS="0-5"
MIN_LON="-180"
MAX_LON="180"
MIN_LAT="-60"
Expand All @@ -18,6 +18,9 @@ if [ ! -f ./package.json ]; then
exit 1
fi

# Note! If process takes too long use "-ts 81000 x 31500 \" in gdalwarp command to
# output only a 1/5th-resolution image

gcloud builds submit --config ./ci/cloudbuild-tiles-reproject.yaml \
--machine-type=$MACHINE_TYPE \
--timeout=$TIMEOUT \
Expand Down
8 changes: 4 additions & 4 deletions data/triggers/cloud_cfc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
TIMEOUT=8000
LAYER_ID="cloud.cfc"
VARIABLE_ID="cfc"
VERSION="test"
ZOOM_LEVELS="0-4"
MIN="auto"
MAX="auto"
VERSION="0.5.1"
ZOOM_LEVELS="0-3"
MIN="0"
MAX="1"
MACHINE_TYPE="N1_HIGHCPU_8"

if [ ! -f ./package.json ]; then
Expand Down
6 changes: 3 additions & 3 deletions data/triggers/fire_burned_area.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
TIMEOUT=8000
LAYER_ID="fire.burned_area"
VARIABLE_ID="burned_area"
VERSION="test"
VERSION="0.5.1"
ZOOM_LEVELS="0-3"
MIN="auto"
MAX="auto"
MIN="0"
MAX="400000000"
MACHINE_TYPE="N1_HIGHCPU_8"

if [ ! -f ./package.json ]; then
Expand Down
2 changes: 1 addition & 1 deletion data/triggers/greenhouse_xch4.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
TIMEOUT=3000
LAYER_ID="greenhouse.xch4"
VARIABLE_ID="xch4"
VERSION="0.4.1"
VERSION="0.5.1"
ZOOM_LEVELS="0-2"
MIN_LON="-180"
MAX_LON="180"
Expand Down
2 changes: 1 addition & 1 deletion data/triggers/greenhouse_xco2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
TIMEOUT=3000
LAYER_ID="greenhouse.xco2"
VARIABLE_ID="xco2"
VERSION="0.4.1"
VERSION="0.5.1"
ZOOM_LEVELS="0-3"
MIN_LON="-180"
MAX_LON="180"
Expand Down
2 changes: 1 addition & 1 deletion data/triggers/greenland_ice_sec.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
TIMEOUT=2000
LAYER_ID="greenland_ice.sec"
VARIABLE_ID="SEC"
VERSION="0.4.1"
VERSION="0.5.1"
ZOOM_LEVELS="0-3"
MIN_LON="-90"
MAX_LON="7.594643368591434"
Expand Down
4 changes: 2 additions & 2 deletions data/triggers/land_cover_lccs_class.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/env bash

TIMEOUT=8000
TIMEOUT=12000
LAYER_ID="land_cover.lccs_class"
VARIABLE_ID="lccs_class"
VERSION="0.4.1"
VERSION="0.5.1"
ZOOM_LEVELS="0-6"
MIN_LON="-180"
MAX_LON="180"
Expand Down
8 changes: 4 additions & 4 deletions data/triggers/oc_chlor_a.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/usr/bin/env bash

TIMEOUT=8000
TIMEOUT=12000
LAYER_ID="oc.chlor_a"
VARIABLE_ID="chlor_a"
VERSION="test"
ZOOM_LEVELS="0-4"
VERSION="0.5.1"
ZOOM_LEVELS="0-3"
MIN=0
MAX=2
MACHINE_TYPE="N1_HIGHCPU_8"
Expand All @@ -14,8 +14,8 @@ if [ ! -f ./package.json ]; then
exit 1
fi

# --machine-type=$MACHINE_TYPE \
gcloud builds submit --config ./ci/cloudbuild-tiles.yaml \
--machine-type=$MACHINE_TYPE \
--timeout=$TIMEOUT \
--substitutions _LAYER_ID=$LAYER_ID,_VARIABLE_ID=$VARIABLE_ID,_ZOOM_LEVELS=$ZOOM_LEVELS,_VERSION=$VERSION,_MIN=$MIN,_MAX=$MAX \
.
6 changes: 3 additions & 3 deletions data/triggers/ozone_atmosphere_mole_content_of_ozone.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
TIMEOUT=8000
LAYER_ID="ozone.atmosphere_mole_content_of_ozone"
VARIABLE_ID="atmosphere_mole_content_of_ozone"
VERSION="test"
VERSION="0.5.1"
ZOOM_LEVELS="0-3"
MIN="auto"
MAX="auto"
MIN="100"
MAX="500"
MACHINE_TYPE="N1_HIGHCPU_8"

if [ ! -f ./package.json ]; then
Expand Down
2 changes: 1 addition & 1 deletion data/triggers/permafrost_pfr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
TIMEOUT=2000
LAYER_ID="permafrost.pfr"
VARIABLE_ID="PFR"
VERSION="0.4.1"
VERSION="0.5.1"
ZOOM_LEVELS="0-4"
MIN_LON="-180"
MAX_LON="180"
Expand Down
8 changes: 4 additions & 4 deletions data/triggers/sea_ice_nh_ice_conc.sh
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
#!/usr/bin/env bash

TIMEOUT=2000
TIMEOUT=8000
LAYER_ID="sea_ice_nh.ice_conc"
VARIABLE_ID="ice_conc"
VERSION="0.4.1"
VERSION="0.5.1"
ZOOM_LEVELS="0-4"
MIN_LON="-180"
MAX_LON="180"
MIN_LAT="16.62393"
MAX_LAT="90"
MIN="auto"
MAX="auto"
MIN="0"
MAX="100"
MACHINE_TYPE="N1_HIGHCPU_8"

if [ ! -f ./package.json ]; then
Expand Down
8 changes: 4 additions & 4 deletions data/triggers/sea_ice_sh_ice_conc.sh
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
#!/usr/bin/env bash

TIMEOUT=2000
TIMEOUT=8000
LAYER_ID="sea_ice_sh.ice_conc"
VARIABLE_ID="ice_conc"
VERSION="0.4.1"
VERSION="0.5.1"
ZOOM_LEVELS="0-3"
MIN_LON="-180"
MAX_LON="180"
MIN_LAT="-90"
MAX_LAT="-16.62393"
MIN="auto"
MAX="auto"
MIN="0"
MAX="100"
MACHINE_TYPE="N1_HIGHCPU_8"

if [ ! -f ./package.json ]; then
Expand Down
10 changes: 5 additions & 5 deletions data/triggers/sea_level_sla.sh
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
#!/usr/bin/env bash

TIMEOUT=8000
TIMEOUT=10000
LAYER_ID="sea_level.sla"
VARIABLE_ID="sla"
VERSION="0.4.1"
VERSION="0.5.1"
ZOOM_LEVELS="0-3"
MIN="auto"
MAX="auto"
MIN="-0.5"
MAX="0.5"
MACHINE_TYPE="N1_HIGHCPU_8"

if [ ! -f ./package.json ]; then
echo "You have to be in the root folder of the project to run this script!"
exit 1
fi

# --machine-type=$MACHINE_TYPE \
gcloud builds submit --config ./ci/cloudbuild-tiles.yaml \
--machine-type=$MACHINE_TYPE \
--timeout=$TIMEOUT \
--substitutions _LAYER_ID=$LAYER_ID,_VARIABLE_ID=$VARIABLE_ID,_ZOOM_LEVELS=$ZOOM_LEVELS,_VERSION=$VERSION,_MIN=$MIN,_MAX=$MAX \
.
2 changes: 1 addition & 1 deletion data/triggers/sea_state_swh_mean.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
TIMEOUT=8000
LAYER_ID="sea_state.swh_mean"
VARIABLE_ID="swh_mean"
VERSION="test"
VERSION="0.5.1"
ZOOM_LEVELS="0-3"
MIN="auto"
MAX="auto"
Expand Down
2 changes: 1 addition & 1 deletion data/triggers/sea_surface_salinity_sss.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
TIMEOUT=8000
LAYER_ID="sea_surface_salinity.sss"
VARIABLE_ID="sss"
VERSION="test"
VERSION="0.5.1"
ZOOM_LEVELS="0-3"
MIN="auto"
MAX="auto"
Expand Down
2 changes: 1 addition & 1 deletion data/triggers/snow_swe.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
TIMEOUT=8000
LAYER_ID="snow.swe"
VARIABLE_ID="swe"
VERSION="0.4.1"
VERSION="0.5.1"
ZOOM_LEVELS="0-3"
MIN="auto"
MAX="auto"
Expand Down
6 changes: 3 additions & 3 deletions data/triggers/soil_moisture_sm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
TIMEOUT=8000
LAYER_ID="soil_moisture.sm"
VARIABLE_ID="sm"
VERSION="test"
VERSION="0.5.1"
ZOOM_LEVELS="0-3"
MIN="auto"
MAX="auto"
MIN="0"
MAX="0.4"
MACHINE_TYPE="N1_HIGHCPU_8"

if [ ! -f ./package.json ]; then
Expand Down
8 changes: 4 additions & 4 deletions data/triggers/sst_analysed_sst.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@
TIMEOUT=12000
LAYER_ID="sst.analysed_sst"
VARIABLE_ID="analysed_sst"
VERSION="test"
VERSION="0.5.1"
ZOOM_LEVELS="0-4"
MIN="auto"
MAX="auto"
MIN="-5"
MAX="35"
MACHINE_TYPE="N1_HIGHCPU_32"

if [ ! -f ./package.json ]; then
echo "You have to be in the root folder of the project to run this script!"
exit 1
fi

# --machine-type=$MACHINE_TYPE \
gcloud builds submit --config ./ci/cloudbuild-tiles.yaml \
--machine-type=$MACHINE_TYPE \
--timeout=$TIMEOUT \
--substitutions _LAYER_ID=$LAYER_ID,_VARIABLE_ID=$VARIABLE_ID,_ZOOM_LEVELS=$ZOOM_LEVELS,_VERSION=$VERSION,_MIN=$MIN,_MAX=$MAX \
.
8 changes: 4 additions & 4 deletions data/utility.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ def write_world_file(shape, attributes):
lon_max = 180

try:
lat_min = attributes['geospatial_lat_min']
lat_max = attributes['geospatial_lat_max']
lon_min = attributes['geospatial_lon_min']
lon_max = attributes['geospatial_lon_max']
lat_min = float(attributes['geospatial_lat_min'])
lat_max = float(attributes['geospatial_lat_max'])
lon_min = float(attributes['geospatial_lon_min'])
lon_max = float(attributes['geospatial_lon_max'])
except KeyError:
print("Write Worldfile: Could not read geospatil info using defauls!")

Expand Down

0 comments on commit bd21777

Please sign in to comment.