[Swift-commit] r6746 - in SwiftTutorials/ATPESC_2013-08-06/modis: . modis05

davidk at ci.uchicago.edu davidk at ci.uchicago.edu
Mon Aug 5 10:51:37 CDT 2013


Author: davidk
Date: 2013-08-05 10:51:37 -0500 (Mon, 05 Aug 2013)
New Revision: 6746

Added:
   SwiftTutorials/ATPESC_2013-08-06/modis/modis05/
   SwiftTutorials/ATPESC_2013-08-06/modis/modis05/apps
   SwiftTutorials/ATPESC_2013-08-06/modis/modis05/clean.sh
   SwiftTutorials/ATPESC_2013-08-06/modis/modis05/data
   SwiftTutorials/ATPESC_2013-08-06/modis/modis05/modis05.swift
   SwiftTutorials/ATPESC_2013-08-06/modis/modis05/sites.tukey.xml
   SwiftTutorials/ATPESC_2013-08-06/modis/modis05/sites.xml
Log:
modis05


Added: SwiftTutorials/ATPESC_2013-08-06/modis/modis05/apps
===================================================================
--- SwiftTutorials/ATPESC_2013-08-06/modis/modis05/apps	                        (rev 0)
+++ SwiftTutorials/ATPESC_2013-08-06/modis/modis05/apps	2013-08-05 15:51:37 UTC (rev 6746)
@@ -0,0 +1,4 @@
+tukey getlanduse getlanduse.sh
+tukey analyzelanduse analyzelanduse.sh
+tukey markmap markmap.sh
+tukey colormodis colormodis.sh

Added: SwiftTutorials/ATPESC_2013-08-06/modis/modis05/clean.sh
===================================================================
--- SwiftTutorials/ATPESC_2013-08-06/modis/modis05/clean.sh	                        (rev 0)
+++ SwiftTutorials/ATPESC_2013-08-06/modis/modis05/clean.sh	2013-08-05 15:51:37 UTC (rev 6746)
@@ -0,0 +1,4 @@
+#!/bin/bash
+
+rm -rf gridmap.png colorImages selectedtiles.txt topselected.txt *.log *.rlog *.d *.kml _concurrent *.swiftx landuse
+


Property changes on: SwiftTutorials/ATPESC_2013-08-06/modis/modis05/clean.sh
___________________________________________________________________
Added: svn:executable
   + *

Added: SwiftTutorials/ATPESC_2013-08-06/modis/modis05/data
===================================================================
--- SwiftTutorials/ATPESC_2013-08-06/modis/modis05/data	                        (rev 0)
+++ SwiftTutorials/ATPESC_2013-08-06/modis/modis05/data	2013-08-05 15:51:37 UTC (rev 6746)
@@ -0,0 +1 @@
+link ../data
\ No newline at end of file


Property changes on: SwiftTutorials/ATPESC_2013-08-06/modis/modis05/data
___________________________________________________________________
Added: svn:special
   + *

Added: SwiftTutorials/ATPESC_2013-08-06/modis/modis05/modis05.swift
===================================================================
--- SwiftTutorials/ATPESC_2013-08-06/modis/modis05/modis05.swift	                        (rev 0)
+++ SwiftTutorials/ATPESC_2013-08-06/modis/modis05/modis05.swift	2013-08-05 15:51:37 UTC (rev 6746)
@@ -0,0 +1,55 @@
+type file;
+type imagefile;
+type landuse;
+
+app (landuse output) getLandUse (imagefile input)
+{
+  getlanduse @filename(input) stdout=@filename(output);
+}
+
+app (file output, file tilelist) analyzeLandUse (landuse input[], string usetype, int maxnum)
+{
+  analyzelanduse @output @tilelist usetype maxnum @input;
+}
+
+app (imagefile grid) markMap (file tilelist) 
+{
+  markmap @tilelist @grid;
+}
+
+app (imagefile output) colorModis (imagefile input)
+{
+  colormodis @input @output;
+}
+
+# Constants and command line arguments
+int nFiles       = @toInt(@arg("nfiles", "1000"));
+int nSelect      = @toInt(@arg("nselect", "10"));
+string landType  = @arg("landtype", "urban");
+string MODISdir  = @arg("modisdir", "data/global");
+
+# Input Dataset
+imagefile geos[] <ext; exec="../bin/modis.mapper", location=MODISdir, suffix=".rgb", n=nFiles>;
+
+# Compute the land use summary of each MODIS tile
+landuse land[] <structured_regexp_mapper; source=geos, match="(h..v..)", transform=@strcat("landuse/\\1.landuse.byfreq")>;
+
+foreach g,i in geos {
+    land[i] = getLandUse(g);
+}
+
+# Find the top N tiles (by total area of selected landuse types)
+file topSelected <"topselected.txt">;
+file selectedTiles <"selectedtiles.txt">;
+(topSelected, selectedTiles) = analyzeLandUse(land, landType, nSelect);
+
+# Mark the top N tiles on a sinusoidal gridded map
+imagefile gridmap <"gridmap.png">;
+gridmap = markMap(topSelected);
+
+# Create multi-color images for all tiles
+imagefile colorImage[] <structured_regexp_mapper; source=geos, match="(h..v..)", transform=@strcat("colorImages/\\1.color.rgb")>;
+
+foreach g, i in geos {
+  colorImage[i] = colorModis(g);
+}

Added: SwiftTutorials/ATPESC_2013-08-06/modis/modis05/sites.tukey.xml
===================================================================
--- SwiftTutorials/ATPESC_2013-08-06/modis/modis05/sites.tukey.xml	                        (rev 0)
+++ SwiftTutorials/ATPESC_2013-08-06/modis/modis05/sites.tukey.xml	2013-08-05 15:51:37 UTC (rev 6746)
@@ -0,0 +1,13 @@
+<config>
+  <pool handle="midway-westmere">
+    <execution provider="coaster" jobmanager="local:slurm"/>
+    <profile namespace="globus" key="jobsPerNode">12</profile>
+    <profile namespace="globus" key="maxWalltime">00:02:00</profile>
+    <profile namespace="globus" key="highOverAllocation">100</profile>
+    <profile namespace="globus" key="lowOverAllocation">100</profile>
+    <profile namespace="globus" key="queue">westmere</profile>
+    <profile namespace="karajan" key="initialScore">10000</profile>
+    <filesystem provider="local"/>
+    <workdirectory>/scratch/midway/{env.USER}/work</workdirectory>
+  </pool>
+</config>

Added: SwiftTutorials/ATPESC_2013-08-06/modis/modis05/sites.xml
===================================================================
--- SwiftTutorials/ATPESC_2013-08-06/modis/modis05/sites.xml	                        (rev 0)
+++ SwiftTutorials/ATPESC_2013-08-06/modis/modis05/sites.xml	2013-08-05 15:51:37 UTC (rev 6746)
@@ -0,0 +1,13 @@
+<config>
+  <pool handle="tukey">
+    <execution provider="coaster" jobmanager="local:slurm"/>
+    <profile namespace="globus" key="jobsPerNode">16</profile>
+    <profile namespace="globus" key="maxWalltime">00:05:00</profile>
+    <profile namespace="globus" key="highOverAllocation">100</profile>
+    <profile namespace="globus" key="lowOverAllocation">100</profile>
+    <profile namespace="globus" key="queue">sandyb</profile>
+    <profile namespace="karajan" key="initialScore">10000</profile>
+    <filesystem provider="local"/>
+    <workdirectory>/scratch/midway/{env.USER}</workdirectory>
+  </pool>
+</config>




More information about the Swift-commit mailing list