[Swift-commit] r5043 - in SwiftApps: . DSSAT DSSAT/bin

ketan at ci.uchicago.edu ketan at ci.uchicago.edu
Thu Sep 1 10:31:00 CDT 2011


Author: ketan
Date: 2011-09-01 10:31:00 -0500 (Thu, 01 Sep 2011)
New Revision: 5043

Added:
   SwiftApps/DSSAT/
   SwiftApps/DSSAT/RunDSSAT.swift
   SwiftApps/DSSAT/RunSwift.sh
   SwiftApps/DSSAT/bin/
   SwiftApps/DSSAT/bin/RunDSSAT.sh
   SwiftApps/DSSAT/bin/gridCheck.sh
   SwiftApps/DSSAT/counter.txt
   SwiftApps/DSSAT/tc
Log:
added DSSAT app to SwiftApps repo

Added: SwiftApps/DSSAT/RunDSSAT.swift
===================================================================
--- SwiftApps/DSSAT/RunDSSAT.swift	                        (rev 0)
+++ SwiftApps/DSSAT/RunDSSAT.swift	2011-09-01 15:31:00 UTC (rev 5043)
@@ -0,0 +1,31 @@
+type file;
+
+app (file output) RunDSSAT (file input[])
+{
+  RunDSSAT @output @input ;
+}
+
+//This is unused at the moment since it was used to check bad cells (bad cell means that the cell doesn't have soil files)
+app (file output) gridCheck (string path)
+{
+  gridCheck @output path;
+}
+
+//gridList.txt contains the list of good grid cells
+//file gl <"gridList.txt">;
+
+//gridCheck app discards empty grid cells or those containing unusable files 
+//gl = gridCheck(@arg("path","/gpfs/pads/projects/CI-SES000031/data/dssat/grid/"));
+
+string gridLists[] = readData("gridList.txt");
+
+foreach g,i in gridLists
+{
+//file out<single_file_mapper;file=@strcat("output/",gridLists[i],"output.tar")>;
+file out<concurrent_mapper;prefix="output", suffix=".tar">;
+
+file in1[] <filesys_mapper;location=@strcat(@arg("path","/gpfs/pads/projects/CI-SES000031/data/dssat/grid/"), gridLists[i]), pattern="*">;
+
+out = RunDSSAT(in1);
+}
+

Added: SwiftApps/DSSAT/RunSwift.sh
===================================================================
--- SwiftApps/DSSAT/RunSwift.sh	                        (rev 0)
+++ SwiftApps/DSSAT/RunSwift.sh	2011-09-01 15:31:00 UTC (rev 5043)
@@ -0,0 +1,14 @@
+count=$(head -1 counter.txt);
+expr $count + 1 > counter.txt
+#echo $count
+mkdir run$count
+cp RunDSSAT.swift run$count/
+cp gridList.txt run$count/
+cp sites.xml run$count/
+cp beagle-coaster-trunk.xml run$count/
+cp tc run$count/
+cp cf run$count/
+cd run$count
+#time swift -tc.file tc -sites.file sites.xml -config cf  RunDSSAT.swift >& swift.out
+SWIFT_HEAP_MAX=7000M time swift -tc.file tc -sites.file beagle-coaster-trunk.xml -config cf  RunDSSAT.swift >& swift.out
+


Property changes on: SwiftApps/DSSAT/RunSwift.sh
___________________________________________________________________
Added: svn:executable
   + *

Added: SwiftApps/DSSAT/bin/RunDSSAT.sh
===================================================================
--- SwiftApps/DSSAT/bin/RunDSSAT.sh	                        (rev 0)
+++ SwiftApps/DSSAT/bin/RunDSSAT.sh	2011-09-01 15:31:00 UTC (rev 5043)
@@ -0,0 +1,34 @@
+#!/bin/bash
+
+rm -rf run
+mkdir run
+cd run
+mkdir data
+out=$1
+
+#copy files of grid cell into data directory
+for i in $2
+do
+  cp ../$i data;
+done
+                                              
+cp /gpfs/pads/projects/CI-SES000031/csm/sim/* data          
+cp /gpfs/pads/projects/CI-SES000031/csm/*.CDE data
+
+cp /gpfs/pads/projects/CI-SES000031/csm/dssat.papia/bin/*.EXE .
+cd data                                                             
+
+
+../DSSAT040.EXE A H1234567.MZX > RESULT.OUT
+ 
+
+cd ..
+mkdir output
+
+mv data/*.OUT output
+mv data/RESULT.OUT output
+
+tar cf ../$out output
+
+exit
+


Property changes on: SwiftApps/DSSAT/bin/RunDSSAT.sh
___________________________________________________________________
Added: svn:executable
   + *

Added: SwiftApps/DSSAT/bin/gridCheck.sh
===================================================================
--- SwiftApps/DSSAT/bin/gridCheck.sh	                        (rev 0)
+++ SwiftApps/DSSAT/bin/gridCheck.sh	2011-09-01 15:31:00 UTC (rev 5043)
@@ -0,0 +1,12 @@
+#ls $2 -1 | head >> $1;
+
+n=$(ls $2 -1 | head -1000);
+
+for i in $n
+do
+ if [[ -f $2$i/SOIL.SOL &&  $(sed -n '6p' $2/$i/GENERIC1.WTH | grep 'NA'|wc -l) != 1 ]];
+ then
+ echo $i >> $1; 
+ fi
+done
+


Property changes on: SwiftApps/DSSAT/bin/gridCheck.sh
___________________________________________________________________
Added: svn:executable
   + *

Added: SwiftApps/DSSAT/counter.txt
===================================================================
--- SwiftApps/DSSAT/counter.txt	                        (rev 0)
+++ SwiftApps/DSSAT/counter.txt	2011-09-01 15:31:00 UTC (rev 5043)
@@ -0,0 +1 @@
+26

Added: SwiftApps/DSSAT/tc
===================================================================
--- SwiftApps/DSSAT/tc	                        (rev 0)
+++ SwiftApps/DSSAT/tc	2011-09-01 15:31:00 UTC (rev 5043)
@@ -0,0 +1,34 @@
+#This is the transformation catalog.
+#
+#It comes pre-configured with a number of simple transformations with
+#paths that are likely to work on a linux box. However, on some systems,
+#the paths to these executables will be different (for example, sometimes
+#some of these programs are found in /usr/bin rather than in /bin)
+#
+#NOTE WELL: fields in this file must be separated by tabs, not spaces; and
+#there must be no trailing whitespace at the end of each line.
+#
+# site		transformation	path		obsolete fields for compatibility
+
+localhost 	echo 		/bin/echo	null	null	null
+localhost 	cat 		/bin/cat	null	null	null
+localhost 	ls 		/bin/ls		null	null	null
+localhost 	grep 		/bin/grep	null	null	null
+localhost 	sort 		/bin/sort	null	null	null
+localhost 	paste 		/bin/paste	null	null	null
+localhost 	pwd 		/bin/pwd	null	null	null
+
+# For cluster usage
+
+pbs     RunDSSAT        /gpfs/pads/swift/ketan/DSSAT/bin/RunDSSAT.sh                null    null    null
+pbs     gridCheck       /gpfs/pads/swift/ketan/DSSAT/bin/gridCheck.sh               null    null    null
+
+
+
+# For localhost testing
+
+#localhost       RunDSSAT        /gpfs/pads/swift/ketan/DSSAT/bin/RunDSSAT.sh          null    null    null
+#localhost       gridCheck       /gpfs/pads/swift/ketan/DSSAT/bin/gridCheck.sh         null    null    null
+
+
+




More information about the Swift-commit mailing list